:root {
  /* Odella Informative family: warm cream and white, black ink; Volyx deep teal for its own accents. */
  --bg: #fbf7ef;
  --surface: #ffffff;
  --surface-2: #f8f2e6;
  --surface-3: #f1e8d6;
  --border: #e6dcc8;
  --text: #111111;
  --text-2: #4a443c;
  --muted: #6f665a;
  --accent: #0f766e;
  --accent-2: #0b5e57;
  --accent-text: #ffffff;
  --accent-soft: #e6f3f0;
  --accent-ink: #0b5e57;
  --ink: #111111;
  --out-bubble: #0f766e;
  --out-text: #ffffff;
  --in-bubble: #ffffff;
  --good: #4d7a17; --good-soft: #eef4e4;
  --warn: #8a5a0b; --warn-soft: #fdf3df;
  --danger: #b8322e; --danger-soft: #fcebea;
  --dot-red: #e24b4a; --dot-blue: #378add; --dot-green: #639922; --dot-amber: #ef9f27;
  --series-1: #378add;
  --series-2: #ef9f27;
  --grid: #efe7d6;
  --shadow-sm: 0 1px 2px rgba(60, 42, 12, .05);
  --shadow: 0 1px 2px rgba(60, 42, 12, .05), 0 10px 28px -20px rgba(60, 42, 12, .3);
  --shadow-lg: 0 18px 50px -12px rgba(60, 42, 12, .3);
  --radius: 14px;
  --sidebar: #151310;
  --sidebar-text: #cfc6b6;
  --sidebar-active: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100d; --surface: #1b1814; --surface-2: #221e19; --surface-3: #2b261f; --border: #362f27;
    --text: #f3eee4; --text-2: #cfc6b6; --muted: #a39a8a; --ink: #f3eee4;
    --accent: #6cc3b4; --accent-2: #8fd3c6; --accent-text: #12100d; --accent-soft: #17302c; --accent-ink: #b3e3da;
    --out-bubble: #0f766e; --in-bubble: #221e19;
    --good: #8cc152; --good-soft: #1e2a12; --warn: #f0b555; --warn-soft: #33270c; --danger: #f08a86; --danger-soft: #3a1a17;
    --series-1: #5aa2ea; --series-2: #f0b04a; --grid: #2b261f;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.02); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    --sidebar: #0d0b09; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100d; --surface: #1b1814; --surface-2: #221e19; --surface-3: #2b261f; --border: #362f27;
  --text: #f3eee4; --text-2: #cfc6b6; --muted: #a39a8a; --ink: #f3eee4;
  --accent: #6cc3b4; --accent-2: #8fd3c6; --accent-text: #12100d; --accent-soft: #17302c; --accent-ink: #b3e3da;
  --out-bubble: #0f766e; --in-bubble: #221e19;
  --good: #8cc152; --good-soft: #1e2a12; --warn: #f0b555; --warn-soft: #33270c; --danger: #f08a86; --danger-soft: #3a1a17;
  --series-1: #5aa2ea; --series-2: #f0b04a; --grid: #2b261f;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.02); --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
  --sidebar: #0d0b09; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.5 "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; font-weight: 500; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.primary:hover { background: #2d2925; border-color: #2d2925; }
:root[data-theme="dark"] .btn.primary:hover { background: #fff; border-color: #fff; }
.btn.success { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.icon { padding: 7px 9px; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn:focus-visible, .nav-item:focus-visible, .lead-item:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin: 12px 0 5px; }
kbd { font: 11px/1 ui-monospace, Consolas, monospace; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; background: var(--surface-2); color: var(--text-2); }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background-color: #151310; background-image: radial-gradient(circle at 1px 1px, rgba(251, 247, 239, .09) 1px, transparent 0); background-size: 18px 18px; color: #fbf7ef; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h2 { font-size: 34px; line-height: 1.15; margin: 0 0 14px; max-width: 460px; }
.login-art p { opacity: .85; max-width: 420px; font-size: 15px; }
.login-art ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.login-art li { display: flex; gap: 10px; align-items: center; opacity: .95; }
.login-art li span { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.login-form-wrap { display: grid; place-items: center; padding: 24px 16px; }
.login form { width: 100%; max-width: 360px; }
.login h1 { margin: 0 0 4px; font-size: 26px; }
.login .btn { width: 100%; margin-top: 20px; padding: 10px; }
.error { color: var(--danger); margin-top: 10px; min-height: 1em; font-size: 13px; }

/* ---------- app shell ---------- */
.shell { height: 100%; display: grid; grid-template-columns: 232px 1fr; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 4px 18px 8px; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: #0f766e; display: grid; place-items: center; font-size: 15px; box-shadow: none; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: inherit; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-align: left; font-weight: 500; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(251,247,239,.1); color: var(--sidebar-active); }
.nav-item .ico { width: 20px; text-align: center; font-size: 16px; }
.nav-item .count { margin-left: auto; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7285; padding: 16px 10px 6px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who b { color: #fff; display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .btn { color: var(--sidebar-text); }
.sidebar-foot .btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; }
.page { overflow: auto; padding: 24px 28px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }

/* ---------- avatars, chips, pills ---------- */
.avatar { --h: 170; width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 80% 90%); }
:root[data-theme="dark"] .avatar { color: hsl(var(--h) 80% 85%); background: hsl(var(--h) 35% 26%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 80% 85%); background: hsl(var(--h) 35% 26%); } }
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); text-transform: capitalize; white-space: nowrap; }
.pill.new { background: #e8f1fd; color: #1c5cab; } .pill.contacted { background: #e3f2ef; color: #0b5e57; } .pill.qualified { background: #e6f6f1; color: #0b7a55; }
.pill.proposal { background: #fff3e2; color: #9a5800; } .pill.won { background: var(--good-soft); color: var(--good); } .pill.lost, .pill.archived { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .pill:not(.won) { background: var(--surface-3); color: var(--text-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill:not(.won) { background: var(--surface-3); color: var(--text-2); } }
.pill.reply { background: var(--danger-soft); color: var(--danger); text-transform: none; }
.pill.due { background: var(--warn-soft); color: var(--warn); text-transform: none; }
.pill.overdue { background: var(--danger-soft); color: var(--danger); text-transform: none; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .n { font-weight: 700; }
.timeline .ico .ic { width: 14px; height: 14px; }
#notif-list .ni .ic { width: 16px; height: 16px; }
.contact-chip .ic, .note-bubble .text .ic, .followup-bar > .ic, .score .ic { width: 13px; height: 13px; }
.followup-bar > .ic { width: 16px; height: 16px; }
.contact-chip { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; text-decoration: none; }

/* ---------- home ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); cursor: default; position: relative; overflow: hidden; }
.kpi.click { cursor: pointer; }
.kpi.click:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .sub.bad { color: var(--danger); font-weight: 600; }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.card-head h2 { margin: 0; font-size: 15px; }
.card-body { padding: 4px 16px 16px; }
.row-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.row-list li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.row-list li:hover { background: var(--surface-2); }
.row-list .grow { flex: 1; min-width: 0; }
.row-list .t1 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-list .t2 { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-mini { padding: 22px 16px 26px; text-align: center; color: var(--muted); }
.empty-mini .big { font-size: 26px; display: block; margin-bottom: 4px; }

/* charts */
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border); stroke-width: 1; }
.chart .val { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + g rect, .chart g.col:hover rect { opacity: .85; }
.tooltip { position: absolute; pointer-events: none; background: var(--text); color: var(--surface); font-size: 12px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; }
.tooltip b { display: block; margin-bottom: 2px; }
.tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--series-1); border-radius: 999px; min-width: 2px; }
.hbar .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 330px 1fr 320px; height: 100%; min-height: 0; }
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.pane + .pane { border-left: 1px solid var(--border); }
.pane-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pane-body { flex: 1; overflow: auto; min-height: 0; }
.search { position: relative; flex: 1; }
.search input { padding-left: 32px; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 16px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.lead-item { display: flex; gap: 11px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 12px 14px; cursor: pointer; position: relative; }
.lead-item:hover { background: var(--surface-2); }
.lead-item.active { background: var(--accent-soft); }
.lead-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.lead-item .grow { flex: 1; min-width: 0; }
.lead-item .row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lead-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-item.unread .name { font-weight: 800; }
.lead-item .time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.lead-item .preview { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.lead-item.unread .preview { color: var(--text); font-weight: 500; }
.lead-item .tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.badge { background: var(--accent); color: var(--accent-text); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; line-height: 18px; }

.convo { container-type: inline-size; }
.convo-head { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; row-gap: 8px; align-items: center; flex-wrap: wrap; }
.convo-head .who { flex: 1 1 220px; min-width: 0; }
.convo-head .title .nm { white-space: nowrap; }
@container (max-width: 680px) { .convo-actions .label { display: none; } .convo-actions .btn.act:not(.icon) { width: 38px; padding: 0; } }
@container (max-width: 520px) { .convo-head .contacts { display: none; } }
.convo-head .title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.convo-head .contacts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.convo-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.notice { margin: 10px 14px 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text-2); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.followup-bar { margin: 10px 14px 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.followup-bar.overdue { background: var(--danger-soft); color: var(--danger); }
.followup-bar .grow { flex: 1; }
.messages { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.day-sep { align-self: center; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; margin: 10px 0 4px; }
.msg { max-width: min(72%, 560px); padding: 9px 13px; border-radius: 16px; position: relative; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.msg .text { white-space: pre-wrap; }
.msg.in { align-self: flex-start; background: var(--in-bubble); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.out { align-self: flex-end; background: var(--out-bubble); color: var(--out-text); border-bottom-right-radius: 5px; }
.msg .meta { font-size: 11px; opacity: .78; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg.deleted { outline: 2px dashed var(--danger); outline-offset: 2px; }
.msg .deleted-tag { display: block; font-size: 11px; font-weight: 700; color: var(--danger); background: var(--danger-soft); border-radius: 6px; padding: 2px 7px; margin-bottom: 6px; }
.msg .del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); opacity: 0; cursor: pointer; font-size: 11px; display: grid; place-items: center; }
.msg:hover .del, .msg .del:focus { opacity: 1; }
.msg .file { display: inline-flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(127,127,127,.14); color: inherit; text-decoration: none; font-weight: 500; }
.msg img.preview-img { max-width: 260px; max-height: 220px; border-radius: 10px; display: block; margin-top: 6px; }
.msg .failed { color: #ffd2cc; font-weight: 700; }
.msg.in .failed { color: var(--danger); }
.empty { margin: auto; text-align: center; color: var(--muted); padding: 32px; max-width: 360px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }
.empty h3 { color: var(--text); margin: 0 0 6px; }

.composer { border-top: 1px solid var(--border); padding: 10px 14px 12px; background: var(--surface); position: relative; }
.channel-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.channel-tabs button { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 3px 10px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.channel-tabs button:hover { background: var(--surface-2); }
.channel-tabs button.active { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.channel-tabs .test { font-size: 10px; font-weight: 700; color: var(--warn); }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 42px; max-height: 160px; border-radius: 12px; }
.composer .hint { font-size: 11px; color: var(--muted); margin-top: 6px; }
.popover { position: absolute; bottom: calc(100% - 6px); left: 14px; right: 14px; max-width: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; z-index: 20; padding: 6px; }
.popover .opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.popover .opt:hover, .popover .opt.sel { background: var(--accent-soft); }
.popover .opt b { display: block; font-size: 13px; }
.popover .opt span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popover .head { font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 10px; text-transform: uppercase; letter-spacing: .06em; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.menu button { display: flex; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; align-items: center; }
.menu button:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.rel { position: relative; }

.subtabs { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.subtabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.subtabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.details { padding: 4px 16px 18px; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin: 18px 0 2px; }
.timeline { list-style: none; margin: 0; padding: 8px 16px 18px; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; position: relative; z-index: 1; }
.timeline .what { font-weight: 600; }
.timeline .extra { color: var(--text-2); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 8px; padding: 5px 8px; margin: 4px 0; }
.timeline li.flag .what { color: var(--danger); }
.timeline li.flag .ico { background: var(--danger-soft); border-color: transparent; }

/* ---------- pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: 100%; min-height: 200px; }
.col.drop { border-color: var(--accent); background: var(--accent-soft); }
.col-head { padding: 12px 14px 8px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.col-head .count { color: var(--muted); font-weight: 600; }
.col-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.deal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow-sm); }
.deal:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.deal.dragging { opacity: .5; }
.deal .top { display: flex; gap: 10px; align-items: center; }
.deal .name { font-weight: 600; }
.deal .co { font-size: 12px; color: var(--muted); }
.deal .bottom { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; font-size: 12px; color: var(--muted); }

/* ---------- tables, forms ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.list th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 150px auto; gap: 10px; align-items: end; }
.form-row label { margin-top: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tpl .body { color: var(--text-2); font-size: 13px; white-space: pre-wrap; flex: 1; }
.tpl .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.vars code { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; cursor: pointer; }

/* ---------- dialogs, toasts, banners ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 12, 18, .5); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s ease-out; }
.dialog { background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); overflow: auto; animation: pop .14s ease-out; }
.dialog h3 { margin: 0 0 6px; font-size: 18px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 12px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.banner { margin: 12px 28px 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner .grow { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- video call ---------- */
.call { position: fixed; inset: 0; background: radial-gradient(900px 500px at 50% 30%, #1d2033, #07080c); z-index: 70; display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.call-head { padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.call-timer { font-variant-numeric: tabular-nums; background: rgba(255,255,255,.1); padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.call-timer:empty { display: none; }
.call-stage { position: relative; min-height: 0; margin: 0 16px; border-radius: 18px; overflow: hidden; background: #000; }
.call-stage video.remote { width: 100%; height: 100%; object-fit: contain; }
.call-stage video.local { position: absolute; right: 16px; bottom: 16px; width: 26%; max-width: 240px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); background: #222; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.call-status { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; color: #cfd3dc; pointer-events: none; text-align: center; padding: 16px; }
.call-controls { display: flex; justify-content: center; gap: 12px; padding: 18px; flex-wrap: wrap; }
.call-controls .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.12); border-radius: 999px; padding: 10px 18px; }
.call-controls .btn:hover { background: rgba(255,255,255,.18); }
.call-controls .btn.end { background: #dc2626; border-color: #dc2626; }
.call-controls .btn.accept { background: #16a34a; border-color: #16a34a; }

/* ---------- notifications ---------- */
.bell { position: relative; color: var(--sidebar-text); }
.bell:hover { background: rgba(255,255,255,.08); color: #fff; }
.bell .count { position: absolute; top: -2px; right: -4px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px; line-height: 16px; }
.notif-panel { position: fixed; left: 240px; top: 12px; width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, calc(100vh - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 45; display: flex; flex-direction: column; animation: pop .12s ease-out; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
#notif-list { list-style: none; margin: 0; padding: 6px; overflow: auto; }
#notif-list li { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
#notif-list li:hover { background: var(--surface-2); }
#notif-list li.unread { background: var(--accent-soft); }
#notif-list .ni { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; flex: none; }
#notif-list .nt { font-size: 13px; }

/* ---------- inbox extras ---------- */
.presence { margin: 8px 14px 0; font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; }
.typing { padding: 2px 18px 6px; font-size: 12px; color: var(--muted); background: var(--bg); font-style: italic; }
.dots::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.scheduled-bar { border-top: 1px solid var(--border); background: var(--surface-2); padding: 6px 14px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow: auto; }
.scheduled-bar .sch { display: flex; gap: 8px; align-items: center; }
.scheduled-bar .sch .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.composer-top .channel-tabs { margin: 0; }
.mode-tabs { display: flex; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.mode-tabs button { border: 0; background: transparent; padding: 3px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mode-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.composer.note-mode { background: #fffbea; }
.composer.note-mode textarea { background: #fffdf3; border-color: #f0d36b; }
:root[data-theme="dark"] .composer.note-mode, :root[data-theme="dark"] .composer.note-mode textarea { background: #2a2410; border-color: #6b5a1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .composer.note-mode, :root:not([data-theme="light"]) .composer.note-mode textarea { background: #2a2410; border-color: #6b5a1c; } }
.composer.note-mode .channel-tabs { visibility: hidden; }
.note-bubble { align-self: center; width: min(88%, 560px); background: #fff7d6; color: #5c4a00; border: 1px solid #f0d36b; border-radius: 12px; padding: 8px 12px; font-size: 13px; }
:root[data-theme="dark"] .note-bubble { background: #2a2410; color: #f3dc8a; border-color: #6b5a1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note-bubble { background: #2a2410; color: #f3dc8a; border-color: #6b5a1c; } }
.note-bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-bubble .meta { font-size: 11px; opacity: .8; margin-top: 3px; }
.note-bubble .mention { font-weight: 700; }
.msg .flagged { display: block; font-size: 11px; font-weight: 700; color: #b45309; background: #fff4e0; border-radius: 6px; padding: 2px 7px; margin-bottom: 6px; }
.msg .auto { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.label-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: hsl(var(--h) 80% 93%); color: hsl(var(--h) 50% 30%); white-space: nowrap; }
:root[data-theme="dark"] .label-chip { background: hsl(var(--h) 30% 24%); color: hsl(var(--h) 80% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .label-chip { background: hsl(var(--h) 30% 24%); color: hsl(var(--h) 80% 82%); } }
.label-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; font-size: 11px; opacity: .7; }
.score { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.score.hot { background: var(--danger-soft); color: var(--danger); }
.score.warm { background: var(--warn-soft); color: var(--warn); }
.score.cold { background: var(--surface-3); color: var(--muted); }
.pill.sla { background: var(--danger); color: #fff; text-transform: none; }
.labels-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.labels-edit input { width: 120px; padding: 3px 8px; font-size: 12px; border-radius: 999px; }

/* ---------- AI panel ---------- */
.ai-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.ai-score { display: flex; align-items: center; gap: 12px; }
.ai-score .big { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ai-meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; flex: 1; }
.ai-meter i { display: block; height: 100%; background: var(--series-1); border-radius: 999px; }
.ai-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.suggestion { display: block; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 10px; margin-top: 8px; cursor: pointer; font-size: 13px; white-space: pre-wrap; }
.suggestion:hover { border-color: var(--accent); background: var(--accent-soft); }
.ai-off { padding: 16px; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-2); font-size: 13px; margin-top: 12px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .7s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- compliance & settings ---------- */
.archive-form { display: grid; grid-template-columns: 2fr repeat(4, 1fr) 140px 140px auto auto; gap: 8px; }
table.list.wrap td { white-space: normal; vertical-align: top; }
table.list .msgcell { max-width: 520px; overflow-wrap: anywhere; }
.sev { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; text-transform: uppercase; }
.sev.high { background: var(--danger-soft); color: var(--danger); }
.sev.medium { background: var(--warn-soft); color: var(--warn); }
.sev.low { background: var(--surface-3); color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.settings-grid .card-body p { margin: 0 0 6px; color: var(--text-2); font-size: 13px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text); margin: 4px 0 8px; cursor: pointer; }
.toggle input { width: auto; accent-color: var(--accent); transform: scale(1.2); }
.day-picks { display: flex; gap: 4px; flex-wrap: wrap; }
.day-picks label { margin: 0; }
.day-picks input { display: none; }
.day-picks span { display: inline-block; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; font-size: 12px; color: var(--text-2); }
.day-picks input:checked + span { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.terms { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.term { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }
.term button { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-row input, .inline-row select { width: auto; flex: 1; min-width: 120px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: #22c55e; } .status-dot.off { background: var(--muted); }

.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 .ic { width: 17px; height: 17px; }

.who-btn { border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; padding: 4px 6px; border-radius: 8px; display: flex; flex-direction: column; }
.who-btn:hover { background: rgba(255,255,255,.06); }

/* ---------- Volyx brand ---------- */
.brand-mark { color: #fff; }
.brand-mark .logo { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-weight: 800; letter-spacing: -.02em; font-size: 18px; }
.brand-by { font-size: 10.5px; font-weight: 500; color: #a39a8a; letter-spacing: .01em; margin-top: 2px; }
.login-art .brand-name { font-size: 20px; }
.login-art li span .ic { width: 16px; height: 16px; }
.portal-brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.portal-brand .brand-mark { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; background: #0f766e; }
.portal-brand .brand-mark .logo { width: 13px; height: 13px; }

/* ---------- icons ---------- */
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }
.btn .ic, .menu .ic, .nav-item .ic { width: 18px; height: 18px; }
.nav-item .ico { display: grid; place-items: center; }
.nav-item .ico .ic { width: 19px; height: 19px; stroke-width: 1.9; }
.nav-item.active .ico .ic { color: #8fd3c6; }
.chip .ic, .pill .ic, .msg .meta .ic, .lead-item .preview .ic, .row-list .t2 .ic { width: 13px; height: 13px; vertical-align: -2px; }
.subtabs .ic { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
.c-web { color: #2a78d6; } .c-wa { color: #16a34a; } .c-sms { color: #0f766e; } .c-mail { color: #ea580c; } .c-ai { color: #14917f; }
:root[data-theme="dark"] .c-web { color: #60a5fa; } :root[data-theme="dark"] .c-wa { color: #4ade80; } :root[data-theme="dark"] .c-sms { color: #7cc9bb; } :root[data-theme="dark"] .c-mail { color: #fb923c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c-web { color: #60a5fa; } :root:not([data-theme="light"]) .c-wa { color: #4ade80; } :root:not([data-theme="light"]) .c-sms { color: #7cc9bb; } :root:not([data-theme="light"]) .c-mail { color: #fb923c; } }
.msg.out .meta .ic { color: inherit; }

/* conversation header actions: soft tinted pills */
.btn.act { border: 1px solid transparent; height: 38px; padding: 0 14px; border-radius: 12px; gap: 7px; font-weight: 600; transition: background .15s, transform .12s, box-shadow .15s; }
.btn.act.icon { width: 38px; padding: 0; }
.btn.act:hover { transform: translateY(-1px); }
.act-call { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 14px rgba(22,163,74,.35); }
.act-call:hover { background: linear-gradient(135deg, #2dd36a, #15913f); }
.act-amber { background: #fff4e0; color: #b45309; } .act-amber:hover { background: #ffe9c2; }
.act-blue { background: #e8f1fd; color: #1d5fb8; } .act-blue:hover { background: #d6e7fc; }
.act-plain { background: var(--surface-2); color: var(--text-2); border-color: var(--border); } .act-plain:hover { background: var(--surface-3); }
.act-red { background: var(--danger-soft); color: var(--danger); } .act-red:hover { background: #fbd9d4; }
:root[data-theme="dark"] .act-amber { background: #33270c; color: #fbbf24; } :root[data-theme="dark"] .act-blue { background: #172a45; color: #7cb4f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .act-amber { background: #33270c; color: #fbbf24; } :root:not([data-theme="light"]) .act-blue { background: #172a45; color: #7cb4f5; } }
.menu button .ic { color: var(--text-2); }

/* composer tools: round, tinted on hover */
.tool { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: grid; place-items: center; cursor: pointer; margin: 0; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.tool:hover { transform: translateY(-1px); }
.tool .ic { width: 19px; height: 19px; }
.t-amber:hover { background: #fff4e0; color: #b45309; border-color: #f7d48b; }
.t-blue:hover { background: #e8f1fd; color: #1d5fb8; border-color: #b8d3f5; }
.t-plain:hover { background: var(--surface-2); color: var(--text); }
.t-ai { color: #fff; border: 0; background: #0f766e; box-shadow: none; }
.t-ai:hover { filter: brightness(1.08); }
.t-ai:disabled { opacity: .7; }
:root[data-theme="dark"] .t-amber:hover { background: #33270c; color: #fbbf24; border-color: #6b5a1c; } :root[data-theme="dark"] .t-blue:hover { background: #172a45; color: #7cb4f5; border-color: #2b4a75; }
.send-btn { height: 42px; padding: 0 18px; border-radius: 12px; border: 0; color: #fff; font-weight: 700; gap: 8px; background: var(--ink); color: var(--surface); box-shadow: none; border-radius: 999px; }
.send-btn:hover { background: #2d2925; transform: none; }
:root[data-theme="dark"] .send-btn:hover { background: #fff; }
.send-btn .ic { width: 17px; height: 17px; }
.composer.note-mode .send-btn { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 14px rgba(217,119,6,.3); }
.composer-row { align-items: center; }
.channel-tabs button .ic { width: 15px; height: 15px; }
.channel-tabs .test { font-size: 9px; letter-spacing: .04em; padding: 1px 5px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.mode-tabs button { display: inline-flex; align-items: center; gap: 5px; }
.mode-tabs .ic { width: 14px; height: 14px; }

/* KPI icon chips */
.kpi .ico { background: none; }
.kpi .ico .ic { width: 17px; height: 17px; }
.tone-violet { background: #e3f2ef !important; color: #0b5e57; } .tone-amber { background: #fff4e0 !important; color: #b45309; }
.tone-blue { background: #e8f1fd !important; color: #1d5fb8; } .tone-green { background: #e5f6ec !important; color: #15803d; }
.tone-pink { background: #fde7f3 !important; color: #be185d; } .tone-red { background: #fdecea !important; color: #c2341f; }
:root[data-theme="dark"] [class*="tone-"] { background: var(--surface-3) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [class*="tone-"] { background: var(--surface-3) !important; } }
.bell .ic, .sidebar-foot .ic { width: 18px; height: 18px; }

/* ---------- responsive ---------- */
.back-btn, .mobile-nav { display: none; }
@media (max-width: 1500px) { .inbox { grid-template-columns: 300px 1fr 300px; } }
@media (min-width: 761px) { .inbox:not(.has-lead) { grid-template-columns: 330px 1fr; } }
.inbox:not(.has-lead) .side { display: none !important; }
@media (max-width: 1440px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .inbox { grid-template-columns: 300px 1fr; }
  .inbox .side { display: none; }
  .inbox.show-side .side { display: flex; position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100%); z-index: 40; box-shadow: var(--shadow-lg); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; background: var(--sidebar); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; grid-row: 2; }
  .mobile-nav .nav-item { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; color: var(--sidebar-text); justify-content: center; align-items: center; width: auto; flex: 1; position: relative; }
  .mobile-nav .nav-item.active { color: #fff; background: transparent; }
  .mobile-nav .nav-item .count { position: absolute; top: 0; right: 18%; margin: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .page { padding: 16px; }
  .banner { margin: 12px 16px 0; }
  .notif-panel { left: 12px; top: auto; bottom: 70px; }
  .archive-form { grid-template-columns: 1fr 1fr; }
  .archive-form input[name="q"] { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox .convo { display: none; }
  .inbox.open .list { display: none; }
  .inbox.open .convo { display: flex; }
  .back-btn { display: inline-flex; }
  .convo-head { flex-wrap: wrap; }
  .convo-actions { width: 100%; justify-content: flex-start; }
  .msg { max-width: 88%; }
  .form-row { grid-template-columns: 1fr; }
  .convo-actions .label { display: none; }
}

/* ---------- phone app (installable PWA) ---------- */
html { -webkit-tap-highlight-color: transparent; }
html.standalone body { overscroll-behavior-y: none; }
html.standalone .shell, html.standalone .login { padding-top: env(safe-area-inset-top); }
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 18, 0); transition: background .2s; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap.open { background: rgba(10, 12, 18, .5); }
.sheet { width: min(520px, 100%); background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
         box-shadow: var(--shadow-lg); transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); max-height: 85vh; overflow: auto; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--border); margin: 4px auto 10px; }
.sheet-me { display: flex; gap: 12px; align-items: center; padding: 6px 8px 12px; }
.sheet-item { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; font-weight: 500;
              padding: 13px 10px; border-radius: 12px; cursor: pointer; text-align: left; }
.sheet-item .ic { width: 21px; height: 21px; color: var(--text-2); }
.sheet-item:active, .sheet-item:hover { background: var(--surface-2); }
.sheet-item.active { background: var(--accent-soft); color: var(--accent-ink); }
.sheet-item.active .ic { color: var(--accent-ink); }
.sheet-item.danger, .sheet-item.danger .ic { color: var(--danger); }
.sheet hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.sheet-foot { text-align: center; padding-top: 8px; }
.install-steps { padding-left: 20px; line-height: 1.9; }
@media (hover: none) { .msg .del { opacity: .8; } }
@media (max-width: 900px) {
  .mobile-nav .nav-item { min-height: 52px; }
  .mobile-nav .nav-item .ic { width: 22px; height: 22px; }
  /* 16px stops iPhone from zooming into a field when you tap it */
  input, select, textarea, .composer textarea { font-size: 16px; }
}
@media (max-width: 760px) {
  .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer .hint { display: none; }
  .composer-top { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .composer-top::-webkit-scrollbar { display: none; }
  .channel-tabs { flex-wrap: nowrap; margin: 0; }
  .channel-tabs button, .mode-tabs button { white-space: nowrap; }
  /* message box gets the full width; tools and Send sit underneath, thumb-sized */
  .composer-row { flex-wrap: wrap; gap: 8px; }
  .composer-row textarea { order: -1; flex: 1 1 100%; min-height: 46px; }
  .composer-row .send-btn { margin-left: auto; height: 44px; }
  .tool { width: 44px; height: 44px; }
  .convo-head .btn, .convo-actions .btn { min-height: 40px; }
  .notif-panel { left: 8px; right: 8px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .overlay:has(> .dialog) { align-items: end; padding: 0; }
  .overlay > .dialog { width: 100%; max-width: none; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
}
.login-mobile-brand { display: none; }
@media (max-width: 900px) {
  .login-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
  .login-mobile-brand .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
  .login-mobile-brand b { display: block; font-size: 22px; line-height: 1.1; }
  .login-mobile-brand small { color: var(--muted); font-size: 13px; }
}
@media (max-width: 760px) {
  .banner { margin: 8px 10px 0; padding: 8px 10px; gap: 8px; font-size: 13px; flex-wrap: nowrap; }
  .banner > span:first-child { display: none; }
  .banner .btn { padding: 5px 10px; white-space: nowrap; }
}
.login-mobile-brand .brand-mark .logo { width: 32px; height: 32px; }

/* ---------- Odella Informative family details ---------- */
h1, h2, h3 { letter-spacing: -.01em; }
.page-head h1 { font-weight: 500; letter-spacing: -.025em; }
.btn { border-radius: 999px; }
.btn.icon, .tool { border-radius: 12px; }
.card { border-color: var(--border); }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
/* the four logo dots after "by Odella Informative" */
.brand-by::after, .login-mobile-brand small::after { content: ""; display: inline-block; width: 26px; height: 5px; margin-left: 5px; vertical-align: 1px;
  background: radial-gradient(circle 2.5px at 2.5px 2.5px, #e24b4a 98%, transparent) 0 0 / 7px 5px no-repeat,
              radial-gradient(circle 2.5px at 2.5px 2.5px, #378add 98%, transparent) 7px 0 / 7px 5px no-repeat,
              radial-gradient(circle 2.5px at 2.5px 2.5px, #639922 98%, transparent) 14px 0 / 7px 5px no-repeat,
              radial-gradient(circle 2.5px at 2.5px 2.5px, #ef9f27 98%, transparent) 21px 0 / 7px 5px no-repeat; }
.nav-item.active { box-shadow: inset 3px 0 0 #0f766e; }
.mobile-nav .nav-item.active { box-shadow: none; }
.banner { background: var(--surface-3); border: 1px solid var(--border); }

/* ---------- student panel in a lead's details ---------- */
.student-box { padding: 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border); margin-bottom: 6px; }
.student-box .section-title { margin-top: 12px; }
.prefs-line { font-size: 12.5px; margin-top: 6px; color: var(--text-2); }
.prefs-line.no-calls { color: var(--danger); font-weight: 600; }
.doc-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.doc-row:first-of-type { border-top: 0; }
.doc-row .grow { flex: 1; min-width: 0; }
.doc-row .grow b { display: block; }
.doc-row a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.doc-pill.warn { background: var(--warn-soft); color: var(--warn); }
.doc-pill.good { background: var(--good-soft); color: var(--good); }
.doc-pill.bad { background: var(--danger-soft); color: var(--danger); }
.doc-actions { display: inline-flex; gap: 4px; }
.msg .guest-tag { font-weight: 700; }
.edit-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
.edit-row:first-child { border-top: 0; }
.edit-row > :not(button) { grid-column: 1; margin: 0; }
.edit-row > button { grid-column: 2; grid-row: 1; align-self: start; }
