/* EziQueue QMS — staff application styles */
:root {
  --navy-950: #0F172C;
  --navy-900: #152039;
  --navy-800: #1B2847;
  --navy-700: #263763;
  --navy-600: #33477A;
  --blue-700: #18508F;
  --blue-600: #1F62B5;
  --blue-500: #2E74C9;
  --blue-100: #DCE8F6;
  --blue-50: #EEF4FB;
  --accent: #D9472B;
  --green-700: #17633E;
  --green-600: #1E7F4F;
  --green-50: #E8F4EE;
  --amber-700: #8A5A0E;
  --amber-600: #B7791F;
  --amber-50: #FBF3E4;
  --red-700: #9E2E20;
  --red-600: #C23B2A;
  --red-50: #FBECEA;
  --violet-600: #5B4B8A;
  --violet-50: #EFECF6;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --line: #DFE3EA;
  --line-2: #ECEFF3;
  --text: #18202F;
  --text-2: #475165;
  --text-3: #778095;
  --radius: 6px;
  --font: 'Roboto', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: 0; }
.num, .tnum, table td, .kpi-v { font-variant-numeric: tabular-nums; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--navy-900);
  color: #C9D2E3;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 9px; border-radius: 4px;
  background: #fff; color: var(--navy-800);
  font-weight: 700; font-size: 15px; letter-spacing: .5px; position: relative;
}
.mark::after { content: ''; position: absolute; top: 7px; right: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.side-brand .t1 { color: #fff; font-weight: 500; font-size: 14px; line-height: 1.2; }
.side-brand .t2 { font-size: 11.5px; color: #8E9AB3; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: #6F7C98; padding: 0 10px 6px; font-weight: 500; }
.nav-a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: 4px; color: #C3CCDE; font-size: 13.5px;
}
.nav-a:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.nav-a.on { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--blue-500); }
.nav-a .ic { opacity: .85; }
.nav-a .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); padding: 1px 6px; border-radius: 9px; color: #E3E8F2; }
.side-foot { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #6F7C98; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 58px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.top h1 { font-size: 17px; }
.top .crumb { font-size: 12px; color: var(--text-3); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.clock { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.clock b { font-weight: 500; color: var(--text); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 3px rgba(30,127,79,.15); }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--blue-100); color: var(--blue-700);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: 12.5px;
}
.user-chip .n { font-size: 13px; font-weight: 500; line-height: 1.2; }
.user-chip .r { font-size: 11.5px; color: var(--text-3); }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 4px; color: var(--text-3); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.content { padding: 22px 24px 40px; }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h2 { font-size: 20px; }
.ph p { margin: 3px 0 0; color: var(--text-3); font-size: 13px; }
.ph .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); min-height: 50px; }
.card-h h3 { font-size: 14.5px; }
.card-h .sub { font-size: 12px; color: var(--text-3); }
.card-h .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px; }
.card-f { padding: 12px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 360px; }
.g-side-l { grid-template-columns: 380px minmax(0, 1fr); }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.kpi { padding: 14px 16px 15px; border-right: 1px solid var(--line-2); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi-l { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi-v { font-size: 26px; font-weight: 500; margin-top: 4px; line-height: 1.15; }
.kpi-v small { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.kpi-s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi-s .up { color: var(--green-600); }
.kpi-s .warn { color: var(--amber-600); }

/* ---------- stage strip ---------- */
.stage-card { padding: 14px 16px; }
.stage-top { display: flex; align-items: center; gap: 10px; }
.stage-code { font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--blue-700); background: var(--blue-50); border-radius: 3px; padding: 3px 6px; }
.stage-top h4 { font-size: 14px; }
.stage-top .open { margin-left: auto; font-size: 12px; color: var(--text-3); }
.stage-nums { display: flex; gap: 22px; margin-top: 12px; }
.stage-nums div { font-size: 12px; color: var(--text-3); }
.stage-nums b { display: block; font-size: 22px; font-weight: 500; color: var(--text); line-height: 1.2; }
.stage-nums b.alert { color: var(--red-600); }
.next-tokens { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 12px; min-height: 24px; }
.tok-chip { font-size: 12px; font-weight: 500; padding: 2px 7px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-3); padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFD; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tfoot td { font-weight: 500; background: var(--surface-2); border-top: 1px solid var(--line); }
.tbl-compact td { padding: 7px 12px; }
.tbl-compact th { padding: 7px 12px; }
.token { font-weight: 700; letter-spacing: .3px; font-size: 14px; color: var(--navy-800); }
.svc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.row-link { color: inherit; }
.row-link:hover { color: var(--blue-600); text-decoration: none; }
.empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 7px; border-radius: 3px; white-space: nowrap; line-height: 1.5; }
.b-wait { background: var(--blue-50); color: var(--blue-700); }
.b-serve { background: var(--green-50); color: var(--green-700); }
.b-done { background: #EEF0F3; color: #4F596C; }
.b-hold { background: var(--amber-50); color: var(--amber-700); }
.b-noshow { background: var(--red-50); color: var(--red-700); }
.b-transfer { background: var(--violet-50); color: var(--violet-600); }
.b-muted { background: #F0F1F4; color: #7A8396; }
.b-prio { background: var(--red-600); color: #fff; }
.b-premium { background: #8A6D1F; color: #fff; }
.b-appt { background: var(--blue-600); color: #fff; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #B4BBC8; }
.state.open::before { background: var(--green-600); }
.state.break::before { background: var(--amber-600); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 4px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: #C9D0DB; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn-dark { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-dark:hover { background: var(--navy-900); border-color: var(--navy-900); }
.btn-green { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn-green:hover { background: var(--green-700); border-color: var(--green-700); }
.btn-danger { color: var(--red-600); }
.btn-danger:hover { background: var(--red-50); border-color: #EBC4BE; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 4px 4px 0; }
.btn-group .btn.on { background: var(--navy-800); border-color: var(--navy-800); color: #fff; z-index: 1; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, select.input, textarea.input {
  height: 36px; padding: 0 10px; border: 1px solid #CDD3DD; border-radius: 4px; background: #fff;
  font: 14px var(--font); color: var(--text); width: 100%;
}
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,116,201,.15); }
.input-sm { height: 32px; font-size: 13px; }
.input[dir=rtl] { font-family: 'Noto Sans Arabic', var(--font); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; margin: 4px 16px 4px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--blue-600); margin: 0; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .input { width: auto; min-width: 140px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-box .input { padding-left: 32px; }
.color-input { width: 44px; height: 36px; padding: 2px; border: 1px solid #CDD3DD; border-radius: 4px; background: #fff; }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid; }
.alert-success { background: var(--green-50); border-color: #BFDCCB; color: var(--green-700); }
.alert-error { background: var(--red-50); border-color: #EBC4BE; color: var(--red-700); }
.alert-info { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.alert .ic { margin-top: 1px; }

/* ---------- pagination ---------- */
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 12.5px; color: var(--text-3); }
.pager a, .pager span.cur { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; color: var(--text-2); background: #fff; padding: 0 8px; }
.pager span.cur { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.pager a:hover { text-decoration: none; background: var(--surface-2); }

/* ---------- misc ---------- */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; font-size: 13.5px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--navy-800); border-color: var(--blue-600); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.code { font-family: Consolas, 'Roboto Mono', monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; }
pre.code { display: block; padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 0; }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--blue-600); border-radius: 3px; }
.bar.warn i { background: var(--amber-600); }
.bar.bad i { background: var(--red-600); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font: 11px var(--font); fill: var(--text-3); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--blue-600); }
.timeline li::after { content: ''; position: absolute; left: 11px; top: 19px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { font-size: 12px; color: var(--text-3); }
.timeline .h { font-weight: 500; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,44,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 9vh; z-index: 100; }
.modal { background: #fff; border-radius: 8px; width: 520px; max-width: calc(100vw - 32px); box-shadow: 0 20px 50px rgba(15,23,44,.25); }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 16px; }
.modal-h .icon-btn { margin-left: auto; }
.modal-b { padding: 18px 20px 6px; }
.modal-f { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 8px 8px; }
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 5px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(15,23,44,.25); max-width: 380px; animation: toastIn .18s ease-out; }
.toast.err { background: var(--red-700); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
.login-l { background: var(--navy-900); color: #C9D2E3; padding: 44px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-l::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.login-l > * { position: relative; z-index: 1; }
.login-l .brand { display: flex; align-items: center; gap: 12px; }
.login-l .brand .t1 { color: #fff; font-size: 15px; font-weight: 500; }
.login-l .brand .t2 { font-size: 12px; color: #8E9AB3; }
.login-hero { margin-top: auto; max-width: 520px; }
.login-hero h1 { color: #fff; font-size: 30px; font-weight: 400; line-height: 1.25; }
.login-hero p { font-size: 14.5px; color: #9FABC3; margin: 14px 0 0; max-width: 460px; }
.flow { display: flex; margin: 34px 0 0; }
.flow div { flex: 1; padding: 12px 12px 12px 14px; font-size: 12px; color: #fff; position: relative; }
.flow div b { display: block; font-size: 11px; color: rgba(255,255,255,.6); font-weight: 400; margin-bottom: 2px; }
.flow div:nth-child(1) { background: #22325A; }
.flow div:nth-child(2) { background: #1F62B5; }
.flow div:nth-child(3) { background: #2A7DB8; }
.flow div:nth-child(4) { background: #1C5577; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 34px; }
.screens a { border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 12px 14px; color: #E2E7F1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.screens a:hover { background: rgba(255,255,255,.05); text-decoration: none; }
.screens a span { font-size: 11.5px; color: #8E9AB3; }
.login-foot { margin-top: 40px; font-size: 12px; color: #6F7C98; display: flex; justify-content: space-between; }
.login-r { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-box { width: 360px; max-width: 100%; }
.login-box h2 { font-size: 22px; }
.login-box > p { color: var(--text-3); margin: 6px 0 26px; }
.login-box .input { height: 42px; }
.login-box .btn { height: 42px; margin-top: 6px; }
.demo-creds { margin-top: 26px; border: 1px dashed #C9D0DB; border-radius: 5px; padding: 12px 14px; font-size: 12.5px; }
.demo-creds h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin-bottom: 8px; }
.demo-creds table { width: 100%; border-collapse: collapse; }
.demo-creds td { padding: 3px 0; }
.demo-creds button { background: none; border: 0; color: var(--blue-600); font: 500 12.5px var(--font); cursor: pointer; padding: 0; }

/* ---------- counter workstation ---------- */
.cw { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.cw-top { height: 60px; background: var(--navy-900); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.cw-top .ctr { display: flex; flex-direction: column; line-height: 1.2; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.12); }
.cw-top .ctr b { font-size: 16px; font-weight: 500; }
.cw-top .ctr span { font-size: 12px; color: #9FABC3; }
.cw-top .seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 4px; padding: 3px; }
.cw-top .seg button { background: none; border: 0; color: #C9D2E3; font: 500 12.5px var(--font); padding: 6px 12px; border-radius: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cw-top .seg button.on { background: #fff; color: var(--navy-900); }
.cw-top .seg button.on.brk { background: #F2C46B; color: #3D2A05; }
.cw-top .r { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: #C9D2E3; }
.cw-top .r .btn { height: 32px; background: transparent; border-color: rgba(255,255,255,.2); color: #fff; }
.cw-top .r .btn:hover { background: rgba(255,255,255,.08); }
.cw-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; padding: 16px; }
.serving { display: flex; flex-direction: column; }
.serving .card-b { flex: 1; display: flex; flex-direction: column; }
.now { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 8px 4px 20px; border-bottom: 1px solid var(--line-2); }
.now-token { font-size: 84px; font-weight: 700; color: var(--navy-800); line-height: 1; letter-spacing: 1px; }
.now-meta h3 { font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.now-meta .sub { color: var(--text-3); margin-top: 6px; font-size: 13.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.timer { display: flex; gap: 26px; padding: 16px 4px; border-bottom: 1px solid var(--line-2); }
.timer div { font-size: 12px; color: var(--text-3); }
.timer b { display: block; font-size: 22px; font-weight: 500; color: var(--text); margin-top: 2px; }
.timer b.over { color: var(--red-600); }
.journey { display: flex; align-items: center; gap: 0; padding: 16px 4px; }
.journey .st { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.journey .st i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; background: #fff; }
.journey .st.done i { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.journey .st.cur { color: var(--text); font-weight: 500; }
.journey .st.cur i { border-color: var(--blue-600); color: var(--blue-600); }
.journey .ln { flex: 1; height: 2px; background: var(--line); margin: 0 12px; min-width: 24px; max-width: 90px; }
.checklist { padding: 14px 4px 4px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.checklist .lbl { width: 100%; margin-bottom: 6px; }
.checklist .check { margin-right: 22px; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: auto; padding-top: 16px; }
.act {
  height: 64px; border: 1px solid var(--line); background: #fff; border-radius: 5px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: 500 13.5px var(--font); color: var(--text); position: relative;
}
.act:hover { background: var(--surface-2); border-color: #C3CAD6; }
.act:disabled { opacity: .45; cursor: not-allowed; }
.act kbd { position: absolute; top: 5px; right: 7px; font: 500 10px var(--font); color: var(--text-3); }
.act.primary { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.act.primary:hover { background: var(--green-700); }
.act.primary kbd { color: rgba(255,255,255,.7); }
.act.warn { color: var(--red-600); }
.complete-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; }
.complete-row .act { height: 56px; flex-direction: row; gap: 10px; font-size: 15px; }
.idle { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.idle h3 { font-size: 18px; margin-top: 10px; }
.idle p { color: var(--text-3); margin: 6px 0 22px; }
.call-btn { height: 88px; min-width: 320px; font-size: 22px; border-radius: 6px; background: var(--blue-600); color: #fff; border: 0; cursor: pointer; font-family: var(--font); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.call-btn:hover { background: var(--blue-700); }
.call-btn:disabled { background: #AEB8C8; cursor: not-allowed; }
.call-btn kbd { font: 500 12px var(--font); opacity: .75; border: 1px solid rgba(255,255,255,.4); border-radius: 3px; padding: 1px 5px; }
.next-preview { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.next-preview b { color: var(--text); }
.qlist { max-height: calc(100vh - 290px); overflow-y: auto; }
.qitem { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.qitem:hover { background: var(--surface-2); }
.qitem .tk { font-weight: 700; color: var(--navy-800); }
.qitem .sv { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .wt { font-size: 12px; color: var(--text-3); }
.qitem .wt.long { color: var(--red-600); }
.qitem .btn { visibility: hidden; }
.qitem:hover .btn { visibility: visible; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.mini-stats div { padding: 12px 14px; border-right: 1px solid var(--line-2); font-size: 11.5px; color: var(--text-3); }
.mini-stats div:last-child { border-right: 0; }
.mini-stats b { display: block; white-space: nowrap; font-size: 17px; font-weight: 500; color: var(--text); margin-top: 2px; }
.ctr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ctr-pick { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 14px 16px; text-align: left; cursor: pointer; font-family: var(--font); width: 100%; }
.ctr-pick:hover { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,116,201,.12); }
.ctr-pick b { display: block; font-size: 15px; font-weight: 500; color: var(--text); }
.ctr-pick span { font-size: 12.5px; color: var(--text-3); }
.ctr-pick.busy { background: var(--surface-2); }

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); }
  .g-side { grid-template-columns: 1fr; }
  .cw-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-l { display: none; }
  .actions { grid-template-columns: repeat(2, 1fr); }
  .now { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .no-print { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}
