:root {
  color-scheme: light;
  --space: #f0f4f8;
  --space-2: #ffffff;
  --bg: #f0f4f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #1e293b;
  --muted: #64748b;
  --muted-strong: #475569;
  --data: #0f172a;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --pulse-purple: #2563eb;
  --pulse-cyan: #3b82f6;
  --sidebar: #ffffff;
  --sidebar-soft: #dbeafe;
  --danger: #ef4444;
  --danger-strong: #dc2626;
  --warn: #f59e0b;
  --warn-strong: #d97706;
  --ok: #10b981;
  --ok-strong: #059669;
  --card-shadow: 0 2px 12px rgba(30, 64, 175, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(34, 211, 238, 0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(37, 99, 235, 0.28) 0 1px, transparent 1.7px);
  background-position: 12% 18%, 78% 24%, 88% 72%;
  background-size: 320px 260px, 420px 320px, 520px 400px;
  opacity: 0.32;
  z-index: 0;
}

.loginView,
.appView {
  position: relative;
  z-index: 1;
}

.hidden,
.appView {
  display: none;
}

.appView.visible {
  display: block;
}

.loginView {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.16), transparent 24%),
    radial-gradient(circle at 18% 22%, rgba(37, 99, 235, 0.12), transparent 26%),
    linear-gradient(180deg, #0b0f1a 0%, #111827 100%);
}

.loginView.hidden {
  display: none;
}

.loginPanel {
  display: grid;
  gap: 12px;
  width: min(100%, 380px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.86);
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.loginPanel h1 {
  color: #ffffff;
  font-size: 24px;
}

.loginPanel p {
  color: #aab6c7;
  font-size: 13px;
}

.loginPanel input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.8);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--pulse-purple), #2563eb);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  border-color: rgba(34, 211, 238, 0.78);
  background: linear-gradient(135deg, #1d4ed8, var(--pulse-cyan));
  box-shadow: 0 0 32px rgba(37, 99, 235, 0.12);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1118;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: 0;
}

input,
select {
  min-height: 36px;
  padding: 0 10px;
}

textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(42, 45, 58, 0.68);
  background: rgba(11, 12, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(37, 99, 235, 0.12);
}

.topbar h1 {
  color: #ffffff;
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: 0.01em;
  font-size: 20px;
  line-height: 1.2;
}

.brandBlock {
  display: grid;
  gap: 4px;
}

.brandLockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulseLogo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transform: skew(-8deg);
}

.pulseLogo::before {
  content: "";
  position: absolute;
  left: 8px;
  width: 7px;
  height: 27px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pulse-cyan), var(--pulse-purple));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.52);
}

.pulseLogo::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  width: 18px;
  height: 18px;
  border: 4px solid var(--pulse-purple);
  border-left-color: transparent;
  border-radius: 50%;
  box-shadow:
    0 0 0 7px rgba(37, 99, 235, 0.16),
    0 0 0 13px rgba(34, 211, 238, 0.09),
    0 0 22px rgba(37, 99, 235, 0.36);
}

.pulseLogo span {
  position: absolute;
  right: 0;
  top: 6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    -23px 2px 0 rgba(255, 255, 255, 0.85),
    -6px 24px 0 rgba(34, 211, 238, 0.78),
    4px 19px 0 rgba(37, 99, 235, 0.8);
}

.topbar p,
.toolPanel p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.topActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topActions button {
  min-height: 34px;
}

.topActions button:not(#refreshButton) {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.topActions button:not(#refreshButton):hover {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(34, 211, 238, 0.1);
}

.userMenu {
  position: relative;
}

.userMenu summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.userMenu summary::-webkit-details-marker {
  display: none;
}

.userMenu summary::after {
  content: "▼";
  margin-left: 8px;
  color: var(--muted-strong);
  font-size: 10px;
}

.userMenu[open] summary {
  border-color: rgba(37, 99, 235, 0.48);
  background: rgba(37, 99, 235, 0.12);
}

.userMenu[open] {
  z-index: 5;
}

.userMenu[open]::before {
  content: "";
  position: fixed;
  inset: 0;
}

.userMenu button {
  position: relative;
  z-index: 1;
}

.userMenu[open] button {
  position: absolute;
  right: 0;
  width: 128px;
  justify-content: flex-start;
  border-color: var(--line);
  background: #16181f;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.userMenu[open] #hourlyReportButton {
  top: 42px;
}

.userMenu[open] #reportButton {
  top: 82px;
}

.userMenu[open] #logoutButton {
  top: 122px;
}

.currentUser {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.topActions input {
  width: 220px;
}

.tabbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tabbar .navButton {
  width: auto;
  min-height: 54px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 0 16px;
}

.tabbar .navButton:hover,
.tabbar .navButton.active {
  border-bottom-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 126px);
  background: linear-gradient(90deg, var(--sidebar) 0 220px, transparent 220px 100%);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 12px;
  border-right: 0;
  background: var(--sidebar);
  box-shadow: inset -1px 0 0 rgba(37, 99, 235, 0.12);
}

