:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --ink: #111820;
  --muted: #687480;
  --line: #dfe5eb;
  --dark: #0c1117;
  --teal: #0e9e96;
  --green: #138a5b;
  --blue: #165dce;
  --amber: #b87312;
  --red: #c94b4b;
  --shadow: 0 8px 22px rgba(17, 24, 32, 0.06);
  --radius: 6px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #132027, #0f4b4b 62%, #1d6b61);
}

.login-panel {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row.compact {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.login-brand-logo {
  width: 86px;
  height: 86px;
}

.sidebar-brand-logo {
  width: 72px;
  height: 72px;
}

.mobile-brand-logo {
  display: none;
  width: 48px;
  height: 48px;
}

.brand-row h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.15;
}

.brand-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand-row p {
  color: rgba(236, 244, 241, 0.7);
}

.login-copy {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: grid;
  gap: 4px;
}

.login-copy strong {
  font-size: 16px;
}

.login-copy span,
.field span {
  color: var(--muted);
  font-size: 13px;
}

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

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 139, 132, 0.22);
  outline-offset: 2px;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.primary-action,
.secondary-action {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 750;
}

.primary-action {
  background: var(--teal);
  color: white;
}

.primary-action.small {
  min-height: 34px;
  padding: 7px 11px;
}

.secondary-action {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: var(--dark);
  color: #ecf4f1;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 10px;
  background: transparent;
  color: rgba(236, 244, 241, 0.76);
  text-align: left;
  font-weight: 680;
}

.nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-status span,
.sidebar-status small {
  color: rgba(236, 244, 241, 0.68);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  display: grid;
  align-content: start;
}

.topbar {
  min-height: 84px;
  padding: 18px 24px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.pill,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 760;
  background: #eef4f2;
  color: #27524e;
}

.status.green {
  background: #e8f5ef;
  color: #176b43;
}

.status.blue {
  background: #e9f0fd;
  color: #214e9a;
}

.status.amber {
  background: #fff4df;
  color: #8b560f;
}

.status.red {
  background: #fdecec;
  color: #9b2f2f;
}

