/* =========================================================
   Postwave design system — 2026
   Primary: #e7ff56 (electric lime) on warm ink
   ========================================================= */
:root {
  --lime: #e7ff56;
  --lime-600: #cfe83a;
  --lime-50: #f8ffd6;
  --ink: #0e100b;
  --ink-2: #23261c;
  --bg: #f6f6f1;
  --surface: #ffffff;
  --surface-2: #f1f1ea;
  --border: #e5e5dc;
  --border-strong: #d4d4c8;
  --text: #15170f;
  --muted: #6b6e62;
  --faint: #9a9d90;
  --green: #16a34a; --red: #e5484d; --amber: #f59e0b; --blue: #3b82f6; --violet: #8b5cf6;
  --radius: 18px; --radius-sm: 12px; --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(14,16,11,.06);
  --shadow: 0 1px 2px rgba(14,16,11,.04), 0 8px 24px -8px rgba(14,16,11,.10);
  --shadow-lg: 0 24px 60px -20px rgba(14,16,11,.28);
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --sidebar: 256px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0c09; --surface: #13150f; --surface-2: #1b1e16; --border: #262a1f; --border-strong: #353a2b;
  --text: #f1f2ea; --muted: #a0a394; --faint: #6f7366; --ink: #e7ff56; --ink-2: #d9f04a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
  color-scheme: dark;
}
:root[data-theme="dark"] .btn-dark { background: var(--lime); color: #0e100b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.mt-1 { margin-top: 6px } .mt-2 { margin-top: 12px } .mt-3 { margin-top: 20px } .mt-4 { margin-top: 32px } .mb-2 { margin-bottom: 12px } .mb-3 { margin-bottom: 20px }
.row { display: flex; align-items: center; gap: 10px; } .row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .center { text-align: center; } .right { text-align: right; }
.small { font-size: 13px; } .tiny { font-size: 12px; } .bold { font-weight: 700; }
.hidden { display: none !important; }
.ic { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 600 14px/1 var(--font); cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap; background: var(--surface); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--lime); color: #0e100b; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-primary:hover { background: var(--lime-600); }
.btn-dark { background: #0e100b; color: #fff; }
.btn-dark:hover { background: #23261c; }
.btn-ghost { background: transparent; } .btn-ghost:hover { background: var(--surface-2); }
.btn-outline { border-color: var(--border-strong); background: var(--surface); } .btn-outline:hover { border-color: var(--text); }
.btn-danger { background: #fee2e2; color: #b91c1c; } .btn-danger:hover { background: #fecaca; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; } .btn-xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; position: relative; transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }
.btn-ai { background: linear-gradient(135deg, #0e100b, #2b3016); color: var(--lime); }
.btn-ai:hover { filter: brightness(1.15); }

/* ---------- forms ---------- */
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; }
.input, input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=datetime-local], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 14px var(--font); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(231,255,86,.55); }
:root[data-theme="dark"] input:focus, :root[data-theme="dark"] select:focus, :root[data-theme="dark"] textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(231,255,86,.18); }
.field { margin-bottom: 16px; } .field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; accent-color: #0e100b; }
.switch { position: relative; width: 42px; height: 24px; display: inline-block; flex-shrink: 0; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: #0e100b; }
.switch input:checked + span::before { transform: translateX(18px); background: var(--lime); }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); white-space: nowrap; }
.chip-lime { background: var(--lime); border-color: var(--lime); color: #0e100b; }
.chip-dark { background: #0e100b; color: var(--lime); border-color: #0e100b; }
.chip-green { background: #dcfce7; color: #166534; border-color: #bbf7d0; } .chip-red { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.chip-amber { background: #fef3c7; color: #92400e; border-color: #fde68a; } .chip-blue { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.chip-violet { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
:root[data-theme="dark"] .chip-green, :root[data-theme="dark"] .chip-red, :root[data-theme="dark"] .chip-amber, :root[data-theme="dark"] .chip-blue, :root[data-theme="dark"] .chip-violet { background: var(--surface-2); border-color: var(--border-strong); }
.pbadge { display: inline-grid; place-items: center; border-radius: 30%; background: var(--pc); color: #fff; flex-shrink: 0; }
.pbadge-stack { display: inline-flex; } .pbadge-stack .pbadge { border: 2px solid var(--surface); margin-left: -7px; } .pbadge-stack .pbadge:first-child { margin-left: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: #0e100b; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-tight { padding: 16px; } .card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { font-size: 16px; } .card-head p { font-size: 13px; color: var(--muted); }
.card-lime { background: var(--lime); border-color: var(--lime); color: #0e100b; }
.card-dark { background: #0e100b; border-color: #0e100b; color: #f1f2ea; }
.card-dark .muted { color: #a0a394; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stat-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; }
.stat-val { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.delta.up { background: #dcfce7; color: #15803d; } .delta.down { background: #fee2e2; color: #b91c1c; }
.grid { display: grid; gap: 18px; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- tabs / segmented ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; flex-wrap: wrap; }
.tabs a, .tabs button { height: 34px; padding: 0 14px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--font); color: var(--muted); border: 0; background: none; cursor: pointer; }
.tabs a.active, .tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs .count { background: var(--lime); color: #0e100b; border-radius: 99px; padding: 1px 7px; font-size: 11px; }

/* ---------- dropdown / modal / toast ---------- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; display: none; }
.dropdown-menu.wide { min-width: 300px; }
.dropdown.open .dropdown-menu { display: block; animation: pop .15s ease; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; width: 100%; background: none; border: 0; color: var(--text); cursor: pointer; text-align: left; font-family: var(--font); }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dd-title { font-size: 12px; color: var(--faint); padding: 8px 12px 6px; font-weight: 600; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.modal { position: fixed; inset: 0; background: rgba(14,16,11,.45); backdrop-filter: blur(6px); z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; animation: fade .2s; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .2s; }
.modal-box.lg { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 24px; } .modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #0e100b; color: #fff; padding: 12px 18px; border-radius: 14px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); z-index: 200; font-size: 14px; font-weight: 500; animation: toastIn .3s ease; }
.toast .ic { color: var(--lime); } .toast-error .ic { color: #ff8a8a; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* =========================================================
   Marketing site
   ========================================================= */
.site-nav { position: sticky; top: 0; z-index: 40; background: rgba(246,246,241,.78); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
:root[data-theme="dark"] .site-nav { background: rgba(11,12,9,.78); }
.site-nav.scrolled { border-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; background: #0e100b; color: var(--lime); display: grid; place-items: center; }
:root[data-theme="dark"] .logo-mark { background: var(--lime); color: #0e100b; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; }

.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 900px; height: 900px; left: 50%; top: -480px; transform: translateX(-50%); background: radial-gradient(circle, rgba(231,255,86,.55), transparent 60%); pointer-events: none; z-index: -1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm); }
.eyebrow b { background: #0e100b; color: var(--lime); border-radius: 99px; padding: 3px 10px; font-size: 12px; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); letter-spacing: -.045em; line-height: 1; margin: 24px auto 20px; max-width: 980px; font-weight: 800; }
.hero h1 .serif { font-size: 1.08em; }
.hl { background: var(--lime); padding: 0 .12em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; color: #0e100b; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.platform-row { display: flex; gap: 10px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.platform-row .pbadge { box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.platform-row .pbadge:nth-child(2n) { animation-delay: -2s } .platform-row .pbadge:nth-child(3n) { animation-delay: -4s }
@keyframes float { 50% { transform: translateY(-6px); } }

.hero-app { margin: 56px auto 0; max-width: 1120px; border-radius: 28px; padding: 10px; background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.2)); border: 1px solid var(--border); box-shadow: var(--shadow-lg); text-align: left; }
:root[data-theme="dark"] .hero-app { background: var(--surface-2); }
.mock { background: var(--surface); border-radius: 20px; border: 1px solid var(--border); display: grid; grid-template-columns: 200px 1fr 290px; min-height: 460px; overflow: hidden; }
.mock-side { background: var(--surface-2); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; }
.mock-side .ml { height: 32px; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mock-side .ml.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mock-main { padding: 22px; }
.mock-compose { border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.mock-compose .txt { font-size: 15px; min-height: 80px; }
.mock-compose .txt .caret { display: inline-block; width: 2px; height: 18px; background: var(--text); vertical-align: middle; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-ai { margin-top: 14px; background: #0e100b; color: #f1f2ea; border-radius: 14px; padding: 14px; font-size: 13px; }
.mock-ai b { color: var(--lime); }
.mock-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 18px; }
.mock-cal div { height: 54px; border-radius: 10px; background: var(--surface-2); font-size: 11px; padding: 6px; color: var(--faint); font-weight: 600; }
.mock-cal div i { display: block; height: 8px; border-radius: 4px; margin-top: 6px; background: var(--lime); }
.mock-cal div i.b { background: #1877F2; } .mock-cal div i.p { background: #E1306C; }
.mock-right { border-left: 1px solid var(--border); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mock-post { border: 1px solid var(--border); border-radius: 14px; padding: 12px; font-size: 13px; }
.mock-img { height: 130px; border-radius: 10px; margin: 10px 0; background: linear-gradient(135deg, #e7ff56, #9ad14b 50%, #2f3b12); }
.mock-kpi { background: var(--lime); color: #0e100b; border-radius: 14px; padding: 14px; }
.mock-kpi strong { font-size: 26px; letter-spacing: -.03em; display: block; }

.logos { padding: 40px 0; text-align: center; }
.logos-row { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; margin-top: 18px; opacity: .55; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }

.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .kicker, .kicker { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.section-head h2, .feature h2 { font-size: clamp(32px, 4.5vw, 54px); letter-spacing: -.04em; line-height: 1.05; }
.section-head p { font-size: 18px; color: var(--muted); margin-top: 16px; }
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; padding: 56px 0; }
.feature.rev > :first-child { order: 2; }
.feature p.lead { font-size: 18px; color: var(--muted); margin: 18px 0 24px; }
.ticks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.ticks li .tk { width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: #0e100b; display: grid; place-items: center; flex-shrink: 0; }
.visual { border-radius: var(--radius-lg); padding: 28px; background: var(--surface-2); border: 1px solid var(--border); position: relative; min-height: 380px; overflow: hidden; }
.visual.lime { background: var(--lime); border-color: var(--lime); color: #0e100b; }
.visual.dark { background: #0e100b; border-color: #0e100b; color: #f1f2ea; }
.vcard { background: var(--surface); color: var(--text); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.visual.dark .vcard { background: #1b1e16; border-color: #2c3122; color: #f1f2ea; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento .b { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; min-height: 240px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.bento .b:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento .b h3 { font-size: 22px; }
.bento .b p { color: var(--muted); }
.bento .b.lime { background: var(--lime); border-color: var(--lime); color: #0e100b; } .bento .b.lime p { color: #3c4220; }
.bento .b.dark { background: #0e100b; color: #f1f2ea; border-color: #0e100b; } .bento .b.dark p { color: #a0a394; }
.b-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 8px; }
.b.lime .b-ic { background: #0e100b; color: var(--lime); } .b.dark .b-ic { background: var(--lime); color: #0e100b; }
.s2 { grid-column: span 2 } .s3 { grid-column: span 3 } .s4 { grid-column: span 4 }
.stats-band { background: #0e100b; color: #f1f2ea; border-radius: var(--radius-lg); padding: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stats-band strong { display: block; font-size: 48px; letter-spacing: -.04em; color: var(--lime); line-height: 1; margin-bottom: 8px; }
.stats-band span { color: #a0a394; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.quote p { font-size: 17px; font-weight: 500; }
.cta-band { background: var(--lime); border-radius: 36px; padding: 80px 40px; text-align: center; color: #0e100b; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -.045em; }
.cta-band p { font-size: 18px; margin: 16px 0 28px; color: #3c4220; }
.site-footer { padding: 64px 0 28px; border-top: 1px solid var(--border); margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 14px; }
.footer-grid a:not(.logo) { display: block; color: var(--muted); padding: 4px 0; font-weight: 500; } .footer-grid a:not(.logo):hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13px; flex-wrap: wrap; gap: 10px; }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.price { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.price.pop { background: #0e100b; color: #f1f2ea; border-color: #0e100b; transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.price.pop .muted { color: #a0a394; }
.price .amt { font-size: 48px; font-weight: 800; letter-spacing: -.04em; }
.price .amt small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; flex: 1; }
.price li { display: flex; gap: 10px; } .price li .ic { color: var(--green); margin-top: 2px; } .price.pop li .ic { color: var(--lime); }
.pop-tag { position: absolute; top: -12px; right: 20px; background: var(--lime); color: #0e100b; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq summary { font-weight: 700; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; font-size: 22px; } .faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin-top: 10px; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 520px; width: 100%; margin: 0 auto; }
.auth-form h1 { font-size: 38px; letter-spacing: -.04em; margin: 32px 0 8px; }
.auth-side { background: #0e100b; color: #f1f2ea; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border-radius: 0 0 0 40px; }
.auth-side::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(231,255,86,.35), transparent 65%); right: -160px; top: -160px; }
.auth-side h2 { font-size: 44px; letter-spacing: -.04em; line-height: 1.05; position: relative; z-index: 1; }
.oauth-btns { display: grid; gap: 10px; margin-bottom: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 18px 0; } .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-box { background: var(--lime-50); border: 1px dashed var(--lime-600); border-radius: 14px; padding: 12px 14px; font-size: 13px; margin-top: 18px; color: #0e100b; }

/* =========================================================
   App shell
   ========================================================= */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 18px; }
.sb-create { margin-bottom: 14px; }
.sb-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 14px 12px 6px; }
.sb-link { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
.sb-link:hover { background: var(--surface-2); color: var(--text); }
.sb-link.active { background: #0e100b; color: #fff; } .sb-link.active .ic { color: var(--lime); }
:root[data-theme="dark"] .sb-link.active { background: var(--lime); color: #0e100b; } :root[data-theme="dark"] .sb-link.active .ic { color: #0e100b; }
.sb-count { margin-left: auto; font-style: normal; background: var(--lime); color: #0e100b; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.sb-nav { flex: 1; }
.sb-bottom { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 4px; }
.sb-plan { background: var(--lime); color: #0e100b; border-radius: 16px; padding: 14px; margin-bottom: 8px; }
.sb-plan p { font-size: 12px; margin: 2px 0 10px; color: #3c4220; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(246,246,241,.8); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30; }
:root[data-theme="dark"] .topbar { background: rgba(11,12,9,.8); }
.search { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--faint); }
.search input { border: 0; height: 36px; padding: 0; background: transparent; box-shadow: none !important; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-btn { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 3px 12px 3px 3px; cursor: pointer; font: 600 14px var(--font); color: var(--text); }
.content { padding: 28px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; letter-spacing: -.035em; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mobile-only { display: none; }
.sb-backdrop { display: none; }

/* welcome banner */
.welcome { background: #0e100b; color: #f1f2ea; border-radius: var(--radius-lg); padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(231,255,86,.4), transparent 65%); }
.welcome h2 { font-size: 28px; letter-spacing: -.03em; } .welcome p { color: #a0a394; margin-top: 6px; }
.welcome > * { position: relative; z-index: 1; }

/* lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.post-row { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); align-items: flex-start; transition: border-color .15s; }
.post-row:hover { border-color: var(--border-strong); }
.post-row .when { width: 72px; flex-shrink: 0; text-align: center; background: var(--surface-2); border-radius: 12px; padding: 8px 4px; }
.post-row .when b { display: block; font-size: 20px; letter-spacing: -.03em; } .post-row .when span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.post-text { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.metrics-inline { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 8px; flex-wrap: wrap; }
.metrics-inline span { display: inline-flex; gap: 4px; align-items: center; }

/* compose */
.compose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.channel-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-toggle { position: relative; cursor: pointer; margin: 0; }
.ch-toggle input { position: absolute; opacity: 0; }
.ch-toggle .chbox { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; transition: .15s; opacity: .6; }
.ch-toggle input:checked + .chbox { border-color: var(--text); opacity: 1; box-shadow: 0 0 0 3px var(--lime); }
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.editor:focus-within { border-color: var(--text); box-shadow: 0 0 0 4px rgba(231,255,86,.55); }
.editor textarea { border: 0; box-shadow: none !important; min-height: 200px; font-size: 16px; padding: 18px; }
.editor-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.char-counts { margin-left: auto; display: flex; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.char-counts .over { color: var(--red); }
.media-drop { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; }
.media-drop:hover { border-color: var(--text); color: var(--text); }
.media-thumb { position: relative; display: inline-block; } .media-thumb img { height: 90px; border-radius: 12px; }
.ai-panel { background: #0e100b; color: #f1f2ea; border-radius: var(--radius); padding: 20px; }
.ai-panel .muted { color: #a0a394; }
.ai-panel label { color: #d6d8cc; }
.ai-panel input, .ai-panel select, .ai-panel textarea { background: #1b1e16; border-color: #2c3122; color: #f1f2ea; }
.ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-head .ai-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: #0e100b; display: grid; place-items: center; }
.variant { background: #1b1e16; border: 1px solid #2c3122; border-radius: 14px; padding: 14px; margin-top: 10px; cursor: pointer; transition: border-color .15s; font-size: 14px; }
.variant:hover { border-color: var(--lime); }
.variant .vh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lime); margin-bottom: 6px; }
.variant .tags { color: #8fa3ff; font-size: 13px; margin-top: 6px; }
.tone-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tone-pills button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid #2c3122; background: transparent; color: #d6d8cc; font: 600 12px var(--font); cursor: pointer; }
.tone-pills button.active { background: var(--lime); color: #0e100b; border-color: var(--lime); }
.preview-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.preview-tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px; cursor: pointer; opacity: .5; }
.preview-tabs button.active { opacity: 1; border-color: var(--text); }
.phone { border-radius: 26px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.phone-head { display: flex; gap: 10px; align-items: center; padding: 14px; }
.phone-body { padding: 0 14px 14px; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.phone-img { aspect-ratio: 1; background: linear-gradient(135deg, var(--surface-2), var(--border)); display: grid; place-items: center; color: var(--faint); }
.phone-img img { width: 100%; height: 100%; object-fit: cover; }
.phone-actions { display: flex; gap: 16px; padding: 12px 14px; color: var(--muted); border-top: 1px solid var(--border); }
.slot-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-pills button { height: 32px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px; font: 600 12px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.slot-pills button:hover { border-color: var(--text); background: var(--lime-50); }
:root[data-theme="dark"] .slot-pills button:hover { background: var(--surface-2); }

/* calendar */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.cal-day { background: var(--surface); min-height: 132px; padding: 8px; display: flex; flex-direction: column; gap: 5px; transition: background .15s; position: relative; }
.cal-day.other { background: var(--surface-2); } .cal-day.other .cal-num { color: var(--faint); }
.cal-day.today .cal-num { background: var(--lime); color: #0e100b; }
.cal-day.drag-over { background: var(--lime-50); box-shadow: inset 0 0 0 2px var(--lime-600); }
:root[data-theme="dark"] .cal-day.drag-over { background: #22261a; }
.cal-num { font-size: 13px; font-weight: 700; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.cal-add { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; opacity: 0; background: var(--surface-2); transition: opacity .15s; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-post { display: flex; gap: 6px; align-items: center; padding: 5px 7px; border-radius: 9px; font-size: 12px; font-weight: 600; background: var(--surface-2); border-left: 3px solid var(--pc, var(--lime)); cursor: grab; overflow: hidden; }
.cal-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-post.published { opacity: .6; cursor: pointer; } .cal-post.dragging { opacity: .4; }
.cal-post time { color: var(--muted); font-weight: 700; flex-shrink: 0; }
.week { display: grid; grid-template-columns: 60px repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.week .wh { padding: 10px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; text-align: center; background: var(--surface-2); }
.week .wt { font-size: 11px; color: var(--faint); padding: 4px 8px; border-top: 1px solid var(--border); text-align: right; }
.week .wc { border-top: 1px solid var(--border); border-left: 1px solid var(--border); min-height: 46px; padding: 3px; }
.week .wc.best { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(231,255,86,.25) 6px 12px); }

/* inbox */
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; min-height: 640px; }
.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; max-height: 76vh; }
.inbox-item { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.active { background: var(--lime-50); box-shadow: inset 3px 0 0 #0e100b; }
:root[data-theme="dark"] .inbox-item.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--lime); }
.inbox-item .who { font-weight: 700; font-size: 14px; }
.inbox-item .txt { font-size: 13px; color: var(--muted); }
.inbox-thread { display: flex; flex-direction: column; }
.thread-head { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.thread-body { padding: 22px; flex: 1; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.bubble { max-width: 78%; padding: 12px 16px; border-radius: 18px; font-size: 14px; background: var(--surface-2); }
.bubble.me { align-self: flex-end; background: #0e100b; color: #f1f2ea; border-bottom-right-radius: 6px; }
.bubble.them { border-bottom-left-radius: 6px; }
.ctx-post { border: 1px solid var(--border); border-radius: 14px; padding: 12px; font-size: 13px; color: var(--muted); }
.reply-box { border-top: 1px solid var(--border); padding: 16px 22px; background: var(--surface-2); }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.suggestion { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: 8px 12px; font-size: 13px; cursor: pointer; text-align: left; max-width: 100%; font-family: var(--font); color: var(--text); }
.suggestion:hover { border-color: var(--text); background: var(--lime-50); }
:root[data-theme="dark"] .suggestion:hover { background: var(--surface); }

/* progress / bars */
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: #0e100b; border-radius: 99px; }
:root[data-theme="dark"] .progress > i { background: var(--lime); }
.progress.lime > i { background: var(--lime); }
.hbar { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.hbar .lbl { width: 110px; display: flex; gap: 8px; align-items: center; font-weight: 600; }
.hbar .track { flex: 1; height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 99px; }
.heat { display: grid; grid-template-columns: 40px repeat(24, 1fr); gap: 3px; font-size: 10px; color: var(--faint); }
.heat .hc { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.chart-box { position: relative; height: 280px; } .chart-box.sm { height: 200px; }

/* takeaways */
.takeaway { display: flex; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface-2); }
.takeaway .tk-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--lime); color: #0e100b; }
.takeaway.insight .tk-ic { background: #dbeafe; color: #1e40af; } .takeaway.action .tk-ic { background: #0e100b; color: var(--lime); }
.takeaway h4 { font-size: 15px; } .takeaway p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ads */
.ad-preview { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); }
.ad-preview .ad-img { aspect-ratio: 1.91/1; background: linear-gradient(135deg, #e7ff56, #a3c43a 55%, #26300c); display: grid; place-items: center; color: #0e100b; font-weight: 800; font-size: 22px; text-align: center; padding: 20px; }
.ad-preview .ad-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--surface-2); gap: 10px; }
.platform-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pcard { margin: 0; cursor: pointer; }
.pcard input { position: absolute; opacity: 0; }
.pcard div { border: 1.5px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-weight: 700; font-size: 14px; transition: .15s; background: var(--surface); }
.pcard input:checked + div { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.steps span { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--faint); }
.steps span b { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; }
.steps span.on { color: var(--text); } .steps span.on b { background: var(--lime); color: #0e100b; }
.steps i { width: 24px; height: 1px; background: var(--border-strong); align-self: center; }

/* warmup */
.day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-cell { border-radius: 14px; padding: 10px; background: var(--surface-2); text-align: center; font-size: 12px; font-weight: 700; border: 1.5px solid transparent; cursor: pointer; }
.day-cell b { display: block; font-size: 18px; }
.day-cell.done { background: var(--lime); color: #0e100b; } .day-cell.current { border-color: var(--text); background: var(--surface); }
.task { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; cursor: pointer; }
.task input { width: 20px; height: 20px; accent-color: #0e100b; }
.task.done span { text-decoration: line-through; color: var(--faint); }
.ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#0e100b calc(var(--p) * 1%), var(--surface-2) 0); }
:root[data-theme="dark"] .ring { background: conic-gradient(var(--lime) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 92px; height: 92px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 24px; font-weight: 800; }

/* start page builder */
.builder { display: grid; grid-template-columns: 250px minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.block-palette button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 8px; font: 600 14px var(--font); cursor: pointer; color: var(--text); }
.block-palette button:hover { border-color: var(--text); }
.block-palette button .ic { color: var(--muted); }
.blocks { display: flex; flex-direction: column; gap: 10px; }
.block-item { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.block-item.dragging { opacity: .4; } .block-item.over { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.block-item .handle { cursor: grab; color: var(--faint); padding-top: 10px; }
.block-item .bfields { flex: 1; display: grid; gap: 8px; }
.block-item .btype { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.phone-frame { position: sticky; top: 88px; width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 9/18.5; border-radius: 44px; border: 10px solid #0e100b; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.phone-frame iframe { width: 100%; height: 100%; border: 0; }
.theme-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-swatches label { margin: 0; cursor: pointer; }
.theme-swatches input { position: absolute; opacity: 0; }
.theme-swatches span { width: 38px; height: 38px; border-radius: 12px; display: block; border: 2px solid var(--border); }
.theme-swatches input:checked + span { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }

/* reports */
.card-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.card-picker label { margin: 0; cursor: pointer; }
.card-picker input { position: absolute; opacity: 0; }
.card-picker div { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; background: var(--surface); }
.card-picker input:checked + div { border-color: var(--text); background: var(--lime-50); }
:root[data-theme="dark"] .card-picker input:checked + div { background: var(--surface-2); }

/* empty */
.empty { text-align: center; padding: 48px 20px; }
.empty-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--lime); color: #0e100b; display: inline-grid; place-items: center; margin-bottom: 14px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; } .empty p { max-width: 380px; margin: 0 auto 16px; }

/* skeleton / spinner */
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.shimmer { background: linear-gradient(90deg, #1b1e16 0%, #2c3122 50%, #1b1e16 100%); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 12px; height: 70px; margin-top: 10px; }
@keyframes sh { to { background-position: -200% 0; } }

/* print (white-label PDF) */
@media print {
  .sidebar, .topbar, .no-print, .toast { display: none !important; }
  body { background: #fff; } .content { padding: 0; max-width: none; } .card { box-shadow: none; break-inside: avoid; }
  .report-page { box-shadow: none !important; border: 0 !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
  .compose-wrap, .split { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 220px 1fr; } .builder > :last-child { grid-column: 1 / -1; }
  .mock { grid-template-columns: 180px 1fr; } .mock-right { display: none; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: 1fr 1fr; }
  .split-wide { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar.open + .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .mobile-only { display: inline-grid; }
  .feature, .feature.rev { grid-template-columns: 1fr; gap: 32px; } .feature.rev > :first-child { order: 0; }
  .bento { grid-template-columns: 1fr 1fr; } .bento .s2, .bento .s3, .bento .s4 { grid-column: span 1; } .bento .wide { grid-column: span 2; }
  .stats-band { grid-template-columns: 1fr 1fr; padding: 36px; } .quote-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 12px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; } .nav-toggle { display: inline-grid; } .nav-cta .btn-ghost { display: none; }
  .inbox { grid-template-columns: 1fr; } .inbox-list { max-height: 360px; border-right: 0; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mock { grid-template-columns: 1fr; } .mock-side { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; } .content { padding: 18px 16px; } .topbar { padding: 0 16px; }
  .cols-4, .cols-3, .cols-2, .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2, .span-3 { grid-column: auto; }
  .bento { grid-template-columns: 1fr; } .bento .wide { grid-column: auto; }
  .price-grid { grid-template-columns: 1fr; } .price.pop { transform: none; }
  .hide-sm { display: none; } .search { display: none; }
  .cal-day { min-height: 84px; padding: 4px; } .cal-post span { display: none; } .cal-dow { padding: 8px 4px; font-size: 10px; }
  .builder { grid-template-columns: 1fr; }
  .welcome { flex-direction: column; align-items: flex-start; padding: 22px; }
  .stats-band { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; } .cta-band { padding: 56px 20px; border-radius: 28px; }
  .day-grid { grid-template-columns: repeat(4, 1fr); }
  .auth-form { padding: 28px 16px; }
}

/* =========================================================
   Social Hub · Assets · Unified Messages
   ========================================================= */
.asset-av { position: relative; border-radius: 30%; display: inline-grid; place-items: center; font-weight: 800; flex-shrink: 0; letter-spacing: -.02em; }
.asset-av i { position: absolute; right: -5px; bottom: -5px; border-radius: 30%; box-shadow: 0 0 0 2.5px var(--surface); display: flex; }
.acc-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acc-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: border-color .15s, transform .15s; }
.acc-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.acc-card.active { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.live-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #dcfce7; color: #166534; }
.live-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #16a34a; animation: pulse 1.6s infinite; }
.demo-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
@keyframes pulse { 50% { opacity: .35; } }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.asset-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; }
.asset-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.asset-card .a-name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.2; }
.asset-card .a-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; background: var(--surface-2); border-radius: 14px; }
.asset-card .a-kpis b { display: block; font-size: 17px; letter-spacing: -.02em; } .asset-card .a-kpis span { font-size: 11px; color: var(--muted); font-weight: 600; }
.asset-card .spark { width: 100%; height: 38px; }
.asset-card .a-actions { display: flex; gap: 6px; margin-top: auto; }
.asset-list .asset-row { display: grid; grid-template-columns: minmax(240px, 2fr) 110px 110px 120px 140px 160px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.asset-list .asset-row:hover { background: var(--surface-2); }
.kind-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 8px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.role-owner { background: #0e100b; color: var(--lime); border-color: #0e100b; } .role-admin { background: var(--lime); color: #0e100b; border-color: var(--lime); }
.hub-hero { background: #0e100b; color: #f1f2ea; border-radius: var(--radius-lg); padding: 26px 28px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.hub-hero::after { content: ''; position: absolute; right: -100px; bottom: -160px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(231,255,86,.3), transparent 65%); }
.hub-hero > * { position: relative; z-index: 1; }
.hub-hero h2 { font-size: 26px; letter-spacing: -.03em; } .hub-hero p { color: #a0a394; }
.hub-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.hub-kpis div { background: #1b1e16; border: 1px solid #2c3122; border-radius: 16px; padding: 14px; }
.hub-kpis b { display: block; font-size: 24px; letter-spacing: -.03em; color: #fff; } .hub-kpis span { font-size: 12px; color: #a0a394; font-weight: 600; }
.hub-kpis div.hot { background: var(--lime); border-color: var(--lime); } .hub-kpis div.hot b, .hub-kpis div.hot span { color: #0e100b; }
.sync-anim .ic { animation: rot 1s linear infinite; }

/* asset detail */
.asset-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.asset-cover { height: 120px; background: radial-gradient(circle at 20% 0%, rgba(231,255,86,.9), transparent 55%), linear-gradient(135deg, #0e100b, #2b3016); }
.asset-head { padding: 0 26px 22px; display: flex; gap: 18px; align-items: flex-end; margin-top: -44px; flex-wrap: wrap; }
.asset-head .asset-av { box-shadow: 0 0 0 5px var(--surface); }
.feed-post { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.feed-post:last-child { border-bottom: 0; }
.feed-post .fp-body { flex: 1; min-width: 0; }
.feed-post .fp-text { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; margin: 4px 0 8px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pulse-card { background: linear-gradient(160deg, #0e100b, #1f2414); color: #f1f2ea; border-radius: var(--radius); padding: 20px; }
.pulse-card .muted { color: #a0a394; }
.pulse-card li { margin-bottom: 6px; }

/* messages */
.msg-app { display: grid; grid-template-columns: 236px 360px minmax(0, 1fr); height: calc(100vh - 68px - 56px); min-height: 560px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.msg-app.with-details { grid-template-columns: 236px 360px minmax(0, 1fr) 300px; }
.rail { background: var(--surface-2); border-right: 1px solid var(--border); overflow-y: auto; padding: 12px 10px; }
.rail-group { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 14px 10px 6px; display: flex; justify-content: space-between; align-items: center; }
.rail-group button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-grid; }
.rail-group button:hover { background: var(--surface); color: var(--text); }
.rail-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 11px; border: 0; background: none; font: 600 13.5px var(--font); color: var(--muted); cursor: pointer; text-align: left; }
.rail-item:hover { background: var(--surface); color: var(--text); }
.rail-item.active { background: #0e100b; color: #fff; }
:root[data-theme="dark"] .rail-item.active { background: var(--lime); color: #0e100b; }
.rail-item .em { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.rail-item .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item .ct { font-size: 11px; font-weight: 700; color: var(--faint); }
.rail-item .ub { font-size: 11px; font-weight: 800; background: var(--lime); color: #0e100b; border-radius: 99px; padding: 1px 7px; min-width: 20px; text-align: center; }
.rail-item .ub.red { background: var(--red); color: #fff; }
.rail-item.active .ct { color: #a0a394; }
.rail-item .tg { font-size: 9px; font-weight: 800; color: #229ED9; }
.conv-col { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.conv-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.conv-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.conv-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; background: var(--surface-2); border-radius: 12px; color: var(--faint); }
.conv-search input { border: 0; background: transparent; height: 34px; padding: 0; box-shadow: none !important; }
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 28px; border: 0; background: none; border-radius: 8px; font: 700 12px var(--font); color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.conv-list { flex: 1; overflow-y: auto; }
.conv { display: flex; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; transition: background .12s; }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--lime-50); }
:root[data-theme="dark"] .conv.active { background: #1f2316; }
.conv.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #0e100b; }
:root[data-theme="dark"] .conv.active::before { background: var(--lime); }
.conv .c-av { position: relative; flex-shrink: 0; }
.conv .c-av .avatar { width: 42px; height: 42px; font-size: 14px; }
.conv .c-av .pbadge { position: absolute; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px var(--surface); }
.conv .c-main { flex: 1; min-width: 0; }
.conv .c-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv .c-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .c-name { font-weight: 800; }
.conv .c-time { font-size: 11px; color: var(--faint); font-weight: 600; flex-shrink: 0; }
.conv.unread .c-time { color: var(--text); }
.conv .c-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.conv.unread .c-text { color: var(--text); font-weight: 600; }
.conv .c-meta { display: flex; gap: 5px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.mini { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 7px; font-size: 10.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.mini.cat { background: color-mix(in srgb, var(--cc) 14%, transparent); color: var(--cc); }
:root[data-theme="dark"] .mini.cat { background: color-mix(in srgb, var(--cc) 25%, transparent); color: #fff; }
.mini.urgent { background: #fee2e2; color: #b91c1c; } .mini.high { background: #fef3c7; color: #92400e; }
.mini.wait { background: #0e100b; color: var(--lime); }
.conv .ubadge { background: var(--lime); color: #0e100b; font-size: 11px; font-weight: 800; border-radius: 99px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; }
.conv .ubadge.urgent { background: var(--red); color: #fff; }
.conv .sel { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; accent-color: #0e100b; display: none; }
.selecting .conv .sel { display: block; } .selecting .conv { padding-left: 32px; }
.bulkbar { display: none; padding: 8px 12px; background: #0e100b; color: #fff; gap: 6px; align-items: center; flex-wrap: wrap; }
.bulkbar.show { display: flex; }
.bulkbar button, .bulkbar select { height: 30px; border-radius: 8px; border: 1px solid #2c3122; background: #1b1e16; color: #fff; font: 600 12px var(--font); padding: 0 10px; cursor: pointer; width: auto; }
.thread { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.th-head { padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; gap: 12px; }
.th-head .th-name { font-weight: 800; font-size: 15px; }
.th-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.th-tools select { height: 34px; width: auto; font-size: 12px; font-weight: 700; padding: 0 28px 0 10px; border-radius: 10px; }
.th-brief { margin: 14px 18px 0; background: #0e100b; color: #f1f2ea; border-radius: 16px; padding: 14px 16px; font-size: 13px; display: grid; gap: 6px; }
.th-brief b { color: var(--lime); } .th-brief .muted { color: #a0a394; }
.th-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 3px 10px; border-radius: 99px; margin: 10px 0; }
.bub { max-width: 72%; padding: 9px 13px 6px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.bub.in { background: var(--surface); align-self: flex-start; border-bottom-left-radius: 5px; }
.bub.out { background: #0e100b; color: #f1f2ea; align-self: flex-end; border-bottom-right-radius: 5px; }
:root[data-theme="dark"] .bub.out { background: #2b3016; }
.bub.note { background: #fef9c3; color: #713f12; align-self: center; max-width: 85%; border: 1px dashed #facc15; font-size: 13px; }
.bub .bt { display: flex; justify-content: flex-end; gap: 4px; font-size: 10.5px; opacity: .6; margin-top: 3px; align-items: center; }
.bub.in.new { box-shadow: 0 0 0 2px var(--lime); }
.composer { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 16px; }
.composer .sugs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.composer .sugs button { flex-shrink: 0; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 99px; padding: 6px 12px; font: 600 12.5px var(--font); cursor: pointer; color: var(--text); }
.composer .sugs button:hover { border-color: var(--text); background: var(--lime-50); }
:root[data-theme="dark"] .composer .sugs button:hover { background: var(--surface-2); }
.composer .box { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; resize: none; border-radius: 14px; }
.composer.note-mode textarea { background: #fefce8; border-color: #facc15; }
.composer .modes { display: flex; gap: 4px; margin-bottom: 8px; }
.composer .modes button { border: 0; background: none; font: 700 12px var(--font); color: var(--muted); padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.composer .modes button.active { background: var(--surface-2); color: var(--text); }
.details { border-left: 1px solid var(--border); overflow-y: auto; padding: 18px; background: var(--surface); }
.details h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 18px 0 8px; }
.folder-checks label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; padding: 6px 0; margin: 0; cursor: pointer; }
.folder-checks input { accent-color: #0e100b; width: 16px; height: 16px; }
.empty-thread { margin: auto; text-align: center; color: var(--muted); padding: 40px; }
.kbd { display: inline-block; font: 700 11px ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--surface); color: var(--text); }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; } .emoji-pick button { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.emoji-pick button.active { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chips label { margin: 0; cursor: pointer; } .rule-chips input { position: absolute; opacity: 0; }
.rule-chips span { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 600; background: var(--surface); }
.rule-chips input:checked + span { background: #0e100b; color: #fff; border-color: #0e100b; }
@media (max-width: 1280px) { .hub-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .msg-app { grid-template-columns: 300px minmax(0, 1fr); } .msg-app .rail { display: none; } .msg-app.show-rail .rail { display: block; position: absolute; z-index: 20; width: 260px; height: 100%; box-shadow: var(--shadow-lg); } .msg-app { position: relative; } .hub-hero { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .msg-app { grid-template-columns: 1fr; height: calc(100vh - 68px - 36px); }
  .msg-app .thread { display: none; } .msg-app.open-thread .thread { display: flex; } .msg-app.open-thread .conv-col { display: none; }
  .bub { max-width: 88%; } .asset-list .asset-row { grid-template-columns: 1fr 90px; } .asset-list .asset-row > :nth-child(n+3) { display: none; }
  .hub-kpis { grid-template-columns: repeat(2, 1fr); } .th-tools select { display: none; } .kv { grid-template-columns: 110px 1fr; }
}
.content.flush { padding-bottom: 20px; }
/* messages: details panel is a toggle; docked on very wide screens, overlay otherwise */
.msg-app .details { display: none; }
.msg-app.with-details .details { display: block; }
@media (max-width: 1499px) {
  .msg-app.with-details { grid-template-columns: 236px 340px minmax(0, 1fr); }
  .msg-app.with-details .details { display: block; position: absolute; right: 0; top: 0; bottom: 0; width: 310px; z-index: 6; box-shadow: var(--shadow-lg); }
  .msg-app { position: relative; }
}
@media (max-width: 1280px) { .msg-app, .msg-app.with-details { grid-template-columns: 210px 300px minmax(0, 1fr); } }
@media (max-width: 1100px) { .msg-app, .msg-app.with-details { grid-template-columns: 300px minmax(0, 1fr); } }
@media (max-width: 760px) { .msg-app, .msg-app.with-details { grid-template-columns: 1fr; } }
.conv .c-av > .pbadge { position: absolute; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px var(--surface); }
.msg-app { height: calc(100vh - 68px - 120px); }
.th-head { flex-wrap: wrap; row-gap: 8px; }
.th-head > div:nth-child(3) { flex: 1; min-width: 180px; }
.th-head .tiny.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-tools { flex-shrink: 0; }
@media (max-width: 1360px) { .th-tools { margin-left: 0; width: 100%; } .th-tools select { flex: 1; } }
@media (max-width: 760px) { .msg-app { height: calc(100vh - 68px - 90px); } }
.msg-app > * { min-height: 0; }
.thread, .conv-col { overflow: hidden; min-height: 0; }
.th-body, .conv-list { min-height: 0; }
.th-brief, .th-head, .composer { flex-shrink: 0; }
.asset-head > *:not(.asset-av) { margin-top: 52px; }
@media (max-width: 640px) { .asset-head > *:not(.asset-av) { margin-top: 0; } }
.asset-av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* team */
.ws-banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--lime); flex-wrap: wrap; }
.role-card { margin: 0; cursor: pointer; display: block; }
.role-card input { position: absolute; opacity: 0; }
.role-card > div { border: 1.5px solid var(--border); border-radius: 16px; padding: 14px; height: 100%; transition: .15s; background: var(--surface); }
.role-card input:checked + div { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.role-card b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.role-card b i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.role-card p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm-grid label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; margin: 0; font-weight: 600; font-size: 13px; cursor: pointer; background: var(--surface); }
.perm-grid label:has(input:checked) { border-color: var(--text); background: var(--lime-50); }
:root[data-theme="dark"] .perm-grid label:has(input:checked) { background: var(--surface-2); }
.perm-grid input { width: 16px; height: 16px; accent-color: #0e100b; }
.matrix td, .matrix th { text-align: center; } .matrix td:first-child, .matrix th:first-child { text-align: left; }
.yes { color: var(--green); font-weight: 800; } .no { color: var(--faint); }
.member-row .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.invite-link { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 8px 8px 8px 12px; font: 600 12px ui-monospace, monospace; overflow: hidden; }
.invite-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- integrations / roles ---------- */
.google-btn { gap: 12px; background: var(--surface); color: var(--text); border: 1.5px solid var(--border-strong); font-weight: 700; transition: .15s; }
.google-btn:hover { border-color: var(--text); box-shadow: 0 0 0 3px var(--lime); }
.google-btn svg { flex-shrink: 0; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.int-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.int-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 800 18px var(--font); flex-shrink: 0; }
.toggle-row { padding: 14px 0; border-top: 1px solid var(--border); gap: 14px; }
.setup-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 0; }
.setup-steps li { counter-increment: s; position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.setup-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: #0e100b; font: 800 13px var(--font); display: grid; place-items: center; position: relative; z-index: 1; }
.setup-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; background: var(--border); border-radius: 2px; }
.setup-steps li > span { display: block; min-width: 0; padding-top: 4px; }
.setup-steps b { color: var(--text); font-weight: 700; }
.setup-steps .kbd { display: inline-block; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--text); white-space: nowrap; }
.setup-steps a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.setup-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.setup-head .stat-ic { width: 36px; height: 36px; }
.test-result { border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; }
.test-result.ok { background: #dcfce7; color: #166534; } .test-result.bad { background: #fee2e2; color: #b91c1c; }
:root[data-theme="dark"] .test-result { background: var(--surface-2); }
.aperm-group { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.aperm-group > b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.aperm-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.aperm-item input { margin-top: 3px; }
.arole-card { border-top: 4px solid var(--rc, var(--lime)); }
.arole-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); display: inline-block; }
.aperm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aperm-chips .chip { height: 24px; font-size: 11px; }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 80px; }
.container.narrow { max-width: 780px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); margin: 10px 0 6px; }
.legal h2 { font-size: 20px; margin: 34px 0 10px; }
.legal p, .legal li { line-height: 1.7; color: var(--text-2, var(--text)); }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal a { text-decoration: underline; }

/* ---------- admin: social apps & AI ---------- */
.soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.soc-card details > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.soc-card details > summary::-webkit-details-marker { display: none; }
.soc-card details[open] > summary { margin-bottom: 6px; }
.soc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ai-card { background: linear-gradient(135deg, #0e100b 0%, #1d2112 100%); color: #f4f5ef; border: 0; }
.ai-card .muted, .ai-card .field-hint, .ai-card .tiny { color: #a9ad9c; }
.ai-card label { color: #e7e9df; }
.ai-card input, .ai-card select { background: #171a11; color: #f4f5ef; border-color: #34392a; }
.ai-card .toggle-row { border-color: #2b3022; }
.ai-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ai-model { position: relative; display: block; cursor: pointer; margin: 0; }
.ai-model input { position: absolute; opacity: 0; }
.ai-model > div { border: 1.5px solid #34392a; border-radius: 14px; padding: 12px; height: 100%; transition: .15s; }
.ai-model input:checked + div { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(231, 255, 86, .18); }
.ai-model b { display: block; color: #fff; font-size: 14px; }
.ai-model span { display: block; font-size: 12px; color: #a9ad9c; margin-top: 3px; }
.ai-model em { font-style: normal; font-size: 11px; color: var(--lime); display: block; margin-top: 6px; }
.ai-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 14px; }
.ai-stats div { background: #171a11; border: 1px solid #2b3022; border-radius: 12px; padding: 10px 12px; }
.ai-stats b { display: block; font-size: 18px; color: #fff; } .ai-stats span { font-size: 11px; color: #a9ad9c; }
.ai-reply { background: #171a11; border: 1px solid #2b3022; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #e7e9df; white-space: pre-wrap; margin-bottom: 12px; }
@media (max-width: 640px) { .ai-stats { grid-template-columns: repeat(2, 1fr); } .soc-grid { grid-template-columns: 1fr; } }
.ai-card .btn-outline { background: transparent; color: #fff; border-color: #4a503c; } .ai-card .btn-outline:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- plans & billing ---------- */
.plan-switch { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.seg-pill { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg-pill button { border: 0; background: none; height: 38px; padding: 0 18px; border-radius: 999px; font: 700 14px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.seg-pill button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg-pill button em { font-style: normal; font-size: 11px; background: var(--lime); color: #0e100b; padding: 2px 8px; border-radius: 99px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px 26px; display: flex; flex-direction: column; gap: 18px; transition: .2s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan-card.pop { background: #0e100b; color: #f4f5ef; border-color: #0e100b; }
.plan-card.pop .plan-top p, .plan-card.pop .pp span, .plan-card.pop .pp small, .plan-card.pop .plan-feat li { color: #c8cbbd; }
.plan-card.current { outline: 3px solid var(--lime); }
.plan-tag { position: absolute; top: -12px; left: 26px; background: var(--lime); color: #0e100b; font: 800 11px var(--font); letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; }
.plan-top h3 { font-size: 22px; } .plan-top p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plan-price .pp { display: none; } .plan-price .pp b { font-size: 42px; letter-spacing: -.03em; line-height: 1; }
.plan-price .pp span { color: var(--muted); font-weight: 600; margin-left: 6px; } .plan-price .pp small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
[data-period-view="month"] .pp[data-show="month"], [data-period-view="year"] .pp[data-show="year"] { display: block; }
.plan-feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.plan-feat li { display: flex; gap: 10px; align-items: flex-start; } .plan-feat .ic { color: #16a34a; flex-shrink: 0; margin-top: 2px; }
.plan-card.pop .plan-feat .ic { color: var(--lime); }
.payg { margin-top: 26px; } .payg-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.usage-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 22px; }
.usage-table div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.usage-table b { white-space: nowrap; }
.wallet { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.wallet-balance { background: linear-gradient(135deg, #0e100b, #23281a); color: #f4f5ef; border-radius: 22px; padding: 24px; }
.wallet-balance .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.wallet-balance .muted { color: #a9ad9c; }
.topup-amts { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.topup-amts button { height: 38px; padding: 0 16px; border-radius: 99px; border: 1.5px solid #3a4030; background: transparent; color: #f4f5ef; font: 700 14px var(--font); cursor: pointer; }
.topup-amts button.on, .topup-amts button:hover { border-color: var(--lime); color: var(--lime); }
.tx-list .list-item b.neg { color: #b91c1c; } .tx-list .list-item b.pos { color: #15803d; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } .wallet { grid-template-columns: 1fr; } }

/* ---------- checkout ---------- */
.seg-pill a { height: 34px; padding: 0 14px; border-radius: 999px; font: 700 13px var(--font); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.seg-pill a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.checkout .auth-form h1 { margin-top: 22px; }
.co-steps { display: flex; gap: 8px; margin-top: 22px; font-size: 12px; font-weight: 700; }
.co-steps span { flex: 1; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.co-steps span.on { background: var(--lime); color: #0e100b; border-color: transparent; }
.co-opts { display: grid; gap: 10px; margin-bottom: 16px; }
.co-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.co-opt:hover { border-color: var(--border-strong, #cfcfc4); }
.co-opt.on { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
.co-opt b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.co-opt b em { font-style: normal; font-size: 11px; background: var(--lime); color: #0e100b; padding: 2px 8px; border-radius: 99px; }
.co-opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.co-opt strong { font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.co-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong, #cfcfc4); flex: none; position: relative; }
.co-opt.on .co-radio { border-color: var(--text); }
.co-opt.on .co-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--text); }
.co-sum { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 8px; }
.co-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-sum > div span { color: var(--muted); }
.co-sum .co-total { border-top: 1px dashed var(--border); padding-top: 10px; font-size: 16px; }
.co-sum .co-total span { color: var(--text); font-weight: 700; }
.co-sum .co-total b { font-size: 20px; letter-spacing: -.02em; }
.co-sum p { margin: 0; }
.co-prov { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .checkout .auth-side { display: none; } }

/* Meta reply window bar (inbox composer) */
.rw{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12.5px;line-height:1.4;padding:7px 10px;margin:0 0 8px;border-radius:10px;background:var(--surface-2);color:var(--text)}
.rw>i{width:8px;height:8px;border-radius:50%;flex:none;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.18)}
.rw>span{flex:1;min-width:180px}
.rw-agent{background:rgba(245,158,11,.12)}.rw-agent>i{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.2)}
.rw-closed{background:rgba(239,68,68,.1)}.rw-closed>i{background:#ef4444;box-shadow:0 0 0 3px rgba(239,68,68,.18)}
.note-mode .rw{display:none}

/* Inbox thread v2: reply box always visible, adjustable AI summary, view settings */
.thread { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.thread > .empty-thread { grid-row: 1 / -1; }
.th-brief { max-height: 34vh; overflow-y: auto; gap: 4px; padding: 10px 14px; margin: 10px 14px 0; line-height: 1.5; }
.th-brief .tb-head { all: unset; cursor: pointer; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.th-brief .tb-head .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-brief .tb-chev { margin-left: auto; color: #a0a394; transition: transform .2s; }
.th-brief.full .tb-chev { transform: rotate(180deg); }
.th-brief.compact .tb-sum, .th-brief.compact .tb-next { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.th-brief.compact .tb-next { -webkit-line-clamp: 1; }
.th-brief.off { display: none; }
.composer { padding: 10px 14px 12px; }
.composer .modes { align-items: center; gap: 6px; margin-bottom: 6px; }
.composer .modes .check { gap: 6px; }
.composer .sugs { padding-bottom: 6px; }
.msg-app.no-sugs .composer .sugs { display: none; }
.rw { padding: 5px 10px; margin-bottom: 6px; flex-wrap: nowrap; }
.rw > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rw .btn { flex-shrink: 0; }
.msg-app.dense .th-body { gap: 3px; padding: 10px 14px; }
.msg-app.dense .bub { padding: 6px 10px 4px; font-size: 13px; line-height: 1.38; border-radius: 13px; }
.msg-app.dense .th-head { padding: 8px 14px; }
.view-menu { min-width: 260px; padding: 8px 10px 10px; }
.view-menu .dd-title { margin: 6px 2px 6px; }
.view-menu .seg3 { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 4px; }
.view-menu .seg3 button { flex: 1; justify-content: center; padding: 6px 4px; font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 8px; }
.view-menu .seg3 button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.view-menu .check { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
@media (max-height: 820px) { .th-brief { max-height: 24vh; } .msg-app { height: calc(100vh - 68px - 96px); } }
.msg-app { min-height: 440px; }
.th-tools { min-width: 0; } .th-tools select { min-width: 0; flex: 1 1 0; max-width: 200px; } .th-tools .btn { flex-shrink: 0; }
.thread .th-head { position: relative; z-index: 8; }
/* Instagram-through-Facebook connect help */
.ig-fail { text-align: left; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.45); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; font-size: 13.5px; }
.ig-fail b { display: flex; align-items: center; gap: 6px; } .ig-fail p { margin: 6px 0 0; color: var(--muted); }
.ig-steps { text-align: left; margin: 0 auto 16px; padding-left: 20px; max-width: 520px; font-size: 13.5px; line-height: 1.8; }
/* Closed Meta chat → hand off to the Instagram / Messenger app */
.rw .rw-go { border: 0; color: #fff; font-weight: 700; box-shadow: 0 2px 10px rgba(214,41,118,.25); }
.rw-go.ig, .btn-handoff.ig { background: linear-gradient(45deg, #f58529, #dd2a7b 45%, #8134af 75%, #515bd4); }
.rw-go.fb, .btn-handoff.fb { background: linear-gradient(45deg, #0a7cff, #a033ff 70%, #ff5c87); }
.rw .rw-go:hover, .btn-handoff:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-handoff { color: #fff !important; border: 0; white-space: nowrap; gap: 6px; font-weight: 700; padding: 0 16px; box-shadow: 0 4px 14px rgba(129,52,175,.28); transition: transform .15s, filter .15s; }
.rw-handoff { background: rgba(34,197,94,.12); animation: pop .2s ease; }
.rw-handoff > i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.rw-handoff > span { white-space: normal; }
.rw-handoff .btn { flex-shrink: 0; }
@media (max-width: 760px) { .btn-handoff span { display: none; } .btn-handoff::before { content: "IG"; } .btn-handoff.fb::before { content: "Msg"; } }

/* ---------- AI Training ---------- */
.kb-hero { display: flex; gap: 22px; align-items: center; padding: 20px 24px; background: linear-gradient(120deg, var(--surface) 55%, var(--lime-50, #f7ffd6)); }
:root[data-theme="dark"] .kb-hero { background: linear-gradient(120deg, var(--surface) 55%, rgba(231,255,86,.08)); }
.kb-ring { --p: 0; width: 104px; height: 104px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--text) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; }
.kb-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }
.kb-ring > div { position: relative; text-align: center; line-height: 1.1; }
.kb-ring b { font-size: 24px; font-weight: 800; display: block; } .kb-ring span { font-size: 11px; color: var(--muted); font-weight: 600; }
.kb-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-checks span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.kb-checks span.ok { background: var(--text); color: var(--bg); }
.kb-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.kb-side { position: sticky; top: 84px; }
.kb-profile textarea { resize: vertical; line-height: 1.5; }
.kb-sec { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.kb-sec h4 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; }
.kb-faq { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; background: var(--bg); }
.kb-faq input { font-weight: 600; } .kb-faq textarea { grid-column: 1; } .kb-faq .icon-btn { grid-row: 1 / span 2; grid-column: 2; align-self: start; }
.kb-tones { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-tones label { cursor: pointer; } .kb-tones input { display: none; }
.kb-tones span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; transition: .15s; }
.kb-tones input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.switch-row { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.kb-save { position: sticky; bottom: 0; margin: 20px -24px -24px; padding: 14px 24px; background: linear-gradient(transparent, var(--surface) 30%); display: flex; justify-content: flex-end; border-radius: 0 0 var(--radius) var(--radius); }
.kb-url { display: flex; gap: 8px; } .kb-url input { flex: 1; min-width: 0; }
.kb-note summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.kb-sources { margin-top: 14px; display: grid; gap: 8px; }
.kb-src { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.kb-src.off { opacity: .55; }
.kb-src b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-src-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.kb-src-act { display: flex; gap: 2px; flex: none; } .kb-src-act form { margin: 0; } .kb-src-act .icon-btn { width: 30px; height: 30px; }
.kb-facts { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); max-height: 220px; overflow: auto; line-height: 1.5; }
.kb-try-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kb-try-ex button { border: 1px dashed var(--border-strong); background: none; border-radius: 99px; padding: 5px 10px; font: 600 12px var(--font); color: var(--muted); cursor: pointer; }
.kb-try-ex button:hover { color: var(--text); border-color: var(--text); }
.kb-ans { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
.kb-ans-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; align-items: center; }
.kb-reply { background: #0e100b; color: #f1f2ea; } .kb-reply .kb-ans-l { color: var(--lime); } .kb-reply .btn { color: #f1f2ea; }
.kb-used { display: flex; flex-wrap: wrap; gap: 5px; } .kb-used span { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--surface); }
.kb-miss { background: rgba(245,158,11,.12); }
.kb-pre { white-space: pre-wrap; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 14px; border-radius: 12px; max-height: 60vh; overflow: auto; }
@media (max-width: 1100px) { .kb-grid { grid-template-columns: 1fr; } .kb-side { position: static; } }
@media (max-width: 600px) { .kb-hero { flex-direction: column; text-align: center; } .kb-checks { justify-content: center; } .kb-url { flex-direction: column; } }

/* ---------- Inbox v3: collapsible panels, foldable AI summary, resizable reply box ---------- */
.msg-app { --rail-w: 236px; --list-w: 360px; grid-template-columns: var(--rail-w) var(--list-w) minmax(0, 1fr); transition: grid-template-columns .28s cubic-bezier(.2,.8,.2,1); }
.msg-app.with-details { grid-template-columns: var(--rail-w) var(--list-w) minmax(0, 1fr) 300px; }
@media (max-width: 1499px) { .msg-app.with-details { grid-template-columns: var(--rail-w) var(--list-w) minmax(0, 1fr); } }
@media (max-width: 1280px) { .msg-app { --rail-w: 210px; --list-w: 300px; } }
.msg-app.rail-mini { --rail-w: 62px; }
.msg-app.list-mini { --list-w: 74px; }
.msg-app.focus { --rail-w: 0px; --list-w: 0px; }
.msg-app.resizing { transition: none; user-select: none; }
@media (max-width: 1100px) { .msg-app, .msg-app.with-details { grid-template-columns: var(--list-w) minmax(0, 1fr); } .msg-app { --list-w: 300px; } .msg-app.list-mini { --list-w: 74px; } .msg-app.focus { --list-w: 0px; } .lay-pill [data-lay="rail"] { display: none; } }
@media (max-width: 760px) { .msg-app, .msg-app.with-details { grid-template-columns: 1fr; } .lay-pill { display: none; } }
.msg-app.focus .rail, .msg-app.focus .conv-col { visibility: hidden; overflow: hidden; border: 0; padding: 0; }

/* layout pill in the page header */
.lay-pill { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.lay-pill button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 700 12.5px var(--font); cursor: pointer; transition: .15s; }
.lay-pill button:hover { color: var(--text); }
.lay-pill button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.lay-pill [data-lay="focus"].on { background: #0e100b; color: var(--lime); }
@media (max-width: 1360px) { .lay-pill span { display: none; } .lay-pill button { padding: 0 9px; } }

/* panel collapse chevrons */
.pane-tg { border: 0; background: none; color: var(--muted); width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; flex: none; transition: transform .25s, background .15s; }
.pane-tg:hover { background: var(--surface); color: var(--text); }
.rail-top { padding-top: 4px; }
.rail-mini .rail-top .pane-tg, .list-mini .conv-head .pane-tg { transform: rotate(180deg); }

/* folders rail → icon strip */
.rail-mini .rail { padding: 10px 6px; overflow-x: hidden; }
.rail-mini .rail-group { font-size: 0; padding: 8px 0 4px; justify-content: center; border-top: 1px solid var(--border); margin-top: 4px; }
.rail-mini .rail-group:first-child { border-top: 0; margin-top: 0; }
.rail-mini .rail-group button:not(.pane-tg) { display: none; }
.rail-mini .rail-item { justify-content: center; padding: 9px 0; position: relative; }
.rail-mini .rail-item .lbl, .rail-mini .rail-item .ct, .rail-mini .rail-item .tg { display: none; }
.rail-mini .rail-item .em { width: auto; font-size: 17px; }
.rail-mini .rail-item .ub { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; line-height: 16px; }

/* chat list → avatar strip */
.list-mini .conv-head { padding: 10px 6px; }
.list-mini .conv-head > .row-between { justify-content: center; }
.list-mini .conv-head h3, .list-mini .conv-head #sortSel, .list-mini .conv-head #selToggle, .list-mini .conv-search, .list-mini #readSeg, .list-mini .bulkbar { display: none !important; }
.list-mini .conv { justify-content: center; padding: 10px 0; gap: 0; }
.list-mini .conv .c-main, .list-mini .conv .sel { display: none; }
.list-mini .conv .c-av { position: relative; }
.list-mini .conv.unread .c-av::after { content: ""; position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--blue, #2563eb); box-shadow: 0 0 0 2px var(--surface); }

/* AI summary: Full / Compact / Folded */
.th-brief { transition: padding .2s; }
.th-brief .tb-bar { display: flex; align-items: center; gap: 4px; }
.th-brief .tb-bar .tb-head { flex: 1; min-width: 0; }
.th-brief .tb-btn { border: 0; background: rgba(255,255,255,.08); color: #d6d8cc; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; display: inline-grid; place-items: center; font-size: 13px; flex: none; transition: background .15s; }
.th-brief .tb-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.th-brief .tb-chev { margin: 0; color: inherit; display: inline-block; transition: transform .25s; }
.th-brief.mini .tb-chev { transform: rotate(180deg); }
.th-brief.full .tb-full { color: var(--lime); }
.th-brief.mini { padding: 7px 12px; }
.th-brief.mini .tb-sum, .th-brief.mini .tb-next { display: none; }
.th-brief.mini .tb-head b::after { content: " · tap to open"; font-weight: 500; color: #8b8e80; font-size: 12px; }
.th-brief.full { max-height: 46vh; }

/* reply box: grip to resize / fold */
.composer { position: relative; }
.cp-grip { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 64px; height: 18px; border: 0; background: none; cursor: ns-resize; display: grid; place-items: center; z-index: 2; touch-action: none; }
.cp-grip i { width: 40px; height: 5px; border-radius: 99px; background: var(--border-strong); transition: background .15s, width .15s; }
.cp-grip:hover i { background: var(--text); width: 52px; }
.composer.collapsed .modes, .composer.collapsed .sugs { display: none; }
.composer.collapsed { padding-top: 12px; }
.composer.collapsed .cp-grip i { background: var(--lime); box-shadow: 0 0 0 1px rgba(14,16,11,.25); }
.composer textarea { max-height: 50vh; }
/* folded AI summary: a clear, fully visible pill bar (never squeezed by the chat) */
.thread > .th-brief { min-height: min-content; }
.th-brief.mini { overflow: visible; max-height: none; min-height: 42px; display: flex; align-items: center; padding: 0 8px 0 14px; border-radius: 14px;
  background: linear-gradient(90deg, #0e100b, #1d2114); box-shadow: 0 2px 10px rgba(14,16,11,.12); cursor: pointer; }
.th-brief.mini .tb-bar { width: 100%; }
.th-brief.mini .tb-head { align-items: center; }
.th-brief.mini .tb-head b { white-space: nowrap; }
.th-brief.mini .tb-head b::after { content: none; }
.th-brief.mini .tb-head .muted { font-size: 12.5px; }
.th-brief.mini .tb-btn { width: 28px; height: 28px; background: rgba(231,255,86,.12); color: var(--lime); }
.th-brief.mini .tb-btn:hover { background: rgba(231,255,86,.25); }
.th-brief.mini:hover { box-shadow: 0 4px 16px rgba(14,16,11,.2); }
/* TikTok comments (Business API) link on the TikTok connection page */
.ttb-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--border-strong); background: var(--surface-2); }
.ttb-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #0e100b; color: #25F4EE; box-shadow: 3px 3px 0 #FE2C55; flex: none; }

/* ---------- TikTok Ads ---------- */
.tta-hero { display: flex; gap: 24px; align-items: flex-start; padding: 28px; background: linear-gradient(135deg, var(--surface) 60%, rgba(37,244,238,.10), rgba(254,44,85,.10)); }
.tta-hero h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.tta-hero-ic { flex: none; }
.tta-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.tta-entry { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; background: #0e100b; color: #f1f2ea; border: 0; }
.tta-entry h3 { color: #fff; margin: 0; } .tta-entry p { color: #a0a394; margin: 2px 0 0; }
.tta-entry .btn { background: #fff; color: #0e100b; }
.tta-form { max-height: 72vh; overflow-y: auto; }
.tta-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; }
.tta-step { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin: 16px 0 10px; }
.tta-step:first-child { margin-top: 0; }
.tta-step b { width: 22px; height: 22px; border-radius: 50%; background: #0e100b; color: var(--lime); display: grid; place-items: center; font-size: 12px; }
.tta-goals { display: grid; gap: 8px; }
.tta-goals label { cursor: pointer; } .tta-goals input { display: none; }
.tta-goals span { display: flex; flex-direction: column; padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 14px; transition: .15s; }
.tta-goals small { color: var(--muted); font-size: 12px; }
.tta-goals input:checked + span { border-color: var(--text); background: var(--lime-50, #f7ffd6); box-shadow: 0 0 0 3px rgba(14,16,11,.06); }
:root[data-theme="dark"] .tta-goals input:checked + span { background: rgba(231,255,86,.08); }
.tta-loc { position: relative; border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; background: var(--surface); }
.tta-loc input { border: 0; flex: 1; min-width: 160px; height: 32px; padding: 0 6px; box-shadow: none; }
#locChips { display: contents; }
.tta-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 99px; background: #0e100b; color: #fff; font-size: 12.5px; font-weight: 600; }
.tta-chip button { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; }
.tta-loc-res { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 5; overflow: hidden; }
.tta-loc-res:empty { display: none; }
.tta-loc-res button { display: flex; justify-content: space-between; width: 100%; padding: 9px 12px; border: 0; background: none; cursor: pointer; font: 600 13px var(--font); color: var(--text); text-align: left; }
.tta-loc-res button:hover { background: var(--surface-2); } .tta-loc-res small { color: var(--muted); font-weight: 500; }
.tta-drop { display: flex; align-items: center; justify-content: center; min-height: 64px; border: 1.5px dashed var(--border-strong); border-radius: 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); gap: 8px; padding: 10px; text-align: center; }
.tta-drop:hover { border-color: var(--text); color: var(--text); } .tta-drop input { display: none; }
.tta-phone { width: 190px; margin: 12px auto 0; padding: 8px; border-radius: 28px; background: #0e100b; box-shadow: var(--shadow-lg); }
.tta-screen { position: relative; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #222, #000); }
.tta-screen video { width: 100%; height: 100%; object-fit: cover; }
.tta-ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px; color: #fff; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.tta-ov p { margin: 4px 0 8px; line-height: 1.35; }
.tta-cta { display: block; text-align: center; background: #FE2C55; border-radius: 6px; padding: 6px; font-weight: 700; }
@media (max-width: 860px) { .tta-cols { grid-template-columns: 1fr; } .tta-hero { flex-direction: column; } }
/* TikTok Ads — price summary (customer) */
.tta-pay { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: end; margin-top: 8px; }
.tta-pay .tta-phone { width: 170px; margin: 0; }
.tta-sum { border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: var(--surface-2); font-size: 13px; display: grid; gap: 8px; }
.tta-sum > div { display: flex; justify-content: space-between; gap: 10px; }
.tta-sum-h { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tta-sum-t { border-top: 1px dashed var(--border-strong); padding-top: 8px; font-size: 15px; }
.tta-sum-t b { font-size: 18px; }
@media (max-width: 860px) { .tta-pay { grid-template-columns: 1fr; } .tta-pay .tta-phone { margin: 0 auto; } }
/* TikTok Ads — admin */
.tta-admin { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.tta-acct.off { border-style: dashed; }
.tta-acct-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tta-acct-kpis > div { padding: 12px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 2px; }
.tta-acct-kpis span { font-size: 11.5px; color: var(--muted); font-weight: 600; } .tta-acct-kpis b { font-size: 17px; }
.tta-queue { display: grid; gap: 10px; }
.tta-q { display: grid; grid-template-columns: 64px minmax(0, 1fr) 190px 150px; gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.tta-q-vid { width: 64px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #0e100b; }
.tta-q-vid video { width: 100%; height: 100%; object-fit: cover; }
.tta-q-money { display: grid; gap: 6px; font-size: 12px; }
.tta-q-money > div { display: grid; } .tta-q-money span { color: var(--muted); font-size: 11px; } .tta-q-money small { color: var(--muted); font-size: 10.5px; }
.tta-q-money .fee b { color: #16a34a; }
.tta-q-act { display: grid; gap: 6px; justify-items: stretch; }
.tta-rej summary { list-style: none; text-align: center; } .tta-rej summary::-webkit-details-marker { display: none; }
.tta-rej[open] { display: grid; gap: 6px; } .tta-rej textarea { font-size: 12px; }
.tta-set { position: sticky; top: 84px; }
.tta-suffix { display: flex; align-items: center; gap: 8px; } .tta-suffix input { flex: 1; } .tta-suffix span { font-weight: 700; color: var(--muted); }
.tta-how { padding: 12px; border-radius: 14px; background: #0e100b; color: #d6d8cc; font-size: 12.5px; }
.tta-how b { color: var(--lime); } .tta-how ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
@media (max-width: 1200px) { .tta-admin { grid-template-columns: 1fr; } .tta-set { position: static; } .tta-q { grid-template-columns: 56px minmax(0, 1fr); } .tta-q-money, .tta-q-act { grid-column: 2; } }

/* ---------- Meta Ads ---------- */
.mads-logo { display: inline-flex; gap: 6px; }
.mads-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mads-tpl { --tc: #6366f1; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: var(--text); overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; }
.mads-tpl::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--tc); }
.mads-tpl:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--tc); }
.mads-tpl-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--tc) 14%, transparent); margin-bottom: 6px; }
.mads-tpl b { font-size: 15px; } .mads-tpl small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.mads-tpl-meta { margin-top: auto; padding-top: 10px; font-size: 11px; font-weight: 700; color: var(--tc); text-transform: uppercase; letter-spacing: .03em; }
.mads-list { display: grid; gap: 10px; }
.mads-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s; }
.mads-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.mads-thumb { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--surface-2); flex: none; }
.mads-thumb img, .mads-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mads-thumb span { position: absolute; right: 2px; bottom: 2px; font-size: 14px; }
.mads-mini { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; } .mads-mini b { color: var(--text); }
.mads-builder { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.mads-form { display: grid; gap: 14px; }
.mads-form .card { padding: 18px 20px; }
.mads-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.mads-goals { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mads-note { padding: 8px 10px; border-radius: 10px; background: rgba(245,158,11,.12); color: var(--text); }
.mads-range { position: relative; height: 34px; }
.mads-range input { position: absolute; left: 0; right: 0; top: 8px; width: 100%; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; height: 18px; }
.mads-range input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #0e100b; border: 3px solid var(--lime); cursor: pointer; }
.mads-range::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 4px; border-radius: 99px; background: var(--surface-2); }
.mads-est { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.mads-quick { display: flex; gap: 6px; margin-bottom: 6px; }
.mads-quick button { flex: 1; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 7px; font: 700 12.5px var(--font); cursor: pointer; color: var(--text); }
.mads-quick button:hover { border-color: var(--text); }
.mads-sum .btn { margin-top: 4px; }
/* ad preview (Facebook / Instagram look) */
.mads-prev { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; color: #050505; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.mp-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; } .mp-head small { display: block; color: #65676b; font-size: 11.5px; }
.mp-av { width: 36px; height: 36px; border-radius: 50%; background: #1877F2; color: #fff; display: grid; place-items: center; font-weight: 700; }
.mp-text { padding: 0 12px 10px; margin: 0; font-size: 13.5px; line-height: 1.4; white-space: pre-line; max-height: 140px; overflow: hidden; }
.mp-media { aspect-ratio: 1; background: #f0f2f5; display: grid; place-items: center; color: #8a8d91; overflow: hidden; }
.mp-media img, .mp-media video { width: 100%; height: 100%; object-fit: cover; }
.mp-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f0f2f5; }
.mp-foot > div { flex: 1; min-width: 0; display: grid; } .mp-foot small { color: #65676b; font-size: 11px; } .mp-foot b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mp-foot span:not(.mp-cta) { font-size: 12px; color: #65676b; }
.mp-cta { flex: none; background: #e4e6eb; border-radius: 6px; padding: 7px 12px; font-weight: 700; font-size: 13px; }
.mads-prev[data-p="instagram"] .mp-av { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.mads-prev[data-p="instagram"] .mp-media { order: -1; }
.mads-prev[data-p="instagram"] { display: flex; flex-direction: column; }
.mads-prev[data-p="instagram"] .mp-head { order: -2; }
.mads-prev[data-p="instagram"] .mp-foot { background: #fff; border-top: 1px solid #efefef; } .mads-prev[data-p="instagram"] .mp-cta { background: #0095f6; color: #fff; }
.mads-prev[data-p="instagram"] .mp-text { padding-top: 10px; }
/* analytics */
.mads-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.mads-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mads-kpis > div { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 2px; }
.mads-kpis span { font-size: 12px; color: var(--muted); font-weight: 600; } .mads-kpis b { font-size: 26px; letter-spacing: -.02em; } .mads-kpis small { font-size: 11.5px; color: var(--muted); }
.mads-kpis .hl { background: #0e100b; color: #fff; border: 0; } .mads-kpis .hl span, .mads-kpis .hl small { color: #a0a394; } .mads-kpis .hl b { color: var(--lime); }
.mads-bar { display: grid; gap: 4px; margin-bottom: 12px; }
.mads-bar i { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); position: relative; overflow: hidden; }
.mads-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, #1877F2, #dd2a7b); border-radius: 99px; }
@media (max-width: 1100px) { .mads-builder, .mads-detail { grid-template-columns: 1fr; } .mads-side { position: static; } .mads-kpis { grid-template-columns: repeat(2, 1fr); } }
.mads-entry { background: linear-gradient(110deg, #1877F2, #8134af 70%, #dd2a7b); }

/* ---------- Ads page: all ads with full detail ---------- */
.ax-wrap { padding: 22px; }
.ax-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ax-top h3 { font-size: 20px; }
.ax-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ax-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 12px; padding: 0 10px; background: var(--surface); color: var(--muted); height: 38px; }
.ax-search input { border: 0; background: none; padding: 0; height: 36px; width: 180px; box-shadow: none !important; outline: 0; color: var(--text); }
.ax-tools select { height: 38px; padding: 0 30px 0 12px; width: auto; border-radius: 12px; }
.ax-view { display: inline-flex; border: 1px solid var(--border); border-radius: 12px; padding: 3px; background: var(--surface-2); }
.ax-view button { border: 0; background: none; width: 32px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.ax-view button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ax-filters { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.ax-seg, .ax-stages { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-seg button, .ax-stages button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 13px; font: 600 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.ax-seg button span, .ax-stages button span { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 1px 7px; color: var(--muted); }
.ax-seg button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ax-seg button.on span { background: rgba(255,255,255,.18); color: inherit; }
.ax-stages button.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.ax-stages button:hover, .ax-seg button:hover { border-color: var(--border-strong); }
.ax-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; }
.ax-dot.st-running { background: var(--green); } .ax-dot.st-review, .ax-dot.st-payment { background: var(--amber); } .ax-dot.st-done { background: var(--blue); } .ax-dot.st-problem { background: var(--red); }

.ax-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.adc { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; outline: 0; }
.adc[hidden] { display: none; }
.adc:hover, .adc:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.adc-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.adc-media img, .adc-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.adc:hover .adc-media img { transform: scale(1.04); }
.adc-ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #fff; font-size: 17px; background: linear-gradient(135deg, var(--ac, #1877f2), color-mix(in srgb, var(--ac, #1877f2) 55%, #000)); }
.adc-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); pointer-events: none; }
.adc-nets { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; }
.adc-nets .pbadge { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.adc-status { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.94); color: #15170f; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.adc-status.inline { position: static; box-shadow: none; background: var(--surface-2); color: var(--text); }
.adc-status i { width: 7px; height: 7px; border-radius: 50%; background: #9a9d90; }
.adc-status.st-running i { background: var(--green); box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: axPulse 1.8s infinite; }
.adc-status.st-review i, .adc-status.st-payment i { background: var(--amber); } .adc-status.st-done i { background: var(--blue); } .adc-status.st-problem i { background: var(--red); }
@keyframes axPulse { 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.adc-body { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.adc-title h4 { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adc-copy { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.adc-copy b { color: var(--text); }
.adc-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.adc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ac, var(--green)), color-mix(in srgb, var(--ac, var(--green)) 60%, var(--lime))); }
.adc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 9px 6px; text-align: center; }
.adc-kpis span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.adc-kpis b { font-size: 14px; font-variant-numeric: tabular-nums; }
.adc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 14px; }
.adc-foot .tiny { display: inline-flex; align-items: center; gap: 5px; }
.adc-foot form { margin: 0; }
/* list view */
.ax-grid.is-list { grid-template-columns: 1fr; gap: 10px; }
.ax-grid.is-list .adc { flex-direction: row; align-items: center; }
.ax-grid.is-list .adc-media { width: 150px; flex: none; aspect-ratio: 16 / 11; align-self: stretch; }
.ax-grid.is-list .adc-nets .pbadge { width: 22px !important; height: 22px !important; }
.ax-grid.is-list .adc-status { top: auto; bottom: 8px; right: auto; left: 8px; font-size: 10.5px; }
.ax-grid.is-list .adc-body { flex-direction: row; align-items: center; padding: 12px 16px; gap: 18px; }
.ax-grid.is-list .adc-title { width: 210px; flex: none; } .ax-grid.is-list .adc-copy { display: none; }
.ax-grid.is-list .adc-budget { width: 200px; flex: none; } .ax-grid.is-list .adc-kpis { flex: 1; min-width: 260px; }
.ax-grid.is-list .adc-foot { flex-direction: column; align-items: flex-end; padding: 12px 16px; }
.ax-none { text-align: center; padding: 40px 10px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }

/* detail drawer */
.axd { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.axd-back { position: absolute; inset: 0; background: rgba(10,12,8,.45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.axd-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(860px, 100%); background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.axd.open { pointer-events: auto; } .axd.open .axd-back { opacity: 1; } .axd.open .axd-panel { transform: none; }
body.axd-lock { overflow: hidden; }
.axd-head { display: flex; align-items: flex-start; gap: 8px; padding: 18px 22px; border-bottom: 1px solid var(--border); background: var(--surface); }
.axd-head h3 { font-size: 21px; margin: 8px 0 2px; }
.axd-head .icon-btn:disabled { opacity: .35; cursor: default; }
.axd-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.axd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.axd-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.axd-sec h5 { display: flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.axd-cols > div > .axd-sec + .axd-sec, .axd-budget + .axd-sec { margin-top: 16px; }
.axd-kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px dashed var(--border); font-size: 13.5px; }
.axd-kv:first-of-type { border-top: 0; }
.axd-kv span { color: var(--muted); flex: none; }
.axd-kv b { text-align: right; font-weight: 600; word-break: break-word; white-space: pre-line; }
.axd-kv a { color: var(--blue); }
.axd-kv .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.axd-copy { border: 0; background: var(--surface-2); color: var(--muted); border-radius: 7px; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; }
.axd-budget { background: var(--ink); color: var(--bg); border-radius: var(--radius); padding: 16px 18px; }
.axd-budget .muted { color: inherit; opacity: .7; }
.axd-big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.axd-big span { font-size: 14px; font-weight: 600; opacity: .7; }
.axd-budget .adc-bar { background: rgba(255,255,255,.15); } .axd-budget .adc-bar i { background: var(--lime); }
.axd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.axd-kpi { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.axd-kpi span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.axd-kpi b { font-size: 17px; font-variant-numeric: tabular-nums; }
.axd-chart { margin-top: 12px; } .axd-chart svg { width: 100%; height: 70px; display: block; } .axd-chart rect { fill: var(--blue); opacity: .85; } .axd-chart rect:hover { opacity: 1; fill: var(--green); }
.axd-split { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 0; border-top: 1px dashed var(--border); }
.axd-time { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.axd-time span { display: block; font-size: 11px; color: var(--muted); } .axd-time b { font-size: 13px; }
.axd-time i { flex: 1; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--green) var(--p), var(--surface-2) var(--p)); }
.axd-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--amber) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: 13.5px; }
.axd-note.bad { background: color-mix(in srgb, var(--red) 12%, var(--surface)); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.axd-foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface); }
.axd-foot form { margin: 0; }
/* platform-style preview */
.axp { background: #fff; color: #050505; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); font-family: system-ui, -apple-system, sans-serif; }
.axp-head { display: flex; gap: 9px; align-items: center; padding: 12px; } .axp-head b { display: block; font-size: 14px; } .axp-head span { font-size: 12px; color: #65676b; }
.axp-text { padding: 0 12px 10px; font-size: 14px; white-space: pre-line; }
.axp-media img, .axp-media video { width: 100%; max-height: 420px; object-fit: cover; background: #000; }
.axp-ph { aspect-ratio: 1.91; display: grid; place-items: center; background: linear-gradient(135deg, #1877f2, #0b3b7a); color: #fff; font-weight: 700; padding: 20px; text-align: center; }
.axp-foot { display: flex; align-items: center; gap: 10px; background: #f0f2f5; padding: 10px 12px; }
.axp-foot span { display: block; font-size: 11px; color: #65676b; } .axp-foot b { display: block; font-size: 14px; } .axp-foot small { display: block; color: #65676b; font-size: 12px; }
.axp-foot em { font-style: normal; font-weight: 700; font-size: 13px; background: #e4e6eb; border-radius: 8px; padding: 8px 12px; white-space: nowrap; }
.axp-tt { position: relative; background: #000; color: #fff; aspect-ratio: 9 / 14; max-height: 520px; }
.axp-tt video, .axp-tt img { width: 100%; height: 100%; object-fit: cover; }
.axp-tt-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 13px; pointer-events: none; }
.axp-tt-cap span { display: block; margin-top: 8px; text-align: center; background: #fe2c55; border-radius: 6px; padding: 7px; font-weight: 700; pointer-events: auto; }
@media (max-width: 760px) {
  .axd-cols { grid-template-columns: 1fr; } .axd-kpis { grid-template-columns: repeat(2, 1fr); }
  .ax-search input { width: 120px; }
  .ax-grid.is-list .adc { flex-direction: column; align-items: stretch; } .ax-grid.is-list .adc-media { width: 100%; }
  .ax-grid.is-list .adc-body { flex-direction: column; align-items: stretch; } .ax-grid.is-list .adc-title, .ax-grid.is-list .adc-budget { width: auto; }
  .ax-grid.is-list .adc-foot { flex-direction: row; }
  .axd-head, .axd-body, .axd-foot { padding-left: 16px; padding-right: 16px; }
}
.axd-kv.stack { flex-direction: column; gap: 3px; } .axd-kv.stack b { text-align: left; font-weight: 500; }
.ax-grid.is-list .adc-foot > .tiny { display: none; }
.ax-grid.is-list .adc-foot { flex: none; padding-left: 0; }
.ax-grid.is-list .adc-foot > .row { flex-direction: column; align-items: stretch; }
.ax-grid.is-list .adc-ph { font-size: 12px; padding: 10px 10px 30px; }
.ax-grid.is-list .adc-title { width: 190px; } .ax-grid.is-list .adc-budget { width: 180px; } .ax-grid.is-list .adc-kpis { min-width: 230px; }
.ax-sync { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 6px 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); flex-wrap: wrap; }
.ax-sync .pbadge { flex: none; }
.adc-src { display: inline-block; font-size: 10.5px; font-weight: 700; color: #1877f2; background: rgba(24,119,242,.1); border-radius: 6px; padding: 1px 6px; margin-right: 2px; }
.adc-media { background: linear-gradient(135deg, var(--ac, #1877f2), color-mix(in srgb, var(--ac, #1877f2) 55%, #000)); }
.ax-more { display: flex; justify-content: center; margin-top: 18px; }
.axd-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 10px; color: var(--muted); }

/* ---------- Meta ad builder v2 (AI-powered) ---------- */
.btn-lime { background: var(--lime); color: #0e100b; border: 0; box-shadow: 0 6px 20px -6px rgba(207,232,58,.7); }
.btn-lime:hover { filter: brightness(1.04); }
.mb-price { font-size: 11px; font-weight: 800; background: rgba(0,0,0,.1); padding: 2px 8px; border-radius: 99px; margin-left: 2px; }
.btn-dark .mb-price, .btn-outline .mb-price { background: color-mix(in srgb, currentColor 14%, transparent); }
.mb-restored { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--blue) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); font-size: 13.5px; margin-bottom: 14px; }
.mb-restored .btn { margin-left: auto; }
.mb-ai { position: relative; border-radius: 22px; padding: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, #4c1d95 0%, #1e1b4b 45%, #0e100b 100%); box-shadow: 0 20px 50px -24px rgba(76,29,149,.7); }
.mb-ai::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(231,255,86,.25), transparent 70%); pointer-events: none; }
.mb-ai-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.mb-ai-top h3 { font-size: 19px; color: #fff; } .mb-ai-top p { font-size: 13.5px; color: rgba(255,255,255,.72); margin-top: 2px; }
.mb-ai-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--lime); color: #0e100b; }
.mb-bal { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.mb-bal b { color: var(--lime); }
.mb-ai textarea { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; resize: vertical; }
.mb-ai textarea::placeholder { color: rgba(255,255,255,.45); }
.mb-ai textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(231,255,86,.15); outline: 0; }
.mb-ai-ex { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mb-ai-ex button { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); border-radius: 99px; padding: 6px 12px; font: 600 12px var(--font); cursor: pointer; text-align: left; }
.mb-ai-ex button:hover { background: rgba(255,255,255,.14); color: #fff; }
.mb-ai-more { margin-top: 12px; font-size: 13px; }
.mb-ai-more summary { cursor: pointer; color: rgba(255,255,255,.75); font-weight: 600; }
.mb-ai-more label { color: rgba(255,255,255,.8); }
.mb-ai-more input, .mb-ai-more select { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.mb-ai-more select option { color: #111; }
.mb-ai-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.mb-ai-go .tiny { color: rgba(255,255,255,.6); }
.mb-tips { margin-top: 14px; display: grid; gap: 6px; font-size: 13px; color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; }
.mb-sec { transition: box-shadow .3s; }
.mb-sec.pulse { box-shadow: 0 0 0 3px var(--lime), var(--shadow); }
.mb-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mb-h > b { width: 30px; height: 30px; flex: none; border-radius: 10px; background: #0e100b; color: var(--lime); display: grid; place-items: center; font-size: 13px; }
.mb-h h4 { font-size: 16px; } .mb-h small { color: var(--muted); font-size: 12.5px; }
.mb-h > div { flex: 1; }
.mb-plat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mb-plat label { cursor: pointer; } .mb-plat input { display: none; }
.mb-plat span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 14px; font-weight: 700; font-size: 14px; flex-wrap: wrap; transition: .15s; opacity: .55; }
.mb-plat small { width: 100%; font-weight: 500; color: var(--muted); font-size: 11.5px; margin-top: -4px; padding-left: 28px; }
.mb-plat input:checked + span { border-color: var(--text); opacity: 1; background: var(--surface); box-shadow: 0 0 0 3px rgba(14,16,11,.05); }
.mb-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mb-act { cursor: pointer; } .mb-act input { display: none; }
.mb-act span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 16px; transition: .15s; background: var(--surface); }
.mb-act i { font-style: normal; font-size: 22px; margin-bottom: 4px; }
.mb-act b { font-size: 13.5px; } .mb-act small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.mb-act:hover span { border-color: var(--border-strong); transform: translateY(-1px); }
.mb-act input:checked + span { border-color: var(--text); background: var(--lime-50); box-shadow: 0 0 0 3px rgba(14,16,11,.06); }
:root[data-theme="dark"] .mb-act input:checked + span { background: color-mix(in srgb, var(--lime) 12%, var(--surface)); border-color: var(--lime); }
.mb-actbox { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.mb-actbox .field:last-child { margin-bottom: 0; }
.mb-phone { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); overflow: hidden; }
.mb-phone span { padding: 0 12px; font-size: 18px; border-right: 1px solid var(--border); align-self: stretch; display: grid; place-items: center; background: var(--surface-2); }
.mb-phone.wa span { background: #25d366; color: #fff; }
.mb-phone input { border: 0; box-shadow: none !important; font-size: 16px; letter-spacing: .02em; }
.mb-info { font-size: 13.5px; line-height: 1.5; } .mb-info.bad { color: var(--red); }
.mb-type { width: 170px; flex: none; }
.mb-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.mb-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 7px 14px; font: 700 13px var(--font); cursor: pointer; }
.mb-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mb-tabs #tabAi.on { background: linear-gradient(135deg, #7c3aed, #4c1d95); color: #fff; border-color: transparent; }
.mb-drop { min-height: 130px; flex-direction: column; }
.mb-drop span { display: flex; flex-direction: column; align-items: center; gap: 4px; } .mb-drop b { color: var(--text); } .mb-drop small { font-weight: 500; }
.mb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.mb-gallery:empty { display: none; }
.mb-gallery button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: var(--surface-2); }
.mb-gallery button.on { border-color: var(--lime); box-shadow: 0 0 0 2px #0e100b; }
.mb-gallery img { width: 100%; height: 100%; object-fit: cover; }
.mb-vars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.mb-vars > .tiny { grid-column: 1 / -1; }
.mb-var { position: relative; text-align: left; border: 1.5px solid var(--border); background: var(--surface); border-radius: 14px; padding: 12px 12px 10px; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 4px; transition: .15s; }
.mb-var:hover { border-color: var(--border-strong); }
.mb-var.on { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.mb-var-n { position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.mb-var.on .mb-var-n { background: #7c3aed; color: #fff; }
.mb-var b { font-size: 13.5px; padding-right: 26px; } .mb-var p { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; } .mb-var small { font-size: 11.5px; color: var(--faint); }
.tiny.over { color: var(--amber); font-weight: 700; }
.mb-map-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.mb-geo { position: absolute !important; left: 10px; right: 10px; top: 10px; z-index: 500; align-items: center; box-shadow: var(--shadow); padding: 4px 6px 4px 12px; color: var(--muted); flex-wrap: nowrap; }
.mb-map { height: 340px; background: var(--surface-2); z-index: 1; }
.mb-map-hint { position: absolute; left: 10px; bottom: 10px; z-index: 500; background: rgba(255,255,255,.92); color: #333; padding: 4px 10px; border-radius: 99px; display: inline-flex; gap: 5px; align-items: center; pointer-events: none; }
.mb-locs { display: grid; gap: 8px; margin-top: 10px; }
.mb-loc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.mb-loc-ic { font-size: 20px; } .mb-loc b { font-size: 13.5px; display: block; } .mb-loc small { font-size: 11.5px; color: var(--muted); }
.mb-loc .icon-btn { width: 30px; height: 30px; font-size: 12px; }
.mb-rad { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.mb-rad input { flex: 1; accent-color: #1877f2; } .mb-rad em { font-style: normal; font-size: 12px; font-weight: 700; min-width: 64px; text-align: right; color: #1877f2; }
.mb-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mb-chips button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: 8px 16px; font: 700 13px var(--font); cursor: pointer; }
.mb-chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mb-budget { display: flex; gap: 12px; align-items: center; }
.mb-budget input[type=range] { flex: 1; accent-color: #0e100b; } :root[data-theme="dark"] .mb-budget input[type=range] { accent-color: var(--lime); }
.mb-budget input[type=number] { width: 140px; font-size: 18px; font-weight: 800; text-align: right; }
.mb-check { padding: 16px 18px; }
.mb-prog { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 10px; }
.mb-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--lime)); transition: width .3s; }
.mb-ck { font-size: 13px; color: var(--muted); padding: 3px 0; } .mb-ck.ok { color: var(--green); font-weight: 600; }
.mp-media > span { display: grid; place-items: center; gap: 4px; color: var(--faint); } .mp-media > span small { font-size: 12px; }
.mb-topup { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; align-items: center; gap: 14px; max-width: min(560px, calc(100% - 32px)); padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: mbUp .3s ease; }
.mb-topup p { font-size: 13px; margin-top: 2px; } .mb-topup .btn { flex: none; }
@keyframes mbUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
.mb-ai-entry { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 22px; color: #fff; text-decoration: none;
  background: radial-gradient(120% 160% at 0% 0%, #4c1d95 0%, #1e1b4b 50%, #0e100b 100%); box-shadow: 0 20px 50px -24px rgba(76,29,149,.7); transition: transform .2s; }
.mb-ai-entry:hover { transform: translateY(-2px); }
.mb-ai-entry h3 { color: #fff; font-size: 19px; } .mb-ai-entry p { font-size: 13.5px; color: rgba(255,255,255,.72); margin-top: 2px; }
.leaflet-container { font-family: var(--font); }
@media (max-width: 1100px) { .mb-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .mb-vars { grid-template-columns: 1fr; } .mb-plat { grid-template-columns: 1fr; }
  .mb-ai { padding: 16px; } .mb-ai-top { flex-wrap: wrap; } .mb-map { height: 280px; }
  .mb-h { flex-wrap: wrap; } .mb-type { width: 100%; } .mb-budget input[type=number] { width: 110px; }
  .mb-ai-entry { flex-wrap: wrap; }
}
.mb-h > .mb-type { flex: none; }
@media (max-width: 760px) { .mb-h > .mb-type { flex-basis: 100%; } .mb-ai-top > .grow { flex-basis: calc(100% - 56px); } .mb-bal { margin-left: 54px; } }