.sideTitle {
  padding: 0 10px 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workerNav {
  display: grid;
  gap: 8px;
}

.navButton {
  width: 100%;
  justify-content: flex-start;
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.workerNavItem {
  width: 100%;
  justify-content: flex-start;
  display: grid;
  gap: 4px;
  min-height: 58px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  padding: 9px 12px;
  text-align: left;
}

.workerNavItem span {
  color: #ffffff;
  font-weight: 700;
}

.workerNavItem em {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
}

.workerNavItem:hover,
.workerNavItem.active {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.12);
  color: #ffffff;
}

.navButton:hover,
.navButton.active {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--sidebar-soft);
  color: #ffffff;
}

main {
  width: 100%;
  margin: 0;
  padding: 20px;
  box-shadow: inset 18px 0 28px rgba(0, 0, 0, 0.16);
}

.pageHero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(90deg, #11131a, var(--panel));
}

.pageHero h2 {
  margin-top: 4px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.2;
}

.pageHero p {
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 13px;
}

.eyebrow {
  color: var(--pulse-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pageHeroActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.secondaryButton {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.secondaryButton:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.1);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.toolPanel,
.dateFilter,
.worker,
.metric,
.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.toolPanel:hover,
.worker:hover,
.metric:hover {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.12), 0 18px 42px rgba(0, 0, 0, 0.18);
}

.toolPanel {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px 18px;
  padding: 18px;
  margin-bottom: 14px;
}

.accountToolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.accountFormArea {
  display: grid;
  grid-column: 2;
  gap: 8px;
}

.accountAdd.isCollapsed .accountFormArea {
  display: none;
}

.toolPanel h2 {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.accountAddGrid,
.appBudgetGrid,
.assetSyncGrid {
  display: grid;
  gap: 8px;
  align-items: center;
}

.userGrid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) 120px 96px;
  gap: 8px;
  align-items: center;
}

.userGrid button {
  width: 100%;
  padding: 0 10px;
}

.accountAddGrid {
  grid-template-columns: 180px minmax(170px, 0.9fr) minmax(220px, 1.2fr) minmax(170px, 0.8fr) 104px;
}

.appBudgetGrid {
  grid-template-columns: 180px minmax(220px, 1fr) minmax(180px, 0.7fr) 100px;
}

.assetSyncGrid {
  grid-template-columns: minmax(280px, 1.3fr) minmax(220px, 0.9fr) minmax(190px, 0.8fr) 108px;
}

.accountAddGrid button,
.appBudgetGrid button,
.assetSyncGrid button {
  width: 100%;
  padding: 0 10px;
}

.assetSyncHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.assetSyncHeader button {
  flex: 0 0 auto;
}

.bulkAccountInput,
.formStatus,
.listFilter,
.accountList,
.budgetList,
.assetResults {
  grid-column: 2;
}

.bulkAccountInput {
  min-height: 118px;
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent 34%),
    #0f1118;
}

.formStatus,
.emptySmall,
.budgetEmpty {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.formStatus.ok {
  color: var(--ok);
}

.formStatus.error {
  color: var(--danger);
}

.listFilter input {
  max-width: 360px;
}

.accountList {
  display: grid;
  gap: 20px;
}

.accountSummary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-column: 2;
}

.accountSummary div {
  display: grid;
  gap: 6px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: var(--card-shadow);
}

.accountSummary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.accountSummary strong {
  color: var(--data);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.userList {
  grid-column: 2;
}

.userTable .actionCell button {
  width: 72px;
}

.accountGroup,
.assetGroup {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #11131a;
}

.accountGroup::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.accountGroupHeader,
.assetGroup h3 {
  border-bottom: 1px solid var(--line);
  background: #1e2130;
}

.accountGroupHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  border-left: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #1e2130;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
}

.accountGroupHeader div {
  display: grid;
  gap: 4px;
}

.accountGroupHeader strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 15px;
}

.accountGroupHeader span {
  display: block;
  font-size: 12px;
}

.accountGroupCount {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
}

.statusDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok-strong);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.48);
}

.statusDot.warn {
  background: var(--warn-strong);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.48);
}

.statusDot.error {
  background: var(--danger-strong);
  box-shadow: 0 0 8px rgba(255, 107, 87, 0.48);
}

.accountGroupHeader span,
.assetRow em,
.budgetPill span,
.appLine span,
.muted {
  color: var(--muted-strong);
}

.compactTableWrap,
.tableWrap {
  overflow-x: auto;
}

