:root {
  --brand: #2563eb;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --border: #e3e6eb; --text: #14171c; --muted: #6a7280;
  --good: #12805c; --good-bg: #e3f5ed; --warn: #b45309; --warn-bg: #fdf1dc; --bad: #c0262d; --bad-bg: #fde6e6; --info-bg: #e6effd;
  --s1: var(--brand); --s2: #7c3aed; --s3: #dc4b4b; --s4: #e0a32e;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
/* Night mode = "space" theme. The theme is chosen by the ☾/☀ button (data-theme on <html>). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #3fb6ff;
  --bg: #05070f; --surface: #0c1226; --surface-2: #121b36; --border: rgba(120, 160, 255, .16); --text: #e6ecff; --muted: #8592ba;
  --good: #39e68f; --good-bg: rgba(57, 255, 154, .10); --warn: #ffb547; --warn-bg: rgba(255, 181, 71, .12); --bad: #ff6b81; --bad-bg: rgba(255, 107, 129, .12); --info-bg: rgba(63, 182, 255, .12);
  --s1: #3fb6ff; --s2: #b47cff; --s3: #ff6b81; --s4: #ffb547;
  --shadow: 0 0 0 1px rgba(120, 160, 255, .06), 0 12px 40px rgba(0, 0, 0, .35);
}
:root[data-theme="dark"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 80% -10%, rgba(90, 60, 230, .26), transparent 60%),
    radial-gradient(700px 520px at -5% 110%, rgba(0, 200, 255, .13), transparent 60%),
    radial-gradient(1px 1px at 13px 27px, rgba(255,255,255,.8), transparent 50%),
    radial-gradient(1px 1px at 87px 141px, rgba(255,255,255,.55), transparent 50%),
    radial-gradient(1.4px 1.4px at 173px 63px, rgba(170,220,255,.8), transparent 50%),
    radial-gradient(1px 1px at 229px 199px, rgba(255,255,255,.45), transparent 50%),
    radial-gradient(1px 1px at 51px 233px, rgba(255,255,255,.6), transparent 50%),
    radial-gradient(1.2px 1.2px at 141px 11px, rgba(255,255,255,.7), transparent 50%);
  background-size: auto, auto, 260px 260px, 260px 260px, 260px 260px, 260px 260px, 260px 260px, 260px 260px;
  background-attachment: fixed;
}
:root[data-theme="dark"] .side, :root[data-theme="dark"] .top { background: rgba(6, 9, 20, .72); backdrop-filter: blur(10px); }
:root[data-theme="dark"] nav a.active { background: linear-gradient(90deg, rgba(63, 182, 255, .18), transparent); box-shadow: inset 2px 0 0 var(--brand); color: var(--text); }
:root[data-theme="dark"] .logo-mark { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #22e3ff 30%, #3b2bff 75%); box-shadow: 0 0 16px rgba(34, 227, 255, .6); }
:root[data-theme="dark"] .logo-mark::after { display: none; }
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .card, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .qcard, :root[data-theme="dark"] .table-wrap, :root[data-theme="dark"] .filters { background: rgba(12, 18, 38, .78); backdrop-filter: blur(8px); }
:root[data-theme="dark"] .btn.primary { color: #021018; box-shadow: 0 0 16px rgba(63, 182, 255, .35); }
:root[data-theme="dark"] .modal { background: #0c1226; border: 1px solid var(--border); }
:root[data-theme="dark"] .tbl th { background: rgba(18, 27, 54, .8); }
.theme-btn { font-size: 16px; line-height: 1; padding: 6px 9px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h3 { font-size: 15px; margin-bottom: 10px; }
h4 { font-size: 13px; margin: 16px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.hidden { display: none !important; } .grow { flex: 1; } .block { display: block; width: 100%; }
.warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.error-box { background: var(--bad-bg); color: var(--bad); padding: 12px 14px; border-radius: var(--radius); margin: 8px 0; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* layout */
.app { display: grid; grid-template-columns: var(--side-w, 204px) 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 18px 16px; }
.logo img { max-height: 32px; max-width: 120px; }
.logo b { display: block; font-size: 15px; } .logo small { color: var(--muted); font-size: 12px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 7px; border: 3px solid #fff; border-radius: 50%; }
nav { display: flex; flex-direction: column; padding: 4px 8px; gap: 2px; flex: 1; }
nav a, .side-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
nav a:hover, .side-foot a:hover { background: var(--surface-2); }
nav a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.ico { width: 18px; text-align: center; opacity: .8; }
.side-foot { padding: 8px; border-top: 1px solid var(--border); }
.linklike { background: none; border: 0; color: var(--muted); padding: 6px 10px; cursor: pointer; font: inherit; }
main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 18px; flex: 1; }
.top-right { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; }
.view { padding: 20px 24px 48px; max-width: 1500px; }
h2.section { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger, .btn.ghost.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 36px; width: 64px; }
textarea { width: 100%; }
.w60 { width: 64px; } .w80 { width: 84px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; }
.field input:not([type=checkbox]):not([type=color]), .field select { width: 100%; }
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 3px 12px 3px 0; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; padding: 6px 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; } .row.gap { gap: 10px; margin: 8px 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--good-bg); color: var(--good); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip { display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.st-available { background: var(--good-bg); color: var(--good); } .st-oncall { background: var(--info-bg); color: var(--brand); }
.st-ringing { background: var(--warn-bg); color: var(--warn); animation: pulse 1.2s infinite; } .st-paused { background: var(--warn-bg); color: var(--warn); }
.st-unavailable, .st-offline { background: var(--surface-2); color: var(--muted); }
.out-answered { background: var(--good-bg); color: var(--good); } .out-abandoned { background: var(--bad-bg); color: var(--bad); }
.out-timeout, .out-exitempty { background: var(--warn-bg); color: var(--warn); } .out-ongoing { background: var(--info-bg); color: var(--brand); }
@keyframes pulse { 50% { opacity: .55; } }

/* panels & tables */
.panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0; }
.panel.narrow { max-width: 560px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 .panel { margin: 0; } .grid2.tight { gap: 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card p { margin: 6px 0 12px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel .table-wrap { border: 0; border-radius: 0; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.compact td, .tbl.compact th { padding: 4px 8px; }
.tbl td.actions { text-align: right; white-space: nowrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin-bottom: 12px; }
.kv span { color: var(--muted); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpis.small { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-top: 3px solid var(--border); }
.kpi.good { border-top-color: var(--good); } .kpi.warn { border-top-color: var(--warn); } .kpi.crit { border-top-color: var(--bad); }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi-value small { font-size: 15px; color: var(--muted); font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpis.small .kpi { padding: 10px 12px; } .kpis.small .kpi-value { font-size: 20px; }

/* realtime */
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.qcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border-left: 4px solid var(--good); }
.qcard.busy { border-left-color: var(--warn); }
.qhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.qstats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.qstats span { display: block; font-size: 11px; color: var(--muted); }
.qstats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.waitlist { list-style: none; margin: 12px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); }
.waitlist li { display: flex; gap: 10px; padding: 3px 0; align-items: center; }
.waitlist li span:nth-child(2) { flex: 1; }
.waitlist b { font-variant-numeric: tabular-nums; color: var(--warn); }
.pos { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 11px; display: grid; place-items: center; }

/* reports */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); padding: 12px; border-radius: var(--radius); margin-bottom: 12px; }
.filters label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.presets { display: flex; gap: 4px; flex-wrap: wrap; width: 100%; }
.ms { position: relative; }
.ms summary { cursor: pointer; list-style: none; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.ms summary span { color: var(--text); font-weight: 600; }
.ms-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px; max-height: 320px; overflow-y: auto; min-width: 240px; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ms-list .chk { margin: 0; padding: 4px 6px; color: var(--text); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button, .tabs a { background: none; border: 0; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs .active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .ylab { font-size: 10px; fill: var(--muted); text-anchor: end; }
.chart .xlab { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.chart rect.s1, .legend i.s1, .hbar-f.s1 { fill: var(--s1); background: var(--s1); }
.chart rect.s2, .legend i.s2 { fill: var(--s2); background: var(--s2); }
.chart rect.s3, .legend i.s3, .hbar-f.s3 { fill: var(--s3); background: var(--s3); }
.chart rect.s4, .legend i.s4 { fill: var(--s4); background: var(--s4); }
.chart .line { fill: none; stroke-width: 2; } .chart .line.s1 { stroke: var(--s1); } .chart .line.s3 { stroke: var(--s3); }
.chart .dot.s1 { fill: var(--s1); } .chart .dot.s3 { fill: var(--s3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 5px; }
.hbar { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; }
.hbar-t { background: var(--surface-2); border-radius: 4px; height: 14px; overflow: hidden; }
.hbar-f { display: block; height: 100%; border-radius: 4px; }
.hbar-v { text-align: right; font-variant-numeric: tabular-nums; }
.hbar-l { color: var(--muted); }
.timeline { padding-left: 18px; margin: 0; } .timeline li { margin: 3px 0; }
audio { width: 100%; margin: 6px 0; }

/* agent page */
.agent-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.agent-grid .panel { margin: 0; } .ap-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; } .span2 { grid-column: 1 / -1; }
.big-status { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-radius: var(--radius); margin-bottom: 12px; }
.big-status small { display: block; opacity: .8; } .big-status b { font-size: 22px; } .big-status > span { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.callbox { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; font-size: 16px; }
.callbox.ring { border-color: var(--warn); animation: pulse 1.2s infinite; }
.queue-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.qtoggle { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.qtoggle small { color: var(--muted); }
.qtoggle.on { border-color: var(--good); background: var(--good-bg); }
.qtoggle.on small { color: var(--good); font-weight: 600; }
.pause-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.msgs, .plain { list-style: none; padding: 0; margin: 0; }
.msgs li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: var(--surface-2); cursor: default; }
.msgs li.unread { background: var(--info-bg); cursor: pointer; border-left: 3px solid var(--brand); }
.msgs p { margin: 4px 0 0; }
.plain li { padding: 4px 0; }
.softphone .sp-state { margin-bottom: 8px; color: var(--muted); }
.dtmf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 200px; margin-top: 8px; }

/* QA */
.form-builder fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 12px 0; padding: 10px 14px; }
.fb-title { font-weight: 600; }
.fb-q { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.eq { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg label { cursor: pointer; } .seg input { display: none; }
.seg span { display: block; padding: 5px 11px; border-right: 1px solid var(--border); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:disabled + span { cursor: default; }
.score { padding: 18px; border-radius: var(--radius); text-align: center; margin-bottom: 8px; }
.score b { font-size: 40px; display: block; } .score.good { background: var(--good-bg); color: var(--good); } .score.warn { background: var(--warn-bg); color: var(--warn); } .score.crit { background: var(--bad-bg); color: var(--bad); }
.note { background: var(--surface-2); padding: 10px; border-radius: 8px; white-space: pre-wrap; }

/* modal & toast */
.modal-wrap { position: fixed; inset: 0; background: rgba(10, 14, 20, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 12px; width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(760px, 100%); }
.modal header, .modal footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.modal header { border-bottom: 1px solid var(--border); justify-content: space-between; }
.modal footer { border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.radio-list label { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.radio-list hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.steps li { margin: 4px 0; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; max-width: 380px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); color: #fff; } .toast.info { background: var(--brand); color: #fff; }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 50%), var(--bg); }
.login-card { background: var(--surface); padding: 28px; border-radius: 14px; width: min(380px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.08); border: 1px solid var(--border); }
.login-card .logo { padding: 0 0 18px; } .login-card h2 { margin-bottom: 14px; font-size: 20px; }

/* wallboard */
.wallboard { background: #0b0e12; color: #f2f4f7; border-radius: var(--radius); padding: 18px; min-height: 70vh; display: flex; flex-direction: column; gap: 16px; }
.wallboard:fullscreen, .public-wb .wallboard { border-radius: 0; min-height: 100vh; padding: 2vw; }
.wallboard header { display: flex; align-items: center; gap: 16px; font-size: clamp(16px, 1.6vw, 30px); }
.wallboard header b { flex: 1; } .wallboard header span { opacity: .65; }
.wb-clock { font-variant-numeric: tabular-nums; opacity: 1 !important; }
.wb-conn { width: 14px; height: 14px; border-radius: 50%; background: #34d399; }
.wb-conn.bad { background: #f87171; animation: pulse 1s infinite; }
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 15vw, 320px), 1fr)); gap: 1.2vw; }
.wb-tile { background: #161b22; border-radius: 12px; padding: 1.2vw 1.4vw; border-bottom: 6px solid #2b323c; }
.wb-tile.good { border-bottom-color: #34d399; } .wb-tile.warn { border-bottom-color: #fbbf24; background: #2a2210; } .wb-tile.crit { border-bottom-color: #f87171; background: #301417; animation: pulse 2s infinite; }
.wb-label { font-size: clamp(13px, 1.2vw, 24px); opacity: .7; }
.wb-value { font-size: clamp(36px, 5vw, 110px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wb-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 12vw, 260px), 1fr)); gap: .8vw; }
.wb-agent { border-radius: 10px; padding: .8vw 1vw; display: flex; flex-direction: column; font-size: clamp(12px, 1vw, 20px); }
.wb-agent b { font-size: 1.15em; } .wb-agent i { font-style: normal; font-variant-numeric: tabular-nums; opacity: .85; }
.wb-agent.st-available { background: #0f3b2c; color: #a7f3d0; } .wb-agent.st-oncall { background: #13294b; color: #bfdbfe; }
.wb-agent.st-ringing { background: #3b2f0b; color: #fde68a; } .wb-agent.st-paused { background: #3b2a12; color: #fcd34d; }
.wb-agent.st-unavailable, .wb-agent.st-offline { background: #1f242c; color: #9ca3af; }
.public-wb { background: #0b0e12; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 250px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: block; }
  .view { padding: 14px 12px 40px; }
  .top { padding: 10px 12px; }
  .grid2, .agent-grid { grid-template-columns: 1fr; }
  .qstats { grid-template-columns: repeat(3, 1fr); }
  .kpis.small { grid-template-columns: repeat(2, 1fr); }
}

/* CDR */
.cdr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cdr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.cf { display: flex; flex-direction: column; gap: 4px; }
.cf > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }
.cf input { width: 100%; }
.nowrap { white-space: nowrap; flex-wrap: nowrap; }
.row.nowrap input { min-width: 0; }
.cdr-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 12px; }
.cdr-checks > span { font-size: 12px; font-weight: 600; color: var(--muted); width: 110px; }
.cdr-summary { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; margin: 4px 0 10px; }
.tbl.cdr td { padding: 7px 10px; }
.cdr-row { cursor: default; }
.cdr-row:has(.caret) { cursor: pointer; }
.cdr-row:hover { background: var(--surface-2); }
.cdr-row.open { background: var(--surface-2); }
.caret { color: var(--muted); }
.w24 { width: 24px; }
th.sortable { cursor: pointer; user-select: none; }
.st-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.st-ic.ok { background: var(--good-bg); color: var(--good); } .st-ic.bad { background: var(--bad-bg); color: var(--bad); }
.st-ic.warn { background: var(--warn-bg); color: var(--warn); } .st-ic.muted { background: var(--surface-2); color: var(--muted); }
.cdr-detail td { background: var(--surface-2); }
.cdr-det { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.cdr-det .rec { display: flex; align-items: center; gap: 10px; }
.cdr-det audio { max-width: 420px; margin: 0; }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rawf summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.rawf .tbl td { white-space: nowrap; }

.ms-field summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); color: var(--text); min-height: 36px; }
.ms-field summary::-webkit-details-marker { display: none; }
.ms-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-caret { color: var(--muted); font-size: 11px; }
.ms-field .ms-list { min-width: 100%; max-width: 420px; }
.ms-list .chk { display: flex; gap: 8px; align-items: center; }
.ms-list .chk small { margin-left: auto; }
.ms-search { margin: 2px 0 6px; width: 100%; }
.ms-actions { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; text-align: right; }
.ms-field summary span { font-weight: 500; }
.cf .ms-list input[type=checkbox] { width: auto; flex: none; }
.ms-list .chk .grow { text-align: left; }

.ivr-chip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: color-mix(in srgb, var(--s2) 14%, transparent); color: var(--text); font-size: 12px; margin-right: 3px; }
.ivr-chip b { color: var(--s2); }
.route { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.route-step { border: 1px solid var(--border); border-left: 3px solid var(--muted); background: var(--surface); border-radius: 8px; padding: 6px 10px; min-width: 110px; }
.route-step.k-ivr { border-left-color: var(--s2); } .route-step.k-queue { border-left-color: var(--s1); } .route-step.k-ringgroup { border-left-color: var(--s4); } .route-step.k-ext { border-left-color: var(--good); }
.route-arrow { align-self: center; color: var(--muted); }

.login-page { position: relative; }
.login-theme { position: absolute; top: 16px; right: 16px; }

/* ---------- Monitor ---------- */
.mon-wrap, .top-lead, .top-extra { --m-cyan: #0891b2; --m-green: #16a34a; --m-amber: #d97706; --m-violet: #7c3aed; --m-node: #fff; --m-line: var(--border); }
:root[data-theme="dark"] .mon-wrap, :root[data-theme="dark"] .top-lead, :root[data-theme="dark"] .top-extra { --m-cyan: #22e3ff; --m-green: #39ff9a; --m-amber: #ffb547; --m-violet: #b47cff; --m-node: rgba(10, 16, 36, .94); --m-line: rgba(120, 160, 255, .12); }
.view-monitor { max-width: none; }
.mon-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.mon-title { display: none; margin: 0; font-size: 22px; font-weight: 600; letter-spacing: .02em; }
.mon-title span { color: var(--m-cyan); }
:root[data-theme="dark"] .mon-title span { text-shadow: 0 0 14px rgba(34, 227, 255, .8); }
.mon-wrap:fullscreen .mon-title { display: block; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--m-green); border: 1px solid color-mix(in srgb, var(--m-green) 40%, transparent); padding: 4px 10px; border-radius: 999px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--m-green); animation: pulse 1.4s infinite; }
:root[data-theme="dark"] .live i { box-shadow: 0 0 10px var(--m-green); }
.live.off { color: var(--bad); border-color: var(--bad); } .live.off i { background: var(--bad); }
.mon-stats { display: flex; gap: 22px; margin-left: auto; }
.mon-stats div { text-align: right; }
.mon-stats b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.mon-stats small { color: var(--muted); font-size: 11.5px; letter-spacing: .02em; }
.mon-stats .c-ring { color: var(--m-amber); } .mon-stats .c-talk { color: var(--m-green); }
.mon-wrap:fullscreen { background: var(--bg); padding: 22px 28px; overflow: auto; }
:root[data-theme="dark"] .mon-wrap:fullscreen { background-image: radial-gradient(900px 520px at 80% -10%, rgba(90, 60, 230, .26), transparent 60%), radial-gradient(700px 520px at -5% 110%, rgba(0, 200, 255, .13), transparent 60%), radial-gradient(1px 1px at 13px 27px, rgba(255,255,255,.8), transparent 50%), radial-gradient(1px 1px at 87px 141px, rgba(255,255,255,.55), transparent 50%), radial-gradient(1.4px 1.4px at 173px 63px, rgba(170,220,255,.8), transparent 50%), radial-gradient(1px 1px at 229px 199px, rgba(255,255,255,.45), transparent 50%); background-size: auto, auto, 260px 260px, 260px 260px, 260px 260px, 260px 260px; }
.mpbx { margin-bottom: 18px; }
.mpbx-h { display: flex; align-items: center; gap: 10px; margin: 0 2px 8px; }
.mpbx-h b { font-size: 14px; letter-spacing: .01em; }
.mscroll { overflow-x: auto; overflow-y: hidden; overflow-y: clip; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
:root[data-theme="dark"] .mscroll { background: rgba(14, 20, 40, .72); backdrop-filter: blur(12px); }
.mboard { position: relative; min-width: 1060px; overflow: hidden; contain: paint; }
.mhead, .mrow { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr 1.2fr 1fr 1.1fr; position: relative; z-index: 2; }
.mh { padding: 12px 14px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); border-bottom: 1px solid var(--border); }
.mh.in { color: var(--m-cyan); } .mh.out { color: var(--m-violet); }
.mrow { border-bottom: 1px solid var(--m-line); }
.mrow:last-child { border-bottom: 0; }
.mc { padding: 14px; min-height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }
.mn { display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 12px; border-radius: 12px; white-space: nowrap; font-size: 13px; background: var(--m-node); border: 1.5px solid var(--border); }
.mn small { color: var(--muted); font-size: 10.5px; }
.mn .t { font-variant-numeric: tabular-nums; }
.mn .row1 { display: flex; gap: 4px; margin: 2px 0 1px; }
.mn.trunk { border-color: color-mix(in srgb, var(--m-cyan) 50%, transparent); }
.mn.caller { border-color: var(--m-cyan); }
.mn.group { border-color: var(--m-amber); }
.mn.group.g-ivr { border-color: var(--m-cyan); border-style: dashed; }
.mn.ext.talk { border-color: var(--m-green); }
.mn.ext.ring { border-color: var(--m-amber); animation: ringglow 1.1s ease-in-out infinite; }
.mn.ext.hold { border-color: var(--muted); border-style: dashed; }
.mn.outnum { border-color: var(--m-violet); }
.mn.tout { border-color: color-mix(in srgb, var(--m-violet) 55%, transparent); }
:root[data-theme="dark"] .mn.trunk { box-shadow: 0 0 14px rgba(34, 227, 255, .13); }
:root[data-theme="dark"] .mn.caller { box-shadow: 0 0 18px rgba(34, 227, 255, .25); }
:root[data-theme="dark"] .mn.group { box-shadow: 0 0 16px rgba(255, 181, 71, .18); }
:root[data-theme="dark"] .mn.ext.talk { box-shadow: 0 0 20px rgba(57, 255, 154, .25); }
:root[data-theme="dark"] .mn.outnum { box-shadow: 0 0 18px rgba(180, 124, 255, .25); }
@keyframes ringglow { 50% { box-shadow: 0 0 22px color-mix(in srgb, var(--m-amber) 60%, transparent); } }
.chip2 { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 1px 6px; border-radius: 4px; }
.k-ring { color: var(--m-amber); background: color-mix(in srgb, var(--m-amber) 14%, transparent); }
.k-talk { color: var(--m-green); background: color-mix(in srgb, var(--m-green) 12%, transparent); }
.k-hold { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.k-xfer { color: var(--m-cyan); background: color-mix(in srgb, var(--m-cyan) 12%, transparent); }
.k-conf { color: var(--m-violet); background: color-mix(in srgb, var(--m-violet) 14%, transparent); }
.k-int { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
svg.mw { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
svg.mw path { fill: none !important; stroke-linecap: round; }
svg.mw .wire { stroke-width: 2.2; }
svg.mw .halo { stroke-width: 9; stroke-opacity: 0; }
:root[data-theme="dark"] svg.mw .halo { stroke-opacity: .16; }
svg.mw .w-talk { stroke: var(--m-green); fill: var(--m-green); }
svg.mw .w-ring { stroke: var(--m-amber); fill: var(--m-amber); }
svg.mw .w-wait { stroke: var(--m-cyan); fill: var(--m-cyan); }
svg.mw .w-out.w-talk { stroke: var(--m-violet); fill: var(--m-violet); }
svg.mw .w-out.w-ring { stroke: var(--m-violet); fill: var(--m-violet); }
svg.mw path.w-ring, svg.mw path.w-wait { stroke-dasharray: 8 7; animation: dashflow 1s linear infinite; }
svg.mw path.halo { fill: none; }
svg.mw .tip { stroke: none; }
svg.mw .photon { stroke: none; }
svg.mw .photon.w-talk { fill: var(--m-green); } svg.mw .photon.w-out { fill: var(--m-violet); }
:root[data-theme="dark"] svg.mw .photon { fill: #fff; }
:root[data-theme="dark"] svg.mw .wire { filter: drop-shadow(0 0 3px currentColor); }
:root[data-theme="dark"] svg.mw .w-talk.wire { color: var(--m-green); } :root[data-theme="dark"] svg.mw .w-out.wire { color: var(--m-violet); }
:root[data-theme="dark"] svg.mw .w-ring.wire { color: var(--m-amber); } :root[data-theme="dark"] svg.mw .w-wait.wire { color: var(--m-cyan); }
:root[data-theme="dark"] svg.mw .photon { filter: drop-shadow(0 0 4px #fff); }
@keyframes dashflow { to { stroke-dashoffset: -15; } }
.mon-empty { padding: 34px; text-align: center; color: var(--muted); letter-spacing: .04em; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: .15s; }
.switch span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::before { transform: translateX(16px); }
.fs-btn { min-width: 34px; font-size: 16px; line-height: 1; padding: 6px 9px; }

/* CallVision logo per theme */
.logo { flex-direction: column; align-items: flex-start; gap: 4px; }
.logo .brand-logo img { display: block; height: 36px; width: auto; max-width: 196px; max-height: none; object-fit: contain; object-position: left; }
.logo .brand-logo img.lg-dark { display: none; }
:root[data-theme="dark"] .logo .brand-logo img.lg-light { display: none; }
:root[data-theme="dark"] .logo .brand-logo img.lg-dark { display: block; }
.brand-wrap { display: inline-block; }
/* centred under the "CallVision.gr" lettering (it starts at 28.4% of the logo, after the headset mark) */
.logo small.by { display: block; padding-left: 28.4%; text-align: center; margin-top: -4%; line-height: 1.2; color: var(--muted); font-size: 11.5px; letter-spacing: .02em; white-space: nowrap; }
.login-card .logo .brand-logo img { height: 52px; max-width: 260px; }

/* customer identity under the CallVision logo */
.tenant-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: 10px 16px 10px; padding: 16px 0 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tenant-id img { display: block; max-height: 44px; max-width: 180px; width: auto; object-fit: contain; }
.tenant-id b { font-size: 14px; font-weight: 600; line-height: 1.3; }

/* login: dark blue with drifting vector lines (canvas) */
.login-page { background: radial-gradient(ellipse at 30% 20%, #10306b 0%, transparent 55%), radial-gradient(ellipse at 80% 90%, #0b2a5e 0%, transparent 50%), linear-gradient(160deg, #061433 0%, #04102a 55%, #020a1d 100%) !important; overflow: hidden; }
.login-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.login-card, .login-theme { position: relative; z-index: 1; }
.login-theme { position: absolute; }
.login-card { box-shadow: 0 24px 80px rgba(0, 8, 30, .55); }
.login-card .logo { align-items: center; padding: 4px 0 24px; }
.login-theme { background: rgba(255,255,255,.08); color: #e6efff; border-color: rgba(255,255,255,.18); }

/* side menu: user + logout right under the menu, collapsible to icons only */
.side nav { flex: 0 0 auto; }
.side-user { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 8px; margin: 6px 8px 0; border-top: 1px solid var(--border); }
.side-user a, .side-logout { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.side-user a:hover, .side-logout:hover { background: var(--surface-2); }
.side-user a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.side-logout { margin-top: 0; background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.side-logout:hover { color: var(--bad, #dc2626); }
@media (min-width: 901px) { .side { position: sticky; z-index: 12; } }
.side-toggle { position: absolute; top: 22px; right: -13px; z-index: 6; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 18px; line-height: 22px; padding: 0; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: grid; place-items: center; }
.side-toggle:hover { color: var(--brand); border-color: var(--brand); }
:root[data-theme="dark"] .side-toggle { background: #0d1530; }
.brand-mark { display: none; }
.brand-mark img { display: block; height: 34px; width: auto; }
.brand-mark img.lg-dark { display: none; }
:root[data-theme="dark"] .brand-mark img.lg-light { display: none; }
:root[data-theme="dark"] .brand-mark img.lg-dark { display: block; }
.app { transition: grid-template-columns .18s ease; }
@media (min-width: 901px) {
  .side-mini .app { grid-template-columns: 68px 1fr; }
  .side-mini .side .lbl, .side-mini .side .brand-wrap, .side-mini .side .tenant-id { display: none; }
  .side-mini .side .brand-mark { display: block; }
  .side-mini .side .logo { align-items: center; padding: 18px 0 14px; }
  .side-mini .side nav, .side-mini .side .side-user { align-items: center; }
  .side-mini .side nav a, .side-mini .side .side-user a, .side-mini .side .side-logout { justify-content: center; width: 44px; padding: 9px 0; }
  .side-mini .side .side-user { margin: 6px 6px 0; padding: 10px 0 8px; }
  .side-mini .side .ico { width: auto; font-size: 16px; }
}
@media (max-width: 900px) { .side-toggle { display: none; } }

/* phones: bigger touch targets and icons */
@media (max-width: 900px) {
  .side { position: fixed; z-index: 40; overflow-y: auto; width: 270px; }
  .menu-btn { font-size: 24px; padding: 6px 10px; color: var(--text); }
  .side nav a, .side-user a, .side-logout { padding: 11px 12px; font-size: 16px; }
  .side .ico { width: 24px; font-size: 18px; }
  .top h1 { font-size: 19px; line-height: 1.2; }
  .top .theme-btn { font-size: 18px; padding: 6px 10px; }
  .top-right { gap: 8px; }
  .top-right .pill { font-size: 12px; white-space: nowrap; }
  .nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; }
}

/* Monitor on phones: every call top-to-bottom */
.mboard.vert { min-width: 0; }
.mboard.vert .mhead { display: none; }
.mboard.vert .mrow { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 18px 10px 24px; }
.mboard.vert .mc { padding: 0; min-height: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; }
.mboard.vert .mc:empty { display: none; }
.mboard.vert .mn { white-space: normal; text-align: center; align-items: center; max-width: 100%; }
.mpbx-h .pill { white-space: nowrap; }
@media (max-width: 600px) {
  .mon-stats { gap: 16px; margin-left: 0; width: 100%; justify-content: space-between; }
  .mon-stats div { text-align: center; }
}

/* text size (A A A button): scales the menu and the page content */
:root { --fz: 1; }
main, .side > * { zoom: var(--fz); }
.app { grid-template-columns: calc(var(--side-w, 204px) * var(--fz)) 1fr; }
@media (min-width: 901px) { .side-mini .app { grid-template-columns: calc(68px * var(--fz)) 1fr; } }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; } .side { width: min(calc(270px * var(--fz)), 84vw); } }
.font-btn { display: inline-flex; align-items: baseline; gap: 1px; font-weight: 700; line-height: 1; padding: 5px 9px; }
.font-btn .a1 { font-size: 10px; } .font-btn .a2 { font-size: 13px; } .font-btn .a3 { font-size: 16px; }
:root[data-fz="1"] .font-btn .a1, :root[data-fz="2"] .font-btn .a2, :root[data-fz="3"] .font-btn .a3 { color: var(--brand); }
@media (max-width: 600px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top h1 { flex: 1 0 auto; white-space: nowrap; }
  /* PBX connection status as a coloured dot (tap/hover shows the text) */
  /* PBX connection status: «PBX 7/7» like the PBX button of Live Vision (tap/hover shows the details) */
  #conn-pill { font-size: 13px; padding: 5px 12px; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: transparent; flex: none; }
  :root[data-theme="dark"] #conn-pill { box-shadow: 0 0 10px color-mix(in srgb, currentColor 25%, transparent); }
  :root[data-theme="dark"] #conn-pill.ok { color: #39ff9a; }
  :root[data-theme="dark"] #conn-pill.warn { color: #fbbf24; }
  #conn-pill .cp-long { display: none; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
}

/* clock under the CallVision logo */
.side-clock { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; letter-spacing: .03em; }
.side-clock.full { display: block; text-align: center; margin-top: 12px; font-size: 14px; }
.side-clock.short { display: none; font-size: 12.5px; margin-top: 8px; text-align: center; }
.side-sep { margin: 4px 16px 10px; border-top: 1px solid var(--border); }
.side .nav-sep { margin: 6px 16px; border-top: 1px solid var(--border); }
.side-staff { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
@media (min-width: 901px) {
  .side-mini .side .side-clock.short { display: block; }
  .side-mini .side .side-sep { margin: 4px 10px 10px; }
  .side-mini .side .side-staff { align-items: center; }
}

@media (max-width: 900px) {
  .side { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .nav-open::after { touch-action: none; }
}
/* sidebar: CallVision logo, "by" line and clock centred in the menu */
.side .logo { align-items: center; padding-left: 12px; padding-right: 12px; }
.side .brand-wrap { display: block; width: fit-content; margin: 0 auto; }
@media (min-width: 901px) {
  .side-mini .side .logo { align-items: center; padding-left: 0; padding-right: 0; }
  .side-mini .side .brand-mark { margin: 0 auto; }
  .side-mini .side .brand-mark img { margin: 0 auto; }
  .side-mini .side nav, .side-mini .side .side-user, .side-mini .side .side-staff { align-items: center; }
  .side-mini .side nav { padding-left: 0; padding-right: 0; }
  .side-mini .side .side-user { margin-left: 0; margin-right: 0; }
}

/* Monitor columns share the available width; when the window narrows they shrink down to their content,
   leaving just enough room for the lines, before a horizontal scrollbar appears */
.mboard { min-width: max-content; display: grid; grid-template-columns: repeat(6, minmax(max-content, auto)); }
.mboard > .mhead, .mboard > .mrows { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.mboard > .mrows > .mrow { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.mboard > .mrows > .mon-empty { grid-column: 1 / -1; }
.mboard .mc { padding: 14px 17px; }
.mboard .mc:first-child, .mboard .mh:first-child { padding-left: 14px; }
.mboard .mh { padding: 12px 17px; white-space: nowrap; }
/* phones: top-to-bottom layout keeps its own rules */
.mboard.vert, .mboard.vert > .mrows { display: block; }
.mboard.vert > .mrows > .mrow { display: flex; }
.mboard.vert { min-width: 0; }
.mboard .mc { padding: 14px 14px; }
.mboard .mh { padding: 12px 14px; white-space: normal; letter-spacing: .02em; }
/* column titles never widen a column: the calls decide the width (titles wrap if needed) */
.mboard .mh { contain: inline-size; min-width: 112px; overflow-wrap: anywhere; }
/* a column may grow a little to use spare room, but not so much that the lines become long */
.mboard { grid-template-columns: repeat(6, minmax(max-content, 230px)); justify-content: start; }
.mboard.vert { grid-template-columns: none; }
.mboard:not(.vert) { min-width: min-content; }
/* compact: each column is as wide as its widest call box, lines between columns stay short */
.mboard:not(.vert) { grid-template-columns: repeat(6, max-content); }
.mboard .mc { padding: 14px 24px 14px 0; }
.mboard .mc:first-child { padding-left: 14px; }
.mboard .mh { padding: 12px 24px 12px 0; min-width: 96px; }
.mboard .mh:first-child { padding-left: 14px; }
.mboard:not(.vert) { grid-template-columns: repeat(6, max-content) 1fr; width: 100%; }
.mboard .mc { padding-right: 52px; }
.mboard .mh { padding-right: 52px; min-width: 108px; overflow-wrap: normal; }
.mboard:not(.vert) { column-gap: 34px; padding-left: 14px; }
.mboard .mc, .mboard .mc:first-child { padding: 14px 0; }
.mboard .mh, .mboard .mh:first-child { padding: 12px 0; min-width: 104px; }
.mboard > .mhead, .mboard > .mrows, .mboard > .mrows > .mrow { margin-left: -14px; padding-left: 14px; }
.mboard:not(.vert) .mh { border-bottom: 0; }
.mboard:not(.vert) > .mhead { border-bottom: 1px solid var(--border); }
.mboard.vert .mc, .mboard.vert .mc:first-child { padding: 0; } .mboard.vert > .mhead, .mboard.vert > .mrows, .mboard.vert > .mrows > .mrow { margin-left: 0; }
/* fill the whole width: spare room is shared equally between the columns (longer lines);
   when the window narrows the lines shrink first, down to 34px, before any scrollbar */
.mboard:not(.vert) { grid-template-columns: repeat(6, minmax(max-content, auto)); width: 100%; min-width: min-content; padding-right: 14px; }
.mboard:not(.vert) { justify-content: stretch; }

.install-btn { display: inline-flex; align-items: center; gap: 6px; }
.install-btn[hidden] { display: none; }
.install-btn span:first-child { font-size: 15px; line-height: 1; }
@media (max-width: 600px) { .install-btn .lbl-i { display: none; } }

/* text size / day-night / install: one row under the menu; stacked when the menu is collapsed */
.side-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 18px 4px; }
.side-tools .btn { height: 32px; }
.side-tools .theme-btn { width: 36px; padding: 0; display: inline-grid; place-items: center; font-size: 15px; }
@media (min-width: 901px) {
  .side-mini .side .side-tools { flex-direction: column; padding: 8px 0 4px; }
  .side-mini .side .side-tools .btn { width: 44px; justify-content: center; padding: 0; }
  .side-mini .side .install-btn .lbl-i { display: none; }
}
@media (max-width: 900px) { .side-tools .btn { height: 38px; } .side-tools .theme-btn { width: 42px; font-size: 18px; } .install-btn .lbl-i { display: inline; } }
.side-tools { flex-wrap: nowrap; gap: 5px; padding: 8px 12px 4px; }
.side-tools .install-btn { padding: 0 9px; gap: 5px; white-space: nowrap; }
.side-tools .font-btn { padding: 0 8px; }

/* side tools: AAA centred in its box, a bit more room between the buttons, left edge in line with the menu icons */
.font-btn { display: inline-grid; place-items: center; }
.font-btn .aaa { display: inline-flex; align-items: baseline; gap: 1px; line-height: 1; transform: translateY(1px); }
.side-tools { gap: 10px; padding: 8px 12px 4px 16px; }
@media (min-width: 901px) { .side-mini .side .side-tools { gap: 8px; padding: 8px 0 4px; } }
.side-tools { padding-left: 18px; }
@media (min-width: 901px) { .side-mini .side .side-tools { padding-left: 0; } }

/* full screen (real, or laid over the window on iPhone) */
.fs-title { display: none; margin: 0 0 12px; font-size: 20px; }
.is-fs .fs-title { display: block; }
.rt-wrap:fullscreen, .rt-wrap:-webkit-full-screen { background: var(--bg); padding: 22px 28px; overflow: auto; }
.wallboard:-webkit-full-screen { border-radius: 0; min-height: 100vh; padding: 2vw; }
.pseudo-fs { position: fixed !important; inset: 0; z-index: 200; margin: 0 !important; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background-color: var(--bg); border-radius: 0 !important; min-height: 0 !important; height: 100vh; height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); zoom: 1; }
.wallboard.pseudo-fs { padding: max(2vw, env(safe-area-inset-top)) 2vw 2vw; }
.mon-wrap.pseudo-fs .mon-title { display: block; }
body.pseudo-fs-on { overflow: hidden; }
.fs-exit { position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); z-index: 210; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.fs-btn { min-width: 34px; font-size: 16px; line-height: 1; }
/* a bit more room between the three tools under the menu */
.side-tools { gap: 14px; }
@media (min-width: 901px) { .side-mini .side .side-tools { gap: 10px; } }
.wallboard.pseudo-fs > header { padding-right: 52px; }
/* dark theme: menu column and top bar a shade lighter than the page */
:root[data-theme="dark"] .side, :root[data-theme="dark"] .top { background: #0f1830; }
:root[data-theme="dark"] .side { border-right-color: rgba(120, 160, 255, .14); }
@media (max-width: 900px) { :root[data-theme="dark"] .side { background: #0f1830; } }
.side-tools [hidden] { display: none !important; }
.mon-wrap.is-fs .mon-top, .wallboard.is-fs > header, .rt-wrap.is-fs .fs-title { padding-right: 52px; }
.fs-btn .fs-ico { display: block; } .side-tools .fs-btn { width: 36px; padding: 0; display: inline-grid; place-items: center; }
.tbl.cdr .trunk-cell { white-space: nowrap; font-size: 13px; }
.rg-chip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: color-mix(in srgb, #f59e0b 16%, transparent); color: var(--text); font-size: 12px; margin-right: 3px; }

/* customer logo: never larger than the CallVision logo with its mark (164 × 36) */
.tenant-id img { max-height: 36px !important; max-width: 164px !important; height: auto; width: auto; }
.logo-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-prev { min-width: 164px; height: 48px; display: grid; place-items: center; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); }
.logo-prev img { max-height: 36px; max-width: 164px; display: block; }
.logo-up label.btn { cursor: pointer; }
/* side: refresh / about / build */
.side-user a.side-about { margin-top: 2px; color: var(--muted); }
.side-refresh { margin-top: 2px !important; color: var(--muted); }
.side-refresh.spin .ico { display: inline-block; animation: cvspin .8s linear infinite; }
@keyframes cvspin { to { transform: rotate(360deg); } }
.side-build { padding: 4px 10px 6px 38px; font-size: 11.5px; color: var(--muted); opacity: .8; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (min-width: 901px) {
  .side-mini .side .side-build { padding: 4px 0; text-align: center; font-size: 10px; }
}
/* about page */
.about { max-width: 640px; }
.about-logo { display: inline-flex; flex-direction: column; align-items: center; margin-bottom: 14px; }
.about-logo img { height: 52px; width: auto; display: block; }
.about-logo .lg-dark { display: none; }
:root[data-theme="dark"] .about-logo .lg-light { display: none; }
:root[data-theme="dark"] .about-logo .lg-dark { display: block; }
.about-logo small { color: var(--muted); padding-left: 28%; }
.about-lead { margin: 0 0 14px; }
.about-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 16px; }
.about-dl dt { color: var(--muted); }
.about-dl dd { margin: 0; }

/* customer logo per theme */
.tenant-id img.lg-dark { display: none; }
:root[data-theme="dark"] .tenant-id img.lg-light { display: none; }
:root[data-theme="dark"] .tenant-id img.lg-dark { display: block; }
.panel.narrow.settings-form { max-width: 780px; }
.logo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 4px; }
@media (max-width: 760px) { .logo-pair { grid-template-columns: 1fr; } }
.logo-slot { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.logo-slot legend { padding: 0 6px; font-size: 13px; font-weight: 600; }
.logo-slot .field { margin-top: 4px; }
.logo-slot.is-light .logo-prev { background: #ffffff; border-color: #d9dee8; }
.logo-slot.is-dark .logo-prev { background: #0f1830; border-color: rgba(120,160,255,.25); }
.logo-slot.is-light .logo-prev .muted { color: #6a7280; } .logo-slot.is-dark .logo-prev .muted { color: #8592ba; }
.logo-note { margin: 2px 0 12px; }

.name-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.name-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.name-form input { min-width: 220px; }
.name-form input { font-weight: 400; }

/* build number pinned to the very bottom of the menu */
.side > .side-build { margin-top: auto; padding: 14px 10px 14px 46px; border-top: 0; }
@media (min-width: 901px) { .side-mini .side > .side-build { padding: 12px 0; text-align: center; } }

.info-box.pw-confirm { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: color-mix(in srgb, #3b82f6 14%, transparent); border: 1px solid color-mix(in srgb, #3b82f6 35%, transparent); }
.info-box.pw-confirm.expired { background: color-mix(in srgb, #f59e0b 14%, transparent); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }

.sync-cell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.sync-cell small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.pill.warn { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
:root[data-theme="dark"] .pill.warn { color: #fbbf24; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sync-btn { font-size: 17px; line-height: 1; width: 34px; padding: 4px 0; }
.btn.small.sync-btn { font-size: 18px; font-weight: 600; }
.tbl th.center, .tbl td.center { text-align: center; }

.cfg-group { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 10px; }
.cfg-group legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .cfg-grid { grid-template-columns: 1fr; } }

.env-edit { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); resize: vertical; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.run-out { max-height: 160px; overflow: auto; margin-top: 6px; }
.tbl.zt input.zt-label { min-width: 200px; padding: 6px 8px; }
.tbl.zt td { vertical-align: middle; }
.tbl.zt select.zt-tenant { min-width: 190px; padding: 6px 8px; }
.tbl.zt input.zt-site { min-width: 180px; padding: 6px 8px; }
.pbx-pick { align-items: center; gap: 10px; }
.pbx-pick select { min-width: 240px; max-width: 100%; }
.q-chip { display: inline-block; padding: 1px 7px; border-radius: 5px; background: color-mix(in srgb, #10b981 16%, transparent); color: var(--text); font-size: 12px; margin-right: 3px; }
.q-chip b { color: #059669; }
#leave-tenant { color: var(--text); }
#leave-tenant:hover { color: var(--brand); }
#leave-tenant .lbl { line-height: 1.3; }
#leave-tenant + #logout { margin-top: 2px; }
div.center { text-align: center; }
.settings-form .disabled { opacity: .55; pointer-events: none; }
/* Τηλ. Κέντρα: titles and cells centered, except the name */
.tbl.pbx-tbl th, .tbl.pbx-tbl td { text-align: center; }
.tbl.pbx-tbl td:nth-child(2) { text-align: left; }
.tbl.pbx-tbl .sync-cell { align-items: center; }
/* "Σχετικά με το app": bottom of the side menu, just above the build */
.side > .side-about-bottom { margin: auto 8px 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
.side > .side-about-bottom:hover { background: var(--surface-2); }
.side > .side-about-bottom.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.side > .side-about-bottom + .side-build { margin-top: 0; padding-top: 4px; }
@media (min-width: 901px) { .side-mini .side > .side-about-bottom { justify-content: center; width: 44px; padding: 9px 0; margin-left: auto; margin-right: auto; } .side-mini .side > .side-about-bottom .lbl { display: none; } }
@media (max-width: 900px) { .side > .side-about-bottom { padding: 11px 12px; font-size: 16px; } }
/* Διασυνδέσεις: the PBX drop-down must show whole, so the table box does not clip/scroll on wide screens */
@media (min-width: 901px) { .table-wrap.zt-wrap { overflow: visible; } }
.zt-pbx .ms-list { max-height: none; }
.tbl.center-tbl th, .tbl.center-tbl td { text-align: center; }
.tbl.center-tbl td:first-child { text-align: left; }
/* Διασυνδέσεις: titles centered; content centered except Πελάτης and Εγκατάσταση */
.tbl.zt th, .tbl.zt td { text-align: center; }
.tbl.zt td:nth-child(1), .tbl.zt td:nth-child(2) { text-align: left; }
.tbl.zt td:nth-child(6) { white-space: nowrap; }
.cdr-periods { flex-wrap: wrap; align-items: center; }
.cdr-periods b { margin-right: 6px; }
/* CDR: PBX buttons above the filters */
.pbx-bar { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 12px; }
.pbx-bar .pbx-exp, .cdr-periods .pbx-exp { width: 32px; padding: 4px 0; font-size: 14px; }
.pbx-btns { display: flex; gap: 8px; flex-wrap: nowrap; overflow: hidden; min-width: 0; flex: 1; }
.pbx-bar.open .pbx-btns { flex-wrap: wrap; }
.pbx-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; border: 1.5px solid; font: inherit; font-weight: 600; cursor: pointer; background: none; white-space: nowrap; }
.pbx-bar.open .pbx-btn { flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 12px; }
.pbx-bar.open .pbx-btn .pbx-dot { display: none; }
.pbx-btn .pbx-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pbx-btn .pbx-st { font-weight: 400; font-size: 11.5px; opacity: .85; }
.pbx-btn.ok { color: #15803d; border-color: #22c55e; background: color-mix(in srgb, #22c55e 14%, transparent); }
.pbx-btn.bad { color: #b91c1c; border-color: #ef4444; background: color-mix(in srgb, #ef4444 14%, transparent); }
:root[data-theme="dark"] .pbx-btn.ok { color: #4ade80; }
:root[data-theme="dark"] .pbx-btn.bad { color: #f87171; }
.pbx-bar:not(.open) { padding: 6px 10px; }
.pbx-bar:not(.open) .pbx-btn { padding: 3px 10px; font-size: 13.5px; }
.pbx-bar:not(.open) > .btn { padding-top: 3px; padding-bottom: 3px; }
/* a PBX left out of the filter: grey, its dot keeps the colour of its sync state */
.pbx-btn.off, :root[data-theme="dark"] .pbx-btn.off { color: var(--muted); border-color: color-mix(in srgb, var(--muted) 55%, transparent); background: none; }
.pbx-btn.ok .pbx-dot { background: #22c55e; }
.pbx-btn.bad .pbx-dot { background: #ef4444; }
.pbx-bar.open .pbx-btn.off.ok .pbx-st { color: #22c55e; opacity: 1; }
.pbx-bar.open .pbx-btn.off.bad .pbx-st { color: #ef4444; opacity: 1; }
.reg-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; box-shadow: inset 0 -2px 3px rgba(0,0,0,.25), 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent); }
.reg-dot.on { background: radial-gradient(circle at 35% 30%, #86efac, #16a34a 65%); color: #22c55e; }
.reg-dot.off { background: radial-gradient(circle at 35% 30%, #fca5a5, #dc2626 65%); color: #ef4444; }
.reg-dot.unk { background: radial-gradient(circle at 35% 30%, #e5e7eb, #9ca3af 65%); color: #9ca3af; }
.imp-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.imp-box input[type=file] { max-width: 100%; }
.error-text { color: var(--bad, #dc2626); }
.imp-bar { width: 140px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--muted) 25%, transparent); overflow: hidden; margin: 2px auto; }
.imp-bar span { display: block; height: 100%; background: #f59e0b; transition: width .6s; }
.seg.cdr-mode { margin-bottom: 12px; }
.seg.cdr-mode span { padding: 7px 12px; font-weight: 600; }
.hidden { display: none !important; }
.cdr-periods .btn.active { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
#tog { white-space: nowrap; align-self: flex-start; }
.imp-bar.bad span { background: #ef4444; }
.resume-btn { margin-top: 4px; }

/* desktop sidebar: spacing shrinks with the window height; if it still does not fit, the sidebar scrolls */
@media (min-width: 901px) {
  .side { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
  .side > .side-toggle { zoom: 1; position: fixed; top: calc(22px * var(--fz)); left: calc(var(--side-w, 204px) * var(--fz) - 16px); right: auto; z-index: 20; transition: left .18s ease; }
  .side-mini .side > .side-toggle { left: calc(68px * var(--fz) - 16px); }
}
@media (min-width: 901px) and (max-height: 1120px) {
  .side .logo { padding-top: 12px; padding-bottom: 8px; }
  .side-clock.full { margin-top: 6px; }
  .tenant-id { margin: 4px 16px 6px; padding: 10px 0 8px; gap: 5px; }
  .tenant-id img { max-height: 30px !important; }
  .side nav a, .side-user a, .side-logout, .side > .side-about-bottom { padding-top: 6px; padding-bottom: 6px; }
  .side .nav-sep { margin: 4px 16px; }
  .side-tools { padding-top: 4px; padding-bottom: 2px; }
  .side-user { padding-top: 6px; padding-bottom: 4px; margin-top: 4px; }
  .side > .side-build { padding-top: 2px; padding-bottom: 8px; }
}
@media (min-width: 901px) and (max-height: 920px) {
  .side .logo { padding-top: 8px; padding-bottom: 4px; }
  .side-clock.full { margin-top: 2px; font-size: 13px; }
  .tenant-id { margin: 2px 16px 4px; padding: 6px 0 5px; gap: 3px; }
  .tenant-id img { max-height: 24px !important; }
  .side nav a, .side-user a, .side-logout, .side > .side-about-bottom { padding-top: 3px; padding-bottom: 3px; }
  .side .nav-sep { margin: 3px 16px; }
  .side-tools .btn { padding-top: 3px; padding-bottom: 3px; }
}

/* quick period buttons (CDR): a short flash when pressed */
.cdr-periods .btn.flash { animation: btnflash .5s ease-out; }
@keyframes btnflash { 0% { background: color-mix(in srgb, var(--brand) 55%, transparent); border-color: var(--brand); box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 60%, transparent); } }

.pg-input { width: 72px; padding: 4px 6px; text-align: center; margin: 0 4px; }

/* CallVision mark left of the screen title, only in full screen */
.fs-mark { display: none; }
.is-fs .fs-mark, :fullscreen .fs-mark { display: inline-flex; align-items: center; margin-right: 12px; vertical-align: middle; }
.fs-mark img { height: 1.5em; width: auto; display: block; }
.fs-mark img.lg-dark { display: none; }
:root[data-theme="dark"] .fs-mark img.lg-light { display: none; }
:root[data-theme="dark"] .fs-mark img.lg-dark { display: block; }
.wallboard > header .fs-mark { opacity: 1; margin-right: 0; } .wallboard > header .fs-mark img { height: 1.3em; }

/* phones: CallVision mark left of the menu button */
.top-mark { display: none; }
@media (max-width: 900px) {
  .top-mark { display: inline-flex; align-items: center; flex: none; }
  .top-mark img { height: 30px; width: auto; display: block; }
  .top-mark img.lg-dark { display: none; }
  :root[data-theme="dark"] .top-mark img.lg-light { display: none; }
  :root[data-theme="dark"] .top-mark img.lg-dark { display: block; }
}
.ivr-keys { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.ivr-keys .tag { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }

.section-h { margin: 26px 0 10px; font-size: 16px; }
.ping-tbl td, .ping-tbl th { text-align: center; }
.ping-ok { color: #16a34a; } .ping-warn { color: #d97706; } .ping-bad { color: #ef4444; font-weight: 700; }
:root[data-theme="dark"] .ping-ok { color: #4ade80; }

.sys-tbl td, .sys-tbl th { text-align: center; }
.sys-tbl td:first-child { text-align: center; font-weight: 600; white-space: nowrap; }
.sys-tbl .spark-cell { width: 38%; min-width: 220px; }
.spark { display: block; width: 100%; height: 44px; }
.spark-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 1px; }

.section-h.first { margin-top: 4px; }

.filters .rep-more { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .rep-more.hidden { display: none; }
.presets .pbx-exp { width: 32px; padding: 4px 0; font-size: 14px; }
/* Reports, CDR, QA in full screen */
.page-fs:fullscreen, .page-fs:-webkit-full-screen { background: var(--bg); padding: 22px 28px; overflow: auto; }
:root[data-theme="dark"] .page-fs:fullscreen { background-color: #05070f; }
.page-fs.is-fs .fs-title { padding-right: 52px; display: flex; align-items: center; }

/* Monitor → Multi: every PBX in one table, PBX name first */
.mboard.multi .mhead, .mboard.multi .mrow { grid-template-columns: .8fr 1.1fr 1fr 1.1fr 1.2fr 1fr 1.1fr; }
.mc.c-pbx { justify-content: center; }
.mpbx-name { font-weight: 700; font-size: 13.5px; }
.mon-view .multi-btn { margin-left: 4px; }
/* filter bars (Reports): their drop-down lists open above the cards below them */
.filters { position: relative; z-index: 30; }
:root[data-theme="dark"] .ms-list { background: #0f1830; }

.sys-graphs { table-layout: fixed; }
.sys-graphs th { text-align: center; }
.sys-graphs td.spark-cell { padding: 14px 16px 10px; width: auto; min-width: 0; }
.sys-graphs .spark { height: 70px; }
.sys-vals { margin-top: 12px; }
.sys-graphs th { white-space: normal; }
.sys-graphs .spark-axis { gap: 6px; }

.ico .ico-svg { display: inline-block; vertical-align: -3px; }
/* Σύστημα: grey vertical lines between the graphs */
.sys-graphs td + td { border-left: 1px solid var(--border); }

/* CDR: call type and status on one line, laid on the same columns as the filters above: the status group starts at
   the left edge of a filter column and moves to the left columns (or the next line) as the screen gets narrower */
.cdr-checks-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; margin-top: 12px; align-items: center; }
.cdr-checks-row .cdr-checks { margin: 0; grid-column: auto / span 2; }
.cdr-checks-row .cdr-checks + .cdr-checks { grid-column: 3 / -1; flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 1400px) { .cdr-checks-row .cdr-checks + .cdr-checks { grid-column: 1 / -1; flex-wrap: wrap; } }
@media (max-width: 600px) { .cdr-checks-row .cdr-checks { grid-column: 1 / -1; } }

/* CDR → Live: grey when off, green (pulsing dot) when on */
.live-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: transparent; }
.live-btn i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.live-btn { border-radius: 999px; font-weight: 600; }
/* on: the same look as the Live badge of Monitor */
.live-btn.on { color: var(--m-green); background: transparent; border-color: color-mix(in srgb, var(--m-green) 40%, transparent); }
.live-btn.on i { background: var(--m-green); opacity: 1; animation: pulse 1.4s infinite; }
:root[data-theme="dark"] .live-btn.on i { box-shadow: 0 0 10px var(--m-green); }
.pbx-bar:not(.open) > .live-btn { padding-top: 3px; padding-bottom: 3px; }
.cdr-periods .btn:disabled { opacity: .4; cursor: not-allowed; }
.cdr-filter input:disabled { opacity: .55; cursor: not-allowed; }
.live-btn { --m-green: #16a34a; }
:root[data-theme="dark"] .live-btn { --m-green: #39ff9a; }
#live-slot { display: contents; }

/* Monitor compact view (←○→ off): Trunk, Caller, Group / Queues, Εσωτερικό */
.mboard.compact .mhead, .mboard.compact .mrow { grid-template-columns: 1.1fr 1.1fr 1.1fr 1.3fr; }
.mboard.multi.compact .mhead, .mboard.multi.compact .mrow { grid-template-columns: .8fr 1.1fr 1.1fr 1.1fr 1.3fr; }
.mboard.compact .mc.c-trunkIn, .mboard.compact .mc.c-caller { gap: 14px; }
.flow-btn { padding: 4px 9px; }
.flow-btn svg { display: block; }
/* Πελάτες: Είσοδος first (centred), then the customer name (left) */
.tbl.tenants-tbl td:first-child, .tbl.tenants-tbl th:first-child { text-align: center; width: 1%; padding-left: 16px; padding-right: 16px; }
.tbl.tenants-tbl td:nth-child(2), .tbl.tenants-tbl th:nth-child(2) { text-align: left; }
.pbx-guide { margin-top: 16px; }
.tbl.zt.sys-tbl td:nth-child(1), .tbl.zt.sys-tbl td:nth-child(2) { text-align: center; }
.tbl.zt.sys-graphs td:nth-child(1), .tbl.zt.sys-graphs td:nth-child(2) { text-align: center; }

/* Queues: the title of each queue card centred (name, then its number) */
.qcard .qhead { justify-content: center; gap: 10px; text-align: center; }
h2.section.no-caps { text-transform: none; }
/* every grey line of the side menu: the same width (16px in from both edges; 10px in the collapsed menu) */
.side nav .nav-sep { margin: 6px 8px; }
.side-user { border-top: 0; position: relative; }
.side-user::before { content: ""; position: absolute; top: 0; left: 8px; right: 8px; border-top: 1px solid var(--border); }
.side-user .nav-sep { margin: 6px 8px; }
@media (min-width: 901px) {
  .side-mini .side .side-sep { margin-left: 10px; margin-right: 10px; }
  .side-mini .side nav .nav-sep { margin: 6px 10px; align-self: stretch; }
  .side-mini .side .side-user::before { left: 10px; right: 10px; }
  .side-mini .side .side-user .nav-sep { margin: 6px 10px; align-self: stretch; }
}
#rt-kpis .kpi { text-align: center; }
/* wallboard tiles: text centred; an incomplete last row is centred too */
.wb-tiles { display: flex; flex-wrap: wrap; justify-content: center; }
.wb-tile { text-align: center; flex: 0 0 calc((100% - 3 * 1.2vw) / 4); box-sizing: border-box; }
@media (max-width: 1100px) { .wb-tile { flex-basis: calc((100% - 2 * 1.2vw) / 3); } }
@media (max-width: 700px) { .wb-tile { flex-basis: calc((100% - 1.2vw) / 2); } }
.kpi { text-align: center; }
#rep .panel > h3 { text-align: center; }
#rep .tbl th, #rep .tbl td { text-align: center; }
#rep .tbl td:first-child { text-align: left; }
/* CDR: column titles centred; the status column (first after the ▸) centred, title and content */
.tbl.cdr > thead th { text-align: center; }
.tbl.cdr > tbody > tr.cdr-row > td:nth-child(2) { text-align: center; }
.tbl.cdr > tbody > tr.cdr-row > td:nth-last-child(-n+2), .tbl.cdr > thead th:nth-last-child(-n+2) { text-align: center; }

/* Monitor: PBX buttons right of Multi */
.mon-pbx { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 6px; }
.mon-pbx .pbx-btn { padding: 3px 10px; font-size: 13.5px; }

/* Monitor top buttons: one height; Multi and the full/compact button, when on, look like the Live badge */
.mon-top .btn, .mon-top .pbx-btn { height: 32px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.mon-view .flow-btn, .mon-view .multi-btn { --m-green: #16a34a; border-radius: 999px; font-weight: 600; }
:root[data-theme="dark"] .mon-view .flow-btn, :root[data-theme="dark"] .mon-view .multi-btn { --m-green: #39ff9a; }
.mon-view .flow-btn.on, .mon-view .multi-btn.on { color: var(--m-green); background: transparent; border-color: color-mix(in srgb, var(--m-green) 40%, transparent); }
:root[data-theme="dark"] .mon-view .flow-btn.on, :root[data-theme="dark"] .mon-view .multi-btn.on { box-shadow: 0 0 10px color-mix(in srgb, var(--m-green) 25%, transparent); }
.mon-pbx[hidden] { display: none !important; }

/* Monitor: view buttons as one group; a grey line before the PBX buttons (gone with them) */
.mon-view { display: inline-flex; gap: 4px; }
.mon-pbx { padding-left: 14px; margin-left: 0; }

/* PBX button: connector online, first CDR sync not finished yet → orange */
.pbx-btn.wait { color: #b45309; border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, transparent); }
:root[data-theme="dark"] .pbx-btn.wait { color: #fbbf24; }
.pbx-btn.wait .pbx-dot { background: #f59e0b; }

/* connector settings: a section switched off */
.cfg-group legend { display: flex; align-items: center; gap: 8px; }
.cfg-group.sect-off .cfg-grid, .cfg-group.sect-off > .chk { opacity: .4; pointer-events: none; }
.switch.sm { transform: scale(.8); transform-origin: left center; }
.cfg-note { grid-column: 1 / -1; margin: -2px 0 8px; }

.cfg-sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.cfg-sub > p { margin: 4px 0 8px; }

/* Monitor (1.20.001): headers and content centred; the online x/y indicator in the top bar next to Multi */
.mboard .mh { text-align: center; }
.mboard .mc, .mboard .mc.c-pbx { align-items: center; text-align: center; }
.mboard .mn { align-items: center; }
.mboard .mn .row1 { justify-content: center; }
.mboard.vert .mc { align-items: flex-start; }
/* full screen: the page itself scrolls when the calls run past the bottom of the screen */
.mon-wrap.is-fs, .mon-wrap:fullscreen { overflow-y: auto !important; overscroll-behavior: contain; }
.mon-wrap:focus { outline: none; }
#monon[hidden] { display: none !important; }
.mn .row1 { align-items: center; gap: 6px; } .mn .row1 .ago { font-size: 11.5px; }
/* top bar slots for screen controls (Live Vision: ⇄ / Multi next to the title, the totals left of the PBX pill) */
.top h1 { flex: 0 1 auto; }
.top-lead { flex: 1; display: flex; align-items: center; min-width: 0; }
.top-lead .mon-view { margin-left: 18px; }
.top-extra { display: flex; align-items: center; }
.top-extra:empty { display: none; }
.top-extra .mon-stats { margin: -6px 18px -6px 0; gap: 18px; }
.top-extra .mon-stats b { font-size: 18px; line-height: 1.1; }
.top-extra .mon-stats small { font-size: 11px; }
.mon-wrap .mon-title + .mon-view { margin-left: 4px; }
/* Live Vision: totals centred over their labels; the PBX N/N switch (replaces the top-bar pill on this screen) */
.top-extra .mon-stats div, .mon-top .mon-stats div { text-align: center; }
body.lv-on #conn-pill { display: none; }
.mon-view .pbxf-btn { margin-left: 4px; border-radius: 999px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); border-color: var(--border); }
.mon-view .pbxf-btn.s-ok { color: var(--good); } .mon-view .pbxf-btn.s-bad { color: var(--bad); }
.mon-view .pbxf-btn.s-warn { color: #b45309; } :root[data-theme="dark"] .mon-view .pbxf-btn.s-warn { color: #fbbf24; }
.mon-view .pbxf-btn.on { background: transparent; border-color: color-mix(in srgb, currentColor 40%, transparent); }
:root[data-theme="dark"] .mon-view .pbxf-btn.on { box-shadow: 0 0 10px color-mix(in srgb, currentColor 25%, transparent); }
:root[data-theme="dark"] .mon-view .pbxf-btn.s-ok { color: #39ff9a; }
.mon-wrap:not(.is-fs) .mon-top:has(> #monpbx[hidden]) { display: none; }
body.lv-on .top-extra .mon-stats { margin-right: 4px; }
/* full screen: the totals on the title row (right), the PBX filters on the row below */
.mon-wrap.is-fs .mon-top > .mon-stats { order: 2; margin-left: auto; }
.mon-wrap.is-fs .mon-top > .mon-pbx { order: 3; flex-basis: 100%; }
/* VPN Connections: Πελάτης as wide as the longest customer name; Εγκατάσταση wraps so the other columns fit */
.tbl.vpn-tbl { width: 100%; }
.tbl.vpn-tbl td:nth-child(1) { width: 1%; white-space: nowrap; }
.tbl.vpn-tbl select.zt-tenant { min-width: 0; width: auto; }
.tbl.vpn-tbl td:nth-child(2) { min-width: 150px; }
.tbl.vpn-tbl td:nth-child(n+3) { white-space: nowrap; }
.tbl.vpn-tbl .zt-pbx .ms-sum { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.tbl.vpn-tbl .zt-pbx summary { align-items: center; }
.tbl.vpn-tbl td:nth-child(6) { white-space: normal; }
.tbl.vpn-tbl td:nth-child(6) .pill { margin: 2px 0; }
.tbl.vpn-tbl th, .tbl.vpn-tbl td { padding-left: 8px; padding-right: 8px; }
/* narrower menu column: less empty space left and right of its contents */
:root { --side-w: 204px; }
.side nav { padding-left: 6px; padding-right: 6px; }
.side-sep, .side .nav-sep { margin-left: 12px; margin-right: 12px; }
.tenant-id { margin-left: 12px; margin-right: 12px; }
.side-user { margin-left: 6px; margin-right: 6px; }
.side .logo { padding-left: 8px; padding-right: 8px; }
.side-tools { padding-left: 14px; }
/* collapse button: a little bigger, centred on the first grey line of the menu (placed by app.js) */
.side-toggle { width: 32px; height: 32px; font-size: 22px; line-height: 28px; }
@media (min-width: 901px) { .side > .side-toggle { top: var(--tog-top, calc(22px * var(--fz))); } }
.side-user::before { left: 6px; right: 6px; }
.side-user .nav-sep { margin: 6px 6px; }
.side nav .nav-sep { margin-left: 6px; margin-right: 6px; }
.icon-del { padding: 6px 8px; line-height: 0; } .icon-del svg { display: block; }
/* Τηλ. Κέντρα: ⋮⋮ handle to drag a PBX up / down */
.drag-h { display: inline-grid; place-items: center; width: 24px; height: 30px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; }
.drag-h:hover { color: var(--text); background: var(--surface-2); }
tr.dragging { opacity: .85; background: color-mix(in srgb, var(--brand) 10%, transparent); }
tr.dragging .drag-h { cursor: grabbing; }
.pbx-tbl th:first-child, .pbx-tbl td:first-child { width: 1%; padding-left: 8px; padding-right: 0; }
.view-wide { max-width: none; }
/* Διαχείριση: «Όνομα από CallVision» typed in the table */
input.cv-name { width: 100%; min-width: 150px; max-width: 260px; padding: 5px 8px; font-size: 13.5px; border-radius: 7px; transition: border-color .3s, box-shadow .3s; }
input.cv-name.saved { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 25%, transparent); }
.tbl[class*="crud-"] th { text-align: center; } /* Διαχείριση: every title centred */
/* «Αποστολή στο κέντρο» */
.push-btn { margin-left: auto; }
.push-list { margin: 6px 0 0; padding-left: 18px; max-height: 50vh; overflow: auto; }
.push-list li { margin: 3px 0; }
.ok-t { color: var(--good); font-weight: 700; } .bad-t { color: var(--bad); font-weight: 700; }
/* PBX RA: write user accepted (green) / refused (red) / not checked (grey) / checking (amber, pulsing) */
.ra-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: inline-block; vertical-align: middle; background: var(--muted); opacity: .5; }
.ra-dot.on { background: var(--good); opacity: 1; box-shadow: 0 0 8px color-mix(in srgb, var(--good) 55%, transparent); }
.ra-dot.off { background: var(--bad); opacity: 1; box-shadow: 0 0 8px color-mix(in srgb, var(--bad) 55%, transparent); }
.ra-dot.wait { background: #f59e0b; opacity: 1; animation: pulse 1.2s infinite; }
/* Διαχείριση: second row of tabs (inside Σύστημα / Τηλ. Κέντρα) */
.tabs.sub-tabs { border-bottom: 0; margin-top: -6px; gap: 6px; }
.tabs.sub-tabs a { padding: 6px 12px; border-bottom: 0; border-radius: 8px; font-size: 14px; }
.tabs.sub-tabs a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); }
/* an open drop-down (details.ms) stays above the tables / panels after it: in the dark theme every table and panel is
   its own layer (backdrop blur), so the box that holds the open list is lifted above its neighbours */
:is(.table-wrap, .panel, .card, .filters, .kpi, .qcard):has(details.ms[open]) { position: relative; z-index: 30; }
/* Ρυθμίσεις → Χρήστες: roles table */
.tbl.roles-tbl th { text-align: center; white-space: normal; }
.tbl.roles-tbl td:first-child { white-space: nowrap; }
.tbl.roles-tbl td:nth-child(3) { min-width: 260px; }
/* Τηλ. Κέντρα: «Πώς συνδέεται…» opens / closes with the ▸ button (closed by default) */
details.pbx-guide > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
details.pbx-guide > summary::-webkit-details-marker { display: none; }
details.pbx-guide > summary h3 { margin: 0; }
details.pbx-guide .guide-exp { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); font-size: 13px; flex: none; }
details.pbx-guide .guide-exp::before { content: "▸"; }
details.pbx-guide[open] .guide-exp::before { content: "▾"; }
details.pbx-guide > summary:hover .guide-exp { color: var(--brand); border-color: var(--brand); }
details.pbx-guide[open] > summary { margin-bottom: 10px; }
/* VPN / PBX Connections: ▸ all customers / ▾ only the customer you are in */
.sect-exp { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; vertical-align: middle; border: 1px solid var(--border); border-radius: 7px; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 0; }
.sect-exp:hover { color: var(--brand); border-color: var(--brand); }
/* VPN Connections: title, «Νέα σύνδεση» and the server ZT address on one row */
.sect-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; margin: 26px 0 12px; }
.sect-row.first { margin-top: 4px; }
.sect-row > .section-h, .sect-row > .toolbar { margin: 0; }
.tbl.agents th { text-align: center; }
/* Ρυθμίσεις → Πρόσβαση */
.access .geo-mode { display: flex; gap: 22px; margin: 10px 0; }
.geo-pick { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.geo-pick.off { opacity: .45; pointer-events: none; }
.geo-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 28px; align-items: center; }
.geo-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); font-size: 13.5px; }
.geo-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; }
.geo-pick input[type=search] { width: 100%; max-width: 320px; margin-bottom: 8px; }
.geo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 260px; overflow-y: auto; }
.geo-list .chk { margin: 0; padding: 3px 4px; font-size: 14px; }
.access textarea { width: 100%; max-width: 520px; font-family: ui-monospace, monospace; }
.warn-t { color: #d97706; font-weight: 700; } :root[data-theme="dark"] .warn-t { color: #fbbf24; }
.tbl.geo-sum th, .tbl.geo-sum td, .tbl.geo-log th { text-align: center; } .tbl.geo-sum td:first-child { text-align: left; }
.geo-filters select { width: auto; }
#lg-sum { margin-bottom: 14px; }
/* Σχετικά με: «by ITManager.gr» at the same distance from the logo as in the menu column (same proportions) */
.about-logo { display: block; }
.about-logo .brand-wrap { display: block; width: fit-content; }
.about-logo .brand-logo img { display: block; height: 52px; width: auto; }
.about-logo small.by { display: block; padding-left: 28.4%; text-align: center; margin-top: -4%; line-height: 1.2; color: var(--muted); font-size: 13px; letter-spacing: .02em; white-space: nowrap; }
/* menu column a little narrower on the right */
:root { --side-w: 194px; }
.side-toggle { font-size: 15px; line-height: 1; }
.role-menus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 4px 0 12px; }
.tbl.roles-tbl td:nth-child(3) { min-width: 190px; } .tbl.roles-tbl small { white-space: nowrap; }
/* Reports: the longer periods in a drop-down next to «30 ημέρες» */
.preset-more { position: relative; display: inline-block; }
.preset-more > summary { list-style: none; cursor: pointer; }
.preset-more > summary::-webkit-details-marker { display: none; }
.preset-more.chosen > summary { color: var(--brand); border-color: var(--brand); }
.preset-more .ms-list { min-width: 220px; z-index: 60; }
.pm-item { background: none; border: 0; text-align: left; padding: 7px 10px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; }
.pm-item:hover { background: var(--surface-2); }
.tbl.feat-tbl th { text-align: center; }
/* collapsed menu: the ☰ button sits inside the column, under the clock */
@media (min-width: 901px) {
  .side-mini .side > .side-toggle { left: var(--tog-left, calc(68px * var(--fz) - 16px)); }
  .side-mini .side .logo { padding-bottom: 48px; }
}
/* dark theme: a backdrop-filter on the side column makes it the frame of the fixed ☰ button and cuts it in half */
@media (min-width: 901px) { :root[data-theme="dark"] .side { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 12, 26, .9); } }
#lg-ref { font-size: 18px; line-height: 1; min-width: 40px; align-self: stretch; }
/* «Αποστολή στο κέντρο»: progress text to the left of the button, fades out by itself */
.push-wrap { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.push-wrap .push-btn { margin-left: 0; }
.push-st { font-size: 14px; color: var(--muted); opacity: 0; transition: opacity .35s; display: inline-flex; align-items: center; gap: 8px; max-width: 60vw; }
.push-st.show { opacity: 1; }
.push-st.ok { color: var(--good); } .push-st.bad { color: var(--bad); }
.push-st .push-more { color: inherit; text-decoration: underline; }
.push-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pushspin .8s linear infinite; flex: none; }
@keyframes pushspin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .push-wrap { flex-wrap: wrap; justify-content: flex-end; } }
/* Διαχείριση > Τηλ. Κέντρα: titles and contents centred */
.adm-pbx .tbl th, .adm-pbx .tbl td { text-align: center; }
.adm-pbx .tbl td input.cv-name { margin: 0 auto; display: block; text-align: center; }
/* sortable column titles */
.tbl th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th.sortable:hover { color: var(--brand); }
.tbl th.sortable::after { content: '↕'; margin-left: 6px; opacity: .35; font-size: .9em; }
.tbl th.sortable[data-dir="1"]::after { content: '▲'; opacity: .9; }
.tbl th.sortable[data-dir="-1"]::after { content: '▼'; opacity: .9; }
.tbl th.sorted { color: var(--brand); }
@media (min-width: 901px) { .top { padding-left: 34px; } }
/* Διαχείριση > Σύστημα > Χρήστες: every column centred */
.users-tbl th, .users-tbl td { text-align: center; }
/* Σύστημα → Εισερχόμενες */
.flows-tbl th, .flows-tbl td { text-align: center; }
input.flow-dest { width: 100%; max-width: 420px; padding: 5px 8px; font-size: 13.5px; border-radius: 7px; text-align: center; transition: border-color .3s, box-shadow .3s; }
input.flow-dest.saved { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 25%, transparent); }
/* Σύστημα → Ρόλοι Τεχνικών */
.tech-tbl th, .tech-tbl td { text-align: center; }

.out-tbl th, .out-tbl td { text-align: center; }

/* Εξερχόμενες: «Αρχίζει με» [αριθμός] [ψηφία] [1-15] */
.dest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dest-row .dest-fixed { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.dest-row input[name=destination] { flex: 1 1 110px; min-width: 90px; }
.dest-row > input, .dest-row > select { width: auto; margin: 0; }
.dest-row input[name=destination] { flex: 0 1 150px; }
.dest-row input.dest-n { flex: 0 0 64px; width: 64px; text-align: center; }
.dest-row input[name=destination] { flex: 1 1 130px; }
.dest-row input.dest-n.locked { color: var(--muted); background: var(--surface-2); cursor: not-allowed; }
/* Εξερχόμενες: Όνομα Προορισμού at half width with the allowed characters next to it; the example number */
.name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.name-row > input { flex: 0 1 calc(40ch + 30px); min-width: 140px; width: auto; margin: 0; } /* 30 characters fit */
.name-row > .name-hint { flex: 1 1 200px; white-space: normal; font-size: 13px; line-height: 1.35; }
input.dest-example { color: var(--muted); background: var(--surface-2); cursor: default; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; white-space: pre; }
.name-row > .name-hint { padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); }
/* Εξερχόμενες: several «Αρχίζει με …» lines, each with its example under it */
.dest-rules { display: flex; flex-direction: column; gap: 12px; }
.dest-rule { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.dest-rule .dest-del { flex: 0 0 auto; }
.dest-add-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.dest-row input[data-k=prefix] { flex: 1 1 130px; min-width: 90px; width: auto; margin: 0; }
.out-tbl td > div + div { margin-top: 4px; }
.dest-rule .dest-del[hidden] { display: none; }
.dest-ex-row { display: flex; align-items: center; gap: 8px; } .dest-ex-row .dest-example { flex: 1 1 auto; margin: 0; }
.plans-pbx { margin: 18px 0 8px; font-size: 14px; color: var(--muted); } .plans-tbl th, .plans-tbl td { text-align: center; } #plans-ref { font-size: 18px; line-height: 1; min-width: 40px; }
/* Ροές Κλήσεων → Outbound Routes */
.rt-tbl td { vertical-align: middle; }
.rt-pat { display: flex; flex-direction: column; align-items: center; line-height: 1.25; margin: 2px 0; }
.rt-acts { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.rt-add-row { margin: 10px 0 18px; }
.strike { text-decoration: line-through; opacity: .6; }
.rt-pats { display: flex; flex-direction: column; gap: 6px; }
.rt-prow { display: flex; align-items: center; gap: 8px; }
.rt-prow .rt-p { flex: 0 0 220px; margin: 0; }
.rt-prow .rt-read { flex: 1 1 auto; }
.rt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.rt-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-rule .dest-fixed { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--muted); white-space: nowrap; font-size: 13px; }
.rt-rule input { width: 90px; margin: 0; } .rt-rule input.dest-n { width: 56px; text-align: center; }
.rt-adv { margin-top: 10px; } .rt-adv summary { cursor: pointer; color: var(--muted); }
.modal .rt-rule > input { width: 90px; flex: 0 0 90px; margin: 0; } .modal .rt-rule > input.dest-n { width: 56px; flex: 0 0 56px; } .modal .rt-rule { flex-wrap: nowrap; } @media (max-width: 700px) { .modal .rt-rule { flex-wrap: wrap; } }
/* Live Vision «Μέγιστο» (light blue) and the (X/Y) of each PBX button */
.mon-stats .c-peak { color: #38bdf8; }
:root[data-theme="light"] .mon-stats .c-peak { color: #0284c7; }
.pbx-btn .pbx-peak { font-weight: 500; font-size: .9em; color: #38bdf8; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] .pbx-btn .pbx-peak { color: #0284c7; }
/* Υποστήριξη */
.sup-tbl th, .sup-tbl td { text-align: center; }
.sup-tbl .sup-desc { white-space: pre-line; text-align: left; display: inline-block; max-width: 640px; }
.sup-tbl select.sup-st { width: auto; min-width: 150px; margin: 0; }
.table-wrap:has(details.sup-pick[open]) { overflow: visible; } details.sup-pick { min-width: 200px; } details.sup-pick .ms-list { z-index: 30; }
/* Ρυθμίσεις → Χρήστες → WebRTC */
.wr-tbl th, .wr-tbl td { text-align: center; }
.wr-tbl select.wr-ext { width: auto; min-width: 170px; margin: 0; }
.wr-set input.wr-f { width: 100%; min-width: 180px; margin: 0; padding: 5px 8px; font-size: 13.5px; transition: border-color .3s, box-shadow .3s; }
.wr-set input.wr-f.saved { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 25%, transparent); }
/* Live Vision: more than 2 minutes waiting in an IVR / queue / group → red box glowing like ringing */
.mn.group.long-wait, .mn.group.g-ivr.long-wait { border-color: #ef4444; border-style: solid; animation: waitglow 1.1s ease-in-out infinite; }
.mn.group.long-wait small { color: #f87171; }
@keyframes waitglow { 50% { box-shadow: 0 0 22px color-mix(in srgb, #ef4444 65%, transparent); } }
/* Live Vision: a call answered after more than 2 minutes waiting → red lines */
svg.mw .w-long, svg.mw .w-out.w-long { stroke: #ef4444; fill: #ef4444; }
:root[data-theme="dark"] svg.mw .w-long.wire, :root[data-theme="dark"] svg.mw .w-out.w-long.wire { color: #ef4444; }
svg.mw .photon.w-long { fill: #fca5a5; }
/* Live Vision: little space above and below each call (--mcy, made smaller when the calls do not fit in the window) */
.mboard:not(.vert) .mc, .mboard:not(.vert) .mc:first-child { padding-top: var(--mcy, 7px); padding-bottom: var(--mcy, 7px); min-height: 0; }
/* Multi: a call between extensions of two PBXs of the customer */
svg.mw .w-pbx { stroke: var(--m-cyan); fill: var(--m-cyan); }
svg.mw path.w-pbx { fill: none; }
svg.mw .wire.w-pbx { stroke-width: 2.2; }
:root[data-theme="dark"] svg.mw .w-pbx.wire { color: var(--m-cyan); }
svg.mw .w-out.w-pbx, svg.mw .w-out.w-talk.w-pbx, svg.mw .w-out.w-ring.w-pbx { stroke: var(--m-cyan); fill: var(--m-cyan); }
svg.mw path.w-out.w-pbx { fill: none; }
:root[data-theme="dark"] svg.mw .w-out.w-pbx.wire { color: var(--m-cyan); }
svg.mw .photon.w-out.w-pbx { fill: var(--m-cyan); }
:root[data-theme="dark"] svg.mw .photon.w-pbx { fill: #fff; }
/* Live Vision: more than 3 minutes waiting → the red box burns with a small live flame (the call is about to be lost) */
.mn.group.on-fire { position: relative; border-color: #ff3b1f; animation: flamebox .9s ease-in-out infinite alternate; }
.mn.group.on-fire::before, .mn.group.on-fire::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: calc(100% - 2px); height: 14px; pointer-events: none; transform-origin: 50% 100%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.mn.group.on-fire::before { background: radial-gradient(ellipse 7px 13px at 50% 100%, #ff6a00 0 45%, rgba(255, 60, 0, .55) 65%, transparent 72%) 0 100% / 13px 100% repeat-x; filter: blur(.6px); animation: tongues .42s ease-in-out infinite alternate; }
.mn.group.on-fire::after { height: 9px; left: 12%; right: 12%; background: radial-gradient(ellipse 4px 9px at 50% 100%, #fff3a0 0 30%, #ffc400 50%, transparent 72%) 4px 100% / 13px 100% repeat-x; animation: tongues .33s ease-in-out infinite alternate-reverse; }
@keyframes flamebox {
  0% { box-shadow: 0 0 6px 1px rgba(255, 106, 0, .9), 0 -3px 10px rgba(255, 42, 0, .8), 0 0 18px rgba(255, 0, 0, .55); }
  50% { box-shadow: 0 0 9px 2px rgba(255, 179, 0, .85), 0 -7px 16px rgba(255, 69, 0, .85), 0 0 24px rgba(255, 0, 0, .6); }
  100% { box-shadow: 0 0 5px 1px rgba(255, 140, 0, .8), 0 -5px 12px rgba(255, 30, 0, .9), 0 0 20px rgba(255, 0, 0, .5); }
}
@keyframes tongues { 0% { transform: scaleY(.65) skewX(-4deg); opacity: .75; } 50% { transform: scaleY(1.1) skewX(3deg); opacity: 1; } 100% { transform: scaleY(.85) skewX(-2deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .mn.group.on-fire, .mn.group.on-fire::before, .mn.group.on-fire::after { animation: none; } }
/* Ρυθμίσεις → Claude AI */
.ai-card { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.ai-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ai-key { display: flex; gap: 8px; flex-wrap: wrap; } .ai-key input { flex: 1 1 280px; margin: 0; }
.ai-test { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-tbl th, .ai-tbl td { text-align: center; }
/* 🔔 Ειδοποιήσεις */
.push-btn-side { font-size: 15px; line-height: 1; }
.push-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.push-ios { background: var(--info-bg); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.45; }
.push-ios ol { margin: 6px 0 6px 18px; padding: 0; }
.push-devs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.push-devs li { display: flex; align-items: center; gap: 8px; }
.geo-auto { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); } .geo-auto h4 { margin: 0 0 6px; font-size: 15px; }

/* phones: the menu button (☰) right of the CallVision mark */
.top-lt { display: contents; }
@media (max-width: 900px) {
  .top-lt { display: flex; flex-direction: row; align-items: center; gap: 6px; flex: none; }
  .top-lt .menu-btn { padding: 0 8px; line-height: 1; font-size: 22px; }
}
.top-mark, .side > .logo .brand-logo, .side > .logo .brand-mark { cursor: pointer; }
#ap-wr { padding-bottom: 14px; } #ap-wr .table-wrap { margin-bottom: 0; } #ap-wr td { padding-top: 8px; padding-bottom: 8px; } #ap-wr p a { color: var(--accent, #4f8cff); }
.toolbar .adm-search { width: 280px; max-width: 100%; margin: 0; }
tbody tr[hidden] { display: none; }
a.tn-enter { color: inherit; text-decoration: none; } a.tn-enter:hover { color: var(--accent, #4f8cff); text-decoration: underline; }
/* Τηλ. Κέντρα → Remote Browser */
.rb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.rb-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.rb-go { display: flex; gap: 6px; flex: 1; min-width: 260px; margin: 0; }
.rb-go input { flex: 1; margin: 0; font-family: ui-monospace, monospace; font-size: 13px; }
.rb-links { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rb-links .chip { cursor: pointer; font-size: 13px; padding: 4px 10px; }
.rb-screen { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: #111; min-height: 420px; overflow: hidden; outline: none; line-height: 0; }
.rb-screen:focus-visible, .rb-screen:focus { border-color: var(--accent, #4f8cff); box-shadow: 0 0 0 2px rgba(79, 140, 255, .25); }
.rb-screen img { width: 100%; height: auto; display: block; cursor: default; user-select: none; -webkit-user-select: none; }
.rb-screen img:not([src]) { display: none; }
.rb-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9aa4b2; font-size: 15px; line-height: 1.4; padding: 20px; text-align: center; }
.rb-off[hidden] { display: none; }
/* Multi: a call between two PBXs is one call: cyan everywhere (dashed while ringing, solid while talking) */
svg.mw .wire.w-pbx, svg.mw .halo.w-pbx { stroke: var(--m-cyan) !important; color: var(--m-cyan) !important; }
svg.mw .tip.w-pbx { fill: var(--m-cyan) !important; }
svg.mw .photon.w-pbx { fill: var(--m-cyan) !important; }
:root[data-theme="dark"] svg.mw .photon.w-pbx { fill: #fff !important; }
/* Multi, compact: two PBXs in one call — each name next to its own line */
.mboard .mc.c-pbx.two { position: relative; }
.mboard .mc.c-pbx.two .mpbx-name { position: absolute; left: 0; right: 0; transform: translateY(-50%); text-align: center; }
.mboard.vert .mc.c-pbx.two .mpbx-name { position: static; transform: none; }
/* a long name (e.g. a trunk «LC2411812099-2411812381») wraps when the window is short of room, instead of a scrollbar:
   columns keep their full width while there is room and shrink down to their longest word only when needed */
/* every row follows the columns of the board (subgrid), so a wide box widens its whole column instead of overflowing */
.mboard:not(.vert) > .mhead, .mboard:not(.vert) > .mrows, .mboard:not(.vert) > .mrows > .mrow { grid-template-columns: subgrid !important; } /* the titles too (the older per-view column sets must not win) */
.mboard:not(.vert) { grid-template-columns: repeat(6, minmax(min-content, auto)); }
.mboard.multi:not(.vert) { grid-template-columns: repeat(7, minmax(min-content, auto)); }
.mboard.compact:not(.vert) { grid-template-columns: repeat(4, minmax(min-content, auto)); }
.mboard.multi.compact:not(.vert) { grid-template-columns: repeat(5, minmax(min-content, auto)); }
/* every box keeps two lines (name · time and state): when the calls do not fit, the gaps shrink and then the board
   scales down (monitor.js), the boxes never wrap */
.mboard:not(.vert) .mn { white-space: nowrap; text-align: center; }
.mboard:not(.vert) .mn .row1 { flex-wrap: nowrap; justify-content: center; }
.mboard:not(.vert) .mh, .mboard:not(.vert) .mh:first-child { min-width: 76px; }
/* Multi: «Εγκατάσταση» left-aligned and only as wide as its longest name (title included) — the spare room goes to the lines */
.mboard.multi:not(.vert) { grid-template-columns: max-content repeat(6, minmax(min-content, auto)); }
.mboard.multi.compact:not(.vert) { grid-template-columns: max-content repeat(4, minmax(min-content, auto)); }
.mboard.multi:not(.vert) .mh:first-child { contain: none; text-align: left; min-width: 0; }
.mboard.multi:not(.vert) .mc.c-pbx { align-items: flex-start; text-align: left; }
.mboard.multi:not(.vert) .mc.c-pbx.two .mpbx-name { text-align: left; }
/* the least room around the pages (top bar ↔ content, side menu ↔ content, content ↔ window edge): more room for the tables */
.view { padding: 8px 8px 24px; max-width: none; }
@media (max-width: 900px) { .view { padding: 8px 6px 30px; } }
/* Live Vision → CDR: the live calls in the upper 2/3, today's CDR in the lower 1/3 */
.mon-view .cdr-btn { margin-left: 4px; --m-green: #16a34a; border-radius: 999px; font-weight: 600; }
:root[data-theme="dark"] .mon-view .cdr-btn { --m-green: #39ff9a; }
.mon-view .cdr-btn.on { color: var(--m-green); background: transparent; border-color: color-mix(in srgb, var(--m-green) 40%, transparent); }
:root[data-theme="dark"] .mon-view .cdr-btn.on { box-shadow: 0 0 10px color-mix(in srgb, var(--m-green) 25%, transparent); }
.mon-wrap.with-cdr { display: flex; flex-direction: column; min-height: 0; }
.mon-wrap.with-cdr > #pbxs { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.mon-wrap.with-cdr > .mon-cdr { flex: 0 0 auto; min-height: 0; display: flex; flex-direction: column; }
.view.mon-cdr-on { padding-bottom: 0; overflow: hidden; }
/* the bar between the calls and the CDR: dragged to change the height of the CDR */
.mon-split { flex: 0 0 auto; height: 14px; margin: 3px 0 2px; cursor: row-resize; display: flex; align-items: center; justify-content: center; touch-action: none; border-top: 2px solid var(--border); }
.mon-split[hidden] { display: none !important; }
.mon-split .grip { width: 44px; height: 6px; margin-top: 2px; border-radius: 4px; background: repeating-linear-gradient(to bottom, var(--muted) 0 1.5px, transparent 1.5px 3px); opacity: .6; }
.mon-split:hover .grip, .mon-split.drag .grip { opacity: 1; background: repeating-linear-gradient(to bottom, var(--m-cyan, #0891b2) 0 1.5px, transparent 1.5px 3px); }
.mon-split:hover, .mon-split.drag { border-top-color: var(--m-cyan, #0891b2); }
.mon-cdr[hidden] { display: none !important; }
.mon-cdr-h { padding: 2px 4px 4px; font-size: 13px; }
#moncdr-t { flex: 1; min-height: 0; overflow: auto; }
#moncdr-t .table-wrap { overflow: visible; }
#moncdr-t thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
html.mon-noscroll, html.mon-noscroll body { overflow: hidden; } /* Live Vision with CDR: the page itself never scrolls */
/* Live Vision on phones: the title alone on the first line; then the view buttons (CDR, Multi …) and the totals —
   upright: buttons on the 2nd line, totals on the 3rd; sideways: buttons on the left and totals on the right of the 2nd */
@media (max-width: 900px) {
  body.lv-on .top { flex-wrap: wrap; row-gap: 6px; column-gap: 10px; }
  body.lv-on .top-lt { order: 1; }
  body.lv-on .top h1 { order: 2; flex: 1 1 calc(100% - 90px); white-space: nowrap; }
  body.lv-on .top-lead { order: 3; flex: 0 1 auto; min-width: 0; }
  body.lv-on .top-lead .mon-view { margin-left: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  body.lv-on .top-lead .mon-view .btn { margin-left: 0; }
  body.lv-on .top-right { order: 4; margin-left: auto; flex-wrap: nowrap; }
  body.lv-on .top-extra .mon-stats { margin: 0; gap: 14px; }
}
@media (max-width: 600px) {
  body.lv-on .top-lead { flex-basis: 100%; }
  body.lv-on .top-right { flex-basis: 100%; justify-content: center; margin-left: 0; }
  body.lv-on .top-extra { flex: 1; }
  body.lv-on .top-extra .mon-stats { flex: 1; display: flex; justify-content: space-around; }
}
/* ⇄ / CDR / Multi switched off: like PBX switched off — grey fill, no glow (on: transparent with a glow) */
.mon-view .flow-btn:not(.on), .mon-view .cdr-btn:not(.on), .mon-view .multi-btn:not(.on) { color: var(--m-green); background: color-mix(in srgb, var(--muted) 14%, transparent); border-color: var(--border); box-shadow: none; }
.cdr-actions { margin: 4px 0 12px; }
.side > .logo { padding-bottom: 6px; } /* less room under the date */
/* 🔔 push: solid when on for this device, outline when off (white in the dark theme, the text colour in the day theme) */
.push-btn-side svg { fill: none; display: block; }
.push-btn-side.on svg path:first-child { fill: currentColor; }
:root[data-theme="dark"] .push-btn-side { color: #fff; }
/* the grip in the middle: as much room above it (from the line) as below it (to «CDR Σήμερα») */
.mon-split { height: 16px; margin: 3px 0 0; align-items: center; }
.mon-split .grip { margin-top: 0; }
.mon-cdr-h { padding: 0 4px 4px; line-height: 1.25; }
/* Τηλ. Κέντρα → Remote SSH */
.rssh-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.rssh-bar .cf { min-width: 160px; } .rssh-bar .rs-port { min-width: 0; width: 90px; }
.rssh-bar .rs-btns { display: flex; gap: 8px; }
.rssh-term { background: #0b1020; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-height: 480px; max-height: 70vh; overflow: auto; outline: none; }
.rssh-term:focus, .rssh-term:focus-within { border-color: var(--accent, #4f8cff); }
.rssh-pre { margin: 0; color: #e5e7eb; font: 14px/1.35 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.rssh-bar .rs-sw { min-width: 0; align-items: flex-start; } .rssh-bar .rs-sw .switch { margin: 6px 0; }
/* Τηλ. Κέντρα → Remote SFTP */
.sf-panel[hidden] { display: none; }
.sf-path { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; flex-wrap: wrap; }
.sf-crumbs { font-family: ui-monospace, monospace; font-size: 13px; display: flex; gap: 4px; flex-wrap: wrap; }
.sf-crumbs a { text-decoration: none; }
.sf-upl { cursor: pointer; }
.sf-tbl td a.sf-dir { text-decoration: none; font-weight: 600; }

/* Live Vision on a smartphone: no ←○→ button (upright = compact, sideways = all columns); the totals centred */
body.lv-phone .mon-view .flow-btn { display: none; }
@media (max-width: 940px) and (orientation: landscape) { /* sideways: the totals on the right */
  body.lv-phone .top-right { flex: 1 1 auto; justify-content: flex-end; margin-left: auto; }
  body.lv-phone .top-extra { justify-content: flex-end; }
  body.lv-phone .top-extra .mon-stats { margin: 0 0 0 auto; }
}
@media (max-width: 940px) and (orientation: portrait) {
  body.lv-phone .top-lead { flex-basis: 100%; display: flex; justify-content: center; }
  body.lv-phone .top-lead .mon-view { justify-content: center; }
  body.lv-phone .top-right { flex-basis: 100%; justify-content: center; margin-left: 0; }
  body.lv-phone .top-extra { flex: 1; display: flex; justify-content: center; }
  body.lv-phone .top-extra .mon-stats { flex: 0 1 auto; display: flex; justify-content: center; gap: 26px; margin: 0 auto; }
  body.lv-phone .top-extra .mon-stats > * { text-align: center; align-items: center; }
}

/* phones draw ☎ ⚙ ☀ as coloured emoji: plain grey signs like the other menu icons */
.side .ico { filter: grayscale(1); }
.theme-btn { color: var(--muted); filter: grayscale(1); }

/* smartphone upright: the page title in the middle of the screen (the logo and ☰ stay on the left) */
@media (pointer: coarse) and (max-width: 600px) and (orientation: portrait), (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {
  .top h1 { position: absolute; left: 0; right: 0; top: 10px; height: var(--lt-h, 38px); margin: 0 auto; max-width: calc(100% - 190px);
    display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
  .top-lt { min-height: var(--lt-h, 38px); }
}
/* Live Vision → CDR Σήμερα: «Καμία κλήση σήμερα» always fits (a small CDR part, phones: the title on two lines) */
#moncdr-t .empty { padding: 10px; }
.mon-wrap.with-cdr > .mon-cdr { min-height: 104px; }

#conn-pill .cp-short { display: none; }
@media (max-width: 600px) { #conn-pill .cp-short { display: inline; } }
/* smartphone: «PBX 7/7» switches the PBX filter buttons (CDR, Reports) on / off — like PBX in Live Vision:
   on = outline with a glow, off (or a page without PBX filters) = grey fill */
@media (max-width: 600px) {
  body.pbxf-off .pbx-bar { display: none !important; }
  body:has(.pbx-bar) #conn-pill { cursor: pointer; }
  body.pbxf-off #conn-pill, body:not(:has(.pbx-bar)) #conn-pill { background: color-mix(in srgb, var(--muted) 14%, transparent); border-color: var(--border); box-shadow: none !important; }
}
/* smartphone: the list of the side menu under the page title (long press on the title) */
.title-menu { zoom: var(--fz); position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; min-width: 240px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.title-menu a { display: flex; align-items: center; gap: .6em; padding: .45em .6em; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 1em; white-space: nowrap; }
.title-menu a .ico { width: 1.2em; font-size: .9em; text-align: center; filter: grayscale(1); opacity: .8; }
.title-menu a.on { background: color-mix(in srgb, var(--brand, #2563eb) 18%, transparent); color: var(--brand, #4f8cff); font-weight: 600; }
@media (pointer: coarse) and (max-width: 600px) and (orientation: portrait) {
  .top h1 .t-paren { display: none; } /* «Queues (Τμήματα)» → «Queues», «CDR (Κλήσεις)» → «CDR» */
  .top h1 span.t-long { display: none; } .top h1 span.t-short { display: inline; } /* «Κέντρο Υπ.», «Ρυθμίσεις» */
}
.top h1 .t-short { display: none; }
/* smartphone sideways: Live Vision — the title alone on the first line (centred), the buttons and totals under it;
   the list of the title: two items per row so it fits the low screen */
@media (pointer: coarse) and (max-height: 600px) and (orientation: landscape) {
  body.lv-on .top-lt { flex: 0 0 100%; }
  .title-menu { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; min-width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 70px); padding: 4px; }
  .title-menu a { padding: .28em .6em; }
}
/* Τηλ. Κέντρα → PBXs → «Ενεργό»: ✓ Ναι · Π Πλατφόρμα · ✕ Όχι */
.act3 { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; vertical-align: middle; }
.act3 button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; width: 28px; height: 26px; cursor: pointer; padding: 0; line-height: 1; }
.act3 button + button { border-left: 1px solid var(--border); }
.act3 button:hover { background: color-mix(in srgb, var(--muted) 14%, transparent); }
.act3 button.m-on.on { background: color-mix(in srgb, #16a34a 22%, transparent); color: var(--good, #16a34a); }
.act3 button.m-staff.on { background: color-mix(in srgb, #f59e0b 24%, transparent); color: #b45309; }
:root[data-theme="dark"] .act3 button.m-staff.on { color: #fbbf24; }
.act3 button.m-off.on { background: color-mix(in srgb, #dc2626 22%, transparent); color: var(--bad, #dc2626); }
/* Τηλ. Κέντρα → Integration → Συσκευές */
.ph-pbx { margin-bottom: 14px; }
.ph-head { display: flex; align-items: center; gap: 12px; } .ph-head h3 { margin: 0; }
.ph-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-top: 10px; }
.ph-form .cf { display: flex; flex-direction: column; gap: 4px; min-width: 190px; } .ph-form .cf.ph-num { min-width: 110px; }
.ph-form .cf span { font-size: 12px; color: var(--muted); }
.ph-btns { display: flex; gap: 8px; }
.ph-list { margin-top: 10px; } .ph-ip { width: 140px; text-align: center; }
.warn-box { padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, #f59e0b 14%, transparent); color: #b45309; margin-bottom: 8px; }
:root[data-theme="dark"] .warn-box { color: #fbbf24; }
.good-t { color: var(--good, #16a34a); }
/* Agent page → keypad of the desk phone */
.kp { display: flex; flex-direction: column; gap: 10px; max-width: 300px; margin: 0 auto; }
.kp-num { display: flex; gap: 6px; } .kp-num input { flex: 1; font-size: 20px; text-align: center; letter-spacing: .04em; }
.kp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kp-key { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2, transparent); color: var(--text); cursor: pointer; font: inherit; }
.kp-key b { font-size: 20px; line-height: 1; } .kp-key small { font-size: 9px; color: var(--muted); letter-spacing: .08em; margin-top: 3px; }
.kp-key:hover { border-color: var(--brand, #2563eb); } .kp-key:active { transform: scale(.97); }
.kp-call { background: #16a34a; border-color: #16a34a; color: #fff; font-weight: 700; height: 44px; }
.kp-call:hover { background: #15803d; }
.kp-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kp-ans.kp-ring { background: #16a34a; border-color: #16a34a; color: #fff; animation: kpRing 1s ease-in-out infinite; }
@keyframes kpRing { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, #16a34a 30%, transparent); } }
.kp-busy { opacity: .7; pointer-events: none; }
.ph-router { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.ph-router > summary { cursor: pointer; font-weight: 600; }
.ph-rbody { margin-top: 8px; } .ph-plan { margin-top: 10px; }
tr.rp-add td:first-child { color: var(--good, #16a34a); font-weight: 700; } tr.rp-chg td:first-child { color: #d97706; font-weight: 700; }
tr.rp-del td { color: var(--muted); text-decoration: line-through; } tr.rp-bad td { color: var(--bad, #dc2626); }
.ph-exts + .ph-router { margin-top: 10px; }
.ph-h4 { margin: 14px 0 6px; font-size: 14px; }
.nat-tbl tr.nat-ok td { background: color-mix(in srgb, #16a34a 12%, transparent); }
.ph-cfgbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; } .ph-cfgres { margin-bottom: 8px; }
/* Agent page → WebRTC (platform user) on a phone: one cell under the other, so the «Εσωτερικό» is not cut off on the right */
@media (max-width: 700px) {
  .wr-me thead { display: none; }
  .wr-me tr, .wr-me td { display: block; width: 100%; }
  .wr-me td { text-align: left !important; padding: 6px 0 !important; border: 0 !important; }
  .wr-me td:nth-child(1)::before { content: 'Τηλ. Κέντρο'; } .wr-me td:nth-child(2)::before { content: 'Εσωτερικό'; }
  .wr-me td::before { display: block; font-size: .85em; color: var(--muted, #888); margin-bottom: 4px; }
  .wr-me select { width: 100% !important; min-width: 0 !important; }
}
/* Live Vision full screen on a desktop: the board almost to the edges of the screen (the title row keeps a small inset) */
@media (min-width: 901px) {
  .mon-wrap:fullscreen, .mon-wrap.is-fs { padding-left: 6px !important; padding-right: 6px !important; }
  .mon-wrap:fullscreen .mon-top, .mon-wrap.is-fs .mon-top { padding-left: 16px; }
}
/* Agent page: tighter panels; the WebRTC box fits without a scroll bar */
.agent-grid { gap: 10px; } .ap-col { gap: 10px; }
.agent-grid .panel { padding: 10px; }
.agent-grid .panel > h3:first-child { margin-top: 0; }
.wr-me { width: 100%; table-layout: fixed; }
.wr-me th, .wr-me td { padding: 6px 4px !important; }
.wr-me select, .wr-tbl.wr-me select.wr-ext { width: 100% !important; min-width: 0 !important; margin: 0; }
#ap-wr .table-wrap { overflow: visible; }
/* side tools: the buttons keep their width (the theme button was squeezed), smaller gaps instead */
@media (min-width: 901px) { .side-tools { gap: 6px; padding-left: 14px; padding-right: 10px; } .side-tools .btn { flex-shrink: 0; } }
.theme-btn svg { display: block; }
/* Live Vision → «CDR Σήμερα» under the left column, to the left edge of the window (when the column has room: monitor.js) */
.view.cdr-wide { overflow: visible; }
.view.cdr-wide .mon-split, .view.cdr-wide .mon-cdr { position: relative; z-index: 13; background: var(--bg); }
:root[data-theme="dark"] .view.cdr-wide .mon-split, :root[data-theme="dark"] .view.cdr-wide .mon-cdr { background: #05070f; }
.view.cdr-wide .mon-cdr { padding-left: 8px; }
.view.cdr-wide .mon-split { margin-top: 0; padding-top: 3px; }
.side { transition: padding-bottom .12s; }
/* Τηλ. Κέντρα → Integration → Bridge */
.br-wrap { overflow: visible; }
.br-tbl td { vertical-align: middle; }
.br-tbl .br-ms { min-width: 260px; max-width: 520px; }
.br-tbl select { max-width: 320px; }
.br-busy { opacity: .6; pointer-events: none; }
.br-from { color: var(--brand); font-weight: 600; }
/* Διαχείριση (customer): the tables only as wide as their columns need (up to the width of the page) */
.adm-fit .table-wrap { width: fit-content; max-width: 100%; }
.adm-fit .table-wrap > .tbl { width: auto; }
.adm-fit .tbl td, .adm-fit .tbl th { padding-left: 10px; padding-right: 10px; }
/* no horizontal scroll unless the content really needs it: titles and text wrap */
.adm-fit .tbl th { white-space: normal; }
.adm-fit .tbl td { overflow-wrap: normal; word-break: normal; }
.sla-in { width: 80px; text-align: center; }
.sla-in.saved { border-color: var(--ok, #22c55e); }
.ph-detect { opacity: .7; }
/* Bridge: the state of the PBX at its own customer, read only */
.ra-dot.ro { display: inline-block; cursor: default; }
.ro-txt { font-weight: 600; }
/* Τηλ. Κέντρα → PBXs / Integration: tables only as wide as their content (fields keep a usable width) */
.adm-fit input.cv-name { width: clamp(130px, 14vw, 200px); min-width: 0; }
.adm-fit .tbl .ms-field { min-width: 220px; }
/* Integration → Access Control Settings */
.ac-tbl select, .ac-tbl input { min-width: 140px; }
/* Live Vision: a door phone (Access Controls) in «Σύνδεση» */
.mn.trunk.door { display: inline-flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; }
.mn.trunk.door .door-ic { width: 20px; height: 30px; flex: none; color: var(--m-cyan); }
.mn.trunk.door .door-t { display: flex; flex-direction: column; }
.mn.trunk.door.ring { border-color: var(--m-amber); animation: ringglow 1.1s ease-in-out infinite; }
.mn.trunk.door.ring .door-ic { color: var(--m-amber); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--m-amber) 70%, transparent)); }
.mn.trunk.door.talk { border-color: var(--m-green); }
.mn.trunk.door.talk .door-ic { color: var(--m-green); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--m-green) 70%, transparent)); }
:root[data-theme="dark"] .mn.trunk.door.talk { box-shadow: 0 0 20px rgba(57, 255, 154, .25); }
.ac-tbl select.ac-doors { min-width: 64px; }
.sc-days { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* Ρυθμίσεις → Κέντρο Υποστήριξης: κατάλογος τιμών και αργίες */
.table-wrap.adm-fit { width: fit-content; max-width: 100%; }
.table-wrap.adm-fit > .tbl { width: auto; }
.sp-wrap { width: fit-content; max-width: 100%; }
.sp-tbl { width: auto; }
.sp-tbl th, .sp-tbl td { padding: 6px 8px; vertical-align: middle; }
.sp-tbl thead th { white-space: nowrap; font-size: 12px; }
.sp-tbl tr.sp-first > * { border-top: 2px solid var(--border); }
.sp-tbl .sp-svc { text-align: left; min-width: 120px; max-width: 150px; white-space: normal; overflow-wrap: normal; }
.sp-svc b { display: block; font-size: 16px; }
.sp-svc small, .sp-x small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; line-height: 1.3; }
.sp-tbl .sp-x { min-width: 110px; max-width: 150px; white-space: normal; }
.sp-cell { text-align: center; }
.sp-cell input { width: 74px; text-align: right; padding: 4px 6px; height: 32px; }
.sp-coef { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.sp-base input { outline: 2px solid var(--brand); outline-offset: -1px; }
.sp-dirty input { background: var(--warn-bg); }
.sp-grid { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.sp-f { margin: 0; min-width: 190px; }
.sp-unit { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.field.sp-f .sp-unit input:not([type=checkbox]) { width: 90px; flex: none; }
.field.sp-f select { width: auto; min-width: 160px; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.sp-year { display: inline-flex; align-items: center; gap: 8px; }

/* Συμβόλαια */
.ct-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ct-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ct-title h2 { margin: 0; font-size: 22px; }
.ct-name { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--info-bg); color: var(--brand); font-weight: 700; white-space: nowrap; }
.ct-period { font-size: 14px; }
.ct-tools { margin-top: 6px; flex-wrap: wrap; }
.ct-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 14px 0 4px; }
.ct-pack { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.ct-pack-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ct-left b { font-size: 26px; }
.ct-bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ct-bar > span { display: block; height: 100%; background: var(--warn); }
.ct-tag { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); }
.ct-e2 { background: var(--warn-bg); color: var(--warn); }
.ct-e3 { background: var(--bad-bg); color: var(--bad); }
.ct-e4 { background: var(--good-bg); color: var(--good); }
.ct-e5 { background: var(--info-bg); color: var(--brand); }
.ct-e6 { background: var(--surface-2); color: var(--muted); }
.ct-tbl td.num, .ct-tbl th.num { text-align: right; white-space: nowrap; }
.ct-act { white-space: nowrap; text-align: right; }
.ct-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 8px 18px; padding: 14px 16px; }
.ct-rules > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.ct-notes { white-space: pre-wrap; }
.ct-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.ct-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 12px; }
.ct-cats .checks, #ct-e3c .checks { display: flex; flex-direction: column; gap: 2px; }
.ct-hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.ct-rules > div b { text-align: right; }
@media (max-width: 520px) { .ct-rules { grid-template-columns: 1fr; } }

/* Νέο αίτημα: E2 / E3, κατηγορία, εξοπλισμός, πότε, χρέωση */
.rq-step { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.rq-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.rq-kind, .rq-cat, .rq-when { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; text-align: left; }
.rq-kind { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-width: 2px; }
.rq-kind small { color: var(--muted); line-height: 1.4; }
.rq-kind.on, .rq-cat.on, .rq-when.on { border-color: var(--brand); background: var(--info-bg); }
.rq-e2-t { color: var(--warn); } .rq-e3-t { color: var(--bad); }
.rq-cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rq-cats > span { width: 16px; font-weight: 700; }
.rq-cat { padding: 6px 10px; font-size: 13px; font-weight: 600; }
.rq-cat.rq-out { opacity: .55; border-style: dashed; }
.rq-whens { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.rq-when { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 6px; }
.rq-when small { font-weight: 700; color: var(--muted); }
.rq-res[hidden] { display: none; }
.rq-res { border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.rq-res.rq-e3, .rq-res.rq-e3m { background: var(--bad-bg); border-color: var(--bad); }
.rq-res.rq-e2 { background: var(--warn-bg); border-color: var(--warn); }
.rq-res.rq-e1 { background: var(--surface-2); }
.rq-res.rq-free { background: var(--good-bg); border-color: var(--good); }
#rq-eq-other { margin-top: 6px; }
.rq-tag { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.rq-tag.rq-e3 { background: var(--bad-bg); color: var(--bad); }
.rq-tag.rq-e3m { background: var(--bad-bg); color: var(--bad); }
.rq-tag.rq-e2 { background: var(--warn-bg); color: var(--warn); }

/* Κέντρο Υποστήριξης → αίτημα: καταχώριση εργασίας */
.wk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.wk-head h2 { margin: 0; font-size: 20px; }
.wk-head select { width: auto; }
.wk-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; margin-bottom: 12px; }
.wk-info > div { display: flex; flex-direction: column; gap: 2px; }
.wk-info .muted { font-size: 12px; }
.wk-desc { white-space: pre-wrap; margin-top: 0; }
.wk-form { padding: 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.wk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.wk-tbl td.num, .wk-tbl th.num, .wk-list td.num, .wk-list th.num { text-align: right; white-space: nowrap; }
.wk-tbl .wk-total td { border-top: 2px solid var(--border); }
.wk-code { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-size: 12px; white-space: nowrap; }
.wk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0; }
.wk-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.wk-big { font-size: 20px; font-weight: 700; }
.nowrap { white-space: nowrap; }

/* Κέντρο Υποστήριξης → Αναφορές */
.rp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; }
.rp-bar select, .rp-bar input { width: auto; }
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 6px; }
.rp-kpis .card { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.rp-kpis b { font-size: 22px; }
.rp-tbl td.num, .rp-tbl th.num { text-align: right; white-space: nowrap; }
.rp-tbl .rp-group td { background: var(--surface-2); }
.rp-tbl .rp-sub td { border-top: 2px solid var(--border); text-align: right; }
.rp-meter { display: inline-block; vertical-align: middle; width: 60px; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-right: 4px; }
.rp-meter > span { display: block; height: 100%; background: var(--good); }
.rp-meter.low > span { background: var(--bad); }
.rp-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); margin: 2px; font-size: 12px; }
.rp-notes { max-width: 360px; white-space: pre-line; }

/* Μηνύματα αιτήματος */
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg { max-width: min(640px, 90%); align-self: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.msg.me { align-self: flex-end; background: var(--info-bg); }
.msg.int { border-style: dashed; opacity: .9; }
.msg-h { font-size: 12px; margin-bottom: 2px; }
.msg-t { white-space: pre-wrap; }
.msg-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 18px; }
.msg-new textarea { flex: 1 1 320px; width: auto; min-width: 0; }
.msg-new .btn { flex: none; }

/* side menu: the tools (push, font, day / night …) under the logo, centred; the clock above «Σχετικά με το app» */
.side > .side-tools { justify-content: center; padding: 10px 12px 6px; }
.side-tools .theme-btn { color: var(--text); filter: none; }
.side > .side-clock-bottom { margin: auto 0 2px; padding-top: 10px; }
.side > .side-clock-bottom + .side-about-bottom { margin-top: 0; }
@media (min-width: 901px) { .side-mini .side > .side-clock-bottom { display: none; } .side-mini .side > .side-clock-bottom + .side-about-bottom { margin-top: auto; } }

/* the CallVision logo is the left end of the title bar: same height, background and bottom line, edge to edge */
:root { --topbar-bg: var(--surface); }
:root[data-theme="dark"] { --topbar-bg: #0f1830; }
@media (min-width: 901px) {
  .side > .logo { box-sizing: border-box; height: var(--top-h, 64px); flex: none; position: sticky; top: 0; z-index: 3; padding: 0 12px; justify-content: center; background: var(--topbar-bg); border-bottom: 1px solid var(--border); }
  .side > .logo .brand-wrap { margin: 0 auto; }
  .side-mini .side > .logo { padding: 0; padding-bottom: 0; }
  .side-mini .side > .side-clock.short { display: block; margin: 10px 0 48px; }
}
/* the tools above the clock, at the foot of the menu */
.side > .side-tools { margin-top: auto; padding: 10px 12px 4px; }
.side > .side-tools + .side-clock-bottom { margin-top: 0; }
@media (min-width: 901px) { .side-mini .side > .side-tools { margin-top: auto; } .side-mini .side > .side-tools ~ .side-clock-bottom + .side-about-bottom { margin-top: 0; } }
@media (min-width: 901px) { .side > .logo .brand-logo img { height: 31px; } .side > .logo small.by { font-size: 10.5px; } }
@media (min-width: 901px) { .side { scrollbar-width: thin; } .side > .side-clock.short, .side > .side-tools, .side > .side-clock-bottom, .side > .side-about-bottom, .side > .side-build, .side > .tenant-id { flex: none; } }
/* the user, Ανανέωση, Αποσύνδεση: a group at the foot of the menu, above the tools */
.side > .side-me-box { margin-top: auto; }
.side > .side-me-box ~ .side-tools { margin-top: 0; }
@media (min-width: 901px) { .side-mini .side > .side-me-box ~ .side-tools { margin-top: 0; } }

/* Τηλ. Κέντρα → Διάγνωση με Claude */
.dg-start { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; margin: 10px 0 6px; }
.dg-start .field { margin: 0; min-width: 320px; flex: 1 1 320px; }
.dg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.dg-head h3 { margin: 0; font-size: 18px; }
.dg-list { display: flex; flex-direction: column; gap: 8px; max-width: 1100px; }
.dg-msg { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); max-width: min(900px, 95%); line-height: 1.5; }
.dg-msg.me { align-self: flex-end; background: var(--info-bg); white-space: pre-wrap; }
.dg-msg.ai { align-self: flex-start; background: var(--surface); }
.dg-t { white-space: pre-wrap; }
.dg-h { font-size: 12px; color: var(--muted); margin-bottom: 2px; font-weight: 600; }
.dg-tool { align-self: flex-start; max-width: 95%; font-size: 12.5px; padding: 4px 10px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 6px; }
.dg-tool.bad { border-left-color: var(--bad); }
.dg-tool summary { cursor: pointer; }
.dg-tool pre { max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11.5px; margin: 6px 0 2px; }
.dg-prop { align-self: flex-start; max-width: min(900px, 95%); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; border-color: var(--warn); }
.dg-prop-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dg-prop-f .grow { flex: 1; }
.dg-thinking { color: var(--muted); font-style: italic; margin: 8px 0; }
.dg-thinking::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: dg-dots 1.2s steps(4, end) infinite; }
@keyframes dg-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.dg-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 14px 0 20px; max-width: 1100px; }
.dg-new textarea { flex: 1 1 320px; width: auto; min-width: 0; }
.dg-new .btn { flex: none; }
/* the platform's menus right under the logo; a gap, then the customer and its menus */
.side > .side-staff-top { margin-top: 8px; padding-top: 4px; padding-bottom: 4px; }
.side > .side-staff-top::before { display: none; }
.side > .side-staff-top + .tenant-id, .side > .side-staff-top + nav { margin-top: 22px; }
.side nav .side-leave { width: 100%; text-align: left; }

/* a new version on the server: «Ανανέωση» and Build in green, with the update icon */
.side-refresh .upd-ico { display: none; margin-left: 6px; color: var(--good); }
body.update-ready .side-refresh { color: var(--good) !important; font-weight: 600; }
body.update-ready .side-refresh .upd-ico { display: inline-flex; animation: upd-pulse 1.6s ease-in-out infinite; }
body.update-ready .side-build { color: var(--good) !important; font-weight: 600; }
@keyframes upd-pulse { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: .55; transform: translateY(-2px); } }
@media (min-width: 901px) { .side-mini body.update-ready .side-refresh .upd-ico, body.side-mini.update-ready .side-refresh .upd-ico { display: none; } }
/* platform users: the clock at the top, above the platform's menus */
.side > .side-clock-top { margin: 14px 0 2px; flex: none; }
@media (min-width: 901px) { .side-mini .side > .side-clock-top { display: none; } }

/* platform users: Ανανέωση, Αποσύνδεση and the icons sit together at the bottom, just above «Σχετικά με το app» */
.side > .side-me-box.staff-foot { margin-top: auto; }
.side > .side-me-box.staff-foot ~ .side-about-bottom { margin-top: 6px; }
/* the request number: as big as the rest of the table (not the small 12px of .mono) */
.sup-tbl a.mono { font-size: 14.5px; white-space: nowrap; letter-spacing: .01em; }
@media (max-width: 900px) { .sup-tbl a.mono { font-size: 15px; } }

/* «⤓ App» (install as an app) sits right of the Build line, when it shows */
.side > .side-build { display: flex; align-items: center; gap: 10px; }
.side-build .install-btn { height: 26px; padding: 0 9px; gap: 5px; font-size: 12px; margin-left: auto; white-space: nowrap; opacity: 1; }
.side-build .install-btn .lbl-i { display: inline; }
.side-build .install-btn[hidden] { display: none !important; }
@media (min-width: 901px) { .side-mini .side > .side-build { flex-direction: column; gap: 6px; } .side-mini .side-build .install-btn { margin: 0; } .side-mini .side-build .install-btn .lbl-i { display: none; } }
/* bigger icons in the left column: the menu glyphs and the tool buttons */
@media (min-width: 901px) {
  .side .ico { width: 24px; font-size: 18px; }
  .side > .side-tools .btn { height: 38px; min-width: 42px; }
  .side > .side-tools .btn svg { width: 21px; height: 21px; }
  .side > .side-tools .theme-btn { width: 42px; font-size: 19px; }
  .side > .side-tools .font-btn .aaa { font-size: 1.2em; }
}
@media (min-width: 901px) {
  .side > .side-tools { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .side > .side-tools .btn { min-width: 38px; height: 38px; padding: 0 6px; }
  .side > .side-tools .theme-btn, .side > .side-tools .fs-btn { width: 38px; }
  .side-mini .side > .side-tools { padding-left: 0; padding-right: 0; }
}
.side > .side-build { white-space: nowrap; padding-left: 38px; padding-right: 16px; }

.side > .side-tools ~ .side-clock-bottom { margin-top: 0; }
.side > .side-clock-mini { display: none !important; }
@media (min-width: 901px) {
  /* customers, collapsed column: the time sits above «Σχετικά με το app»; the top keeps only the room of the ☰ button */
  .side-mini .side.cust-side > .side-clock-mini { display: block !important; margin: 8px 0 2px; font-size: 14px; flex: none; }
  .side-mini .side.cust-side > .side-clock.short:not(.side-clock-mini) { visibility: hidden; height: 0; }
  .side-mini .side.cust-side > .side-clock-mini ~ .side-about-bottom { margin-top: 0; }
  /* collapsed column: bigger icons */
  .side-mini .side .ico { font-size: 22px; }
  .side-mini .side > .side-tools .btn { width: 46px; height: 44px; }
  .side-mini .side > .side-tools .btn svg { width: 24px; height: 24px; }
  .side-mini .side > .side-tools .theme-btn { font-size: 22px; }
  .side-mini .side > .side-tools .font-btn .aaa { font-size: 1.35em; }
  .side-mini .side > .side-about-bottom { font-size: 20px; }
  .side-mini .side-build .install-btn { width: 40px; height: 32px; font-size: 17px; justify-content: center; }
}
/* expanded column: a smaller ⓘ; Build and «⤓ App» centred together when the App button shows */
@media (min-width: 901px) { body:not(.side-mini) .side > .side-about-bottom .ico { font-size: 15px; } }
.side > .side-build:has(.install-btn:not([hidden])) { justify-content: center; padding-left: 10px; padding-right: 10px; }
.side > .side-build:has(.install-btn:not([hidden])) .install-btn { margin-left: 0; }

/* a new version: the ⟳ itself turns green too (also in the collapsed column, where only the icon shows) */
body.update-ready .side-refresh .ico { filter: none; opacity: 1; color: var(--good); }
@media (min-width: 901px) {
  body.side-mini.update-ready .side-refresh .ico { animation: upd-pulse 1.6s ease-in-out infinite; }
  body.side-mini .side-build .old-b { display: none; }
}
.side > .side-build:has(.install-btn:not([hidden])) .old-b { display: none; } /* no room for «old →» next to App */
.kp-keys[hidden], .kp-dtmf[hidden] { display: none !important; }
.kp-dtmf { text-align: center; min-height: 22px; } .kp-dtmf b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; margin-left: 6px; }

/* support lists: name + extension in one cell; the columns wrap so the table fits without a horizontal scroll bar */
.sup-who { display: inline-flex; flex-direction: row-reverse; align-items: baseline; gap: 8px; }
.sup-who .ext { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.sup-who.stack { flex-direction: column; align-items: center; gap: 2px; }
.sup-who.stack .ext { font-size: 13px; }
.sup-tbl th { white-space: normal; }
.sup-tbl td { padding-left: 10px; padding-right: 10px; }
.sup-tbl .rq-tag { white-space: normal; }
.sup-tbl .sup-desc { max-width: 520px; min-width: 140px; overflow-wrap: anywhere; }
.sup-tbl select.sup-st { min-width: 0; max-width: 150px; }

/* a new version, no «⤓ App» beside it: «Build old → new» centred in the column */
body.update-ready .side > .side-build { justify-content: center; padding-left: 10px; padding-right: 10px; }
.side-build .mini-b { display: none; }
@media (min-width: 901px) {
  /* collapsed: new version, ↑, current version */
  body.side-mini .side-build .full-b { display: none; }
  body.side-mini .side-build .mini-b { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
  body.side-mini .side-build .mini-b i { font-style: normal; font-size: 13px; }
  body.side-mini .side-build .mini-b .cur-b { color: var(--muted); font-weight: 400; }
  /* the ☰ button: bigger, halfway between the clock and the menu (placed by the script) */
  .side-mini .side > .side-toggle { width: 38px; height: 38px; font-size: 20px; }
  .side-mini .side > .side-clock.short { margin-bottom: 58px; }
}

/* a new version, expanded column: «Build  old» over «→  new» */
.side-build .full-b { display: inline-grid; grid-template-columns: auto auto; column-gap: 8px; row-gap: 1px; align-items: baseline; line-height: 1.3; }
.side-build .full-b .arr-b { justify-self: center; }
.side-build .full-b .cur-b { color: var(--muted); font-weight: 400; }
body.update-ready .side-build .full-b .lbl { display: inline; }
/* «Σχετικά με το app»: one logo, the one of the theme (light: dark letters, dark: white letters) */
.about-logo .brand-logo img.lg-dark { display: none; }
:root[data-theme="dark"] .about-logo .brand-logo img.lg-light { display: none; }
:root[data-theme="dark"] .about-logo .brand-logo img.lg-dark { display: block; }

/* new version, expanded: only → and the new version are green; «Build» and the current version stay grey */
body.update-ready .side-build { color: var(--muted) !important; font-weight: 400; }
body.update-ready .side-build .arr-b, body.update-ready .side-build .new-b, body.update-ready .side-build .mini-b { color: var(--good); font-weight: 700; }
body.update-ready .side-build .mini-b .cur-b { font-weight: 400; color: var(--muted); }
/* «App»: the same download icon in both widths of the column */
.install-btn .dl-ico { display: block; flex: none; }
@media (min-width: 901px) { .side-mini .side-build .install-btn .dl-ico { width: 18px; height: 18px; } }

/* the scroll bar of the left column starts under the CallVision bar (the bar stays on top, the menu scrolls) */
@media (min-width: 901px) {
  @supports selector(::-webkit-scrollbar) {
    .side { scrollbar-width: auto; scrollbar-color: auto; }
    .side::-webkit-scrollbar { width: 8px; }
    .side::-webkit-scrollbar-track { background: transparent; margin-top: var(--top-h, 64px); }
    .side::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
    .side::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 70%, transparent); }
    .side::-webkit-scrollbar-button { display: none; height: 0; }
  }
}

@media (min-width: 901px) {
  /* the strip of the CallVision bar runs to the right edge of the column, also over the scroll bar's gutter */
  .side, :root[data-theme="dark"] .side { background-image: linear-gradient(to bottom, var(--topbar-bg) 0, var(--topbar-bg) calc(var(--top-h, 64px) - 1px), var(--border) calc(var(--top-h, 64px) - 1px), var(--border) var(--top-h, 64px), transparent var(--top-h, 64px)); background-repeat: no-repeat; }
  /* collapsed: the clock and the room of ☰ stay on top; the menu scrolls under them and disappears a few px below ☰ */
  .side-mini .side > .side-clock.short:not(.side-clock-mini) { position: sticky; top: var(--top-h, 64px); z-index: 2; margin: 0; padding: 10px 0 64px; background: var(--surface); }
  :root[data-theme="dark"] .side-mini .side > .side-clock.short:not(.side-clock-mini) { background: rgb(8, 12, 26); }
  .side-mini .side.cust-side > .side-clock.short:not(.side-clock-mini) { visibility: visible; height: auto; font-size: 0; padding-top: 4px; }
}
@media (min-width: 901px) { @supports selector(::-webkit-scrollbar) { .side-mini .side::-webkit-scrollbar-track { margin-top: calc(var(--top-h, 64px) + var(--clk-h, 0px)); } } }

/* the install button: the download icon only, left of «Build» (expanded column) */
.side-build .install-btn { width: 30px; height: 28px; padding: 0; margin: 0; justify-content: center; }
.side > .side-build:has(.install-btn:not([hidden])) { justify-content: center; }
@media (min-width: 901px) { .side-mini .side-build .install-btn { order: 2; } }
/* «Σχετικά με το app» lines up with the menu above it (same left edge, an icon drawn, not a font glyph) */
.side > .side-about-bottom { margin-left: 6px; margin-right: 6px; }
.side > .side-about-bottom .info-ico { display: block; margin: 0 auto; }
@media (min-width: 901px) { .side-mini .side > .side-about-bottom .info-ico { width: 22px; height: 22px; } }

/* scroll bars everywhere (tables, pages, the left column): they fade in while the mouse is over them and fade out at once
   when it leaves. The thumb reads --sb (0…1) of its element; --sb is a registered property, so it can be animated, and the
   transition sits in :where() (no specificity): an element with a transition of its own keeps it (and simply shows / hides) */
@property --sb { syntax: '<number>'; inherits: true; initial-value: 0; }
@supports selector(::-webkit-scrollbar) {
  :where(*) { --sb: 0; transition: --sb .25s ease; }
  :where(*:hover) { --sb: 1; }
  ::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  ::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--muted) calc(45% * var(--sb)), transparent); border: 2px solid transparent; background-clip: padding-box; border-radius: 10px; }
  ::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) calc(70% * var(--sb)), transparent); }
  @media (min-width: 901px) {
    .side { transition: padding-bottom .12s, --sb .25s ease; }
    .side::-webkit-scrollbar { width: 8px; }
  }
}

/* expanded column: Build starts where the text «Σχετικά με το app» starts (6 + 10 + 24 + 10 px); the download button right of it */
@media (min-width: 901px) {
  body:not(.side-mini) .side > .side-build, body:not(.side-mini).update-ready .side > .side-build, body:not(.side-mini) .side > .side-build:has(.install-btn:not([hidden])) { justify-content: flex-start; padding-left: 50px; padding-right: 10px; }
  body:not(.side-mini) .side-build .install-btn { margin-left: 10px; }
}

/* a narrower left column: less room left of the icons and between icon and text (the width itself: fitSide in app.js) */
@media (min-width: 901px) {
  body:not(.side-mini) .side nav, body:not(.side-mini) .side-staff-top { padding-left: 4px; padding-right: 4px; margin-left: 0; margin-right: 0; }
  body:not(.side-mini) .side nav a, body:not(.side-mini) .side-staff-top a, body:not(.side-mini) .side nav .side-logout,
  body:not(.side-mini) .side-user a, body:not(.side-mini) .side-logout { padding-left: 6px; padding-right: 6px; gap: 8px; }
  body:not(.side-mini) .side-me-box { margin-left: 4px; margin-right: 4px; }
  body:not(.side-mini) .side > .side-about-bottom { margin-left: 4px; margin-right: 4px; padding-left: 6px; padding-right: 6px; gap: 8px; }
  body:not(.side-mini) .side .nav-sep, body:not(.side-mini) .side > .tenant-id { margin-left: 8px; margin-right: 8px; }
  body:not(.side-mini) .side > .side-tools { padding-left: 6px; padding-right: 6px; gap: 6px; }
  body:not(.side-mini) .side > .side-build, body:not(.side-mini).update-ready .side > .side-build, body:not(.side-mini) .side > .side-build:has(.install-btn:not([hidden])) { padding-left: 42px; padding-right: 6px; }
  @supports selector(::-webkit-scrollbar) { .side::-webkit-scrollbar { width: 6px; } }
}
@media (min-width: 901px) {
  body:not(.side-mini) .side > .side-tools .btn { min-width: 34px; width: 34px; height: 34px; padding: 0; }
  body:not(.side-mini) .side > .side-tools .btn svg { width: 19px; height: 19px; }
}

/* VoIP Trace */
.vt-start { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 14px; margin: 10px 0 18px; }
.vt-start .field { margin: 0; min-width: 160px; }
.vt-start #vt-pbx { min-width: 240px; }
.vt-start .vt-sip { flex-basis: 100%; }
.vt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.vt-head h3 { margin: 0 0 2px; }
.vt-live { white-space: nowrap; font-variant-numeric: tabular-nums; }
.vt-tools { display: flex; align-items: center; gap: 10px; margin: 10px 0; } .vt-tools input { max-width: 340px; }
.vt-tl { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.vt-row { display: grid; grid-template-columns: 104px 76px 1fr; gap: 10px; padding: 5px 10px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; align-items: baseline; }
.vt-row:last-child { border-bottom: 0; }
.vt-row:hover { background: var(--surface-2); }
.vt-t { color: var(--muted); font-size: 12px; } .vt-k { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.vt-row.k-sip .vt-k { color: var(--brand); } .vt-row.k-reg .vt-k { color: var(--good); } .vt-row.k-note .vt-k { color: var(--warn); }
.vt-l { overflow-wrap: anywhere; }
.vt-raw { grid-column: 1 / -1; margin: 4px 0 2px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; cursor: text; }
.vt-find { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.vt-find li { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.vt-find li.bad { background: var(--bad-bg); } .vt-find li.bad .vt-ic { color: var(--bad); } .vt-find li.warn .vt-ic { color: var(--warn); } .vt-find li.ok .vt-ic { color: var(--good); }
.vt-call { padding: 12px 14px; margin: 10px 0; display: grid; gap: 4px; }
.vt-q { margin-top: 6px; } .vt-q td, .vt-q th { padding: 5px 8px; }
.vt-set td { padding: 4px 10px; }

/* Αυτόματη παρακολούθηση: automatic requests */
.rq-tag.rq-autotag { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.sup-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 4px 0 12px; border-radius: 10px; background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.sup-banner-i { color: var(--bad); font-size: 18px; line-height: 1.2; }
.sup-banner .small { margin-top: 3px; }
.sup-pick { display: grid; gap: 6px; margin-bottom: 12px; }
.sup-pick-o { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.sup-pick-o:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.sup-pick-o input { margin-top: 3px; }
.rq-auto { padding: 12px 14px; margin: 12px 0; display: grid; gap: 8px; border-left: 3px solid var(--brand); }
.rq-auto-h { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rq-auto-f { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.rq-auto-f .rq-cause { margin: 0; min-width: 220px; }
.rq-auto-t td { padding: 4px 10px; vertical-align: top; }
.rq-auto-pre { margin: 0; font-size: 12px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.tn-mon { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.tn-mon-h { font-weight: 700; }
.tn-hours { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tn-hours .small { flex-basis: 100%; }
.tn-days { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tn-hours input[type=time] { width: auto; }
/* Ρυθμίσεις → Αυτόματα Αιτήματα */
.mr-bar { margin: 6px 0 12px; }
.mr-tbl td { vertical-align: top; }
.mr-tbl tr.mr-off td { opacity: .6; }
/* Διάγνωση με Claude: imported files */
.dg-btns { display: flex; flex-direction: column; gap: 6px; }
.dg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; background: var(--surface-2); }
.dg-chip-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; }
.dg-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* Remote Browser: downloads */
.rb-dl { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 6px; }
.rb-dl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.vt-tools select { width: auto; max-width: 260px; }

/* the window's scroll bar: kept while the mouse is on it (app.js «sb-hold») */
:root.sb-hold, :root.sb-hold body { --sb: 1; }
/* Κέντρο Υποστήριξης: a tab per open request */
.rq-tabs { flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rq-tabs .rq-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; }
.rq-tab .mono { font-size: 12.5px; }
.rq-tab small { color: var(--muted); font-size: 11.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-tab-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 4px; line-height: 1; }
.rq-tab-x:hover { color: var(--bad); background: var(--surface-2); }

/* VoIP Trace → «Τι έγινε» */
.ts-top { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin: 12px 0; }
.ts-counts { display: flex; flex-wrap: wrap; gap: 12px; }
.ts-count { display: inline-flex; align-items: center; gap: 6px; }
.ts-v { display: inline-block; min-width: 78px; text-align: center; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ts-ok { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.ts-info { background: var(--surface-2); color: var(--muted); }
.ts-odd { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #d97706; }
:root[data-theme="dark"] .ts-odd { color: #fbbf24; }
.ts-problem { background: color-mix(in srgb, #f97316 22%, transparent); color: #ea580c; }
:root[data-theme="dark"] .ts-problem { color: #fb923c; }
.ts-error { background: var(--bad-bg); color: var(--bad); }
.ts-h { margin: 18px 0 8px; }
.ts-call { padding: 0; margin: 10px 0; border-left: 4px solid var(--border); overflow: hidden; }
.ts-call.ts-b-ok { border-left-color: var(--good); } .ts-call.ts-b-odd { border-left-color: #f59e0b; } .ts-call.ts-b-problem { border-left-color: #f97316; } .ts-call.ts-b-error { border-left-color: var(--bad); }
.ts-call > summary { cursor: pointer; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; list-style: none; }
.ts-call > summary::-webkit-details-marker { display: none; }
.ts-call > summary .ts-v { grid-row: span 2; margin-top: 2px; }
.ts-story { font-size: 15px; } .ts-story2 { font-size: 13.5px; color: var(--muted); } .ts-story2 b { color: var(--text); }
.ts-dir { font-weight: 700; }
.ts-call > :not(summary) { margin-left: 14px; margin-right: 14px; }
.ts-gantt { margin-top: 4px; margin-bottom: 12px; display: grid; gap: 6px; }
.ts-g-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.ts-g-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-g-bar { position: relative; height: 18px; background: var(--surface-2); border-radius: 5px; }
.ts-g-bar > span { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; }
.ts-g-ring, .ts-g-key .ts-g-ring { background: #f59e0b; opacity: .8; }
.ts-g-talk, .ts-g-key .ts-g-talk { background: var(--good); }
.ts-g-hold, .ts-g-key .ts-g-hold { background: var(--muted); }
.ts-g-bar > .ts-g-end { width: 3px; top: 0; bottom: 0; background: var(--text); border-radius: 2px; }
.ts-g-bar > .ts-g-end.bad { background: var(--bad); }
.ts-g-axis { display: flex; justify-content: space-between; margin-left: 180px; font-size: 11.5px; color: var(--muted); }
.ts-g-key { display: flex; align-items: center; gap: 6px; margin-left: 180px; }
.ts-g-key span { display: inline-block; width: 16px; height: 8px; border-radius: 2px; margin-left: 8px; }
.ts-ladder { width: 100%; max-width: 900px; height: auto; display: block; margin: 4px 0 12px; }
.ts-l-h { font-size: 13px; font-weight: 700; fill: var(--text); }
.ts-l-life { stroke: var(--border); stroke-width: 2; stroke-dasharray: 4 4; }
.ts-l-arrow { stroke: var(--muted); stroke-width: 2; } .ts-l-arrow.both { stroke-width: 4; }
.ts-l-head { fill: var(--muted); }
.ts-l-t { font-size: 12px; fill: var(--text); } .ts-l-time { font-size: 10.5px; fill: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ts-l-ok .ts-l-arrow { stroke: var(--good); } .ts-l-ok .ts-l-head { fill: var(--good); }
.ts-l-odd .ts-l-arrow { stroke: #f59e0b; } .ts-l-odd .ts-l-head { fill: #f59e0b; }
.ts-l-problem .ts-l-arrow, .ts-l-error .ts-l-arrow { stroke: var(--bad); } .ts-l-problem .ts-l-head, .ts-l-error .ts-l-head { fill: var(--bad); }
.ts-evs { margin-bottom: 12px; } .ts-evs > summary { cursor: pointer; margin: 4px 0 8px; }
.ts-row { display: grid; grid-template-columns: 104px 90px 1fr; gap: 10px; align-items: baseline; padding: 5px 4px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ts-row[data-raw] { cursor: pointer; } .ts-row[data-raw]:hover { background: var(--surface-2); }
.ts-t { color: var(--muted); font-size: 12px; }
.ts-list { border: 1px solid var(--border); border-radius: 10px; padding: 0 8px; }
@media (max-width: 700px) { .ts-g-row { grid-template-columns: 90px 1fr; } .ts-g-axis, .ts-g-key { margin-left: 100px; } .ts-row { grid-template-columns: 74px 80px 1fr; } }
/* «Τι έγινε»: the audio of each direction, the SIP signalling */
.ts-g-bar > .ts-g-talk.up { top: 2px; bottom: 50%; margin-bottom: 1px; }
.ts-g-bar > .ts-g-talk.dn { top: 50%; bottom: 2px; margin-top: 1px; }
.ts-g-talk.ts-a-ok, .ts-g-talk.ts-a-info { background: var(--good); }
.ts-g-talk.ts-a-info { opacity: .55; }
.ts-g-talk.ts-a-odd { background: #f59e0b; } .ts-g-talk.ts-a-problem { background: #f97316; } .ts-g-talk.ts-a-error { background: var(--bad); }
.ts-l-arrow.audio { stroke-width: 3; }
.ts-l-arrow.dashed { stroke-dasharray: 6 4; }
.ts-sip { margin: 6px 0 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.ts-sip-h { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ts-sip-h .ts-copy { margin-left: auto; }
.ts-sip-t { margin-top: 4px; } .ts-sip-t td, .ts-sip-t th { padding: 5px 10px; }
/* «Τι έγινε»: the title of a call is clearly a button (hover, pointer) with a collapse sign at the right */
.ts-call > summary { position: relative; padding-right: 52px; transition: background .15s; user-select: none; }
.ts-call > summary:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.ts-call > summary:hover .ts-story { color: var(--brand); }
.ts-call > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ts-call > summary::after { content: ''; position: absolute; right: 16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b98b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .2s; }
.ts-call[open] > summary::after { transform: rotate(180deg); }
.ts-call[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.ts-evs > summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); list-style: none; }
.ts-evs > summary::-webkit-details-marker { display: none; }
.ts-evs > summary::before { content: '▸'; transition: transform .2s; display: inline-block; }
.ts-evs[open] > summary::before { transform: rotate(90deg); }
.ts-evs > summary:hover { border-color: var(--brand); color: var(--brand); }
/* «Τι έγινε»: the bars as wide as the diagrams; the SIP diagram next to the call flow when there is room */
.ts-gantt { max-width: 900px; }
.ts-diagrams { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; }
.ts-diagrams > * { flex: 1 1 560px; max-width: 900px; min-width: 0; }
.ts-diagrams > .ts-sip { margin-top: 0; padding-top: 0; border-top: 0; }
.ts-diagrams .ts-sip-h { min-height: 30px; }
.ts-diagrams .ts-ladder { max-width: none; }
/* VoIP Trace: a big blinking red light while the trace records */
.vt-rec { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px; font-weight: 800; letter-spacing: .08em; color: #ef4444; border: 1px solid color-mix(in srgb, #ef4444 45%, transparent); background: color-mix(in srgb, #ef4444 10%, transparent); }
.vt-rec i { width: 22px; height: 22px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .7), 0 0 14px 2px rgba(239, 68, 68, .8); animation: vt-blink 1.1s ease-in-out infinite; }
@keyframes vt-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6), 0 0 16px 3px rgba(239, 68, 68, .85); } 50% { opacity: .25; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), 0 0 4px 0 rgba(239, 68, 68, .3); } }
.vt-rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; display: inline-block; animation: vt-blink 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .vt-rec i, .vt-rec-dot { animation: none; } }
.vt-head > .vt-rec { order: 99; }

/* the «Trace» light of the title bar (as big as the PBX pill), blinking while a trace records */
.vt-rec-pill { display: inline-flex; align-items: center; gap: 7px; color: #ef4444; background: color-mix(in srgb, #ef4444 12%, transparent); border: 1px solid color-mix(in srgb, #ef4444 40%, transparent); font-weight: 700; }
.vt-rec-pill i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: vt-blink 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .vt-rec-pill i { animation: none; } }
/* the time bars end where their legend ends */
.ts-gantt { display: inline-grid; width: auto; max-width: 100%; }

/* Πελάτες: the tables as wide as their content; Υπηρεσίες under the customers */
.tenants-tbl, .tenants-svc { width: auto; }
.table-wrap:has(> .tenants-tbl), .table-wrap:has(> .tenants-svc) { width: fit-content; max-width: 100%; }
.tbl.tenants-svc td:first-child, .tbl.tenants-svc th:first-child { text-align: left; }
.tbl.tenants-svc th:not(:first-child), .tbl.tenants-svc td:not(:first-child) { min-width: 120px; }
.tn-svc-h { margin: 28px 0 10px; }
/* Τηλ. Κέντρα → PBXs → VPBX */
.vp-recalc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin-bottom: 14px; }
.vp-recalc label { display: inline-flex; align-items: center; gap: 6px; }
#adm .vp-recalc select, .vp-recalc select { width: auto; max-width: 240px; }
#adm .vp-recalc input[type=date] { width: auto; }
.vp-h { margin: 18px 0 8px; }
.vp-wrap { width: fit-content; max-width: 100%; overflow-x: auto; }
.vp-tbl td { vertical-align: middle; padding: 5px 7px; }
.vp-tbl th { padding-left: 7px; padding-right: 7px; white-space: nowrap; }
.vp-tbl td.vp-pbx { max-width: 150px; border-left: 1px solid var(--border); line-height: 1.25; }
.vp-tbl td.vp-pbx:first-child { border-left: 0; }
.vp-tbl .vp-nm { color: var(--muted); font-size: .9em; }
#adm .vp-tbl select.vp-sel, .vp-tbl select.vp-sel { width: auto; min-width: 0; max-width: 140px; padding: 3px 4px; font-size: 13px; }
.vp-tbl .vp-sel.on { border-color: var(--accent, #4f8cff); }
.vp-tbl .vp-tr { white-space: nowrap; line-height: 1.15; margin: 2px 0; }
.vp-tbl .vp-tr .tsub { display: block; font-size: .72em; color: var(--muted); }
.vpc-tbl td.left { text-align: left; }

/* VPBX: the branch under a trunk's name (Live Vision, CDR) */
.mn .tsub, .trunk-cell .tsub { display: block; font-size: .72em; color: var(--muted); font-weight: 500; line-height: 1.2; }
.trunk-cell > span { display: inline-block; vertical-align: top; }
