:root {
  color-scheme: dark;
  /* Surfaces */
  --canvas:    #111111;  /* page background (index --dark-bg, customer.css) */
  --surface:   #1a1a1a;  /* cards, fields, cookie banner (index --card-bg) */
  --raised:    #161616;  /* optional inset / nested card (portal .card was this) */
  --stroke:    #333333;  /* control outlines, input borders */
  --hairline:  #2a2a2a;  /* dividers, topbar / nav edges */
  /* Text */
  --text:      #ffffff;  /* 18.88:1 on canvas */
  --text-muted:#aaaaaa;  /* 8.13:1 on canvas — secondary copy */
  --text-label:#888888;  /* 5.33:1 on canvas, 4.91:1 on surface — labels, nav, placeholders. Floor: never darker than this for text */
  --on-brand:  #000000;  /* 10.80:1 on --brand. The only text colour allowed on green */
  /* Brand */
  --brand:     #00d664;  /* links, icon, primary fill (index --primary) */
  --brand-hover:#00b353; /* 7.57:1 with --on-brand */
  /* Danger (portal .btn-danger, already AA with white) */
  --danger:    #d32f2f;  /* 4.98:1 with white */
  --on-danger: #ffffff;
  --danger-hover:#c62828; /* 5.62:1 with white */
  /* Status chips — dark surfaces, light text, never pale-on-white chips on a dark page */
  --chip-pending-bg:  #2A2212;
  --chip-pending-text:#FFC857; /* 10.22:1 */
  --chip-assigned-bg: #152033;
  --chip-assigned-text:#8EC8FF; /* 9.22:1 */
  --chip-active-bg:   #14301C;
  --chip-active-text: #8FD4A4;  /* 8.25:1 */
  /* Type */
  --font: "Outfit", system-ui, sans-serif;
  /* Space (4px grid, already common) */
  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --edge: 20px;
  /* Shape */
  --r-field: 8px;
  --r-card:  12px;
  --r-pill:  999px;
  /* Touch */
  --hit-min: 48px;
}

@font-face {
  font-family: "Outfit";
  src: url('/static/fonts/Outfit-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
}

.at-num {
  font-variant-numeric: tabular-nums;
}

.at-display {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--text);
}

.at-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
}

.at-label {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-label);
}

.at-caption {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-muted);
}

.at-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--hit-min);
  padding: var(--s3) var(--s5);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.at-btn:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.at-btn--primary {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

.at-btn--primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.at-btn--secondary {
  background: #1f1f1f;
  color: var(--text);
  border-color: var(--stroke);
}

.at-btn--secondary:hover:not(:disabled) {
  background: var(--raised);
  border-color: var(--text-label);
}

.at-btn--danger {
  background: var(--danger);
  color: var(--on-danger);
  border-color: var(--danger);
}

.at-btn--danger:hover:not(:disabled) {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.at-btn:disabled,
.at-btn[disabled] {
  opacity: 1;
  background: var(--surface);
  color: var(--text-label);
  border-color: var(--stroke);
  cursor: not-allowed;
}

.at-field {
  display: block;
  width: 100%;
  min-height: var(--hit-min);
  padding: var(--s3) var(--s4);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: var(--r-field);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.at-field::placeholder {
  color: var(--text-label);
}

.at-field:focus,
.at-field:focus-visible {
  border-color: var(--brand);
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.at-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s4) var(--s5);
}

.at-card--raised {
  background: var(--raised);
  border-color: var(--stroke);
}

.at-card h1,
.at-card h2,
.at-card h3,
.at-card p {
  overflow-wrap: anywhere;
}

.at-topbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: var(--hit-min);
  padding: var(--s2) var(--edge);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}

.at-wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.at-wordmark-icon,
.at-wordmark svg {
  flex: none;
  color: var(--brand);
  fill: var(--brand);
}

.at-nav {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: var(--s2);
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

.at-nav a {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: var(--hit-min);
  padding: var(--s2);
  color: var(--text-label);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  text-decoration: none;
}

.at-nav a[aria-current="page"],
.at-nav a.is-active {
  color: var(--brand);
}

.at-nav a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

.at-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 4px var(--s3);
  border-radius: var(--r-pill);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}

.at-chip--pending {
  background: var(--chip-pending-bg);
  color: var(--chip-pending-text);
}

.at-chip--assigned {
  background: var(--chip-assigned-bg);
  color: var(--chip-assigned-text);
}

.at-chip--active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
}