.compactTableWrap.collapsed {
  display: none;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.compactTable {
  min-width: 680px;
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #10131b;
}

td {
  color: var(--ink);
  font-weight: 400;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

tbody tr:hover {
  background: #1e2130;
  box-shadow: inset 3px 0 0 var(--accent);
}

.accountNameCell {
  color: #f8fafc;
  font-weight: 600;
}

.accountIdCell {
  color: #cbd5e1;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

td.num,
th.num {
  width: 116px;
  text-align: right;
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

td.num {
  color: var(--data);
  font-weight: 500;
}

th.num {
  color: var(--muted-strong);
}

.budgetList {
  display: block;
}

.budgetPill {
  display: inline-grid;
  gap: 2px;
  min-height: 44px;
  border-color: var(--line);
  background: #11131a;
  color: var(--ink);
  text-align: left;
}

.budgetPill strong,
.assetGroup h3 {
  font-size: 13px;
}

.budgetTable {
  min-width: 720px;
}

.assetResults {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.assetGroup h3 {
  padding: 10px 12px;
}

.assetRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.assetRow:last-child {
  border-bottom: 0;
}

.assetRow input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.assetRow span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.assetRow strong,
.assetRow em,
.campaignName,
.accountToggle strong,
.accountToggle em {
  overflow-wrap: anywhere;
}

.dateFilter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.dateFilterLabel {
  color: var(--muted);
  font-weight: 700;
}

.dateFilterControls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dateFilterControls input {
  width: 170px;
}

.datePreset {
  min-height: 34px;
  border-color: var(--line);
  border-radius: 999px;
  background: #11131a;
  color: var(--ink);
}

.datePreset.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted-strong);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  color: var(--data);
  font-size: 30px;
  font-family: "JetBrains Mono", Inter, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
}

.metric em {
  display: block;
  margin-top: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
}

.metric.metricWarn {
  border-color: rgba(245, 158, 11, 0.42);
}

.metric.metricWarn strong {
  color: #fcd34d;
}

.alerts {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.alert {
  padding: 12px 14px;
  border-left: 4px solid var(--warn);
}

.alert.critical {
  border-left-color: var(--danger);
}

.workers {
  display: grid;
  gap: 20px;
}

.workerHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.workerHeader h2 {
  font-size: 17px;
}

.workerHeader p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.appSummary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.appMonitorGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: stretch;
  gap: 20px;
  padding: 20px;
}

.appMonitorCard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: 12px;
  background: #11131a;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

.appMonitorCard::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--pulse-purple), var(--pulse-cyan));
}

.appMonitorCard.isEmpty::before {
  background: var(--line);
}

.appMonitorHeader {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.appMonitorHeader h3 {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.appMonitorHeader p,
.appMonitorHeader span {
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 12px;
}

.appMonitorHeader > span {
  flex: 0 0 auto;
  margin-top: 2px;
}

.appMonitorStats {
  display: grid;
  grid-template-columns: 1.3fr 1.1fr 0.8fr;
  gap: 12px;
  padding: 16px 20px 10px;
}

.appMonitorStats div {
  display: grid;
  gap: 5px;
}

.appMonitorStats span {
  color: var(--muted-strong);
  font-size: 11px;
}

.appMonitorStats strong {
  color: #ffffff;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.progressTrack {
  height: 6px;
  margin: 4px 20px 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.progressTrack span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pulse-purple), var(--pulse-cyan));
}

.miniTableWrap {
  flex: 1;
  overflow-x: auto;
  padding: 0 20px 20px;
}

.miniTable {
  min-width: 680px;
}

.miniTable th,
.miniTable td {
  padding: 8px 9px;
  font-size: 12px;
}

.quietRow td {
  color: #64748b;
}

.quietRow .accountNameCell,
.quietRow td.num {
  color: #64748b;
}

.emptyData {
  display: grid;
  place-items: center;
  align-content: center;
  flex: 1;
  min-height: 170px;
  margin: 0 20px 20px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  color: var(--muted-strong);
  text-align: center;
}

.emptyData strong {
  color: #cbd5e1;
  font-size: 15px;
}

