/* Sendora - app stylesheet */
:root {
  --brand: #0f9d58;
  --brand-600: #0b8a4c;
  --brand-50: #e8f6ee;
  --brand-100: #c9ecd8;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --bg: #f6f8fa;
  --card: #ffffff;
  --sidebar: #0b1f17;
  --sidebar-ink: #a7c4b5;
  --sidebar-active: #13372a;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --warn: #b45309;
  --warn-50: #fffbeb;
  --info: #2563eb;
  --info-50: #eff6ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.icon { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; color: #fff; font-weight: 700; font-size: 17px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--sidebar-ink); letter-spacing: .02em; }
.nav { padding: 8px 12px 16px; flex: 1; }
.nav-section { margin-top: 14px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #5f8574; padding: 0 10px 6px; font-weight: 600; }
.nav a, .nav .nav-soon { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--sidebar-ink); font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.nav a.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav .nav-soon { opacity: .45; cursor: default; }
.nav .pill-soon { margin-left: auto; font-size: 10px; border: 1px solid currentColor; border-radius: 99px; padding: 0 6px; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; object-fit: cover; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 6px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-size: 17px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; color: var(--ink); }
.menu-toggle:hover { background: var(--line-2); color: var(--ink); }
.content { padding: 28px; max-width: 1240px; width: 100%; }

/* ------------------------------------------------------------ components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 600; }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }

.hero { padding: 26px; display: flex; gap: 20px; align-items: center; justify-content: space-between; background: linear-gradient(120deg, #0b1f17 0%, #0f5a37 100%); color: #e6f4ec; border: 0; }
.hero h2 { color: #fff; font-size: 20px; margin-bottom: 4px; }
.hero p { margin: 0; color: #b7d7c6; max-width: 560px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--line-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost-danger { background: transparent; color: var(--danger); border-color: #fecaca; }
.btn-ghost-danger:hover { background: var(--danger-50); }
.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=number], .field input[type=datetime-local], .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: 12.5px; }
.field.has-error input { border-color: #fca5a5; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-size: 13.5px; }
.alert-success { background: var(--brand-50); border-color: var(--brand-100); color: #065f37; }
.alert-error { background: var(--danger-50); border-color: #fecaca; color: #991b1b; }
.alert-warning { background: var(--warn-50); border-color: #fde68a; color: var(--warn); }
.alert-info { background: var(--info-50); border-color: #bfdbfe; color: #1e40af; }
.alert .close { margin-left: auto; color: inherit; opacity: .6; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); }
.badge-green { background: var(--brand-50); color: var(--brand-600); }
.badge-red { background: var(--danger-50); color: var(--danger); }
.badge-amber { background: var(--warn-50); color: var(--warn); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 22px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 22px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfcfd; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin: 0 auto 12px; }
.empty h3 { color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.roadmap li:last-child { border-bottom: 0; }
.roadmap .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); }
.roadmap .done .dot { background: var(--brand); color: #fff; }
.roadmap li > div { flex: 1; }
.roadmap b { display: block; font-weight: 600; }
.roadmap span { color: var(--muted); font-size: 13px; }

.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.narrow { max-width: 520px; }
.right { text-align: right !important; }
.row-actions { display: inline-flex; gap: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.search { position: relative; display: flex; align-items: center; color: var(--muted); }
.search .icon { position: absolute; left: 10px; pointer-events: none; }
.search .input { height: 34px; padding-left: 32px; width: 220px; }

/* tag chips + colour picker */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-green { background: #e8f6ee; color: #0b8a4c; }
.chip-blue { background: #eff6ff; color: #2563eb; }
.chip-purple { background: #f5f3ff; color: #7c3aed; }
.chip-pink { background: #fdf2f8; color: #db2777; }
.chip-red { background: #fef2f2; color: #dc2626; }
.chip-orange { background: #fff7ed; color: #ea580c; }
.chip-yellow { background: #fefce8; color: #a16207; }
.chip-slate { background: #f1f5f9; color: #475569; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { cursor: pointer; margin: 0 !important; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-dot { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); position: relative; }
.swatch-dot::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: currentColor; }
.swatch input:checked + .swatch-dot { box-shadow: 0 0 0 2px currentColor; }
.swatch input:focus-visible + .swatch-dot { outline: 2px solid var(--brand); outline-offset: 2px; }

/* contacts */
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary { margin-bottom: 18px; }
.stat-icon-red { background: var(--danger-50); color: var(--danger); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.filters .input { height: 36px; width: auto; }
.filters .grow { flex: 1; min-width: 220px; }
.filters .grow .input { width: 100%; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 22px; background: var(--brand-50); border-bottom: 1px solid var(--brand-100); }
.bulk-bar .input { height: 32px; width: auto; }
.table-wrap { overflow-x: auto; }
.table .check { width: 44px; padding-right: 0; }
.table.compact td, .table.compact th { padding: 7px 12px; }
.person { display: flex; align-items: center; gap: 10px; }
.person b { display: block; font-weight: 600; }
.person .muted { font-size: 12.5px; }
.avatar-soft { background: var(--brand-50); color: var(--brand-600); width: 32px; height: 32px; font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--danger); cursor: pointer; padding: 0; white-space: nowrap; }
.toggle .knob { width: 30px; height: 18px; border-radius: 99px; background: #fecaca; position: relative; transition: background .15s; }
.toggle .knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left .15s; }
.toggle.on { color: var(--brand-600); }
.toggle.on .knob { background: var(--brand); }
.toggle.on .knob::after { left: 14px; }
.medium { max-width: 720px; }
.grid.tight { gap: 0 16px; }
.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-option { margin: 0 !important; cursor: pointer; }
.chip-option input { position: absolute; opacity: 0; pointer-events: none; }
.chip-option span { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; color: var(--ink-2); background: #fff; transition: all .12s; }
.chip-option input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand-600); }
.chip-option input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 16px; cursor: pointer; font-weight: 400 !important; }
.check-row.warn { border-color: #fde68a; background: var(--warn-50); }
.check-row input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }
.split-wide { grid-template-columns: minmax(0, 1fr) 340px; }
.dropzone { display: flex !important; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; font-weight: 400 !important; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--brand); background: #fbfefc; }
.dropzone .icon-wrap { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; }
.dropzone input { font-size: 12px; margin-top: 6px; max-width: 100%; }
.result { border-top: 1px solid var(--line); }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.result-stats div { background: var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.result-stats b { display: block; font-size: 20px; }
.result-stats span { color: var(--muted); font-size: 12px; }
.result-stats .bad { background: var(--danger-50); color: var(--danger); }
.sub-h { font-size: 13px; margin: 6px 0 8px; }
.guide h2 { font-size: 15px; margin-bottom: 4px; }
.guide code { background: var(--line-2); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }
.guide .table td { padding: 7px 0; vertical-align: top; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); }
.pager div { display: flex; align-items: center; gap: 10px; }

/* templates */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar .grow .input { width: 100%; height: 38px; }
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px; }
.segmented a { padding: 5px 12px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13px; text-decoration: none; }
.segmented a.active { background: var(--brand-50); color: var(--brand-600); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; overflow: hidden; }
.tpl-card header { padding: 16px 18px 12px; }
.tpl-card h3 { font-size: 15px; margin-bottom: 6px; }
.tpl-card h3 a { color: var(--ink); }
.tpl-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; }
.tpl-chat { flex: 1; background: #efeae2; padding: 14px 16px; max-height: 210px; overflow: hidden; position: relative; }
.tpl-chat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(transparent, #efeae2); }
.cat-marketing { background: #fdf2f8; color: #be185d; }
.cat-utility { background: var(--info-50); color: var(--info); }
.cat-greeting { background: var(--brand-50); color: var(--brand-600); }

.bubble { background: #fff; border-radius: 0 8px 8px 8px; padding: 7px 9px 8px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); font-size: 14px; line-height: 1.45; color: #111b21; word-wrap: break-word; max-width: 100%; display: inline-block; }
.bubble.out { background: #d9fdd3; border-radius: 8px 0 8px 8px; float: right; max-width: 88%; }
.bubble code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.bubble .meta { float: right; margin: 6px 0 -4px 10px; font-size: 11px; color: #667781; }
.bubble .ticks { color: #53bdeb; letter-spacing: -3px; margin-right: 3px; }
.ph { display: inline-block; background: #fff3c4; color: #8a5a00; border-radius: 4px; padding: 0 4px; font-size: .92em; font-weight: 600; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.composer { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.field .composer textarea { border: 0; border-radius: 0; box-shadow: none !important; min-height: 200px; }
.composer-tools { display: flex; align-items: center; gap: 2px; padding: 6px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.composer-tools button { border: 0; background: none; height: 30px; min-width: 30px; padding: 0 8px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.composer-tools button:hover { background: var(--line-2); color: var(--ink); }
.composer-tools .mono-btn { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.composer-tools .sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.composer-tools .add-var { color: var(--brand-600); font-weight: 600; font-size: 13px; }
.composer-foot { display: flex; justify-content: space-between; padding: 6px 12px; border-top: 1px solid var(--line-2); font-size: 12px; }
.error-text { color: var(--danger) !important; }
.samples h3 { font-size: 13px; margin-bottom: 10px; }
.samples-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sample { display: flex; align-items: center; gap: 8px; }
.sample .ph { flex-shrink: 0; min-width: 40px; text-align: center; }
.sample .input { height: 36px; }
.card-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 var(--radius) var(--radius); }

.preview-col { position: sticky; top: 80px; }
.phone { border-radius: 26px; border: 8px solid #1f2937; overflow: hidden; background: #efeae2; box-shadow: var(--shadow); }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #008069; color: #fff; }
.phone-top small { display: block; font-size: 11.5px; opacity: .8; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; background: rgba(255, 255, 255, .25); }
.phone-chat { min-height: 360px; padding: 18px 12px; background-color: #efeae2; background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 14px 14px; overflow: auto; }
.phone-chat::after { content: ''; display: block; clear: both; }
.hint { display: flex; gap: 6px; color: var(--muted); font-size: 12.5px; margin: 12px 4px 0; }
.hint .icon { margin-top: 2px; }

/* whatsapp link */
.small { font-size: 12.5px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-side { display: grid; gap: 18px; }
.wa-card .wa-error { margin: 16px 22px 0; }
.wa-panel { padding: 30px 26px; text-align: center; }
.wa-panel h3 { font-size: 17px; margin: 14px 0 6px; }
.wa-panel p { margin: 0 auto 18px; max-width: 420px; }
.wa-hero { width: 64px; height: 64px; border-radius: 18px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin: 0 auto; }
.wa-hero.ok { background: var(--brand); color: #fff; margin: 0; flex-shrink: 0; }
.wa-qr-panel { display: grid; grid-template-columns: auto 1fr; gap: 26px; text-align: left; align-items: center; }
.wa-qr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; line-height: 0; box-shadow: var(--shadow); }
.wa-qr svg { display: block; max-width: 100%; height: auto; shape-rendering: crispEdges; }
.wa-steps h3 { margin-top: 0; }
.wa-steps ol { padding-left: 20px; margin: 0 0 14px; display: grid; gap: 8px; color: var(--ink-2); }
.wa-steps p { margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.wa-linked { display: flex; align-items: center; gap: 16px; text-align: left; justify-content: center; margin-bottom: 16px; }
.wa-linked h3 { margin: 0 0 2px; }
.wa-phone { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--brand-100); border-top-color: var(--brand); margin: 0 auto; animation: spin .8s linear infinite; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex-shrink: 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.wa-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 99px; background: var(--line-2); color: var(--muted); white-space: nowrap; text-decoration: none !important; }
.wa-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.wa-pill[data-state=connected] { background: var(--brand-50); color: var(--brand-600); }
.wa-pill[data-state=connected] .dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.wa-pill[data-state=qr], .wa-pill[data-state=connecting] { background: var(--warn-50); color: var(--warn); }
.wa-pill[data-state=qr] .dot, .wa-pill[data-state=connecting] .dot { background: #f59e0b; }
.wa-pill[data-state=closed], .wa-pill[data-state=logged_out], .wa-pill[data-state=offline] { background: var(--danger-50); color: var(--danger); }
.wa-pill[data-state=closed] .dot, .wa-pill[data-state=logged_out] .dot, .wa-pill[data-state=offline] .dot { background: var(--danger); }
.wa-pill.top { margin-left: 4px; }

/* campaigns */
.center { text-align: center; }
.warn-text { color: var(--warn) !important; }
.code-block { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; margin: 8px 0 12px; overflow-x: auto; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.55; }
.api-new-key .code-block { white-space: pre-wrap; word-break: break-all; }
.inline-code { background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.badge-blue { background: var(--info-50); color: var(--info); }
.badge-slate { background: var(--line-2); color: var(--ink-2); }
.badge .pulse { width: 7px; height: 7px; background: currentColor; }
.row-link { cursor: pointer; }
.progress { display: flex; height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-bottom: 4px; }
.progress span { display: block; height: 100%; transition: width .4s; }
.progress.big { height: 12px; }
.p-sent { background: var(--brand); }
.p-failed { background: var(--danger); }
.p-skipped { background: #f59e0b; }

.steps { display: grid; gap: 18px; }
.step-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px 0; }
.step-head h2 { font-size: 15px; }
.step-no { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.option-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.option-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option-card { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; margin: 0 !important; transition: border-color .15s, background .15s; font-weight: 400 !important; }
.option-card input { margin-top: 3px; accent-color: var(--brand); }
.option-card b { display: block; font-size: 13.5px; color: var(--ink); }
.option-card small { color: var(--muted); font-size: 12px; }
.option-card:has(input:checked) { border-color: var(--brand); background: #f6fcf8; box-shadow: 0 0 0 1px var(--brand); }
.aud-panel { margin-top: 14px; }
.picker { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.picker-bar { display: flex; gap: 8px; padding: 8px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.picker-bar .grow { flex: 1; }
.picker-bar .input { height: 32px; width: 100%; }
.picker-list { max-height: 280px; overflow-y: auto; }
.pick-row { display: grid !important; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; margin: 0 !important; font-weight: 400 !important; }
.pick-row:hover { background: #fbfcfd; }
.pick-row input { accent-color: var(--brand); }
.pick-name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-phone { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pick-tags { grid-column: 2 / -1; display: flex; gap: 4px; flex-wrap: wrap; }
.pick-tags:empty { display: none; }
.picker-foot { padding: 8px 12px; background: #fafbfc; border-top: 1px solid var(--line); }
.vars { border-top: 1px solid var(--line); padding-top: 14px; }
.vars-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vars-head label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.small-seg { padding: 2px; }
.small-seg a, .seg-radio span { padding: 4px 10px; font-size: 12.5px; }
.seg-radio { margin: 0 !important; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: inline-block; border-radius: 6px; color: var(--ink-2); font-weight: 500; }
.seg-radio input:checked + span { background: var(--brand-50); color: var(--brand-600); }
.vars-rows { display: grid; gap: 8px; margin-top: 8px; }
.var-row { display: grid; grid-template-columns: 48px 190px minmax(0, 1fr); gap: 8px; align-items: center; }
.var-row .input { height: 36px; width: 100%; }
.var-row .ph { text-align: center; }
.summary-card { margin-top: 14px; padding: 16px 18px; }
.summary-card dl { margin: 0 0 12px; display: grid; gap: 8px; }
.summary-card dl div { display: flex; justify-content: space-between; align-items: center; }
.summary-card dt { color: var(--muted); }
.summary-card dd { margin: 0; }
.summary-card p { margin: 8px 0 0; }

.camp-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px; margin-bottom: 14px; }
.camp-title { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.camp-stats { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1280px) { .camp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-mini { padding: 12px 16px; }
.stat-mini span { display: block; color: var(--muted); font-size: 12px; }
.stat-mini b { font-size: 22px; letter-spacing: -.02em; }
.stat-mini.ok b { color: var(--brand-600); }
.stat-mini.bad b { color: var(--danger); }
.stat-mini.warn b { color: var(--warn); }
.camp-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.small-phone .phone-chat { min-height: 200px; }
.vars-legend { margin-top: 12px; display: grid; gap: 6px; font-size: 13px; }

/* rich messages: type pills, media upload, media in bubbles */
.kind-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-pill { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: #f8fafc; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; transition: all .15s; }
.kind-pill:hover { border-color: var(--brand-100); background: #fff; }
.kind-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 6px rgba(15, 157, 88, .25); }
.kind-badge { background: #f5f3ff; color: #6d28d9; }
.media-picker .dropzone { padding: 22px 16px; }
.media-picker .dropzone.hidden { display: none !important; } /* .dropzone forces display:flex */
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row label { margin-bottom: 6px; }
.media-picker .dropzone.drag { border-color: var(--brand); background: var(--brand-50); }
.media-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfc; }
.media-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-info { flex: 1; min-width: 0; }
.media-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-picker [data-media-status] { margin-top: 8px; }

.bubble.has-media { padding: 3px 3px 8px; width: 270px; max-width: 88%; }
.bubble.has-media .wa-caption { padding: 6px 6px 0; }
.bubble.has-media .meta { margin-right: 6px; }
.wa-media { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 6px; background: #d1d7db; }
.wa-video { position: relative; }
.wa-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, .45); }
.wa-play::after { content: ''; position: absolute; left: 18px; top: 13px; border-left: 14px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.wa-media-empty { height: 150px; border-radius: 6px; background: repeating-linear-gradient(45deg, #e9edef, #e9edef 10px, #f0f2f5 10px, #f0f2f5 20px); display: grid; place-items: center; color: #667781; font-size: 13px; }
.wa-doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; background: rgba(0, 0, 0, .05); color: #111b21; text-decoration: none !important; }
.wa-doc-ext { width: 38px; height: 46px; border-radius: 4px; background: #e53935; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: end center; padding-bottom: 6px; flex-shrink: 0; }
.wa-doc div { min-width: 0; }
.wa-doc b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-doc span { font-size: 11.5px; color: #667781; }
.wa-doc .wa-doc-ext { color: #fff; font-size: 10px; }
.wa-loc { display: block; border-radius: 6px; overflow: hidden; color: #111b21; text-decoration: none !important; }
.wa-loc-map { height: 130px; position: relative; background-color: #e5ecd9; background-image: linear-gradient(#f7f3e8 2px, transparent 2px), linear-gradient(90deg, #f7f3e8 2px, transparent 2px), linear-gradient(35deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%); background-size: 34px 34px, 34px 34px, 100% 100%; }
.wa-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; background: #e53935; transform: rotate(-45deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.wa-pin::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.wa-loc-text { padding: 8px 8px 2px; }
.wa-loc-text b { display: block; font-size: 13.5px; }
.wa-loc-text span { font-size: 12px; color: #667781; }
.tpl-chat .bubble.has-media { width: 100%; max-width: 100%; }

/* template builder v2 */
.step-head > div { min-width: 0; }
.step-sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.step-head { align-items: flex-start; }
.step-head .step-no { margin-top: 1px; flex-shrink: 0; }
.sub-label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin: 14px 0 8px; }
.btn-list { display: grid; gap: 10px; margin-bottom: 12px; }
.btn-list:empty { display: none; }
.btn-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 32px; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafbfc; }
.btn-row.no-remove { grid-template-columns: 140px minmax(0, 1fr); }
.tpl-buttons { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 16px; }
.btn-type { font-weight: 600; font-size: 13px; color: var(--ink-2); padding-top: 8px; }
.btn-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; align-items: center; }
.btn-fields .input { height: 36px; width: 100%; }
.btn-fields .muted { grid-column: 1 / -1; }
.btn-remove { color: var(--muted); margin-top: 4px; }
.btn-remove:hover { background: var(--danger-50); color: var(--danger); }
.add-btn-wrap { position: relative; display: flex; align-items: center; gap: 12px; }
.add-btn-menu { position: absolute; top: 38px; left: 0; z-index: 10; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(15, 23, 42, .12); padding: 6px; }
.add-btn-menu button { display: flex; width: 100%; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.add-btn-menu button:hover:not(:disabled) { background: var(--line-2); }
.add-btn-menu button:disabled { color: var(--muted); cursor: not-allowed; }
.add-btn-menu small { color: var(--muted); }
.add-btn-menu button[data-add-btn="quick_reply"] { border-bottom: 1px solid var(--line-2); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.reply-style { border-top: 1px solid var(--line); margin-top: 16px; }
.form-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; position: sticky; bottom: 12px; z-index: 4; }
.preview-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-weight: 600; font-size: 13px; color: var(--brand-600); margin: 0 4px 10px; }
.preview-label .muted { font-weight: 400; font-size: 12px; flex-basis: 100%; padding-left: 20px; }
.phone-chat .bubble.out { clear: both; margin-bottom: 6px; }
.wa-poll { min-width: 220px; }
.wa-poll b { display: block; font-size: 14px; margin-bottom: 2px; }
.wa-poll-hint { display: block; font-size: 11.5px; color: #667781; margin-bottom: 8px; }
.wa-poll-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.wa-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #8696a0; flex-shrink: 0; }
.wa-poll-foot { text-align: center; color: #008069; font-size: 13.5px; font-weight: 500; padding-top: 8px; }
.tpl-chat .bubble + .bubble { margin-top: 6px; }

/* poll editor */
.poll-options { display: grid; gap: 8px; margin-bottom: 10px; }
.poll-option { display: flex; align-items: center; gap: 10px; }
.poll-option .wa-radio { flex-shrink: 0; }
.poll-option .input { flex: 1; min-width: 0; height: 38px; }
.poll-option .btn-remove { flex-shrink: 0; width: 32px; height: 32px; margin: 0; }
.poll-option .btn-remove:disabled { opacity: .3; cursor: not-allowed; background: none; color: var(--muted); }
.poll-editor .check-row { margin-top: 4px; }

/* inbox */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.content.content-full { padding: 0; max-width: none; height: calc(100vh - 60px); }
.content.content-full > .alert { margin: 12px 16px 0; }
.inbox { position: relative; display: grid; grid-template-columns: 340px minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); height: 100%; background: #fff; border-top: 0; overflow: hidden; }
.inbox > .ib-list, .inbox > .ib-thread, .inbox > .ib-info { grid-row: 2; }
/* Its own row, so a wrapped (multi-line) warning pushes the panes down instead of covering them. */
.inbox-banner { grid-column: 1 / -1; grid-row: 1; display: flex; gap: 8px; align-items: flex-start; padding: 8px 16px; background: var(--warn-50); color: var(--warn); font-size: 13px; border-bottom: 1px solid #fde68a; }
.inbox-banner .icon { margin-top: 2px; }
.ib-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ib-list-head { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.ib-list-head .search .input { width: 100%; height: 36px; }
.ib-items { overflow-y: auto; flex: 1; }
.ib-loading { padding: 30px 16px; }
.ib-item { display: flex; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ib-item:hover { background: #f7f8fa; }
.ib-item.active { background: var(--brand-50); }
.ib-item .avatar { width: 42px; height: 42px; font-size: 14px; }
.ib-item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-item-top, .ib-item-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ib-item-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item-top small { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }
.ib-item.unread .ib-item-top small { color: var(--brand-600); font-weight: 600; }
.ib-preview { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item.unread .ib-preview { color: var(--ink-2); font-weight: 500; }
.ib-you { color: var(--muted); }
.ib-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0; }
.ib-count:empty { display: none; }

.ib-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #efeae2; background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 14px 14px; }
.ib-empty { margin: auto; text-align: center; max-width: 340px; padding: 20px; }
.ib-empty .icon-wrap { width: 64px; height: 64px; border-radius: 18px; background: #fff; color: var(--brand-600); display: grid; place-items: center; margin: 0 auto 12px; }
.ib-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #f0f2f5; border-bottom: 1px solid var(--line); }
.ib-head-text { flex: 1; min-width: 0; display: grid; }
.ib-head-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-back { display: none; font-size: 20px; color: var(--ink); }
.ib-messages { flex: 1; overflow-y: auto; padding: 14px 6% 10px; }
.ib-row { display: flex; margin: 2px 0; }
.ib-row.out { justify-content: flex-end; }
.ib-row .bubble { position: relative; max-width: min(560px, 78%); float: none; display: block; }
.ib-row .bubble.in { background: #fff; border-radius: 0 8px 8px 8px; }
.ib-row .bubble.has-media { width: 300px; }
.ib-row + .ib-row.out .bubble, .ib-row.in + .ib-row.in .bubble { border-radius: 8px; }
.ib-src { font-size: 11px; color: #667781; margin: 0 0 3px; font-weight: 600; }
.ib-day { text-align: center; margin: 12px 0 8px; }
.ib-day span, .ib-system span { display: inline-block; background: #fff; color: #54656f; font-size: 12px; padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.ib-system { text-align: center; margin: 8px 0; }
.ib-system span { background: #fff8c5; color: #6b5b00; }
.ib-tick { margin-left: 2px; letter-spacing: -3px; color: #8696a0; }
.ib-tick.read, .ib-tick.played { color: #53bdeb; }
.ib-tick.failed { color: var(--danger); letter-spacing: 0; }
.tick-blue { color: #34b7f1; }
.ib-reaction { position: absolute; bottom: -12px; right: 8px; background: #fff; border-radius: 99px; padding: 0 5px; font-size: 13px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ib-row:has(.ib-reaction) { margin-bottom: 14px; }
.ib-quote { border-left: 4px solid #06cf9c; background: rgba(0, 0, 0, .05); border-radius: 6px; padding: 5px 8px; margin-bottom: 4px; font-size: 13px; color: #54656f; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ib-quote.you { border-left-color: #53bdeb; }
.ib-img { display: block; width: 100%; max-height: 340px; object-fit: cover; border-radius: 6px; }
.ib-sticker { display: block; width: 140px; height: 140px; object-fit: contain; }
.ib-video { display: block; width: 100%; max-height: 340px; border-radius: 6px; background: #000; }
.ib-audio { width: 260px; max-width: 100%; height: 40px; }
.ib-media-missing, .ib-deleted { font-style: italic; color: #667781; font-size: 13px; padding: 2px 0; }
.ib-contact-card { padding: 8px 4px; }
.wa-poll-opt.voted .wa-radio { border-color: #00a884; background: #00a884; color: #fff; font-size: 11px; display: grid; place-items: center; }
.ib-poll-result { font-size: 12.5px; color: #54656f; padding-top: 6px; }

.ib-composer { background: #f0f2f5; padding: 8px 12px 6px; border-top: 1px solid var(--line); }
.ib-compose-row { display: flex; align-items: flex-end; gap: 6px; }
.ib-compose-row textarea { flex: 1; resize: none; border: 0; border-radius: 10px; padding: 10px 12px; font: inherit; line-height: 1.4; max-height: 160px; background: #fff; outline: none; }
.ib-tool { color: #54656f; width: 40px; height: 40px; cursor: pointer; }
.ib-tool:hover { background: rgba(0, 0, 0, .06); color: var(--ink); }
.ib-send { width: 44px; height: 42px; padding: 0; border-radius: 50%; }
.ib-compose-foot { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px 0; min-height: 18px; }
.ib-attach-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 8px; padding: 4px 4px 4px 10px; margin-bottom: 6px; font-size: 13px; box-shadow: var(--shadow); }
.ib-tpl-wrap { position: relative; }
.ib-tpl-menu { position: absolute; bottom: 46px; left: 0; z-index: 10; width: 320px; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(15, 23, 42, .14); padding: 4px; }
.ib-tpl-menu button { display: grid; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.ib-tpl-menu button:hover { background: var(--line-2); }
.ib-tpl-menu span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-cant-reply { padding: 14px; text-align: center; background: #f0f2f5; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

.ib-info { width: 300px; border-left: 1px solid var(--line); padding: 20px 18px; overflow-y: auto; background: #fff; }
.ib-info-head { display: grid; justify-items: center; gap: 4px; text-align: center; margin-bottom: 16px; }
.avatar.big { width: 72px; height: 72px; font-size: 24px; }
.ib-dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 8px; margin: 0 0 16px; font-size: 13px; }
.ib-dl dt { color: var(--muted); }
.ib-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ib-notes { white-space: pre-wrap; }
.ib-info .btn-block { margin-bottom: 10px; }

/* campaign receipts + poll results */
.stat-mini.read b { color: #34b7f1; }
.stat-mini span { white-space: nowrap; }
.poll-results { margin-top: 12px; }
.poll-results h3 { font-size: 14px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.pr-row { margin-bottom: 10px; }
.pr-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }

@media (max-width: 1180px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .ib-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 7; box-shadow: -8px 0 24px rgba(15, 23, 42, .12); }
}
@media (max-width: 900px) {
  .content.content-full { height: calc(100vh - 60px); }
  .inbox { grid-template-columns: 1fr; }
  .inbox .ib-thread { display: none; }
  .inbox.show-thread .ib-list { display: none; }
  .inbox.show-thread .ib-thread { display: flex; }
  .ib-back { display: inline-grid; }
  .ib-messages { padding: 12px 10px; }
  .ib-info { width: min(320px, 90vw); }
  .camp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { background: radial-gradient(1200px 600px at -10% -10%, #19a463 0%, transparent 55%), linear-gradient(160deg, #0b1f17 0%, #0d3b27 100%); color: #d6ebe0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside .brand { padding: 0; font-size: 19px; }
.auth-aside h2 { color: #fff; font-size: 34px; letter-spacing: -.02em; max-width: 460px; margin-bottom: 14px; }
.auth-aside p { color: #a9cbb9; max-width: 440px; font-size: 15px; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #d6ebe0; }
.auth-points .tick { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; color: #6ee7a8; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 24px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 24px; }
.btn-google { background: #fff; color: var(--ink); border-color: var(--line); height: 42px; }
.btn-google:hover { background: var(--line-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.auth-foot { margin-top: 20px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .menu-toggle { display: inline-grid; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .grid-2, .grid-3, .split, .split-wide, .editor-layout, .samples-grid { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .profile-grid, .wa-qr-panel, .camp-body, .option-cards, .option-cards.two { grid-template-columns: 1fr; }
  .camp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .var-row { grid-template-columns: 44px minmax(0, 1fr); }
  .btn-row { grid-template-columns: minmax(0, 1fr) 32px; }
  .btn-row .btn-fields { grid-column: 1 / -1; grid-row: 2; }
  .var-row .input:last-child { grid-column: 1 / -1; }
  .wa-qr { justify-self: center; }
  .wa-qr { max-width: 100%; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 60px; padding-top: 10px; padding-bottom: 10px; }
  .result-stats { grid-template-columns: repeat(2, 1fr); }
  .card-head { flex-wrap: wrap; }
  .search, .search .input { width: 100%; }
  .hide-sm { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }
