/* Predictive dialer: shared styles for login, management and agent console. */
:root {
  --bg: #f3f4f1;
  --panel: #ffffff;
  --ink: #16191d;
  --ink-2: #4a5058;
  --ink-3: #7b828b;
  --line: #e1e3de;
  --line-2: #cfd2cb;
  --side: #15191e;
  --side-ink: #c9cdd2;
  --accent: #1f7a5a;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1eb;
  --ready: #1f7a5a;
  --call: #2758c4;
  --wrap: #b86e00;
  --pause: #6b7280;
  --alert: #c0362c;
  --alert-soft: #fbe9e7;
  --warn-soft: #fdf3e1;
  --info-soft: #e8eefb;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 8px; }
a { color: var(--call); }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px 16px; }

/* ---------------- buttons & inputs */
.btn { appearance: none; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 7px 13px;
  font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: #f6f7f5; border-color: #b9bdb5; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #18654a; border-color: #18654a; }
.btn-danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn-danger:hover { background: #a42c23; border-color: #a42c23; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 15px; font-weight: 600; border-radius: 8px; }
.icon-btn { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 2px 6px; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; font: 14px var(--sans); color: var(--ink); background: #fff; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.check { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------------- layout: management */
.app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 16px 10px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 18px; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; flex: none; background: url(/brand/mark.svg) center / contain no-repeat; }
.brand-iq { color: #2bb083; }
.brand .tm { font-size: .55em; font-weight: 500; opacity: .7; margin-left: 1px; vertical-align: super; line-height: 0; }
/* ---------------- footer (copyright and trademark line) */
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.main-col > .main { flex: 1 1 auto; }
.site-foot { padding: 12px 28px 14px; font-size: 12px; color: var(--ink-3); text-align: center; border-top: 1px solid var(--line); }
body.wallboard .site-foot { display: none; }
@media (max-width: 900px) { .main-col { min-height: 0; } }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
.nav > * { flex-shrink: 0; }
.nav button { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--side-ink); display: flex; justify-content: space-between; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 6px; }
.side-foot { flex-shrink: 0; margin-top: auto; padding: 10px 8px 0; font-size: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .btn { margin-top: 8px; width: 100%; background: transparent; color: var(--side-ink); border-color: rgba(255,255,255,.18); }
.main { padding: 22px 28px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px 18px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.kpi-value { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.kpi-sub { font-size: 12px; color: var(--ink-3); }
.kpi.alert { border-color: #f0b8b2; background: var(--alert-soft); }
.kpi.warn { border-color: #f0d49c; background: var(--warn-soft); }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafaf8; white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; } .tbl tr.clickable:hover td { background: #f8f9f6; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.empty { text-align: center; color: var(--ink-3); padding: 28px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; white-space: nowrap; background: #eef0ec; color: var(--ink-2); }
.badge-ok, .badge-ready, .badge-active { background: var(--accent-soft); color: var(--ready); }
.badge-call, .badge-on_call, .badge-manual_dial { background: var(--info-soft); color: var(--call); }
.badge-wrap, .badge-wrap_up, .badge-warn, .badge-paused { background: var(--warn-soft); color: var(--wrap); }
.badge-alert, .badge-dnc, .badge-blocked { background: var(--alert-soft); color: var(--alert); }
.badge-connecting { background: #eef0ec; color: var(--ink-2); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { all: unset; cursor: pointer; padding: 8px 14px; font-size: 13.5px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--ink); border-color: var(--accent); font-weight: 600; }

.meter { height: 8px; border-radius: 4px; background: #e9ebe6; overflow: hidden; position: relative; }
.meter > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }
.meter.warn > span { background: var(--wrap); } .meter.alert > span { background: var(--alert); }
.meter .tick { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }

.notice { border-radius: var(--radius); padding: 11px 14px; font-size: 13px; border: 1px solid; }
.notice-info { background: var(--info-soft); border-color: #c7d4f3; }
.notice-warn { background: var(--warn-soft); border-color: #f0d49c; }
.notice-alert { background: var(--alert-soft); border-color: #f0b8b2; }
.notice-ok { background: var(--accent-soft); border-color: #b7dccb; }
.screener-banner { border-radius: var(--radius); padding: 14px 16px; border: 2px solid #c98a12; background: var(--warn-soft); }
.screener-title { font-weight: 700; font-size: 16px; }
.screener-sub { font-size: 13px; margin-top: 4px; }
.screener-heard { font-size: 12px; margin-top: 6px; opacity: 0.8; font-style: italic; overflow-wrap: anywhere; }

.alerts-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.alerts-list li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.alerts-list li:last-child { border-bottom: 0; }

.lock { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); background: #eef0ec; padding: 2px 8px; border-radius: 4px; }
.lock::before { content: ""; width: 8px; height: 7px; border: 1.5px solid currentColor; border-radius: 1px; margin-top: 3px; box-shadow: 0 -4px 0 -1.5px transparent; }

/* ---------------- modal & toasts */
.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 22, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 10px; width: min(640px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--side); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast-err { background: var(--alert); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------------- login */
.login-wrap { min-height: calc(100vh - 44px); display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); }
.login-card .brand { color: var(--ink); padding: 0 0 18px; font-size: 18px; }

/* ---------------- agent console */
.agent-app { display: grid; grid-template-rows: auto 1fr; min-height: calc(100vh - 44px); }
.agent-bar { background: var(--side); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 18px; flex-wrap: wrap; }
.agent-bar .brand { padding: 0; }
.state-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; background: rgba(255,255,255,.1); text-transform: capitalize; }
.state-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pause); }
.state-pill.s-ready::before { background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62, 207, 142, .25); }
.state-pill.s-on_call::before, .state-pill.s-manual_dial::before { background: #6c9bff; }
.state-pill.s-wrap_up::before { background: #f5a524; }
.state-pill.s-connecting::before { background: #d1d5db; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.agent-bar .stat { font-size: 12px; color: var(--side-ink); } .agent-bar .stat b { color: #fff; font-variant-numeric: tabular-nums; margin-left: 4px; }
.agent-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px 18px; align-items: start; }
.agent-col > * + * { margin-top: 16px; }
.big-state { text-align: center; padding: 48px 20px; }
.big-state .state-word { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.big-state .clock { font-family: var(--mono); font-size: 18px; color: var(--ink-2); margin-top: 6px; }
.pop-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pop-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pop-phone { font-family: var(--mono); font-size: 15px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; word-break: break-word; }
.script { white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-height: 340px; overflow: auto; }
.dispo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dispo-grid .btn { text-align: left; padding: 10px 12px; }
.dispo-grid .btn.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dispo-grid .btn.is-dnc { color: var(--alert); }
.wrap-timer { font-family: var(--mono); font-weight: 700; color: var(--wrap); }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.history li { padding: 7px 0; border-bottom: 1px solid var(--line); } .history li:last-child { border: 0; }

@media (max-width: 900px) {
  .agent-main { grid-template-columns: 1fr; padding: 12px 16px; }
}
.cap-input { width: 90px; }
.state-input { width: 56px; text-transform: uppercase; }
.pause-select { width: auto; padding: 5px 8px; font-size: 12px; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.pause-select option { color: var(--ink); }
.pop-tags { margin-top: 8px; gap: 8px; }
.dispo-grid .btn { white-space: normal; line-height: 1.3; }
.tbl td:first-child { white-space: nowrap; }


/* ======================================================================== 1.2 additions */
.offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
html, body { overflow-x: clip; }
@media (min-width: 901px) { .app { background: linear-gradient(90deg, var(--side) 216px, transparent 216px); } }
.main { overflow-wrap: anywhere; }
input[type=email], input[type=tel], input[type=date], input[type=time] { width: 100%; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px; font: 14px var(--sans); background: #fff; color: var(--ink); }
input[type=file] { max-width: 100%; font: 13px var(--sans); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-xl { padding: 14px 26px; font-size: 16px; font-weight: 650; border-radius: 10px; }
.btn-link { all: unset; color: var(--call); cursor: pointer; text-decoration: underline; font-size: 13px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--alert); background: #fffafa; }
.field-error { font-size: 12.5px; color: var(--alert); font-weight: 600; }
.field-error::before { content: "⚠ "; }
.req::after { content: " *"; color: var(--alert); }
details.more { border: 1px solid var(--line); border-radius: var(--radius); background: #fafaf8; }
details.more > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .more-body { padding: 4px 16px 16px; }
.sub-head { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 12px 0 6px; }

/* ---------------- sidebar with groups + mobile menu */
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8a929c; padding: 14px 10px 4px; font-weight: 600; }
.nav button .nav-ico { width: 18px; display: inline-block; text-align: center; margin-right: 8px; opacity: .8; }
.nav button { justify-content: flex-start; align-items: center; }
.nav button .badge { margin-left: auto; }
.menu-btn { display: none; }
.side-foot .who-role { color: #9aa1a9; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 40; height: auto; padding: 8px 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .brand { padding: 4px 4px; }
  .menu-btn { display: inline-flex; margin-left: auto; background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
  .nav, .side-foot { display: none; width: 100%; }
  .side.open .nav { display: flex; max-height: 70vh; overflow: auto; }
  .side.open .side-foot { display: block; margin: 8px 0 0; padding: 10px 4px 4px; }
  .side-foot .btn { width: auto; margin: 6px 6px 0 0; }
  .main { padding: 14px 16px 60px; }
  .page-head h1 { font-size: 18px; }
  .tabs { overflow-x: auto; }
  .tabs button { white-space: nowrap; }
}

/* ---------------- page header / empty states */
.page-head .sub { max-width: 70ch; }
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 14px; }
.denied { max-width: 560px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0ec; color: var(--ink-2); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: #eef0ec; margin: 1px 4px 1px 0; }
.ok-text { color: var(--ready); font-weight: 600; } .bad-text { color: var(--alert); font-weight: 600; } .warn-text { color: var(--wrap); font-weight: 600; }

/* ---------------- home checklist */
.progress { height: 10px; border-radius: 6px; background: #e6e8e3; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.step-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line-2); color: var(--ink-2); background: #fff; }
.checklist li.done .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.checklist li.done .step-num::after { content: "✓"; }
.checklist li.done .step-num span { display: none; }
.checklist .step-title { font-weight: 650; }
.checklist .step-detail { font-size: 12.5px; color: var(--ink-3); }
.checklist li.next { background: var(--accent-soft); border-radius: 8px; }
@media (max-width: 520px) { .checklist li { grid-template-columns: 30px 1fr; } .checklist li > :last-child { grid-column: 2; justify-self: start; } }

/* ---------------- setup: the two IP addresses */
.ip-panel { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), #fff 70%); border-radius: 12px; padding: 18px; box-shadow: 0 0 0 4px rgba(31,122,90,.08); }
.ip-panel-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.ip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 14px; }
.ip-box { background: #fff; border: 1px solid #b7dccb; border-radius: 10px; padding: 14px; }
.ip-box .ip-label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ip-num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.ip-box input.ip-input { font: 600 20px var(--mono); padding: 12px 12px; margin-top: 8px; letter-spacing: .02em; border-width: 2px; }
.ip-box .ip-help { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.ip-box .ip-port { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.ip-box .ip-port input { width: 90px; }
.hint-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hint-chip { border: 1px dashed var(--accent); background: #fff; color: var(--accent); border-radius: 999px; padding: 3px 10px; font: 600 12px var(--mono); cursor: pointer; }
.mode-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.mode-card { border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; display: flex; gap: 10px; align-items: flex-start; }
.mode-card input { margin-top: 3px; accent-color: var(--accent); }
.mode-card.sel { border-color: var(--accent); background: var(--accent-soft); }
.mode-card b { display: block; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.check-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.checks .c-ok .check-ico { background: var(--ready); } .checks .c-ok .check-ico::after { content: "✓"; }
.checks .c-fail .check-ico { background: var(--alert); } .checks .c-fail .check-ico::after { content: "✕"; }
.checks .c-warn .check-ico { background: var(--wrap); } .checks .c-warn .check-ico::after { content: "!"; }
.check-label { font-weight: 650; }
.check-fix { margin-top: 4px; font-size: 13px; background: var(--warn-soft); border-radius: 6px; padding: 6px 9px; }
.check-fix::before { content: "What to do: "; font-weight: 700; }
.codebox { font: 12.5px var(--mono); background: #f4f5f2; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.file-list li:last-child { border-bottom: 0; }
.file-list .file-path { font: 13px var(--mono); }
.file-list .file-what { font-size: 12.5px; color: var(--ink-3); flex-basis: 100%; }

/* ---------------- wizard */
body.wizard-mode .side { display: none; }
body.wizard-mode .app { grid-template-columns: 1fr; }
.wizard { max-width: 920px; margin: 0 auto; }
.wizard-steps { display: flex; gap: 8px; margin: 8px 0 18px; flex-wrap: wrap; }
.wizard-steps span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); padding: 4px 10px 4px 4px; border-radius: 999px; background: #eceee9; }
.wizard-steps span b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 12px; }
.wizard-steps span.cur { color: var(--ink); background: var(--accent-soft); font-weight: 650; }
.wizard-steps span.cur b { background: var(--accent); color: #fff; }
.wizard-steps span.done b { background: var(--ready); color: #fff; }
.wizard-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------------- floor map */
.floor-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.state-sum { display: flex; flex-wrap: wrap; gap: 8px; }
.state-sum .pill { font-size: 13px; padding: 5px 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(178px, 100%), 1fr)); gap: 10px; }
.tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-height: 104px; padding: 10px 12px; border-radius: 10px;
  border: 2px solid var(--line-2); background: #fff; border-left-width: 8px; position: relative; }
.tile:focus-visible { outline: 3px solid var(--call); outline-offset: 2px; }
.tile .t-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .t-state { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.tile .t-ico { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; color: #fff; flex: none; }
.tile .t-meta { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 6px; }
.tile .t-time { font: 600 13px var(--mono); }
.tile .t-phone { font: 12px var(--mono); color: var(--ink-2); }
.st-ready { border-color: var(--ready); background: #effaf5; } .st-ready .t-ico { background: var(--ready); } .st-ready .t-state { color: var(--ready); }
.st-on_call, .st-manual_dial { border-color: var(--call); background: #eef3fe; } .st-on_call .t-ico, .st-manual_dial .t-ico { background: var(--call); } .st-on_call .t-state, .st-manual_dial .t-state { color: var(--call); }
.st-wrap_up { border-color: var(--wrap); background: #fff7e8; } .st-wrap_up .t-ico { background: var(--wrap); } .st-wrap_up .t-state { color: #8a5200; }
.st-paused, .st-connecting { border-color: #8b929b; background: #f3f4f2; border-style: solid; } .st-paused .t-ico, .st-connecting .t-ico { background: #6b7280; }
.st-offline { border-style: dashed; border-color: #c4c8c1; background: repeating-linear-gradient(135deg, #fafaf8, #fafaf8 8px, #f2f3f0 8px, #f2f3f0 16px); color: var(--ink-3); }
.st-offline .t-ico { background: #b8bcb5; } .st-offline .t-name { color: var(--ink-2); }
.st-alert { box-shadow: 0 0 0 3px rgba(192,54,44,.35); }
.room { margin-bottom: 14px; }
.room-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.seats { display: grid; gap: 8px; }
.seat-empty { min-height: 104px; border: 2px dashed #d3d6cf; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; background: #fcfcfb; }
.seat-scroll { overflow-x: auto; padding-bottom: 4px; }
.seat-edit { min-height: 64px; border: 2px dashed #c7cbc3; border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; font-size: 12px; background: #fff; cursor: pointer; position: relative; }
.seat-edit.filled { border-style: solid; border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.seat-edit.over { border-color: var(--call); background: var(--info-soft); }
.seat-edit .x { position: absolute; top: 0; right: 2px; border: 0; background: transparent; cursor: pointer; font-size: 15px; color: var(--ink-3); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette .chip-agent { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: grab; }
.palette .chip-agent.sel { border-color: var(--call); background: var(--info-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; border: 2px solid; display: inline-block; }
/* wallboard: full screen, large type */
body.wallboard .side { display: none; }
body.wallboard .app { grid-template-columns: 1fr; }
body.wallboard .main { padding: 18px 24px; background: #11151a; min-height: 100vh; color: #f3f4f6; }
body.wallboard .page-head h1 { font-size: 30px; color: #fff; }
body.wallboard .page-head .sub, body.wallboard .muted { color: #aab1ba; }
body.wallboard .kpi { background: #1b2128; border-color: #2a323b; } body.wallboard .kpi-label { color: #aab1ba; font-size: 15px; }
body.wallboard .kpi-value { font-size: 44px; color: #fff; }
body.wallboard .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
body.wallboard .tile { min-height: 140px; padding: 14px 16px; }
body.wallboard .tile .t-name { font-size: 20px; } body.wallboard .tile .t-state { font-size: 18px; } body.wallboard .tile .t-time { font-size: 20px; }
body.wallboard .tile .t-meta { font-size: 15px; }
body.wallboard .card { background: #1b2128; border-color: #2a323b; color: #f3f4f6; }
body.wallboard .room-head h3, body.wallboard h2 { color: #fff; }
body.wallboard .pill { font-size: 17px; padding: 7px 14px; }
body.wallboard .seat-empty { background: transparent; border-color: #2f3740; }

/* ---------------- credentials card */
.cred-card { border: 2px solid var(--ink); border-radius: 12px; padding: 16px 18px; background: #fff; }
.cred-card h3 { font-size: 18px; margin-bottom: 2px; }
.cred-row { display: grid; grid-template-columns: 150px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.cred-row:last-child { border-bottom: 0; }
.cred-row dt { color: var(--ink-2); font-size: 13px; } .cred-row dd { margin: 0; font: 600 15px var(--mono); overflow-wrap: anywhere; }
.cred-section { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 12px 0 2px; font-weight: 700; }
@media (max-width: 520px) { .cred-row { grid-template-columns: 1fr; gap: 0; } }
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; padding: 10px; }
  body.printing .cred-card { break-inside: avoid; margin-bottom: 16px; }
  body.printing .no-print { display: none !important; }
}

/* ---------------- roles editor */
.perm-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.perm-group h4 { margin-bottom: 6px; }
.perm-group .check { display: flex; align-items: flex-start; padding: 4px 0; font-size: 13.5px; }
.perm-group .check input { margin-top: 2px; flex: none; }
.perm-group .check.no { color: var(--ink-3); cursor: not-allowed; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.role-card { display: flex; flex-direction: column; gap: 6px; }
.role-card .row { margin-top: auto; }

/* ---------------- queue, lists, dids */
.why { border-radius: 10px; padding: 14px 16px; border: 2px solid; }
.why.ok { border-color: var(--ready); background: var(--accent-soft); }
.why.stop { border-color: var(--alert); background: var(--alert-soft); }
.why h3 { margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.why ul { margin: 0; padding-left: 20px; } .why li { margin: 3px 0; }
.order-btns { display: inline-flex; gap: 4px; }
.order-btns .btn { padding: 3px 8px; }
tr.drag-over td { background: var(--info-soft) !important; }
tr.held td { color: var(--ink-3); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.map-col { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.map-col .map-head { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.map-col .map-sample { font: 12px var(--mono); color: var(--ink-3); margin: 4px 0 8px; min-height: 30px; overflow-wrap: anywhere; }
.map-col.is-phone { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.map-col.is-ignore { opacity: .6; }
.preview-tbl td, .preview-tbl th { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-bar { height: 12px; border-radius: 6px; background: #e6e8e3; overflow: hidden; }
.upload-bar span { display: block; height: 100%; background: var(--call); width: 0; transition: width .2s; }
.did-ok { color: var(--ready); } .did-bad { color: var(--alert); } .did-dup { color: var(--ink-3); }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(243,244,241,0), var(--bg) 35%); padding: 14px 0 4px; display: flex; justify-content: flex-end; gap: 10px; z-index: 5; }
.adv-only { }
.simple-mode .adv-only { display: none !important; }
.lock-reason { font-size: 12px; color: var(--ink-3); }
.lock-reason::before { content: "🔒 "; }
.dnc-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dnc-banner .big { font-size: 28px; font-weight: 700; }
.log-level-error { color: var(--alert); font-weight: 700; } .log-level-warn { color: var(--wrap); font-weight: 700; }
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.health .kpi .kpi-value { font-size: 19px; }
.kpi.ok { border-color: #b7dccb; background: var(--accent-soft); }
.agent-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.agent-status i { width: 9px; height: 9px; border-radius: 50%; background: #c4c8c1; display: inline-block; }
.agent-status.on i { background: var(--ready); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.page-body > * + * { margin-top: 14px; }
.page-body > .page-head + * { margin-top: 0; }

.floor-bar select { width: auto; }
.tile .t-meta > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile .t-meta > span:last-child { white-space: nowrap; flex: none; }
.state-sum .pill { border: 1px solid transparent; }
.sum-ready { background: var(--accent-soft); color: var(--ready); }
.sum-on_call { background: var(--info-soft); color: var(--call); }
.sum-wrap_up { background: var(--warn-soft); color: #8a5200; }
.sum-paused { background: #eceee9; color: #4a5058; }
.sum-offline { background: #fff; color: var(--ink-3); border: 1px dashed #c4c8c1 !important; }

[hidden] { display: none !important; }
.card-head select, .page-head select { width: auto; max-width: 100%; }
.tile { color: var(--ink); }
.tile .t-state { white-space: nowrap; }
.tile .t-time { flex: none; }
body.wallboard .page-head .btn:not(.wb-exit) { display: none; }
body.wallboard .tile .t-meta { color: var(--ink-2); }
body.wallboard .legend { color: #aab1ba; }
input.cap-input { width: 90px; }
input.state-input { width: 56px; }

/* ---------------- browser phone, inbound prompt, monitoring */
.phone-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.phone-pill i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.phone-pill.ok { background: var(--accent-soft); color: var(--ready); } .phone-pill.ok i { background: var(--ready); }
.phone-pill.wait { background: #eceee9; color: var(--ink-2); } .phone-pill.wait i { background: #9aa1a9; animation: blink 1s infinite; }
.phone-pill.bad { background: var(--alert-soft); color: var(--alert); } .phone-pill.bad i { background: var(--alert); }
.mic-meter { height: 8px; border-radius: 4px; background: #e6e8e3; overflow: hidden; margin-top: 4px; }
.mic-meter span { display: block; height: 100%; width: 0; background: var(--ready); transition: width .08s; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.offer-back { position: fixed; inset: 0; z-index: 70; background: rgba(15,18,22,.55); display: grid; place-items: center; padding: 16px; }
.offer-card { background: #fff; border-radius: 16px; padding: 26px 28px; width: min(420px, 100%); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); border-top: 8px solid var(--call); }
.offer-ring { font-size: 40px; color: var(--call); animation: blink 1s infinite; }
.offer-name { font-size: 26px; font-weight: 750; margin-top: 6px; }
.offer-phone { font: 600 18px var(--mono); color: var(--ink-2); margin-bottom: 6px; }
.offer-btns { justify-content: center; margin-top: 16px; }
.offer-btns .btn { min-width: 140px; }
.st-offered { border-color: var(--call); background: #fff; border-style: double; } .st-offered .t-ico { background: var(--call); } .st-offered .t-state { color: var(--call); }
.sum-offered { background: var(--info-soft); color: var(--call); }
.monitor-bar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px;
  background: #2a1f5c; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.monitor-bar b { font-size: 15px; }
.monitor-bar .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.monitor-bar .btn[aria-pressed=true] { background: #fff; color: #2a1f5c; font-weight: 700; }
.monitor-bar .btn-danger { background: var(--alert); border-color: var(--alert); }
.queue-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.queue-card { border: 2px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: #fff; }
.queue-card.qc-warn { border-color: var(--wrap); background: var(--warn-soft); }
.queue-card.qc-alert { border-color: var(--alert); background: var(--alert-soft); }
.queue-card .qc-num { font-size: 26px; font-weight: 750; }
.https-check { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 2px solid; font-weight: 650; }
.https-check.ok { border-color: var(--ready); background: var(--accent-soft); color: var(--ready); }
.https-check.bad { border-color: var(--alert); background: var(--alert-soft); color: var(--alert); }
body.wallboard .queue-card { color: var(--ink); }
body.wizard-mode .app, body.wallboard .app { background: none; }

/* Password box with a Show/Hide button */
.pw-row { display: flex; gap: .5rem; align-items: center; }
.pw-row input { flex: 1; min-width: 0; }
.pw-row .btn { flex: none; }

/* 1.4: dialing controls */
.phone-type { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--ink-2); vertical-align: middle; }
.num-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.num-chip { font-size: 12px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.num-chip.cur { border-color: var(--accent); background: var(--accent-soft); }
.num-chip.off { color: var(--ink-3); text-decoration: line-through; }
.ptype-row { justify-content: space-between; max-width: 360px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.any-phone { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; align-items: flex-start; }
.tbl tr.held td { opacity: .6; }
.tbl .row-actions { flex-wrap: wrap; }
.dispo-tbl td { vertical-align: middle; }
@media (max-width: 520px) { .ptype-row { max-width: none; } .tabs { overflow-x: auto; flex-wrap: nowrap; } .tabs button { flex: 0 0 auto; } }
.phone-type { font-family: inherit; }
.pace-pick + .field input[name=dial_ratio], input[name=dial_ratio], input[name=drop_target_pct] { max-width: 160px; }
/* Tables that become one card per row on a phone (labels from data-label). */
@media (max-width: 640px) {
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl-stack td { border: 0 !important; padding: 3px 14px !important; text-align: left !important; }
  .tbl-stack td[data-label]:not(:empty)::before { content: attr(data-label); display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
}

/* ---------------- 1.5: statuses, transfers, queue priorities */
.st-ready_inbound { border-color: #0f766e; background: #ecf8f6; border-left-style: double; } .st-ready_inbound .t-ico { background: #0f766e; } .st-ready_inbound .t-state { color: #0f766e; }
.st-ready_transfers { border-color: #6d28d9; background: #f4f0fd; border-left-style: double; } .st-ready_transfers .t-ico { background: #6d28d9; } .st-ready_transfers .t-state { color: #5b21b6; }
.sum-ready_inbound { background: #dff3ef; color: #0f766e; }
.sum-ready_transfers { background: #ede7fb; color: #5b21b6; }
.legend i.st-ready_inbound, .legend i.st-ready_transfers { border-left-width: 2px; }
.state-pill.s-ready_inbound::before { background: #2dd4bf; box-shadow: 0 0 0 3px rgba(45, 212, 191, .25); }
.state-pill.s-ready_transfers::before { background: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .25); }
.status-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.status-picker .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.status-picker .btn[aria-pressed=true] { background: #fff; color: var(--side); font-weight: 700; }
.status-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 14px auto 6px; max-width: 640px; }
.status-choice { all: unset; box-sizing: border-box; cursor: pointer; border: 2px solid var(--line-2); border-radius: 12px; padding: 14px; text-align: left; background: #fff; display: grid; gap: 4px; }
.status-choice:hover { border-color: var(--accent); }
.status-choice:focus-visible { outline: 3px solid var(--call); outline-offset: 2px; }
.status-choice b { font-size: 17px; }
.status-choice span { font-size: 12.5px; color: var(--ink-2); }
.status-choice.c-available b { color: var(--ready); } .status-choice.c-inbound b { color: #0f766e; } .status-choice.c-transfers b { color: #5b21b6; }
.xfer-card .card-body { display: grid; gap: 10px; }
.xfer-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.xfer-btns .btn { justify-content: flex-start; text-align: left; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: normal; }
.xfer-btns .btn small { font-weight: 400; font-size: 11.5px; color: var(--ink-2); }
.xfer-btns .btn-closer { border-color: #6d28d9; color: #5b21b6; font-weight: 700; }
.xfer-btns .btn-closer:hover:not(:disabled) { background: #f4f0fd; }
.xfer-banner { border-radius: 10px; padding: 12px 14px; background: #f4f0fd; border: 1px solid #d9cdf7; color: #3b1d80; display: grid; gap: 4px; }
.xfer-banner b { font-size: 15px; }
.xfer-banner .xfer-notes { white-space: pre-wrap; background: #fff; border-radius: 6px; padding: 6px 8px; color: var(--ink); font-size: 13px; }
.offer-xfer { margin-top: 6px; font-size: 13px; color: #5b21b6; font-weight: 600; }
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; }
.member-row.on { background: var(--accent-soft); }
.member-row label { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.member-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row select { width: auto; flex: none; padding: 4px 6px; }
.kind-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.mode-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
@media (max-width: 640px) {
  .status-choices { grid-template-columns: 1fr; }
  .xfer-btns { grid-template-columns: 1fr 1fr; }
  .member-list { grid-template-columns: 1fr; }
}

/* ======================================================================== 1.6 reports */
.ask-card { margin-bottom: 16px; border-color: #b7dccb; }
.ask-label { font-weight: 650; font-size: 15px; display: block; }
.ask-row { display: flex; gap: 8px; }
.ask-row input { font-size: 15px; padding: 9px 11px; }
.ask-examples { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ask-out:empty { display: none; }
.ask-out > * + * { margin-top: 8px; }
.ask-answer { font-size: 17px; font-weight: 650; color: var(--ink); background: var(--accent-soft); border: 1px solid #b7dccb; border-radius: var(--radius); padding: 10px 14px; }
.ask-summary { font-weight: 600; color: var(--ink-2); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ask-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #eef0ec; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ask-chip button { all: unset; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; color: var(--ink-3); }
.ask-chip button:hover { color: var(--alert); }
.rep-scope { margin-bottom: 14px; }
.rep-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.rep-side { position: sticky; top: 12px; }
.rep-nav { display: flex; flex-direction: column; gap: 1px; }
.rep-nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 12px 8px 4px; font-weight: 600; }
.rep-nav-group:first-child { padding-top: 0; }
.rep-nav button { all: unset; cursor: pointer; padding: 7px 8px; border-radius: 6px; font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; }
.rep-nav button:hover { background: #e9ebe6; color: var(--ink); }
.rep-nav button.active { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.rep-nav button:focus-visible { outline: 2px solid var(--accent); }
.rep-nav .nav-ico { width: 18px; display: inline-block; text-align: center; margin-right: 8px; color: var(--ink-3); }
.rep-nav-select { display: none; }
.rep-main > * + * { margin-top: 14px; }
.rep-title h2 { font-size: 18px; }
.rep-title p { margin: 2px 0 0; max-width: 90ch; }
.rep-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 10px 12px; align-items: end; }
.rep-custom { display: contents; }
.rep-custom[hidden] { display: none; }
.rep-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-range { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rep-notes p { margin: 0 0 2px; }
.rep-tbl th button { all: unset; cursor: pointer; }
.rep-tbl th button:hover { color: var(--ink); }
.rep-tbl th button:focus-visible { outline: 2px solid var(--accent); }
.rep-tbl th.sorted { color: var(--ink); }
.rep-tbl td, .rep-tbl th { white-space: nowrap; }
.rep-tbl tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); border-bottom: 0; background: #fafaf8; }
.rep-tbl tbody tr:hover td { background: #f8f9f6; }
.rep-wrap .rep-tbl th:first-child, .rep-wrap .rep-tbl td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }
.rep-wrap .rep-tbl th:first-child { background: #fafaf8; }
.rep-wrap .rep-tbl tfoot td:first-child { background: #fafaf8; }
.rep-pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
/* chart series: fixed order, validated for colour-blind separation and contrast */
.c0 { fill: #17885f; } .c1 { fill: #2758c4; } .c2 { fill: #b86e00; } .c3 { fill: #8a4fc4; } .c4 { fill: #c2417a; } .c5 { fill: #6f7f00; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw.c0 { background: #17885f; } .sw.c1 { background: #2758c4; } .sw.c2 { background: #b86e00; } .sw.c3 { background: #8a4fc4; } .sw.c4 { background: #c2417a; } .sw.c5 { background: #6f7f00; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar-row { display: grid; grid-template-columns: minmax(80px, 180px) minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar-bar { display: block; }
.hbar-track { display: block; width: 100%; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cols-wrap { position: relative; }
.cols { display: block; width: 100%; height: 200px; }
.cols .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cols-axis { display: flex; font-size: 11px; color: var(--ink-3); }
.cols-axis span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }
.cols-max { margin-bottom: 4px; }
.heat-scroll { overflow-x: auto; }
.heat { display: flex; flex-direction: column; gap: 2px; min-width: 520px; }
.heat-row { display: grid; grid-template-columns: 40px repeat(auto-fit, minmax(14px, 1fr)); gap: 2px; align-items: center; }
.heat-h { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: visible; }
.heat-day { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.heat-cell { height: 22px; border-radius: 3px; }
.heat-cell.hnone { background: #f1f2ef; }
.heat-cell.h0 { background: #e3f1eb; } .heat-cell.h1 { background: #bfe0d0; } .heat-cell.h2 { background: #8cc8ac; }
.heat-cell.h3 { background: #55ad86; } .heat-cell.h4 { background: #2a8c62; } .heat-cell.h5 { background: #116845; }
@media (max-width: 900px) {
  .rep-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rep-side { position: static; }
  .rep-nav { display: none; }
  .rep-nav-select { display: block; font-weight: 600; }
}
@media (max-width: 520px) {
  .ask-examples .btn-link:nth-of-type(n+4) { display: none; }
  .hbar-row { grid-template-columns: 90px minmax(0, 1fr) 56px; gap: 6px; }
  .ask-row { flex-direction: column; }
  .ask-row .btn { width: 100%; }
}

/* 1.7 Recorded messages page */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.msg-row.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.msg-row > .row { grid-column: 1 / -1; gap: 8px; }
.msg-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg-row audio { width: 260px; max-width: 100%; height: 36px; }
.upload-box { padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.upload-box progress { width: 180px; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 20px; }
.quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); font-style: italic; }
label.check.attest { align-items: flex-start; line-height: 1.4; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
label.check.attest input { margin-top: 3px; flex: none; }
@media (max-width: 640px) {
  .msg-row { grid-template-columns: minmax(0, 1fr); }
  .msg-row audio { width: 100%; }
}
.card-head .lock { white-space: nowrap; flex: none; }

/* 1.8 Agent dial pad, hold, call controls */
.pad-card .card-body { display: grid; gap: 10px; }
.pad-display { display: flex; gap: 6px; align-items: stretch; }
.pad-display input { flex: 1; min-width: 0; font: 650 19px var(--mono); letter-spacing: .02em; padding: 8px 10px; text-align: center; }
.pad-display input[readonly] { background: #f6f7f5; color: var(--ink-2); font-size: 18px; }
.pad-display .btn { flex: none; padding: 7px 10px; }
.pad-names > summary { padding: 8px 12px; font-size: 12.5px; }
.pad-names .more-body { padding: 4px 12px 12px; gap: 8px; }
.pad-names .more-body input { flex: 1 1 120px; min-width: 0; }
.pad-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pad-keys .btn { font: 650 20px var(--mono); min-height: 50px; padding: 6px 0 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.05; border-radius: 10px; }
.pad-keys .btn small { font: 600 9px var(--sans); letter-spacing: .14em; color: var(--ink-3); min-height: 10px; }
.pad-keys .btn:active:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.pad-card[data-mode="call"] .pad-keys .btn { border-color: #b9c9ee; }
.pad-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pad-actions .pad-wide, .pad-held { grid-column: 1 / -1; }
.pad-held { text-align: center; font-weight: 650; color: var(--wrap); }
.btn-call { background: #1b9a59; border-color: #1b9a59; color: #fff; font-size: 17px; font-weight: 700; min-height: 50px; border-radius: 10px; }
.btn-call:hover { background: #157c47; border-color: #157c47; }
.btn-end { background: var(--alert); border-color: var(--alert); color: #fff; font-weight: 700; min-height: 44px; border-radius: 10px; }
.btn-end:hover { background: #a42c23; border-color: #a42c23; }
.pad-actions .btn-end, .pad-actions .btn-hold, .pad-actions .btn-resume { font-size: 15px; min-height: 50px; }
.pad-redial { min-height: 50px; border-radius: 10px; font-weight: 600; }
.btn-hold { border-color: #e0b25a; color: #7a4a00; font-weight: 700; min-height: 44px; border-radius: 10px; }
.btn-hold:hover { background: var(--warn-soft); border-color: #d39b2f; }
.btn-resume { background: var(--wrap); border-color: var(--wrap); color: #fff; font-weight: 700; min-height: 36px; border-radius: 10px; }
.btn-resume:hover { background: #955900; border-color: #955900; }
.pad-error { font-weight: 600; }
.pad-recent-head { margin-top: 2px; }
.pad-list { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--line); }
.pad-list li { border-bottom: 1px solid var(--line); }
.pad-item { appearance: none; width: 100%; background: none; border: 0; padding: 7px 4px; display: flex; gap: 8px; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; font: inherit; color: inherit; border-radius: 6px; }
.pad-item:hover:not(:disabled) { background: #f3f5f2; }
.pad-item:focus-visible { outline: 2px solid var(--accent); }
.pad-item:disabled { opacity: .5; cursor: not-allowed; }
.pad-item-main, .pad-item-side { display: flex; flex-direction: column; min-width: 0; }
.pad-item-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad-item-side { align-items: flex-end; text-align: right; flex: none; }
.call-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.hold-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--warn-soft); border: 1px solid #efcf8f; color: #6b4200; border-radius: var(--radius); padding: 10px 14px; }
.hold-banner .hold-clock { font: 700 18px var(--mono); }
.hold-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wrap); animation: blink 1.2s infinite; }
.calling-card .calling-number { font: 700 30px var(--mono); letter-spacing: -.01em; margin-top: 4px; }
.calling-card .calling-name { font-size: 18px; font-weight: 650; margin-top: 2px; }
.row.center { justify-content: center; }
.name-form > summary { padding: 8px 12px; font-size: 13px; }
.name-form .more-body input { flex: 1 1 140px; min-width: 0; }
.pop-head > .call-ctl { margin-left: auto; }
.agent-bar .bar-pad { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
@media (min-width: 901px) { .agent-bar .bar-pad { display: none; } }
@media (max-width: 520px) {
  .pad-keys .btn { min-height: 54px; }
  .pop-head > .call-ctl { margin-left: 0; width: 100%; }
  .pop-head > .call-ctl .btn { flex: 1; }
  .calling-card .calling-number { font-size: 24px; }
}
.t-hold { color: var(--wrap); font-weight: 700; }