.emptyData span {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

.appLine {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #11131a;
}

.appLine strong {
  color: var(--data);
  font-size: 15px;
}

.appLine span {
  font-size: 13px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.badge.dry {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.badge.error {
  border-color: rgba(255, 107, 87, 0.42);
  background: rgba(255, 107, 87, 0.14);
  color: #fca5a5;
}

.delta,
.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.delta.positive,
.trend.positive {
  color: var(--ok-strong);
}

.delta.negative,
.trend.negative {
  color: var(--danger-strong);
}

.delta.positive::before,
.trend.positive::before {
  content: "↑";
}

.delta.negative::before,
.trend.negative::before {
  content: "↓";
}

.campaignName {
  min-width: 280px;
  word-break: break-word;
  line-height: 1.35;
}

.statusCell {
  width: 120px;
  white-space: nowrap;
}

.actionCell {
  width: 110px;
  text-align: right;
  white-space: nowrap;
}

.actionCell button {
  width: 72px;
  padding: 0 10px;
}

.accountToggle {
  display: grid;
  grid-template-columns: 22px minmax(180px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  padding: 11px 16px;
  text-align: left;
}

.accountToggle .chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.accountToggle em {
  color: var(--muted-strong);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-style: normal;
}

.tableWrap.collapsed {
  display: none;
}

.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .accountAddGrid,
  .appBudgetGrid,
  .assetSyncGrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topActions {
    width: 100%;
    justify-content: flex-start;
  }

  .topActions input {
    width: min(100%, 260px);
  }

  .tabbar {
    overflow-x: auto;
    padding: 0 10px;
  }

  .tabbar .navButton {
    flex: 0 0 auto;
  }

  .layout {
    grid-template-columns: 1fr;
    background: var(--bg);
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workerNav {
    display: flex;
    gap: 10px;
  }

  .sideTitle {
    flex: 0 0 auto;
    align-self: center;
    padding: 0 4px;
  }

  .workerNavItem {
    min-width: 180px;
  }

  main {
    padding: 14px;
    box-shadow: none;
  }

  .toolPanel {
    grid-template-columns: 1fr;
  }

  .pageHero {
    align-items: stretch;
    flex-direction: column;
  }

  .accountAddGrid,
  .appBudgetGrid,
  .assetSyncGrid,
  .userGrid {
    grid-template-columns: 1fr;
  }

  .bulkAccountInput,
  .accountFormArea,
  .formStatus,
  .listFilter,
  .accountSummary,
  .accountList,
  .userList,
  .budgetList,
  .assetResults {
    grid-column: 1;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dateFilter,
  .assetSyncHeader,
  .workerHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .accountToggle {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .accountToggle em {
    grid-column: 2;
  }
}

/* Light workspace theme */
.loginView {
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.12), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(79, 70, 229, 0.1), transparent 22%),
    var(--bg);
}

.loginPanel,
.topbar,
.tabbar,
.sidebar,
.toolPanel,
.dateFilter,
.worker,
.metric,
.alert,
.pageHero,
.accountGroup,
.assetGroup,
.appMonitorCard {
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.loginPanel {
  border-color: var(--line);
}

.loginPanel h1,
.topbar h1,
.pageHero h2,
.workerNavItem span,
.accountGroupHeader strong,
.appMonitorHeader h3,
.appLine strong,
.metric strong,
.appMonitorStats strong,
.accountNameCell,
td.num {
  color: var(--data);
}

.pulseLogo span {
  background: var(--data);
  box-shadow:
    -23px 2px 0 rgba(15, 23, 42, 0.42),
    -6px 24px 0 rgba(79, 70, 229, 0.62),
    4px 19px 0 rgba(37, 99, 235, 0.68);
}

.loginPanel p,
.topbar p,
.toolPanel p,
.currentUser,
.userMenu summary,
.tabbar .navButton,
.navButton,
.workerNavItem,
.pageHero p,
.metric span,
.metric em,
.workerHeader p,
.appMonitorHeader p,
.appMonitorHeader span,
.appMonitorStats span,
.emptyData span {
  color: var(--muted);
}

.loginPanel input,
input,
select,
textarea {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

button {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: none;
}

button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.16);
}

.topbar {
  border-bottom-color: var(--line);
}

.topActions button:not(#refreshButton),
.secondaryButton,
.userMenu summary {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.topActions button:not(#refreshButton):hover,
.secondaryButton:hover,
.userMenu summary:hover {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent);
}

.userMenu[open] button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.tabbar {
  border-bottom-color: var(--line);
}

.tabbar .navButton:hover,
.tabbar .navButton.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.layout {
  background: linear-gradient(90deg, #ffffff 0 220px, transparent 220px 100%);
}

.sidebar {
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.workerNavItem {
  border-color: var(--line);
  background: #ffffff;
}

.workerNavItem:hover,
.workerNavItem.active {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent);
}

.navButton:hover,
.navButton.active {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  box-shadow: none;
}

.pageHero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), transparent 35%),
    #ffffff;
}

.eyebrow {
  color: var(--accent);
}

.toolPanel,
.dateFilter,
.worker,
.metric,
.alert {
  border-radius: 12px;
}

.toolPanel:hover,
.worker:hover,
.metric:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.bulkAccountInput {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 34%),
    #ffffff;
}

.accountGroup,
.assetGroup {
  background: #ffffff;
}

.accountGroupHeader,
.assetGroup h3 {
  background: #f8fafc;
}

.accountGroupHeader {
  background: #f8fafc;
  color: var(--ink);
}

.accountGroupCount {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  color: var(--accent);
}

th {
  background: #f8fafc;
  color: var(--muted);
}

td {
  color: var(--ink);
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #f1f5f9;
  box-shadow: inset 3px 0 0 var(--accent);
}

.accountIdCell {
  color: var(--muted-strong);
}

.datePreset {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.datePreset.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.metric {
  background: #ffffff;
}

.badge {
  border-color: rgba(16, 185, 129, 0.26);
  background: #ecfdf5;
  color: #047857;
}

.badge.dry {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
  color: #b45309;
}

.badge.error {
  border-color: rgba(239, 68, 68, 0.28);
  background: #fef2f2;
  color: #b91c1c;
}

.appMonitorCard {
  border-color: var(--line);
  background: #ffffff;
}

.appMonitorHeader {
  border-bottom-color: #f1f5f9;
}

.progressTrack {
  background: #e2e8f0;
}

.miniTableWrap {
  background: #ffffff;
}

.quietRow td,
.quietRow .accountNameCell,
.quietRow td.num {
  color: #94a3b8;
}

.emptyData {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.emptyData strong {
  color: var(--muted-strong);
}

/* Blue brand refinements */
.loginView {
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.12), transparent 24%),
    radial-gradient(circle at 82% 20%, rgba(59, 130, 246, 0.1), transparent 22%),
    var(--bg);
}

button {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

button:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.24);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.pulseLogo::before {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.36);
}

.pulseLogo::after {
  border-color: #2563eb;
  border-left-color: transparent;
  box-shadow:
    0 0 0 7px rgba(37, 99, 235, 0.12),
    0 0 0 13px rgba(59, 130, 246, 0.08),
    0 0 22px rgba(37, 99, 235, 0.34);
}

.pulseLogo span {
  box-shadow:
    -23px 2px 0 rgba(15, 23, 42, 0.42),
    -6px 24px 0 rgba(59, 130, 246, 0.62),
    4px 19px 0 rgba(37, 99, 235, 0.68);
}

.userMenu[open] summary,
.tabbar .navButton:hover,
.tabbar .navButton.active,
.workerNavItem:hover,
.workerNavItem.active,
.navButton:hover,
.navButton.active,
.topActions button:not(#refreshButton):hover,
.secondaryButton:hover,
.userMenu summary:hover {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.pageHero {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.07), transparent 35%),
    #ffffff;
}

.toolPanel:hover,
.worker:hover,
.metric:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.12);
}

