:root {
  color-scheme: light;
  --canvas: oklch(97.1% 0.003 265);
  --surface: oklch(99.6% 0.001 265);
  --surface-subtle: oklch(95.6% 0.004 265);
  --ink: oklch(23.5% 0.006 265);
  --ink-soft: oklch(39% 0.006 265);
  --muted: oklch(52.5% 0.007 265);
  --border: oklch(86.5% 0.005 265);
  --separator: oklch(92% 0.004 265);
  --accent: oklch(57% 0.19 250);
  --accent-strong: oklch(50% 0.19 250);
  --accent-weak: oklch(95% 0.025 250);
  --positive: oklch(60% 0.15 150);
  --warning: oklch(69% 0.14 78);
  --negative: oklch(58% 0.2 25);
  --focus: oklch(72% 0.12 250);
  --shadow-floating: 0 12px 36px oklch(18% 0.01 265 / 0.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
.shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 224px 1fr;
  overflow: hidden;
}
.shell > aside {
  position: sticky;
  top: 0;
  min-height: 0;
  overflow-y: auto;
  padding: calc(28px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
  background: var(--canvas);
  border-right: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
}
.brand {
  font-weight: 720;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 32px;
}
.brand span,
.login-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 9px;
}
nav {
  display: grid;
  gap: 4px;
}
.nav {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition:
    background 180ms var(--ease-out),
    color 180ms var(--ease-out);
}
.nav:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}
.nav.active {
  background: var(--accent-weak);
  color: var(--accent-strong);
  font-weight: 650;
}
.nav:focus-visible,
.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.account {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}
.account > span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-weak);
  color: var(--accent-strong);
  font-weight: 700;
}
.account div {
  min-width: 0;
  flex: 1;
}
.account strong,
.account small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account small {
  font-size: 11px;
  color: var(--muted);
}
.account button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 180ms var(--ease-out),
    color 180ms var(--ease-out);
}
.account button:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}
.account button svg {
  width: 20px;
  height: 20px;
}
.account button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.logout-dialog {
  width: min(400px, calc(100vw - 36px));
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 20px 60px oklch(18% 0.01 265 / 0.18);
}
.logout-dialog::backdrop {
  background: oklch(18% 0.01 265 / 0.38);
}
.logout-dialog h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logout-dialog p {
  margin: 10px 0 26px;
  max-width: 36ch;
  color: var(--muted);
  line-height: 1.55;
}
.logout-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.logout-dialog .danger {
  color: var(--surface);
  background: var(--negative);
  border-color: var(--negative);
}
.logout-dialog .danger:hover {
  border-color: oklch(48% 0.19 25);
  background: oklch(52% 0.2 25);
}
.content {
  padding: calc(42px + env(safe-area-inset-top))
    calc(clamp(24px, 4vw, 64px) + env(safe-area-inset-right))
    calc(72px + env(safe-area-inset-bottom))
    calc(clamp(24px, 4vw, 64px) + env(safe-area-inset-left));
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.content > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 38px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 8px;
}
.content h1 {
  font-size: 28px;
  letter-spacing: -0.035em;
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.range-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.custom-range-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-range-editor span {
  color: var(--muted);
  font-size: 12px;
}
.custom-range-editor input {
  min-width: 0;
  min-height: 44px;
  width: 100%;
  max-width: 142px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0 10px;
  font-weight: 600;
}
.range-control small {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.range-control .range-error {
  color: var(--negative);
}
.button,
select {
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition:
    background 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}
.button:hover {
  background: var(--surface-subtle);
  border-color: color-mix(in oklch, var(--accent) 40%, var(--border));
}
.button:active:not(:disabled) {
  transform: scale(0.98);
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.button.compact {
  min-height: 44px;
  padding-inline: 12px;
  font-size: 12px;
}
.status-strip {
  min-height: 64px;
  margin: -12px 0 26px;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.status-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-summary strong,
.status-summary small {
  display: block;
}
.status-summary strong {
  font-size: 13px;
}
.status-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--positive);
  background: currentColor;
}
.status-dot::after {
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: currentColor;
  content: "";
  opacity: 0.12;
  animation: status-breathe 1.8s ease-in-out infinite;
}
.status-dot.waiting {
  color: var(--warning);
}
.status-dot.waiting::after {
  opacity: 0.14;
}
.status-dot.idle {
  color: var(--muted);
}
.status-dot.idle::after {
  opacity: 0.1;
  animation: none;
}
@keyframes status-breathe {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(0.72);
  }
  50% {
    opacity: 0.22;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot::after {
    animation: none;
  }
}
.metric-band {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr repeat(4, 1fr);
  border-block: 1px solid var(--separator);
  margin-bottom: 42px;
}
.metric-band > div {
  padding: 21px 24px 20px 0;
}
.metric-band > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--separator);
}
.metric-band span,
.metric-band small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric-band span {
  line-height: 17px;
}
.metric-band small {
  line-height: 18px;
}
.metric-band strong {
  display: block;
  font-size: 27px;
  line-height: 32px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 7px;
}
.metric-band .metric-primary strong {
  font-size: 32px;
  line-height: 32px;
}
.metric-band .metric-primary span {
  color: var(--ink-soft);
  font-weight: 650;
}
.metric-band .freshness-metric strong {
  white-space: nowrap;
}
.metric-band .iap-title {
  white-space: nowrap;
}
.metric-band .iap-note {
  margin-top: 6px;
  color: var(--muted);
}
.metric-cut {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--separator);
}
.metric-cut-heading {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 4px;
}
.metric-band .metric-cut-heading > span:first-child {
  color: var(--muted);
  font-weight: 600;
}
.metric-band .metric-cut-heading span.estimate-note {
  margin-left: 0;
}
.metric-band .metric-cut-heading > strong {
  justify-self: end;
  margin: 0;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
}
.metric-cut-bar {
  height: 6px;
  margin: 9px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}