.metrics {
  padding: 18px 24px 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 102px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.metrics span,
.metrics small {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  font-size: 26px;
  letter-spacing: 0;
}

.view {
  display: none;
  padding: 18px 24px 28px;
}

.view.active {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-2 {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel.highlight {
  border-color: rgba(45, 110, 211, 0.28);
}

.panel-head {
  min-height: 68px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.panel-head .status {
  margin-top: 0;
}

.panel-body,
.wallet-panel,
.boundary-panel {
  padding: 16px;
}

.summary-grid,
.portfolio-grid,
.wallet-grid,
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
  gap: 5px;
}

.summary-item label,
.portfolio-item label,
.wallet-item label,
.boundary-item label {
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong,
.portfolio-item strong,
.wallet-item strong,
.boundary-item strong {
  font-size: 15px;
}

.resource-strip,
.resource-list,
.task-list,
.service-market,
.timeline {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.resource-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.resource-card,
.task-card,
.service-card,
.log-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.resource-card {
  min-height: 140px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.resource-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.resource-button.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 139, 132, 0.12);
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 900;
}

.resource-card h4,
.resource-button h4,
.task-card h4,
.service-card h4,
.log-card h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.resource-card p,
.resource-button p,
.task-card p,
.service-card p,
.log-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quality {
  min-width: 58px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.bar {
  display: block;
  height: 7px;
  margin-top: 6px;
  border-radius: 99px;
  background: #e6edf0;
  overflow: hidden;
}

.bar i {
  display: block;
  width: var(--value);
  height: 100%;
  background: var(--teal);
}

.passport-detail {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.passport-visual {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 139, 132, 0.12), rgba(45, 110, 211, 0.1)),
    repeating-linear-gradient(90deg, transparent, transparent 25px, rgba(23, 33, 43, 0.04) 26px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
}

.passport-visual strong {
  display: block;
  font-size: 20px;
}

.passport-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-form {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.route-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.route-switch button {
  min-height: 38px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font-weight: 750;
}

.route-switch button.active {
  background: var(--teal);
  color: #fff;
}

.quote-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  display: grid;
}

.quote-row {
  min-height: 36px;
  padding: 9px 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.quote-row:last-child {
  border-bottom: 0;
}

.quote-row span {
  color: var(--muted);
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.task-card button {
  min-width: 86px;
}

.wallet-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ffe3ad;
  border-radius: var(--radius);
  background: #fff9ee;
  color: #765018;
  line-height: 1.5;
  font-size: 13px;
}

.service-market {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  min-height: 160px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unit-list span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.log-card {
  display: grid;
  gap: 4px;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .resource-strip,
  .service-market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px;
  }

  .brand-row.compact,
  .sidebar-status {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: auto;
  }

  .nav button {
    text-align: center;
    white-space: nowrap;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .mobile-brand-logo {
    display: block;
  }

  .metrics,
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metrics,
  .dashboard-grid,
  .resource-strip,
  .service-market,
  .summary-grid,
  .portfolio-grid,
  .wallet-grid,
  .boundary-grid,
  .passport-kv {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-button,
  .task-card {
    grid-template-columns: 1fr;
  }

  .quality {
    text-align: left;
  }
}

/* V0.7 financial control-room layout */
.login-screen {
  min-height: 100vh;
  padding: 32px;
  background: var(--dark);
}

.login-layout {
  width: min(1120px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
  overflow: hidden;
  border: 1px solid #26313d;
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.login-stage {
  min-width: 0;
  padding: 48px;
  color: #fff;
  border-right: 1px solid #26313d;
  display: flex;
  flex-direction: column;
}

.login-stage-brand {
  align-items: center;
}

.stage-brand-logo {
  width: 58px;
  height: 58px;
}

.login-stage-brand strong,
.login-stage-brand span {
  display: block;
}

.login-stage-brand strong {
  font-size: 18px;
}

.login-stage-brand span {
  margin-top: 3px;
  color: #9daab7;
  font-size: 12px;
}

.login-stage-copy {
  max-width: 620px;
  margin: auto 0 40px;
}

.eyebrow {
  color: #58d4cc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-stage-copy h1 {
  max-width: 620px;
  margin: 14px 0 16px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-stage-copy p {
  margin: 0;
  color: #aeb9c4;
  font-size: 16px;
  line-height: 1.65;
}

.login-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #31404e;
  border-bottom: 1px solid #31404e;
}

.login-data-grid article {
  min-width: 0;
  padding: 22px 18px;
  border-right: 1px solid #31404e;
  display: grid;
  gap: 7px;
}

.login-data-grid article:first-child {
  padding-left: 0;
}

.login-data-grid article:last-child {
  border-right: 0;
}

.login-data-grid strong {
  font-size: 26px;
}

.login-data-grid span {
  color: #9daab7;
  font-size: 12px;
}

.login-boundary {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #8f9ca8;
  font-size: 11px;
  text-transform: uppercase;
}

.login-panel {
  width: auto;
  padding: 48px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  align-content: center;
  gap: 18px;
}

.login-form-brand {
  margin-bottom: 8px;
}

.login-brand-logo {
  width: 64px;
  height: 64px;
}

.login-copy {
  padding: 16px 0;
}

.login-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.app-shell {
  display: block;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  padding: 0 24px;
  background: var(--dark);
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.brand-row.compact {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
}

.brand-row.compact h1 {
  color: #fff;
  font-size: 15px;
}

.sidebar .brand-row p {
  color: #8f9ca8;
  font-size: 10px;
}

.nav {
  min-width: 0;
  display: flex;
  align-self: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar,
.status-ticker::-webkit-scrollbar,
.metrics::-webkit-scrollbar {
  display: none;
}

.nav button {
  width: auto;
  min-height: 64px;
  padding: 0 13px;
  border-radius: 0;
  color: #aeb9c4;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}

.nav button.active {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--blue);
}

.sidebar-status {
  min-width: max-content;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-status strong,
.sidebar-status small {
  color: #c2ccd5;
  font-size: 11px;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 50%;
  background: #23c483;
  box-shadow: 0 0 0 3px rgba(35, 196, 131, 0.14);
}

.workspace {
  min-height: calc(100vh - 64px);
}

.topbar {
  min-height: 94px;
  padding: 22px 32px;
}

.topbar h2 {
  font-size: 26px;
}

.mobile-brand-logo {
  display: none;
}

.primary-action {
  background: var(--blue);
}

.primary-action:hover {
  background: #0f4fb5;
}

.status-ticker {
  min-height: 42px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.status-ticker span {
  min-width: max-content;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.status-ticker span:first-child {
  padding-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-ticker strong {
  color: var(--ink);
}

.metrics {
  margin: 20px 32px 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metrics article {
  min-height: 98px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.metrics article:last-child {
  border-right: 0;
}

.metrics strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.metrics small {
  font-size: 10px;
  font-weight: 800;
}

.view {
  padding: 18px 32px 32px;
}

.view-overview,
#view-overview .dashboard-grid {
  min-width: 0;
}

#view-overview .dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

.metrics article,
.panel {
  box-shadow: none;
}

.panel {
  border-color: #dfe5eb;
}

.panel.highlight {
  border-color: #bdd0f5;
}

.portfolio-panel .panel-head {
  background: #f3f7fd;
  box-shadow: inset 3px 0 0 var(--blue);
}

.portfolio-panel .portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-head {
  min-height: 64px;
}

.panel-head h3 {
  font-size: 15px;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item,
.resource-card,
.task-card,
.service-card,
.log-card {
  border-color: #e2e7ec;
  background: #fff;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item {
  min-height: 70px;
}

.resource-card {
  min-height: 132px;
}

.resource-icon {
  background: #edf3fc;
  color: var(--blue);
}

.resource-button.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 93, 206, 0.1);
}

.bar i {
  background: var(--blue);
}

.passport-visual {
  background: #f3f7fd;
}

.route-switch button.active {
  background: var(--blue);
}

.pill,
.status {
  border-radius: 4px;
}

@media (max-width: 1040px) {
  .sidebar {
    gap: 14px;
  }

  .brand-row.compact p,
  .sidebar-status small {
    display: none;
  }

  .nav button {
    padding: 0 10px;
  }

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

@media (max-width: 820px) {
  .login-screen {
    padding: 18px;
  }

  .login-layout {
    max-width: 540px;
    grid-template-columns: 1fr;
  }

  .login-stage {
    padding: 26px;
    border-right: 0;
    border-bottom: 1px solid #26313d;
  }

  .login-stage-copy {
    margin: 40px 0 28px;
  }

  .login-stage-copy h1 {
    font-size: 30px;
  }

  .login-panel {
    padding: 30px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: 58px;
    padding: 8px 14px;
    display: flex;
    flex-wrap: nowrap;
  }

  .brand-row.compact {
    display: flex;
  }

  .sidebar-brand-logo {
    width: 38px;
    height: 38px;
  }

  .sidebar-status {
    display: none;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    align-self: auto;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: var(--dark);
    border-top: 1px solid #26313d;
    overflow-x: auto;
  }

  .nav button {
    min-width: 92px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12px;
  }

  .nav button.active {
    background: #1a2530;
    box-shadow: inset 0 -2px 0 var(--blue);
  }

  .workspace {
    min-height: calc(100vh - 58px);
    padding-bottom: 66px;
  }

  .topbar {
    padding: 18px;
  }

  .mobile-brand-logo {
    display: none;
  }

  .status-ticker {
    padding: 0 18px;
  }

  .metrics {
    margin: 16px 18px 0;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .metrics article {
    min-width: 152px;
  }

  .view {
    padding: 16px 18px 24px;
  }

  #view-overview .dashboard-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .login-screen {
    padding: 0;
    place-items: stretch;
  }

  .login-layout {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-stage {
    padding: 22px;
  }

  .login-stage-copy {
    margin: 30px 0 24px;
  }

  .login-stage-copy h1 {
    font-size: 26px;
  }

  .login-stage-copy p {
    font-size: 14px;
  }

  .login-data-grid article {
    padding: 16px 10px;
  }

  .login-data-grid article:first-child {
    padding-left: 0;
  }

  .login-data-grid strong {
    font-size: 19px;
  }

  .login-boundary {
    gap: 10px;
  }

  .login-panel {
    padding: 24px 22px 30px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .portfolio-panel .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* V0.8 light Zonelink product system */
:root {
  --bg: #f4f7fb;
  --surface-soft: #edf4ff;
  --ink: #172033;
  --muted: #65758a;
  --line: #dbe4ef;
  --dark: #ffffff;
  --teal: #008f87;
  --shadow: 0 10px 30px rgba(24, 49, 83, 0.08);
}

.login-screen {
  background: #f1f5fa;
}

.login-layout {
  border-color: #d7e1ed;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(30, 55, 87, 0.14);
}

.login-stage {
  color: var(--ink);
  border-color: #cfdaea;
  background: #eaf2ff;
}

.login-stage-brand span,
.login-stage-copy p,
.login-data-grid span,
.login-boundary {
  color: #60738a;
}

.eyebrow {
  color: #087f79;
}

.login-data-grid {
  border-color: #cbd8e9;
}

.login-data-grid article {
  border-color: #cbd8e9;
}

.login-boundary span {
  padding: 6px 8px;
  border: 1px solid #c7d6e9;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
}

.login-panel {
  background: #ffffff;
}

.sidebar {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 3px 16px rgba(24, 49, 83, 0.06);
}

.brand-row.compact h1 {
  color: var(--ink);
}

.sidebar .brand-row p,
.sidebar-status strong,
.sidebar-status small {
  color: var(--muted);
}

.nav button {
  color: #5d6d80;
}

.nav button:hover {
  color: var(--blue);
  background: #f5f8fd;
}

.nav button.active {
  color: var(--blue);
  background: #f7faff;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
}

.status-ticker {
  background: #fbfcfe;
}

@media (max-width: 820px) {
  .login-stage {
    border-color: #cfdaea;
  }

  .nav {
    border-color: var(--line);
    background: #ffffff;
    box-shadow: 0 -6px 20px rgba(24, 49, 83, 0.08);
  }

  .nav button.active {
    color: var(--blue);
    background: #edf4ff;
  }
}

@media (max-width: 520px) {
  .login-stage {
    background: #eef5ff;
  }

  .login-form-brand h1 {
    font-size: 17px;
  }

  .login-form-brand p {
    font-size: 12px;
  }
}