.bulkAccountInput {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 34%),
    #ffffff;
}

.accountGroupCount {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.appMonitorCard::before,
.progressTrack span {
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

/* Account management polish */
.accountToolbar #toggleAccountFormButton,
.pageHeroActions #jumpAddButton,
.accountAddGrid #addAccountButton {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  font-weight: 700;
}

.accountToolbar .secondaryButton,
.pageHeroActions .secondaryButton {
  border-color: #2563eb;
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
}

.accountToolbar .secondaryButton:hover,
.pageHeroActions .secondaryButton:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.accountGroup {
  border-color: #dbeafe;
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.accountGroupHeader {
  min-height: 74px;
  background: #ffffff;
  padding: 16px 18px;
}

.accountGroupHeader:hover {
  border-color: transparent;
  background: #f8fbff;
  color: var(--ink);
  box-shadow: none;
}

.accountGroupHeader strong::before {
  content: "●";
  color: #2563eb;
  font-size: 12px;
}

.accountGroupHeader span {
  color: #64748b;
}

.badge {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 700;
}

.accountIdCell {
  color: #475569;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.accountNameCell {
  color: #0f172a;
}

.compactTable th {
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.compactTable td {
  height: 52px;
}

@media (max-width: 900px) {
  .accountSummary {
    grid-template-columns: 1fr;
  }
}

/* Stable management dropdown */
.userMenu {
  position: relative;
}

.userMenu summary {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.userMenuPanel {
  display: none;
}

.userMenu[open] .userMenuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 156px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.userMenu[open] .userMenuPanel button {
  position: static;
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #1e293b;
  padding: 0 14px;
  box-shadow: none;
  text-align: left;
}

.userMenu[open] .userMenuPanel button:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

.userMenu[open] #hourlyReportButton,
.userMenu[open] #reportButton,
.userMenu[open] #logoutButton {
  top: auto;
}

/* Blue-white visual refinement */
:root {
  --blue-900: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-25: #f0f7ff;
}

.pageHero h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 700;
}

.pageHero p,
.toolPanel p {
  color: #64748b;
  font-size: 14px;
}

.toolPanel,
.dateFilter,
.worker,
.metric,
.accountGroup,
.assetGroup,
.appMonitorCard,
.accountSummary div {
  box-shadow:
    0 1px 3px rgba(30, 64, 175, 0.06),
    0 4px 16px rgba(30, 64, 175, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.toolPanel:hover,
.worker:hover,
.metric:hover,
.accountGroup:hover,
.assetGroup:hover,
.appMonitorCard:hover,
.accountSummary div:hover {
  border-color: #bfdbfe;
  box-shadow:
    0 4px 12px rgba(30, 64, 175, 0.1),
    0 8px 32px rgba(30, 64, 175, 0.06);
  transform: translateY(-2px);
}

.accountGroupHeader:hover {
  transform: none;
}

.accountGroupHeader {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

.accountGroup::before {
  height: 4px;
  background: linear-gradient(90deg, var(--blue-900) 0%, var(--blue-600) 46%, #60a5fa 100%);
}

.accountGroupHeader strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.accountGroupHeader strong::before {
  color: var(--blue-600);
}

.accountGroupHeader span {
  color: #64748b;
  font-size: 12px;
}

.accountGroupCount {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
}

.badge {
  gap: 6px;
  border-color: #bfdbfe;
  background: var(--blue-100);
  color: var(--blue-600);
  padding: 2px 12px 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
}

tbody tr:hover,
.userMenu[open] .userMenuPanel button:hover {
  background: var(--blue-25);
}

input,
select,
textarea {
  border-width: 1.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #93c5fd;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.compactTable th,
th {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.compactTable td,
td {
  color: #1e293b;
  font-size: 14px;
}

.accountIdCell,
td.num {
  color: #0f172a;
  font-weight: 500;
}

.accountSummary strong,
.metric strong,
.appMonitorStats strong {
  color: #0f172a;
}

.statusDot.ok,
.delta.positive,
.trend.positive {
  color: #10b981;
}

.progressTrack span,
.appMonitorCard::before {
  background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 55%, #93c5fd 100%);
}

/* Nebula login */
.loginView {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at 82% 84%, rgba(56, 189, 248, 0.13), transparent 30%),
    linear-gradient(145deg, #eff6ff 0%, #dbeafe 42%, #bfdbfe 100%);
}

.loginView::before,
.loginView::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.loginView::before {
  top: -220px;
  left: -180px;
  width: 620px;
  height: 620px;
  background: rgba(37, 99, 235, 0.12);
  animation: floatGlow 9s ease-in-out infinite alternate;
}

.loginView::after {
  right: -160px;
  bottom: -180px;
  width: 540px;
  height: 540px;
  background: rgba(56, 189, 248, 0.12);
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}

.loginPanel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  padding: 42px 38px 34px;
  box-shadow:
    0 22px 70px rgba(30, 64, 175, 0.16),
    0 8px 24px rgba(30, 64, 175, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(1.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  animation: cardEntry 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loginBrand {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.loginBrand h1 {
  color: #0f172a;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 30px;
  line-height: 1.05;
}

.loginBrand h1 span {
  color: #2563eb;
}

.loginBrand p,
.loginHint {
  color: #64748b;
  font-size: 13px;
}

.pulseRingBox {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
}

.pulseRing {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(37, 99, 235, 0.28);
  border-radius: 50%;
  animation: ringExpand 3s ease-out infinite;
}

.ringTwo {
  animation-delay: 1s;
}

.ringThree {
  animation-delay: 2s;
}

.pulseCore {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.34);
}

.pulseCore .pulseLogo {
  filter: brightness(0) invert(1);
  transform: skew(-8deg) scale(0.86);
}

.loginIntro {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.loginIntro strong {
  color: #0f172a;
  font-size: 20px;
}

.loginIntro span {
  color: #64748b;
  font-size: 13px;
}

.loginField {
  display: grid;
  gap: 7px;
}

.loginField > span:first-child {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.loginPanel input {
  min-height: 48px;
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  padding: 0 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.loginPanel input:focus {
  border-color: #2563eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.08),
    0 5px 14px rgba(37, 99, 235, 0.06);
}

.passwordWrap {
  position: relative;
  display: block;
}

.passwordWrap input {
  padding-right: 68px;
}

.passwordToggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  padding: 0 10px;
  transform: translateY(-50%);
  box-shadow: none;
}

.passwordToggle:hover {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: none;
}

.loginButton {
  position: relative;
  min-height: 50px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.loginButton::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -80%;
  width: 220%;
  height: 240%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.26) 50%, transparent 60%);
  transform: rotate(24deg) translateX(-100%);
  transition: transform 0.8s ease;
}

.loginButton:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

.loginButton:hover::after {
  transform: rotate(24deg) translateX(100%);
}

.loginHint {
  text-align: center;
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(36px, 28px, 0) scale(1.14);
  }
}

@keyframes ringExpand {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Login layout fix: clean single-column card */
.loginView .loginPanel {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: min(420px, calc(100vw - 40px));
  padding: 38px 36px 32px;
}

.loginView .loginBrand,
.loginView .loginIntro,
.loginView .loginField,
.loginView .loginHint,
.loginView #loginStatus {
  width: 100%;
}

.loginView .loginBrand {
  margin-bottom: 4px;
}

.loginView .pulseRingBox {
  width: 86px;
  height: 86px;
}

.loginView .pulseCore {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.loginView .loginBrand h1 {
  font-size: 34px;
}

.loginView .loginIntro {
  margin-top: 2px;
  text-align: left;
}

.loginView .loginIntro strong {
  display: block;
  font-size: 21px;
  line-height: 1.25;
}

.loginView .loginField {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

.loginView .loginField > span:first-child {
  display: block;
}

.loginView .passwordWrap {
  display: block;
  width: 100%;
}

.loginView .passwordWrap input,
.loginView #loginUsername {
  width: 100%;
}

.loginView .passwordToggle {
  top: 50%;
  right: 8px;
  width: auto;
  min-width: 48px;
  background: transparent;
}

.loginView .loginButton {
  width: 100%;
  margin-top: 2px;
}

.loginButton.isLoading {
  cursor: wait;
  opacity: 0.9;
}

.loginButton.isLoading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Final dropdown layering fix */
.topbar {
  position: relative;
  z-index: 1000;
  overflow: visible;
}

.tabbar,
.layout,
main {
  position: relative;
  z-index: 1;
}

.userMenu[open] {
  z-index: 1100;
}

.userMenu[open]::before {
  content: none;
}

.userMenu[open] .userMenuPanel {
  position: fixed;
  top: 64px;
  right: 28px;
  z-index: 1200;
}

.userMenu[open] > button {
  position: fixed;
  right: 28px;
  z-index: 1200;
  width: 156px;
  min-height: 42px;
  justify-content: flex-start;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  background: #ffffff;
  color: #1e293b;
  padding: 0 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  text-align: left;
}

.userMenu[open] > #hourlyReportButton {
  top: 64px;
  border-radius: 10px 10px 0 0;
}

.userMenu[open] > #reportButton {
  top: 106px;
}

.userMenu[open] > #logoutButton {
  top: 148px;
  border-radius: 0 0 10px 10px;
}

.userMenu[open] > button:hover {
  background: #f0f7ff;
  color: #1d4ed8;
}

.accountGroup::before {
  background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 55%, #93c5fd 100%);
}

/* Hard login reset */
#loginView #loginForm.loginPanel {
  display: block !important;
  width: min(390px, calc(100vw - 40px)) !important;
}

#loginView #loginForm.loginPanel > * {
  display: block;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#loginView .loginBrand,
#loginView .loginIntro {
  text-align: center;
}

#loginView .loginIntro {
  margin-top: 18px;
  margin-bottom: 18px;
}

#loginView .loginIntro strong {
  font-size: 22px;
}

#loginView .loginField {
  margin-top: 14px;
}

#loginView .loginField > span:first-child {
  margin-bottom: 7px;
}

#loginView .passwordWrap {
  position: relative;
}