.metric-cut-bar-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .metric-cut-bar-fill {
    transition: none;
  }
}
.metric-band span.estimate-note {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  vertical-align: baseline;
  line-height: 1;
}
.metric-band span.estimate-note-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  cursor: help;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1;
}
.estimate-note-marker:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.estimate-note-content {
  position: absolute;
  z-index: 2;
  top: 27px;
  left: 0;
  visibility: hidden;
  width: min(280px, 70vw);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-floating);
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
}
.estimate-note:hover .estimate-note-content,
.estimate-note:focus-within .estimate-note-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.estimate-note small,
.estimate-note a {
  display: block;
  margin-top: 6px;
}
.estimate-note a {
  color: var(--accent);
}
.estimate-note .estimate-note-error {
  color: var(--negative);
}
.chart-section {
  margin-bottom: 44px;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h2,
.settings-panel h2 {
  font-size: 16px;
  margin: 0;
}
.section-head p,
.settings-panel > p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 0;
}
.chart-section .section-head p {
  line-height: 1.45;
}
.chart {
  height: 310px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.chart-tooltip {
  min-width: 180px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-floating);
  color: var(--ink);
  font-size: 12px;
}
.chart-tooltip > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  color: var(--muted);
}
.chart-tooltip > span {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0;
}
.chart-tooltip em {
  color: var(--muted);
  font-style: normal;
}
.chart-tooltip b {
  font-variant-numeric: tabular-nums;
}
.empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 13px;
}
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
}
.product-section {
  margin-bottom: 44px;
}
.table-detail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.data-card-list {
  display: none;
}
.data-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.data-card > div {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: start;
  padding: 9px 0;
}
.data-card > div + div {
  border-top: 1px solid var(--separator);
}
.data-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.data-card > div > div {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.data-card-prominent > div {
  font-weight: 700;
}
.data-card-empty {
  margin: 0;
  padding: 24px 16px;
  border-block: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.account-role-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 10px 0;
  color: var(--muted);
  font-size: 12px;
}
.pagination p {
  margin: 0;
}
.pagination-controls,
.pagination-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pagination-controls select,
.pagination-controls button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.pagination-controls select {
  padding: 0 28px 0 9px;
}
.pagination-controls button {
  padding: 0 11px;
  cursor: pointer;
}
.pagination-controls button:hover:not(:disabled) {
  border-color: var(--muted);
  background: var(--surface-subtle);
}
.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
tbody tr {
  transition: background 180ms var(--ease-out);
}
tbody tr:hover {
  background: var(--surface-subtle);
}
th:not(:first-child),
td:not(:first-child) {
  text-align: right;
}
.sync-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sync-row span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
}
.sync-row.unavailable span:first-child {
  background: var(--muted);
}
.sync-row time {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.settings-panel {
  max-width: 760px;
}
.settings-intro {
  margin-bottom: 28px;
}
.settings-intro h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.settings-intro p,
.settings-panel > p {
  max-width: 65ch;
  line-height: 1.6;
  color: var(--muted);
  font-size: 13px;
}
.settings-step {
  padding: 26px 0 30px;
  border-top: 1px solid var(--border);
}
.step-heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.step-heading > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-weak);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
}
.step-heading h2 {
  font-size: 16px;
  margin: 3px 0 0;
}
.step-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 5px 0 0;
}
.step-state {
  margin-top: 2px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.step-state.complete {
  background: color-mix(in oklch, var(--positive) 12%, var(--surface));
  color: color-mix(in oklch, var(--positive) 80%, var(--ink));
}
.step-placeholder {
  margin: 20px 0 0 44px;
  color: var(--muted);
  font-size: 12px;
}
.settings-panel form {
  display: grid;
  gap: 18px;
  margin: 24px 0 0 44px;
}
.settings-panel label {
  font-size: 12px;
  font-weight: 650;
  display: grid;
  gap: 7px;
}
.settings-panel input,
.settings-panel textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  transition:
    border-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out);
}
.settings-panel .button {
  justify-self: start;
}
.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.auth-shell .login {
  flex: 1;
  width: 100%;
  min-height: auto;
}
.auth-shell .site-footer {
  width: min(1240px, 100%);
  margin-inline: auto;
  padding-inline: calc(40px + env(safe-area-inset-left))
    calc(40px + env(safe-area-inset-right));
}
.currency-picker {
  position: relative;
  display: grid;
  gap: 7px;
}
.currency-picker input[aria-invalid="true"] {
  border-color: var(--negative);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--negative) 15%, transparent);
}
.currency-results-shell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.currency-results {
  max-height: 352px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.currency-results li {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.currency-results li + li {
  border-top: 1px solid var(--separator);
}
.currency-results li.active,
.currency-results li:hover {
  background: var(--accent-weak);
}
.currency-results li span {
  color: var(--muted);
  font-size: 12px;
}
.currency-scroll-hint {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.currency-empty {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 12px;
}
.currency-empty p {
  margin: 0 0 10px;
}
.currency-empty button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.currency-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.currency-chip {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}
.currency-chip:hover,
.currency-chip:focus-visible {
  border-color: var(--accent);
  background: var(--accent-weak);
}
.currency-error,
.currency-warning {
  color: var(--negative);
  font-size: 12px;
}
.currency-warning {
  margin: 0;
}
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(280px, 360px);
  align-items: center;
  justify-content: center;
  gap: clamp(60px, 10vw, 140px);
  max-width: 1240px;
  margin: auto;
  padding: calc(60px + env(safe-area-inset-top))
    calc(40px + env(safe-area-inset-right))
    calc(60px + env(safe-area-inset-bottom))
    calc(40px + env(safe-area-inset-left));
}
.login-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.login-mark {
  width: 48px;
  height: 48px;
  font-size: 20px;
  margin-bottom: 42px;
}
.login h1 {
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin: 0;
}
.login-intro > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  margin: 24px 0 32px;
}
.access-note {
  margin: 10px 0 0 2px;
  color: var(--muted);
  font-size: 11px;
}
.plan-limit {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.login-trust {
  padding: 8px 0;
  border-block: 1px solid var(--border);
}
.login-trust div {
  padding: 20px 6px;
}
.login-trust div + div {
  border-top: 1px solid var(--separator);
}
.login-trust strong,
.login-trust span {
  display: block;
}
.login-trust strong {
  font-size: 13px;
}
.login-trust span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.login svg {
  width: 18px;
  fill: currentColor;
}
.loading-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: auto;
  padding-top: 48px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-footer select {
  min-height: 32px;
  padding: 4px 28px 4px 8px;
  font-size: 12px;
}
.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer a {
  color: var(--ink-soft);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  z-index: 1000;
  max-width: min(360px, calc(100vw - 48px));
  border-left: 3px solid transparent;
  box-shadow: 0 12px 32px rgb(15 23 42 / 18%);
  transition:
    opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
#toast.success {
  border-left-color: var(--positive);
}
#toast.info {
  border-left-color: var(--warning);
}
#toast.error {
  border-left-color: var(--negative);
}
#toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 600px) {
  #toast {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
  }
}
@media (max-width: 1023px) {
  .content {
    padding-inline: clamp(20px, 3vw, 36px);
  }
  .metric-band > div {
    padding-inline: 18px;
  }
}
@media (max-width: 900px) {
  .auth-shell {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .auth-shell .site-footer {
    padding-inline: calc(18px + env(safe-area-inset-left))
      calc(18px + env(safe-area-inset-right));
  }
  .shell {
    display: block;
    height: auto;
    overflow: visible;
  }
  .shell > aside {
    position: static;
    width: 100%;
    height: auto;
    overflow-y: visible;
    padding: calc(14px + env(safe-area-inset-top))
      calc(18px + env(safe-area-inset-right)) 14px
      calc(18px + env(safe-area-inset-left));
    flex-direction: row;
    align-items: center;
  }
  .brand {
    padding: 0;
    margin-right: auto;
  }
  .shell > aside nav {
    display: flex;
  }
  .account {
    margin: 0 0 0 8px;
    border: 0;
  }
  .account div {
    display: none;
  }
  .content {
    padding: 28px calc(18px + env(safe-area-inset-right))
      calc(50px + env(safe-area-inset-bottom))
      calc(18px + env(safe-area-inset-left));
    overflow-y: visible;
  }
  .content > header {
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
  }
  .actions {
    flex: 1 1 320px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }
  .range-control {
    min-width: min(320px, 100%);
  }
  .metric-band {
    grid-template-columns: 1fr 1fr;
  }
  .metric-band > div {
    padding: 18px 14px !important;
    border-left: 0 !important;
  }
  .metric-band > div:nth-child(even) {
    border-left: 1px solid var(--border) !important;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .login {
    grid-template-columns: minmax(0, 620px);
    gap: 48px;
    padding-top: calc(48px + env(safe-area-inset-top));
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }
  .login-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .login-trust div {
    padding: 16px;
  }
  .login-trust div + div {
    border-top: 0;
    border-left: 1px solid var(--separator);
  }
}
@media (max-width: 768px) {
  .content {
    padding: 26px 18px 48px;
  }
  .content > header {
    display: block;
    margin-bottom: 28px;
  }
  .actions {
    width: 100%;
    margin-top: 18px;
    justify-content: flex-start;
  }
  .actions > select,
  .actions > .button {
    flex: 1 1 180px;
  }
  .range-control {
    width: 100%;
    align-items: stretch;
  }
  .range-control > select {
    width: 100%;
  }
  .custom-range-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: 100%;
  }
  .custom-range-editor input {
    max-width: none;
  }
  .custom-range-editor .button {
    grid-column: 1 / -1;
  }
  .metric-band {
    grid-template-columns: 1fr;
    margin-bottom: 34px;
  }
  .metric-band > div,
  .metric-band > div:nth-child(even) {
    padding: 16px 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--separator);
  }
  .metric-band > div:last-child {
    border-bottom: 0;
  }
  .metric-band span,
  .metric-band small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .table-wrap {
    display: none;
  }
  .data-card-list {
    display: grid;
    gap: 12px;
  }
  .pagination {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 0;
  }
  .pagination-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  .settings-intro {
    margin-bottom: 20px;
  }
  .settings-step {
    padding-block: 22px;
  }
  .settings-panel form,
  .step-placeholder {
    margin-left: 0;
  }
  .login {
    gap: 36px;
    padding: 40px 28px;
  }
  .login-mark {
    margin-bottom: 30px;
  }
  .login-intro > p:not(.eyebrow) {
    margin-block: 18px 26px;
    font-size: 16px;
  }
}
@media (max-width: 560px) {
  .metric-band .iap-title {
    white-space: normal;
  }
  .shell > aside {
    padding: calc(12px + env(safe-area-inset-top))
      calc(12px + env(safe-area-inset-right)) 12px
      calc(12px + env(safe-area-inset-left));
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand {
    min-height: 40px;
  }
  .shell > aside nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    padding: 3px;
    border-radius: 10px;
    background: color-mix(in oklch, var(--border) 50%, transparent);
  }
  .shell > aside nav .nav {
    min-height: 44px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }
  .account {
    margin-left: 0;
  }
  .content > header {
    display: block;
  }
  .actions {
    margin-top: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .button,
  select,
  input,
  textarea,
  .pagination-controls select,
  .pagination-controls button,
  .account button {
    min-height: 44px;
  }
  .range-control {
    width: 100%;
    align-items: flex-start;
  }
  .custom-range-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: 100%;
  }
  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  .status-strip .button {
    width: 100%;
  }
  .step-heading {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .step-state {
    grid-column: 2;
    justify-self: start;
  }
  .login {
    padding: calc(36px + env(safe-area-inset-top))
      calc(24px + env(safe-area-inset-right))
      calc(36px + env(safe-area-inset-bottom))
      calc(24px + env(safe-area-inset-left));
  }
  .login h1 {
    font-size: 38px;
  }
  .login-trust {
    grid-template-columns: 1fr;
  }
  .login-trust div + div {
    border-left: 0;
    border-top: 1px solid var(--separator);
  }
}
@media (max-width: 430px) {
  .shell > aside {
    padding: 10px;
  }
  .content {
    padding: 22px 14px 42px;
  }
  .content h1 {
    font-size: 25px;
  }
  .status-strip,
  .data-card {
    padding: 14px;
  }
  .status-summary small,
  .section-head p,
  .metric-band small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .data-card > div {
    grid-template-columns: minmax(76px, 0.65fr) minmax(0, 1.35fr);
    gap: 10px;
  }
  .account-actions {
    flex-direction: column;
  }
  .account-actions .button,
  .account-role-actions .button {
    width: 100%;
  }
  .account-role-actions {
    flex-direction: column;
  }
  .pagination-controls label {
    width: 100%;
  }
  .pagination-controls select {
    flex: 1;
  }
  .login {
    padding: 28px 18px;
  }
  .login h1 {
    font-size: 34px;
  }
}

/* Apple-inspired material layer: clarity, deference, and subtle depth. */
:root {
  --canvas: oklch(96.7% 0.004 255);
  --surface: oklch(100% 0 0);
  --surface-subtle: oklch(96.1% 0.004 255);
  --surface-raised: oklch(99.4% 0.002 255 / 0.86);
  --ink: oklch(20.5% 0.007 255);
  --ink-soft: oklch(36% 0.008 255);
  --muted: oklch(51.5% 0.009 255);
  --border: oklch(87.8% 0.006 255);
  --separator: oklch(91.8% 0.004 255);
  --accent: oklch(60.5% 0.195 252);
  --accent-strong: oklch(53% 0.2 252);
  --accent-weak: oklch(94.8% 0.03 252);
  --shadow-card:
    0 0 0 1px oklch(20% 0.01 255 / 0.035),
    0 2px 8px oklch(20% 0.01 255 / 0.045),
    0 16px 40px oklch(20% 0.01 255 / 0.035);
  --shadow-floating: 0 18px 50px oklch(18% 0.01 255 / 0.16);
}

body {
  text-rendering: optimizeLegibility;
}

.shell > aside {
  padding-top: calc(22px + env(safe-area-inset-top));
  background:
    linear-gradient(
      180deg,
      oklch(98% 0.006 252 / 0.96),
      oklch(95.5% 0.006 252 / 0.92)
    ),
    var(--canvas);
  backdrop-filter: saturate(1.3) blur(24px);
}

.brand {
  padding: 0 8px 28px;
}

.brand span,
.login-mark {
  border-radius: 8px;
  background: linear-gradient(145deg, var(--ink-soft), var(--ink));
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.16),
    0 3px 9px oklch(20% 0.01 255 / 0.16);
}

