/* Driver Chat Monitor - design option C (Frank, 2026-10-29): top bar menu with counts, cards, target bars,
   staff photos with status rings. Light + dark (system setting, or data-theme on <html>).
   Aravan Cargo brand (2026-11-03): accent = logo blue (#165A9E, from the CMYK logo), late / critical = red so it
   stands apart from amber "waiting" and the blue; the logo turns white in dark mode. */
:root {
  color-scheme: light;
  --bg: #F5F6F8; --surface: #FFFFFF; --surface-2: #F8F9FB; --border: #E3E6EB; --border-2: #EEF0F3;
  --text: #14171F; --text-2: #3D4350; --muted: #5B6170; --faint: #8A909C;
  --accent: #165A9E; --accent-ink: #0E3D6E; --accent-bg: #E8F0F9; --series-1: #165A9E; --grid: #EEF0F3;
  --brand-deep: #0E3D6E; --logo-1: #165A9E; --logo-2: #616265; --on-accent: #FFFFFF; --on-crit: #FFFFFF;
  --good: #15803D; --good-ink: #15603A; --good-bg: #E3F4EA;
  --warn: #B26B00; --warn-ink: #7A4A00; --warn-bg: #FDF0D5;
  --crit: #C62828; --crit-ink: #9B1C1C; --crit-bg: #FDF1F1; --crit-line: #F2C4C4;
  --ext: #7F1D1D; --track: #EBEDF1; --ring-idle: #D3D7DE; --none-bg: #EEF0F3;
  /* one colour per person, used for initials until a photo is uploaded */
  --aj-bg: #E8F0F9; --aj-fg: #0E3D6E; --am-bg: #EFE6FB; --am-fg: #4C2A85; --an-bg: #FCE4EC; --an-fg: #8A1C40;
  --do-bg: #DDF3F1; --do-fg: #0F5F5A; --gu-bg: #FDF0D5; --gu-fg: #7A4A00; --sh-bg: #FBE6DA; --sh-fg: #7A2E0E;
  --zu-bg: #E3F4EA; --zu-fg: #15603A; --ni-bg: #E6E8EC; --ni-fg: #2B303B; --ad-bg: #E8EEDA; --ad-fg: #3F5214;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111317; --surface: #1A1D23; --surface-2: #20242B; --border: #2C3038; --border-2: #252930;
    --text: #ECEEF2; --text-2: #C9CDD5; --muted: #9AA0AC; --faint: #6E7480;
    --accent: #5E9BE0; --accent-ink: #A9C9F0; --accent-bg: #16283F; --series-1: #5E9BE0; --grid: #2A2E36;
  --brand-deep: #0B2540; --logo-1: #FFFFFF; --logo-2: #C9CDD5; --on-accent: #0B1A2E; --on-crit: #1A0B0B;
    --good: #3FB66B; --good-ink: #7FD9A0; --good-bg: #16301F;
    --warn: #E0A23B; --warn-ink: #F2C77A; --warn-bg: #36290F;
    --crit: #F26B6B; --crit-ink: #FFA8A8; --crit-bg: #2E1517; --crit-line: #5A2328;
    --ext: #B91C1C; --track: #2A2E36; --ring-idle: #3A3F48; --none-bg: #262A31;
    --aj-bg: #16283F; --aj-fg: #A9C9F0; --am-bg: #2B2140; --am-fg: #CDB5F5; --an-bg: #3A1A26; --an-fg: #F5A9C2;
    --do-bg: #123230; --do-fg: #8ADBD3; --gu-bg: #36290F; --gu-fg: #F2C77A; --sh-bg: #3A2016; --sh-fg: #F6B08F;
    --zu-bg: #16301F; --zu-fg: #7FD9A0; --ni-bg: #2A2E36; --ni-fg: #C9CDD5; --ad-bg: #252E16; --ad-fg: #C2D69A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111317; --surface: #1A1D23; --surface-2: #20242B; --border: #2C3038; --border-2: #252930;
  --text: #ECEEF2; --text-2: #C9CDD5; --muted: #9AA0AC; --faint: #6E7480;
  --accent: #5E9BE0; --accent-ink: #A9C9F0; --accent-bg: #16283F; --series-1: #5E9BE0; --grid: #2A2E36;
  --brand-deep: #0B2540; --logo-1: #FFFFFF; --logo-2: #C9CDD5; --on-accent: #0B1A2E; --on-crit: #1A0B0B;
  --good: #3FB66B; --good-ink: #7FD9A0; --good-bg: #16301F;
  --warn: #E0A23B; --warn-ink: #F2C77A; --warn-bg: #36290F;
  --crit: #F26B6B; --crit-ink: #FFA8A8; --crit-bg: #2E1517; --crit-line: #5A2328;
  --ext: #B91C1C; --track: #2A2E36; --ring-idle: #3A3F48; --none-bg: #262A31;
  --aj-bg: #16283F; --aj-fg: #A9C9F0; --am-bg: #2B2140; --am-fg: #CDB5F5; --an-bg: #3A1A26; --an-fg: #F5A9C2;
  --do-bg: #123230; --do-fg: #8ADBD3; --gu-bg: #36290F; --gu-fg: #F2C77A; --sh-bg: #3A2016; --sh-fg: #F6B08F;
  --zu-bg: #16301F; --zu-fg: #7FD9A0; --ni-bg: #2A2E36; --ni-fg: #C9CDD5; --ad-bg: #252E16; --ad-fg: #C2D69A;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.bad { color: var(--crit); } .ok { color: var(--good); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px clamp(16px, 3vw, 40px); background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 32px; height: 32px; display: grid; place-items: center; flex: none; }
.brand .logo svg { width: 32px; height: 32px; display: block; }
.lg-blue { fill: var(--logo-1); } .lg-grey { fill: var(--logo-2); }
.mainnav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.mainnav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--text-2); white-space: nowrap; }
.mainnav a:hover { background: var(--surface-2); text-decoration: none; }
.mainnav a.on { background: var(--accent-bg); color: var(--accent-ink); font-weight: 600; }
.count { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; line-height: 18px; }
.count.crit { background: var(--crit); color: var(--on-crit); } .count.warn { background: var(--warn-bg); color: var(--warn-ink); }
.me { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.theme-btn { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 9px; min-height: 34px; font-size: 16px; line-height: 1; font-weight: 400; }
.theme-btn:hover { background: var(--surface-2); }
.theme-btn.on { border-color: var(--accent); background: var(--accent-bg); }
.brandbar .theme-btn { border-color: #3B5F8A; color: #FFFFFF; } .brandbar .theme-btn:hover { background: #163F6B; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.out { color: var(--muted); font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; font-weight: 400; cursor: pointer; min-height: 0; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ---------- layout ---------- */
main { max-width: 1480px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 40px) 60px; }
main.overview { display: flex; flex-direction: column; gap: 18px; }
main.overview > * { margin-bottom: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head p { margin: 6px 0 0; }
h1.with-av { display: flex; align-items: center; gap: 12px; }

/* segmented tabs (periods, list types, staff, My numbers / Whole team) */
.seg, .tabs { display: inline-flex; flex-wrap: wrap; background: var(--track); border-radius: 10px; padding: 4px; gap: 2px; border: 0; }
.seg a, .tabs a { padding: 7px 13px; border-radius: 7px; font-size: 13px; color: var(--text-2); }
.seg a:hover, .tabs a:hover { text-decoration: none; color: var(--text); }
.seg a.on, .tabs a.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(20,23,31,.12); }
.seg.mode a { padding: 5px 10px; font-size: 12px; }
.list-tabs { display: flex; margin-bottom: 10px; }
.ranges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.custom-range { position: relative; margin: 0; }
.custom-range summary { list-style: none; }
.custom-range summary::-webkit-details-marker { display: none; }
.custom-range .range-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; box-shadow: 0 8px 24px rgba(20,23,31,.14); }
.range-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.range-form label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; font-size: 13px; color: var(--text-2); }
.range-form input { display: inline-block; width: auto; margin: 0; padding: 5px 8px; }
.range-form button { padding: 7px 12px; }