#loginView .passwordToggle {
  position: absolute !important;
  top: 50% !important;
  right: 8px !important;
  transform: translateY(-50%) !important;
  min-height: 32px;
}

#loginView .loginButton {
  margin-top: 22px;
}

#loginView .loginHint {
  margin-top: 14px;
}

/* Google Ads style login reset */
#loginView.loginView {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: auto;
  background: #ffffff;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#loginView.loginView::before,
#loginView.loginView::after {
  content: none;
}

#loginView #loginForm.loginPanel {
  display: block !important;
  width: min(400px, calc(100vw - 40px)) !important;
  border: 1px solid #dadce0;
  border-radius: 12px;
  background: #ffffff;
  padding: 40px 36px 36px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fadeInLogin 0.45s ease-out both;
}

#loginView #loginForm.loginPanel:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#loginView .googleBrand {
  display: block;
  width: 100%;
  padding: 0 0 30px;
  text-align: center;
}

#loginView .googleBrandIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: #1a73e8;
  color: #ffffff;
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.25);
}

#loginView .googleBrandIcon .pulseLogo {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
  transform: skew(-8deg) scale(0.92);
}

#loginView .googleBrandIcon .pulseLogo::before {
  left: 8px;
  width: 7px;
  height: 27px;
}

#loginView .googleBrandIcon .pulseLogo::after {
  left: 13px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-width: 4px;
}

