:root {
  color-scheme: dark;
  --canvas: #10120f;
  --surface: #171916;
  --surface-2: #20231e;
  --selected: #272a24;
  --text: #f2f2ee;
  --secondary: #b6b8b0;
  --muted: #898d83;
  --line: #30332d;
  --control: #62665d;
  --primary: #b5b8ae;
  --primary-ink: #10120f;
  --success: #7fba89;
  --warning: #d39a80;
  --danger: #e6848d;
  --info: #8fa9d4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--text); font-size: 13px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea { border-radius: 7px; }
button, .button {
	min-height: 32px;
  border: 1px solid var(--control);
  background: transparent;
  color: var(--text);
	padding: 6px 11px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
  font-size: 12px;
}
button:hover, .button:hover { background: var(--surface-2); border-color: var(--secondary); }
button.primary, .button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 500; }
button.primary:hover, .button.primary:hover { background: var(--text); border-color: var(--text); }
button.ghost { border-color: transparent; color: var(--secondary); padding-inline: 8px; }
button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger), transparent 55%); }
button:disabled, textarea:disabled, input:disabled, select:disabled { opacity: .42; cursor: not-allowed; }
button:disabled:hover { background: inherit; border-color: inherit; }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--control);
  background: var(--surface);
  color: var(--text);
	padding: 7px 9px;
}
input, select { min-height: 36px; }
textarea { resize: vertical; min-height: 132px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--muted); }
label { color: var(--secondary); font-size: 12px; }
code, .mono, .money {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.muted { color: var(--muted); }

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 228px;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
}
.product-brand { display: grid; gap: 2px; color: var(--text); text-decoration: none; padding: 4px 10px 18px; }
.product-brand strong { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.product-brand span { color: var(--muted); font-size: 12px; }
.app-sidebar nav { display: grid; gap: 3px; margin-top: 18px; }
.app-sidebar nav a { min-height: 40px; display: flex; align-items: center; color: var(--muted); text-decoration: none; padding: 0 12px; border-radius: 7px; }
.app-sidebar nav a:hover { color: var(--text); background: var(--surface); }
.app-sidebar nav a.active { color: var(--text); background: var(--selected); }
.sidebar-account { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sidebar-account > span { min-width: 0; flex: 1; display: grid; gap: 2px; }
.sidebar-account strong, .sidebar-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: 13px; font-weight: 500; }
.sidebar-account small { color: var(--muted); font-size: 11px; }

.app-main { min-height: 100vh; margin-left: 228px; }
.page-content { width: min(100%, 1480px); margin: 0 auto; padding: 30px 36px 56px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -.025em; }
.page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.badge, .status { display: inline-flex; align-items: center; width: fit-content; white-space: nowrap; font-size: 11px; line-height: 18px; }
.badge { min-height: 28px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--secondary); }
.badge.neutral { border: 1px solid var(--line); }
.status { gap: 7px; color: var(--secondary); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.status.active::before, .status.warm_standby::before, .status.outcome-success::before, .status.level-sufficient::before { background: var(--success); }
.status.cold_ready::before, .status.submitted::before, .status.admission_probing::before, .status.promoting::before, .status.staged::before, .status.level-learning::before { background: var(--info); }
.status.tombstoned::before, .status.disabled::before, .status.outcome-failed::before, .status.outcome-key_terminal::before, .status.level-critical::before { background: var(--danger); }
.status.quarantined::before, .status.level-shortage::before, .status.level-need::before, .status.level-excess::before { background: var(--warning); }
.status.outcome-probe::before { background: var(--info); }
.status.outcome-aggregated::before { background: var(--muted); }
.capability-list { display: flex; flex-wrap: wrap; gap: 4px; }
.channel-id-stack { display: grid; gap: 3px; white-space: nowrap; }
.channel-id-stack span { color: var(--muted); font-size: 11px; }
.channel-id-stack code { color: var(--text); }
.capability { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.capability.available { color: var(--success); border-color: color-mix(in srgb, var(--success), transparent 60%); }
.capability.blocked { color: var(--danger); border-color: color-mix(in srgb, var(--danger), transparent 60%); }
.capability.unknown { color: var(--muted); }

.section-block { margin: 0 0 30px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.metric-strip { display: grid; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; }
.metric-strip.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric-strip.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-strip.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 15px; }
.metric-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-strip article { min-width: 0; padding: 0 18px; border-left: 1px solid var(--line); }
.metric-strip article:first-child { padding-left: 0; border-left: 0; }
.metric-strip article:last-child { padding-right: 0; }
.metric-strip.eight article:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.metric-strip.eight article:nth-child(4n) { padding-right: 0; }
.metric-strip.eight article:nth-child(n+5) { padding-top: 14px; border-top: 1px solid var(--line); }
.metric-strip small, .metric-strip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-strip small { color: var(--muted); font-size: 12px; }
.metric-strip strong { display: block; margin: 4px 0 2px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.2; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.metric-strip .metric-primary strong { color: var(--text); font-size: clamp(24px, 2.3vw, 30px); }
.compact-metrics { margin-top: 12px; padding-block: 11px; }
.metric-strip span { color: var(--muted); font-size: 12px; }
.quality-metrics { margin-bottom: 34px; }
.current-queue-metrics { margin-bottom: 24px; }
.key-stats-panel { margin: 4px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.key-stats-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 84px; }
.key-stats-row + .key-stats-row { border-top: 1px solid var(--line); }
.key-stats-row > header { padding: 14px 16px 12px 0; }
.key-stats-row > header strong, .key-stats-row > header span { display: block; }
.key-stats-row > header strong { font-size: 13px; font-weight: 500; }
.key-stats-row > header span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.key-stats-grid { min-width: 0; display: grid; align-items: stretch; }
.key-stats-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.key-stats-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.key-stats-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.key-stats-grid.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.key-stats-grid article { min-width: 0; padding: 13px 14px 11px; border-left: 1px solid var(--line); }
.key-stats-grid small, .key-stats-grid span { display: block; }
.key-stats-grid small { color: var(--muted); font-size: 11px; }
.key-stats-grid strong { display: block; margin: 3px 0 1px; font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.key-stats-grid .metric-primary strong { font-size: 25px; }
.key-stats-grid span { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.key-schedule-strip {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 10px 14px 10px 150px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 42%);
}
.key-schedule-summary { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 1px 10px; }
.key-schedule-summary small { color: var(--muted); font-size: 11px; }
.key-schedule-summary strong { font-size: 14px; font-weight: 500; }
.key-schedule-summary span { grid-column: 1 / -1; color: var(--secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-schedule-strip p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.key-schedule-strip form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.key-schedule-strip form select { min-width: 0; min-height: 30px; padding-block: 4px; }
.key-schedule-strip form button { white-space: nowrap; }
.provider-pool { margin-top: 32px; margin-bottom: 0; }
.segmented-switch { display: inline-flex; gap: 3px; margin: -6px 0 20px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.segmented-switch a { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 12px; }
.segmented-switch a:hover { color: var(--text); }
.segmented-switch a.active { color: var(--text); background: var(--selected); }
.supply-switches { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -6px 0 20px; }
.supply-switches .segmented-switch { margin: 0; }
.provider-models { margin-top: 16px; color: var(--muted); font-size: 12px; }
.provider-models .model-list { padding-bottom: 0; }

.settings-list { border-top: 1px solid var(--line); }
.settings-row { min-height: 76px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 16px 0; }
.settings-row h2, .settings-row strong { margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.settings-row p, .settings-row small { display: block; margin: 3px 0 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.inline-form input { width: 220px; }
.topology-form label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.topology-form input { width: 68px; min-height: 34px; padding-block: 6px; }
details summary { cursor: pointer; }
.models-row { display: block; }
.models-row summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; list-style-position: inside; }
.models-row .disclosure { color: var(--secondary); font-size: 12px; }
.model-list { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 18px 0 4px; color: var(--secondary); }

.toolbar-surface, .workspace-surface { background: var(--surface); border-radius: 10px; }
.toolbar-surface { padding: 12px 14px; margin-bottom: 20px; }
.service-control { min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; border: 1px solid var(--line); }
.service-control-copy { min-width: 0; display: flex; align-items: center; gap: 14px; }
.service-control-copy > div { min-width: 0; }
.service-control-copy strong, .service-control-copy small { display: block; }
.service-control-copy strong { font-size: 13px; font-weight: 500; }
.service-control-copy small { margin-top: 2px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-control form { justify-self: end; margin: 0; }
.service-control form button { white-space: nowrap; }
.filter-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 10px; }
.filter-form--list { grid-template-columns: repeat(18, minmax(0, 1fr)); }
.filter-field { grid-column: span 2; min-width: 0; display: grid; gap: 4px; }
.filter-field > span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.filter-field--datetime, .filter-form--range .filter-field--datetime { grid-column: span 3; }
.filter-form input, .filter-form select { min-width: 0; }
.filter-actions { grid-column: span 4; min-width: 0; min-height: 36px; display: flex; align-items: center; gap: 7px; }
.filter-actions button, .filter-actions .button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.filter-context { min-width: 0; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.create-supplier-form { display: flex; align-items: flex-end; gap: 10px; }
.create-supplier-form label { width: min(420px, 100%); display: grid; gap: 7px; }
.workspace-surface { padding: 18px; margin: 24px 0 32px; }
.workspace-surface .section-heading { margin-bottom: 20px; }
.allowance-note, .count-label { color: var(--muted); font-size: 12px; }
.key-submit-form, .staged-key-form { display: grid; gap: 8px; }
.profile-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 10px; margin-bottom: 2px; }
.profile-fields label { display: grid; gap: 5px; }
.key-submit-form textarea, .staged-key-form textarea { min-height: 190px; background: var(--canvas); }
.staged-key-form textarea { min-height: 250px; }
.staged-import-row { min-height: 36px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.file-picker { width: fit-content; min-height: 34px; display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid var(--control); border-radius: 7px; color: var(--text); cursor: pointer; }
.file-picker:hover { background: var(--surface-2); border-color: var(--secondary); }
.file-picker input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.supplier-key-filter { margin-top: 18px; margin-bottom: 18px; }
.bulk-requalification { min-height: 62px; margin: 16px 0 20px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--surface); }
.bulk-requalification h2 { margin: 0; font-size: 14px; line-height: 21px; font-weight: 500; }
.bulk-requalification p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.bulk-requalification form { flex: 0 0 auto; }
.form-footer { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.form-footer span { color: var(--muted); font-size: 12px; }

.usage-trend { margin: -12px 0 26px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.usage-trend-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.usage-trend-head h2 { margin: 0; font-size: 13px; font-weight: 500; }
.usage-trend-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.usage-trend-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.usage-trend-total { min-width: 112px; display: grid; justify-items: end; }
.usage-trend-total small { color: var(--muted); font-size: 10px; }
.usage-trend-total strong { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.trend-window-actions { display: flex; align-items: center; gap: 6px; }
.usage-trend-legend { min-height: 34px; display: flex; align-items: center; flex-wrap: nowrap; gap: 14px; overflow-x: auto; padding: 7px 14px; border-bottom: 1px solid var(--line); color: var(--secondary); font-size: 11px; }
.usage-trend-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.usage-trend-legend i, .trend-tooltip i { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 2px; }
.usage-trend-legend b, .trend-tooltip b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.usage-trend-scroll { overflow-x: auto; padding: 12px 14px 8px; scroll-behavior: smooth; scrollbar-gutter: stable; overscroll-behavior-inline: contain; }
.usage-trend-plot { width: max-content; min-width: 100%; height: 226px; display: grid; grid-auto-flow: column; grid-auto-columns: var(--trend-column-width, 72px); align-items: stretch; gap: 3px; }
.trend-column { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: 194px 24px; gap: 0; padding: 0 2px; border: 0; border-radius: 4px; background: transparent; cursor: default; }
.trend-column:hover { background: color-mix(in srgb, var(--surface-2), transparent 35%); }
.trend-column:focus-visible { outline-offset: -2px; }
.trend-bar-area { min-width: 0; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, color-mix(in srgb, var(--line), transparent 35%) 48px); }
.trend-stack { width: min(72%, 24px); min-height: 0; margin: 0 auto; display: flex; flex: 0 0 auto; flex-direction: column-reverse; overflow: hidden; border-radius: 3px 3px 0 0; }
.trend-segment { min-height: 1px; flex-basis: 0; }
.trend-height-0 { height: 0; }
.trend-height-1 { height: 4px; }
.trend-height-2 { height: 12px; }
.trend-height-3 { height: 24px; }
.trend-height-4 { height: 36px; }
.trend-height-5 { height: 48px; }
.trend-height-6 { height: 60px; }
.trend-height-7 { height: 72px; }
.trend-height-8 { height: 84px; }
.trend-height-9 { height: 96px; }
.trend-height-10 { height: 110px; }
.trend-height-11 { height: 124px; }
.trend-height-12 { height: 138px; }
.trend-height-13 { height: 152px; }
.trend-height-14 { height: 166px; }
.trend-height-15 { height: 180px; }
.trend-height-16 { height: 194px; }
.trend-weight-1 { flex-grow: 1; }
.trend-weight-2 { flex-grow: 2; }
.trend-weight-3 { flex-grow: 3; }
.trend-weight-4 { flex-grow: 4; }
.trend-weight-5 { flex-grow: 5; }
.trend-weight-6 { flex-grow: 6; }
.trend-weight-7 { flex-grow: 7; }
.trend-weight-8 { flex-grow: 8; }
.trend-weight-9 { flex-grow: 9; }
.trend-weight-10 { flex-grow: 10; }
.trend-column time { overflow: hidden; padding-top: 6px; color: var(--muted); font-size: 10px; line-height: 14px; text-align: center; text-overflow: clip; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend-tooltip { position: absolute; z-index: 20; left: 0; bottom: 34px; width: 248px; display: none; padding: 10px 11px; border: 1px solid var(--control); border-radius: 8px; background: var(--surface-2); color: var(--secondary); box-shadow: 0 12px 32px rgba(0, 0, 0, .42); text-align: left; pointer-events: none; }
.trend-column:nth-last-child(-n+3) .trend-tooltip { right: 0; left: auto; }
.trend-column:hover .trend-tooltip, .trend-column:focus-visible .trend-tooltip { display: grid; gap: 4px; }
.trend-tooltip > strong { color: var(--text); font-size: 12px; font-weight: 500; }
.trend-tooltip > span { min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 11px; }
.trend-tooltip > span b { margin-left: auto; }
.usage-trend-empty { min-height: 180px; display: grid; place-content: center; gap: 3px; color: var(--muted); text-align: center; }
.usage-trend-empty strong { color: var(--secondary); font-size: 13px; font-weight: 500; }
.trend-color-0 { background: #7c5bd6; }
.trend-color-1 { background: #8bc6a5; }
.trend-color-2 { background: #d6a75b; }
.trend-color-3 { background: #70b8c7; }
.trend-color-4 { background: #8ca9d8; }
.trend-color-5 { background: #c98fb6; }
.trend-color-6 { background: #8e989e; }
.trend-color-7 { background: #d78546; }
.trend-color-8 { background: #5bbf91; }

.data-section { margin-top: 8px; }
.data-section > .section-heading { margin-bottom: 9px; }
.key-profile-table table { min-width: 1260px; }
.key-profile-table td { vertical-align: top; }
.intake-history { margin-bottom: 14px; }
.data-disclosure { margin: 12px 0 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.data-disclosure > summary { color: var(--secondary); font-size: 12px; font-weight: 500; }
.data-disclosure > p { margin: 8px 0; }
.data-disclosure .table-scroll { margin-top: 6px; }
.request-usage-table code { max-width: 220px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.table-scroll { width: 100%; overflow: visible; }
table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 12px; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
td { color: var(--secondary); height: 46px; }
tbody tr { transition: background-color 150ms ease; }
tbody tr:not(.empty-row):hover { background: color-mix(in srgb, var(--surface), transparent 20%); }
td strong { color: var(--text); font-weight: 500; }
.metric-number { font-size: 16px; font-variant-numeric: tabular-nums; }
.supplier-name { display: flex; align-items: center; gap: 8px; }
.state-breakdown { color: var(--secondary); line-height: 1.65; white-space: nowrap; }
td small { display: block; max-width: 320px; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; word-break: break-word; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.action-col { text-align: right; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-actions form { margin: 0; }
.row-actions button, td .action-col button { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.copy-invalid-form { display: flex; justify-content: flex-end; margin-top: 5px; }
.copy-invalid-form button { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.empty-row td { padding: 54px 12px; text-align: center; color: var(--muted); }
.empty-row strong, .empty-row span { display: block; }
.empty-row strong { color: var(--secondary); margin-bottom: 5px; }
.row-menu { position: relative; display: inline-block; text-align: left; }
.row-menu > summary { list-style: none; border: 1px solid var(--control); border-radius: 7px; padding: 6px 11px; color: var(--text); }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel { position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); width: 310px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 42px rgba(0, 0, 0, .38); }
.policy-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.policy-form label { display: grid; gap: 5px; font-size: 11px; color: var(--muted); }
.policy-form label:first-of-type { grid-column: 1 / -1; }
.policy-form button { grid-column: 1 / -1; }
.row-menu-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.row-menu-actions form { flex: 1; }
.row-menu-actions button { width: 100%; }

.flash { position: relative; margin: 20px 0; padding: 12px 72px 12px 14px; border: 1px solid color-mix(in srgb, var(--success), transparent 50%); border-radius: 8px; color: var(--secondary); background: color-mix(in srgb, var(--success), transparent 88%); }
.flash.error { border-color: color-mix(in srgb, var(--danger), transparent 50%); background: color-mix(in srgb, var(--danger), transparent 88%); color: var(--danger); }
.flash-close { position: absolute; right: 7px; top: 6px; min-height: 28px; padding: 4px 8px; border-color: transparent; color: var(--muted); font-size: 11px; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-panel, .credential-panel { width: min(100%, 400px); }
.credential-panel { width: min(100%, 580px); }
.auth-panel header, .credential-panel header { margin-bottom: 30px; }
.auth-brand { display: inline-block; margin-bottom: 64px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.auth-panel h1, .credential-panel h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.025em; }
.auth-panel header p, .credential-panel header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form button { margin-top: 4px; min-height: 40px; }
.credential-list { margin: 0 0 26px; border-top: 1px solid var(--line); }
.credential-list > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 18px; min-height: 70px; border-bottom: 1px solid var(--line); }
.credential-list dt { color: var(--muted); }
.credential-list dd { margin: 0; min-width: 0; }
.credential-list code { display: block; color: var(--text); word-break: break-all; }
.credential-actions { display: flex; gap: 9px; }
.credential-actions > * { display: inline-flex; align-items: center; justify-content: center; }

dialog { width: min(620px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
#batch-result-dialog { width: min(820px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .64); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.dialog-body { padding: 18px 20px; overflow: auto; }
.attempt-list { display: grid; }
.attempt-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.attempt-item:last-child { border-bottom: 0; }
.attempt-item small { color: var(--muted); }
.attempt-item > div > span, .attempt-item > div > small { display: block; }
.attempt-item > div > small { margin-top: 3px; }
.batch-result-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.batch-result-summary article { min-width: 0; padding: 0 12px 14px; border-left: 1px solid var(--line); }
.batch-result-summary article:first-child { padding-left: 0; border-left: 0; }
.batch-result-summary small, .batch-result-summary strong { display: block; }
.batch-result-summary small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.batch-result-summary strong { margin-top: 4px; font-size: 18px; font-variant-numeric: tabular-nums; }
.batch-result-progress { margin: 12px 0 0; }
.batch-result-list { display: grid; margin-top: 10px; }
.batch-result-item { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 2fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.batch-result-item:last-child { border-bottom: 0; }
.batch-result-item-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.batch-result-item-head code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-result-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 5px; color: var(--secondary); background: var(--surface-2); font-size: 11px; }
.batch-result-badge.result-recovered { color: #6ee7a0; background: color-mix(in srgb, #22c55e, transparent 88%); }
.batch-result-badge.result-downgraded, .batch-result-badge.result-pending { color: #a7c7ff; background: color-mix(in srgb, #3b82f6, transparent 88%); }
.batch-result-badge.result-still_invalid, .batch-result-badge.result-failed { color: #fb7185; background: color-mix(in srgb, #ef4444, transparent 88%); }
.batch-result-changes { min-width: 0; display: flex; flex-wrap: wrap; gap: 3px 14px; }
.batch-result-changes small { color: var(--muted); font-size: 11px; }
.technical-detail { margin-top: 4px; color: var(--muted); }
.technical-detail summary { cursor: pointer; font-size: 11px; }
.technical-detail small { display: block; margin-top: 4px; max-width: 34rem; white-space: normal; overflow-wrap: anywhere; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.refresh-state { color: var(--muted); font-size: 11px; white-space: nowrap; }
button.compact { min-height: 28px; padding: 4px 9px; }

@media (max-width: 1080px) {
  .page-content { padding-inline: 32px; }
  .filter-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filter-field--datetime, .filter-form--range .filter-field--datetime { grid-column: span 2; }
  .key-stats-row { grid-template-columns: 1fr; }
  .key-stats-row > header { padding: 11px 0 9px; }
  .key-stats-grid article:first-child { padding-left: 0; border-left: 0; }
  .key-stats-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .key-stats-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .key-stats-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .key-stats-grid.six article:nth-child(4) { padding-left: 0; border-left: 0; }
  .key-stats-grid.six article:nth-child(n+4) { border-top: 1px solid var(--line); }
  .key-stats-grid.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .key-stats-grid.seven article:nth-child(5) { padding-left: 0; border-left: 0; }
  .key-stats-grid.seven article:nth-child(n+5) { border-top: 1px solid var(--line); }
  .key-schedule-strip { padding-left: 14px; }
  .metric-strip.five, .metric-strip.six { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
  .metric-strip.eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-strip.four { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .metric-strip.five article:nth-child(4) { padding-left: 0; border-left: 0; }
  .metric-strip.five article:nth-child(n+4) { padding-top: 20px; border-top: 1px solid var(--line); }
  .metric-strip.six article:nth-child(4) { padding-left: 0; border-left: 0; }
  .metric-strip.six article:nth-child(n+4) { padding-top: 20px; border-top: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .app-sidebar { position: sticky; top: 0; inset: auto; width: 100%; min-height: 58px; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; align-items: center; gap: 14px; overflow-x: auto; }
  .product-brand { flex: 0 0 auto; padding: 0 4px; }
  .product-brand span { display: none; }
  .app-sidebar nav { display: flex; flex: 1 0 auto; gap: 3px; margin: 0; }
  .app-sidebar nav a { min-height: 38px; padding: 0 10px; white-space: nowrap; }
  .sidebar-account { flex: 0 0 auto; margin: 0; padding: 0; border: 0; }
  .sidebar-account > span { display: none; }
  .sidebar-account button { min-height: 38px; }
  .app-main { margin-left: 0; }
  .page-content { padding: 30px 22px 64px; }
  .table-scroll { overflow-x: auto; }
  table { min-width: 840px; }
  .request-usage-table table { min-width: 1180px; }
  .supplier-key-section table { min-width: 680px; }
  .row-menu-panel { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: calc(100vh - 32px); overflow: auto; }
}

@media (max-width: 640px) {
  .profile-fields { grid-template-columns: 1fr; }
  .app-sidebar { gap: 8px; }
  .product-brand strong { font-size: 13px; }
  .app-sidebar nav a { padding: 0 9px; }
  .supplier-sidebar nav a { min-width: max-content; }
  .page-content { padding: 26px 18px 56px; }
  .page-heading { margin-bottom: 26px; }
  .page-heading h1 { font-size: 20px; line-height: 28px; }
  .segmented-switch { width: 100%; }
  .segmented-switch a { flex: 1; }
  .supply-switches { align-items: stretch; flex-direction: column; }
  .metric-strip.five, .metric-strip.six, .metric-strip.four, .metric-strip.three, .metric-strip.eight { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .metric-strip article, .metric-strip article:first-child, .metric-strip article:last-child { padding: 0 14px; border-left: 1px solid var(--line); }
  .metric-strip article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metric-strip article:nth-child(even) { padding-right: 0; }
  .metric-strip article:nth-child(n+3) { padding-top: 18px; border-top: 1px solid var(--line); }
  .metric-strip.five article:nth-child(4) { padding-left: 14px; border-left: 1px solid var(--line); }
  .metric-strip.five article:nth-child(5) { padding-left: 0; border-left: 0; }
  .metric-strip.eight article, .metric-strip.eight article:nth-child(4n+1), .metric-strip.eight article:nth-child(4n) { padding-left: 14px; padding-right: 14px; border-left: 1px solid var(--line); }
  .metric-strip.eight article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metric-strip.eight article:nth-child(even) { padding-right: 0; }
  .metric-strip.eight article:nth-child(n+3) { padding-top: 18px; border-top: 1px solid var(--line); }
  .metric-strip strong { font-size: 19px; }
  .settings-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .service-control { grid-template-columns: minmax(0, 1fr); align-items: flex-start; }
  .service-control form { justify-self: start; }
  .service-control-copy small { white-space: normal; }
  .toolbar-surface { padding: 16px; }
  .filter-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .filter-field, .filter-field--datetime, .filter-form--range .filter-field--datetime, .filter-actions { grid-column: 1 / -1; }
  .filter-actions { min-height: 0; flex-wrap: wrap; }
  .filter-context { width: 100%; margin-left: 0; }
  .key-stats-grid.four, .key-stats-grid.five, .key-stats-grid.six, .key-stats-grid.seven { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-stats-grid article, .key-stats-grid article:first-child { padding: 11px 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .key-stats-grid article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .key-stats-grid.six article:nth-child(4) { padding-left: 12px; border-left: 1px solid var(--line); }
  .key-stats-grid.seven article:nth-child(5) { padding-left: 0; border-left: 0; }
  .key-stats-grid article:nth-child(-n+2) { border-top: 0; }
  .key-schedule-strip { grid-template-columns: 1fr; align-items: start; gap: 9px; padding: 12px 0; }
  .key-schedule-strip form { width: min(100%, 320px); }
  .usage-trend { margin-top: -8px; }
  .usage-trend-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .usage-trend-head-actions { justify-content: space-between; flex-wrap: wrap; }
  .usage-trend-total { justify-items: start; }
  .inline-form { width: 100%; align-items: stretch; flex-direction: column; }
  .inline-form input { width: 100%; }
  .bulk-requalification { align-items: stretch; flex-direction: column; gap: 12px; }
  .bulk-requalification button { width: 100%; min-height: 40px; }
  .create-supplier-form { align-items: stretch; flex-direction: column; }
  .create-supplier-form label { width: 100%; }
  .workspace-surface { margin-inline: -8px; padding: 18px; }
  .workspace-surface .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer button { width: 100%; min-height: 42px; }
  .staged-import-row { align-items: flex-start; flex-direction: column; }
  .credential-actions { align-items: stretch; flex-direction: column; }
  .credential-actions > * { min-height: 42px; }
  .auth-brand { margin-bottom: 48px; }

  .data-section .table-scroll { overflow: visible; }
  .data-section table, .supplier-key-section table { min-width: 0; display: block; }
  .data-section thead { display: none; }
  .data-section tbody { display: grid; gap: 10px; }
  .data-section tr { display: grid; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
  .data-section td { min-height: 0; height: auto; display: grid; grid-template-columns: minmax(92px, 34%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; white-space: normal; }
  .data-section td:last-child { border-bottom: 0; }
  .data-section td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .data-section td.num, .data-section td.action-col { text-align: left; }
  .data-section .empty-row { display: block; }
  .data-section .empty-row td { display: block; border: 0; padding: 36px 10px; }
  .data-section .empty-row td::before { content: none; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .row-actions button { min-height: 38px; }
  .row-menu { justify-self: start; }
  .attempt-item { grid-template-columns: 72px 1fr; }
  .attempt-item > :last-child { grid-column: 2; }
  .batch-result-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .batch-result-summary article:nth-child(4) { padding-left: 0; border-left: 0; }
  .batch-result-item { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .heading-actions { max-width: 180px; gap: 7px 9px; }
  .refresh-state { order: 3; width: 100%; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
