/* =========================================================================
   Mcarbon WABA Calling - Material design system
   Look & feel matches the Progate platform: Roboto, Material Design Icons, charcoal rail sidebar (#36454F),
   grey app bar (#808080), green (#62B170) primary, white elevated cards on #F5F5F5, underlined inputs.
   ========================================================================= */
@font-face { font-family: "Roboto"; font-weight: 300; font-style: normal; font-display: swap; src: url("/vendor/roboto/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-style: normal; font-display: swap; src: url("/vendor/roboto/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-style: normal; font-display: swap; src: url("/vendor/roboto/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-style: normal; font-display: swap; src: url("/vendor/roboto/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  --green: #62b170;
  --green-d: #4fa05e;
  --green-dd: #3b6a43;
  --green-banner: #4caf50;
  --slate: #36454f;
  --slate-2: #2c3a43;
  --bar: #808080;
  --bar-chip: #919090;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #212121;
  --ink-2: #545454;
  --muted: #757575;
  --line: #e0e0e0;
  --line-2: #eeeeee;
  --under: #cccccc;
  --sec: #cdcfd8;
  --sec-ink: #1b2a4e;
  --ok: #00a86b;
  --ok-bg: #e1f2ec;
  --bad: #e71d36;
  --bad-bg: #fbe1e1;
  --warn: #e68a00;
  --warn-bg: #fff1d6;
  --info: #09a5be;
  --info-bg: #dff4f8;

  /* legacy names used by the scripts (kept so inline styles keep working) */
  --brand: var(--green);
  --brand-50: #f3faf4;
  --brand-100: #e1f2e6;
  --brand-200: #c5e5cb;
  --brand-300: #9fd3a8;
  --brand-400: #62b170;
  --brand-500: #62b170;
  --brand-600: #4fa05e;
  --brand-700: #3b6a43;
  --wa: #25d366;
  --wa-dark: #128c4a;
  --danger: var(--bad);
  --field: #ffffff;
  --glass: #fff;
  --glass-strong: #fff;

  --e1: 0 1px 2.4px rgba(0, 0, 0, 0.12), 0 1px 1.6px rgba(0, 0, 0, 0.1);
  --e2: 0 1.6px 3.2px -1px rgba(0, 0, 0, 0.2), 0 3.2px 4px rgba(0, 0, 0, 0.14), 0 1px 8px rgba(0, 0, 0, 0.12);
  --e3: 0 8.8px 12px -7px rgba(0, 0, 0, 0.2), 0 19.2px 30.4px 2.4px rgba(0, 0, 0, 0.14), 0 7.2px 36.8px 6.4px rgba(0, 0, 0, 0.12);
  --e-float: 0 3.2px 16px 0 rgba(0, 0, 0, 0.14), 0 5.6px 8px -5px rgba(76, 175, 80, 0.4);

  --r: 3.2px;
  --r-card: 4.8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 80px;
  --wide: 250px;
  --sidebar: var(--rail);
  --bar-h: 52px;
  color-scheme: light;
}
body.nav-wide { --sidebar: var(--wide); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 11.2px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 500; }
p { margin: 0; }
a { color: var(--green-d); text-decoration: none; }
button { font-family: inherit; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 10px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mdi.i { font-size: 17.6px; line-height: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.mdi.i.sm { font-size: 14.4px; }
.mdi.i.lg { font-size: 22.4px; }
.mdi.i::before { line-height: 1; }
.aurora, .grain { display: none; }

/* scrollbars like the reference (thin, mid-grey) */
* { scrollbar-width: thin; scrollbar-color: #8b8b8b transparent; }
::-webkit-scrollbar { width: 6.4px; height: 6.4px; }
::-webkit-scrollbar-thumb { background: #8b8b8b; border-radius: 6.4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- surfaces ---------- */
.glass, .glass.strong { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--e1); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card { padding: 16px 17.6px; position: relative; }
.card.tight { padding: 11.2px 12.8px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 9.6px; margin-bottom: 12.8px; min-height: 32px; }
.card-h h3 { font-size: 14.4px; font-weight: 500; color: #111; }
.card-h .sub { color: var(--muted); font-size: 10.4px; margin-top: 1.6px; font-weight: 400; }
/* floating green icon box (Material dashboard header) */
.card.fl { margin-top: 14.4px; padding-top: 14.4px; }
.card.fl > .card-h { padding-left: 68.8px !important; min-height: 43.2px; margin-bottom: 20.8px; }
.fl-ico { position: absolute; left: 12.8px; top: -20px; width: 52.8px; height: 52.8px; border-radius: var(--r); display: grid; place-items: center; color: #fff; background: var(--green); box-shadow: var(--e-float); }
.fl-ico .mdi.i { font-size: 25.6px; }

/* ---------- app shell ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; background: var(--slate); color: #fff; border: 0; border-radius: 0; box-shadow: 3.2px 0 9.6px rgba(0, 0, 0, 0.18); transition: width 0.25s var(--ease); overflow: hidden; }
.sidebar.glass, .sidebar.glass.strong { background: var(--slate); border: 0; border-radius: 0; box-shadow: 3.2px 0 9.6px rgba(0, 0, 0, 0.18); }
.brand { display: flex; align-items: center; gap: 9.6px; height: var(--bar-h); padding: 0 12.8px 0 20px; flex: none; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.1); user-select: none; }
.brand .logo-mark { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.brand .logo-mark img { width: 24px; height: 24px; display: block; object-fit: contain; }
.brand .brand-name { font-size: 16.8px; font-weight: 400; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; flex: 1; }
.brand .brand-toggle { color: var(--green); font-size: 20.8px; background: none; border: 0; padding: 3.2px; cursor: pointer; display: grid; place-items: center; }
.brand .brand-toggle .mdi.i { font-size: 22.4px; }
.sidebar .user { display: flex; align-items: center; gap: 9.6px; height: 67.2px; padding: 0 20px; flex: none; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar .user .avatar { width: 32px; height: 32px; }
.sidebar .user .who { min-width: 0; flex: 1; }
.sidebar .user .who b { display: block; font-size: 12.8px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .user .who span { font-size: 9.6px; opacity: 0.7; }
.nav { position: relative; display: flex; flex-direction: column; gap: 3.2px; overflow-y: auto; overflow-x: hidden; padding: 11.2px 12px 19.2px; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-sec { flex: none; font-size: 8.8px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); font-weight: 500; padding: 17.6px 9.6px 6.4px; white-space: nowrap; }
.nav a { position: relative; flex: none; display: flex; align-items: center; gap: 14.4px; height: 56.8px; padding: 0 17.6px; border-radius: var(--r); color: #fff; font-size: 12.8px; font-weight: 400; white-space: nowrap; transition: background 0.2s var(--ease); }
.nav a .mdi.i { font-size: 22.4px; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); }
.nav a.active, .nav a.active:hover { background: var(--green); box-shadow: 0 3.2px 16px 0 rgba(0, 0, 0, 0.14), 0 5.6px 8px -5px rgba(98, 177, 112, 0.5); }
.nav .pill { display: none; }
.nav .badge { margin-left: auto; font-size: 8.8px; font-weight: 700; padding: 1px 5.6px; border-radius: 79.2px; background: var(--bad); color: #fff; }
/* rail (icons only) when the menu is collapsed */
body:not(.nav-wide) .sidebar:hover { width: var(--wide); box-shadow: 6.4px 0 19.2px rgba(0, 0, 0, 0.3); }
body:not(.nav-wide) .sidebar:not(:hover) .brand-name, body:not(.nav-wide) .sidebar:not(:hover) .brand-toggle, body:not(.nav-wide) .sidebar:not(:hover) .user .who, body:not(.nav-wide) .sidebar:not(:hover) .nav a span.nl { display: none; }
body:not(.nav-wide) .sidebar:not(:hover) .user { justify-content: center; padding: 0; }
body:not(.nav-wide) .sidebar:not(:hover) .brand { justify-content: center; padding: 0; }
body:not(.nav-wide) .sidebar:not(:hover) .nav { padding: 11.2px 12px; }
body:not(.nav-wide) .sidebar:not(:hover) .nav a { justify-content: center; padding: 0; width: 56px; }
body:not(.nav-wide) .sidebar:not(:hover) .nav-sec { height: 1px; padding: 0; margin: 9.6px 6.4px; background: rgba(255, 255, 255, 0.12); font-size: 0; overflow: hidden; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; color: #fff; background: #5d7280; flex: none; font-size: 12px; }
.avatar.lg { width: 67.2px; height: 67.2px; font-size: 24px; }
.avatar.sm { width: 24px; height: 24px; font-size: 8.8px; }

.main { margin-left: var(--sidebar); flex: 1; min-width: 0; padding: 0 0 32px; transition: margin-left 0.25s var(--ease); }
.topbar, .topbar.glass { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 9.6px; height: var(--bar-h); padding: 0 17.6px; margin: 0; background: var(--bar); color: #fff; border: 0; border-radius: 0; box-shadow: 0 1.6px 3.2px -1px rgba(0, 0, 0, 0.2), 0 3.2px 4px rgba(0, 0, 0, 0.14), 0 1px 8px rgba(0, 0, 0, 0.12); }
.topbar h1 { font-size: 14.4px; font-weight: 500; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; color: #fff; }
.topbar h1 span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn.ghost { color: #fff; }
.topbar .btn.ghost:hover { background: rgba(255, 255, 255, 0.14); }
.topbar .btn.icon .mdi.i { font-size: 20.8px; }
.topbar .menu-btn { display: none; }
#ctx-banner:not(:empty) { padding: 12.8px 17.6px 0; }
#view { padding: 16px 17.6px 0; }
.ctx-banner { display: flex; align-items: center; gap: 8px; padding: 8.8px 12.8px; border-radius: var(--r); margin-bottom: 12.8px; background: #eaf5ec; border: 0; border-left: 3.2px solid var(--green); color: #2e4a33; font-weight: 400; }
.ctx-banner .grow { flex: 1; }
.glass.ctx-banner { box-shadow: none; border: 0; border-left: 3.2px solid var(--green); }

.view { animation: viewIn 0.3s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4.8px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6.4px); } to { opacity: 1; transform: none; } }

/* ---------- grid helpers ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 9.6px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 11.2px; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12.8px; } .mt-s { margin-top: 6.4px; } .mb { margin-bottom: 12.8px; }

/* ---------- buttons (Material, uppercase) ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6.4px; height: 28.8px; padding: 0 12.8px; border-radius: var(--r); border: 0; background: var(--sec); color: var(--sec-ink); font-weight: 500; font-size: 11.2px; letter-spacing: 0.0892857143em; text-transform: uppercase; cursor: pointer; transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s; white-space: nowrap; user-select: none; box-shadow: 0 2.4px 1px -2px rgba(0, 0, 0, 0.2), 0 1.6px 1.6px 0 rgba(0, 0, 0, 0.14), 0 1px 4px 0 rgba(0, 0, 0, 0.12); }
.btn:hover { box-shadow: 0 1.6px 3.2px -1px rgba(0, 0, 0, 0.2), 0 3.2px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12); background: #c3c5cf; }
.btn:active { box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.2), 0 6.4px 8px 1px rgba(0, 0, 0, 0.14), 0 2.4px 11.2px 1.6px rgba(0, 0, 0, 0.12); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.primary, .btn.green { color: #fff; background: var(--green); }
.btn.primary:hover, .btn.green:hover { background: var(--green-d); }
.btn.red { color: #fff; background: var(--bad); }
.btn.red:hover { background: #c9142d; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--green-d); }
.btn.ghost:hover { background: rgba(98, 177, 112, 0.12); box-shadow: none; }
.btn.sm { height: 24px; padding: 0 9.6px; font-size: 10px; }
.btn.icon { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.btn.sm.icon { width: 25.6px; height: 25.6px; }
.btn.block { width: 100%; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, 0.45); animation: ripple 0.6s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn .spin { width: 12.8px; height: 12.8px; border-radius: 50%; border: 1.6px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; }
.btn:not(.primary):not(.green):not(.red) .spin { border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms (underlined Vuetify-style fields) ---------- */
.field { display: flex; flex-direction: column; gap: 3.2px; }
.field > label, .lbl { font-size: 10px; font-weight: 400; color: var(--muted); display: flex; align-items: center; gap: 4.8px; transition: color 0.2s; }
.lbl { color: var(--ink-2); font-weight: 500; font-size: 11.2px; }
.field:focus-within > label { color: var(--green-d); }
.field .hint { font-size: 9.6px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 6.4px 3.2px 5.6px; border: 0; border-bottom: 1px solid var(--under); border-radius: 0; background: transparent; color: var(--ink); font: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.input:focus { border-bottom-color: var(--green); box-shadow: 0 1px 0 0 var(--green); background: transparent; }
.input::placeholder { color: #9e9e9e; }
.input:disabled { color: #9e9e9e; border-bottom-style: dotted; }
textarea.input { resize: vertical; min-height: 64px; border: 1px solid var(--under); border-radius: var(--r); padding: 6.4px 8px; }
textarea.input:focus { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23757575' d='M7 10l5 5 5-5z'/></svg>"); background-repeat: no-repeat; background-position: right 0 center; padding-right: 22.4px; cursor: pointer; }
.input-wrap { position: relative; }
.input-wrap > .mdi.i { position: absolute; left: 3.2px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }
.input-wrap .input { padding-left: 30.4px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14.4px 19.2px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; width: 32px; height: 17.6px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; margin: 0; }
.switch span { position: absolute; left: 0; right: 0; top: 3.2px; height: 11.2px; border-radius: 5.6px; background: rgba(0, 0, 0, 0.38); transition: background 0.25s; }
.switch span::after { content: ""; position: absolute; top: -3px; left: -2px; width: 16px; height: 16px; border-radius: 50%; background: #fafafa; box-shadow: 0 2.4px 1px -2px rgba(0, 0, 0, 0.2), 0 1.6px 1.6px 0 rgba(0, 0, 0, 0.14), 0 1px 4px 0 rgba(0, 0, 0, 0.12); transition: transform 0.25s var(--ease), background 0.25s; }
.switch input:checked + span { background: rgba(98, 177, 112, 0.5); }
.switch input:checked + span::after { transform: translateX(17.6px); background: var(--green); }
.switch input:focus-visible + span::after { box-shadow: 0 0 0 6.4px rgba(98, 177, 112, 0.2); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12.8px; padding: 9.6px 0; border-bottom: 1px solid var(--line-2); }
.setting:last-child { border-bottom: 0; }
.setting b { display: block; font-size: 11.2px; font-weight: 500; }
.setting span.d { font-size: 10px; color: var(--muted); }
/* segmented control = Vuetify button toggle / tabs */
.seg { display: inline-flex; padding: 0; border-radius: var(--r); background: #efefef; border: 0; gap: 0; position: relative; overflow: hidden; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; padding: 0 16px; height: 32px; font-weight: 500; letter-spacing: 0.0892857143em; text-transform: uppercase; color: #555; cursor: pointer; font-size: 10.4px; transition: color 0.2s, background 0.2s; }
.seg button:hover { background: rgba(0, 0, 0, 0.04); }
.seg button.on { color: #fff; background: var(--green); box-shadow: var(--e-float); }
.chips { display: flex; flex-wrap: wrap; gap: 4.8px; padding: 4.8px 1.6px; border-bottom: 1px solid var(--under); background: transparent; }
.chips:focus-within { border-bottom-color: var(--green); box-shadow: 0 1px 0 0 var(--green); }
.chips input { border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); min-width: 64px; flex: 1; padding: 3.2px; }
.chip { display: inline-flex; align-items: center; gap: 4.8px; padding: 2.4px 8px; border-radius: 12.8px; background: var(--ok-bg); color: var(--ok); font-weight: 500; font-size: 10px; animation: pop 0.25s var(--ease); }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; display: grid; }
@keyframes pop { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- tags / status chips ---------- */
.tag { display: inline-flex; align-items: center; gap: 4.8px; padding: 2.4px 9.6px; border-radius: 12.8px; font-size: 10px; font-weight: 400; background: #eeeeee; color: #616161; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: #068297; }
.tag.mute { background: #eeeeee; color: #757575; }
.tag.ok::before, .tag.warn::before, .tag.bad::before, .tag.info::before { content: ""; width: 6.4px; height: 6.4px; border-radius: 50%; background: currentColor; flex: none; }
.tag.bad::before { background: #ff0000; }
.tag:has(> .dot)::before { display: none; }
.dot { width: 6.4px; height: 6.4px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.live { animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 5.6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 512px; }
.tbl th { text-align: left; font-size: 11.2px; color: var(--muted); padding: 9.6px 8px; font-weight: 400; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10.4px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 11.2px; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: #fafafa; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.cell-user { display: flex; align-items: center; gap: 9.6px; }
.cell-user .avatar { width: 27.2px; height: 27.2px; font-size: 9.6px; }
.empty { text-align: center; padding: 38.4px 16px; color: var(--muted); }
.empty .mdi.i { font-size: 41.6px; opacity: 0.45; margin-bottom: 8px; color: var(--green); }
.empty b { display: block; color: var(--ink); font-size: 12.8px; font-weight: 500; margin-bottom: 3.2px; }

/* ---------- stat cards (icon square, value, label) ---------- */
.stat { padding: 16px; position: relative; overflow: hidden; min-height: 120px; }
.stat .ico { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; background: #d9f4f8; color: #1fb5cd; margin-bottom: 14.4px; }
.stat .ico .mdi.i { font-size: 22.4px; }
.stat .v { font-size: 16px; font-weight: 700; line-height: 1.1; color: #111; }
.stat .l { color: var(--muted); font-weight: 400; margin-top: 3.2px; font-size: 12px; }
.g4 > .stat:nth-child(4n+2) .ico, .g3 > .stat:nth-child(3n+2) .ico { background: #f3f4f6; color: #718193; }
.g4 > .stat:nth-child(4n+3) .ico, .g3 > .stat:nth-child(3n+3) .ico { background: #edfbec; color: #43a047; }
.g4 > .stat:nth-child(4n+4) .ico { background: #fde4e8; color: var(--bad); }
.stat.bad .ico { background: #fde4e8; color: var(--bad); }

/* ---------- tabs (green block on grey bar, like COMPOSE / RECIPIENTS) ---------- */
.tabs { position: relative; display: flex; gap: 0; padding: 0; border-radius: var(--r) var(--r) 0 0; background: #efefef; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; box-shadow: var(--e1); }
.tabs::-webkit-scrollbar { display: none; }
.tabs.glass { background: #efefef; border: 0; }
.tabs button { position: relative; z-index: 1; flex: 1 0 auto; border: 0; background: transparent; padding: 0 19.2px; height: 44.8px; font-weight: 500; letter-spacing: 0.0892857143em; text-transform: uppercase; color: #555; cursor: pointer; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 6.4px; transition: color 0.2s; font-size: 11.2px; }
.tabs button.on { color: #fff; }
.tabs .ind { position: absolute; z-index: 0; top: 0; bottom: 0; border-radius: var(--r); background: var(--green); box-shadow: var(--e-float); transition: transform 0.3s var(--ease), width 0.3s var(--ease); }

/* ---------- readiness ring ---------- */
.ring { position: relative; width: 105.6px; height: 105.6px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .bg { stroke: var(--ok-bg); }
.ring .fg { stroke: url(#ringGrad); transition: stroke-dashoffset 1.1s var(--ease); }
.ring .num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; align-content: center; padding-top: 30.4px; gap: 1px; font-size: 24px; font-weight: 500; }
.ring .num small { font-size: 11.2px; color: var(--muted); }
.check { display: flex; gap: 9.6px; padding: 8.8px 0; border-top: 1px solid var(--line-2); }
.check:first-child { border-top: 0; }
.check .ci { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.check .ci.pass { background: var(--ok-bg); color: var(--ok); }
.check .ci.fail { background: var(--bad-bg); color: var(--bad); }
.check .ci.warn { background: var(--warn-bg); color: var(--warn); }
.check .ci.info { background: var(--info-bg); color: #068297; }
.check b { font-size: 11.2px; font-weight: 500; display: block; }
.check span.d { color: var(--muted); font-size: 10px; }

/* ---------- dialog / toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(33, 33, 33, 0.46); animation: fade 0.2s both; }
.overlay.closing { animation: fadeOut 0.18s both; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal, .modal.glass, .modal.glass.strong { width: min(448px, 100%); max-height: 90vh; overflow: auto; padding: 19.2px 20.8px; background: #fff; border: 0; border-radius: 6.4px; box-shadow: var(--e3); animation: modalIn 0.25s var(--ease) both; }
.modal.wide { width: min(624px, 100%); }
.overlay.closing .modal { animation: modalOut 0.18s both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12.8px) scale(0.97); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(6.4px) scale(0.98); } }
.modal h2 { font-size: 16px; font-weight: 500; color: var(--ink-2); margin-bottom: 3.2px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 19.2px; }
.modal.center { text-align: center; width: min(512px, 100%); padding: 30.4px 24px 25.6px; }
.modal.center .mdi.i.big { font-size: 76.8px; color: var(--green); margin-bottom: 14.4px; }
.modal.center h2 { font-size: 32px; font-weight: 500; margin-bottom: 11.2px; }
.modal.center p { font-size: 16px; }
.modal.center .foot { justify-content: center; margin-top: 22.4px; }
#toasts { position: fixed; z-index: 200; bottom: 19.2px; left: 50%; transform: translateX(-50%); top: auto; right: auto; display: flex; flex-direction: column; gap: 8px; width: min(448px, calc(100vw - 25.6px)); pointer-events: none; align-items: stretch; }
.toast, .toast.glass { pointer-events: auto; display: flex; gap: 9.6px; align-items: flex-start; padding: 9.6px 12.8px; border-radius: var(--r); background: #323232; color: #fff; border: 0; box-shadow: 0 2.4px 4px -1px rgba(0, 0, 0, 0.2), 0 4.8px 8px 0 rgba(0, 0, 0, 0.14), 0 1px 14.4px 0 rgba(0, 0, 0, 0.12); animation: toastIn 0.3s var(--ease) both; }
.toast.out { animation: toastOut 0.25s var(--ease) both; }
.toast .ti { width: 22.4px; height: 22.4px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast.ok .ti { background: rgba(98, 177, 112, 0.25); color: #8ee09b; }
.toast.err .ti { background: rgba(231, 29, 54, 0.25); color: #ff8a98; }
.toast.info .ti { background: rgba(9, 165, 190, 0.25); color: #6fdcee; }
.toast b { display: block; font-size: 11.2px; font-weight: 500; }
.toast span.m { font-size: 10.4px; color: rgba(255, 255, 255, 0.85); word-break: break-word; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12.8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- skeleton ---------- */
.skel { border-radius: var(--r); background: linear-gradient(100deg, #eee 30%, #f6f6f6 50%, #eee 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite; min-height: 14.4px; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- login ---------- */
/* login: measured from the reference (card 362 x 298, floating title, underlined fields, forgot link + button) */
.login { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 19px; background: #3b6a43; }
.login-card, .login-card.glass, .login-card.glass.strong { position: relative; width: min(362px, 100%); min-height: 298px; margin-top: 23px; padding: 84px 25px 33px 26px; border-radius: 8px; background: #fff; border: 0; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16); animation: modalIn 0.4s var(--ease) both; }
.login-card .login-title { position: absolute; left: 16px; top: -23px; min-width: 97px; padding: 0 24px; height: 63px; display: grid; place-items: center; color: #fff; font-size: 19.5px; font-weight: 300; background: var(--green); border-radius: 3px; box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.16), 0 6px 9px -5px rgba(98, 177, 112, 0.55); }
.login-card form { display: flex; flex-direction: column; gap: 0; }
.login-card > .muted { position: absolute; left: 130px; right: 20px; top: 20px; font-size: 11px; }
.login-card .lf { display: flex; align-items: center; gap: 18px; }
.login-card .lf + .lf { margin-top: 36px; }
.login-card .lf > .mdi.i { font-size: 23px; width: 22px; color: #3d4a54; }
.login-card .lf .field { flex: 1; min-width: 0; }
.login-card .lf .input { height: 33px; font-size: 14.4px; padding: 5px 4px; }
.login-card .lf .pw { position: relative; flex: 1; }
.login-card .lf .pw .input { padding-right: 28px; }
.login-card .lf .eye { position: absolute; right: -3px; bottom: 4px; background: none; border: 0; padding: 0; cursor: pointer; color: #757575; display: grid; }
.login-card form .err-box { margin-top: 12px; }
.login-card .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.login-card .actions .forgot { margin-left: 13px; padding: 6px 0; background: none; border: 0; cursor: pointer; color: var(--green); font: inherit; font-size: 13px; text-transform: uppercase; }
.login-card .actions .btn { width: 130px; height: 55px; padding: 0; font-size: 14.4px; font-weight: 400; letter-spacing: 0; box-shadow: none; transition: background 0.2s; }
.login-card .actions .btn.idle, .login-card .actions .btn.idle:hover { background: #99cca2; }
.err-box { padding: 8px 11.2px; border-radius: var(--r); background: #fdecea; color: #c62828; font-weight: 400; font-size: 10.4px; animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- dock / softphone ---------- */
.dock { position: fixed; z-index: 60; right: 17.6px; bottom: 17.6px; display: flex; flex-direction: column; align-items: flex-end; gap: 9.6px; }
.dock-pill, .dock-pill.glass { display: flex; align-items: center; gap: 8px; padding: 4.8px 4.8px 4.8px 12.8px; border-radius: 79.2px; cursor: pointer; background: #fff; box-shadow: var(--e2); border: 0; transition: box-shadow 0.2s; }
.dock-pill:hover { box-shadow: var(--e3); }
.dock-pill .st { display: flex; align-items: center; gap: 6.4px; font-weight: 500; font-size: 10.4px; }
.dock-pill .st .dot { color: var(--ok); }
.dock-pill.off .st .dot { color: #9e9e9e; }
.dock-pill .fab { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--green); }
.callcard, .callcard.glass, .callcard.glass.strong { width: 272px; padding: 16px; border-radius: 6.4px; box-shadow: var(--e3); animation: modalIn 0.3s var(--ease) both; text-align: center; border: 0; }
.callcard .who { display: flex; flex-direction: column; align-items: center; gap: 4.8px; margin-bottom: 9.6px; }
.callcard .avatar { width: 51.2px; height: 51.2px; font-size: 17.6px; background: var(--green); }
.callcard .nm { font-size: 14.4px; font-weight: 500; }
.callcard .num { color: var(--muted); font-weight: 400; }
.callcard .timer { font-size: 24px; font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.callcard .state { font-size: 10px; font-weight: 500; display: inline-flex; align-items: center; gap: 4.8px; padding: 2.4px 9.6px; border-radius: 12.8px; }
.wave { display: flex; align-items: center; justify-content: center; gap: 2.4px; height: 27.2px; margin: 6.4px 0 9.6px; }
.wave i { width: 3.2px; border-radius: 2.4px; background: var(--green); height: 3.2px; transition: height 0.08s linear; }
.ctrls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 3.2px; }
.ctrl { display: flex; flex-direction: column; align-items: center; gap: 4.8px; background: none; border: 0; color: var(--ink-2); font-weight: 500; font-size: 9.6px; cursor: pointer; }
.ctrl .c { width: 41.6px; height: 41.6px; border-radius: 50%; display: grid; place-items: center; background: #efefef; color: #455a64; transition: box-shadow 0.2s, background 0.2s, color 0.2s; }
.ctrl:hover .c { box-shadow: var(--e2); }
.ctrl:active .c { box-shadow: none; }
.ctrl.on .c { background: var(--green); color: #fff; }
.ctrl.end .c { background: var(--bad); color: #fff; }
.ctrl:disabled { opacity: 0.45; cursor: not-allowed; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6.4px; margin: 8px 0; }
.keypad button, .numpad button { height: 41.6px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 400; color: var(--ink); cursor: pointer; transition: background 0.15s; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.keypad button:hover, .numpad button:hover { background: #f5f5f5; }
.keypad button small, .numpad button small { font-size: 7.2px; letter-spacing: 0.15em; color: var(--muted); margin-top: 2.4px; }
.keypad button:active, .numpad button:active { background: var(--ok-bg); }
.sheet-note { text-align: left; }
.incoming { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(33, 33, 33, 0.62); animation: fade 0.25s both; }
.incoming .panel { width: min(320px, 100%); padding: 28.8px 22.4px 22.4px; text-align: center; border-radius: 6.4px; color: var(--ink); background: #fff; box-shadow: var(--e3); animation: modalIn 0.3s var(--ease) both; }
.incoming .panel > div[style] { color: var(--green-d); opacity: 1 !important; }
.incoming .pulse { position: relative; width: 89.6px; height: 89.6px; margin: 0 auto 16px; display: grid; place-items: center; }
.incoming .pulse::before, .incoming .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.6px solid rgba(98, 177, 112, 0.6); animation: ringPulse 2s var(--ease) infinite; }
.incoming .pulse::after { animation-delay: 1s; }
@keyframes ringPulse { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(2); opacity: 0; } }
.incoming .avatar.lg { width: 76.8px; height: 76.8px; font-size: 27.2px; border-radius: 50%; background: var(--green); animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-8deg); } 20% { transform: rotate(8deg); } 30% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 50% { transform: rotate(0); } }
.incoming h2 { font-size: 20.8px; font-weight: 500; color: #111; }
.incoming .sub { color: var(--muted); margin-top: 3.2px; font-weight: 400; }
.incoming .via { margin-top: 11.2px; display: inline-flex; align-items: center; gap: 6.4px; padding: 4px 11.2px; border-radius: 12.8px; background: #eeeeee; color: var(--ink-2); font-weight: 500; font-size: 10.4px; }
.incoming .via[style*="background"] { background: var(--bad) !important; color: #fff; }
.incoming .via img { height: 12.8px; }
.incoming .acts { display: flex; justify-content: center; gap: 22.4px; margin-top: 24px; }
.incoming .act { display: flex; flex-direction: column; align-items: center; gap: 6.4px; background: none; border: 0; color: var(--ink-2); font-weight: 500; cursor: pointer; font-size: 10.4px; }
.incoming .act .c { width: 51.2px; height: 51.2px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--e2); transition: box-shadow 0.2s, transform 0.2s; }
.incoming .act:hover .c { box-shadow: var(--e3); transform: scale(1.05); }
.incoming .act:active .c { transform: scale(0.94); }
.incoming .act.ans .c { background: var(--green); animation: ansGlow 1.6s infinite; }
@keyframes ansGlow { 0% { box-shadow: 0 0 0 0 rgba(98, 177, 112, 0.6); } 70% { box-shadow: 0 0 0 14.4px rgba(98, 177, 112, 0); } 100% { box-shadow: 0 0 0 0 rgba(98, 177, 112, 0); } }
.incoming .act.dec .c { background: var(--bad); }
.incoming .act.fwd .c { background: #607d8b; }
.incoming .countdown { height: 3.2px; border-radius: 3.2px; background: #eee; margin-top: 20.8px; overflow: hidden; }
.incoming .countdown i { display: block; height: 100%; background: var(--green); transform-origin: left; animation: countdown linear forwards; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- dialer ---------- */
.dialer-grid { display: grid; grid-template-columns: minmax(0, 336px) minmax(0, 1fr); gap: 16px; align-items: start; }
.dial-display { font-size: 22.4px; font-weight: 400; text-align: center; letter-spacing: 0.03em; padding: 9.6px; border: 0; border-bottom: 1.6px solid var(--under); background: transparent; width: 100%; outline: none; color: var(--ink); font-family: inherit; font-variant-numeric: tabular-nums; }
.dial-display:focus { border-bottom-color: var(--green); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12.8px 0; }
.numpad button { height: 49.6px; font-size: 19.2px; }
.callbtn { height: 44.8px; font-size: 12.8px; }
.elig { display: flex; flex-direction: column; gap: 6.4px; }
.elig .r { display: flex; gap: 8px; align-items: flex-start; padding: 8px 9.6px; border-radius: var(--r); font-size: 10.4px; font-weight: 500; }
.elig .r.ok { background: var(--ok-bg); color: var(--ok); }
.elig .r.bad { background: var(--bad-bg); color: var(--bad); }
.elig .r span { color: var(--ink-2); font-weight: 400; }

/* ---------- bridge ---------- */
.legs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 11.2px; align-items: center; }
.leg { padding: 12.8px; border-radius: var(--r-card); border: 1px solid var(--line); background: #fff; text-align: center; }
.leg .st { margin-top: 6.4px; }
.link-line { position: relative; width: 51.2px; height: 3.2px; border-radius: 3.2px; background: #e0e0e0; overflow: hidden; }
.link-line.live::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--green), transparent); animation: flow 1.2s linear infinite; }
.link-line.done { background: var(--green); }
@keyframes flow { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- voice ---------- */
.dropzone { border: 1.6px dashed #bdbdbd; border-radius: var(--r-card); padding: 27.2px 16px; text-align: center; color: var(--ink-2); background: #fafafa; transition: background 0.2s, border-color 0.2s; cursor: pointer; }
.dropzone.over, .dropzone:hover { background: #f1f8f2; border-color: var(--green); }
.dropzone .mdi.i { font-size: 35.2px; color: var(--green); margin-bottom: 6.4px; }
.vcard { padding: 14.4px; display: flex; flex-direction: column; gap: 9.6px; }
.vcard .play { width: 35.2px; height: 35.2px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; background: var(--green); box-shadow: var(--e1); transition: box-shadow 0.2s; flex: none; }
.vcard .play:hover { box-shadow: var(--e2); }
.bars { display: flex; align-items: center; gap: 1.6px; height: 24px; flex: 1; }
.bars i { flex: 1; border-radius: 1.6px; background: #cfe8d3; min-width: 1.6px; transition: background 0.2s; }
.bars i.on { background: var(--green); }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 6.4px 11.2px; font-size: 11.2px; }
.kv dt { color: var(--muted); font-weight: 400; }
.kv dd { margin: 0; word-break: break-all; }
.copy-row { display: flex; gap: 6.4px; align-items: center; padding: 3.2px 3.2px 3.2px 3.2px; border-bottom: 1px solid var(--under); }
.copy-row code { flex: 1; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { display: flex; gap: 11.2px; font-size: 10.4px; color: var(--muted); }
.legend i { display: inline-block; width: 9.6px; height: 9.6px; border-radius: 50%; margin-right: 4.8px; vertical-align: -1px; }
.barchart { display: flex; align-items: flex-end; gap: 6.4px; height: 136px; padding-top: 8px; border-bottom: 1px solid var(--line); background-image: repeating-linear-gradient(to top, transparent 0, transparent 26.4px, #eee 26.4px, #eee 27.2px); }
.barchart .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4.8px; height: 100%; justify-content: flex-end; }
.barchart .stack { width: 100%; max-width: 20.8px; display: flex; flex-direction: column-reverse; gap: 1px; justify-content: flex-start; }
.barchart .stack i { display: block; border-radius: 1.6px 1.6px 0 0; width: 100%; transform-origin: bottom; animation: grow 0.6s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.barchart .in { background: #09a5be; }
.barchart .out { background: #00b578; }
.barchart small { font-size: 8.4px; color: var(--muted); font-weight: 400; margin-bottom: -20px; }
.barchart { padding-bottom: 19.2px; }
@keyframes grow { from { transform: scaleY(0); } }
.donut { width: 112px; height: 112px; }
.timeline { position: relative; padding-left: 17.6px; }
.timeline::before { content: ""; position: absolute; left: 4.8px; top: 4.8px; bottom: 4.8px; width: 1.6px; background: var(--line); }
.timeline .ev { position: relative; padding: 0 0 12.8px; }
.timeline .ev::before { content: ""; position: absolute; left: -22px; top: 4px; width: 11.2px; height: 11.2px; border-radius: 50%; background: var(--green); border: 2.4px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.hours-row { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; align-items: center; padding: 6.4px 0; }
.slot { display: flex; align-items: center; gap: 4.8px; }
.slot input[type="time"] { width: 96px; padding: 5.6px 3.2px; }
.progress { height: 4.8px; border-radius: 4.8px; background: #e0e0e0; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); transition: width 0.4s var(--ease); }
details.fold summary { cursor: pointer; font-weight: 500; color: var(--green-d); list-style: none; display: flex; align-items: center; gap: 4.8px; }
details.fold summary::-webkit-details-marker { display: none; }
pre.code { background: #263238; color: #cfe8d3; border-radius: var(--r); padding: 11.2px; overflow: auto; font-size: 9.6px; max-height: 208px; }

/* ---------- mobile bottom bar / drawer ---------- */
.tabbar { display: none; }
.scrim { display: none; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .dialer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  body.nav-wide { --sidebar: 0px; }
  .sidebar, .sidebar.glass { width: min(240px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); }
  body.drawer .sidebar { transform: none; }
  body .sidebar .brand-name, body .sidebar .user .who, body .nav a span.nl { display: block !important; }
  body .sidebar .brand-toggle { display: none !important; }
  body .sidebar .brand, body .sidebar .user { justify-content: flex-start; padding: 0 17.6px; }
  body .nav a { justify-content: flex-start; width: auto; padding: 0 16px; height: 46.4px; }
  body .nav-sec { height: auto; padding: 12.8px 9.6px 4.8px; margin: 0; background: none; font-size: 8.8px; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  body.drawer .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; padding-bottom: 64px; }
  .topbar { padding: 0 9.6px; }
  #view { padding: 11.2px 9.6px 0; }
  .topbar .menu-btn { display: inline-flex; }
  .tabbar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 3.2px 4.8px calc(3.2px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 4.8px rgba(0, 0, 0, 0.08); justify-content: space-around; border-radius: 0; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1.6px; padding: 4.8px 3.2px; border-radius: var(--r); color: #757575; font-size: 8.8px; font-weight: 500; }
  .tabbar a.active { color: var(--green-d); }
  .dock { right: 9.6px; bottom: 60.8px; left: 9.6px; align-items: stretch; }
  .dock .callcard { width: 100%; }
  .dock-pill { align-self: flex-end; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .legs { grid-template-columns: 1fr; }
  .link-line { width: 3.2px; height: 28.8px; margin: 0 auto; }
  .kv { grid-template-columns: 1fr; }
  .modal { padding: 16px; }
  .modal.center h2 { font-size: 22.4px; }
  .modal.center p { font-size: 12.8px; }
  .overlay { align-items: end; padding: 8px; }
  #toasts { bottom: 67.2px; }
  .hours-row { grid-template-columns: 1fr; }
  .tabs button { height: 38.4px; padding: 0 12.8px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar h1 { font-size: 12.8px; }
  .card { padding: 12.8px; }
  .login-card { padding: 80px 18px 26px; }
  .login-card .actions .forgot { margin-left: 0; font-size: 12px; }
  .login-card .actions .btn { width: 116px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.dial-display::placeholder { font-size: 12px; font-weight: 400; letter-spacing: 0; opacity: .7; }
@media (max-width: 520px) { .dial-display { font-size: 19.2px; } }

/* ---------- WhatsApp-style template preview ---------- */
.wa-preview { background: #e7ddd3 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><circle cx='3' cy='3' r='1.2' fill='%23c9bcae'/></svg>"); border-radius: var(--r-card); padding: 12.8px; display: flex; flex-direction: column; gap: 3.2px; max-width: 288px; }
.wa-bubble { background: #fff; color: #111; border-radius: 6.4px; padding: 7.2px 8.8px 4.8px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); font-size: 10.8px; line-height: 1.4; position: relative; word-break: break-word; }
.wa-bubble .wa-h { font-weight: 700; margin-bottom: 3.2px; }
.wa-bubble .wa-b { white-space: pre-wrap; }
.wa-bubble .wa-f { color: #667781; font-size: 9.6px; margin-top: 3.2px; }
.wa-bubble .wa-t { color: #667781; font-size: 8.4px; text-align: right; margin-top: 1.6px; }
.wa-bubble.wa-actions { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.wa-btn { display: flex; align-items: center; justify-content: center; gap: 6.4px; padding: 7.2px; color: #027eb5; font-weight: 500; border-top: 1px solid #eee; }
.wa-btn:first-child { border-top: 0; }
.wa-btn .mdi.i { font-size: 12.8px; }

/* ---------- conference ---------- */
.confcard, .confcard.glass { position: fixed; z-index: 62; right: 17.6px; bottom: 76.8px; width: 264px; padding: 12.8px; border-radius: 6.4px; box-shadow: var(--e3); border: 0; animation: modalIn 0.3s var(--ease) both; }
.confcard .timer { font-weight: 500; font-variant-numeric: tabular-nums; }
.confcard .cp { display: flex; align-items: center; gap: 8px; padding: 4.8px 6.4px; border-radius: var(--r); transition: background 0.2s, box-shadow 0.2s; }
.confcard .cp.speaking, .cp-row.speaking { background: #e8f5e9; box-shadow: inset 0 0 0 1.2px rgba(98, 177, 112, 0.7); }
.eq { display: inline-flex; gap: 1.6px; align-items: flex-end; height: 11.2px; }
.eq i { width: 2.4px; height: 3.2px; background: var(--green); border-radius: 1.6px; }
.cp.speaking .eq i { animation: eqBar 0.6s ease-in-out infinite; }
.cp.speaking .eq i:nth-child(2) { animation-delay: 0.15s; } .cp.speaking .eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eqBar { 0%, 100% { height: 3.2px; } 50% { height: 11.2px; } }
.cp-row { display: flex; align-items: center; gap: 9.6px; padding: 7.2px 8px; border-radius: var(--r); border: 1px solid transparent; transition: background 0.2s; flex-wrap: wrap; }
.cp-row:hover { background: #fafafa; }
.meter { width: 56px; height: 4.8px; border-radius: 4.8px; background: #e0e0e0; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); transition: width 0.3s var(--ease); }
.leg-row { padding: 9.6px; border-radius: var(--r-card); border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 6.4px; }
.invite, .invite.glass { position: fixed; z-index: 95; top: 67.2px; left: 50%; transform: translateX(-50%); width: min(336px, calc(100vw - 19.2px)); padding: 12.8px; border-radius: 6.4px; box-shadow: var(--e3); border: 0; animation: modalIn 0.3s var(--ease) both; }

/* ---------- notifications ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 1.6px; right: 1.6px; min-width: 14.4px; height: 14.4px; padding: 0 4px; border-radius: 79.2px; background: var(--bad); color: #fff; font-size: 8.4px; font-weight: 700; display: grid; place-items: center; }
.bell.ringing .mdi.i { animation: bellRing 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bellRing { 0%, 85%, 100% { transform: rotate(0); } 88% { transform: rotate(14deg); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(8deg); } }
.note-panel, .note-panel.glass { position: absolute; right: 0; top: 38.4px; width: 272px; max-height: 70vh; overflow: auto; padding: 11.2px; border-radius: 6.4px; color: var(--ink); background: #fff; box-shadow: var(--e3); border: 0; z-index: 50; animation: modalIn 0.25s var(--ease) both; }
.note-row { display: flex; align-items: center; gap: 8px; padding: 6.4px 3.2px; border-top: 1px solid var(--line-2); }
.toast.notice { border: 0; border-left: 3.2px solid var(--green); }
@media (max-width: 900px) { .confcard { right: 9.6px; left: 9.6px; width: auto; bottom: 120px; } .note-panel { position: fixed; left: 8px; right: 8px; top: 57.6px; width: auto; } }

/* ---------- call waiting banner + multiple calls ---------- */
.waitstack { position: fixed; z-index: 95; top: 11.2px; left: 50%; transform: translateX(-50%); width: min(432px, calc(100vw - 19.2px)); display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 22.4px); overflow-y: auto; scrollbar-width: none; }
.waitcard, .waitcard.glass, .waitcard.glass.strong { position: relative; overflow: hidden; background: #fff; padding: 11.2px 12.8px 14.4px; border-radius: 6.4px; animation: waitIn 0.35s var(--ease) both; border: 0; border-left: 4px solid var(--green); box-shadow: var(--e3); }
.waitcard .wait-av { position: relative; display: grid; place-items: center; width: 36.8px; height: 36.8px; }
.waitcard .wait-av::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.6px solid rgba(98, 177, 112, 0.7); animation: ringPulse 1.8s var(--ease) infinite; }
.waitcard .wait-title { font-size: 8.8px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-d); }
.waitcard .wait-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6.4px; margin-top: 9.6px; }
.waitcard .wait-acts .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.waitcard .wait-acts .btn { flex: 1 1 auto; justify-content: center; }
.waitcard .countdown { position: absolute; left: 0; right: 0; bottom: 0; height: 3.2px; background: #e0e0e0; }
.waitcard .countdown i { display: block; height: 100%; background: var(--green); transform-origin: left; animation: countdown linear forwards; }
@keyframes waitIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
.dock { max-height: calc(100vh - 35.2px); overflow-y: auto; overflow-x: hidden; }
.sess-chips { display: flex; gap: 4.8px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.sess-chip { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1.6px; padding: 6.4px 4.8px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-family: inherit; transition: background 0.2s, border-color 0.2s; }
.sess-chip:hover { background: #fafafa; }
.sess-chip.on { background: #e8f5e9; border-color: var(--green); }
.sess-chip.held { opacity: 0.85; }
.sess-chip .nm { font-weight: 500; font-size: 9.6px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-chip small { font-size: 8.4px; color: var(--muted); font-weight: 500; }
.sess-chip.on small { color: var(--green-d); }
@media (max-width: 900px) { .waitstack { top: 6.4px; } .dock { max-height: calc(100vh - 120px); } }

/* voicemail player */
.vm-box { display: flex; flex-direction: column; gap: 8px; padding: 11.2px; border-radius: var(--r-card); background: #f1f8f2; border: 1px solid var(--brand-300); }
.vm-box audio { height: 32px; }

/* credits chip in the app bar (same slot and style as the balance chips on the reference) */
.topbar .credit-chip { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); }
.credit-chip { display: inline-flex; align-items: center; gap: 6.4px; height: 35.2px; padding: 0 14.4px; border-radius: 6.4px; text-decoration: none; color: #fff; background: var(--bar-chip); font-size: 12.8px; transition: background 0.2s; }
.credit-chip:hover { background: #a3a2a2; }
.credit-chip b { font-weight: 500; font-variant-numeric: tabular-nums; color: inherit; }
.credit-chip .lbl { font-weight: 400; opacity: 0.9; font-size: 11.2px; color: inherit; }
.credit-chip.warn { color: #3d2b00; background: #fbbd2d; }
.credit-chip.bad { color: #fff; background: var(--bad); }
@media (max-width: 900px) { .topbar .credit-chip { position: static; transform: none; } }
@media (max-width: 600px) { .credit-chip .lbl { display: none; } .credit-chip { padding: 0 8px; height: 30.4px; } }
#conn { background: rgba(255, 255, 255, 0.16); color: #fff; }
#conn.ok .dot { color: #7ee08c; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
.login-card .lf .eye .mdi.i { font-size: 22px; }
.elig .r.warn { background: var(--warn-bg); color: #8a5a00; }
.progress.warn i { background: #fbbd2d; }
.progress.bad i { background: var(--bad); }
