@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
  --accent: #2563eb; --accent-600: #1d4ed8; --accent-700: #1e40af; --accent-100: #e8effd; --accent-200: #c7d7fb; --accent-300: #93b4f8;
  --ink: #111c2e; --ink-2: #44516a; --muted: #5f6b84; --line: #e2e7ef; --line-2: #eef1f6;
  --bg: #f4f6fa; --surface: #ffffff; --chip: #eef1f6;
  --side: #0f1b30; --side-2: #1c2a44; --side-text: #aab6ca;
  --ok: #1f9d55; --ok-100: #e3f5ea; --ok-800: #166b3a;
  --warn: #d98a00; --warn-100: #fff3d6; --warn-800: #8a5a00;
  --danger: #d1242f; --danger-100: #fde4e6; --danger-800: #8f1720;
  --teal-100: #def3f5; --teal-800: #11626b;
  --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(17,28,46,.06), 0 4px 14px rgba(17,28,46,.06);
  --shadow-lg: 0 18px 50px rgba(17,28,46,.22);
  --font: 'Archivo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-700); text-decoration: none; } a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; } .stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 240px)), 1fr)); }
[hidden] { display: none !important; }

/* shell */
.app { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; z-index: 40; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; font-weight: 800; font-size: 17px; color: #fff; }
.brand i { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.nav { flex: 1; overflow-y: auto; padding: 0 14px; display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7b88a0; padding: 0 10px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--side-text); font-size: 14px; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: rgba(37,99,235,.22); color: #fff; }
.nav a .badge { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.me { margin: 14px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.06); display: flex; gap: 12px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-200); color: var(--accent-700); flex: none; }
.me .avatar { background: var(--accent-200); color: #172f6b; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px,3vw,32px); background: rgba(244,246,250,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; } .crumb { font-size: 12px; color: var(--muted); }
.content { padding: clamp(16px,3vw,32px); display: flex; flex-direction: column; gap: 24px; }
.menu-btn { display: none; }
.scrim { display: none; }
@media (max-width: 960px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,27,48,.45); z-index: 30; }
  .menu-btn { display: grid; }
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; display: inline-block; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .2s, transform .1s, border-color .2s; text-decoration: none; }
.btn:hover { background: var(--chip); color: var(--ink); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-600); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--danger-800); } .btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--chip); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: 14px var(--font); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-100); }
textarea.input { min-height: 90px; resize: vertical; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.input.dark { background: #1c2a44; border-color: #2c3b57; color: #eef1f6; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 40px; }
.search input { border: 0; outline: 0; background: transparent; font: 14px var(--font); width: 100%; color: var(--ink); }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 10px; background: var(--chip); flex-wrap: wrap; max-width: 100%; }
.seg button, .seg a, .seg label { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font: 600 13px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap; transition: all .2s; }
.seg .on, .seg input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(17,28,46,.18), 0 0 0 1px var(--line); color: var(--accent-700); }
.seg label { padding: 0; } .seg label span { display: block; padding: 7px 13px; border-radius: 8px; } .seg input { display: none; }
.field > label.switch { justify-content: flex-start; font-size: 14px; font-weight: 400; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; border-radius: 999px; background: #c6cedb; position: relative; transition: background .25s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.switch input:checked + i { background: var(--ok); } .switch input:checked + i::after { transform: translateX(18px); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips label { cursor: pointer; } .chips input { display: none; }
.chips span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; transition: all .2s; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* surfaces */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; }
.kpi { background: var(--surface); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: transform .25s, box-shadow .25s; }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(17,28,46,.1); }
.kpi .v { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi.accent { background: var(--accent); color: #fff; } .kpi.dark { background: var(--ink); color: #fff; }
.kpi .muted { color: inherit; opacity: .75; }
.dark-panel { background: var(--ink); color: #e3e8f0; border-radius: 20px; padding: 22px; }
.dark-panel .muted { color: #94a0b4; }
.tile { background: rgba(255,255,255,.07); border-radius: 12px; padding: 12px; }
.tile .k { font-size: 11px; color: #94a0b4; text-transform: uppercase; letter-spacing: .06em; }
.tile .v { font-size: 20px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 8px; background: var(--accent); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.flash { padding: 12px 16px; border-radius: 12px; background: var(--ok-100); color: var(--ok-800); font-size: 14px; animation: fadeUp .4s ease both; }
.flash.err { background: var(--danger-100); color: var(--danger-800); }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.click { cursor: pointer; } .table tbody tr:hover { background: #f7f9fc; }
.table tr.sel td { background: var(--accent-100); } .table tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.pill.READY, .pill.accent { background: var(--accent-100); color: var(--accent-700); }
.pill.INCALL, .pill.ok { background: var(--ok-100); color: var(--ok-800); }
.pill.PAUSED, .pill.warn { background: var(--warn-100); color: var(--warn-800); }
.pill.DEAD { background: var(--ink); color: #fff; } .pill.DISPO { background: var(--accent-200); color: #172f6b; }
.pill.QUEUE { background: var(--teal-100); color: var(--teal-800); } .pill.THREEWAY, .pill\33-WAY { background: var(--teal-100); color: var(--teal-800); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ok); } .dot.off { background: #c6cedb; }

/* realtime row tints */
tr.rt-w1 td { background: #eef3fe; } tr.rt-w2 td { background: #dbe6fd; } tr.rt-w3 td { background: #bfd3fb; }
tr.rt-c1 td { background: #eef9f2; } tr.rt-c2 td { background: #d9f1e2; } tr.rt-c3 td { background: #bfe6cd; }
tr.rt-p1 td { background: #fff8e6; } tr.rt-p2 td { background: #ffeec2; } tr.rt-p3 td { background: #ffe09a; }
tr.rt-t1 td { background: #e3f4f6; } tr.rt-dead td { background: var(--danger-100); }
tr[class^="rt-"] td:first-child { box-shadow: inset 4px 0 0 var(--bar, transparent); }

/* overlays */
.modal-back { position: fixed; inset: 0; background: rgba(15,27,48,.5); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .2s ease both; }
.modal { width: min(var(--w, 560px), 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; animation: pop .3s ease both; }
.modal h3 { font-size: 21px; }
.drawer-back { position: fixed; inset: 0; background: rgba(15,27,48,.35); z-index: 50; animation: fade .2s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 51; box-shadow: var(--shadow-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; animation: slideIn .3s cubic-bezier(.2,.8,.2,1) both; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 2px solid transparent; background: var(--chip); border-radius: 12px; padding: 12px 14px; font: inherit; cursor: pointer; color: var(--ink); transition: all .2s; }
.option:hover { background: var(--accent-100); } .option.on { border-color: var(--accent); background: var(--accent-100); }
.option:disabled { opacity: .4; pointer-events: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; z-index: 90; animation: pop .3s ease both; max-width: calc(100% - 32px); }
.toast.err { background: var(--danger); }

/* agent console */
.console { position: relative; overflow: hidden; background: var(--ink); color: #e3e8f0; border-radius: 24px; box-shadow: var(--shadow-lg); }
.console::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 85% -20%, rgba(37,99,235,var(--glow,0)), transparent 55%); transition: all .8s; }
.stages { position: relative; display: flex; padding: 18px clamp(16px,3vw,28px) 0; overflow-x: auto; }
.stage { display: flex; align-items: center; gap: 10px; flex: 1 0 auto; min-width: 110px; }
.stage b { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; background: rgba(255,255,255,.1); color: #fff; transition: all .4s; }
.stage span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #7b88a0; white-space: nowrap; }
.stage em { flex: 1; height: 2px; min-width: 16px; margin-right: 10px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.stage em::after { content: ''; display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }
.stage.done b, .stage.cur b { background: var(--accent); } .stage.done span, .stage.cur span { color: #fff; } .stage.done em::after { width: 100%; }
.stage.cur b { box-shadow: 0 0 0 4px rgba(37,99,235,.35); }
.console-body { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; padding: clamp(18px,3vw,28px); align-items: center; }
.cust-av { width: 72px; height: 72px; border-radius: 22px; flex: none; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: rgba(255,255,255,.1); color: #fff; transition: background .5s; }
.timer { font-size: clamp(44px,5vw,60px); font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 44px; }
.wave i { width: 3px; height: 44px; border-radius: 3px; background: #44516a; transform: scaleY(.12); transform-origin: center; }
.wave.live i { background: #cbd3df; animation: wave .9s ease-in-out infinite; } .wave.live i:nth-child(6n) { background: var(--accent); }
.round-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.round { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.round i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; transition: all .25s; }
.round:hover i { transform: scale(1.08); } .round.on i { background: #fff; color: var(--ink); }
.round span { font-size: 11px; color: #94a0b4; } .round:disabled { opacity: .35; pointer-events: none; }
.big-btn { border: 0; border-radius: 14px; min-height: 48px; padding: 0 22px; font: 700 15px var(--font); cursor: pointer; color: #fff; background: rgba(255,255,255,.14); white-space: nowrap; transition: all .25s; display: inline-flex; align-items: center; gap: 8px; }
.big-btn.red { background: var(--accent); } .big-btn:disabled { opacity: .35; pointer-events: none; }
.hotbar { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px clamp(16px,3vw,28px); border-top: 1px solid rgba(255,255,255,.08); }
.rec-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fff; background: var(--danger); padding: 2px 9px; border-radius: 999px; }
.rec-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.dispo-bar { position: relative; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 28px; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
.hotbar button { flex: none; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.12); background: transparent; color: #e3e8f0; border-radius: 10px; padding: 6px 10px; font: 12px var(--font); cursor: pointer; }
.hotbar button:hover { background: rgba(255,255,255,.08); } .hotbar kbd { font: 11px var(--font); min-width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { border: 0; background: var(--chip); border-radius: 12px; height: 50px; cursor: pointer; font: 700 18px var(--font); color: var(--ink); transition: background .15s, transform .1s; }
.keypad button:hover { background: var(--accent-100); } .keypad button:active { transform: scale(.94); }
.timeline { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: start; }
.timeline .tdot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--accent); }
.script-steps { display: flex; gap: 6px; } .script-steps button { flex: 1; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; font: 12px var(--font); color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.script-steps button::before { content: ''; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; } .script-steps button.on::before { background: var(--accent); } .script-steps button.cur { color: var(--ink); }
.script-text { font-size: 20px; line-height: 1.55; } .script-text mark { background: var(--accent-100); color: var(--accent-700); padding: 0 4px; border-radius: 4px; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line-2); }
.tabs button { border: 0; background: transparent; font: 14px var(--font); padding: 8px 16px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.tabs button.on { background: var(--accent-100); color: var(--accent-700); }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.lead-grid .input { background: var(--bg); border-color: transparent; } .lead-grid .wide { grid-column: span 2; }

/* login */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-hero { flex: 1 1 420px; background: var(--side); color: #cbd3df; padding: clamp(28px,5vw,64px); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.login-hero h1 { font-size: clamp(34px,5vw,58px); line-height: 1.02; letter-spacing: -.025em; color: #fff; max-width: 520px; }
.login-form { flex: 1 1 420px; display: grid; place-items: center; padding: clamp(24px,5vw,64px); background: #fff; }
.login-form form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; animation: pop .6s .1s ease both; }

/* dial level */
.dl-num { font-size: clamp(48px,6vw,68px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #fff; text-align: center; font-variant-numeric: tabular-nums; }
.dl-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; font: 700 26px var(--font); cursor: pointer; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.1); color: #fff; transition: transform .1s; }
.dl-btn.plus { background: var(--accent); } .dl-btn:active { transform: scale(.92); } .dl-btn:disabled { opacity: .35; }
.mini-seg { display: flex; gap: 4px; flex-wrap: wrap; } .mini-seg button { border: 0; font: 700 12px var(--font); padding: 6px 11px; border-radius: 8px; cursor: pointer; background: rgba(255,255,255,.08); color: #cbd3df; }
.mini-seg button.on { background: #fff; color: var(--ink); }
.meter { position: relative; height: 10px; border-radius: 10px; background: rgba(255,255,255,.08); }
.meter > i { display: block; height: 100%; border-radius: 10px; transition: width .4s ease, background .3s; }
.meter::after { content: ''; position: absolute; top: -4px; bottom: -4px; left: 30%; width: 2px; background: #fff; opacity: .7; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } [data-reveal] { opacity: 1; transform: none; } }

/* wallboard */
.rt-count { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font: inherit; text-align: left; }
.rt-count .num { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
button.rt-count { cursor: pointer; transition: box-shadow .2s; } button.rt-count:hover { box-shadow: 0 0 0 2px var(--line), var(--shadow); }
.rt-count.on { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.rt-count.a { background: var(--accent-100); } .rt-count.d { background: var(--danger-100); }
.rt-counts { grid-template-columns: repeat(6, 1fr); } @media (max-width: 900px) { .rt-counts { grid-template-columns: repeat(2, 1fr); } }
.rt-kpi { padding: 14px 16px; gap: 3px; } .rt-kpi .v { font-size: 26px; } .rt-kpi:hover { transform: none; box-shadow: var(--shadow); }
.rt-alert { display: flex; gap: 10px; padding: 9px 14px; border-radius: 10px; font-size: 13px; background: var(--warn-100); color: var(--warn-800); }
.rt-alert.crit { background: var(--danger-100); color: var(--danger-800); }
.rt-demo { background: var(--chip); color: var(--ink-2); font-size: 13px; padding: 9px 14px; }
.rt-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.rt-link { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; } .rt-link:hover strong { color: var(--accent-700); }
.rt-chart { display: flex; gap: 8px; height: 210px; }
.rt-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; color: var(--muted); padding-bottom: 20px; margin-top: -6px; font-variant-numeric: tabular-nums; }
.rt-plot { position: relative; flex: 1; min-width: 0; }
.rt-grid { position: absolute; inset: 0 0 20px; display: flex; flex-direction: column; justify-content: space-between; } .rt-grid i { display: block; height: 1px; background: var(--line-2); }
.rt-bars { position: absolute; inset: 0; display: flex; gap: 4px; }
.rt-col { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 4px; outline-offset: 0; }
.rt-col:hover { background: rgba(17,28,46,.04); }
.rt-col > span { height: 20px; line-height: 20px; text-align: center; white-space: nowrap; }
.rt-stack { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; min-height: 0; }
.rt-stack i { display: block; width: min(100%, 22px); } .rt-stack i:first-child { border-radius: 4px 4px 0 0; } .rt-stack i[style*="height:0%"] { display: none; }
.rt-stack i[style*="height:0%"] + i { border-radius: 4px 4px 0 0; }
.rt-states { display: flex; gap: 2px; height: 26px; border-radius: 6px; overflow: hidden; }
.rt-tip { position: fixed; z-index: 95; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.5; white-space: pre-line; pointer-events: none; box-shadow: var(--shadow-lg); }
.rt-agent-table th, .rt-agent-table td { padding-left: 8px; padding-right: 8px; }
.rt-rate { text-align: right; } .rt-rate-v { font-size: 13px; } .rt-rate-v strong { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.rt-pipe { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rt-stage { position: relative; flex: 1 1 130px; display: flex; flex-direction: column; gap: 1px; padding: 12px 22px; background: var(--surface); }
.rt-stage + .rt-stage { border-left: 1px solid var(--line); }
.rt-stage:not(:last-child)::after { content: ''; position: absolute; right: -6px; top: 50%; width: 10px; height: 10px; background: inherit; border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.rt-stage-l { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rt-stage-v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.rt-stage.hot { background: var(--danger-100); } .rt-stage.hot .rt-stage-v { color: var(--danger-800); }
.rt-stage.live { background: var(--ok-100); } .rt-stage.live .rt-stage-v { color: var(--ok-800); }
.rt-advice { margin-top: 12px; padding: 9px 12px; border-radius: 6px; font-size: 13px; background: var(--chip); color: var(--ink-2); }
.rt-advice.up { background: var(--ok-100); color: var(--ok-800); } .rt-advice.down { background: var(--warn-100); color: var(--warn-800); }
.rt-adv { white-space: normal !important; min-width: 150px; font-size: 12px; color: var(--ink-2); } .rt-adv.up { color: var(--ok-800); } .rt-adv.down { color: var(--warn-800); }
.rt-delta { font-size: 11px; font-weight: 600; color: var(--muted); } .rt-delta.good { color: var(--ok-800); } .rt-delta.bad { color: var(--danger-800); }
select.input.rt-level { width: 92px; min-height: 32px; padding: 3px 8px; font-size: 13px; }
.rt-dl-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rt-manage { color: var(--accent-700); margin-left: auto; }
/* calmer, flatter look for the wallboard */
body[data-page="realtime"] .card, body[data-page="realtime"] .kpi { border-radius: 8px; box-shadow: none; border: 1px solid var(--line); }
body[data-page="realtime"] .dark-panel { border-radius: 8px; }
body[data-page="realtime"] .tile { border-radius: 6px; }
body[data-page="realtime"] .btn { border-radius: 6px; }
body[data-page="realtime"] .input, body[data-page="realtime"] .search, body[data-page="realtime"] .seg { border-radius: 6px; }
body[data-page="realtime"] .seg button { border-radius: 4px; }
body[data-page="realtime"] .pill { border-radius: 4px; }
body[data-page="realtime"] .kpi .v { font-weight: 700; }
body[data-page="realtime"] .rt-alert, body[data-page="realtime"] .flash { border-radius: 6px; }
body[data-page="realtime"] .rt-count { border-radius: 8px; box-shadow: none; border: 1px solid var(--line); }
body[data-page="realtime"] .rt-count.on { box-shadow: 0 0 0 1px var(--accent); border-color: var(--accent); }
body[data-page="realtime"] .rt-count .num { font-size: 24px; font-weight: 700; }
body[data-page="realtime"] .table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
body[data-page="realtime"] .drawer { border-radius: 0; }
/* agent rows keep the colour bar and only tint when something needs attention */
body[data-page="realtime"] [data-rt-agents] tr[class^="rt-"] td { background: var(--surface); }
body[data-page="realtime"] [data-rt-agents] tr.rt-p3 td { background: #fff8e6; }
body[data-page="realtime"] [data-rt-agents] tr.rt-dead td { background: var(--danger-100); }
.xfer-line, .live-lines { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 28px; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
.xfer-head, .xfer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.xfer-head { gap: 8px 18px; }
.xfer-title { color: var(--accent-300); }
.xfer-stat { color: #aab6ca; } .xfer-stat strong { color: #fff; }
.xfer-chan { min-width: 0; overflow-wrap: anywhere; }
.xfer-gap { flex: 1 1 auto; }
.xfer-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #cbd3df; cursor: pointer; white-space: nowrap; }
.xfer-line .input { width: auto; min-height: 32px; padding: 3px 10px; font-size: 13px; background: var(--side-2); border-color: #2c3b57; color: #fff; }
.xfer-line .input::placeholder { color: #94a0b4; }
.xfer-line select.input { max-width: 240px; }
.xfer-line .btn.sm:not(.primary), .live-lines .btn.sm:not(.primary) { background: rgba(255,255,255,.08); border-color: transparent; color: #fff; }
.xfer-line .btn.sm.danger, .live-lines .btn.sm.danger { background: var(--danger); color: #fff; }
.xfer-d { min-width: 34px; justify-content: center; }
.live-lines .table td { color: #e3e8f0; border-color: rgba(255,255,255,.08); padding: 6px 8px; }
.live-lines .table tbody tr:hover { background: transparent; }
.camp-table th, .camp-table td { padding-left: 6px; padding-right: 6px; } .camp-table th { letter-spacing: .04em; }
.live-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-radius: 10px; background: var(--ok-100); color: var(--ok-800); font-weight: 600; }
.live-now .muted { font-weight: 400; }
.rt-tv-only { display: none; }
body.rt-tv .side, body.rt-tv .topbar, body.rt-tv .rt-no-tv { display: none !important; }
body.rt-tv .rt-tv-only { display: inline-flex; }
body.rt-tv .content { gap: 14px; padding: 16px; }
body[data-page="realtime"].rt-tv .rt-count .num { font-size: 40px; } body.rt-tv .rt-kpi .v { font-size: 34px; } body.rt-tv .table { font-size: 15px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.55); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes wave { 0%,100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
@keyframes draw { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
