/* Nexwaves client portal. Brand: navy #0D0A1C, gradient #40C9FF â†’ #E81CFF, violet #6A2CFF. */
:root {
  --ink: #0d0a1c; --ink-2: #151029; --ink-3: #221a44; --violet: #6a2cff; --violet-hi: #8445ff; --cyan: #40c9ff; --mag: #e81cff;
  --grad: linear-gradient(100deg, #40c9ff, #8f6bff 50%, #e81cff);
  --bg: #f4f3f8; --card: #fff; --text: #16151d; --muted: #6b6a78; --line: #e6e4ee; --soft: #f8f7fc;
  --ok: #0f9d63; --warn: #d98a00; --bad: #d1344a; --info: #2f7cf6;
  --sans: 'Familjen Grotesk', 'Segoe UI', system-ui, sans-serif; --mono: 'IBM Plex Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 15px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.icw { display: inline-flex; }
.sp { flex: 1; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line); background: #fff; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; transition: border-color .2s, background .2s; }
.btn:hover { border-color: #cfcbe0; }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.primary:hover { background: var(--violet-hi); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 7px; }
.btn.icon { padding: 7px; }
.btn[disabled] { opacity: .5; cursor: default; }
input, select, textarea { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 14px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(106, 44, 255, .13); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--violet); }
label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(60% 70% at 85% 0%, rgba(112, 52, 255, .5), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(64, 201, 255, .18), transparent 70%), var(--ink); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 34px; display: grid; gap: 16px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.login-top > img { height: 36px; justify-self: start; background: var(--ink); padding: 8px 12px; border-radius: 10px; box-sizing: content-box; }
.login-card h1 { font-size: 26px; }
.login-card p { margin: -6px 0 4px; color: var(--muted); }
.login-card .login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 0; font-size: 13.5px; }
.login-links a { text-decoration: none; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 0; }

/* ---------- app shell ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.top-in { display: flex; align-items: center; gap: 18px; height: 62px; padding: 0 20px; max-width: 1600px; margin: 0 auto; }
.top img { height: 30px; }
.top .tabs { display: flex; gap: 4px; margin-left: 12px; }
.top .tabs a { color: rgba(255, 255, 255, .7); text-decoration: none; padding: 8px 13px; border-radius: 8px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 7px; align-items: center; }
.top .tabs a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.top .tabs a.on { color: #fff; background: rgba(132, 69, 255, .35); }
.top .sp { flex: 1; }
.top select { background: var(--ink-2); color: #fff; border-color: rgba(255, 255, 255, .15); max-width: 260px; }
.top .who { font-size: 13px; color: rgba(255, 255, 255, .65); text-align: right; line-height: 1.25; }
.top .who b { color: #fff; display: block; font-weight: 600; }
.top .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .18); }
.top .grad-line { height: 2px; background: var(--grad); }
.wrap { max-width: 1600px; margin: 0 auto; padding: 22px 20px 32px; }
/* room for the recording player (fixed at the bottom) only while one is open */
body:has(.player) .wrap { padding-bottom: 120px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { font-size: 28px; }
.head p { margin: 4px 0 0; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.card.pad { padding: 20px; }
.card + .card { margin-top: 14px; }

/* ---------- filters ---------- */
.filters { display: grid; gap: 12px; padding: 16px; }
.gt-note { padding: 0 16px; margin: 4px 0 8px; }
.gt-note:empty { display: none; }
.filters.audit-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-filters input[type=search] { flex: 1 1 220px; }
.audit-filters select, .audit-filters input[type=date] { width: auto; max-width: 220px; }
.tbl th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th.sortable:hover { text-decoration: underline; }
.frow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 10, 60, .12); }
.search { position: relative; flex: 1 1 240px; }
.search input { width: 100%; padding-left: 36px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 14px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.ok b { color: var(--ok); } .stat.bad b { color: var(--bad); }

/* ---------- calls table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.row { cursor: pointer; }
.tbl tr.row:hover td { background: #faf9ff; }
.tbl tr.playing td { background: #f1ebff; }
.tbl .num b { display: block; font-weight: 600; }
.tbl .num small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.when b { display: block; font-variant-numeric: tabular-nums; }
.when small { color: var(--muted); font-size: 12px; }
.dir { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.dir.in { background: #e8f3ff; color: var(--info); } .dir.out { background: #e8f8f0; color: var(--ok); } .dir.internal { background: #f1effa; color: var(--violet); }
.dir.missed { background: #fdecef; color: var(--bad); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.answered { background: #e5f6ee; color: var(--ok); } .pill.missed { background: #fdecef; color: var(--bad); }
/* returning callers: new vs returning per day (stacked bars) + regulars waiting for a call-back highlighted */
.rc-h { font-size: 14px; margin: 0 0 10px; }
.rc-pad { padding: 16px 20px; border-top: 1px solid var(--line); }
.rc-pad:empty { display: none; }
.rc-filters { border-top: 1px solid var(--line); }
.rc-saved { margin-left: 6px; }
/* contacts (phonebook) */
.pb-form .frm-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pb-share { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.pb-share legend { font-size: 13px; padding: 0 6px; color: var(--muted); }
.pb-exts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; max-height: 180px; overflow-y: auto; padding-left: 22px; }
.pb-exts[hidden] { display: none; }
.pb-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.pb-map .f { font-size: 12.5px; overflow: hidden; }
@media (max-width: 600px) { .pb-form .frm-row { grid-template-columns: minmax(0, 1fr); } }
.rc-filters input[type=search] { min-width: 220px; flex: 1 1 220px; }
.rc-chart { display: grid; gap: 6px; }
.rc-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.rc-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rc-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); }
.rc-col { flex: 1 1 0; min-width: 2px; height: 100%; display: flex; flex-direction: column-reverse; gap: 1px; }
.rc-col i { display: block; border-radius: 2px 2px 0 0; min-height: 0; }
.rc-col i.ret, .rc-legend .sw.ret { background: #7c5cff; } .rc-col i.new, .rc-legend .sw.new { background: #40c9ff; }
.rc-col:hover i { filter: brightness(1.2); }
.rc-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
tr.rc-wait td { background: rgba(255, 92, 116, .07); }
/* Returning callers: list left, the clicked caller's calls right (owner 2026-11-18) */
.rc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; margin-top: 16px; align-items: start; }
@media (max-width: 1000px) { .rc-split { grid-template-columns: 1fr; } }
.rc-lscroll { max-height: 70vh; overflow: auto; }
.rc-hist { position: sticky; top: 12px; }
.rc-hscroll { max-height: 64vh; overflow: auto; }
.rc-list tr.rc-row { cursor: pointer; }
.rc-list tr.rc-row:hover td { background: rgba(124, 92, 255, .06); }
.rc-list tr.rc-row.sel td { background: rgba(124, 92, 255, .14); }
.rc-list tr.rc-row.sel td:first-child { box-shadow: inset 3px 0 0 #7c5cff; }
.rc-list td small { display: block; }
.rc-star { color: #f5b301; }
.rc-hhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; border-top: 0; }
.rc-hint { border-top: 0; }
.rc-note { margin: 0 20px 12px; }
.rc-fold > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.rc-fold[open] > summary { margin-bottom: 10px; }
.stats:has(> .stat:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pill.busy, .pill.failed { background: #fff3dd; color: var(--warn); }
.recs { display: flex; gap: 6px; justify-content: flex-end; }
.play { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--violet); }
.play:hover { border-color: var(--violet); }
.play.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.welcome { max-width: 640px; margin: 40px auto; text-align: center; padding: 48px 32px; }
.welcome h1 { font-size: 30px; margin-bottom: 10px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
.tbl-wrap { overflow-x: auto; }

/* ---------- player bar ---------- */
.player { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 900px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; box-shadow: 0 24px 60px -20px rgba(13, 10, 28, .7); }
.player .pp { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; }
.player .meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .bar { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 4px; }
.player input[type=range] { flex: 1; accent-color: #b583ff; padding: 0; border: 0; background: none; }
.player .btn { color: #fff; border-color: rgba(255, 255, 255, .2); background: transparent; }
.player select { background: var(--ink-2); color: #fff; border-color: rgba(255, 255, 255, .2); padding: 6px 8px; }

/* ---------- drawer ---------- */
.shade { position: fixed; inset: 0; background: rgba(13, 10, 28, .45); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 51; overflow-y: auto; padding: 24px; box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .4); }
.drawer h2 { font-size: 22px; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 18px 0; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.legs { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.legs li { position: relative; padding: 0 0 14px 18px; font-size: 13.5px; }
.legs li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); }
.legs small { color: var(--muted); font-family: var(--mono); font-size: 12px; }

/* ---------- admin ---------- */
.subtabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.subtabs a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; border: 1px solid transparent; }
.subtabs a.on { background: #fff; color: var(--text); border-color: var(--line); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.form { display: grid; gap: 12px; }
.frm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #bbb; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(15, 157, 99, .18); } .dot.late { background: var(--warn); } .dot.off { background: var(--bad); }
.cmd { display: flex; gap: 8px; align-items: stretch; background: var(--ink); color: #d9ccff; border-radius: 10px; padding: 12px 12px 12px 14px; font-family: var(--mono); font-size: 13px; }
.cmd code { flex: 1; word-break: break-all; line-height: 1.5; }
.cmd .btn { color: #fff; border-color: rgba(255, 255, 255, .25); background: transparent; }
.sshout { background: var(--ink); color: #e5ddff; border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.note .check { margin-top: 8px; }
.note { background: #f1ebff; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.note.warn { background: #fff4e0; }
.acc td, .acc th { text-align: center; } .acc td:first-child, .acc th:first-child { text-align: left; }
.acc tr.grp td { background: #f1ebff; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); padding: 8px 12px; }
.acc td small { font-size: 12.5px; }
.secret { font-family: var(--mono); background: #fff4e0; padding: 10px 12px; border-radius: 8px; user-select: all; }

/* ---------- live board (receptionist wallboard) ---------- */
body.board { background: var(--ink); color: #fff; }
.board .wrap { padding-top: 18px; }
.lv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lv-head h1 { font-size: 26px; }
.lv-head .clock { font-family: var(--mono); font-size: 26px; color: #d9ccff; font-variant-numeric: tabular-nums; }
.lv-state { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .6); display: inline-flex; align-items: center; gap: 8px; }
.lv-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(15, 157, 99, .6); animation: ping 2s infinite; }
.lv-state.stale i { background: var(--warn); animation: none; } .lv-state.off i { background: var(--bad); animation: none; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(15, 157, 99, 0); } 0% { box-shadow: 0 0 0 0 rgba(15, 157, 99, .55); } }
.lv { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.lv.one { grid-template-columns: minmax(0, 1fr); }
.lv-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.lv-wide .panel + .panel { margin-top: 0; }
/* live board (2026-11-16): top row = Queues Â· Missed â€“ call back Â· Today side by side, Extensions below */
.lv2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.lv-top { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.lv-top.n1 { grid-template-columns: minmax(0, 1fr); } .lv-top.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lv-top.n3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
.lv-top.n2.with-q { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.lv-top > .panel + .panel, .lv2 > .panel + .panel { margin-top: 0; }
.lv-top .lv-list { max-height: 520px; overflow-y: auto; }
/* queue cards: smaller, 2 per row */
.lv-queues .queues { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lv-queues .q { padding: 10px 12px; border-radius: 12px; }
.lv-queues .q-top b { font-size: 14px; }
.lv-queues .q-count { font-size: 22px; }
.lv-queues .waiting { margin: 6px 0; }
.lv-queues .waiting li { padding: 6px 8px; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; }
.lv-queues .waiting b { font-size: 13px; }
.lv-queues .waiting .t { font-size: 13px; }
.lv-queues .q-meta { gap: 10px; font-size: 10.5px; }
.lv-queues .agents { margin-top: 6px; gap: 4px; }
.lv-queues .agent { font-size: 11px; padding: 3px 7px; }
.lv-queues .q > p { margin: 6px 0; font-size: 13px; }
@media (max-width: 1200px) {
  .lv-top.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-top.n3 .lv-queues { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .lv-top, .lv-top.n2, .lv-top.n2.with-q, .lv-top.n3 { grid-template-columns: minmax(0, 1fr); }
  .lv-queues .queues { grid-template-columns: minmax(0, 1fr); }
}
.panel { background: var(--ink-2); border: 1px solid rgba(201, 184, 255, .12); border-radius: 16px; padding: 16px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--ink-2); border: 1px solid rgba(201, 184, 255, .12); border-radius: 14px; padding: 14px 16px; }
.kpi span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.kpi b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi.wait b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi.bad b { color: #ff7a8c; }
.queues { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.q { background: var(--ink-3); border-radius: 14px; padding: 14px; border: 1px solid transparent; }
.q.hot { border-color: rgba(232, 28, 255, .55); box-shadow: 0 0 0 1px rgba(232, 28, 255, .25), 0 10px 40px -10px rgba(232, 28, 255, .35); }
.q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.q-top b { font-size: 17px; }
.q-top small { font-family: var(--mono); color: rgba(255, 255, 255, .5); }
.q-count { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.waiting { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.waiting li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: rgba(255, 255, 255, .05); border-radius: 9px; padding: 8px 10px; }
.waiting .pos { font-family: var(--mono); color: rgba(255, 255, 255, .5); font-size: 12px; }
.waiting b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.waiting small { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .55); }
.waiting .t { font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; }
.waiting .t.long { color: #ff7a8c; }
.q-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 11.5px; color: rgba(255, 255, 255, .55); flex-wrap: wrap; }
.agents { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.agent { font-size: 12px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .07); display: inline-flex; gap: 6px; align-items: center; }
.agent i { width: 7px; height: 7px; border-radius: 50%; background: #888; }
.st-idle i, i.st-idle { background: #2bd47e; } .st-busy i, i.st-busy { background: #ff5c74; } .st-ring i, i.st-ring { background: #ffb020; animation: blink 1s infinite; }
.st-off i, i.st-off { background: #555; } .st-hold i, i.st-hold { background: #40c9ff; } .st-paused i, i.st-paused { background: #a98bff; }
@keyframes blink { 50% { opacity: .3; } }
.exts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ext { background: var(--ink-3); border-radius: 12px; padding: 10px 12px; border-left: 4px solid #555; min-height: 74px; }
.ext.st-idle { border-left-color: #2bd47e; } .ext.st-busy { border-left-color: #ff5c74; background: #2c1838; } .ext.st-ring { border-left-color: #ffb020; background: #33270f; }
.ext.st-hold { border-left-color: #40c9ff; } .ext.st-off { opacity: .55; }
.ext b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext .n { font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .55); }
.ext .call { font-size: 12.5px; margin-top: 5px; color: #fff; display: flex; justify-content: space-between; gap: 6px; }
.ext .call span:last-child { font-family: var(--mono); color: rgba(255, 255, 255, .7); }
.lv-list { list-style: none; margin: 0; padding: 0; }
.lv-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13.5px; }
.lv-list li:first-child { border-top: 0; }
.lv-list b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-list small { color: rgba(255, 255, 255, .5); font-family: var(--mono); font-size: 11.5px; }
.lv-list .r { text-align: right; font-family: var(--mono); font-size: 12px; color: rgba(255, 255, 255, .65); }
.lv-list .dir { width: 26px; height: 26px; }
.board .dir.in { background: rgba(64, 201, 255, .15); color: var(--cyan); } .board .dir.out { background: rgba(43, 212, 126, .15); color: #2bd47e; }
.board .dir.missed { background: rgba(255, 92, 116, .18); color: #ff7a8c; } .board .dir.internal { background: rgba(169, 139, 255, .15); color: #c9b8ff; }
.cb { color: #ffb020; font-family: var(--mono); font-size: 11.5px; }
.board .empty { color: rgba(255, 255, 255, .45); padding: 20px; }
.board .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .2); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 99; transition: transform .3s; visibility: hidden; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.err { background: var(--bad); }
body:has(.player) .toast { bottom: 96px; }

.top .tabs a { white-space: nowrap; }
@media (max-width: 1100px) {
  .top .who { display: none; }
  .top-in { gap: 10px; }
  .top .tabs { margin-left: 4px; }
  .top .tabs a { padding: 8px 10px; }
  .lv { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; } .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .top-in { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .top .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .top .who { display: none; }
  .wrap { padding: 16px 12px 120px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tbl .hide-m { display: none; }
  .tbl th { top: 0; position: static; }
  .player { grid-template-columns: auto minmax(0, 1fr) auto; left: 8px; right: 8px; bottom: 8px; }
  .player select { display: none; }
}

/* ---------- language switch, PBX switcher, extension names & access (Nov 2026) ---------- */
.langsw { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.langsw button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: 600 12.5px var(--sans); color: var(--muted); }
.langsw button img { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.langsw button.on { background: var(--soft); color: var(--text); }
.langsw.dark { background: var(--ink-2); border-color: rgba(255, 255, 255, .15); }
.langsw.dark button { color: rgba(255, 255, 255, .6); }
.langsw.dark button.on { background: rgba(255, 255, 255, .12); color: #fff; }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-card > * { min-width: 0; }
.pbxpick { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pbxsel { max-width: 320px; font-weight: 600; }
.pbxseg button { font-weight: 600; }
.ename { display: block; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-in { width: 90px; font-family: var(--mono); }
.extacc { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.extacc h3 { margin: 0; font-size: 16px; }
.extacc select { max-width: 340px; }
.extacc .tbl td:not(:first-child), .extacc .tbl th:not(:first-child) { text-align: center; width: 110px; }
@media (max-width: 760px) { .top .langsw button { padding: 5px 6px; } .top .langsw button img { display: none; } }
.play.dl { background: var(--soft); color: var(--text); text-decoration: none; display: inline-grid; place-items: center; }
/* sign-in: Google button, "or" divider, code field (Nov 2026) */
.gbtn { justify-content: center; gap: 10px; background: #fff; border-color: #dadce0; color: #3c4043; font-weight: 600; text-decoration: none; padding: 11px 15px; }
.gbtn:hover { background: #f8f9fa; border-color: #c6c9cd; }
.gbtn svg { flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.otp { font-family: var(--mono); font-size: 24px; letter-spacing: 8px; text-align: center; }
/* two-factor: QR code + key, recovery codes */
.tfsetup { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tfqr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex: none; }
.tfkey { display: block; font-family: var(--mono); font-size: 14px; word-break: break-all; margin-top: 4px; }
.rcodes { font-family: var(--mono); font-size: 16px; line-height: 1.6; background: #fff4e0; color: #1d1b2c; padding: 10px 14px; border-radius: 8px; user-select: all; margin: 0; }
.tfcard { margin-top: 16px; max-width: 560px; }
.login-card .muted.small, .login-links.sm { font-size: 12.5px; }
.login-card .login-links.sm { margin-top: -6px; }
/* inside the website admin (iframe) */
html.embed body { background: transparent; }
html.embed .wrap { padding-top: 4px; max-width: none; }
.f.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.f.inline input { width: 220px; }
/* missed call marked as called back by hand */
.markbtn { margin-top: 6px; }
.cbdone { border: 1px solid currentColor; background: none; border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.cbdone:hover { background: rgba(255, 255, 255, .12); }
a.small { font-size: 12.5px; }

/* customer phone settings */
.ps-h { font-size: 17px; margin: 22px 0 10px; }
.ps-item h3 { margin: 0; font-size: 16px; }
.ps-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 8px; }
.ps-now { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.ps-now small { font-weight: 400; }
.ps-until { margin-top: 12px; max-width: 360px; }
.ps-wide { margin-top: 14px; }
.ps-wide h4 { margin: 14px 0 6px; font-size: 14px; }
.ps-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.ps-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 8px 10px; background: var(--soft); border-radius: 10px; }
.ps-row select, .ps-row input[type=date] { width: auto; }
.ps-row .tsel { width: 90px; }
.ps-fwd .ps-num { width: 150px; }
.muted.small { font-size: 12.5px; }
@media (max-width: 760px) { .ps-fwd .ps-num { width: 120px; } .ps .seg { flex-wrap: wrap; } }/* header: the tabs move to their own row before they would push the buttons off screen (5 tabs with Phone settings) */
@media (max-width: 1060px) { .top-in { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; } .top .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; } }
.ps-row .tspan[hidden] { display: none; }

/* call-flow designer (public/flow.js) */
.fd-card { padding: 0; overflow: hidden; }
.fd-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fd-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.fd-key { display: inline-block; width: 22px; height: 0; border-top: 3px solid #7c5cff; margin-left: 8px; }
.fd-key.changed { border-top: 3px dashed #f59e0b; }
.fd-stage { display: flex; min-height: 560px; height: calc(100vh - 290px); }
.fd-pal { width: 230px; flex: none; border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; background: var(--soft); }
.fd-pal h3 { margin: 0 0 4px; font-size: 14px; } .fd-pal h4 { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fd-pal input { width: 100%; margin: 6px 0; }
.fd-pi { display: flex; gap: 8px; align-items: center; padding: 7px 9px; margin-bottom: 6px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--fdc, #999); border-radius: 9px; font-size: 13px; cursor: grab; }
.fd-scroll { position: relative; flex: 1; overflow: auto; cursor: grab; background-color: #fafaff;
  background-image: radial-gradient(circle, #d9d6ea 1px, transparent 1px); background-size: 22px 22px; }
.fd-scroll.panning { cursor: grabbing; }
.fd-sizer { position: absolute; left: 0; top: 0; pointer-events: none; }
.fd-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.fd-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.fd-line { fill: none; stroke: #a9a3c4; stroke-width: 2; }
.fd-line.live { stroke: #7c5cff; stroke-width: 3; }
.fd-line.changed { stroke: #f59e0b; stroke-width: 3; stroke-dasharray: 7 5; }
.fd-line.drawing { stroke: #7c5cff; stroke-width: 2.5; stroke-dasharray: 5 4; }
.fd-arrow { fill: #a9a3c4; } .fd-arrow.live { fill: #7c5cff; } .fd-arrow.changed { fill: #f59e0b; }
.fd-node { position: absolute; width: 250px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--fdc, #999); border-radius: 12px;
  box-shadow: 0 2px 10px rgba(30, 20, 80, .08); font-size: 13px; cursor: default; }
.fd-node.moving { box-shadow: 0 10px 30px rgba(30, 20, 80, .25); z-index: 5; }
.fd-node.drop-ok { outline: 3px solid #22c55e; } .fd-node.drop-no { outline: 3px solid #ef4444; }
.fd-head { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px 6px; cursor: move; user-select: none; touch-action: none; }
.fd-head b { display: block; font-size: 14px; line-height: 1.25; word-break: break-word; } .fd-head small { color: var(--muted); }
.fd-ic { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--fdc, #999); color: #fff; font-size: 14px; }
.fd-badge { display: inline-block; margin: 0 12px 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); }
.fd-badge.open { background: #dcfce7; color: #166534; } .fd-badge.closed { background: #fee2e2; color: #991b1b; }
.fd-lines { padding: 0 12px 6px; color: var(--muted); font-size: 12.5px; }
.fd-exits { border-top: 1px solid var(--line); }
.fd-exit { position: relative; display: flex; gap: 6px; align-items: center; padding: 6px 22px 6px 12px; border-bottom: 1px dashed var(--line); font-weight: 600; font-size: 12.5px; }
.fd-exit:last-child { border-bottom: 0; }
.fd-exit em { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.fd-exit.live { background: #f1ebff; color: #5b3fd6; } .fd-exit.changed { background: #fff7e6; } .fd-exit.open { color: #b45309; }
.fd-port { position: absolute; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid #a9a3c4; }
.fd-port.out::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; }   /* bigger grab area */
.fd-port.out:hover { border-color: #7c5cff; transform: scale(1.25); }
.fd-port.out { right: -8px; top: 50%; margin-top: -8px; cursor: crosshair; touch-action: none; }
.fd-port.out.on { background: #a9a3c4; } .fd-exit.live .fd-port.out { border-color: #7c5cff; background: #7c5cff; }
.fd-port.in { left: 50%; top: -9px; margin-left: -7px; }
.fd-x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.fd-x:hover { color: #dc2626; }
.fd-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); }
.fd-tool { border: 1px solid var(--line); background: var(--soft); border-radius: 7px; padding: 3px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fd-tool:hover { border-color: #7c5cff; color: #5b3fd6; }
.t-num { --fdc: #1f1147; } .t-ivr { --fdc: #7c5cff; } .t-ann { --fdc: #db2777; } .t-tc { --fdc: #2563eb; } .t-cfc { --fdc: #ea580c; } .t-ring { --fdc: #16a34a; }
.t-queue { --fdc: #0d9488; } .t-ext { --fdc: #475569; } .t-vm { --fdc: #ca8a04; } .t-misc { --fdc: #4f46e5; } .t-end { --fdc: #dc2626; } .t-other { --fdc: #94a3b8; }
.fd-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.fd-hist { margin-top: 14px; }
.fd-modal { position: fixed; inset: 0; background: rgba(15, 10, 40, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.fd-dlg { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
.fd-dlg h3 { font-size: 14px; margin: 14px 0 6px; }
.fd-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .fd-dlg-head h2 { margin: 0; }
.fd-audio { width: 100%; margin: 6px 0; }
.fd-palbtn[hidden] { display: none; }
@media (max-width: 900px) { .fd-pal { position: absolute; z-index: 6; height: 100%; box-shadow: 4px 0 20px rgba(0,0,0,.12); } .fd-stage { position: relative; height: 70vh; } .fd-legend { margin-left: 0; } }body.wide .wrap { max-width: none; }
/* phone-system picker on the dark Live board (was white text on a white box) */
.board .pbxsel { background-color: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .25); }
.board .pbxsel option, .board .pbxsel optgroup { background: #fff; color: #1a1530; }

/* staff panel â†’ Website (the website's own admin pages, framed) */
.site-frame { display: block; width: 100%; height: calc(100vh - 140px); min-height: 520px; margin-top: 8px; border: 1px solid var(--line, #e5e5ef); border-radius: 12px; background: #fff; }
/* temporary password box (Users & logins): copy buttons under the password */
.temp-pw .secret { margin: 8px 0; font-size: 18px; letter-spacing: .5px; }
.temp-pw .frow { margin-bottom: 6px; }
.copy-fallback { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