#loginView .googleBrandIcon .pulseLogo span {
  display: none;
}

#loginView .googleBrand h1 {
  margin: 0;
  color: #202124;
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

#loginView .googleBrand h1 span {
  color: #1a73e8;
}

#loginView .googleBrand p {
  margin-top: 4px;
  color: #5f6368;
  font-size: 14px;
}

#loginView .loginIntro {
  margin: 0 0 28px;
  text-align: left;
}

#loginView .loginIntro strong {
  color: #202124;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

#loginView .loginField {
  display: block !important;
  margin: 0 0 20px;
}

#loginView .loginField > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: #3c4043;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

#loginView .inputWrap {
  position: relative;
  display: block;
  width: 100%;
}

#loginView .inputWrap input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 1.5px solid #dadce0;
  border-radius: 8px;
  background: #ffffff;
  color: #202124;
  padding: 0 16px;
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#loginView .inputWrap input::placeholder {
  color: #9aa0a6;
}

#loginView .inputWrap input:hover {
  border-color: #b0b8c0;
}

#loginView .inputWrap input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
  outline: none;
}

#loginView .passwordWrap input {
  padding-right: 64px;
}

#loginView .passwordToggle {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  width: auto;
  min-width: 42px;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f6368;
  padding: 0 8px;
  font-size: 13px;
  transform: translateY(-50%) !important;
  box-shadow: none;
}

