/* ABF design system (Reference v1.0, July 2026), dark theme for the ABF
   Production apps. One accent (sky) does the work; everything else is neutral.
   Gotham for text, Bebas Neue for UI labels, pill buttons, 8px cards, flat
   surfaces, no gradients or glows. This file is shared by every suite app:
   edit it in ABF Production/design/ and run `node design/sync.mjs`. */
@import url("fonts.css");

:root {
  /* brand */
  --abf-sky: #25aae1;
  --abf-sky-deep: #1b85b2;
  --abf-navy: #1a3a8f;
  --abf-dark: #202020;
  --abf-black: #000000;
  --abf-nav: #808282;
  --abf-light: #eeeeee;

  /* dark surfaces, built on ABF Dark */
  --bg: #161616;
  --chrome: #0e0e0e;          /* top bar, bottom bars */
  --panel: var(--abf-dark);   /* cards */
  --panel-2: #2a2a2a;         /* raised: inputs, rows, popovers */
  --line: #303030;
  --line-2: #404040;
  --line-hover: #5c5c5c;
  --text: #ffffff;            /* headings, strong text */
  --body: var(--abf-light);
  --muted: #b4b6b6;
  --faint: #8c8e8e;           /* Nav Gray, lifted for contrast on dark */

  /* accent */
  --accent: var(--abf-sky);
  --accent-deep: var(--abf-sky-deep);
  --accent-ink: #ffffff;      /* text on a sky fill */
  --accent-tint: rgba(37, 170, 225, .16);   /* Sky Tint: callouts only */
  --accent-line: rgba(37, 170, 225, .45);
  --accent-text: #8fd3f0;

  /* status: functional signals only (dots, chips, notices), never decoration.
     Not in the brand palette: the booth needs ready / careful / stop at a glance. */
  --ok: #43c08c;
  --ok-tint: rgba(67, 192, 140, .12);
  --ok-line: rgba(67, 192, 140, .42);
  --ok-text: #a8eccd;
  --warn: #f5b544;
  --warn-tint: rgba(245, 181, 68, .12);
  --warn-line: rgba(245, 181, 68, .42);
  --warn-text: #ffd48a;
  --danger: #f2626f;
  --bad-tint: rgba(242, 98, 111, .12);
  --bad-line: rgba(242, 98, 111, .45);
  --bad-text: #ffb3ba;

  /* type */
  --font: "Gotham", "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Gotham Display", "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Bebas Neue", "Gotham", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;

  /* shape, space, motion */
  --radius: 8px;
  --radius-pill: 40px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 80px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;
  --shadow-card: 0 4px 14px rgba(0, 0, 0, .28);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, .38);
  --shadow-pop: 0 18px 40px rgba(0, 0, 0, .5);

  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--body); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-family: var(--font-display); letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 900; line-height: 1.05; }
h2 { font-size: 20px; font-weight: 900; line-height: 1.15; }
h3 { font-size: 15.5px; font-weight: 800; line-height: 1.25; }
h4 { font-size: 14px; font-weight: 700; line-height: 1.3; }
b, strong { color: var(--text); font-weight: 700; }
small, .muted { color: var(--muted); }
code { font-family: var(--mono); font-size: 12px; }
a { color: var(--accent); text-decoration: none; transition: color var(--t) var(--ease); }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(37, 170, 225, .35); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-4) 0; }

/* UI labels: Bebas Neue, uppercase (nav, buttons, eyebrows, tags) */
.eyebrow, .sec-head, .section-head { font-family: var(--font-ui); font-weight: 400; font-size: 16px; line-height: 1.1; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sec-head { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 2px var(--s-3); }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-head:first-child { margin-top: 0; }
.section-head { margin: 28px 0 var(--s-3); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-5); min-height: 60px; padding: 0 var(--s-5); background: var(--chrome); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--text); font-family: var(--font-ui); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.brand .logo { display: block; width: 26px; height: 26px; object-fit: contain; }
.brand .logo + * { padding-left: var(--s-3); border-left: 1px solid var(--line-2); }
.tabs { display: flex; gap: var(--s-5); align-self: stretch; }
.tabs button { position: relative; display: flex; align-items: center; background: none; border: 0; padding: 0 2px; color: var(--faint); cursor: pointer; font-family: var(--font-ui); font-weight: 400; font-size: 18px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; transition: color var(--t) var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.status { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; padding: var(--s-2) 0; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: var(--radius-pill); background: var(--panel); border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); white-space: nowrap; text-decoration: none; transition: color var(--t) var(--ease), border-color var(--t) var(--ease); }
.pill::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.ok::before { background: var(--ok); }
.pill.warn::before { background: var(--warn); }
.pill.bad::before { background: var(--danger); }
a.pill:hover { color: var(--text); border-color: var(--line-hover); }

