:root {
  --bg: #F7F6FC;
  --surface: #FFFFFF;
  --surface-2: #F4F2FB;
  --surface-3: #ECE9F8;
  --ink: #1E1A33;
  --ink-2: #4D4866;
  --ink-3: #8A85A6;
  --line: #ECE9F5;
  --line-2: #DDD8EE;
  --violet: #6647F0;
  --violet-deep: #4A2FC9;
  --violet-mid: #7B68EE;
  --violet-soft: #B7A9FF;
  --violet-wash: #F1EEFF;
  --violet-ink: #4128B8;
  --ok: #128A4E; --ok-bg: #E5F7EC;
  --warn: #9A5B00; --warn-bg: #FFF3DD;
  --bad: #C42D37; --bad-bg: #FDECEE;
  --info: #2662C9; --info-bg: #E8F0FD;
  --shadow-1: 0 1px 2px rgba(30, 26, 51, .04), 0 4px 14px rgba(30, 26, 51, .04);
  --shadow-2: 0 10px 34px rgba(64, 40, 184, .10);
  --shadow-3: 0 24px 64px rgba(30, 20, 90, .20);
  --wa-bg: #EFE7DD; --wa-out: #D9FDD3; --wa-in: #FFFFFF; --wa-ink: #111B21; --wa-meta: #667781; --wa-tick: #53BDEB; --wa-head: #F0F2F5;
  --r: 18px; --r-sm: 12px;
  --display: 'Archivo', 'IBM Plex Sans', system-ui, sans-serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100D1F; --surface: #19152E; --surface-2: #211C3B; --surface-3: #2A244A;
    --ink: #F3F1FF; --ink-2: #C6C0E8; --ink-3: #8F89B8; --line: #2A2450; --line-2: #3A3268;
    --violet-wash: #2A2160; --violet-ink: #CFC5FF;
    --ok: #4CD38B; --ok-bg: #12301F; --warn: #F2B54B; --warn-bg: #33270F; --bad: #FF7A82; --bad-bg: #3A1519; --info: #7FB0FF; --info-bg: #142640;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px rgba(0, 0, 0, .35); --shadow-3: 0 24px 60px rgba(0, 0, 0, .55);
    --wa-bg: #0B141A; --wa-out: #005C4B; --wa-in: #202C33; --wa-ink: #E9EDEF; --wa-meta: #8696A0; --wa-head: #202C33;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #100D1F; --surface: #19152E; --surface-2: #211C3B; --surface-3: #2A244A;
  --ink: #F3F1FF; --ink-2: #C6C0E8; --ink-3: #8F89B8; --line: #2A2450; --line-2: #3A3268;
  --violet-wash: #2A2160; --violet-ink: #CFC5FF;
  --ok: #4CD38B; --ok-bg: #12301F; --warn: #F2B54B; --warn-bg: #33270F; --bad: #FF7A82; --bad-bg: #3A1519; --info: #7FB0FF; --info-bg: #142640;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 10px 30px rgba(0, 0, 0, .35); --shadow-3: 0 24px 60px rgba(0, 0, 0, .55);
  --wa-bg: #0B141A; --wa-out: #005C4B; --wa-in: #202C33; --wa-ink: #E9EDEF; --wa-meta: #8696A0; --wa-head: #202C33;
  color-scheme: dark;
}