.nav {
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
}

.nav.active {
  color: var(--ink);
  background: color-mix(in oklch, var(--surface) 80%, var(--accent-weak));
  box-shadow:
    inset 0 0 0 1px oklch(100% 0 0 / 0.72),
    0 1px 4px oklch(20% 0.01 255 / 0.08);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.nav.active .nav-icon {
  color: var(--accent);
}

.content {
  background:
    radial-gradient(
      circle at 78% 0,
      color-mix(in oklch, var(--accent-weak) 44%, transparent) 0,
      transparent 30rem
    ),
    var(--surface);
}

.content > header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--separator);
}

.content h1 {
  font-size: clamp(28px, 3vw, 34px);
}

.button,
select {
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.7),
    0 1px 2px oklch(20% 0.01 255 / 0.04);
}

.primary {
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.2),
    0 4px 12px color-mix(in oklch, var(--accent) 24%, transparent);
}

.status-strip,
.metric-band,
.chart,
.table-wrap,
.login-trust {
  border: 1px solid color-mix(in oklch, var(--border) 72%, transparent);
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

.status-strip {
  border-radius: 14px;
  backdrop-filter: blur(18px) saturate(1.25);
}

.metric-band {
  overflow: visible;
  border-radius: 16px;
}

.metric-band > div {
  padding: 21px 22px;
}

.metric-band > div + div {
  padding-left: 22px;
}

.chart {
  height: 330px;
  padding: 20px 14px 8px 0;
  border-radius: 16px;
}

.table-wrap {
  border-radius: 14px;
}

th {
  background: var(--surface-subtle);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.login {
  position: relative;
}

.login::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(
      circle at 20% 15%,
      color-mix(in oklch, var(--accent-weak) 60%, transparent),
      transparent 36rem
    ),
    var(--canvas);
  content: "";
}

.login-trust {
  padding: 8px;
  border-radius: 18px;
  backdrop-filter: blur(20px);
}

@media (max-width: 800px) {
  .shell {
    height: auto;
    overflow: visible;
  }

  .shell > aside {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    overflow-y: visible;
    border-right: 0;
    border-bottom: 1px solid var(--separator);
  }
}

@media (max-width: 560px) {
  .shell > aside nav .nav {
    gap: 6px;
  }

  .shell > aside nav .nav-icon {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 768px) {
  .metric-band > div,
  .metric-band > div + div {
    padding: 16px 0 !important;
  }
}

@media (max-width: 430px) {
  .content h1 {
    font-size: 25px;
  }

  .login {
    padding: calc(28px + env(safe-area-inset-top))
      calc(18px + env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom))
      calc(18px + env(safe-area-inset-left));
  }

  .login h1 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
