/* VeriDialer console: light (plain white) theme, one stylesheet for the full app and the side panel.
   Layout: sidebar menu with icons + page header (title, one-line purpose) + stacked cards. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --soft: #f4f7f7;
  --soft-2: #eaf1f0;
  --surface: #ffffff;
  --ink: #142022;
  --muted: #5a6b6e;
  --line: #dbe3e4;
  --accent: #0b6e6e;
  --accent-strong: #08595a;
  --accent-ink: #ffffff;
  --accent-soft: #dcefed;
  --good: #1d7a3e; --good-bg: #e2f3e7;
  --warn: #9a5a00; --warn-bg: #fbefd8;
  --bad: #a3322a; --bad-bg: #f9e3e1;
  --off: #5a6b6e; --off-bg: #eceff0;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(20 32 34 / .05), 0 1px 1px rgb(20 32 34 / .03);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* layout classes (.view, .row, .field) must not un-hide hidden parts */
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 16px; } h3 { font-size: 14px; }
.booting { padding: 24px; color: var(--muted); }

/* ---- brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
        background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 17px; }

/* ---- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--soft), var(--bg) 60%); }
.login form { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px;
              display: grid; gap: 14px; box-shadow: 0 10px 30px rgb(20 32 34 / .08); }
.login .brand { margin-bottom: 6px; }

/* ---- shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--soft); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 16px;
        position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 0 6px; }
.menu { display: grid; gap: 2px; overflow-y: auto; }
.nav { display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 0; border-radius: 8px;
       padding: 8px 10px; cursor: pointer; font-weight: 500; color: var(--ink); }
.nav:hover { background: var(--soft-2); }
.nav[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .icon { color: var(--muted); }
.nav[aria-current="page"] .icon { color: var(--accent-ink); }
.who { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 8px 10px;
       align-items: center; font-size: 13px; }
.who b { display: block; color: var(--ink); }
.who small { color: var(--muted); text-transform: capitalize; }
.who .btn { grid-column: 1 / -1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft);
          color: var(--accent-strong); font-weight: 700; }
.main { padding: 22px 28px 48px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.top { display: grid; gap: 2px; padding-bottom: 4px; }
.subtitle { margin: 0; color: var(--muted); }
.view { display: grid; gap: 16px; min-width: 0; }

/* ---- side panel (Chrome extension) */
.panel { display: grid; gap: 12px; padding: 12px; min-width: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel .mark { width: 28px; height: 28px; font-size: 15px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 8px 10px; cursor: pointer; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted); }
.tab[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

/* ---- building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px;
        grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; box-shadow: var(--shadow); }
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi span { display: block; font-size: 12px; color: var(--muted); }
.kpi b { font-size: 24px; font-variant-numeric: tabular-nums; }
.kpi small { display: block; font-size: 12px; color: var(--muted); }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
.kpis.five { grid-template-columns: repeat(5, 1fr); }
/* Agent's live pop-up: the customer ringing / talking at their phone */
.card.live { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.live-who { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.live-who b { font-size: 20px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpis.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.mini .kpi { box-shadow: none; background: var(--soft); padding: 8px 12px; }
.kpis.mini .kpi b { font-size: 20px; }
/* Dashboard: today's results as one-colour bars (rounded at the value end), count beside each bar */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 30%) 1fr 4ch; align-items: center; gap: 10px; }
.bar-row > span:first-child::first-letter { text-transform: uppercase; }
.bar-row:hover { background: var(--soft); border-radius: 6px; }
.bar i { display: block; height: 12px; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
/* Campaign progress meter: accent fill on a light track of the same hue */
.meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.meter span { flex: 1; height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.meter b { font-size: 12px; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.field { display: grid; gap: 4px; min-width: 140px; flex: 1; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
input, select, textarea { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; background: var(--surface); width: 100%; }
input:disabled, select:disabled { background: var(--soft); color: var(--muted); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 8px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: auto; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.day input { width: auto; margin: 0; }
.day:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: var(--soft); }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.good { color: var(--good); background: var(--good-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.chip.bad { color: var(--bad); background: var(--bad-bg); }
.chip.off { color: var(--off); background: var(--off-bg); }
.chip.tag { margin-left: 6px; }
.chip.in { color: var(--accent-strong); background: var(--accent-soft); }
/* Step-by-step forms (wizards) */
.steps { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; margin: 0; padding: 0 0 4px; }
.steps li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.steps li + li::before { content: ""; width: 18px; height: 1px; background: var(--line); }
.steps li b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
              background: var(--off-bg); color: var(--muted); }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.steps li[aria-current="step"] b, .steps li.done b { background: var(--accent); color: var(--accent-ink); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface);
          cursor: pointer; display: grid; gap: 4px; font: inherit; color: inherit; }
.choice:hover { border-color: var(--accent); }
.choice b { font-size: 15px; }
.choice span { color: var(--muted); font-size: 13px; }
.choice[aria-checked="true"] { border: 2px solid var(--accent); background: var(--accent-soft); padding: 13px 15px; }
ol.next { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ubona-steps .kv { row-gap: 8px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
/* Password boxes: the eye button inside the box shows / hides what was typed */
.secret { position: relative; display: flex; }
.secret input { flex: 1; padding-right: 40px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 6px;
          border-radius: 6px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.reveal:hover { color: var(--ink); background: var(--soft); }
.muted { color: var(--muted); }
.note { font-size: 12px; color: var(--muted); margin: 0; }
.error { color: var(--bad); font-size: 13px; }
.empty { color: var(--muted); padding: 12px 0; }
.empty-state { display: grid; gap: 2px; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--soft); text-align: center; }
.empty-state span { color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; min-width: 0; }
.kv span:nth-child(odd) { color: var(--muted); }
.pending { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 8px; background: var(--soft); }
.log { font: 12px/1.6 var(--mono); color: var(--muted); max-height: 180px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--mono); font-size: 12px; }
.wrap { overflow-wrap: anywhere; }
#toast { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 10; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; max-width: 360px; box-shadow: 0 4px 16px rgb(0 0 0 / .2); }
.toast.bad { background: var(--bad); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; border-right: 0;
          border-bottom: 1px solid var(--line); padding: 8px; gap: 8px; }
  .menu { display: flex; overflow: visible; }
  .side .brand small, .who { display: none; }
  .nav { white-space: nowrap; }
  .main { padding: 16px; }
  .kpis.four, .kpis.five { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