* { box-sizing: border-box; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.55 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet); text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0; font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.okt { color: var(--ok); font-weight: 600; }
.warnt { color: var(--warn); }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.label .hint { font-weight: 400; color: var(--ink-3); margin-left: 4px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 22px; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; }
.brand .wm { width: 78px; height: 13px; background: var(--ink); -webkit-mask: url("brand/wordmark.svg") left center / contain no-repeat; mask: url("brand/wordmark.svg") left center / contain no-repeat; }
.brand .app-name { font: 600 14px var(--sans); color: var(--violet); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 20px; height: 20px; color: var(--ink-3); }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--violet-wash); color: var(--violet-ink); font-weight: 600; }
.nav a.on svg { color: var(--violet); }
.nav .badge { margin-left: auto; background: var(--ok); color: #fff; font: 700 11.5px var(--sans); min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.side-foot .who { line-height: 1.3; }
.side-foot .who b { display: block; font-size: 14px; }
.side-foot .who span { font-size: 12.5px; color: var(--ink-3); }

main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 18px 32px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); }
.top .title p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.top .live { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.view { padding: 8px 32px 64px; max-width: 1280px; width: 100%; animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card.pad { padding: 24px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 6px; flex-wrap: wrap; }
.card-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 10px 22px 20px; }
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.gap { gap: 16px; }
.stack.gap-l { gap: 22px; }
.spacer { flex: 1; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--violet-soft); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 6px 18px rgba(102, 71, 240, .28); }
.btn.primary:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
.btn.white { background: #fff; border-color: #fff; color: var(--violet-deep); box-shadow: 0 8px 22px rgba(0, 0, 0, .14); }
.btn.white:hover { background: #F4F1FF; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.soft-danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn.lg { min-height: 48px; height: auto; padding: 11px 22px; font-size: 15.5px; white-space: normal; line-height: 1.25; }
.btn.xl { min-height: 54px; padding: 12px 30px; font-size: 16.5px; border-radius: 14px; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 34px; }
.link { background: none; border: 0; padding: 0; color: var(--violet); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
.link svg { width: 16px; height: 16px; }
.links { gap: 20px; }

.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; padding: 14px; resize: vertical; line-height: 1.6; }
textarea.input.big { font-size: 15.5px; }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 16%, transparent); }
.input.sm { height: 36px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
.input.auto { width: auto; }
.input.num { width: 76px; text-align: center; }
label.f { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
label.f .hint, .hint { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); }
.search .input { padding-left: 38px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; flex: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; line-height: 1.5; }
.pill svg { width: 15px; height: 15px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.violet { background: var(--violet-wash); color: var(--violet-ink); }
.pill.big { padding: 6px 14px; font-size: 14px; }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--line-2); }
button.pill.on { box-shadow: inset 0 0 0 2px currentColor; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.pills button span { color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.pills button:hover { border-color: var(--violet-soft); }
.pills button.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.pills button.on span { color: rgba(255, 255, 255, .8); }

.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 14px var(--sans); color: #fff; background: linear-gradient(135deg, var(--h1, #7B68EE), var(--h2, #4A2FC9)); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }

.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); color: var(--ok); animation: pulse 2s infinite; flex: none; }
.pulse.warn { background: var(--warn); color: var(--warn); }
.pulse.bad { background: var(--bad); color: var(--bad); animation: none; }
.pulse.off { background: var(--ink-3); color: var(--ink-3); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.livepill { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); box-shadow: var(--shadow-1); max-width: 420px; }
.livepill .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; background: var(--violet); transition: width .5s; }
.bar > i.soft { background: var(--violet-soft); opacity: .7; }
.bar.thick { height: 12px; }
.bar.running > i:first-child { background-image: linear-gradient(110deg, var(--violet) 30%, var(--violet-mid) 50%, var(--violet) 70%); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { text-align: left; font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: var(--surface-2); }
table.t tbody tr.sel { background: var(--violet-wash); }
table.t.preview td { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.t.preview th.hit { color: var(--violet); }
.who-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-cell .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-cell .co { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tscroll { overflow: auto; max-height: calc(100vh - 300px); border-radius: var(--r); }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty .art { width: 64px; height: 64px; margin: 0 auto 14px; opacity: .85; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.note svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.info { background: var(--violet-wash); color: var(--violet-ink); }

details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--violet); font-weight: 600; font-size: 14px; user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; transition: transform .2s; }
details.more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details.more > summary svg { width: 17px; height: 17px; }
details.card.more > summary { color: var(--ink); }
.rules { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-size: 14px; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 34px 36px; color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
  background: radial-gradient(600px 320px at 92% -20%, rgba(183, 169, 255, .65), transparent 60%), linear-gradient(135deg, #5A3BEA, #6647F0 45%, #8E7BFF); box-shadow: var(--shadow-2); }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; background: url("brand/mark-violet.svg") center / contain no-repeat; opacity: .16; transform: rotate(-12deg); pointer-events: none; }
.hero h1 { font-size: 32px; }
.hero p { margin: 8px 0 22px; color: #EFEBFF; font-size: 16.5px; max-width: 520px; }
.hero-side { position: relative; z-index: 1; min-width: 220px; padding: 20px 22px; border-radius: 18px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.hero-side .big { font: 700 40px var(--display); line-height: 1; }
.hero-side .big span { font-size: 18px; font-weight: 600; opacity: .85; }
.hero-side .cap { margin: 6px 0 12px; color: #EFEBFF; font-size: 14px; }
.hbar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.hbar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); color: var(--ink); font-size: 14.5px; transition: background .15s; }
.step:hover { background: var(--surface-3); }
.step .k { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--violet); background: var(--surface); border: 2px solid var(--violet-soft); }
.step .k svg { width: 16px; height: 16px; }
.step.done .k { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.tile .ti { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--violet-wash); color: var(--violet); flex: none; }
.tile .ti svg { width: 21px; height: 21px; }
.tile.green .ti { background: var(--ok-bg); color: var(--ok); }
.tile .v { font: 700 28px var(--display); line-height: 1.1; }
.tile .v small { font-size: 16px; color: var(--ink-3); font-weight: 600; }
.tile .l { color: var(--ink-2); font-weight: 500; }
.tile .s { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.feed { display: flex; flex-direction: column; }
.feed .it { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: inherit; }
.feed .it:last-child { border-bottom: 0; }
a.it:hover b { color: var(--violet); }
.feed .it .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-3); }
.feed .it .ic svg { width: 16px; height: 16px; }
.feed .it .ic.reply { background: var(--ok-bg); color: var(--ok); }
.feed .it .ic.warn { background: var(--warn-bg); color: var(--warn); }
.feed .it .ic.sent { background: var(--violet-wash); color: var(--violet); }
.feed .it time { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; padding-left: 8px; }

/* ---------- whatsapp ---------- */
.sender .sh { display: flex; align-items: center; gap: 14px; padding: 22px 24px 16px; }
.sender .sh .nm { font: 700 18px var(--display); }
.sender .sb { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.sender.wide { grid-column: 1 / -1; }
.qrbox { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; padding: 20px; border-radius: 16px; background: var(--surface-2); }
.qrbox img { width: 240px; height: 240px; border-radius: 14px; background: #fff; padding: 10px; box-shadow: var(--shadow-2); }
.qrbox h3 { margin-bottom: 10px; }
.qrbox ol { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.code { font: 700 36px var(--display); letter-spacing: .12em; color: var(--violet-ink); background: var(--violet-wash); border-radius: 14px; padding: 16px; text-align: center; }
.today { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.protect { background: linear-gradient(180deg, var(--violet-wash), var(--surface) 70%); }
.shieldbig { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--violet); color: #fff; flex: none; }
.shieldbig svg { width: 26px; height: 26px; }
.protect-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.protect-grid div { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }
.protect-grid svg { width: 22px; height: 22px; color: var(--violet); margin-bottom: 6px; }
.protect-grid b { color: var(--ink); font-size: 14.5px; }

/* ---------- people ---------- */
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--violet-wash); border: 1px solid var(--violet-soft); }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; color: var(--ink); position: relative; transition: border-color .15s, background .15s; width: 100%; }
.choice b { font-size: 15px; }
.choice span { font-size: 13px; color: var(--ink-3); }
.choice em { position: absolute; top: -10px; right: 12px; font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--ok); color: #fff; padding: 2px 9px; border-radius: 99px; }
.choice:hover { border-color: var(--violet-soft); }
.choice.on { border-color: var(--violet); background: var(--violet-wash); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent); }
.choices { display: grid; gap: 12px; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- message editor ---------- */
.step-head { display: flex; align-items: flex-start; gap: 14px; }
.step-head .k { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--display); color: #fff; background: var(--violet); }
.step-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 14px; }
.step-head .count { font: 700 26px var(--display); color: var(--violet); line-height: 1; padding-top: 4px; }
.tokens { display: flex; gap: 8px; flex-wrap: wrap; }
.tokens button { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; padding: 7px 12px 7px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--violet-ink); cursor: pointer; }
.tokens button svg { width: 15px; height: 15px; color: var(--violet); }
.tokens button:hover { background: var(--violet-wash); border-color: var(--violet-soft); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed var(--line-2); border-radius: 16px; padding: 22px; text-align: center; color: var(--ink-3); cursor: pointer; transition: border-color .15s, background .15s; }
.drop svg { width: 26px; height: 26px; color: var(--violet); margin-bottom: 4px; }
.drop b { color: var(--ink); font-size: 15px; }
.drop span { font-size: 13.5px; }
.drop.big { padding: 48px 24px; }
.drop.big svg { width: 36px; height: 36px; }
.drop:hover, .drop.over { border-color: var(--violet); background: var(--violet-wash); }
.file { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.file .fthumb { width: 54px; height: 70px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line-2); background: #fff; flex: none; }
.file .ext { width: 46px; height: 54px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--sans); color: #fff; background: #E0463C; flex: none; }
.file .ext.img { background: var(--violet); }
.summary { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.summary svg { color: var(--violet); margin-top: 2px; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.pick-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.pick:last-child { border-bottom: 0; }
.pick:hover { background: var(--surface-2); }
.pick.on { background: var(--violet-wash); }
.tune { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--surface-2); }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.trow > span { color: var(--ink-2); font-weight: 500; }
.trow .row { gap: 8px; color: var(--ink-3); flex-wrap: wrap; }
.days { display: flex; gap: 5px; flex-wrap: wrap; }
.days button { min-width: 46px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; }
.days button.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { margin-top: 3px; }
.switch span small { display: block; color: var(--ink-3); font-size: 13px; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.ci { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.ci > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ci > span svg { width: 15px; height: 15px; stroke-width: 2.6; }
.ci.ok > span { background: var(--ok); color: #fff; }
.ci.ok { color: var(--ink-2); }
.ci.no > span { background: var(--bad-bg); color: var(--bad); }
.ci.no { color: var(--ink); font-weight: 600; }
.goodtoknow { padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); }
.goodtoknow > summary { color: var(--warn) !important; }
.goodtoknow ul { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 14px; }
.testbox { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); }
.testbox .label { margin-bottom: 0; }
.radio { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; flex-wrap: wrap; }
.radio:has(input:checked) { border-color: var(--violet); background: var(--violet-wash); }
.radio span { flex: 1; min-width: 160px; }
.radio span small { display: block; color: var(--ink-3); font-size: 13px; }
.radio .input { width: 190px; }
.launch-row { gap: 18px; padding-top: 4px; }
.runcard { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.runcard.running { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.runtop { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.bignum { font: 700 34px var(--display); line-height: 1.1; margin-top: 8px; }
.bignum span { font-size: 17px; color: var(--ink-3); font-weight: 600; }
.runstats { display: flex; gap: 26px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.runstats b { display: block; font: 700 20px var(--display); color: var(--ink); }
.tickword { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--ink-3); font-weight: 600; }
.tickword.read { color: #2F9AD8; }
svg.tick { width: 17px; height: 12px; }
svg.tick.read { color: var(--wa-tick); }
.camp { display: flex; align-items: center; gap: 18px; padding: 20px 22px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.camp:hover { border-color: var(--violet-soft); box-shadow: var(--shadow-2); }
.camp-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--violet-wash); color: var(--violet); flex: none; }
.camp-ic svg { width: 22px; height: 22px; }

/* phone preview */
.phone { position: sticky; top: 96px; width: 100%; max-width: 360px; margin: 0 auto; border-radius: 40px; padding: 11px; background: #1D1A2B; box-shadow: var(--shadow-3); }
.phone .screen { border-radius: 30px; overflow: hidden; background: var(--wa-bg); display: flex; flex-direction: column; height: 640px; }
.phone .bar-top { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--wa-head); color: var(--wa-ink); }
.phone .bar-top .nm { font-weight: 600; font-size: 15px; line-height: 1.2; }
.phone .bar-top .st { font-size: 12.5px; color: var(--wa-meta); }
.phone .chat { flex: 1; overflow: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.daytag { align-self: center; font-size: 12px; padding: 4px 12px; border-radius: 8px; background: var(--wa-in); color: var(--wa-meta); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); margin: 6px 0; }
.bubble { max-width: 88%; padding: 7px 9px 6px; border-radius: 10px; font-size: 14.5px; line-height: 1.45; color: var(--wa-ink); box-shadow: 0 1px .5px rgba(11, 20, 26, .13); white-space: pre-wrap; word-wrap: break-word; }
.bubble.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 3px; }
.bubble.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 3px; }
.bubble .meta { float: right; margin: 7px 0 -4px 10px; font-size: 11px; color: var(--wa-meta); display: inline-flex; align-items: center; gap: 3px; }
.bubble .by { font-size: 12px; font-weight: 600; color: var(--violet); margin-bottom: 2px; }
.bubble img.pic { display: block; max-height: 280px; object-fit: cover; border-radius: 7px; margin: -3px -5px 6px; width: calc(100% + 10px); }
.bubble audio { width: 240px; max-width: 100%; height: 38px; }
.doc { margin: -3px -5px 7px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .05); white-space: normal; }
.doc .docthumb { display: block; width: 100%; height: 150px; object-fit: cover; object-position: top; background: #fff; }
.docrow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; }
.docrow .ext { width: 32px; height: 38px; border-radius: 5px; background: #E0463C; color: #fff; display: grid; place-items: center; font: 700 9.5px var(--sans); flex: none; }
.docrow b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docrow span { font-size: 11.5px; color: var(--wa-meta); }
a.doclink { color: inherit; display: block; }
.phone .compose { display: flex; gap: 8px; padding: 8px 10px; background: var(--wa-head); }
.phone .compose div { flex: 1; height: 40px; border-radius: 20px; background: var(--wa-in); color: var(--wa-meta); display: flex; align-items: center; padding: 0 16px; font-size: 14px; }
.phone .compose i { width: 40px; height: 40px; border-radius: 50%; background: #00A884; display: block; }
.phone-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 14px; text-align: center; }

/* ---------- replies ---------- */
.inbox { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 140px); min-height: 520px; overflow: hidden; }
.convs { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.convs .head { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.convs .head .pills button { padding: 5px 11px; font-size: 13px; }
.convs .list { overflow: auto; flex: 1; }
.conv { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.conv:hover { background: var(--surface-2); }
.conv.on { background: var(--violet-wash); }
.conv .mid { min-width: 0; flex: 1; }
.conv .mid .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .mid .last { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .side2 { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.conv .side2 time { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.conv .un { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ok); color: #fff; font: 700 11.5px var(--sans); display: grid; place-items: center; }
.thread { display: flex; flex-direction: column; min-height: 0; background: var(--wa-bg); }
.thread .th { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.markbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.thread .msgs { flex: 1; overflow: auto; padding: 18px 8%; display: flex; flex-direction: column; gap: 6px; }
.thread .cmp { display: flex; gap: 10px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); align-items: flex-end; flex-wrap: wrap; }
.thread .cmp textarea { flex: 1 1 240px; min-width: 0; min-height: 44px; max-height: 160px; }
.stagebar { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- partner ---------- */
.partner-card .bigic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--violet-wash); color: var(--violet); }
.partner-card .bigic svg { width: 24px; height: 24px; }
.partner-card .btn { align-self: flex-start; }

/* ---------- dialogs ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20, 16, 40, .4); backdrop-filter: blur(3px); z-index: 50; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); animation: pop .22s both; }
.modal.wide { width: min(940px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal .mh, .drawer .mh { display: flex; align-items: center; gap: 12px; padding: 20px 24px 8px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal .mb, .drawer .mb { padding: 14px 24px 22px; }
.modal .mb ul { padding-left: 20px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.modal .mf { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 24px 20px; }
.drawer { position: fixed; z-index: 51; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--surface); box-shadow: var(--shadow-3); overflow: auto; animation: slide .25s both; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.map-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.done-hero { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; background: var(--ok-bg); }
.done-hero > svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--ok); color: #fff; stroke-width: 3; }
#toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: flex-start; max-width: 400px; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-3); font-size: 14.5px; animation: pop2 .25s both; cursor: pointer; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: #128A4E; color: #fff; }
@keyframes pop2 { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 520px at 85% -10%, rgba(183, 169, 255, .55), transparent 60%), linear-gradient(160deg, #F7F5FF, #EDE8FF); color: #1E1A33; }
.welcome .box { width: min(600px, 100%); text-align: center; }
.welcome .mark { width: 76px; height: 76px; filter: drop-shadow(0 12px 28px rgba(102, 71, 240, .35)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.welcome h1 { font-size: 34px; margin: 18px 0 10px; }
.welcome p { color: #4D4866; margin: 0 0 26px; font-size: 16.5px; }
.welcome .form { display: flex; gap: 10px; background: #fff; padding: 8px; border-radius: 18px; box-shadow: var(--shadow-2); }
.welcome .form .input { border: 0; height: 50px; font-size: 16px; box-shadow: none; background: transparent; color: #1E1A33; }
.welcome .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; text-align: left; }
.welcome .three div { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .75); font-size: 13.5px; color: #4D4866; }
.welcome .three b { display: block; color: #1E1A33; margin: 6px 0 3px; font-size: 14.5px; }
.welcome .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #6647F0; color: #fff; font-weight: 700; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .phone { position: static; }
  .steps, .protect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 861px) and (max-width: 1180px) { .inbox { grid-template-columns: 280px minmax(0, 1fr); } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 4px; border-right: 0; border-top: 1px solid var(--line); }
  .brand, .side-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10.5px; border-radius: 10px; }
  .nav .badge { position: absolute; top: 0; right: 6px; min-width: 18px; height: 18px; font-size: 10px; }
  .top { padding: 14px 16px 8px; flex-wrap: wrap; }
  .top .live { margin-left: 0; width: 100%; justify-content: flex-start; }
  .view { padding: 8px 16px 92px; }
  .cols-2, .cols-3, .hero, .qrbox, .choices.two, .choices.three, .welcome .three { grid-template-columns: minmax(0, 1fr); }
  .tiles, .steps, .protect-grid, .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 26px 22px; }
  .hero-side { min-width: 0; }
  .inbox { grid-template-columns: minmax(0, 1fr); height: auto; }
  .inbox.open .convs { display: none; }
  .inbox:not(.open) .thread { display: none; }
  .thread { height: calc(100vh - 210px); }
  .qrbox img { margin: 0 auto; }
  table.t .hide-sm { display: none; }
  .radio .input { width: 100%; }
}

/* ---------- leads ---------- */
.pill.lead svg { width: 13px; height: 13px; fill: currentColor; }
.leadlink { display: inline-flex; }
.leadlink:hover .pill { box-shadow: inset 0 0 0 1.5px currentColor; }
.nav .badge.warn { background: var(--warn); }
.un { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ok); color: #fff; font: 700 11.5px var(--sans); display: grid; place-items: center; flex: none; }
a.tilelink { color: inherit; display: block; }
a.tilelink .tile { height: 100%; transition: border-color .15s, box-shadow .15s; }
a.tilelink:hover .tile { border-color: var(--violet-soft); box-shadow: var(--shadow-2); }
.board { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; min-height: 160px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.col.over { border-color: var(--violet); background: var(--violet-wash); }
.colhead { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 14px; }
.colhead .muted { margin-left: auto; font-weight: 600; }
.colhead .dot { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); background: var(--ink-3); }
.colhead .dot.violet { background: var(--violet); } .colhead .dot.info { background: var(--info); } .colhead .dot.warn { background: var(--warn); } .colhead .dot.ok { background: var(--ok); }
.colbody { display: flex; flex-direction: column; gap: 10px; }
.colempty { padding: 18px 10px; text-align: center; color: var(--ink-3); font-size: 13px; border: 1px dashed var(--line-2); border-radius: 12px; }
.lcard { display: flex; flex-direction: column; gap: 9px; padding: 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: inherit; cursor: grab; transition: border-color .15s, box-shadow .15s, transform .1s; }
.lcard:hover { border-color: var(--violet-soft); box-shadow: var(--shadow-2); }
.lcard.dragging { opacity: .5; transform: rotate(1.5deg); }
.lmsg { font-size: 13px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.leadview { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.leadview .inbox.one { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 170px); }
.leadview .inbox.one .thread { height: 100%; }
.leadsteps { display: flex; flex-direction: column; gap: 6px; }
.lstep { display: flex; align-items: baseline; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.lstep b { font-size: 14px; min-width: 96px; }
.lstep span { font-size: 12.5px; color: var(--ink-3); }
.lstep:hover { border-color: var(--violet-soft); }
.lstep.on { border-color: var(--violet); background: var(--violet-wash); }
.lstep.won.on { border-color: var(--ok); background: var(--ok-bg); }
.lstep.lost.on { border-color: var(--line-2); background: var(--surface-2); }
.leadbox { padding: 12px 14px; border-radius: 14px; background: var(--violet-wash); }
@media (max-width: 1180px) { .leadview { grid-template-columns: minmax(0, 1fr); } .leadview .inbox.one { height: 70vh; } }
@media (max-width: 860px) { .board { grid-template-columns: minmax(0, 1fr); } .leadview .inbox.one .thread { display: flex; } }
@media (max-width: 860px) { .nav a { font-size: 9.5px; padding: 6px 1px; } .nav a svg { width: 19px; height: 19px; } }

/* ---------- quick replies, summary, stall QR ---------- */
.qchips { display: flex; align-items: center; gap: 6px; padding: 8px 16px 0; background: var(--surface); border-top: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.qchips > svg { color: var(--violet); width: 16px; height: 16px; }
.qchips button { flex: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--violet-ink); padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; }
.qchips button:hover { background: var(--violet-wash); border-color: var(--violet-soft); }
.qchips .link { margin-left: 4px; flex: none; }
.thread .qchips + .cmp { border-top: 0; }
.sumprev { max-width: 100%; margin-top: 10px; font-size: 13.5px; }
.qlist { display: flex; flex-direction: column; gap: 8px; }
.qitem { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.qbody { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qrcard { display: flex; gap: 26px; padding: 24px; align-items: flex-start; }
.qrcard.paused { opacity: .7; }
.qrimg { width: 230px; flex: none; padding: 12px; border-radius: 18px; background: #fff; border: 3px solid var(--violet); box-shadow: var(--shadow-2); }
.qrimg img { display: block; width: 100%; height: auto; }
.qrstats { display: flex; gap: 26px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.qrstats b { display: block; font: 700 22px var(--display); color: var(--ink); }
.bubble.qrmsg { max-width: 100%; display: inline-block; }
.qrhero { gap: 18px; }
.qrsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.qrsteps div { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.qrsteps b { width: 30px; height: 30px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 700 14px var(--display); }
@media (max-width: 860px) { .qrcard { flex-direction: column; } .qrimg { width: 100%; max-width: 280px; margin: 0 auto; } .qrsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
svg.up { transform: rotate(90deg); }

/* ---------- photos ---------- */
.tray { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px 0; background: var(--surface); }
.titem { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.titem img { width: 100%; height: 100%; object-fit: cover; }
.titem .ext { font: 700 12px var(--sans); color: #fff; background: #E0463C; padding: 6px 8px; border-radius: 6px; }
.titem.uploading img { opacity: .45; }
.titem.error { border-color: var(--bad); }
.titem .tbusy { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; text-align: center; background: rgba(0, 0, 0, .55); color: #fff; padding: 2px 0; }
.titem .tx { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.titem .tx svg { width: 13px; height: 13px; }
.tnote { flex-basis: 100%; }
.thread .tray + .cmp, .thread .tray:not(.hidden) + .cmp { border-top: 0; }
.ctiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ctiles:empty { display: none; }
.ctile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ctile img { width: 100%; height: 100%; object-fit: cover; }
.ctile .cnum { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--violet); color: #fff; font: 700 12px var(--sans); display: grid; place-items: center; }
.ctile .cact { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.ctile .cact button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ctile .cact svg { width: 14px; height: 14px; }
.cprev:empty { display: none; }
.cprevimg { display: block; max-width: 100%; max-height: 380px; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow-2); }
@media (max-width: 860px) { .ctiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .tray { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .titem { width: 54px; height: 54px; }
  .tnote { flex: none; width: 190px; }
}

/* Do not message */
.dndbox { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.dndbox > svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.dndbox b { display: block; font-size: 14px; }
.dndbox .grow > span { display: block; font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.dndbox.on { background: var(--bad-bg); border-color: transparent; }
.dndbox.on > svg, .dndbox.on b { color: var(--bad); }
.small.muted > svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Not relevant replies and cleared chats */
.ibulk { display: grid; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--violet-wash); font-size: 13.5px; }
.ibulk .acts { display: flex; gap: 6px; }
.ibulk .acts .btn { flex: 1; justify-content: center; padding-left: 8px; padding-right: 8px; }
.conv .ck { flex: none; width: 18px; height: 18px; margin: 11px 0 0; accent-color: var(--violet); pointer-events: none; }
.conv.picked { background: var(--violet-wash); }
.clearbar { display: flex; align-items: center; gap: 10px; padding: 9px 18px; background: var(--warn-bg); color: var(--ink-2); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.clearbar > svg { width: 17px; height: 17px; flex: none; color: var(--warn); }
.bubble.irr { opacity: .55; }
.bubble.irr .by { color: var(--wa-meta); }
.bubble .bact { border: 0; background: none; padding: 0 6px 0 0; font: inherit; font-size: 11px; color: var(--violet); cursor: pointer; opacity: 0; transition: opacity .12s; }
.bubble:hover .bact, .bubble .bact:focus-visible, .bubble.irr .bact { opacity: 1; }
@media (hover: none) { .bubble .bact { opacity: .8; } }
.mwrap { position: relative; }
.mwrap .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(20, 12, 60, .18); }
.mwrap .menu button { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mwrap .menu button:hover { background: var(--violet-wash); }
.mwrap .menu button svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--ink-3); }
.mwrap .menu button small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.mwrap .menu button.danger, .mwrap .menu button.danger svg { color: var(--bad); }
