/* MediaOsity — operations console for WhatsApp Cloud API
   Palette: indigo ink + cool paper. Indigo carries actions; leaf green means "open / delivered". */
:root {
  --ink: #1a2033;
  --ink-2: #4a5268;
  --ink-3: #7d8499;
  --paper: #f4f5f9;
  --surface: #ffffff;
  --line: #e3e6ee;
  --line-2: #eef0f5;
  --indigo: #3446c4;
  --indigo-2: #2a399f;
  --indigo-soft: #e8ebfb;
  --leaf: #23855c;
  --leaf-soft: #e3f3ea;
  --amber: #a8640c;
  --amber-soft: #fbf0dc;
  --rust: #b8401c;
  --rust-soft: #fbe7df;
  --side: #121731;
  --side-2: #20274a;
  --side-text: #a9b0cc;
  --bubble-out: #e4e8ff;
  --bubble-in: #ffffff;
  --chat-bg: #eef0f6;
  --radius: 14px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(22, 27, 44, .05), 0 8px 24px -6px rgba(22, 27, 44, .10);
  --shadow-sm: 0 1px 2px rgba(22, 27, 44, .04), 0 2px 6px -2px rgba(22, 27, 44, .05);
  --font: "Inter var", Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  color-scheme: light;
}
@font-face { font-family: "Inter var"; src: url("/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01', 'ss03'; letter-spacing: -.003em; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 212px 1fr; height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: #fff; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--indigo); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.brand b { display: block; font-size: 15px; letter-spacing: .01em; }
.brand span { display: block; font-size: 11.5px; color: var(--side-text); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px; color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--indigo); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--side-2); font-size: 12.5px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot button { background: none; border: 0; color: var(--side-text); padding: 0; cursor: pointer; text-decoration: underline; }
.conn { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.ok { background: #3fbf84; }
.dot.warn { background: #e2a33a; }
.dot.bad { background: #e0603a; }
main { overflow: auto; min-width: 0; }
.page { padding: 26px 30px 60px; max-width: 1240px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: #c9cee0; background: #fafbfd; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn.primary:hover { background: var(--indigo-2); }
.btn.danger { color: var(--rust); }
.btn.danger.solid { background: var(--rust); color: #fff; border-color: var(--rust); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border: 2px solid currentColor; border-color: var(--ink-3) transparent var(--ink-3) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.primary.loading::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 7px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

input[type=text], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=datetime-local], input[type=time], input[type=search], select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; background: #fff; outline: none;
}
textarea { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
input:disabled, textarea:disabled, select:disabled { background: var(--line-2); color: var(--ink-3); }
label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field small, .help { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; margin-bottom: 10px; }
.check input { margin-top: 3px; accent-color: var(--indigo); width: 16px; height: 16px; flex: none; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--indigo); }
.radio-card b { display: block; font-weight: 600; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cdd2df; border-radius: 22px; transition: background .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--leaf); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .grow { flex: 1; }
.card-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cols-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.cols > *, .cols-3-2 > * { min-width: 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.indigo { background: var(--indigo-soft); color: var(--indigo-2); }
.badge.green { background: var(--leaf-soft); color: var(--leaf); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--rust-soft); color: var(--rust); }
.badge.count { background: var(--indigo); color: #fff; height: 19px; min-width: 19px; justify-content: center; padding: 0 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; background: #eef0f6; color: var(--ink-2); border: 1px solid #e3e6ef; }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink-3); font-size: 14px; line-height: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; background: var(--indigo-soft); color: var(--indigo-2); margin-bottom: 14px; }
.notice.warn { background: var(--amber-soft); color: #7a4706; }
.notice.bad { background: var(--rust-soft); color: #8a2c10; }
.notice.good { background: var(--leaf-soft); color: #175c3f; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice p { margin: 0; }

/* tables */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f8f9fc; }
td.check-cell, th.check-cell { width: 36px; padding-right: 0; }
td input[type=checkbox], th input[type=checkbox] { accent-color: var(--indigo); width: 15px; height: 15px; }
.empty { padding: 50px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 2px; color: var(--ink-3); font-size: 13px; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.bulkbar .btn { background: transparent; color: #fff; border-color: #4a5268; height: 28px; font-size: 13px; }
.bulkbar .btn:hover { background: #2b3249; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--ink-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--indigo); border-bottom-color: var(--indigo); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--ink-3); font-size: 12.5px; }
.stat .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; position: relative; height: 100%; border-bottom: 1px solid var(--line); }
.bars .b i { display: block; border-radius: 3px 3px 0 0; min-height: 1px; }
.bars .b i.out { background: var(--indigo); }
.bars .b i.in { background: #9fd8bd; }
.bars .b span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }
.progress i.sent { background: #9aa6e8; }
.progress i.read { background: var(--indigo); }
.progress i.failed { background: var(--rust); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.checklist .done .tick { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.checklist .tick svg { width: 13px; height: 13px; }
.checklist b { display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 330px 1fr; height: 100vh; }
.inbox.with-details { grid-template-columns: 330px 1fr 300px; }
.convs { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.convs-head { padding: 16px 14px 10px; border-bottom: 1px solid var(--line); }
.convs-head h1 { font-size: 18px; margin-bottom: 10px; }
.convs-head .seg { margin-top: 10px; display: flex; flex-wrap: wrap; }
.conv-list { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; position: relative; }
.conv:hover { background: #f8f9fc; }
.conv.active { background: var(--indigo-soft); }
.conv .meta { flex: 1; min-width: 0; }
.conv .top { display: flex; align-items: baseline; gap: 6px; }
.conv .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.conv .time { font-size: 11.5px; color: var(--ink-3); flex: none; }
.conv .prev { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.conv .prev span { overflow: hidden; text-overflow: ellipsis; }
.conv.unread .name, .conv.unread .prev { color: var(--ink); }
.conv.unread .prev { font-weight: 550; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px; flex: none; color: #fff; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 61px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .who span { font-size: 12.5px; color: var(--ink-3); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 6%; display: flex; flex-direction: column; gap: 3px; }
.day-sep { align-self: center; font-size: 11.5px; color: var(--ink-2); background: #dfe2ea; padding: 3px 10px; border-radius: 10px; margin: 12px 0 8px; }
.msg { max-width: min(560px, 78%); align-self: flex-start; position: relative; margin-top: 4px; }
.msg.out { align-self: flex-end; }
.bubble { background: var(--bubble-in); border-radius: 10px; padding: 7px 10px 6px; box-shadow: 0 1px 1px rgba(22, 27, 44, .07); overflow-wrap: anywhere; }
.txt { white-space: pre-wrap; }
.msg.out .bubble { background: var(--bubble-out); }
.msg.in .bubble { border-top-left-radius: 3px; }
.msg.out .bubble { border-top-right-radius: 3px; }
.msg .foot { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
.msg .foot .by { margin-right: auto; padding-right: 10px; }
.ticks { display: inline-flex; }
.ticks svg { width: 16px; height: 12px; }
.ticks.read { color: var(--indigo); }
.ticks.failed { color: var(--rust); }
.msg .err { font-size: 12px; color: var(--rust); margin-top: 3px; white-space: normal; }
.msg .reply-btn { position: absolute; top: 2px; right: -34px; opacity: 0; }
.msg.out .reply-btn { right: auto; left: -34px; }
.msg:hover .reply-btn { opacity: 1; }
.quote { border-left: 3px solid var(--indigo); background: rgba(52, 70, 196, .06); padding: 4px 8px; border-radius: 4px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; white-space: normal; max-height: 60px; overflow: hidden; }
.tpl-head { font-weight: 650; margin-bottom: 4px; }
.tpl-foot { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.tpl-btns { display: flex; flex-direction: column; gap: 1px; margin-top: 7px; border-top: 1px solid rgba(0,0,0,.07); }
.tpl-btns span { text-align: center; color: var(--indigo); font-weight: 550; font-size: 13px; padding: 6px 0 2px; }
.tpl-label { font-size: 11px; color: var(--ink-3); display: flex; gap: 5px; align-items: center; margin-bottom: 3px; white-space: normal; }
.media-img { display: block; max-width: 100%; max-height: 320px; border-radius: 7px; margin-bottom: 4px; background: #dfe2ea; min-width: 120px; min-height: 80px; }
.media-ph { display: grid; place-items: center; height: 120px; background: #dfe2ea; border-radius: 7px; color: var(--ink-3); font-size: 12.5px; margin-bottom: 4px; white-space: normal; text-align: center; padding: 8px; }
.doc { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; background: rgba(0,0,0,.04); margin-bottom: 4px; color: var(--ink); white-space: normal; }
.doc svg { width: 24px; height: 24px; color: var(--indigo); flex: none; }
.msg audio { width: 260px; max-width: 100%; display: block; margin-bottom: 4px; }
.msg video { max-width: 100%; max-height: 320px; border-radius: 7px; display: block; margin-bottom: 4px; }
.reaction-line { align-self: center; font-size: 12px; color: var(--ink-2); background: #e4e7ef; padding: 3px 10px; border-radius: 10px; margin: 4px 0; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-chip { font-size: 11.5px; background: var(--amber-soft); color: var(--amber); border-radius: 5px; padding: 4px 7px; margin-bottom: 5px; white-space: normal; }
.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; position: relative; }
.composer-row { display: flex; gap: 6px; align-items: flex-end; }
.composer textarea { min-height: 40px; max-height: 180px; height: 40px; resize: none; padding: 9px 12px; }
.composer .send { height: 40px; }
.replying { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.replying .quote { flex: 1; margin: 0; }
.window-closed { display: flex; align-items: center; gap: 12px; padding: 4px 2px; flex-wrap: wrap; }
.window-closed p { flex: 1; margin: 0; color: var(--ink-2); min-width: 200px; }
.canned-pop { position: absolute; bottom: 100%; left: 14px; right: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; margin-bottom: 6px; }
.canned-pop div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.canned-pop div.sel, .canned-pop div:hover { background: var(--indigo-soft); }
.canned-pop b { font-family: var(--mono); font-size: 12.5px; margin-right: 8px; }
.canned-pop span { color: var(--ink-3); font-size: 13px; }
.no-chat { flex: 1; display: grid; place-items: center; text-align: center; color: var(--ink-3); padding: 30px; }
.no-chat svg { width: 46px; height: 46px; color: #b9bfd3; margin-bottom: 10px; }
.window-pill { font-size: 12px; }
.details { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 18px 16px; }
.details h3 { margin: 18px 0 8px; font-size: 13px; color: var(--ink-2); }
.details .name-edit { font-size: 16px; font-weight: 650; border: 1px solid transparent; padding: 3px 6px; margin-left: -7px; width: calc(100% + 7px); height: auto; }
.details .name-edit:hover { border-color: var(--line); }
.tag-input { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; min-height: 36px; align-items: center; }
.tag-input input { border: 0 !important; box-shadow: none !important; height: 24px; padding: 0 4px; flex: 1; min-width: 80px; }

/* ---------- WhatsApp-style preview ---------- */
.phone-preview { background: var(--chat-bg); border-radius: var(--radius); padding: 18px 14px; min-height: 140px; }
.phone-preview .bubble { max-width: 330px; }
.phone-preview .media-ph { height: 140px; }
.tpl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.tpl-card .h { padding: 12px 14px; display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--line-2); }
.tpl-card .h .t { flex: 1; min-width: 0; }
.tpl-card .h b { display: block; overflow-wrap: anywhere; }
.tpl-card .phone-preview { border-radius: 0; flex: 1; padding: 14px 12px; }
.tpl-card .f { padding: 9px 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line-2); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.slot-row { display: grid; grid-template-columns: 140px 190px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.slot-row .lbl { font-weight: 600; font-size: 13px; }
.slot-row .lbl small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-editor { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; display: grid; gap: 8px; grid-template-columns: 120px 1fr 1fr auto; align-items: center; }
.days { display: grid; gap: 6px; }
.day-row { display: grid; grid-template-columns: 110px 120px 20px 120px; gap: 8px; align-items: center; }
.log-body { font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; background: #f6f7fa; padding: 10px; border-radius: 6px; max-height: 260px; overflow: auto; margin-top: 6px; }
.copy-field { display: flex; gap: 6px; }
.copy-field input { font-family: var(--mono); font-size: 12.5px; min-width: 0; flex: 1; }
.notice .grow { flex: 1; min-width: 0; }
pre.code { background: var(--side); color: #dfe3f2; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 12px; line-height: 1.5; margin: 8px 0 0; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(22, 27, 44, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(22, 27, 44, .3); display: flex; flex-direction: column; max-height: 88vh; }
.modal.wide { max-width: 940px; }
.modal.mid { max-width: 680px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 12px 12px; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: 420px; }
.toast { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13.5px; animation: pop .18s ease-out; }
.toast.bad { background: #8a2c10; }
.toast.good { background: #175c3f; }
.toast small { display: block; opacity: .85; margin-top: 3px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--side); }
.login-card { background: #fff; border-radius: 14px; padding: 30px 30px 24px; width: 100%; max-width: 380px; }
.login-card .brand { color: var(--ink); padding: 0 0 18px; }
.login-card .brand span { color: var(--ink-3); max-width: none; }
.login-card h1 { font-size: 19px; margin-bottom: 4px; }
.login-card p { color: var(--ink-2); margin-bottom: 18px; }
.login-card .btn { width: 100%; justify-content: center; height: 40px; }
.form-error { color: var(--rust); font-size: 13px; margin-bottom: 10px; min-height: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .inbox, .inbox.with-details { grid-template-columns: 300px 1fr; }
  .inbox .details { display: none; }
  .inbox.details-open .details { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 100vw); z-index: 30; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
}
@media (min-width: 1181px) { .details-close { display: none !important; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { flex-direction: row; align-items: center; padding: 8px 10px; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; }
  .brand > div { display: none; }
  .nav { display: flex; }
  .nav a { padding: 8px; }
  .nav a .lbl, .side-foot { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .inbox, .inbox.with-details { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 50px); }
  .convs, .chat { min-width: 0; }
  .chat-head { gap: 8px; padding: 8px 10px; }
  .chat-head .hide-sm, .chat-head .avatar { display: none; }
  .msgs { padding: 12px 10px; }
  .msg { max-width: 88%; }
  .inbox .convs { display: none; }
  .inbox.list-mode .convs { display: flex; }
  .inbox.list-mode .chat { display: none; }
  .cols, .cols-3-2, .grid2, .grid3 { grid-template-columns: 1fr; }
  .card-head { flex-wrap: wrap; }
  .notice:has(> .btn) { flex-wrap: wrap; }
  .copy-field .btn { padding-left: 10px; padding-right: 10px; }
  .page { padding: 18px 16px 50px; }
  .slot-row { grid-template-columns: 1fr; }
  .btn-editor { grid-template-columns: 1fr; }
  .msg .reply-btn { display: none; }
}
@media (min-width: 901px) { .back-to-list { display: none !important; } }

.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.pick-row .grow { flex: 1; min-width: 200px; }

.demo-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #b8401c; color: #fff; font-weight: 600; font-size: 13px; text-align: center; padding: 6px 12px; }
body:has(.demo-banner) .app { height: calc(100vh - 30px); margin-top: 30px; }

/* ---------- voice notes ---------- */
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--indigo); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.rec-box { text-align: center; padding: 10px 0 4px; }
.rec-btn { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--indigo); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(52,70,196,.3); }
.rec-btn svg { width: 34px; height: 34px; }
.rec-btn.on { background: var(--rust); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(184,64,28,.45); } 50% { box-shadow: 0 0 0 14px rgba(184,64,28,0); } }
.rec-time { font: 600 28px/1 var(--mono); margin: 14px 0 6px; }
.voice-preview { display: flex; align-items: center; gap: 10px; background: var(--line-2); border-radius: 28px; padding: 6px 12px 6px 14px; }
.voice-preview svg { width: 20px; height: 20px; color: var(--leaf); flex: none; }
.voice-preview audio { flex: 1; min-width: 0; height: 40px; }
.voice-card { padding: 14px 16px; }
.vc-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); display: flex; align-items: center; justify-content: center; flex: none; }
.vc-icon svg { width: 18px; height: 18px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 12px; padding: 18px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: inherit; font: inherit; }
.choice:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.choice svg { width: 26px; height: 26px; color: var(--indigo); }
.choice span { font-size: 12.5px; color: var(--ink-2); }
.voice-bubble { display: flex; align-items: center; gap: 8px; min-width: 240px; }
.voice-bubble .vb-mic { width: 32px; height: 32px; border-radius: 50%; background: var(--leaf); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.voice-bubble .vb-mic svg { width: 16px; height: 16px; }
.voice-bubble audio { flex: 1; min-width: 0; height: 36px; }
.ticks.played { display: inline-flex; align-items: center; gap: 2px; }
.played-mic svg { width: 11px; height: 11px; }
.voice-pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.voice-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.voice-pick:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); }
.voice-pick audio { height: 32px; width: 200px; max-width: 45%; }
.tap-flow { border: 1px dashed var(--indigo); border-radius: 12px; padding: 14px; background: var(--indigo-soft); }
@media (max-width: 900px) { .choice-grid { grid-template-columns: 1fr; } .voice-pick audio { display: none; } }
.bubble-prev { background: #fff; border-radius: 10px; padding: 8px 10px; max-width: 330px; box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: 14px; margin-top: 8px; }
.tap-flow + .bubble-prev, .bubble-prev:first-child { margin-top: 8px; }

.seg button { display: inline-flex; align-items: center; gap: 5px; }
.seg button svg { width: 14px; height: 14px; flex: none; }

/* ======================= Overview (dashboard) ======================= */
.dash { --violet: #6b4fd8; --violet-soft: #efeafd; max-width: 1280px; }
.dash-skel { height: 180px; border-radius: 16px; background: linear-gradient(90deg, #e8eaf1 0%, #f3f4f8 50%, #e8eaf1 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* hero */
.hero { position: relative; overflow: hidden; display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 18px; border-radius: 16px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #5566e6 0%, rgba(85,102,230,0) 55%), radial-gradient(90% 120% at 0% 100%, #2a2f6b 0%, rgba(42,47,107,0) 60%), linear-gradient(135deg, #1a1f3d 0%, #283396 100%);
  box-shadow: 0 10px 30px -12px rgba(40, 51, 150, .55); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); pointer-events: none; }
.hero-main { flex: 1 1 360px; min-width: 0; position: relative; z-index: 1; }
.hero-hi { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 4px; }
.hero h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); font-size: 12.5px; font-weight: 550; color: rgba(255,255,255,.92); white-space: nowrap; backdrop-filter: blur(4px); }
.chip .dot { width: 7px; height: 7px; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.chip .dot.ok { background: #4ade9b; box-shadow: 0 0 0 3px rgba(74,222,155,.18); }
.hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; align-items: stretch; min-width: 280px; }
.hero-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.btn.glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); }
.btn.white { background: #fff; border-color: #fff; color: #1f2a85; box-shadow: 0 4px 14px -4px rgba(0,0,0,.35); }
.btn.white:hover { background: #eef0ff; }
.meter { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; }
.meter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: rgba(255,255,255,.75); }
.meter-row > span { display: inline-flex; align-items: center; gap: 6px; }
.meter-row svg { width: 14px; height: 14px; }
.meter-row b { font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.meter-row b span { color: rgba(255,255,255,.55); font-weight: 500; }
.meter-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); margin-top: 8px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7dd3a8, #4ade9b); min-width: 4px; transition: width .6s ease; }
.meter-bar i.hi { background: linear-gradient(90deg, #f6b44b, #ef6b3a); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { --tone: var(--indigo); --tone-soft: var(--indigo-soft); position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 13px; color: var(--ink); box-shadow: 0 1px 2px rgba(22,27,44,.04); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; overflow: hidden; }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px -10px rgba(22,27,44,.22); border-color: #d5d9e6; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--tone); opacity: .85; }
.kpi.leaf { --tone: var(--leaf); --tone-soft: var(--leaf-soft); }
.kpi.amber { --tone: #d48a1a; --tone-soft: var(--amber-soft); }
.kpi.violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.kpi.slate { --tone: #98a0b5; --tone-soft: var(--line-2); }
.kpi.hot { background: linear-gradient(180deg, #fffaf0 0%, #fff 70%); border-color: #f1dcb4; }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 34px; }
.kpi-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding-top: 2px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); flex: none; }
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 16px; font-weight: 600; color: var(--ink-3); margin-left: 1px; }
.kpi-s { font-size: 12px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-s .pos { color: var(--leaf); font-weight: 600; }
.kpi-s .neg { color: var(--rust); font-weight: 600; }
.ring { width: 36px; height: 36px; flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .trk { stroke: var(--line-2); }
.ring .val { stroke: var(--tone); stroke-linecap: round; transition: stroke-dasharray .8s ease; }

/* cards */
.dcard { border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(22,27,44,.04); }
.dcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.dcard-head .grow { flex: 1; min-width: 0; }
.dcard-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 12.5px; }
.dcard-head p b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dc-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.dc-ic svg { width: 16px; height: 16px; }
.dc-ic.indigo, .b-ic.indigo { background: var(--indigo-soft); color: var(--indigo); }
.dc-ic.violet, .b-ic.violet { background: var(--violet-soft); color: var(--violet); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 0; }
.dash-side { display: flex; flex-direction: column; min-width: 0; }
.dash-side > .dcard:last-child, .chart-card { margin-bottom: 16px; }

/* chart */
.lg-out, .lg-in { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.lg-out { background: linear-gradient(180deg, #5b6cf0, #3446c4); }
.lg-in { background: #7fd1ab; }
.chart-card { display: flex; flex-direction: column; }
.chart { position: relative; flex: 1; min-height: 210px; height: auto; margin: 6px 0 26px 30px; }
.gridl { position: absolute; inset: 0; pointer-events: none; }
.gridl div { position: absolute; left: 0; right: 0; border-top: 1px dashed #e4e7ef; }
.gridl div:last-child { border-top: 1px solid var(--line); }
.gridl span { position: absolute; left: -30px; top: -7px; width: 24px; text-align: right; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ccols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 8px; }
.col { flex: 1; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.col::before { content: ""; position: absolute; inset: 0 -4px; border-radius: 8px; background: transparent; transition: background .15s; }
.col:hover::before { background: rgba(52,70,196,.05); }
.stack { position: relative; width: 100%; max-width: 30px; display: flex; flex-direction: column; border-radius: 6px 6px 2px 2px; overflow: hidden; min-height: 0; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.stack i { display: block; min-height: 2px; }
.stack i.out { background: linear-gradient(180deg, #5b6cf0, #3446c4); }
.stack i.in { background: #7fd1ab; border-top: 2px solid #fff; }
.stack i.in:first-child { border-top: 0; }
.xl { position: absolute; bottom: -22px; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.col.today .xl { color: var(--indigo); font-weight: 700; }
.col:nth-child(even) .xl { opacity: .9; }
.tip { position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translate(-50%, 4px); background: var(--side); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 5; box-shadow: 0 8px 20px -6px rgba(0,0,0,.35); }
.tip b { font-size: 11.5px; color: rgba(255,255,255,.7); font-weight: 600; }
.col:hover .tip { opacity: 1; transform: translate(-50%, 0); }
.col:first-child .tip { left: 0; transform: translate(0, 4px); }
.col:first-child:hover .tip { transform: translate(0, 0); }
.col:last-child .tip { left: auto; right: 0; transform: translate(0, 4px); }
.col:last-child:hover .tip { transform: translate(0, 0); }

/* spend */
.spend-v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.spend-v span { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-top: 3px; }
.segbar { display: flex; gap: 3px; height: 8px; margin: 14px 0 12px; }
.segbar.sm { height: 6px; gap: 2px; margin: 0; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.segbar i { display: block; border-radius: 4px; min-width: 3px; }
.segbar.sm i { border-radius: 0; }
.segbar .indigo, .cats .indigo { background: var(--indigo); }
.segbar .indigo-l { background: #8d99ea; }
.segbar .leaf, .cats .leaf { background: #3fae7e; }
.segbar .amber, .cats .amber { background: #e2a33a; }
.segbar .violet, .cats .violet { background: var(--violet); }
.segbar .slate, .cats .slate { background: #b9bfd0; }
.segbar .rust { background: var(--rust); }
.segbar .line { background: var(--line); }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cats li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.cats li > i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cats li span { flex: 1; color: var(--ink-2); text-transform: capitalize; }
.cats li b { font-variant-numeric: tabular-nums; }

/* voice funnel */
.funnel { display: grid; gap: 10px; }
.fstep { display: grid; grid-template-columns: 1fr auto 42px; grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; align-items: center; font-size: 13px; }
.fstep .fbar { grid-column: 1 / -1; grid-row: 2; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.fstep .fbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8b74ea, var(--violet)); }
.fstep span { color: var(--ink-2); }
.fstep b { font-variant-numeric: tabular-nums; }
.fstep em { font-style: normal; font-size: 12px; color: var(--ink-3); text-align: right; }

/* broadcasts */
.blist { display: flex; flex-direction: column; margin: -4px -8px; }
.brow { display: grid; grid-template-columns: 38px minmax(0, 1.6fr) 104px minmax(140px, 1fr) 196px 18px; gap: 14px; align-items: center; padding: 11px 8px; border-radius: 10px; color: var(--ink); }
.brow + .brow { border-top: 1px solid var(--line-2); }
.brow:hover { background: #f7f8fc; text-decoration: none; }
.brow:hover + .brow { border-top-color: transparent; }
.b-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.b-ic svg { width: 18px; height: 18px; }
.b-name { min-width: 0; }
.b-name b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-name span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-prog span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.b-metrics { display: flex; gap: 14px; justify-content: flex-end; }
.b-metrics div { min-width: 52px; }
.b-metrics div { text-align: right; min-width: 44px; }
.b-metrics b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.b-metrics span { font-size: 11.5px; color: var(--ink-3); }
.b-go { color: #b9bfd0; display: grid; place-items: center; }
.b-go svg { width: 16px; height: 16px; }
.brow:hover .b-go { color: var(--indigo); }
.empty-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty-mini p { margin: 0; }

/* sidebar polish */
.nav a.active { background: linear-gradient(90deg, rgba(85,102,230,.28), rgba(85,102,230,.08)); box-shadow: inset 3px 0 0 #7d8cff; }
.brand-mark { background: linear-gradient(135deg, #5566e6, #3446c4); box-shadow: 0 4px 12px -4px rgba(85,102,230,.7); }

@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1050px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .brow { grid-template-columns: 38px minmax(0, 1fr) auto 18px; }
  .chart { flex: none; height: 210px; }
  .dash-grid { gap: 0; }
  .brow .b-prog, .brow .b-status { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 23px; }
  .hero-side { min-width: 0; width: 100%; }
  .hero-actions { justify-content: stretch; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-v { font-size: 24px; }
  .ccols { gap: 3px; }
  .col:nth-child(odd):not(.today) .xl { display: none; }
  .brow { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; }
  .brow .b-go { display: none; }
  .b-metrics div:nth-child(n+2) { display: none; }
}

/* ======================= Design v2 — global polish ======================= */
::selection { background: #d9defc; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.page { padding: 28px 34px 64px; max-width: 1280px; }
.page-head { margin-bottom: 22px; gap: 10px; }
.page-head p { color: var(--ink-3); font-size: 13.5px; max-width: 720px; }
main { background: var(--paper); }
main::-webkit-scrollbar, .conv-list::-webkit-scrollbar, .msgs::-webkit-scrollbar, .details::-webkit-scrollbar { width: 10px; }
main::-webkit-scrollbar-thumb, .conv-list::-webkit-scrollbar-thumb, .msgs::-webkit-scrollbar-thumb, .details::-webkit-scrollbar-thumb { background: #d3d7e3; border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* sidebar */
.app { grid-template-columns: 228px 1fr; }
.side { background: radial-gradient(120% 60% at 0% 0%, #23306f 0%, rgba(35,48,111,0) 60%), linear-gradient(180deg, #131936 0%, #0e1229 100%); padding: 16px 12px 12px; border-right: 1px solid rgba(255,255,255,.04); }
.brand { padding: 4px 8px 20px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6a79ff, #3446c4); box-shadow: 0 6px 16px -6px rgba(106,121,255,.8), inset 0 1px 0 rgba(255,255,255,.25); }
.brand b { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.brand span { font-size: 11.5px; color: #8d95b8; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6c7499; padding: 16px 12px 6px; }
.nav a { padding: 8px 12px; border-radius: 9px; color: var(--side-text); font-weight: 550; font-size: 13.5px; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(106,121,255,.26), rgba(106,121,255,.06)); color: #fff; box-shadow: inset 0 0 0 1px rgba(140,152,255,.18); }
.nav a.active svg { color: #9aa6ff; opacity: 1; }
.nav svg { width: 17px; height: 17px; opacity: .8; }
.badge.count { background: linear-gradient(135deg, #6a79ff, #3446c4); box-shadow: 0 2px 6px -2px rgba(106,121,255,.8); }
.side-foot { border-top: 0; padding: 12px 6px 2px; }
.conn { margin: 0 4px 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.04); color: #a9b0cc; font-size: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.me-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #f59e6b, #e0603a); }
.me-t { min-width: 0; font-size: 12px; line-height: 1.35; }
.me-t .who { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-t .muted { color: #8d95b8; }
.side-foot button { color: #b8bfdc; text-decoration: none; font-weight: 600; }
.side-foot button:hover { color: #fff; }

/* buttons */
.btn { height: 36px; border-radius: 9px; border-color: #dfe2eb; box-shadow: 0 1px 2px rgba(22,27,44,.05); font-weight: 600; font-size: 13.5px; transition: background .12s, border-color .12s, box-shadow .12s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #4a5be0 0%, #3446c4 100%); border-color: #3141b8; box-shadow: 0 1px 2px rgba(22,27,44,.12), 0 4px 12px -4px rgba(52,70,196,.55), inset 0 1px 0 rgba(255,255,255,.16); }
.btn.primary:hover { background: linear-gradient(180deg, #4152d4 0%, #2c3cb0 100%); }
.btn.sm { height: 30px; border-radius: 8px; font-size: 12.5px; }
.btn.ghost { box-shadow: none; }
.btn.danger.solid { box-shadow: 0 4px 12px -4px rgba(184,64,28,.5); }
.icon-btn { border-radius: 9px; }

/* inputs */
input[type=text], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=datetime-local], input[type=time], input[type=search], select, textarea {
  height: 38px; border-radius: 9px; border-color: #dde0ea; background: #fff; transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; }
input:hover:not(:focus):not(:disabled), select:hover:not(:focus):not(:disabled), textarea:hover:not(:focus):not(:disabled) { border-color: #c9cee0; }
input:focus, select:focus, textarea:focus { border-color: #6a79ff; box-shadow: 0 0 0 4px rgba(106,121,255,.16); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8499' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
input[type=search] { padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%239aa1b5' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
label.field > span, .field-label { font-size: 12.5px; color: var(--ink-2); }
.radio-card { border-radius: 11px; padding: 12px 14px; transition: border-color .12s, background .12s; }
.radio-card:hover { border-color: #c9cee0; }
.radio-card:has(input:checked) { border-color: #6a79ff; background: #f3f5ff; box-shadow: 0 0 0 3px rgba(106,121,255,.12); }

/* surfaces */
.card { border-radius: 16px; border-color: #e6e8f0; box-shadow: var(--shadow-sm); padding: 20px 22px; }
.card-head h2 { font-size: 15.5px; }
.notice { border-radius: 11px; border: 1px solid rgba(52,70,196,.12); }
.notice.warn { border-color: rgba(168,100,12,.18); }
.notice.bad { border-color: rgba(184,64,28,.18); }
.notice.good { border-color: rgba(35,133,92,.18); }
.badge { height: 22px; padding: 0 9px; font-weight: 600; font-size: 11.5px; letter-spacing: .01em; }
.badge.green::before, .badge.amber::before, .badge.red::before, .badge.indigo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.indigo.running::before, .badge.indigo::before { animation: none; }
.tag { border-radius: 7px; background: #f1f2f8; border-color: #e5e7f0; font-weight: 550; }

/* tables */
.table-wrap { border-radius: 16px; border-color: #e6e8f0; box-shadow: var(--shadow-sm); }
th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a91a6; padding: 12px 16px; background: #fafbfd; border-bottom-color: #eceef4; }
td { padding: 12px 16px; border-bottom-color: #f0f1f6; }
tr.click:hover td { background: #f7f8fd; }
.empty { padding: 56px 20px; }
.empty b { font-size: 16px; }
.toolbar { gap: 10px; margin-bottom: 14px; }
.bulkbar { border-radius: 12px; background: linear-gradient(90deg, #1a2045, #283396); box-shadow: var(--shadow); }

/* tabs & segmented */
.tabs { display: inline-flex; max-width: 100%; gap: 3px; border: 1px solid #e3e6ee; border-bottom: 1px solid #e3e6ee; background: #fff; padding: 4px; border-radius: 12px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.tabs button { border: 0; margin: 0; padding: 7px 14px; border-radius: 8px; font-size: 13px; color: var(--ink-2); transition: background .12s, color .12s; }
.tabs button:hover { background: var(--line-2); color: var(--ink); }
.tabs button.active { background: var(--indigo-soft); color: var(--indigo-2); border: 0; }
.seg { border-radius: 10px; padding: 3px; background: #eceef5; }
.seg button { border-radius: 7px; padding: 5px 11px; transition: background .12s, color .12s; }
.seg button.active { box-shadow: 0 1px 2px rgba(22,27,44,.1), 0 1px 1px rgba(22,27,44,.04); color: var(--indigo-2); }

/* stats (broadcast detail etc.) */
.stats { gap: 12px; }
.stat { border-radius: 14px; border-color: #e6e8f0; box-shadow: var(--shadow-sm); padding: 15px 16px; position: relative; overflow: hidden; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.stat .l { font-weight: 600; color: var(--ink-2); }
.stat .s { color: var(--ink-3); }
.progress { height: 8px; border-radius: 4px; }
.progress i.sent { background: #a9b3ef; }
.progress i.read { background: linear-gradient(90deg, #5b6cf0, #3446c4); }

/* inbox */
.convs { background: #fff; }
.convs-head { padding: 18px 16px 12px; border-bottom-color: #eef0f5; }
.convs-head h1 { font-size: 20px; }
.conv { margin: 2px 8px; padding: 10px 10px; border-radius: 12px; border-bottom: 0; transition: background .1s; }
.conv:hover { background: #f5f6fb; }
.conv.active { background: linear-gradient(90deg, #eef0ff, #f5f6ff); box-shadow: inset 3px 0 0 #5b6cf0; }
.conv .name { font-weight: 600; }
.conv .time { font-size: 11px; }
.avatar { box-shadow: 0 0 0 2px #fff, 0 2px 6px -2px rgba(22,27,44,.25); }
.chat { background-color: #eef0f6; background-image: radial-gradient(rgba(52,70,196,.06) 1px, transparent 1px); background-size: 18px 18px; }
.chat-head { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom-color: #eaecf3; min-height: 64px; }
.day-sep { background: rgba(255,255,255,.85); color: var(--ink-2); font-weight: 600; box-shadow: 0 1px 2px rgba(22,27,44,.06); }
.bubble { border-radius: 14px; padding: 8px 11px 6px; box-shadow: 0 1px 1.5px rgba(22,27,44,.08); }
.msg.in .bubble { border-top-left-radius: 4px; }
.msg.out .bubble { border-top-right-radius: 4px; background: linear-gradient(180deg, #e9ecff, #e1e6ff); }
.composer { background: #fff; border-top-color: #eaecf3; padding: 12px 16px; }
.composer textarea { border-radius: 20px; padding: 9px 16px; background: #f6f7fb; border-color: #e6e8f0; }
.composer textarea:focus { background: #fff; }
.composer .send { border-radius: 50%; width: 40px; padding: 0; justify-content: center; }
.details { background: #fff; border-left-color: #eaecf3; }
.details h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #8a91a6; }
.window-pill { font-weight: 600; }
.canned-pop { border-radius: 12px; }

/* templates / previews */
.phone-preview { background-color: #efe7dd; background-image: radial-gradient(rgba(120,90,60,.07) 1px, transparent 1px); background-size: 16px 16px; border-radius: 12px; }
.phone-preview .bubble, .bubble-prev { border-radius: 12px; border-top-left-radius: 4px; box-shadow: 0 1px 1.5px rgba(0,0,0,.1); }
.tpl-card { border-radius: 16px; border-color: #e6e8f0; box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.tpl-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tpl-card .h { padding: 14px 16px; }
.tpl-card .phone-preview { border-radius: 0; }
.tpl-btns span { color: #027eb5; }
.tpl-grid { gap: 16px; }

/* voice */
.voice-card { border-radius: 16px; }
.vc-icon { background: linear-gradient(135deg, #e7f6ee, #d3efe0); }
.rec-btn { background: linear-gradient(135deg, #6a79ff, #3446c4); }
.voice-preview { background: #f1f3f8; }
.choice { border-radius: 14px; transition: border-color .12s, background .12s, transform .12s; }
.choice:hover { transform: translateY(-2px); }
.tap-flow { border-radius: 14px; background: linear-gradient(180deg, #f3f5ff, #eef1ff); border-color: #aab4f5; }

/* modal & toast */
.overlay { background: rgba(14, 18, 41, .45); backdrop-filter: blur(3px); }
.modal { border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(14,18,41,.45); animation: pop .18s ease-out; }
.modal-head { padding: 18px 22px; border-bottom-color: #eef0f5; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 14px 22px; border-top-color: #eef0f5; border-radius: 0 0 18px 18px; }
.toast { border-radius: 12px; padding: 12px 16px; box-shadow: 0 12px 30px -10px rgba(14,18,41,.5); }

/* login */
.login { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; gap: 0; place-items: stretch; background: #f4f5f9; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: #fff;
  background: radial-gradient(80% 60% at 100% 0%, #5566e6 0%, rgba(85,102,230,0) 60%), radial-gradient(70% 60% at 0% 100%, #2c3175 0%, rgba(44,49,117,0) 60%), linear-gradient(140deg, #121731 0%, #263092 100%); }
.login-art::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 130px rgba(255,255,255,.02); }
.la-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; position: relative; z-index: 1; }
.la-copy { position: relative; z-index: 1; max-width: 460px; }
.la-copy h2 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; margin-bottom: 14px; color: #fff; }
.la-copy p { color: rgba(255,255,255,.72); font-size: 15px; }
.la-chat { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.la-b { padding: 10px 14px; border-radius: 16px; font-size: 13.5px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); max-width: 85%; }
.la-b.in { background: #fff; color: var(--ink); border-top-left-radius: 4px; align-self: flex-start; }
.la-b.out { background: #e1e6ff; color: var(--ink); border-top-right-radius: 4px; align-self: flex-end; }
.la-b.out span { color: #4a5be0; font-size: 11px; margin-left: 8px; font-weight: 700; }
.la-b.voice { background: #e1e6ff; align-self: flex-end; display: flex; align-items: center; gap: 10px; width: 230px; border-top-right-radius: 4px; color: var(--ink-2); font-size: 11.5px; }
.la-b.voice i { width: 30px; height: 30px; border-radius: 50%; background: #3446c4; flex: none; position: relative; }
.la-b.voice i::after { content: ""; position: absolute; left: 11px; top: 9px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.la-b.voice em { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, #7d8cff 0 2px, transparent 2px 5px); -webkit-mask: linear-gradient(180deg, transparent 0 20%, #000 20% 80%, transparent 80%); opacity: .9; }
.login-card { align-self: center; justify-self: center; max-width: 400px; padding: 40px 36px 30px; border-radius: 20px; box-shadow: var(--shadow); margin: 32px; border: 1px solid #e6e8f0; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card .btn { height: 42px; margin-top: 4px; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; place-items: center; }
  .login-art { display: none; }
  .login-card { margin: 20px; padding: 30px 24px 24px; }
  .nav-group, .side-foot { display: none; }
  .side { flex-direction: row; background: linear-gradient(90deg, #131936, #1d2558); }
  .nav { flex-direction: row; }
  .conv { margin: 2px 6px; }
  .tabs { display: flex; }
}
.la-b.voice .wave { flex: 1; height: 18px; fill: #6a79ff; }
.inbox { height: 100%; }
.convs-head .seg { display: flex; flex-wrap: nowrap; width: 100%; }
.convs-head .seg button { flex: 1 1 auto; justify-content: center; padding: 5px 4px; font-size: 12px; white-space: nowrap; }
.tag-input { border-radius: 9px; border-color: #dde0ea; padding: 4px 6px; min-height: 38px; }
.tag-input input[type=text] { height: 26px; border: 0 !important; box-shadow: none !important; background: transparent; }
.tag-input:focus-within { border-color: #6a79ff; box-shadow: 0 0 0 4px rgba(106,121,255,.16); }
.details .name-edit { color: var(--ink); height: auto; }
.stats { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { padding: 8px 10px; border-right: 0; }
  .brand { padding: 0 6px 0 0; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; }
  .page { padding: 18px 16px 50px; }
  .inbox, .inbox.with-details { height: calc(100vh - 54px); }
  body:has(.demo-banner) .inbox { height: calc(100vh - 84px); }
}
@media (max-width: 900px) {
  .demo-banner { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .page-head .grow { flex-basis: 100%; }
}

/* ======================= Countries ======================= */
.geo { --violet: #6b4fd8; --violet-soft: #efeafd; }
.geo-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.gk { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid #e6e8f0; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.gk-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.gk-ic svg { width: 18px; height: 18px; }
.gk.indigo .gk-ic { background: var(--indigo-soft); color: var(--indigo); }
.gk.leaf .gk-ic { background: var(--leaf-soft); color: var(--leaf); }
.gk.violet .gk-ic { background: var(--violet-soft); color: var(--violet); }
.gk.amber .gk-ic { background: var(--amber-soft); color: #c27a12; }
.gk-l { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.gk-v { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gk-s { font-size: 11.5px; color: var(--ink-3); }
.geo-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.geo-grid > .card { margin-bottom: 16px; }
.map-card { display: flex; flex-direction: column; }
.map-wrap { position: relative; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, #f7f8fd 0%, #eef0f8 100%); border: 1px solid #edeff6; flex: 1; display: flex; align-items: center; }
#map { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; cursor: default; }
#map path { fill: #dde1ec; stroke: #fff; stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .2s, opacity .25s; }
#map path.has { cursor: pointer; }
#map path.hover { fill: #ffb547 !important; }
#map.focus path:not(.sel) { opacity: .55; }
#map path.sel { fill: #f08a24 !important; opacity: 1; stroke: #fff; stroke-width: 1.2; }
#map circle { stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
#map circle.hover, #map circle.sel { fill: #f08a24 !important; }
.map-tip { position: absolute; left: 0; top: 0; pointer-events: none; background: rgba(18, 23, 49, .94); color: #fff; border-radius: 12px; padding: 10px 12px; min-width: 170px; box-shadow: 0 14px 34px -10px rgba(0,0,0,.45); z-index: 5; backdrop-filter: blur(6px); }
.mt-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mt-h b { font-size: 13.5px; }
.mt-r { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; color: rgba(255,255,255,.7); padding: 1px 0; }
.mt-r b { color: #fff; font-variant-numeric: tabular-nums; }
.mt-r.muted { color: rgba(255,255,255,.55); }
.map-legend { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; font-size: 11.5px; color: var(--ink-3); }
.map-legend div { display: flex; }
.map-legend i { width: 26px; height: 8px; display: block; }
.map-legend i:first-child { border-radius: 4px 0 0 4px; }
.map-legend i:last-child { border-radius: 0 4px 4px 0; }

/* silhouettes (used instead of flag emoji, which Windows can't draw) */
.sil { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #eef0ff, #e2e6fb); display: grid; place-items: center; flex: none; }
.sil svg { width: 24px; height: 24px; fill: #4558d4; overflow: visible; }
.sil.none { font-size: 11px; font-weight: 700; color: #4558d4; }
.sil.sil-xs { width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,.12); }
.sil.sil-xs svg { width: 16px; height: 16px; fill: #c3cbff; }
.sil.sil-xl { width: 104px; height: 104px; border-radius: 26px; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.sil.sil-xl svg { width: 72px; height: 72px; fill: #fff; filter: drop-shadow(0 6px 16px rgba(0,0,0,.35)); }
.sil.sil-xl.none { color: #fff; font-size: 28px; }

/* ranking */
.rank-card { display: flex; flex-direction: column; min-height: 0; contain: size; }
.map-wrap { flex: none; }
.map-card .map-legend { margin-top: auto; padding-top: 12px; }
.rank-card input[type=search] { margin-bottom: 10px; }
.rank { overflow-y: auto; margin: 0 -8px; padding: 0 2px; flex: 1; }
.rk { width: 100%; display: grid; grid-template-columns: 18px 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border: 0; background: transparent; border-radius: 11px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; transition: background .12s; }
.rk:hover { background: #f5f6fb; }
.rk.active { background: linear-gradient(90deg, #fff4e8, #fffaf4); box-shadow: inset 3px 0 0 #f08a24; }
.rk.active .sil { background: linear-gradient(135deg, #ffe7cc, #ffd9b0); }
.rk.active .sil svg { fill: #e0761a; }
.rk-n { font-size: 11.5px; font-weight: 700; color: #a3a9bc; text-align: center; font-variant-numeric: tabular-nums; }
.rk-t { min-width: 0; display: block; }
.rk-t b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-t > span:not(.rk-bar) { display: block; font-size: 11.5px; color: var(--ink-3); }
.rk-bar { display: block; height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 5px; overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #8593ec, #3446c4); }
.rk.active .rk-bar i { background: linear-gradient(90deg, #ffb547, #f08a24); }
.rk-v { text-align: right; }
.rk-v b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.rk-v span { font-size: 11px; color: var(--ink-3); }

/* country detail */
.cty-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 24px 26px; margin: 4px 0 16px; border-radius: 18px; color: #fff; scroll-margin-top: 16px;
  background: radial-gradient(90% 140% at 100% 0%, #f08a24 0%, rgba(240,138,36,0) 45%), radial-gradient(90% 120% at 0% 100%, #2c3175 0%, rgba(44,49,117,0) 60%), linear-gradient(130deg, #161b3d 0%, #2a3592 100%);
  box-shadow: 0 14px 36px -16px rgba(40, 51, 150, .6); animation: pop .25s ease-out; }
.ch-main { flex: 1 1 260px; min-width: 0; }
.ch-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.cty-hero h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: #fff; margin: 4px 0 6px; }
.cty-hero p { margin: 0; color: rgba(255,255,255,.75); font-size: 13.5px; }
.cty-hero p b { color: #ffd49e; font-weight: 600; }
.ch-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; }
.ch-stats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px 14px; min-width: 96px; }
.ch-stats b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ch-stats span { font-size: 11.5px; color: rgba(255,255,255,.65); }
.cty-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.cty-grid > .card { margin-bottom: 16px; }
.trend { width: 100%; height: 170px; display: block; overflow: visible; }
.tg-grid { stroke: #e6e8f0; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.tg-base { stroke: #dfe2ea; vector-effect: non-scaling-stroke; }
.tg-out { fill: none; stroke: #3d4fd0; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tg-in { fill: none; stroke: #3fae7e; stroke-width: 2; stroke-dasharray: 4 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trend-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: -10px; }
.mix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.mix div { background: #f6f7fb; border-radius: 10px; padding: 9px 10px; text-align: center; }
.mix b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.mix span { font-size: 11.5px; color: var(--ink-3); }
.brow.cb { grid-template-columns: 38px minmax(0, 1fr) auto 18px; }
.people { display: flex; flex-direction: column; margin: -4px -8px; }
.pp { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 10px; color: var(--ink); }
.pp:hover { background: #f6f7fb; text-decoration: none; }
.pp-t { flex: 1; min-width: 0; }
.pp-t b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-t span { font-size: 12px; color: var(--ink-3); }
.sub-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #8a91a6; margin: 18px 0 8px; }
.fails { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.fails li { display: flex; gap: 9px; align-items: center; font-size: 12.5px; }
.fails li span:nth-child(2) { flex: 1; color: var(--ink-2); }
@media (max-width: 1200px) { .ch-stats { grid-template-columns: repeat(2, auto); } }
@media (max-width: 1050px) {
  .geo-grid, .cty-grid { grid-template-columns: minmax(0, 1fr); }
  .geo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-card { contain: none; }
  .rank { max-height: 380px; }
}
@media (max-width: 640px) {
  .geo-kpis { gap: 8px; }
  .gk { padding: 12px; gap: 10px; }
  .gk-ic { display: none; }
  .cty-hero { padding: 20px 18px; }
  .cty-hero h2 { font-size: 24px; }
  .sil.sil-xl { width: 72px; height: 72px; border-radius: 18px; }
  .sil.sil-xl svg { width: 50px; height: 50px; }
  .ch-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brow.cb .b-metrics div:nth-child(n+2) { display: none; }
}
.geo-grid, .cty-grid { row-gap: 0; }
.rank { -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 28px), transparent); padding-bottom: 20px; }
.cpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
.cpick-i { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.cpick-i:has(input:checked) { border-color: #6a79ff; background: #f3f5ff; }
.cpick-i input { margin-top: 3px; accent-color: var(--indigo); }
.cpick-i b { display: block; font-size: 13px; font-weight: 600; }

/* ---- Countries v2 ---- */
.geo { --rose: #d9466f; --rose-soft: #fde8ee; }
.geo-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gk { min-height: 86px; }
.gk.skel { background: linear-gradient(90deg, #eef0f6 0%, #f7f8fb 50%, #eef0f6 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border-color: transparent; box-shadow: none; }
.gk-b { min-width: 0; }
.gk-l { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gk-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk.rose .gk-ic, .dc-ic.rose { background: var(--rose-soft); color: var(--rose); }
.dc-ic.amber { background: var(--amber-soft); color: #c27a12; }
.dl { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; vertical-align: 1px; }
.dl.up { background: var(--leaf-soft); color: var(--leaf); }
.dl.down { background: var(--rust-soft); color: var(--rust); }
.dl.flat { background: var(--line-2); color: var(--ink-3); }
.dl.money { background: #f1f2f8; color: var(--ink-2); }
.cty-hero .dl { background: rgba(255,255,255,.14); color: #fff; }
.cty-hero .dl.down { background: rgba(255,120,90,.25); }
.geo-grid, #geo-detail { transition: opacity .2s ease; }
.geo-grid.loading, #geo-detail.loading { opacity: .55; pointer-events: none; }
.map-metric { margin: -4px 0 12px; max-width: 100%; overflow-x: auto; }
.map-metric button { flex: none; }
.ch-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.ch-note { margin-top: 6px !important; color: #ffd49e !important; font-size: 12.5px !important; }
.ch-clock { font-weight: 600; color: #fff; }
.cty-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
svg.spin { animation: spin .8s linear infinite; }
/* cost */
.cost-top { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; justify-content: space-between; }
.cost-v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cost-s { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.cost-rates { display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.cost-rates div { background: #f6f7fb; border-radius: 10px; padding: 8px 10px; min-width: 92px; }
.cost-rates b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.cost-rates span { font-size: 11px; color: var(--ink-3); }
.pf { margin-top: 16px; }
.pf .segbar { margin: 0 0 8px; }
.segbar .rose, .pf-l i.rose { background: var(--rose); }
.pf-l i.leaf { background: #3fae7e; }
.pf-l { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.pf-l i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.cost-cats { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.cost-cats li em { font-style: normal; font-size: 12px; color: var(--ink-3); }
/* best time */
.bt-pick { display: flex; flex-direction: column; background: linear-gradient(135deg, #fff7ea, #fff1dc); border: 1px solid #f6dfb6; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.bt-pick b { font-size: 20px; letter-spacing: -.02em; color: #9a5a06; }
.bt-pick span { font-size: 12px; color: #8a6a3a; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 92px; align-items: end; }
.hr { height: 100%; display: flex; align-items: flex-end; border-radius: 4px; }
.hr i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: #d6dbf3; transition: height .4s ease; }
.hr.win i { background: linear-gradient(180deg, #ffb547, #f08a24); }
.hr:hover i { background: #6e7ee4; }
.hr.win:hover i { background: #e0761a; }
.hours-x { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); margin-top: 6px; }
/* failures */
.fails { display: grid; gap: 8px; }
.fl { border: 1px solid #eceef4; border-radius: 12px; background: #fff; overflow: hidden; }
.fl summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
.fl summary::-webkit-details-marker { display: none; }
.fl summary:hover { background: #fafbfd; }
.fl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rust); flex: none; box-shadow: 0 0 0 4px var(--rust-soft); }
.fl.ok .fl-dot { background: #3fae7e; box-shadow: 0 0 0 4px var(--leaf-soft); }
.fl.ok .fl-t b { color: var(--ink-2); }
.fl-t { flex: 1; min-width: 0; }
.fl-t b { display: block; font-size: 13.5px; font-weight: 600; }
.fl-t span { display: block; font-size: 12px; color: var(--ink-3); }
.fl-chev { width: 16px; height: 16px; color: #b9bfd0; transition: transform .15s; flex: none; }
.fl[open] .fl-chev { transform: rotate(90deg); }
.fl-body { padding: 0 14px 12px 35px; font-size: 12.5px; color: var(--ink-2); }
.fl-body p { margin: 0 0 6px; overflow-wrap: anywhere; word-break: break-word; }
.fl-meta { color: var(--ink-3); }
@media (max-width: 1280px) { .geo-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .cty-grid.two { grid-template-columns: minmax(0, 1fr); } .geo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .cost-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .cost-rates div { min-width: 0; }
  .ch-actions .btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .fl-body { padding-left: 14px; }
}
.gk-v .dl { margin-left: 8px; vertical-align: 4px; }

/* ---- Button clicks ---- */
.bb { display: flex; flex-direction: column; gap: 6px; }
.bb-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 130px 150px; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid #eceef4; border-radius: 12px; background: #fff; }
.bb-row.zero { background: #fafbfd; }
.bb-row.zero .bb-v b { color: var(--ink-3); }
.bb-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.bb-ic svg { width: 18px; height: 18px; }
.bb-ic.qr { background: var(--indigo-soft); color: var(--indigo); }
.bb-ic.url { background: #e6f4fb; color: #027eb5; }
.bb-ic.other { background: var(--line-2); color: var(--ink-3); }
.bb-t { min-width: 0; }
.bb-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-t > span { display: block; font-size: 12px; color: var(--ink-3); }
.bb-bar { height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 7px; overflow: hidden; max-width: 360px; }
.bb-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #5b6cf0, #3446c4); }
.bb-v { text-align: right; }
.bb-v b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bb-v span { font-size: 11.5px; color: var(--ink-3); }
.bb-act { display: flex; gap: 6px; justify-content: flex-end; }
.badge .bdg-i { width: 11px; height: 11px; }
.tpl-clicks { padding: 10px 16px; border-top: 1px solid var(--line-2); background: #fbfbfe; }
.tc-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a91a6; margin-bottom: 6px; }
.tc-h svg { width: 13px; height: 13px; }
.tc-r { display: grid; grid-template-columns: 1fr auto 46px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.tc-r span { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-r span svg { width: 13px; height: 13px; color: var(--ink-3); flex: none; }
.tc-r b { font-variant-numeric: tabular-nums; }
.tc-r em { font-style: normal; font-size: 11.5px; color: var(--ink-3); text-align: right; }
.tb-i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; color: var(--ink-3); }
@media (max-width: 900px) {
  .bb-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .bb-act { grid-column: 2 / -1; justify-content: flex-start; }
}
.badge.btnb::before { display: none; }
.badge.btnb { gap: 4px; }
#bd-filter { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
#bd-filter button { flex: none; }
.te-track { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); background: #f6f7fb; border-radius: 8px; padding: 8px 10px; }
.te-track span { flex: 1; min-width: 180px; }
.te-track.on { background: var(--leaf-soft); color: #175c3f; }
.te-track.on svg { width: 16px; height: 16px; flex: none; }

/* ---- WhatsApp sales ---- */
.sales { --violet: #6b4fd8; --violet-soft: #efeafd; --rose: #d9466f; --rose-soft: #fde8ee; }
:root { --rose: #d9466f; --rose-soft: #fde8ee; --violet: #6b4fd8; --violet-soft: #efeafd; }
.dc-ic.leaf, .gk.leaf .gk-ic { background: var(--leaf-soft); color: var(--leaf); }
.stack i.rev, .fbar i.rev { background: linear-gradient(180deg, #3fae7e, #23855c); }
.fbar i.rev { background: linear-gradient(90deg, #6cc79f, #23855c); }
tr.cancelled td { opacity: .5; }
.sk-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.sk { background: #f6f7fb; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.sk-v { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-l { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sk-s { font-size: 11px; color: var(--ink-3); }
.sales-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 1200px) { .sk-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card-head h2 svg, .card > h2 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--leaf); margin-right: 4px; }

/* ---- Catalog / product collections ---- */
.mpm-pick { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed #c9cee0; border-radius: 12px; background: #fafbfe; margin-bottom: 6px; }
.mpm-pick > div { flex: 1; min-width: 0; }
.col-sum { display: flex; align-items: center; gap: 12px; }
.col-sum b { display: block; }
.col-thumbs { display: flex; flex: none; }
.col-thumbs img, .col-thumbs span { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 2px solid #fff; margin-left: -8px; background: #eef0f6; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.col-thumbs img:first-child { margin-left: 0; }
.col-thumbs span { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.cp { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; min-height: 420px; }
.cp-left { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cp-sets { flex: 1; overflow-y: auto; max-height: 52vh; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.cp-set { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; cursor: pointer; display: flex; flex-direction: column; font: inherit; color: var(--ink); }
.cp-set:hover { background: #f5f6fb; }
.cp-set.active { background: var(--indigo-soft); color: var(--indigo-2); }
.cp-set b { font-size: 13px; font-weight: 600; }
.cp-set span { font-size: 11.5px; color: var(--ink-3); }
.cp-right { overflow-y: auto; max-height: 60vh; padding-right: 4px; }
.cp-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.cp-head .grow { flex: 1; }
.cp-sec { margin-bottom: 14px; }
.cp-title { height: 32px !important; font-weight: 600; margin-bottom: 8px; max-width: 260px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cp-item { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-align: left; padding: 0; font: inherit; color: inherit; }
.cp-item.thumb { box-shadow: 0 0 0 2px #f08a24; border-color: #f08a24; }
.cp-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef0f6; }
.cp-meta { padding: 6px 8px 8px; }
.cp-meta b { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.cp-meta span { font-size: 11.5px; color: var(--ink-2); }
.cp-meta s { color: var(--ink-3); }
.cp-x, .cp-star { position: absolute; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(18,23,49,.65); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 13px; }
.cp-x { right: 6px; } .cp-star { left: 6px; color: #ffd27a; }
.cp-x svg { width: 13px; height: 13px; }
.cp-item.add { cursor: pointer; opacity: .8; }
.cp-item.add:hover { opacity: 1; border-color: #6a79ff; }
.cp-plus { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: #fff; display: grid; place-items: center; }
.cp-plus svg { width: 14px; height: 14px; }
.wa-sheet { background: #fff; border-radius: 14px; box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); overflow: hidden; max-width: 330px; }
.ws-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #eef0f5; }
.ws-h svg { width: 16px; height: 16px; transform: rotate(180deg); color: var(--ink-3); }
.ws-h b { flex: 1; font-size: 14px; }
.ws-h span { font-size: 12px; color: var(--ink-3); }
.ws-sec { padding: 10px 14px 4px; font-size: 12px; font-weight: 700; color: #027eb5; text-transform: uppercase; letter-spacing: .04em; }
.ws-row { display: flex; gap: 10px; align-items: center; padding: 6px 14px; }
.ws-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #eef0f6; }
.ws-row b { display: block; font-size: 13px; font-weight: 600; }
.ws-row span { font-size: 12px; color: var(--ink-2); }
.ws-more { padding: 2px 14px 8px 68px; font-size: 12px; color: var(--ink-3); }
@media (max-width: 900px) { .cp { grid-template-columns: 1fr; } .cp-sets { max-height: 200px; } }

/* ---- Klaviyo ---- */
.ccols2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
.ccols2 .phone-preview { min-height: 120px; }
.kl-hero { background: linear-gradient(135deg, #1b2150 0%, #2f3b9a 60%, #4c5be0 100%); color: #fff; border: 0; padding: 26px 28px; }
.kl-hero h2 { color: #fff; font-size: 20px; margin: 0 0 6px; letter-spacing: -.02em; }
.kl-hero p { margin: 0; color: rgba(255,255,255,.8); max-width: 640px; }
.kl-rule { padding: 16px 18px; }
.kl-flow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kl-flow .grow { flex: 1; }
.kl-node { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfe; min-width: 0; }
.kl-node > div { display: flex; flex-direction: column; min-width: 0; }
.kl-node small { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kl-node b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.kl-node span:not(.kl-logo) { font-size: 12px; color: var(--ink-3); }
.kl-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #121212; color: #fff; font-weight: 800; font-size: 15px; flex: none; }
.kl-logo.wa { background: #e7f6ee; color: #1f8a5b; }
.kl-logo.tg { background: var(--indigo-soft); color: var(--indigo); }
.kl-logo svg { width: 16px; height: 16px; }
.kl-arrow { color: var(--ink-3); display: grid; place-items: center; }
.kl-arrow svg { width: 15px; height: 15px; }
.kl-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gk-s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.stack i.kl-noopt, .lg-in.kl-noopt { background: #d4d8e6; }
.kl-skip { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 6px; }
.kl-skip > div { width: 100%; }
.kl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kl-grid .dcard { margin-bottom: 16px; }
.kl-bd { display: grid; gap: 11px; }
.kl-bdl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.kl-bdl b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kl-bdl span { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.kl-bdbar { position: relative; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.kl-bdbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: #c9cff0; }
.kl-bdbar i.op { background: linear-gradient(90deg, #5b6cf0, #3446c4); }
.kl-earlier { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.kl-earlier > div:not(.grow) { display: flex; flex-direction: column; }
.kl-earlier b { font-size: 22px; letter-spacing: -.02em; }
.kl-earlier span { font-size: 12px; color: var(--ink-3); }
.kl-earlier .grow { flex: 1; }
.kl-table td { vertical-align: top; }
@media (max-width: 1100px) { .kl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ccols2, .kl-grid { grid-template-columns: 1fr; } .kl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kl-arrow { display: none; } .kl-node b { max-width: 150px; } }
.ccols2 .radio-card { margin-bottom: 8px; }

/* ---- Team activity ---- */
.dc-ic.slate { background: #eef0f5; color: #5a6178; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tm-card { padding: 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.tm-card.online { border-color: rgba(35,133,92,.35); box-shadow: 0 0 0 3px rgba(35,133,92,.07), var(--shadow-sm); }
.tm-top { display: flex; align-items: center; gap: 12px; position: relative; }
.tm-top .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tm-top .grow b { font-size: 15px; }
.tm-top .grow span { font-size: 12.5px; color: var(--ink-3); }
.tm-dot { position: absolute; left: 27px; top: 27px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: #b9bfd0; }
.tm-dot.online { background: #2fbf71; }
.tm-dot.idle { background: #e2a33a; }
.tm-state { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 11px; }
.tm-state.on { background: var(--leaf-soft); color: var(--leaf); }
.tm-state.idle { background: var(--amber-soft); color: #a8640c; }
.tm-state.off { background: var(--line-2); color: var(--ink-3); }
.tm-rows { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.tm-rows dt { color: var(--ink-3); }
.tm-rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tm-last { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f7fb; font-size: 12.5px; color: var(--ink-2); }
.tm-last svg { width: 14px; height: 14px; flex: none; color: var(--ink-3); }
.tm-last span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-last em { font-style: normal; color: var(--ink-3); white-space: nowrap; }
.tm-acts { display: flex; gap: 6px; margin-top: auto; }
.tm-tl { display: grid; gap: 10px; }
.tm-axis { display: grid; grid-template-columns: 130px 1fr 64px; }
.tm-axis > div { position: relative; height: 16px; }
.tm-axis i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--ink-3); }
.tm-axis i:first-child { transform: none; }
.tm-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 0; font-size: 13px; }
.tm-row > span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.tm-row em { font-style: normal; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tm-track { position: relative; height: 22px; border-radius: 7px; background: repeating-linear-gradient(90deg, #f3f4f8 0, #f3f4f8 calc(12.5% - 1px), #e6e8f0 calc(12.5% - 1px), #e6e8f0 12.5%); }
.tm-track i { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: #8d99ea; }
.tm-track i.live { background: #2fbf71; }
.tm-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--rust); border-radius: 1px; opacity: .6; }
.tm-filters { display: grid; grid-template-columns: 180px 180px 1fr; gap: 10px; margin-bottom: 14px; }
.tm-day { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 4px; }
.tm-day:first-child { margin-top: 0; }
.tm-h { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.tm-h:last-of-type { border-bottom: 0; }
.tm-h .grow { flex: 1; min-width: 0; }
.tm-sum { font-size: 14px; font-weight: 550; }
.tm-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tm-meta b { color: var(--ink-2); font-weight: 600; }
.tm-det { margin-top: 6px; font-size: 12.5px; }
.tm-det summary { cursor: pointer; color: var(--indigo); font-weight: 600; }
.tm-det table { margin-top: 6px; border-collapse: collapse; }
.tm-det th { text-align: left; font-weight: 600; padding: 3px 12px 3px 0; color: var(--ink-2); white-space: nowrap; vertical-align: top; }
.tm-det td { padding: 3px 8px 3px 0; vertical-align: top; overflow-wrap: anywhere; }
.tm-det td.from { color: var(--rust); text-decoration: line-through; text-decoration-color: rgba(184,64,28,.4); }
.tm-det td.to { color: var(--leaf); font-weight: 550; }
@media (max-width: 760px) { .tm-filters { grid-template-columns: 1fr 1fr; } .tm-filters input { grid-column: span 2; } .tm-row, .tm-axis { grid-template-columns: 80px 1fr 52px; } }
.tm-det table { width: auto; background: none; }
.tm-det th, .tm-det td { text-transform: none; letter-spacing: 0; background: none !important; border: 0 !important; font-size: 12.5px; height: auto; }
.tm-det th { color: var(--ink-2); }
.rk-v b.pend { color: #a8640c; font-size: 13px; }
.rk-v .pend-s { display: block; font-size: 10.5px; color: #a8640c; white-space: nowrap; }

/* ---- Don't send to ---- */
.dns { margin-top: 14px; border: 1px solid #f1d6cc; background: #fff9f7; border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.dns-h { display: flex; align-items: baseline; gap: 10px; }
.dns-h b { font-size: 14px; color: #8a2c10; }
.dns-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; flex-wrap: wrap; }
.dns-row > input[type=checkbox] { accent-color: #b8401c; width: 16px; height: 16px; margin: 0; }
.dns-row > span { flex: 1; min-width: 200px; }
.dns-row select { width: auto; height: 30px; padding: 0 26px 0 8px; font-size: 13px; display: inline-block; margin-left: 4px; }
.dns-row em { font-style: normal; color: #b8401c; font-weight: 600; white-space: nowrap; }
.dns-multi > span { flex: none; min-width: 0; width: 140px; }
.dns-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 200px; }
.dns-chips select.dns-add { height: 26px; font-size: 12.5px; border-style: dashed; max-width: 230px; }
@media (max-width: 700px) { .dns-multi > span { width: 100%; } }

/* ---------- live try-on ---------- */
.tryon #to-sub .badge { vertical-align: 1px; }
.to-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.to-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line-2); }
.to-steps li:first-child { border-top: 0; }
.to-steps li b { display: block; font-weight: 600; }
.to-steps li span:not(.to-n) { color: var(--ink-3); font-size: 13px; }
.to-steps li.done b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line); }
.to-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--indigo-soft); color: var(--indigo); font-weight: 700; font-size: 12.5px; }
.to-steps li.done .to-n { background: var(--leaf-soft); color: var(--leaf); }
.to-n svg { width: 14px; height: 14px; }
.to-steps { margin-bottom: 16px; }
.to-range { gap: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.to-g2 { margin-bottom: 16px; gap: 16px; align-items: start; }
.to-cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.to-cost div { background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.to-cost span { display: block; color: var(--ink-3); font-size: 12px; }
.to-cost b { font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.to-budget .row { gap: 4px; font-size: 13px; margin-bottom: 6px; }
.to-bar { height: 8px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin-bottom: 6px; }
.to-bar i { display: block; height: 100%; border-radius: 6px; background: var(--indigo); min-width: 0; transition: width .4s; }
.to-bar i.hot { background: var(--rust); }
.to-budget .to-bar i { background: var(--leaf); }
.to-funnel { display: grid; gap: 12px; }
.to-fr .row { gap: 6px; font-size: 13px; margin-bottom: 5px; }
.to-fr b { font-weight: 550; }
.to-fr em { font-style: normal; color: var(--ink-3); font-size: 12px; margin-left: 4px; }
.to-top { display: grid; gap: 4px; }
.to-tr { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.to-tr:first-child { border-top: 0; }
.to-tr img, .to-ph { width: 36px; height: 44px; border-radius: 7px; object-fit: cover; background: var(--line-2); flex: none; }
.to-tr b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-tr span { color: var(--ink-3); font-size: 12px; }
.to-tr .grow { min-width: 0; }
.to-tr em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.to-days { height: 140px; margin-bottom: 18px; }
.to-ptools { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.to-ptools input[type=search] { width: 240px; }
.to-pcount { margin: 0 0 12px; }
.to-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.to-p { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.to-p.on { border-color: var(--leaf); box-shadow: 0 0 0 1px var(--leaf) inset; }
.to-p.sold .to-img img { filter: grayscale(.9); opacity: .7; }
.to-img { position: relative; display: block; padding: 0; border: 0; background: var(--paper); aspect-ratio: 4 / 5; cursor: pointer; width: 100%; }
.to-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.to-img:hover img { opacity: .92; }
.to-tag { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 99px; background: rgba(20,22,30,.78); color: #fff; }
.to-tag.sold { left: auto; right: 6px; background: var(--rust); }
.to-sel { position: absolute; z-index: 1; left: 6px; top: 6px; }
.to-sel input { width: 17px; height: 17px; accent-color: var(--indigo); cursor: pointer; }
.to-pb { padding: 8px 10px 4px; display: grid; gap: 1px; min-width: 0; }
.to-pb b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-pb span { font-size: 12px; color: var(--ink-3); }
.to-pf { display: flex; align-items: center; padding: 4px 10px 10px; margin-top: auto; }
.to-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 12px 0; }
.to-ph-o { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--paper); cursor: pointer; aspect-ratio: 4 / 5; }
.to-ph-o img { width: 100%; height: 100%; object-fit: cover; display: block; }
.to-ph-o.front { border-color: var(--indigo); }
.to-ph-o.back { border-color: var(--amber); }
.to-ph-o span { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--indigo); color: #fff; }
.to-ph-o span.b { background: var(--amber); }
.to-st td { vertical-align: middle; }
.to-sp { display: flex; gap: 4px; align-items: center; }
.to-sp img { width: 28px; height: 34px; border-radius: 5px; object-fit: cover; background: var(--line-2); }
.to-sp span { font-size: 12px; color: var(--ink-3); }
.to-setup .card { margin: 0; }
.to-setup .card-head h2 svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; color: var(--indigo); }
.to-keyinfo { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--leaf-soft); color: var(--ink); font-size: 13px; }
.to-keyinfo svg { width: 15px; height: 15px; vertical-align: -3px; color: var(--leaf); }
.to-adv summary { cursor: pointer; font-weight: 600; color: var(--indigo); margin: 6px 0 10px; }
.to-code { margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; background: #11131a; color: #d8dcf0; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.to-savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 0; background: linear-gradient(180deg, transparent, var(--paper) 30%); }
@media (max-width: 900px) { .to-cost { grid-template-columns: 1fr 1fr 1fr; } .to-ptools input[type=search] { width: 100%; } }
.geo-kpis.to-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .geo-kpis.to-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.to-ptools select { width: auto; min-width: 200px; }
.to-ptools .grow { flex: 1; }
.to-img { height: auto; }
.to-img img { aspect-ratio: 4 / 5; height: auto; }
.to-pf .switch, .to-pf .badge { margin-left: auto; }
.to-pf .small { color: var(--ink-3); }

/* ---------- website activity (pixel) ---------- */
.wf { display: grid; gap: 8px; margin: 18px 0 6px; }
.wf-r { display: grid; grid-template-columns: 190px 1fr 70px 46px; align-items: center; gap: 12px; font-size: 13px; }
.wf-l { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-bar { height: 22px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.wf-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), #8f9cf0); border-radius: 6px; transition: width .4s; }
.wf-r.meta .wf-bar i { background: #c4cbf4; }
.wf-r:last-child .wf-bar i { background: linear-gradient(90deg, var(--leaf), #7fcf9e); }
.wf-r b { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.wf-r em { font-style: normal; color: var(--ink-3); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.wf-h { font-size: 13.5px; font-weight: 650; margin: 20px 0 10px; }
.wf-t td, .wf-t th { padding-top: 8px; padding-bottom: 8px; }
.wf-p { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wf-p img, .wf-p span { width: 32px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--line-2); flex: none; }
.wf-p b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.wf-ph { display: flex; align-items: center; margin: 22px 0 10px; }
#wf-seg { margin-bottom: 10px; flex-wrap: wrap; }
.wf-c { color: var(--ink-3); font-size: 11.5px; margin-left: 3px; font-variant-numeric: tabular-nums; }
.px-code { width: 100%; height: 180px; font: 11.5px/1.5 var(--mono); padding: 10px 12px; border-radius: 8px; background: #11131a; color: #d8dcf0; border: 0; resize: vertical; }
.px-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.px-stat { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 13px; }
.px-stat b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .wf-r { grid-template-columns: 1fr 60px 40px; } .wf-bar { grid-column: 1 / -1; order: 5; } }
.cw { display: grid; gap: 8px; }
.cw-r { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; }
.cw-r b { font-weight: 600; }
.cw-r span { color: var(--ink-2); }
.cw-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--violet-soft, #efeafd); color: var(--violet, #6b4fd8); flex: none; }
.cw-ic svg { width: 13px; height: 13px; }
.wf-ph .grow { flex: 1; }

/* ---------- charts (shared with the PDF report) ---------- */
.ch { display: block; overflow: visible; }
.ch-grid { stroke: var(--line-2, #eef0f5); stroke-width: 1; }
.ch-ax { font-size: 10.5px; fill: var(--ink-3, #7d8499); font-variant-numeric: tabular-nums; }
.ch-cross { stroke: var(--ink-3, #7d8499); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-bar { transition: opacity .15s; }
.ch-bar.dim { opacity: .35; }
.ch-lg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2, #4a5268); margin: 0 0 8px; }
.ch-lg span, .sh-k span { display: inline-flex; align-items: center; gap: 6px; }
.ch-lg i, .sh-k i, .ch-tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ch-tip { position: fixed; z-index: 9999; pointer-events: none; background: #141827; color: #fff; padding: 8px 10px; border-radius: 9px; font-size: 12px; min-width: 150px; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: none; }
.ch-tip b { display: block; margin-bottom: 4px; font-weight: 600; }
.ch-tip div { display: flex; align-items: center; gap: 7px; line-height: 1.7; }
.ch-tip span { margin-left: auto; padding-left: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 32px; display: block; margin-top: 8px; }
.hb { display: grid; gap: 9px; }
.hb-r { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.hb-l { color: var(--ink-2, #4a5268); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-b { height: 10px; border-radius: 5px; background: var(--line-2, #eef0f5); overflow: hidden; }
.hb-b i { display: block; height: 100%; border-radius: 5px; }
.hb-v { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hb-v em { font-style: normal; font-weight: 400; color: var(--ink-3, #7d8499); margin-left: 6px; font-size: 11.5px; }
.fn { display: grid; gap: 9px; }
.fn-r { display: grid; grid-template-columns: 170px 1fr 60px 46px; align-items: center; gap: 10px; font-size: 12.5px; }
.fn-l { color: var(--ink-2, #4a5268); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-b { height: 20px; border-radius: 6px; background: var(--line-2, #eef0f5); overflow: hidden; }
.fn-b i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #3446c4, #7d8ce0); }
.fn-b i.last { background: linear-gradient(90deg, #23855c, #6cc495); }
.fn-r b { text-align: right; font-variant-numeric: tabular-nums; }
.fn-r em { font-style: normal; text-align: right; color: var(--ink-3, #7d8499); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hm-g { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; }
.hm-g i { aspect-ratio: 1; border-radius: 3px; min-height: 10px; }
.hm-h { font-size: 9.5px; color: var(--ink-3, #7d8499); text-align: left; }
.hm-d { font-size: 10.5px; color: var(--ink-3, #7d8499); align-self: center; }
.hm-k { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: 8px; font-size: 10.5px; color: var(--ink-3, #7d8499); }
.hm-k i { width: 14px; height: 10px; border-radius: 2px; }
.hm-k span { margin: 0 5px; }
.sh { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--line-2, #eef0f5); }
.sh i { display: block; height: 100%; }
.sh-k { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--ink-2, #4a5268); }
.sh-k b { color: var(--ink, #1a2033); }
.sh-k em { font-style: normal; color: var(--ink-3, #7d8499); }

/* ---------- analytics page ---------- */
.an-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.an-acts { gap: 8px; flex-wrap: wrap; align-items: center; }
.an-acts select { width: auto; min-width: 150px; }
.an-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.an-custom input { width: auto; }
.an-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0 10px; margin-bottom: 6px; background: linear-gradient(var(--paper) 80%, transparent); scrollbar-width: none; }
.an-nav a { padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); }
.an-nav a:hover { color: var(--indigo); border-color: var(--indigo); }
#an-body { transition: opacity .2s; }
.an-sec { scroll-margin-top: 56px; margin-bottom: 16px; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.an-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px 10px; background: var(--surface); }
.an-kpi-t { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 550; }
.an-kpi-v { font-size: 24px; font-weight: 720; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.an-kpi-s { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl.up { background: var(--leaf-soft); color: var(--leaf); }
.dl.down { background: var(--rust-soft); color: var(--rust); }
.dl.flat { background: var(--line-2); color: var(--ink-3); }
.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 18px; }
.an-cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-blk { min-width: 0; }
.an-blk h3 { font-size: 13px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.an-best { font-size: 11.5px; font-weight: 650; color: var(--indigo); background: var(--indigo-soft); padding: 2px 8px; border-radius: 99px; }
.an-ins { display: grid; gap: 9px; }
.an-ins .in { border-left: 3px solid var(--line); padding: 3px 0 3px 11px; display: grid; gap: 1px; }
.an-ins .in.good { border-color: var(--leaf); }
.an-ins .in.bad { border-color: var(--rust); }
.an-ins .in.neutral { border-color: var(--indigo); }
.an-ins b { font-size: 13px; font-weight: 650; }
.an-ins span { font-size: 12.5px; color: var(--ink-2); }
.an-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.an-mini { background: var(--paper); border-radius: 10px; padding: 10px 12px; display: grid; gap: 1px; }
.an-mini span { font-size: 12px; color: var(--ink-3); }
.an-mini b { font-size: 19px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.an-mini em { font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.an-mini em.up { color: var(--leaf); }
.an-mini em.down { color: var(--rust); }
.an-mini.warn { background: var(--amber-soft); }
.an-chart { margin-top: 6px; }
.an-tip { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); background: var(--paper); border-radius: 9px; padding: 9px 11px; margin: 12px 0 0; }
.an-tip svg { width: 15px; height: 15px; flex: none; color: var(--indigo); margin-top: 1px; }
.an-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.an-t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 650; padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.an-t td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.an-t tr:last-child td { border-bottom: 0; }
.an-p { display: flex; align-items: center; gap: 9px; min-width: 0; }
.an-p img, .an-ph { width: 28px; height: 34px; border-radius: 6px; object-fit: cover; background: var(--line-2); flex: none; }
.an-p b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.an-lb th { cursor: pointer; user-select: none; white-space: nowrap; }
.an-lb th.sorted { color: var(--indigo); }
.an-lb td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-lb td.hi { color: var(--leaf); font-weight: 700; }
.an-lb a { color: inherit; text-decoration: none; }
.an-lb a:hover b { color: var(--indigo); }
.an-menu { position: absolute; z-index: 9000; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; display: grid; min-width: 220px; }
.an-menu button { text-align: left; padding: 9px 11px; border-radius: 7px; font-size: 13px; background: none; border: 0; cursor: pointer; color: var(--ink); }
.an-menu button:hover { background: var(--paper); }
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-cols.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .an-cols, .an-cols.three { grid-template-columns: 1fr; } .an-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fn-r { grid-template-columns: 120px 1fr 50px 40px; } }
.an-sec > .an-blk { margin-top: 20px; }

/* ---------- Product cards (carousel templates) ---------- */
.pc-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 4px; scroll-snap-type: x mandatory; max-width: 340px; }
.pc-card { flex: 0 0 180px; scroll-snap-align: start; background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.12); overflow: hidden; display: flex; flex-direction: column; }
.pc-img { aspect-ratio: 1; background: #f1f2f6; display: grid; place-items: center; color: #b5bacb; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-img svg { width: 34px; height: 34px; }
.pc-meta { padding: 8px 10px 6px; display: grid; gap: 2px; font-size: 12.5px; }
.pc-meta b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta s { color: #8a90a2; margin-left: 4px; }
.pc-btns { border-top: 1px solid #eef0f4; margin-top: auto; }
.pc-btns span { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; color: #0a7cff; font-size: 13px; font-weight: 550; }
.pc-btns svg { width: 13px; height: 13px; }
.pc-panel { border: 1px dashed #c9cee0; border-radius: 12px; background: #fafbfe; padding: 12px; margin-bottom: 14px; }
.pc-top { display: flex; gap: 12px; align-items: flex-start; }
.pc-top p { margin: 3px 0 0; }
.pc-list { display: grid; gap: 6px; margin-top: 12px; }
.pc-li { display: grid; grid-template-columns: 18px 44px minmax(0,1fr) auto; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.pc-n { font-size: 11.5px; color: var(--ink-3, #8a90a2); text-align: center; font-variant-numeric: tabular-nums; }
.pc-li img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: #f1f2f6; }
.pc-li-m { min-width: 0; display: grid; gap: 2px; }
.pc-li-m b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-link { font-size: 12px; padding: 4px 7px !important; margin-top: 2px; }
.pc-li-a { display: flex; gap: 2px; }
.pc-li-a .icon-btn[disabled] { opacity: .3; cursor: default; }
.pc-modes { grid-template-columns: 1fr 1fr; }
.pc-modes small { display: block; font-size: 11.5px; margin-top: 2px; }
@media (max-width: 700px) { .pc-modes { grid-template-columns: 1fr; } }
.te-cardbtn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.te-cardbtn small { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.msg-cards { display: flex; gap: 6px; overflow-x: auto; margin-top: 6px; max-width: 320px; }
.msg-cards > div { flex: 0 0 96px; background: #fff; border-radius: 8px; overflow: hidden; font-size: 11px; display: grid; }
.msg-cards img { width: 96px; height: 96px; object-fit: cover; display: block; }
.msg-cards span { padding: 4px 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-cards em { font-style: normal; color: #0a7cff; padding: 2px 6px 5px; font-weight: 550; }
.cp-cards .cp-title, .cp-cards .cp-star { display: none; }
.cp-cards .cp-item.thumb { border-color: var(--line); box-shadow: none; }
.cp-cards .cp-sec + .cp-sec { margin-top: 8px; }
.tpl-label svg { width: 13px; height: 13px; flex: none; }

/* ---------- Always-on mailbox (Cloudflare Worker) ---------- */
.mb { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; background: #fafbfe; }
.mb.good { border-color: #bfe3cf; background: #f3fbf6; }
.mb.bad { border-color: #f1c4b6; background: #fdf5f2; }
.mb summary { list-style: none; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.mb summary::-webkit-details-marker { display: none; }
.mb[open] summary .btn { display: none; }
.mb-head { display: flex; gap: 10px; align-items: center; }
.mb-dot { width: 9px; height: 9px; border-radius: 50%; background: #23855c; flex: none; box-shadow: 0 0 0 3px rgba(35,133,92,.15); }
.mb.bad .mb-dot { background: #b8401c; box-shadow: 0 0 0 3px rgba(184,64,28,.15); }
.mb-dot.off { background: #b5bacb; box-shadow: none; }
.mb-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mb-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.55; }
.mb-steps code, .mb summary code { font-size: 12px; }
/* keyword reply extras */
.kr-extras { display: grid; gap: 8px; margin-top: 4px; }
.kr-x { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; background: #fafbfe; }
.kr-x input { margin-top: 3px; }
.kr-x small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; }
.kr-extras > div { padding: 2px 4px 6px 30px; }
.kr-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.kr-badges span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; background: #eef0fb; color: #3446c4; border-radius: 999px; padding: 2px 8px; }
.kr-badges svg { width: 11px; height: 11px; }

/* ---- Abandoned carts ---- */
.ct-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1250px) { .ct-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ct-flow { padding: 18px 20px 20px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(180deg, #fff, #fafbff); position: relative; overflow: hidden; }
.ct-flow.on { border-color: #cfe9dc; background: linear-gradient(180deg, #fbfefc, #f4fbf7); }
.ct-flow-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ct-state { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ct-state b { font-size: 15px; }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; background: #c2c7d6; flex: none; }
.ct-flow.on .ct-dot { background: #23a26c; box-shadow: 0 0 0 0 rgba(35,162,108,.5); animation: ctpulse 1.8s infinite; }
@keyframes ctpulse { 0% { box-shadow: 0 0 0 0 rgba(35,162,108,.45); } 70% { box-shadow: 0 0 0 9px rgba(35,162,108,0); } 100% { box-shadow: 0 0 0 0 rgba(35,162,108,0); } }
.ct-rules { display: flex; gap: 6px; flex-wrap: wrap; }
.ct-rules span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
.ct-track { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 2px; }
.ct-node { flex: 1 1 0; min-width: 170px; display: flex; gap: 11px; align-items: flex-start; background: #fff; border: 1px solid #e3e6ef; border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow-sm); }
.ct-node.empty { border-style: dashed; background: #fbfbfd; box-shadow: none; }
.ct-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--indigo-soft); color: var(--indigo); }
.ct-ic svg { width: 17px; height: 17px; }
.ct-node.start .ct-ic { background: var(--amber-soft); color: #c27a12; }
.ct-node.end .ct-ic { background: var(--leaf-soft); color: var(--leaf); }
.ct-node.end { border-color: #cfe9dc; }
.ct-t { font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.ct-n { font-size: 22px; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ct-s { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.ct-rec { font-size: 11.5px; color: var(--leaf); font-weight: 600; margin-top: 2px; }
.ct-wait { flex: 0 0 auto; display: flex; align-items: center; position: relative; padding: 0 6px; min-width: 92px; justify-content: center; }
.ct-wait::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed #c8cde0; }
.ct-wait span { position: relative; background: #fff; border: 1px solid #dfe3ee; border-radius: 20px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.ct-wait span svg { width: 12px; height: 12px; }
.ct-flow.on .ct-wait::before { border-top-color: #9fd6bb; animation: ctdash 1.2s linear infinite; }
@keyframes ctdash { to { background-position: 20px 0; } }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: -1px; margin: 0 2px 0 8px; }
.lg.amber { background: #f0c27a; } .lg.green { background: #23855c; }
.ct-bars { position: relative; width: 100%; max-width: 30px; height: 100%; display: flex; align-items: flex-end; }
.ct-bars i { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 6px 6px 2px 2px; transition: height .6s cubic-bezier(.2,.8,.2,1); }
.ct-bars i.left { background: linear-gradient(180deg, #f6d9a6, #efbf6c); min-height: 0; }
.ct-bars i.back { background: linear-gradient(180deg, #3fae7e, #23855c); left: 5px; right: 5px; }
.ct-top { display: flex; flex-direction: column; gap: 9px; }
.ct-prod { display: flex; gap: 10px; align-items: center; }
.ct-prod img, .ct-prod .ct-ph { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: #f2f3f7; flex: none; border: 1px solid #eceef4; }
.ct-prod div { min-width: 0; display: flex; flex-direction: column; }
.ct-prod b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-prod span { font-size: 12px; color: var(--ink-3); }
.ct-ph { display: grid; place-items: center; color: var(--ink-3); }
.ct-ph svg { width: 18px; height: 18px; }
.ct-why div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line-2); color: var(--ink-2); }
.ct-filter { margin-bottom: 10px; flex-wrap: wrap; }
.ct-filter em { font-style: normal; font-size: 11px; color: var(--ink-3); background: rgba(0,0,0,.05); border-radius: 9px; padding: 0 6px; margin-left: 2px; }
.ct-table tbody tr { cursor: pointer; }
.ct-table tbody tr:hover td { background: #fafbff; }
.ct-cell { display: flex; gap: 12px; align-items: center; min-width: 240px; }
.ct-cell b { font-weight: 600; }
.ct-thumbs { display: flex; position: relative; flex: none; }
.ct-thumbs img, .ct-thumbs .ct-ph { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 2px solid #fff; background: #f2f3f7; box-shadow: 0 1px 3px rgba(22,27,44,.12); }
.ct-thumbs img + img { margin-left: -18px; }
.ct-thumbs em { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--side); color: #fff; border-radius: 9px; padding: 0 5px; }
.ct-nophone { color: var(--rust); }
.ct-reason { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px; color: var(--ink-3); gap: 4px; }
.ct-empty > svg { width: 34px; height: 34px; color: #b9bfd3; margin-bottom: 6px; }
.ct-empty b { color: var(--ink); font-size: 15px; }
.ct-empty span { max-width: 460px; }
.ct-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.ct-items { display: flex; flex-direction: column; gap: 10px; }
.ct-item { display: flex; gap: 12px; align-items: center; }
.ct-item img, .ct-item .ct-ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #f2f3f7; flex: none; }
.ct-item div { display: flex; flex-direction: column; }
.ct-item span { font-size: 12.5px; color: var(--ink-3); }
.ct-sum { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; font-size: 15px; }
.ct-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-meta span { font-size: 12px; background: var(--line-2); border-radius: 6px; padding: 2px 8px; color: var(--ink-2); }
.ct-items .btn { align-self: flex-start; }
.ct-time h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 10px; }
.ct-ev { display: flex; gap: 11px; position: relative; padding-bottom: 14px; }
.ct-ev:not(:last-of-type)::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; border-left: 2px solid var(--line); }
.ct-ev-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); flex: none; }
.ct-ev-ic svg { width: 14px; height: 14px; }
.ct-ev.good .ct-ev-ic { background: var(--leaf-soft); color: var(--leaf); }
.ct-ev.bad .ct-ev-ic { background: var(--rust-soft); color: var(--rust); }
.ct-ev.soon .ct-ev-ic { background: #fff; border: 2px dashed #c8cde0; color: var(--ink-3); }
.ct-ev div { display: flex; flex-direction: column; }
.ct-ev span { font-size: 12.5px; color: var(--ink-2); }
.ct-ev em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.modal.xl { max-width: 1120px; width: calc(100vw - 40px); }
.cf-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); gap: 22px; align-items: start; }
.cf-right { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.cf-prev-head { display: flex; justify-content: space-between; align-items: baseline; }
.cf-link { display: flex; gap: 9px; font-size: 12px; background: #f6f7fb; border-radius: 10px; padding: 10px 12px; color: var(--ink-2); }
.cf-link svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--indigo); }
.cf-link div { display: flex; flex-direction: column; min-width: 0; }
.cf-link code { word-break: break-all; font-size: 11.5px; color: var(--ink-3); }
.cf-node { display: flex; gap: 11px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff8ec; border: 1px solid #f3e1bf; }
.cf-node.end { background: #f1faf5; border-color: #cfe9dc; }
.cf-node.end .ct-ic { background: var(--leaf-soft); color: var(--leaf); }
.cf-node.start .ct-ic { background: #fff; color: #c27a12; }
.cf-node div { display: flex; flex-direction: column; }
.cf-node span { font-size: 12px; color: var(--ink-3); }
.cf-wait { display: flex; align-items: center; gap: 8px; margin: 0 0 0 26px; padding: 12px 0 12px 22px; border-left: 2px dashed #c8cde0; font-size: 13px; color: var(--ink-2); }
.cf-wait > span:first-child { display: inline-flex; gap: 5px; align-items: center; font-weight: 600; }
.cf-wait svg { width: 14px; height: 14px; }
.cf-wait input { width: 70px; height: 30px; }
.cf-wait select { width: auto; height: 30px; }
.cf-step { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.cf-step.sel { border-color: #9aa6f5; box-shadow: 0 0 0 4px rgba(106,121,255,.12); }
.cf-step + .cf-wait { margin-top: 0; }
.cf-step-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.cf-num { width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cf-vars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.cf-var { display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(0, .8fr); gap: 8px; align-items: center; }
.cf-var code { font-size: 12px; background: var(--indigo-soft); color: var(--indigo-2); border-radius: 6px; padding: 3px 6px; text-align: center; }
.cf-var select, .cf-var input { height: 32px; }
.cf-img { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cf-img input { flex: 1; min-width: 200px; height: 32px; }
.cf-btnnote { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; background: #f6f7fb; border-radius: 8px; padding: 7px 10px; }
.cf-btnnote svg { width: 14px; height: 14px; color: var(--indigo); flex: none; }
.cf-add { margin: 12px 0 0 26px; display: inline-flex; gap: 6px; align-items: center; border: 1.5px dashed #c3c9dd; background: #fbfbfe; border-radius: 10px; padding: 8px 14px; cursor: pointer; color: var(--indigo-2); font-weight: 600; }
.cf-add svg { width: 15px; height: 15px; }
.cf-add + .cf-node, .cf-step + .cf-node { margin-top: 12px; }
.cf-rules { margin-top: 16px; padding: 16px; }
.cf-rules h3 { font-size: 14px; margin-bottom: 12px; }
.cf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cf-row .field em, .field em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.cf-starter { margin-top: 16px; border: 1px solid #d6dcfb; background: linear-gradient(180deg, #f6f7ff, #fff); border-radius: 14px; padding: 14px 16px; }
.cf-starter > b { display: flex; gap: 6px; align-items: center; } .cf-starter > b svg { width: 16px; height: 16px; color: var(--indigo); }
.cf-starter p { font-size: 13px; color: var(--ink-2); margin: 6px 0 10px; }
.cf-starter-l { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.cf-starter-l div { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; }
.cf-starter-l span { font-size: 12px; color: var(--ink-3); }
@media (max-width: 900px) { .cf-grid, .ct-detail { grid-template-columns: 1fr; } .cf-right { position: static; } }

.ct-time p svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Countries: custom date range */
.geo-range { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.geo-range .seg button svg { width: 13px; height: 13px; }
.geo-cal { max-width: 470px; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.geo-cal.hidden { display: none; }
.geo-cal input[type=date] { width: auto; padding: 5px 8px; font-size: 13px; border-radius: 7px; }
.geo-cal .gc-to { font-size: 12.5px; color: var(--ink-3); }
.gc-step { border: 1px solid var(--line); background: #fff; width: 30px; height: 30px; border-radius: 7px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.gc-step:hover:not(:disabled) { background: var(--line-2); color: var(--ink); }
.gc-step:disabled { opacity: .35; cursor: default; }
.gc-quick { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; justify-content: flex-end; }
.gc-quick button { border: 0; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 550; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.gc-quick button:hover { color: var(--ink); }
.gc-quick button.active { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .geo-range { align-items: stretch; width: 100%; } .geo-cal, .gc-quick { justify-content: flex-start; } }