main { max-width: 1180px; margin: 0 auto; padding: var(--s-5) var(--s-5) 120px; }
.tab { display: none; }
.tab.active { display: block; animation: abf-rise var(--t) var(--ease); }

/* ---------- buttons: pills, two variants (filled, outline) + quiet text buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 40px; padding: 6px 20px; border-radius: var(--radius-pill); border: 4px solid var(--accent); background: transparent; color: var(--text); cursor: pointer; font-family: var(--font-ui); font-weight: 400; font-size: 17px; line-height: 1; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; text-decoration: none; transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.btn:not(:disabled):hover { background: var(--accent); color: var(--accent-ink); }
.btn:not(:disabled):active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:not(:disabled):hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.small { min-height: 30px; padding: 3px 14px; border-width: 2px; font-size: 15px; }
.btn.ghost { min-height: 0; padding: 5px 10px; border-color: transparent; color: var(--muted); }
.btn.ghost:not(:disabled):hover { background: transparent; color: var(--accent); }
.btn.danger { border-color: var(--danger); color: var(--bad-text); }
.btn.danger:not(:disabled):hover { background: var(--danger); color: #fff; }
.btn.ghost.danger { border-color: transparent; }
.btn.ghost.danger:not(:disabled):hover { background: transparent; color: var(--danger); }
.btn svg, .i { flex: none; width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }

/* ---------- form controls ---------- */
input[type=text], input[type=password], input[type=number], input[type=search], input[type=url], input[type=email], input[type=date], input[type=time], select, textarea { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 12px; color: var(--text); outline: none; min-width: 0; transition: border-color var(--t) var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--line-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { width: 100%; resize: vertical; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
label.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
label.field > span { font-family: var(--font-ui); font-weight: 400; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
label.check { display: inline-flex; gap: var(--s-2); align-items: center; color: var(--body); cursor: pointer; }

/* segmented control */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-pill); }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: var(--radius-pill); cursor: pointer; color: var(--muted); font-family: var(--font-ui); font-weight: 400; font-size: 15px; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; min-width: 26px; transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* ---------- layout + surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: var(--s-4); }
.spacer { flex: 1; }
.empty { padding: var(--s-7) var(--s-5); text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* callouts */
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn-text); font-size: 13px; }
.notice.info { background: var(--accent-tint); border-color: var(--accent-line); color: #dff3fb; }
.notice.ok { background: var(--ok-tint); border-color: var(--ok-line); color: #d6f6e7; }
.notice.bad { background: var(--bad-tint); border-color: var(--bad-line); color: var(--bad-text); }
.notice a { color: inherit; font-weight: 700; }

/* tags + chips: Bebas pills */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 2px; border-radius: var(--radius-pill); font-family: var(--font-ui); font-weight: 400; font-size: 14px; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip.ok { color: var(--ok-text); border-color: var(--ok-line); background: var(--ok-tint); }
.chip.accent { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-tint); }
.chip.warn { color: var(--warn-text); border-color: var(--warn-line); background: var(--warn-tint); }
.chip.bad { color: var(--bad-text); border-color: var(--bad-line); background: var(--bad-tint); }

/* ---------- popover / modal / toast ---------- */
.popover { position: absolute; z-index: 40; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: var(--s-3); box-shadow: var(--shadow-pop); }
dialog { width: min(860px, calc(100vw - 40px)); max-height: calc(100vh - 60px); background: var(--panel); color: var(--body); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-pop); }
dialog[open] { animation: abf-rise var(--t) var(--ease); }
dialog::backdrop { background: rgba(0, 0, 0, .62); }
.m-head, dialog .head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); background: var(--panel); }
.m-body, dialog .content { padding: 20px var(--s-5); display: grid; gap: var(--s-4); }
dialog .content { display: block; overflow: auto; }
.m-foot, dialog .foot { position: sticky; bottom: 0; display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); background: var(--panel); }
dialog .foot { justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; max-width: min(640px, calc(100vw - 32px)); padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--shadow-pop); animation: abf-rise-x var(--t) var(--ease); }
.toast.bad { border-color: var(--bad-line); color: var(--bad-text); }

/* ---------- motion ---------- */
@keyframes abf-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes abf-rise-x { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: var(--s-3); padding: var(--s-2) var(--s-4); }
  .tabs { order: 3; width: 100%; overflow-x: auto; overflow-y: hidden; min-height: 40px; }
  .tabs button.active::after { bottom: 0; }
  .status { margin-left: 0; justify-content: flex-start; }
  main { padding: var(--s-4) var(--s-4) 120px; }
}