#loginView .passwordToggle:hover {
  background: #f1f3f4;
  color: #202124;
}

#loginView .loginButton {
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: #1a73e8;
  color: #ffffff;
  font-family: Inter, Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

#loginView .loginButton:hover {
  background: #1557b0;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
  transform: none;
}

#loginView .loginButton:active {
  transform: scale(0.98);
}

#loginView .loginSpinner {
  display: none;
}

#loginView .loginButton.isLoading .loginSpinner {
  display: inline-block;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
}

#loginView .loginHint {
  margin: 20px 0 0;
  color: #5f6368;
  font-size: 13px;
  text-align: center;
}

#loginView #loginStatus {
  margin-top: 12px;
  text-align: center;
}

@keyframes fadeInLogin {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard type scale tuning */
.topbar h1 {
  font-size: 18px;
  font-weight: 700;
}

.topbar p {
  font-size: 12px;
}

.tabbar .navButton {
  font-size: 14px;
  font-weight: 600;
}

.sideTitle,
.workerNavItem em {
  font-size: 11px;
}

.workerNavItem span {
  font-size: 15px;
  font-weight: 700;
}

.pageHero h2 {
  font-size: 22px;
  font-weight: 700;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pageHero p,
.toolPanel p {
  font-size: 13px;
}

.toolPanel h2 {
  font-size: 16px;
  font-weight: 700;
}

.accountToolbar button,
.pageHeroActions button,
.accountAddGrid button,
.appBudgetGrid button,
.assetSyncGrid button,
.topActions button,
.userMenu summary {
  font-size: 13px;
  font-weight: 600;
}

.accountSummary span,
.metric span {
  font-size: 12px;
}

.accountSummary strong {
  font-size: 22px;
  font-weight: 600;
}

.metric strong {
  font-size: 26px;
  font-weight: 600;
}

.accountGroupHeader strong {
  font-size: 15px;
  font-weight: 650;
}

.accountNameCell {
  font-size: 13px;
  font-weight: 600;
}

.accountIdCell,
.compactTable td,
td {
  font-size: 13px;
}

.badge,
.accountGroupCount {
  font-size: 11px;
}

/* Lighter typography pass */
body {
  font-weight: 400;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 650;
}

.brandBlock p,
.topbar p,
.currentUser {
  font-size: 12px;
  font-weight: 400;
}

.tabbar .navButton {
  font-size: 13px;
  font-weight: 500;
}

.workerNavItem span {
  font-size: 14px;
  font-weight: 600;
}

.pageHero h2 {
  font-size: 20px;
  font-weight: 650;
}

.eyebrow {
  font-size: 10px;
  font-weight: 650;
}

.pageHero p,
.toolPanel p,
.workerHeader p {
  font-size: 12px;
  font-weight: 400;
}

.toolPanel h2,
.workerHeader h2 {
  font-size: 15px;
  font-weight: 650;
}

.accountToolbar button,
.pageHeroActions button,
.accountAddGrid button,
.appBudgetGrid button,
.assetSyncGrid button,
.topActions button,
.userMenu summary {
  font-size: 13px;
  font-weight: 500;
}

.accountSummary span,
.metric span,
.appMonitorStats span {
  font-size: 12px;
  font-weight: 500;
}

.accountSummary strong {
  font-size: 20px;
  font-weight: 550;
}

.metric strong {
  font-size: 24px;
  font-weight: 550;
}

.appMonitorStats strong {
  font-size: 16px;
  font-weight: 550;
}

.accountGroupHeader strong {
  font-size: 14px;
  font-weight: 600;
}

.accountGroupHeader span {
  font-size: 12px;
  font-weight: 400;
}

.accountNameCell {
  font-size: 13px;
  font-weight: 500;
}

.accountIdCell,
.compactTable td,
td {
  font-size: 13px;
  font-weight: 400;
}

.compactTable th,
th {
  font-size: 12px;
  font-weight: 500;
}

td.num,
.accountIdCell {
  font-weight: 500;
}

.badge,
.accountGroupCount {
  font-size: 11px;
  font-weight: 500;
}

#loginView .googleBrand h1 {
  font-size: 26px;
  font-weight: 550;
}

#loginView .loginIntro strong {
  font-size: 19px;
  font-weight: 500;
}

#loginView .loginField > span:first-child,
#loginView .loginButton {
  font-weight: 500;
}
