/* webco - mint glass theme. All assets are local: no external requests. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg-1: #f3fbf8;
  --bg-2: #e3f3ec;
  --bg-3: #d6eee4;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-line: rgba(255, 255, 255, 0.92);
  --solid: #ffffff;
  --ink: #12372e;
  --ink-2: #3f5f55;
  --muted: #4a675e;
  --line: #d3e7de;
  --accent: #2f9e7b;
  --accent-deep: #1f7a5e;
  --accent-soft: #d7f0e6;
  --accent-ink: #1f5e4a;
  --good: #2f9e7b;
  --good-soft: #dcf2e8;
  --warn: #b36700;
  --warn-soft: #fff1dc;
  --warn-ink: #7a4600;
  --bad: #c2352a;
  --bad-soft: #fce5e2;
  --bad-ink: #a12a20;
  --blue: #2f62d1;
  --blue-soft: #e5edfd;
  --blue-ink: #1f4aa8;
  --chart-1: #2f9e7b;
  --chart-2: #2f62d1;
  --violet: #6b48c2;
  --violet-soft: #efe9fb;
  --violet-ink: #55369f;
  --shadow: 0 18px 40px rgba(31, 94, 74, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 8px 20px rgba(31, 94, 74, 0.1);
  --blur: blur(20px);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-1: #0d1a17;
  --bg-2: #0f201c;
  --bg-3: #122823;
  --glass: rgba(24, 44, 39, 0.62);
  --glass-strong: rgba(28, 52, 46, 0.86);
  --glass-line: rgba(132, 214, 182, 0.14);
  --solid: #15302a;
  --ink: #e5f4ee;
  --ink-2: #b9d3c9;
  --muted: #9dbbb0;
  --line: #24443c;
  --accent: #46c497;
  --accent-deep: #2f9e7b;
  --chart-1: #2f9e7b;
  --chart-2: #5b82e6;
  --accent-soft: #163b31;
  --accent-ink: #8de3c2;
  --good-soft: #143a2f;
  --warn-soft: #3a2a10;
  --warn-ink: #f6c67e;
  --bad-soft: #401b18;
  --bad-ink: #ffaaa1;
  --blue-soft: #1a2a4d;
  --blue-ink: #a9c3ff;
  --violet-soft: #2a2245;
  --violet-ink: #cdbdff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg-2); }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-deep); }
:root[data-theme="dark"] a { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- glass surfaces ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.tile {
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
}
body.perf .glass, body.perf .modal-card, body.perf .sidebar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--solid); }
body.perf .leaf { display: none; }

/* ---------- app shell ---------- */
.shell { display: flex; flex-wrap: wrap; gap: 18px; padding: 18px; min-height: 100vh; position: relative; }
.sidebar {
  flex: 1 1 210px; max-width: 228px; min-width: 0;
  display: flex; flex-direction: column; gap: 4px; padding: 20px 14px;
  position: relative; z-index: 1;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--solid);
  box-shadow: 0 6px 16px rgba(31, 122, 94, 0.18);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.brand-mark img { width: 34px; height: auto; display: block; }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px;
  border-radius: 999px; border: 0; background: transparent; color: var(--ink-2);
  text-decoration: none; font-weight: 500; cursor: pointer; text-align: left; width: 100%;
}
.nav-item:hover { background: var(--glass-strong); color: var(--ink); }
.nav-item.active {
  background: linear-gradient(145deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%));
  color: var(--ink); font-weight: 700; box-shadow: var(--shadow-sm);
}
.nav-item .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; font-weight: 700; font-size: 13px;
  background: linear-gradient(145deg, #d7f0e6, #b7e2d0); color: #1f5e4a;
  display: inline-flex; align-items: center; justify-content: center;
}
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topbar .title { flex: 1 1 320px; min-width: 0; }
.topbar h1 { font-family: var(--display); font-size: 36px; line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-head h2 { font-family: var(--display); font-size: 21px; font-weight: 600; flex: 1 1 auto; letter-spacing: -0.01em; }
.leaf { position: fixed; pointer-events: none; z-index: 0; opacity: 0.55; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--glass-line); background: var(--glass-strong); color: var(--ink); font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--solid); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(145deg, #45b18c, #1f7a5e);
  box-shadow: 0 10px 22px rgba(31, 122, 94, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover { background: linear-gradient(145deg, #3ea582, #1a6b52); }
.btn-danger { border: 0; color: #fff; background: linear-gradient(145deg, #e0675b, #b8342a); box-shadow: 0 10px 22px rgba(184, 52, 42, 0.25); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.btn-lg { min-height: 54px; border-radius: 18px; font-size: 16px; padding: 0 22px; }
.btn-sm { min-height: 32px; border-radius: 10px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.input, .select, .textarea {
  min-height: 42px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--glass-line); background: var(--glass-strong); color: var(--ink);
  box-shadow: inset 0 2px 5px rgba(31, 94, 74, 0.07); font-size: 14px; font-weight: 500; width: 100%;
}
.textarea { padding: 10px 14px; resize: vertical; min-height: 70px; }
.input::placeholder, .textarea::placeholder { color: #6f8a81; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--accent-soft) 75%, transparent); box-shadow: inset 0 2px 6px rgba(31, 94, 74, 0.1); }
.seg button { border: 0; background: transparent; min-height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.seg button.on { background: var(--solid); color: var(--ink); box-shadow: 0 4px 12px rgba(31, 94, 74, 0.14); }
.seg button:disabled { cursor: not-allowed; opacity: 0.6; }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--glass-strong); border: 1px solid var(--glass-line); white-space: nowrap;
}
.chip .dot, .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.chip.good { background: var(--good-soft); color: var(--accent-ink); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); border-color: transparent; }
.chip.blue { background: var(--blue-soft); color: var(--blue-ink); border-color: transparent; }
.chip.violet { background: var(--violet-soft); color: var(--violet-ink); border-color: transparent; }
.badge { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.badge.bad { background: var(--bad); }

/* status colours (never only mint: each state must be told apart) */
.st-ready { --st: var(--good); --st-bg: var(--good-soft); --st-ink: var(--accent-ink); }
.st-on_call { --st: var(--blue); --st-bg: var(--blue-soft); --st-ink: var(--blue-ink); }
.st-ringing { --st: var(--warn); --st-bg: var(--warn-soft); --st-ink: var(--warn-ink); }
.st-wrap { --st: var(--violet); --st-bg: var(--violet-soft); --st-ink: var(--violet-ink); }
.st-idle { --st: #8a7bd1; --st-bg: var(--violet-soft); --st-ink: var(--violet-ink); }
.st-break { --st: #c2541b; --st-bg: #fde9de; --st-ink: #8f3a0e; }
.st-meeting { --st: #7b4fc9; --st-bg: #efe7fb; --st-ink: #4e2a91; }
.st-training { --st: #3d6fd1; --st-bg: #e3ecfb; --st-ink: #22468f; }
.st-internal { --st: #0e8fa8; --st-bg: #ddf3f7; --st-ink: #0b6577; }
.st-hangup { --st: #d1453b; --st-bg: #fde4e1; --st-ink: #922a22; }
.st-logged_off { --st: #8a9a94; --st-bg: rgba(138, 154, 148, 0.15); --st-ink: var(--muted); }
:root[data-theme="dark"] .st-break { --st-bg: #3a2214; --st-ink: #ffb894; }
:root[data-theme="dark"] .st-meeting { --st-bg: #2c1f45; --st-ink: #cfb6ff; }
:root[data-theme="dark"] .st-training { --st-bg: #18294a; --st-ink: #a9c4ff; }
:root[data-theme="dark"] .st-internal { --st-bg: #10343b; --st-ink: #8fe0ef; }
:root[data-theme="dark"] .st-hangup { --st-bg: #3d1a17; --st-ink: #ffaaa2; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--st-bg); color: var(--st-ink); }
.status-pill .dot { background: var(--st); }

/* ---------- lists & tables ---------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 11px 12px;
  border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; border-radius: 0;
}
.list-item:first-child { border-top: 0; }
.list-item:hover { background: var(--glass-strong); }
.list-item.selected { background: var(--accent-soft); }
.list-item.flagged { box-shadow: inset 3px 0 0 var(--bad); }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr.group td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; text-align: left; }
.kpi .v { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.kpi .l { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- toggles ---------- */
.switch { flex: none; width: 58px; height: 34px; border-radius: 999px; border: 0; padding: 3px; cursor: pointer; display: flex; background: #c9ddd5; box-shadow: inset 0 2px 6px rgba(31, 94, 74, 0.18); }
.switch[aria-checked="true"] { justify-content: flex-end; background: linear-gradient(145deg, #45b18c, #1f7a5e); }
.switch span { width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(31, 94, 74, 0.25); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- toast & modal ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { padding: 12px 16px; border-radius: 16px; background: var(--solid); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 600; }
.toast.err { border-color: var(--bad); color: var(--bad-ink); background: var(--bad-soft); }
.toast.ok { border-color: var(--accent); color: var(--accent-ink); background: var(--good-soft); }
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(8, 24, 20, 0.45); display: flex; align-items: flex-start; justify-content: center; padding: 70px 16px; overflow-y: auto; }
.modal-card { width: 100%; max-width: 540px; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--glass-strong); border: 1px solid var(--glass-line); border-radius: 26px; box-shadow: var(--shadow); backdrop-filter: blur(24px); }

/* ---------- agent ---------- */
.ring-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.ring-wrap svg { width: 220px; height: 220px; }
.ring-center { position: absolute; inset: 32px; border-radius: 50%; background: var(--glass-strong); box-shadow: inset 0 4px 12px rgba(31, 94, 74, 0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.ring-center .big { font-family: var(--display); font-size: 30px; font-weight: 600; }
.status-circles { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.status-circle { width: 82px; height: 82px; border-radius: 50%; border: 1px solid var(--glass-line); background: var(--glass-strong); box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ink); }
.status-circle[aria-pressed="true"] { background: linear-gradient(145deg, #e2f6ee, #c4eada); box-shadow: 0 12px 26px rgba(31, 94, 74, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.9); }
:root[data-theme="dark"] .status-circle[aria-pressed="true"] { background: var(--accent-soft); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 10px 12px; }
.fact .l { font-size: 11px; color: var(--muted); font-weight: 600; }
.fact .v { font-weight: 700; font-size: 15px; }
.phase { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px; border: 1px solid var(--glass-line); }
.phase .timer { margin-left: auto; font-size: 26px; font-weight: 600; }
.phase .pdot { width: 12px; height: 12px; border-radius: 50%; }
.phase.idle { background: var(--glass-strong); }
.phase.idle .pdot { background: #8aa79c; box-shadow: 0 0 0 5px rgba(138, 167, 156, 0.18); }
.phase.ringing { background: var(--warn-soft); color: var(--warn-ink); }
.phase.ringing .pdot { background: var(--warn); box-shadow: 0 0 0 5px rgba(179, 103, 0, 0.18); animation: pulse 1.2s infinite; }
.phase.answered { background: var(--good-soft); color: var(--accent-ink); }
.phase.answered .pdot { background: var(--good); box-shadow: 0 0 0 5px rgba(47, 158, 123, 0.2); }
.phase.wrap { background: var(--blue-soft); color: var(--blue-ink); }
.phase.wrap .pdot { background: var(--blue); }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(179, 103, 0, 0.05); } }
@media (prefers-reduced-motion: reduce) { .phase.ringing .pdot { animation: none; } }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.code-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--glass-strong); cursor: pointer; text-align: left; font-weight: 600; color: var(--ink); }
.code-btn .k { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--muted); flex: none; }
.code-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.steps { display: flex; gap: 6px; }
.step { flex: 1 1 0; display: flex; flex-direction: column; gap: 5px; }
.step .bar { height: 5px; border-radius: 3px; background: var(--line); }
.step.done .bar { background: var(--accent); }
.step.paid .bar { background: var(--good); }
.step .l { font-size: 11px; font-weight: 700; }
.timeline-item { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.timeline-item:first-child { border-top: 0; }
.bars { display: flex; gap: 12px; align-items: flex-end; }
.bar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-track { width: 100%; max-width: 42px; height: 120px; border-radius: 999px; background: var(--glass-strong); box-shadow: inset 0 3px 8px rgba(31, 94, 74, 0.1); display: flex; align-items: flex-end; padding: 4px; }
.bar-fill { width: 100%; border-radius: 999px; background: linear-gradient(180deg, #a9dec7, #6fc2a0); min-height: 6px; }
.bar-col.today .bar-fill { background: linear-gradient(180deg, #45b18c, #1f7a5e); }

/* ---------- supervisor ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.agent-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 4px 0 0 var(--st); }
.progress { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; padding: 48px 24px; position: relative; overflow: hidden; }
.login-hero { flex: 1 1 400px; max-width: 520px; display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; }
.login-hero h1 { font-family: var(--display); font-size: clamp(40px, 6vw, 58px); line-height: 1.03; font-weight: 600; letter-spacing: -0.03em; }
.login-card { flex: 0 1 440px; padding: 32px 30px; border-radius: 30px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.drop { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, rgba(255, 255, 255, 0.4) 35%, rgba(126, 200, 168, 0.35) 100%); box-shadow: 0 4px 10px rgba(31, 94, 74, 0.15); pointer-events: none; }
body.perf .drop { display: none; }

.lock { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lock .card { max-width: 540px; width: 100%; }
.key-box { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; min-height: 110px; }
.server-id { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-weight: 700; letter-spacing: 0.03em; }

@media (max-width: 760px) {
  .shell { padding: 12px; gap: 12px; }
  .sidebar { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .brand { padding: 0 6px; flex-basis: 100%; }
  .nav-item { width: auto; }
  .side-foot { flex-basis: 100%; flex-direction: row; margin-top: 0; padding-top: 0; }
  .topbar h1 { font-size: 28px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- v0.2: live buckets, wizard, disposition picker ---------- */
.st-waiting { --st: var(--good); --st-bg: var(--good-soft); --st-ink: var(--accent-ink); }
.st-dialing { --st: #0e8fa8; --st-bg: #ddf3f7; --st-ink: #0b6577; }
.st-connected { --st: var(--blue); --st-bg: var(--blue-soft); --st-ink: var(--blue-ink); }
.st-queued { --st: var(--bad); --st-bg: var(--bad-soft); --st-ink: var(--bad-ink); }
:root[data-theme="dark"] .st-dialing { --st-bg: #10343b; --st-ink: #8fe0ef; }
.bucket-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 10px; }
.bucket { padding: 12px 14px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: inset 4px 0 0 var(--st); }
.bucket .v { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.05; }
.bucket .l { font-size: 12px; font-weight: 700; color: var(--st-ink); display: flex; align-items: center; gap: 6px; }
.bucket .l .dot { background: var(--st); }
.bucket.alert { background: var(--bad-soft); }
.mini { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--st-bg); color: var(--st-ink); white-space: nowrap; }
.mini .dot { background: var(--st); width: 7px; height: 7px; }
.mini.zero { opacity: 0.45; }
.wizard { display: flex; flex-direction: column; gap: 14px; }
.wizard fieldset { border: 1px solid var(--glass-line); border-radius: 18px; padding: 14px 16px; margin: 0; background: var(--glass-strong); display: flex; flex-direction: column; gap: 10px; }
.wizard legend { font-family: var(--display); font-weight: 600; font-size: 16px; padding: 0 6px; }
.modal-card.wide { max-width: 860px; }
.dp-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass-strong); cursor: pointer; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.dp-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.dp-chip .k { font-size: 10px; color: var(--muted); }
.dp-chip .dot { width: 8px; height: 8px; }
.waiting-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 20px; text-align: center; }
.pulse-ring { width: 74px; height: 74px; border-radius: 50%; background: var(--good-soft); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 0 rgba(47, 158, 123, 0.35); animation: ring 1.8s infinite; }
@keyframes ring { 70% { box-shadow: 0 0 0 22px rgba(47, 158, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 123, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-ring { animation: none; } }
.plugin-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.tree-node { border: 1px solid var(--glass-line); border-radius: 16px; padding: 10px 12px; background: var(--glass-strong); display: flex; flex-direction: column; gap: 8px; }
.tree-children { margin-left: 22px; display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--line); padding-left: 12px; }
.tree-row { display: grid; grid-template-columns: 120px minmax(140px, 1fr) 130px auto auto; gap: 8px; align-items: center; }
@media (max-width: 760px) { .tree-row { grid-template-columns: 1fr 1fr; } }
.input.sm, .select.sm { min-height: 34px; border-radius: 10px; font-size: 13px; padding: 0 10px; }

/* ---------- v0.3 dialer: small floating liquid-glass popup ---------- */
.side-foot { flex-wrap: wrap; }
.side-foot .me { min-width: 0; }
@media (max-width: 760px) { .side-foot .me { flex: 1 1 100%; } }

.dialer { position: fixed; right: 22px; bottom: 22px; z-index: 60; font-family: var(--font); }
.glass-liquid {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.10));
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 60px rgba(28, 72, 60, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25);
}
.glass-liquid::before {
  content: ""; position: absolute; inset: -30%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 85% 10%, rgba(134, 214, 186, 0.45), transparent 70%),
    radial-gradient(35% 30% at 10% 95%, rgba(170, 150, 240, 0.30), transparent 70%),
    radial-gradient(30% 25% at 95% 90%, rgba(255, 190, 210, 0.25), transparent 70%);
}
:root[data-theme="dark"] .glass-liquid {
  background: linear-gradient(145deg, rgba(40, 70, 62, 0.62), rgba(18, 36, 32, 0.42));
  border-color: rgba(160, 230, 205, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
:root[data-theme="dark"] .glass-liquid::before { opacity: 0.45; }
body.perf .glass-liquid { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--solid); }

/* minimised pill */
.dl-fab { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; }
.dl-fab-main { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 0 12px 0 0; font: inherit; }
.dl-fab-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #59c79e, #23906b); box-shadow: 0 8px 18px rgba(35, 144, 107, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.dl-fab-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 12px; text-align: left; }
.dl-fab-text strong { font-size: 13px; }
.dl-fab-text [data-timer] { color: var(--muted); font-variant-numeric: tabular-nums; }
.ph-incoming .dl-fab-icon { background: linear-gradient(145deg, #f2b04a, #c77b0c); animation: dl-ring 1.2s ease-in-out infinite; }
.ph-connected .dl-fab-icon { background: linear-gradient(145deg, #59c79e, #23906b); }
.dl-mini { width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; cursor: pointer; }

/* open popup */
.dl-pop { width: 286px; border-radius: 28px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 44px); overflow-y: auto; }
.dl-head { display: flex; align-items: center; gap: 8px; }
.dl-title { font-weight: 700; font-size: 14px; }
.dl-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(255, 255, 255, 0.6); }
:root[data-theme="dark"] .dl-status { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.dl-head .dl-icon { margin-left: auto; }
.dl-icon { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.4); color: var(--ink-2); cursor: pointer; flex: none; }
.dl-icon:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); }
.dl-icon[hidden] { display: none; }
:root[data-theme="dark"] .dl-icon { background: rgba(255, 255, 255, 0.07); }

.dl-screen { padding: 10px 12px; border-radius: 20px; background: rgba(255, 255, 255, 0.38); border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }
:root[data-theme="dark"] .dl-screen { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); box-shadow: none; }
.dl-state { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.dl-state .pdot { width: 7px; height: 7px; border-radius: 50%; background: #8aa79c; }
.dl-timer { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: 0; }
.ph-incoming .dl-state { color: var(--warn-ink); } .ph-incoming .dl-state .pdot { background: var(--warn); animation: pulse 1s infinite; }
.ph-outgoing .dl-state { color: var(--blue-ink); } .ph-outgoing .dl-state .pdot { background: var(--blue); animation: pulse 1.2s infinite; }
.ph-connected .dl-state { color: var(--accent-ink); } .ph-connected .dl-state .pdot { background: var(--good); }
.dl-input { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.dl-input input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 600 22px var(--font); font-variant-numeric: tabular-nums; padding: 2px 0; }
.dl-input input::placeholder { color: color-mix(in srgb, var(--muted) 60%, transparent); font-weight: 500; font-size: 18px; }
.dl-number { margin-top: 4px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dl-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 17px; }

.dl-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dl-key {
  height: 46px; border-radius: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28));
  box-shadow: 0 4px 10px rgba(28, 72, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.08s ease, background 0.15s ease;
}
.dl-key span { font-size: 17px; font-weight: 600; line-height: 1.1; }
.dl-key small { font-size: 8px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }
.dl-key:hover { background: rgba(255, 255, 255, 0.85); }
.dl-key:active { transform: scale(0.95); }
:root[data-theme="dark"] .dl-key { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }

.dl-ctl { display: flex; justify-content: space-between; gap: 6px; }
.dl-round {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.dl-round:hover:not(:disabled) { background: rgba(255, 255, 255, 0.8); }
.dl-round[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.dl-round:disabled { opacity: 0.4; cursor: default; }
:root[data-theme="dark"] .dl-round { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }

.dl-actions { display: flex; gap: 8px; }
.dl-row { display: flex; gap: 8px; }
.dl-pill {
  flex: 1 1 0; min-height: 46px; border-radius: 999px; border: 0; cursor: pointer; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 14px var(--font);
  transition: transform 0.08s ease, filter 0.15s ease;
}
.dl-pill:active:not(:disabled) { transform: scale(0.97); }
.dl-pill:disabled { opacity: 0.45; cursor: not-allowed; }
.dl-go, .dl-mini.dl-go { background: linear-gradient(145deg, #59c79e, #23906b); box-shadow: 0 10px 22px rgba(35, 144, 107, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.dl-end, .dl-mini.dl-end { background: linear-gradient(145deg, #ef7d70, #c4392d); box-shadow: 0 10px 22px rgba(196, 57, 45, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.dl-soft { color: var(--ink); background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.7); }
.dl-ring { animation: dl-glow 1.3s ease-in-out infinite; }
@keyframes dl-glow { 50% { box-shadow: 0 0 0 10px rgba(47, 158, 123, 0), 0 10px 22px rgba(35, 144, 107, 0.32); } 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 158, 123, 0.45), 0 10px 22px rgba(35, 144, 107, 0.32); } }
@keyframes dl-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(0); } }
.dl-note { margin: 0; flex: 1; text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0; }
.dl-xfer { display: flex; flex-direction: column; gap: 8px; }
.dl-xfer .input { min-height: 42px; border-radius: 14px; background: rgba(255, 255, 255, 0.6); }
.dl-tests { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); }
.dl-tests button { border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 3px 10px; font: 600 11px var(--font); cursor: pointer; }
.dl-tests button:hover { background: rgba(255, 255, 255, 0.5); }
@media (prefers-reduced-motion: reduce) { .dl-ring, .ph-incoming .dl-fab-icon, .ph-incoming .dl-state .pdot, .ph-outgoing .dl-state .pdot { animation: none; } }
@media (max-width: 560px) {
  .dialer { right: 12px; bottom: 12px; left: auto; }
  .dialer.is-open { left: 12px; }
  .dl-pop { width: 100%; }
}

/* ---------- v0.4 reports, quality, platform ---------- */
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; align-items: end; height: 180px; padding-top: 6px; }
.hbar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.hbar span { width: 100%; min-height: 2px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #6fcfa9, #2f9e7b); }
.hbar small { font-size: 10px; color: var(--muted); height: 12px; }
.score { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; }
.qa-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--glass-strong); border: 1px solid var(--glass-line); }
.qa-item.fatal { box-shadow: inset 3px 0 0 var(--bad); }
.qa-choices { display: inline-flex; gap: 4px; }
.qa-choices button { min-width: 44px; min-height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--solid); color: var(--ink); font: 600 12px var(--font); cursor: pointer; }
.qa-choices button[aria-pressed="true"][data-v="1"] { background: var(--good-soft); border-color: var(--good); color: var(--accent-ink); }
.qa-choices button[aria-pressed="true"][data-v="0.5"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn-ink); }
.qa-choices button[aria-pressed="true"][data-v="0"] { background: var(--bad-soft); border-color: var(--bad); color: var(--bad-ink); }
.qa-choices button[aria-pressed="true"][data-v="na"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-ink); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }

/* ---------- v0.4 login: moving light and stronger glass ---------- */
.orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; will-change: transform; }
.orb.o1 { width: 460px; height: 460px; left: 8%; top: 12%; background: radial-gradient(circle at 30% 30%, #9be3c6, #3faa83 70%); animation: orb1 18s ease-in-out infinite; }
.orb.o2 { width: 380px; height: 380px; right: 10%; top: 4%; background: radial-gradient(circle at 40% 40%, #c9b8ff, #8c74e0 70%); opacity: 0.38; animation: orb2 22s ease-in-out infinite; }
.orb.o3 { width: 340px; height: 340px; right: 22%; bottom: -6%; background: radial-gradient(circle at 50% 50%, #ffd1dc, #f29bb3 70%); opacity: 0.34; animation: orb3 20s ease-in-out infinite; }
.orb.o4 { width: 260px; height: 260px; left: 38%; bottom: 8%; background: radial-gradient(circle at 50% 50%, #b9ecff, #64b8dc 70%); opacity: 0.3; animation: orb1 26s ease-in-out infinite reverse; }
@keyframes orb1 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, 40px) scale(1.08); } 66% { transform: translate(-30px, 70px) scale(0.95); } }
@keyframes orb2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-80px, 60px) scale(1.12); } }
@keyframes orb3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(50px, -60px); } }
.leaf.sway { transform-origin: 20% 80%; animation: sway 9s ease-in-out infinite; }
.leaf.sway2 { transform-origin: 80% 10%; animation: sway 11s ease-in-out infinite reverse; }
@keyframes sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(3deg); } }
.login .drop { animation: floaty 7s ease-in-out infinite; }
.login .drop:nth-of-type(2n) { animation-duration: 9s; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.glass-login {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 70px rgba(28, 72, 60, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3);
  animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both;
}
.glass-login::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, 0.55) 78%, transparent 86% 100%);
  animation: sheen 9s linear infinite; opacity: 0.6;
}
.glass-login::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: inherit; background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18)); }
@keyframes sheen { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.login-hero { animation: rise 0.8s 0.1s cubic-bezier(.2, .8, .2, 1) both; }
.glass-login .input { background: rgba(255, 255, 255, 0.62); }
:root[data-theme="dark"] .glass-login { background: linear-gradient(150deg, rgba(40, 70, 62, 0.62), rgba(18, 36, 32, 0.4)); border-color: rgba(160, 230, 205, 0.18); }
:root[data-theme="dark"] .glass-login::after { background: linear-gradient(150deg, rgba(40, 70, 62, 0.55), rgba(18, 36, 32, 0.35)); }
:root[data-theme="dark"] .glass-login .input { background: rgba(255, 255, 255, 0.06); }
body.perf .orb, body.perf .glass-login::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  .orb, .leaf.sway, .leaf.sway2, .login .drop, .glass-login, .glass-login::before, .login-hero { animation: none !important; }
}

/* ---------- v0.5 grouped menu ---------- */
.sidebar { position: sticky; top: 18px; align-self: flex-start; max-height: calc(100vh - 36px); overflow: hidden; }
.menu { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1 1 auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.menu > .nav-item, .nav-group > summary { min-height: 40px; }
.nav-group > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 14px;
  cursor: pointer; color: var(--ink-2); font-weight: 600; user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--glass-strong); color: var(--ink); }
.nav-group > summary .chev { margin-left: auto; display: inline-flex; transition: transform 0.18s ease; opacity: 0.6; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group[open] > summary { color: var(--ink); }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-item.sub { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.nav-item svg, .nav-group summary svg { flex: none; }
.side-foot { flex: none; }
@media (max-width: 760px) {
  .sidebar { position: relative; top: 0; max-height: none; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .nav-group { flex: 1 1 100%; }
}

/* ---------- v0.5 call flow builder ---------- */
.fb { display: flex; flex-direction: column; align-items: stretch; max-width: 640px; }
.fb-node { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm); }
.fb-ico { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #59c79e, #23906b); }
.fb-announce .fb-ico { background: linear-gradient(145deg, #8fb2ff, #4d74d9); }
.fb-transfer .fb-ico { background: linear-gradient(145deg, #f2b04a, #c77b0c); }
.fb-plugin .fb-ico { background: linear-gradient(145deg, #b79cff, #7a5bd6); }
.fb-end .fb-ico { background: linear-gradient(145deg, #ef7d70, #c4392d); }
.fb-dial .fb-ico, .fb-agent .fb-ico { background: linear-gradient(145deg, #59c79e, #23906b); }
.fb-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fb-title { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.fb-tools { display: flex; gap: 4px; flex: none; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.fb-link { display: flex; flex-direction: column; align-items: center; height: 46px; justify-content: center; }
.fb-arrow { width: 2px; flex: 1; background: color-mix(in srgb, var(--accent) 45%, transparent); }
.fb-link .fb-arrow:last-child { position: relative; }
.fb-link .fb-arrow:last-child::after { content: ""; position: absolute; bottom: -2px; left: -4px; border: 5px solid transparent; border-top-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.fb-plus { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed var(--accent); background: var(--solid); color: var(--accent-ink); font: 700 16px var(--font); cursor: pointer; line-height: 1; flex: none; }
.fb-plus:hover { background: var(--accent-soft); }
.fb-menu { position: absolute; z-index: 5; display: flex; flex-direction: column; min-width: 260px; padding: 6px; border-radius: 14px; background: var(--solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fb-menu button { text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; }
.fb-menu button:hover { background: var(--accent-soft); }
#wz-flow { position: relative; }

/* ---------- v0.5 dialing mode tiles ---------- */
.mode-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.mode-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; cursor: pointer; background: var(--solid); border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.mode-tile input { position: absolute; opacity: 0; pointer-events: none; }
.mode-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode-tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-tile.off { opacity: .55; cursor: not-allowed; }
.mt-name { font-family: var(--display); font-weight: 600; font-size: 17px; }
.mt-desc { font-size: 13px; color: var(--muted); }
.wz-actions { position: sticky; bottom: 0; padding: 10px 0 2px; background: linear-gradient(transparent, var(--glass-strong) 40%); }

/* ---------- v0.5 report tables ---------- */
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; white-space: nowrap; }
.th-sort:hover { color: var(--accent-ink); }
.table.rep td { white-space: nowrap; }
.table tfoot td { border-top: 1.5px solid var(--line); }
.dl-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-quick .dl-pill { flex: 1 1 auto; min-height: 36px; font-size: 13px; padding: 0 12px; }

/* ---------- v0.5 dashboard charts ---------- */
.chart { width: 100%; }
.ch-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-tick { fill: var(--muted); font: 500 11px var(--font); }
.ch-hit:hover rect { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
.ch-legend { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); }
.ch-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hb { display: flex; flex-direction: column; gap: 8px; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.hb-track { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; }
.hb-fill { display: block; height: 100%; border-radius: 5px; background: var(--chart-1); }
.hb-val { font-weight: 700; white-space: nowrap; }
.st-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.st-bar span { background: var(--st); min-width: 4px; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---------- v0.5.1 plugin icons ---------- */
.plug-ico { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, var(--solid)); border: 1px solid color-mix(in srgb, var(--pc) 25%, transparent); overflow: hidden; }
.plug-ico img { width: 30px; height: 30px; object-fit: contain; }

/* ---------- v0.6 signed-in user at the top right ---------- */
.userchip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-line); flex: none; margin-left: auto; }
.userchip .uc-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 12px; color: var(--muted); max-width: 190px; }
.userchip .uc-text strong { color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
@media (max-width: 900px) { .userchip .uc-text { display: none; } }

/* ---------- v0.6 rechurn picker ---------- */
.rc-groups { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; }
.rc-g { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--solid); border: 1px solid var(--line); cursor: pointer; }
.rc-g:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.rc-n { flex: 1 1 auto; font-weight: 600; }

.tf-sec { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---------- v0.7 agent desk bar + my dashboard bars ---------- */
.desk-bar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
.desk-bar .status-circles { margin: 0; }
.vb { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 6px; }
.vb-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 14px; }
.vb-bar { width: 100%; max-width: 34px; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--chart-1) 45%, transparent); display: flex; align-items: flex-end; overflow: hidden; }
.vb-in { width: 100%; background: var(--chart-1); }
.vb-l { font-size: 11px; color: var(--muted); }

/* small horizontal usage meter (trunk utilization) */
.meter { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.trunk-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .trunk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.note { padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); line-height: 1.45; }
.note.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }

/* trunk utilization page */
.util-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.util { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; }
.util-head { display: flex; align-items: baseline; gap: 8px; }
.util-big { margin-left: auto; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.util-big small { font-size: 14px; font-weight: 600; color: var(--muted); }
.util-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.util-row { display: grid; grid-template-columns: 120px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.util-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.ubar { height: 10px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.ubar > span { display: block; height: 100%; border-radius: 99px; background: var(--good); transition: width .4s; }
.ubar.warn > span { background: var(--warn); }
.ubar.bad > span { background: var(--bad); }
.spark { width: 100%; height: 46px; display: block; }
.spark-line { fill: none; stroke: var(--chart-1, var(--accent)); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-area { fill: color-mix(in srgb, var(--chart-1, var(--accent)) 18%, transparent); stroke: none; }
.spark-cap { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.util .table { font-size: 12px; }
.util .table th, .util .table td { padding: 6px 6px; }
.util .table td:first-child { min-width: 140px; }
.table.clickable tbody tr[data-open] { cursor: pointer; }
.table.clickable tbody tr[data-open]:hover td { background: var(--accent-soft); }

/* two-window picker: available on the left, chosen on the right */
.pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.pick-pane { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pick-pane .pick-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.pick-list { border: 1px solid var(--glass-line); border-radius: 12px; background: var(--glass-strong); overflow-y: auto; height: 220px; padding: 4px; }
.pick-item { display: flex; gap: 6px; align-items: baseline; width: 100%; text-align: left; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; }
.pick-item:hover { background: var(--accent-soft); }
.pick-item.sel { background: var(--accent); color: #fff; }
.pick-item.sel small { color: #e6fff5; }
.pick-item small { color: var(--muted); font-size: 11px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.pick-mid { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.pick-mid .btn { min-width: 44px; padding: 0 10px; }
.pick-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .pick { grid-template-columns: 1fr; } .pick-mid { flex-direction: row; justify-content: center; } }
.tf-sec { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--glass-line); padding-bottom: 4px; }
.tf-adv summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }

/* disposition editor */
.dispo-card { border: 1px solid var(--glass-line); border-radius: 14px; padding: 10px 12px; background: var(--glass-strong); display: flex; flex-direction: column; gap: 8px; }
.dispo-row { display: grid; grid-template-columns: 110px minmax(160px, 1.4fr) 150px minmax(220px, 2fr) auto; gap: 10px; align-items: end; }
.dispo-row.is-sub { grid-template-columns: 22px 100px minmax(160px, 1.4fr) 150px minmax(220px, 2fr) auto; padding-left: 14px; border-left: 2px solid var(--accent-soft); margin-left: 6px; }
.dispo-sub-mark { align-self: center; color: var(--muted); font-size: 18px; }
.dispo-needs > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }
.dispo-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1100px) { .dispo-row, .dispo-row.is-sub { grid-template-columns: 1fr 1fr; } .dispo-sub-mark { display: none; } }
.settings-tabs { flex-wrap: wrap; margin-bottom: 12px; border-radius: 18px; }
.table tr.sel-row td { background: var(--accent-soft); }
.addon-row { padding: 10px 12px; border-radius: 12px; }
.plug-ico img { width: 36px; height: 36px; }
.plug-ico.brand { background: #fff; }
.dispo-row { grid-template-columns: 100px minmax(160px, 1.3fr) 140px minmax(300px, 2.2fr) auto; }
.dispo-row.is-sub { grid-template-columns: 22px 100px minmax(160px, 1.3fr) 140px minmax(300px, 2.2fr) auto; }
.dispo-needs [data-needs] label { white-space: nowrap; }
.dispo-row { grid-template-columns: 90px minmax(0, 1.3fr) 130px minmax(0, 2fr) max-content; }
.dispo-row.is-sub { grid-template-columns: 22px 90px minmax(0, 1.3fr) 130px minmax(0, 2fr) max-content; }
.dispo-actions { flex-direction: column; align-items: flex-end; gap: 4px; }

/* team dock (chat, phone book, missed, internal calls) */
.dock-fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 10px 28px rgba(31, 94, 74, 0.28); }
.dock-fab:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.dock-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; display: inline-grid; place-items: center; font-weight: 700; }
.dock-panel { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 61; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 20px; background: var(--solid); border: 1px solid var(--glass-line); box-shadow: 0 24px 60px rgba(20, 50, 40, 0.28); }
.dock-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.dock-head .seg button { min-height: 30px; padding: 0 10px; font-size: 13px; }
.dock-head .seg b { margin-left: 4px; background: var(--bad); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; }
.dock-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.dock-list { display: flex; flex-direction: column; gap: 2px; }
.dock-sec { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.dock-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 0; background: none; color: var(--ink); text-align: left; width: 100%; font: inherit; }
button.dock-item { cursor: pointer; }
.dock-item:hover { background: var(--accent-soft); }
.di-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.di-main .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-side { display: flex; gap: 4px; align-items: center; flex: none; }
.avatar.sm { position: relative; }
.pres { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--solid); background: var(--muted); }
.pres.ready, .pres.available { background: var(--good); } .pres.busy { background: var(--bad); } .pres.break, .pres.meeting, .pres.away { background: var(--warn); }
.dock-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.msg { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 14px 14px 14px 4px; background: var(--accent-soft); }
.msg.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; }
.msg-from { font-size: 11px; font-weight: 700; color: var(--accent); }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-at { font-size: 10px; opacity: .7; align-self: flex-end; }
.dock-send { display: flex; gap: 6px; align-items: flex-end; }
.dock-send .textarea { flex: 1 1 auto; min-height: 44px; resize: none; }
.dock-call { position: fixed; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top, 0px)); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--solid); border: 1px solid var(--glass-line); box-shadow: 0 16px 40px rgba(20, 50, 40, 0.25); max-width: calc(100vw - 32px); }
.dock-call.ringing { border-color: var(--accent); animation: ringpulse 1.2s ease-in-out infinite; }
@keyframes ringpulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft), 0 16px 40px rgba(20, 50, 40, 0.25); } }
@media (prefers-reduced-motion: reduce) { .dock-call.ringing { animation: none; } }
@media (max-width: 520px) { .dock-fab span { display: none; } }
.dock-panel[hidden], .dock-call[hidden], .dock-badge[hidden] { display: none; }
/* the Team button sits in the top bar; only pages without one get the floating button */
.dock-fab { position: static; height: 40px; padding: 0 14px; box-shadow: 0 6px 16px rgba(31, 94, 74, 0.22); }
.dock-fab.floating { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 60; }
.dock-panel { top: calc(84px + env(safe-area-inset-top, 0px)); bottom: auto; height: min(620px, calc(100vh - 110px)); }

/* ---------- v0.14: buttons keep their colour on hover (was: every variant turned white) ---------- */
.btn { transition: background-color .15s ease, box-shadow .15s ease, transform .08s ease, filter .15s ease; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn-danger:hover:not(:disabled) { background: linear-gradient(145deg, #d85a4e, #a52c23); color: #fff; }
.btn-soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 30%); color: var(--accent-ink); }
.btn[aria-pressed="true"]:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-soft) 75%, var(--accent) 25%); color: var(--accent-ink); }
.btn:disabled:hover { background: var(--glass-strong); }
.btn-primary:disabled:hover { background: linear-gradient(145deg, #45b18c, #1f7a5e); }
.btn-danger:disabled:hover { background: linear-gradient(145deg, #e0675b, #b8342a); }

/* ---------- v0.14: internal call card ---------- */
.callcard { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); top: calc(84px + env(safe-area-inset-top, 0px)); z-index: 80;
  width: min(340px, calc(100vw - 32px)); padding: 20px 20px 18px; border-radius: 26px; color: #effaf5;
  background: radial-gradient(120% 90% at 100% 0%, #2a8a6c 0%, transparent 55%), linear-gradient(160deg, #123f33 0%, #0b2a22 100%);
  box-shadow: 0 30px 70px rgba(6, 30, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12); display: flex; flex-direction: column; gap: 14px; }
.callcard[hidden] { display: none; }
.cc-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: .04em; color: #a9d8c6; font-weight: 700; text-transform: uppercase; }
.cc-rec { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: rgba(226, 75, 62, 0.18); color: #ffb3aa; font-size: 11px; letter-spacing: .08em; }
.cc-rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4a; animation: recblink 1.4s ease-in-out infinite; }
@keyframes recblink { 50% { opacity: .25; } }
.cc-who { display: flex; align-items: center; gap: 14px; }
.cc-av { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 var(--font);
  color: #0b2a22; background: linear-gradient(145deg, #bff0dc, #6fd0ab); }
.callcard.ringing .cc-av::before, .callcard.ringing .cc-av::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(143, 230, 196, 0.6); animation: ccring 1.8s ease-out infinite; }
.callcard.ringing .cc-av::after { animation-delay: .9s; }
@keyframes ccring { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.cc-name { font: 600 22px/1.15 var(--display); color: #fff; overflow-wrap: anywhere; }
.cc-sub { font-size: 13px; color: #a9d8c6; margin-top: 3px; }
.cc-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.cc-state { font-size: 14px; color: #d5efe5; }
.cc-time { font: 600 26px/1 var(--font); font-variant-numeric: tabular-nums; color: #fff; letter-spacing: .02em; }
.cc-level { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.cc-level i { width: 4px; border-radius: 2px; background: #7fe0b9; height: 4px; transition: height .08s linear; }
.cc-actions { display: flex; justify-content: space-around; gap: 8px; padding-top: 4px; }
.cc-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #d5efe5; font: 600 12px var(--font); cursor: pointer; padding: 0; }
.cc-btn .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); transition: background-color .15s ease, transform .08s ease; }
.cc-btn:hover .ico { background: rgba(255, 255, 255, 0.2); }
.cc-btn:active .ico { transform: scale(.95); }
.cc-btn[aria-pressed="true"] .ico { background: #effaf5; color: #0b2a22; border-color: transparent; }
.cc-btn.end .ico, .cc-btn.decline .ico { background: #e04b3e; border-color: transparent; color: #fff; }
.cc-btn.end:hover .ico, .cc-btn.decline:hover .ico { background: #c93b2f; }
.cc-btn.accept .ico { background: #2fbf8a; border-color: transparent; color: #fff; width: 60px; height: 60px; }
.cc-btn.accept:hover .ico { background: #25a777; }
.cc-btn.decline .ico { width: 60px; height: 60px; }
.cc-btn:focus-visible .ico { outline: 3px solid #8fe6c4; outline-offset: 3px; }
.cc-btn:disabled { opacity: .45; cursor: not-allowed; }
.cc-note { font-size: 12px; color: #ffd2cc; background: rgba(226, 75, 62, 0.16); border-radius: 12px; padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .callcard.ringing .cc-av::before, .callcard.ringing .cc-av::after, .cc-rec::before { animation: none; } }

/* ---------- v0.14: chat attachments, edit, delete ---------- */
.msg { position: relative; }
.msg.deleted .msg-body { font-style: italic; opacity: .75; }
.msg-edited { font-size: 10px; opacity: .7; margin-left: 6px; }
.msg-tools { position: absolute; top: -12px; right: 8px; display: none; gap: 2px; background: var(--solid); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: var(--shadow-sm); }
.msg.mine:hover .msg-tools, .msg.mine:focus-within .msg-tools { display: flex; }
.msg-tools button { border: 0; background: none; color: var(--ink); font: 600 11px var(--font); padding: 3px 7px; border-radius: 8px; cursor: pointer; }
.msg-tools button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.msg-tools button.del:hover { background: var(--bad-soft); color: var(--bad-ink); }
.msg-img { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; margin: 2px 0; cursor: zoom-in; background: rgba(0, 0, 0, .05); }
.msg-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .55); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; }
.msg.mine .msg-file { background: rgba(255, 255, 255, .2); color: #fff; }
.msg-file small { font-weight: 500; opacity: .75; }
.dock-send { flex-direction: column; align-items: stretch; }
.dock-send .ds-row { display: flex; gap: 6px; align-items: flex-end; }
.ds-attach { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.ds-attach:hover { background: var(--accent-soft); color: var(--accent-ink); }
.ds-pending { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--accent-soft); font-size: 12px; }
.ds-pending img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ds-pending[hidden] { display: none; }
.ds-edit { font-size: 12px; color: var(--accent-ink); display: flex; justify-content: space-between; align-items: center; }
.ds-edit[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(5, 20, 15, .82); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }

/* ---------- v0.14: Webco Forms ---------- */
.wf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wf-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm); min-width: 0; }
.wf-card h3 { margin: 0; font: 600 18px/1.25 var(--display); overflow-wrap: anywhere; }
.wf-card .muted { font-size: 13px; }
.wf-card .row { margin-top: auto; }
.wf-q { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 14px; border-radius: var(--r-sm); background: var(--glass-strong); border: 1px solid var(--line); }
.wf-q.section { background: var(--accent-soft); }
.wf-q .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 12px; }
.wf-q .wf-q-tools { display: flex; flex-direction: column; gap: 4px; }
.wf-opts { display: flex; flex-direction: column; gap: 6px; }
.wf-opt { display: flex; gap: 6px; align-items: center; }
.wf-fill { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.wf-fill .wf-head { border-top: 8px solid var(--accent); }
.wf-item { display: flex; flex-direction: column; gap: 8px; }
.wf-item .req { color: var(--bad); margin-left: 3px; }
.wf-item .help { font-size: 12px; color: var(--muted); margin-top: -4px; }
.wf-choices { display: flex; flex-direction: column; gap: 6px; }
.wf-rating { display: flex; gap: 6px; }
.wf-rating label { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; font-weight: 700; background: var(--glass-strong); }
.wf-rating input { position: absolute; opacity: 0; pointer-events: none; }
.wf-rating input:checked + span { color: #fff; }
.wf-rating label:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.wf-rating label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.wf-bar { display: grid; grid-template-columns: minmax(80px, 220px) minmax(0, 1fr) 60px; gap: 10px; align-items: center; font-size: 13px; }
.wf-bar .track { display: block; height: 10px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.wf-bar .track b { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
@media (max-width: 640px) { .wf-q { grid-template-columns: minmax(0, 1fr); } .wf-q .num { display: none; } .wf-q .wf-q-tools { flex-direction: row; } }

/* v0.16: view-only note, online dot, monitor list */
.ro-note { padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9aa7a2; margin-right: 6px; vertical-align: middle; }
.online-dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.mon-table td { vertical-align: middle; }
.mon-table tr[class^="st-"] td:first-child { box-shadow: inset 3px 0 0 var(--st); }
.mon-table .btn-sm + .btn-sm { margin-left: 4px; }

/* agent desk: status drop-down at the top and the away screen */
.status-top { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.status-now { font-size: 13px; padding: 6px 12px; }
.status-pick { position: relative; display: flex; align-items: center; }
.status-pick .dot { position: absolute; left: 12px; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; }
.status-pick .select { padding-left: 30px; min-height: 40px; min-width: 170px; font-weight: 700; }
.away-screen { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; background: rgba(12, 28, 22, 0.55); backdrop-filter: blur(6px); padding: 16px; }
.away-screen.hidden { display: none; }
.away-card { background: var(--solid); max-width: 460px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 34px 28px; }
.away-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.06); }
.away-time { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) { .status-top { width: 100%; margin-left: 0; } .status-pick .select { min-width: 0; flex: 1; } }
.away-card.over { box-shadow: 0 0 0 3px var(--bad), var(--shadow); }
.away-card.over .away-time { color: var(--bad-ink); }
.mon-table tr.over td { background: var(--bad-soft); }
.mon-table tr.over td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.over-chip { color: var(--bad-ink); font-weight: 700; }
/* data page */
.modal-card.wide-modal { max-width: min(980px, calc(100vw - 32px)); width: 100%; }
.progress:has(> span) { display: flex; }
.progress > span { height: 100%; display: block; }
.kpi.good .v { color: var(--good-ink, var(--accent-ink)); }
.kpi.warn .v { color: var(--warn-ink); }
.kpi.bad .v { color: var(--bad-ink); }
.end-banner { padding: 12px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn-ink); border: 1px solid var(--warn); }
.end-note-line { font-size: 12px; color: var(--bad-ink); font-weight: 600; }
/* rights levels on the roles screen */
.select.lvl { min-width: 128px; font-weight: 600; }
.select.lvl-none { color: var(--muted); }
.select.lvl-view { background-color: var(--blue-soft); }
.select.lvl-edit { background-color: var(--good-soft); }
.select.lvl-delete { background-color: var(--warn-soft); }
/* HR attendance sheet */
.att-table th, .att-table td.att { text-align: center; padding: 6px 4px; min-width: 28px; font-size: 12px; font-weight: 700; }
.att-p { color: var(--accent-ink); background: var(--good-soft); }
.att-a { color: var(--bad-ink); background: var(--bad-soft); }
.att-l, .att-hl { color: var(--blue-ink); background: var(--blue-soft); }
.att-hd, .att-s { color: var(--warn-ink); background: var(--warn-soft); }
.att-h { color: var(--violet-ink); background: var(--violet-soft); }
.att-wo { color: var(--muted); }
.att sup { color: var(--bad); }

/* v0.16.3: company name on one line under webco; action buttons wrap instead of scrolling off */
.brand-company { font-size: 9.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; letter-spacing: .1px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 150px; }
.row-actions .btn { white-space: nowrap; }