/* buttons */
button { padding: 9px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
button.btn-off { background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); border-radius: 10px; padding: 8px 14px; min-height: 40px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--faint); }
.btn.on { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.danger { background: var(--crit); border-color: var(--crit); color: var(--on-crit); font-weight: 600; }
.btn.small { min-height: 36px; padding: 7px 12px; border-radius: 8px; }
button.btn.small { font-weight: 500; }
.btn.danger-text, button.danger-text { color: var(--crit-ink); background: var(--surface); border: 1px solid var(--border); }
.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* forms */
label { display: block; margin: 12px 0; font-weight: 600; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form input { display: inline-block; width: 190px; margin: 0; padding: 6px 8px; }
.inline-form button { padding: 6px 12px; min-height: 34px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; align-items: end; }
.note { background: var(--none-bg); padding: 8px 12px; border-radius: 8px; }

/* ---------- cards, tiles, chips ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.card > .ch { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  margin: -18px -20px 0; padding: 14px 20px; border-bottom: 1px solid var(--border-2); }
.card > .ch h2 { margin: 0; } .card > .ch .n { font-weight: 500; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tile .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile .big { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.chip, .pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip.good, .pill.good { background: var(--good-bg); color: var(--good-ink); }
.chip.warn, .pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.crit { background: var(--crit-bg); color: var(--crit-ink); border: 1px solid var(--crit-line); }
.pill.crit { background: var(--crit); color: var(--on-crit); }
a.pill:hover { text-decoration: none; filter: brightness(.95); }
.chip.none, .pill.none { background: var(--none-bg); color: var(--text-2); }
.dot.crit { color: var(--crit); font-weight: 700; }

/* ---------- avatars ---------- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; font-weight: 700;
  object-fit: cover; vertical-align: middle; letter-spacing: .02em; overflow: hidden; }
.av.s22 { width: 22px; height: 22px; font-size: 9px; } .av.s28 { width: 28px; height: 28px; font-size: 11px; }
.av.s34 { width: 34px; height: 34px; font-size: 12px; } .av.s56 { width: 56px; height: 56px; font-size: 18px; }
.av.s72 { width: 72px; height: 72px; font-size: 22px; }
.av-aj { background: var(--aj-bg); color: var(--aj-fg); } .av-am { background: var(--am-bg); color: var(--am-fg); }
.av-an { background: var(--an-bg); color: var(--an-fg); } .av-do { background: var(--do-bg); color: var(--do-fg); }
.av-gu { background: var(--gu-bg); color: var(--gu-fg); } .av-sh { background: var(--sh-bg); color: var(--sh-fg); }
.av-zu { background: var(--zu-bg); color: var(--zu-fg); } .av-ni { background: var(--ni-bg); color: var(--ni-fg); }
.av-ad { background: var(--ad-bg); color: var(--ad-fg); } .av-admin { background: var(--track); color: var(--text-2); }
.av.dashed { outline: 2px dashed currentColor; outline-offset: -2px; }
img.av.dashed { outline: 0; }
.ring-good { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--good); }
.ring-late { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--crit); }
.ring-idle { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring-idle); }
.s56.ring-good { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--good); }
.s56.ring-late { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--crit); }
.s56.ring-idle { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--ring-idle); }
.who-cell { white-space: nowrap; } .who-cell .av { margin-right: 6px; }

/* staff photo reminder */
.remind { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 14px 18px; border-color: #C9D8F5;
  max-width: 1400px; margin: 16px auto 0; width: calc(100% - 2 * clamp(16px, 3vw, 40px)); }
:root[data-theme="dark"] .remind { border-color: #2B4479; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .remind { border-color: #2B4479; } }
.remind-txt { flex: 1 1 300px; display: flex; flex-direction: column; gap: 2px; }
.remind-act { display: flex; gap: 8px; align-items: center; }
.remind-act form { margin: 0; }

/* ---------- overview ---------- */
.duo-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.duo-top.solo { grid-template-columns: minmax(0, 1fr); }
.duo-top > .card { margin: 0; }
.attention { padding: 0; overflow: hidden; }
.attention > .ch { margin: 0; }
.att-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border-2); }
.att-row.hot { background: var(--crit-bg); border-bottom-color: var(--crit-line); }
.tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 4px 8px; letter-spacing: .04em; white-space: nowrap; min-width: 116px; text-align: center; }
.tag.crit { background: var(--crit); color: var(--on-crit); } .tag.warn { background: var(--warn-bg); color: var(--warn-ink); } .tag.ext { background: var(--ext); color: #fff; }
.att-main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-who { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.att-who .meta { font-weight: 400; color: var(--muted); }
.att-msg { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-act { display: flex; gap: 8px; align-items: center; }
.att-act .resolve-form { margin: 0; }
.att-act .resolve-form button { background: var(--surface); color: var(--crit-ink); border: 1px solid var(--crit-line); min-height: 36px; padding: 7px 12px; font-size: 13px; }
.att-more { padding: 10px 20px; font-size: 13px; background: var(--surface-2); }

.team-wrap { display: flex; flex-direction: column; gap: 12px; }
.team-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.team-head h2 { margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; display: inline-block; }
.lg-good { border-color: var(--good) !important; } .lg-late { border-color: var(--crit) !important; } .lg-idle { border-color: var(--ring-idle) !important; }
.legend i.lg-bar { border-radius: 2px; border: 0; } .lg-bar.acc { background: var(--accent); } .lg-bar.good { background: var(--good); }
.legend i.lg-dash { width: 16px; height: 0; border: 0; border-top: 2px dashed var(--text); border-radius: 0; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mate { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px; border-radius: 12px; color: var(--text); text-align: center; }
.mate:hover { background: var(--surface-2); text-decoration: none; }
.mate.idle { opacity: .55; }
.mate .av.s56 { width: 48px; height: 48px; font-size: 16px; }
.mate .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.mate .st { font-size: 11px; color: var(--muted); line-height: 1.2; } .mate .st.late { color: var(--crit-ink); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.kpi .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.kpi .big a { color: inherit; }
.kpi.alert { background: var(--crit-bg); border-color: var(--crit-line); }
.kpi.alert .top { color: var(--crit-ink); font-weight: 600; } .kpi.alert .big, .kpi.alert a { color: var(--crit-ink); }
/* bars are SVG (svg_bar / svg_stack in lib.php) */
.bar-svg { display: block; width: 100%; height: 14px; }
.bar-svg.h8 { height: 16px; } .stack-svg { height: 10px; border-radius: 5px; }
.b-track { fill: var(--track); } .b-good { fill: var(--good); } .b-warn { fill: var(--warn); } .b-acc { fill: var(--accent); }
.b-tick { fill: var(--text); }
.bar-space { height: 14px; }

.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split > .table-card { flex: 999 1 640px; min-width: 0; margin: 0; padding: 0; overflow: hidden; }
.table-card > .ch { margin: 0; }
.split > .col { flex: 1 1 270px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split > .col > .card { margin: 0; }
.tools { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; font-weight: 500; color: var(--text-2); }
.tools input { display: inline-block; width: auto; margin: 0; }
.staff-table th[scope=row] a { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; }
.staff-table tbody td, .staff-table tbody th { vertical-align: middle; padding-top: 9px; padding-bottom: 9px; }
.staff-table tr.idle .av { opacity: .55; }
.idle-on tr.idle { display: none; }
.tfoot { padding: 10px 20px; border-top: 1px solid var(--border-2); font-size: 12px; color: var(--muted); background: var(--surface-2); }
.idle-note { display: none; } .idle-on .idle-note { display: block; }

.mini { display: flex; flex-direction: column; gap: 10px; }
.mini h2 { font-size: 15px; margin: 0; }
.mini-head { display: flex; justify-content: space-between; align-items: center; }
.mini-big { font-size: 24px; line-height: 1.1; }
.m-normal { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); } .m-frus { fill: var(--warn); } .m-ext { fill: var(--crit); }
.m-rule { fill: var(--faint); } .m-ai { fill: var(--accent); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.trio a { color: var(--text); border-radius: 8px; padding: 4px 0; } .trio a:hover { background: var(--surface-2); text-decoration: none; }
.trio b { display: block; font-size: 22px; } .t-warn { color: var(--warn-ink); } .t-crit { color: var(--crit-ink); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.duo div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; } .duo b { display: block; font-size: 22px; }
.mini-legend { display: flex; justify-content: space-between; }
.list-card summary { font-size: 15px; font-weight: 700; color: var(--text); }
.how summary { font-size: 15px; font-weight: 700; color: var(--text); }
.how p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 12px 0 0; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; margin-bottom: 10px; }
.chart-head h2 { margin: 0; }
.overview .card { margin-bottom: 0; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.grid thead th { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.grid th:first-child, .grid td:first-child { padding-left: 16px; } .grid th:last-child, .grid td:last-child { padding-right: 16px; }
.grid .num { text-align: right; white-space: nowrap; }
.grid td.msg { max-width: 420px; color: var(--text-2); }
.grid th.sort { cursor: pointer; user-select: none; }
.grid th.sort:hover { color: var(--text); }
.grid th.sort::after { content: " ↕"; color: var(--faint); }
.grid th[aria-sort="ascending"]::after { content: " ▲"; color: var(--accent); }
.grid th[aria-sort="descending"]::after { content: " ▼"; color: var(--accent); }
.grid tr.filters td { padding: 5px 6px; background: var(--surface-2); }
.grid tr.filters input { margin: 0; padding: 4px 7px; font-size: 12px; min-width: 56px; border-radius: 6px; }
.filter-count { margin: 6px 16px; }
.list { margin: 0; padding-left: 18px; } .list li { margin-bottom: 10px; }
.list.cols { columns: 3 260px; } .list.cols li { break-inside: avoid; margin-bottom: 4px; }
.digest { white-space: normal; color: var(--text); }
.resolve-form { margin-left: 6px; vertical-align: middle; }
.resolve-form button { padding: 3px 9px; font-size: 12px; min-height: 28px; }
.tile .resolve-form { margin: 6px 0 0; }

/* ---------- chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .mark { fill: var(--series-1); }
.chart .mark.ok { fill: var(--good); }
.chart .target { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .hit { fill: transparent; }
.chart .bar:hover .mark { opacity: .8; }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--text-2); }
.overview details.card { margin-top: 0; }
#tip { position: fixed; pointer-events: none; background: var(--text); color: var(--surface); padding: 5px 9px;
  border-radius: 6px; font-size: 12px; z-index: 20; display: none; }

/* ---------- login, profile, users ---------- */
.login { display: grid; place-items: center; min-height: 80vh; }
.login .card, .setup .card { width: 100%; max-width: 560px; }
.login-box { width: 100%; max-width: 560px; display: grid; justify-items: center; gap: 22px; }
.login-logo svg { width: min(260px, 70vw); height: auto; display: block; }
.setup { max-width: 600px; }
.profile-photo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile-photo > div { flex: 1 1 260px; }
.photo-auto { display: inline-flex; }
.progress { display: flex; align-items: center; gap: 10px; min-width: 220px; font-weight: 600; font-size: 13px; }
.progress .bar-svg { flex: 1; min-width: 80px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding-top: 18px; }
.pcard { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pcard.missing { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); background: color-mix(in srgb, var(--warn-bg) 35%, var(--surface)); }
.pcard-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- conversation view ---------- */
.back { white-space: nowrap; }
.convo { display: flex; flex-direction: column; gap: 8px; }
.msg-row { display: flex; }
.msg-row.stf, .msg-row.bot { justify-content: flex-end; }
.bubble { max-width: min(640px, 85%); padding: 8px 12px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--border); overflow-wrap: anywhere; }
.msg-row.stf .bubble { background: var(--good-bg); border-color: transparent; }
.msg-row.bot .bubble { background: var(--warn-bg); border-color: transparent; }
.msg-row.focus .bubble { outline: 2px solid var(--accent); }
.bubble .meta { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .duo-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .brand-name, .who-name { display: none; }
  .mainnav { order: 3; flex-basis: 100%; }
  .me { margin-left: auto; gap: 10px; }
  .seg.mode a { padding: 4px 8px; }
  main { padding: 16px 14px 40px; }
  h1 { font-size: 21px; }
  .head { margin-bottom: 12px; }
  .ranges { justify-content: flex-start; }
  .custom-range .range-form { left: 0; right: auto; }
  .kpi .big { font-size: 26px; }
  .att-row { padding: 12px 14px; }
  .att-act { width: 100%; } .att-act > * { flex: 1; } .att-act .resolve-form button { width: 100%; }
  .tag { min-width: 0; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card { padding: 14px; } .card > .ch { margin: -14px -14px 0; padding: 12px 14px; }
  .card.attention, .split > .card.table-card { padding: 0; }
  .attention > .ch, .table-card > .ch { margin: 0; }
  .remind { width: calc(100% - 28px); margin-top: 12px; }
  .tile .big { font-size: 24px; }
}

/* ---------- group tickets + TV board (Frank 2026-11-02) ---------- */
.src { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; vertical-align: 1px; white-space: nowrap; }
.src.grp { background: var(--am-bg); color: var(--am-fg); }
.src.dm { background: var(--aj-bg); color: var(--aj-fg); }
td .sub { display: block; font-size: 11px; color: var(--muted); }
.board { padding: 16px clamp(16px, 3vw, 40px) 40px; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.board-head h1 .clock { color: var(--muted); font-weight: 600; margin-left: 8px; }
.board-head.brandbar { background: var(--brand-deep); color: #FFFFFF; border-radius: 14px; padding: 14px 18px; align-items: center; }
.brandbar h1, .brandbar h1 .clock { color: #FFFFFF; } .brandbar h1 .clock { color: #B8CDE6; }
.brandbar p.muted { color: #B8CDE6; margin: 4px 0 0; }
.brandbar .lg-blue { fill: #FFFFFF; } .brandbar .lg-grey { fill: #C9D6E6; }
.bh-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; min-width: 0; }
.bh-logo svg { height: 48px; width: auto; display: block; }
.board.tv .bh-logo svg { height: 64px; }
.board-tools { display: flex; gap: 10px; align-items: center; }
.sound-hint { font-size: 12px; color: var(--warn-ink); background: var(--warn-bg); padding: 4px 10px; border-radius: 999px; }
.sound-hint.on { display: none; }
.board-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.board-stats span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; color: var(--text-2); font-size: 13px; }
.board-stats b { color: var(--text); font-size: 16px; margin-right: 4px; }
.board-stats .bs-wait b { color: var(--warn-ink); } .board-stats .bs-work b { color: var(--accent); }
.board.tv .board-stats span { font-size: 16px; } .board.tv .board-stats b { font-size: 22px; }
.new-banner { background: var(--crit); color: var(--on-crit); font-weight: 700; text-align: center; padding: 10px; border-radius: 10px; margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-width: 0; }
.col-head { display: flex; flex-direction: column; margin-bottom: 10px; }
.col-head h2 { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.col-head .n { font-size: 14px; color: var(--muted); }
.col-wait .col-head h2 { color: var(--crit-ink); } .col-work .col-head h2 { color: var(--warn-ink); } .col-done .col-head h2 { color: var(--good-ink); }
.col .empty { margin: 8px 2px; }
.bcard { display: block; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px;
  padding: 9px 11px; margin-bottom: 8px; color: var(--text); }
.bcard:hover { text-decoration: none; border-color: var(--accent); }
.col-wait .bcard { border-left-color: var(--warn); } .col-work .bcard { border-left-color: var(--accent); } .col-done .bcard { border-left-color: var(--good); }
.col-wait .bcard.late { border-left-color: var(--crit); background: var(--crit-bg); }
.col-work .bcard.late { border-left-color: var(--warn); }
.bc-top { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.bc-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-text { color: var(--text-2); font-size: 13px; margin: 3px 0 6px; overflow-wrap: anywhere; }
.bc-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.bc-foot .timer { margin-left: auto; font-weight: 700; color: var(--text); }
.bcard.late .timer { color: var(--crit-ink); }
.board.tv { font-size: 16px; }
.board.tv h1 { font-size: 32px; } .board.tv .col-head h2 { font-size: 22px; }
.board.tv .bc-title { font-size: 18px; } .board.tv .bc-text { font-size: 15px; } .board.tv .bc-foot { font-size: 14px; }
.board.tv .bc-foot .timer { font-size: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* ==========================================================================
   Pastel look (Frank, 2026-11-18): like the "Sharia" finance dashboard he liked - cool light grey page, white rounded
   cards, pastel number tiles, striped blue bars, dark slate buttons, soft status pills, and motion: cards come in one
   after another, numbers count up, bars grow, new TV board cards slide in. Kept as one block at the end so it can be
   removed in one piece. No motion when the device asks for reduced motion.
   ========================================================================== */
:root {
  --bg: #F3F4F7; --surface: #FFFFFF; --surface-2: #F7F8FA; --border: #E8EAEF; --border-2: #F0F1F4;
  --text: #16181D; --text-2: #3B3F48; --muted: #8A8F99; --faint: #B3B7BF;
  --accent: #5B5CF0; --accent-ink: #3D3EC2; --accent-bg: #EEEEFE; --series-1: #3E74F0;
  --slate: #1F3540; --slate-2: #2C4855; --on-accent: #FFFFFF;
  --peach: #FDE7DA; --peach-ink: #9A4A1C; --aqua: #D9F6F4; --aqua-ink: #11706A;
  --mint: #E2F6DC; --mint-ink: #2F6B1F; --lav: #ECE1FB; --lav-ink: #5B3B9A;
  --bar-1: #3E74F0; --bar-2: #9BC1FF;
  --good: #1F9D55; --good-ink: #17703D; --good-bg: #E3F6E8;
  --warn: #C98A00; --warn-ink: #8A5A00; --warn-bg: #FDF3D6;
  --crit: #E0484A; --crit-ink: #B42828; --crit-bg: #FDE4E4; --crit-line: #F7C4C4;
  --brand-deep: #1F3540; --logo-1: #1F3540; --logo-2: #8A8F99;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04);
  --shadow-lg: 0 12px 32px rgba(22, 24, 29, .10);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1115; --surface: #181B21; --surface-2: #1E2229; --border: #2A2F38; --border-2: #22262E;
    --text: #EEF0F4; --text-2: #C7CBD3; --muted: #8E94A0; --faint: #5F6570;
    --accent: #8C8DF7; --accent-ink: #C3C4FB; --accent-bg: #23244A; --series-1: #6E98F5;
    --slate: #E7ECEF; --slate-2: #FFFFFF; --on-accent: #0F1115;
    --peach: #3A2618; --peach-ink: #F6B98F; --aqua: #10302E; --aqua-ink: #7DE0D6;
    --mint: #1B2E17; --mint-ink: #A6DD8F; --lav: #2A2140; --lav-ink: #CDB6F5;
    --bar-1: #5B8CF5; --bar-2: #2E4E8F;
    --good: #45C47A; --good-ink: #8EE0B0; --good-bg: #163023;
    --warn: #E5A93B; --warn-ink: #F2CB7E; --warn-bg: #352A12;
    --crit: #F06A6C; --crit-ink: #FFA9AA; --crit-bg: #3A1818; --crit-line: #5C2627;
    --brand-deep: #181B21; --logo-1: #FFFFFF; --logo-2: #C7CBD3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #0F1115; --surface: #181B21; --surface-2: #1E2229; --border: #2A2F38; --border-2: #22262E;
  --text: #EEF0F4; --text-2: #C7CBD3; --muted: #8E94A0; --faint: #5F6570;
  --accent: #8C8DF7; --accent-ink: #C3C4FB; --accent-bg: #23244A; --series-1: #6E98F5;
  --slate: #E7ECEF; --slate-2: #FFFFFF; --on-accent: #0F1115;
  --peach: #3A2618; --peach-ink: #F6B98F; --aqua: #10302E; --aqua-ink: #7DE0D6;
  --mint: #1B2E17; --mint-ink: #A6DD8F; --lav: #2A2140; --lav-ink: #CDB6F5;
  --bar-1: #5B8CF5; --bar-2: #2E4E8F;
  --good: #45C47A; --good-ink: #8EE0B0; --good-bg: #163023;
  --warn: #E5A93B; --warn-ink: #F2CB7E; --warn-bg: #352A12;
  --crit: #F06A6C; --crit-ink: #FFA9AA; --crit-bg: #3A1818; --crit-line: #5C2627;
  --brand-deep: #181B21; --logo-1: #FFFFFF; --logo-2: #C7CBD3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);
}

body { font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
h1 { font-weight: 700; letter-spacing: -0.025em; }

/* top bar: white, logo + product name, open page = dark slate pill */
.topbar { padding: 10px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--border-2); box-shadow: none; }
.brand-lockup svg { height: 24px; width: auto; display: block; }
.brand-name { font-size: 13px; font-weight: 500; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--border); }
.mainnav a { font-size: 13.5px; font-weight: 500; color: var(--text-2); padding: 7px 13px; border-radius: 999px; transition: background .2s var(--ease); }
.mainnav a.on { background: var(--slate); color: var(--bg); font-weight: 600; }
.mainnav a.on .count.warn { background: rgba(255, 255, 255, .22); color: inherit; }
.count.crit { background: var(--crit); }
.theme-btn { border-radius: 999px; background: var(--surface); border-color: var(--border); }

/* cards */
.card, .tile, .col { background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: var(--shadow); }
.card > .ch { border-bottom-color: var(--border-2); }
.card > .ch h2, .card h2 { font-size: 15.5px; font-weight: 650; }

/* Overview greeting (light, no banner) */
.hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; padding: 6px 2px 2px; }
.hero-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hero-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero h1 { font-size: 30px; }
.hero p { margin: 0; color: var(--muted); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hero-chips > * { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }
.hero-chips a.hot { background: var(--crit-bg); border-color: var(--crit-line); color: var(--crit-ink); }
.hero-chips a:hover { text-decoration: none; filter: brightness(.97); }
.hero-chips .chip.crit { background: transparent; border: 0; padding: 0; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2FBF71; display: inline-block; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, #2FBF71 22%, transparent); }
.live-dot.off, .hero-chips .hot .live-dot { background: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 22%, transparent); }
.seg, .tabs { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.seg a, .tabs a { border-radius: 999px; }
.seg a.on, .tabs a.on { background: var(--slate); color: var(--bg); box-shadow: none; }

/* pastel number tiles */
.kpis { gap: 14px; }
.kpi { border: 0; border-radius: 20px; padding: 18px 20px; gap: 8px; box-shadow: none; }
.kpi .top { color: inherit; font-weight: 600; }
.kpi .top > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .7); flex: none; }
.kpi .big { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.kpi .small, .kpi .small a { color: inherit; opacity: .85; }
.kpi .pill { background: rgba(255, 255, 255, .7); color: inherit; }
.kpi.t-aqua { background: var(--aqua); color: var(--aqua-ink); }
.kpi.t-lav { background: var(--lav); color: var(--lav-ink); }
.kpi.t-peach { background: var(--peach); color: var(--peach-ink); }
.kpi.t-mint { background: var(--mint); color: var(--mint-ink); }
.kpi.alert .big, .kpi.alert .big a { color: var(--crit-ink); }
.kpi.alert .pill.crit { background: var(--crit); color: #FFFFFF; }
:root[data-theme="dark"] .kpi-ico, :root[data-theme="dark"] .kpi .pill { background: rgba(255, 255, 255, .08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kpi-ico, :root:not([data-theme="light"]) .kpi .pill { background: rgba(255, 255, 255, .08); } }
.kpi .b-track { fill: rgba(255, 255, 255, .6); } .kpi .b-good, .kpi .b-warn, .kpi .b-acc { fill: currentColor; } .kpi .b-tick { fill: currentColor; }

/* buttons, fields, pills, tags */
button, .btn.primary { background: var(--slate); color: var(--bg); border-radius: 999px; transition: transform .15s var(--ease), background .2s; }
button:hover, .btn.primary:hover { background: var(--slate-2); transform: translateY(-1px); }
button.btn-off, button.theme-btn, button.btn:not(.primary):not(.danger) { background: var(--surface); color: var(--text); }
button.link-btn { background: none; transform: none; } button.pw-eye { background: none; }
.btn { border-radius: 999px; font-weight: 600; color: var(--text); border-color: var(--border); transition: transform .15s var(--ease), border-color .2s; }
.btn:hover { transform: translateY(-1px); border-color: var(--faint); background: var(--surface); }
input, select { background: var(--surface-2); border-color: var(--border); border-radius: 12px; padding: 10px 12px; }
input:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox] { width: auto; display: inline-block; accent-color: var(--slate); }
.chip, .pill { border-radius: 999px; font-weight: 600; }
.tag { border-radius: 999px; font-size: 11.5px; letter-spacing: .02em; padding: 5px 11px; min-width: 112px; }
.tag.crit { background: var(--crit-bg); color: var(--crit-ink); border: 0; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.att-row { padding: 12px 20px; border-bottom-color: var(--border-2); transition: background .2s; }
.att-row.hot { background: transparent; }
.att-row:hover { background: var(--surface-2); }
.att-act .btn.small { background: var(--slate); color: var(--bg); border: 0; }
.att-act .btn.small.danger { background: var(--crit); color: #FFFFFF; }
.att-act .resolve-form button { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

/* tables */
.grid thead th { background: transparent; color: var(--muted); border-bottom: 1px solid var(--border); }
.grid tbody tr { transition: background .2s; }
.grid tbody tr:hover td, .grid tbody tr:hover th { background: var(--surface-2); }
.grid tr.filters td { background: transparent; }

/* chart: striped blue pill bars that grow from the bottom */
.chart .mark { fill: url(#stripes); }
.chart .mark.ok { fill: url(#stripes-ok); }

/* sign-in page */
body:has(main.login) { background: var(--bg); min-height: 100vh; }
main.login { min-height: 100vh; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; padding: 30px 28px 18px; border-radius: 24px; border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); }
.login-card .login-logo svg { width: 140px; height: auto; display: block; margin-bottom: 18px; }
.login-card h1 { font-size: 26px; }
.login-sub { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.login-card label { font-size: 13px; color: var(--text-2); }
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(calc(-50% + 2px)); min-height: 0; padding: 6px; color: var(--muted); border-radius: 50%; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); transform: translateY(calc(-50% + 2px)); }
.login-btn { width: 100%; min-height: 46px; margin-top: 8px; font-size: 15px; }
.login-foot { text-align: center; font-size: 12px; color: var(--faint); margin: 14px 0 0; }

/* TV board */
.board-head.brandbar { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: var(--shadow); }
.brandbar h1 { color: var(--text); } .brandbar h1 .clock { color: var(--muted); }
.brandbar p.muted { color: var(--muted); }
.brandbar .lg-blue { fill: var(--logo-1); } .brandbar .lg-grey { fill: var(--logo-2); }
.brandbar .theme-btn { border-color: var(--border); color: var(--text); } .brandbar .theme-btn:hover { background: var(--surface-2); }
.board-stats span { border: 0; border-radius: 16px; padding: 8px 16px; font-weight: 500; }
.board-stats span:nth-child(1) { background: var(--aqua); color: var(--aqua-ink); }
.board-stats span:nth-child(2) { background: var(--mint); color: var(--mint-ink); }
.board-stats span:nth-child(3) { background: var(--lav); color: var(--lav-ink); }
.board-stats .bs-wait { background: var(--peach); color: var(--peach-ink); }
.board-stats .bs-work { background: var(--surface); color: var(--text-2); }
.board-stats b, .board-stats .bs-wait b, .board-stats .bs-work b { color: inherit; }
.col { background: var(--surface); padding: 14px; }
.col-wait .col-head h2 { color: var(--crit-ink); } .col-work .col-head h2 { color: var(--accent-ink); } .col-done .col-head h2 { color: var(--good-ink); }
.bcard { border: 1px solid var(--border-2); border-left: 4px solid var(--border); border-radius: 14px; box-shadow: none; transition: transform .2s var(--ease), box-shadow .2s; }
.bcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.col-wait .bcard { border-left-color: var(--crit); } .col-work .bcard { border-left-color: var(--accent); } .col-done .bcard { border-left-color: var(--good); }
.bcard.late { background: color-mix(in srgb, var(--crit-bg) 45%, var(--surface)); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes slidein { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--crit) 30%, transparent); } }
@keyframes tick { 0% { transform: translateY(0); } 40% { transform: translateY(-3px); } 100% { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .anim-in { opacity: 0; animation: rise .55s var(--ease) forwards; animation-delay: var(--d, 0ms); }
  .chart .mark { transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; animation-delay: var(--d, 0ms); }
  .bcard.is-new { animation: slidein .45s var(--ease) both, glow 1.6s ease-out .45s 2; }
  .ticked { display: inline-block; animation: tick .4s var(--ease); }
}
.st-a { fill: var(--bar-2); } .st-b { fill: var(--bar-1); }
.st-oka { fill: color-mix(in srgb, var(--good) 45%, var(--surface)); } .st-okb { fill: var(--good); }
@media (max-width: 760px) { .hero h1 { font-size: 24px; } .kpi .big { font-size: 30px; } .login-card { padding: 22px 18px 14px; } }

/* Bounce loader in empty TV board columns (2026-11-18, "07 Bounce" by Ramin Nasibov), in the pastel palette:
   Waiting empty = mint tile (all calm), In process empty = lavender tile; slate ball and string, violet pins. */
.empty-calm { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 8px 16px; }
.empty-calm p { margin: 0; font-weight: 500; }
.bounce-tile { width: 150px; height: 150px; border-radius: 28px; display: grid; place-items: center; background: var(--lav); }
.col-wait .bounce-tile { background: var(--mint); }
.board.tv .bounce-tile { width: 220px; height: 220px; border-radius: 36px; }
.bounce { width: 78%; height: auto; display: block; overflow: visible; }
.bo-line { fill: none; stroke: var(--slate); stroke-width: 2.2; stroke-linecap: round; }
.bo-pin { fill: var(--accent); }
.bo-ball { fill: var(--slate); }
.bo-ghost { fill: var(--slate); } .bo-ghost.g1 { opacity: .22; } .bo-ghost.g2 { opacity: .1; }
.col-wait .bo-pin { fill: var(--good); }
