﻿/* WaBlast — base styles (matches the UI mockup) */
:root {
  --ink: #13201A;
  --muted: #5B6B63;
  --line: #E3E8E4;
  --line-soft: #EDF1EE;
  --bg: #F5F7F4;
  --card: #FFFFFF;
  --brand: #0B7A53;
  --brand-dark: #075C3E;
  --brand-soft: #E6F4EE;
  --blue: #1D5FD1;
  --blue-soft: #E8EFFB;
  --amber: #8A5A00;
  --amber-soft: #FFF7E6;
  --red: #C0362C;
  --red-soft: #FCE8E6;
  --console: #10201A;
  --console-active: #1E3A2F;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.45;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 16px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Shell: sidebar + main */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar {
  flex: 1 1 232px; max-width: 232px; background: var(--card); border-right: 1px solid var(--line);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 4px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); padding: 4px 10px; }
.nav-link {
  padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-link:hover { background: var(--bg); color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-link.soon { color: #8A968F; cursor: default; }
.nav-link.soon:hover { background: none; color: #8A968F; }
.soon-tag { font-size: 10px; font-weight: 600; color: #8A968F; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }

/* Console (SEOYUG) sidebar is dark */
.sidebar.dark { background: var(--console); border-right: 0; color: #DCE6E0; }
.sidebar.dark .brand-mark { background: #2FBF84; color: var(--console); }
.sidebar.dark .brand-name { color: #fff; }
.sidebar.dark .brand-sub, .sidebar.dark .nav-title { color: #9DB2A8; }
.sidebar.dark .nav-link { color: #DCE6E0; }
.sidebar.dark .nav-link:hover { background: var(--console-active); color: #fff; }
.sidebar.dark .nav-link.active { background: var(--console-active); color: #fff; }
.sidebar.dark .nav-link.soon, .sidebar.dark .nav-link.soon:hover { color: #7F948A; background: none; }
.sidebar.dark .soon-tag { border-color: #2C4A3D; color: #7F948A; }

.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 28px; background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1240px; width: 100%; }

.page-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* Cards, grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h2 { margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; margin: 4px 0; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > * { flex: 1 1 260px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #C9D3CD; color: var(--ink); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 0; height: auto; }
.btn.danger-link { border: 0; background: none; color: var(--red); padding: 0; height: auto; }
.btn.block { width: 100%; }
.inline-form { display: inline; margin: 0; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field .hint { font-weight: 400; font-size: 12px; color: var(--muted); }
.input, select.input {
  height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff; width: 100%;
}
.input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field-error { color: var(--red); font-weight: 500; font-size: 12px; }
.input-validation-error { border-color: var(--red); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.section-title { font-weight: 700; margin-top: 6px; }

/* Alerts */
.alert { border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.alert.ok { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #C2E3CF; }
.alert.error { background: var(--red-soft); color: #8E2219; border: 1px solid #F3C6C1; }
.alert.error ul { margin: 0; padding-left: 18px; }
.alert.warn { background: var(--amber-soft); color: #5C4A1E; border: 1px solid #F1DDB0; }
.validation-summary-valid { display: none; }

/* Impersonation banner */
.banner {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--amber-soft); border-bottom: 1px solid #F1DDB0; color: #5C4A1E; padding: 8px 28px; font-size: 13px;
}

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.data th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px; }
table.data td { padding: 12px 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; }
.strong { font-weight: 600; }

/* Pills */
.pill { display: inline-block; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600; }
.pill.green { background: var(--brand-soft); color: var(--brand); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: #B42318; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.grey { background: var(--line-soft); color: #3B4A43; }

/* Checklist on dashboard */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-dot { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; }
.step-dot.done { background: var(--brand); border-color: var(--brand); }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card.wide { max-width: 560px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .sidebar { max-width: none; flex-basis: 100%; }
  .content, .topbar, .banner { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Top bar link ---------- */
.topbar-link { font-weight: 600; font-size: 13px; text-decoration: none; margin-right: 6px; }

/* ---------- Show / hide password ---------- */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; background: none; border-radius: 8px;
  color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { color: var(--ink); background: var(--bg); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); }

/* ---------- Chat bubbles (login + website) ---------- */
.bubble { max-width: 86%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.bubble.in { align-self: flex-start; background: #FFFFFF; color: var(--ink); border-radius: 12px 12px 12px 3px; }
.bubble.out { align-self: flex-end; background: #DDF3E6; color: var(--ink); border-radius: 12px 12px 3px 12px; }
.bubble-tag { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--brand); }

/* ---------- Login (split screen) ---------- */
.auth-page.login-page { padding: 0; display: block; }
.login-split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.login-story {
  flex: 1 1 520px; background-color: #0E2A20; color: #DCE9E2; padding: 40px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px;
}
.brand.light .brand-mark { background: #2FBF84; color: #0E2A20; }
.brand.light .brand-name { color: #FFFFFF; display: block; }
.brand.light .brand-sub { color: #9DB2A8; display: block; }
.login-headline { font-size: 42px; line-height: 1.12; color: #FFFFFF; letter-spacing: -0.02em; margin: 0; max-width: 520px; }
.login-headline span { color: #5EE0A6; }
.login-lead { font-size: 16px; color: #B9CCC2; max-width: 480px; margin: 14px 0 0; }
.chat-demo {
  max-width: 440px; background: #EFF2EC; border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.lead-chip { align-self: flex-start; background: #FFF4E0; color: #6B4A00; border: 1px solid #F1DDB0; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: #DCE9E2; }
.login-points li { display: flex; gap: 10px; align-items: flex-start; }
.login-points svg { color: #5EE0A6; flex: 0 0 18px; margin-top: 2px; }
.login-form-side { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 10px 30px rgba(19,32,26,.06); }
.login-title { font-size: 24px; margin: 0; }
@media (max-width: 900px) {
  .login-story { padding: 28px 24px; }
  .login-headline { font-size: 32px; }
  .chat-demo { display: none; }
}

/* ---------- One-page website ---------- */
body.lp { background: #FFFFFF; }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lp-nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.lp-nav-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.lp-links { display: flex; gap: 22px; flex: 1 1 auto; justify-content: center; flex-wrap: wrap; }
.lp-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.lp-links a:hover { color: var(--brand); }
.lp-nav-cta { display: flex; gap: 8px; }
.lp-btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.lp-btn-ghost { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,.4); }
.lp-btn-ghost:hover { color: #FFFFFF; border-color: #FFFFFF; }

.lp-hero { background: #F3F8F5; border-bottom: 1px solid var(--line); }
.lp-hero-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.lp-hero-copy { flex: 1 1 480px; }
.lp-eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); border-radius: 20px; padding: 6px 12px; font-weight: 600; font-size: 13px; margin: 0 0 18px; }
.lp-hero h1 { font-size: 52px; line-height: 1.06; letter-spacing: -0.03em; margin: 0; }
.lp-hero h1 span { color: var(--brand); }
.lp-lead { font-size: 18px; color: #3B4A43; margin: 18px 0 0; max-width: 560px; }
.lp-lead.light { color: #B9CCC2; margin-left: auto; margin-right: auto; }
.lp-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.lp-note { color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.lp-note.light { color: #9DB2A8; }

.lp-hero-visual { flex: 1 1 400px; position: relative; display: flex; justify-content: center; padding: 30px 0; }
.lp-phone { width: 340px; max-width: 100%; background: #0E2A20; border-radius: 34px; padding: 12px; box-shadow: 0 30px 70px rgba(14,42,32,.25); }
.lp-phone-head { color: #FFFFFF; font-weight: 600; padding: 10px 12px 12px; display: flex; align-items: center; gap: 8px; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: #2FBF84; }
.lp-chat { background: #EFF2EC; border-radius: 24px; padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.lp-float { position: absolute; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: 0 12px 30px rgba(19,32,26,.12); display: flex; flex-direction: column; font-size: 13px; max-width: 230px; }
.lp-float span { color: var(--muted); }
.lp-float-a { top: 20px; left: 0; border-left: 0; }
.lp-float-a b { color: #B42318; }
.lp-float-b { bottom: 10px; right: 0; }
.lp-float-b b { color: var(--brand); }

.lp-band { border-bottom: 1px solid var(--line); }
.lp-band-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.lp-band-grid div { display: flex; flex-direction: column; gap: 4px; }
.lp-band-grid b { font-size: 16px; }
.lp-band-grid span { color: var(--muted); font-size: 14px; }

.lp-section { padding: 88px 0; }
.lp-soft { background: #F7F9F7; }
.lp-dark { background: #0E2A20; color: #DCE9E2; }
.lp-kicker { color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.lp-kicker.light { color: #5EE0A6; }
.lp-h2 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; margin: 0; max-width: 720px; }
.lp-h2.light { color: #FFFFFF; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 40px; }
.lp-card { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #FFFFFF; }
.lp-card h3 { margin: 14px 0 8px; font-size: 18px; }
.lp-card p { margin: 0; color: #3B4A43; }
.lp-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }

.lp-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.lp-split > * { flex: 1 1 420px; }
.lp-checks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.lp-checks li { padding-left: 28px; position: relative; color: #DCE9E2; }
.lp-checks li:before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 8px; border-left: 2.5px solid #5EE0A6; border-bottom: 2.5px solid #5EE0A6; transform: rotate(-45deg); }
.lp-ai-card { background: #163A2D; border: 1px solid #2C4A3D; border-radius: 18px; padding: 8px 22px; }
.lp-ai-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #2C4A3D; flex-wrap: wrap; }
.lp-ai-row:last-child { border-bottom: 0; }
.lp-ai-row span { color: #9DB2A8; }
.lp-ai-row b { color: #FFFFFF; font-weight: 600; text-align: right; }

.lp-steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.lp-steps li { display: flex; gap: 14px; align-items: flex-start; }
.lp-steps li > span { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--brand); color: #FFFFFF; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lp-steps h3 { margin: 4px 0 6px; font-size: 17px; }
.lp-steps p { margin: 0; color: #3B4A43; }

.lp-money { display: flex; flex-direction: column; gap: 12px; }
.lp-money div { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.lp-money span { color: var(--muted); }

.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.lp-plan { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.lp-plan.featured { border: 2px solid var(--brand); }
.lp-plan h3 { margin: 0; font-size: 20px; }
.lp-plan p { margin: 0; }
.lp-plan ul { list-style: none; padding: 0; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.lp-plan li { padding-left: 22px; position: relative; }
.lp-plan li:before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.lp-badge { position: absolute; top: -12px; left: 20px; background: var(--brand); color: #FFFFFF; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 10px; }

.lp-faq { max-width: 820px; }
.lp-faq details { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 12px; }
.lp-faq details:first-of-type { margin-top: 32px; }
.lp-faq summary { font-weight: 600; cursor: pointer; font-size: 16px; }
.lp-faq details p { margin: 10px 0 0; color: #3B4A43; }

.lp-cta { background: #0E2A20; text-align: center; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; }
.lp-cta-inner { display: flex; flex-direction: column; align-items: center; }
.lp-cta .lp-h2 { margin: 0 auto; }

.lp-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 13px; }
.lp-footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

@media (max-width: 760px) {
  .lp-hero h1 { font-size: 38px; }
  .lp-h2 { font-size: 28px; }
  .lp-section { padding: 60px 0; }
  .lp-links { display: none; }
  .lp-float { display: none; }
}

/* ---------- Helpers ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
code { font-family: Consolas, "Courier New", monospace; font-size: 13px; background: var(--line-soft); border-radius: 6px; padding: 2px 6px; }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv > div { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.kv span { min-width: 200px; color: var(--muted); font-weight: 600; }
.kv code { padding: 6px 10px; word-break: break-all; }
.howto { background: #F7F9F7; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.howto ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Inbox ---------- */
.inbox { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; min-height: 640px; }
.inbox-list { flex: 1 1 300px; max-width: 360px; border-right: 1px solid var(--line); display: flex; flex-direction: column; max-height: 78vh; overflow-y: auto; }
.inbox-list-head { padding: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--ink); text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.chat-row { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #F0F3F1; text-decoration: none; color: var(--ink); }
.chat-row:hover { background: #F7F9F7; color: var(--ink); }
.chat-row.selected { background: #EEF7F2; }
.chat-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--line-soft); color: #3B4A43; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.chat-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chat-preview { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: flex; gap: 6px; align-items: center; }
.unread { margin-left: auto; background: var(--brand); color: #FFFFFF; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }

.inbox-thread { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; background: #EFF2EC; max-height: 78vh; }
.thread-empty { margin: auto; text-align: center; padding: 40px; }
.thread-head { background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.thread-actions { display: flex; gap: 8px; }
.thread-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 12px; display: flex; flex-direction: column; }
.msg.in { align-self: flex-start; background: #FFFFFF; border-radius: 12px 12px 12px 3px; }
.msg.out { align-self: flex-end; background: #DDF3E6; border-radius: 12px 12px 3px 12px; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.msg-meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; display: flex; gap: 6px; justify-content: flex-end; }
.tick { font-weight: 700; }
.tick.read { color: var(--blue); }
.tick.failed { color: var(--red); }
.msg-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.thread-compose { background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.compose-form { display: flex; gap: 10px; align-items: flex-end; }
.compose-input { height: auto; min-height: 48px; padding: 10px 12px; resize: vertical; }

/* ---------- Icons (Font Awesome) ---------- */
.nav-link { justify-content: flex-start; gap: 10px; }
.nav-link > i { width: 18px; text-align: center; color: #7F8C85; font-size: 15px; }
.nav-link.active > i { color: var(--brand); }
.sidebar.dark .nav-link > i { color: #7F948A; }
.sidebar.dark .nav-link.active > i, .sidebar.dark .nav-link:hover > i { color: #5EE0A6; }
.nav-link .soon-tag { margin-left: auto; }
.brand-mark i { font-size: 19px; }
.head-icon { color: var(--brand); margin-right: 10px; font-size: .85em; }
.stat-icon { color: var(--brand); margin-right: 4px; }
.btn i, .topbar-link i, .alert i { margin-right: 2px; }
.alert i { margin-right: 6px; }
.empty { text-align: center; padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty > i, .empty-icon { font-size: 38px; color: #B9C6BF; }
.empty p { margin: 0; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Contacts ---------- */
.contacts-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.contacts-layout > .card:last-child { flex: 999 1 560px; }
.groups-card { flex: 1 1 240px; max-width: 280px; display: flex; flex-direction: column; gap: 2px; }
.groups-card h2 i { color: var(--brand); margin-right: 6px; }
.group-link { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.group-link span { color: var(--muted); font-size: 12px; }
.group-link:hover { background: var(--bg); color: var(--ink); }
.group-link.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.new-group { display: flex; gap: 6px; margin-top: 10px; }
.new-group .input { height: 36px; }
.search-row { display: flex; gap: 8px; }
.search-box { position: relative; flex: 1 1 auto; display: block; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 36px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 18px; }
.file-input { padding: 8px 12px; height: auto; }
.mini-stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.mini-stat b { font-size: 22px; }
.mini-stat span { color: var(--muted); font-size: 12px; }
.mini-stat.warn b { color: var(--amber); }
.mini-stat.bad b { color: var(--red); }

/* ---------- Templates ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tpl-card { display: flex; flex-direction: column; gap: 12px; }
.tpl-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tpl-phone { background: #EFF2EC; border-radius: 12px; padding: 12px; }
.tpl-bubble { background: #FFFFFF; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.tpl-body { white-space: pre-wrap; line-height: 1.45; }
.tpl-media { background: var(--line-soft); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); margin-bottom: 8px; text-transform: capitalize; }
.tpl-button { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 8px; text-align: center; color: var(--blue); font-weight: 600; }

/* =========================================================
   Forms v2: sections, fields with icons, toggles
   ========================================================= */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 1080px; }
.form-card > .alert { margin: 20px 24px 0; }
.fs { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 26px 28px; border-bottom: 1px solid var(--line-soft); }
.fs:last-of-type { border-bottom: 0; }
.fs-intro { flex: 1 1 220px; max-width: 280px; }
.fs-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 10px; }
.fs-intro h3 { margin: 0 0 6px; font-size: 16px; }
.fs-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.fs-fields { flex: 999 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 18px; align-content: start; }
.fs-fields > .wide, .fs-fields > .toggle-row, .fs-fields > .full { grid-column: 1 / -1; }
.form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 16px 28px; background: #F9FBF9; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-footer .note { margin-right: auto; color: var(--muted); font-size: 13px; }

.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld-label { font-weight: 600; font-size: 13px; color: #24342C; display: flex; align-items: center; gap: 8px; }
.fld-opt { font-weight: 500; font-size: 11px; color: var(--muted); background: var(--line-soft); border-radius: 10px; padding: 1px 8px; }
.fld-control { position: relative; display: flex; align-items: center; }
.fld-control .input { height: 44px; border-radius: 10px; border: 1.5px solid #DDE4DF; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.fld-control .input:hover { border-color: #C5D0C9; }
.fld-control .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11,122,83,.12); }
.fld-control .input.has-icon { padding-left: 40px; }
.fld-control .input.has-prefix { padding-left: 52px; }
.fld-control .input.has-icon.has-prefix { padding-left: 84px; }
.fld-control textarea.input { height: auto; padding-top: 10px; padding-bottom: 10px; resize: vertical; line-height: 1.5; }
.fld-control select.input { appearance: auto; }
.fld-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8A9891; font-size: 15px; pointer-events: none; z-index: 1; }
.fld.area .fld-icon { top: 22px; }
.fld-control:focus-within .fld-icon { color: var(--brand); }
.fld-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #3B4A43; background: var(--line-soft); border-radius: 6px; padding: 2px 7px; font-size: 13px; z-index: 1; }
.fld-control .input.has-icon ~ .fld-prefix, .fld-icon + .fld-prefix { left: 38px; }
.fld-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.fld .field-error { font-size: 12px; }
.fld .field-error:empty { display: none; }
.fld .input.input-validation-error { border-color: var(--red); background: #FFF9F8; }
.fld-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--line-soft); color: var(--brand); font: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 6px 10px; cursor: pointer; z-index: 2; }
.fld-action:hover { background: var(--brand-soft); }
.fld-control .pw-wrap { display: block; width: 100%; }
.fld-control .pw-wrap + .fld-action, .fld-control.has-gen .pw-toggle { right: 70px; }

/* Toggle switch */
.toggle-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border: 1.5px solid #DDE4DF; border-radius: 12px; background: #FFFFFF; }
.toggle-row:hover { border-color: #C5D0C9; }
.toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle { flex: 0 0 42px; width: 42px; height: 24px; border-radius: 12px; background: #C9D3CD; position: relative; transition: background .15s; margin-top: 1px; }
.toggle:after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.toggle-input:checked ~ .toggle { background: var(--brand); }
.toggle-input:checked ~ .toggle:after { left: 21px; }
.toggle-input:focus-visible ~ .toggle { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text small { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* Choice cards (radio / checkbox as cards) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid #DDE4DF; border-radius: 12px; cursor: pointer; background: #FFFFFF; }
.choice:hover { border-color: #C5D0C9; }
.choice input { position: absolute; opacity: 0; }
.choice .mark { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 6px; border: 2px solid #C5D0C9; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 11px; margin-top: 1px; }
.choice.radio .mark { border-radius: 50%; }
.choice input:checked ~ .mark { background: var(--brand); border-color: var(--brand); }
.choice input:checked ~ .choice-body b { color: var(--brand-dark); }
.choice:has(input:checked) { border-color: var(--brand); background: #F4FBF7; }
.choice input:focus-visible ~ .mark { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-body b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-body small { color: var(--muted); font-size: 12px; }

/* Copy buttons on codes */
.copy-wrap { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copy-btn { border: 1px solid var(--line); background: #FFFFFF; border-radius: 8px; padding: 5px 9px; cursor: pointer; color: var(--brand); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; }
.copy-btn:hover { background: var(--brand-soft); }

/* Page header with icon tile */
.page-title { display: flex; gap: 14px; align-items: center; }
.page-title .tile { width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 48px; box-shadow: 0 6px 16px rgba(11,122,83,.25); }
.page-title h1 { font-size: 24px; }
.page-title p { margin: 2px 0 0; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; text-decoration: none; margin-bottom: 10px; }

@media (max-width: 760px) {
  .fs { padding: 20px 16px; }
  .fs-intro { max-width: none; }
  .fs-fields { grid-template-columns: minmax(0, 1fr); }
  .form-footer { padding: 14px 16px; }
}

/* ---------- Campaigns ---------- */
.steps-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 1080px; }
.steps-bar div { display: flex; align-items: center; gap: 10px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 13px; }
.steps-bar span { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--line-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.steps-bar .on { border-color: var(--brand); }
.steps-bar .on span, .steps-bar .done span { background: var(--brand); color: #FFFFFF; }
.param-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.param-key { font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); border-radius: 8px; padding: 10px; text-align: center; font-family: Consolas, monospace; }
.phone-preview { background: #0E2A20; border-radius: 26px; padding: 10px; max-width: 340px; }
.phone-preview .screen { background: #EFF2EC; border-radius: 18px; padding: 14px 10px; min-height: 220px; }
.progress { height: 10px; border-radius: 6px; background: var(--line-soft); overflow: hidden; display: flex; }
.progress .ok { background: var(--brand); }
.progress .bad { background: var(--red); }
.progress .skip { background: #C9D3CD; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.check-table { width: 100%; border-collapse: collapse; }
.check-table td { padding: 10px 4px; border-bottom: 1px solid var(--line-soft); }
.check-table td.num { text-align: right; font-weight: 700; }
.check-table tr.total td { border-bottom: 0; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; padding: 12px; }
@media (max-width: 760px) {
  .param-row { grid-template-columns: minmax(0, 1fr); }
  .steps-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.fld-control.has-gen .input { padding-right: 120px; }
.fld-control .pw-wrap .input.has-icon { padding-left: 40px; }
.limit-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-top: 18px; }
.limit-form .btn { margin-top: 25px; }
.webhook-box { margin-top: 18px; background: #F7F9F7; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.webhook-box h3 { margin: 0 0 6px; font-size: 14px; }
.webhook-box h3 i { color: var(--brand); margin-right: 6px; }
.upload-drop { border: 2px dashed #C5D0C9; border-radius: 14px; padding: 22px; text-align: center; background: #FAFCFA; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upload-drop i.big { font-size: 34px; color: var(--brand); }
.upload-drop input[type=file] { max-width: 100%; }
.sender-strip { display: flex; gap: 12px; align-items: center; background: #FFFFFF; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px 16px; font-size: 13px; }
.sender-strip > i { color: var(--brand); font-size: 18px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.review-grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.review-grid h2 { margin-bottom: 12px; }
.review-grid h2 i { margin-right: 6px; }
.hours-list { display: flex; flex-direction: column; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.toggle-row.compact { padding: 9px 12px; align-items: center; }
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice.day { padding: 9px 14px; }
.choice.day input[type=hidden] { display: none; }
@media (max-width: 760px) {
  .hours-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours-row .toggle-row { grid-column: 1 / -1; }
  .hours-row > .muted { display: none; }
}

/* ===== List pages v2: avatars, contact chips, profile cards ===== */
.tone-0 { --tone: #0B7A53; --tone-soft: #E6F4EE; }
.tone-1 { --tone: #1D5FD1; --tone-soft: #E8EFFB; }
.tone-2 { --tone: #7C3AED; --tone-soft: #F1EAFE; }
.tone-3 { --tone: #C2410C; --tone-soft: #FDEEE5; }
.tone-4 { --tone: #0E7490; --tone-soft: #E3F4F8; }
.tone-5 { --tone: #BE185D; --tone-soft: #FCE7F1; }
.tone-6 { --tone: #4D7C0F; --tone-soft: #EEF6E2; }
.tone-7 { --tone: #B45309; --tone-soft: #FEF3E2; }

.avatar-x {
  position: relative; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tone-soft); color: var(--tone); font-weight: 700; font-size: 13px; letter-spacing: .3px;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--line);
}
.avatar-x.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar-x.lg { width: 60px; height: 60px; font-size: 20px; box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(19, 32, 26, .12); }
.avatar-x .presence { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #22C55E; border: 2px solid #fff; }

/* KPI strip */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.kpi-icon.green { background: var(--brand-soft); color: var(--brand); }
.kpi-icon.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-icon.amber { background: var(--amber-soft); color: #B7791F; }
.kpi-icon.red { background: var(--red-soft); color: var(--red); }
.kpi-icon.violet { background: #F1EAFE; color: #7C3AED; }
.kpi-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi-label { color: var(--muted); font-size: 12.5px; }
.meter { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #12A26E, var(--brand)); }

/* Contact chips with copy */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  border: 1px solid var(--line); background: #FAFBFA; border-radius: 99px; padding: 3px 4px 3px 10px; font-size: 12.5px;
}
.chip-icon { color: var(--muted); font-size: 12px; }
.chip-text { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.chip-text:hover { color: var(--brand); text-decoration: underline; }
.chip-copy {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.chip-copy:hover { background: var(--brand-soft); color: var(--brand); }
.chip-copy.done { background: var(--brand); color: #fff; }

/* Team profile cards */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.person-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 18px 16px;
  transition: box-shadow .15s, transform .15s;
}
.person-card:hover { box-shadow: 0 10px 28px rgba(19, 32, 26, .08); transform: translateY(-2px); }
.person-card.is-off { opacity: .7; }
.person-band { height: 58px; margin: 0 -18px -40px; background: linear-gradient(120deg, var(--tone-soft), #fff 85%); border-bottom: 1px solid var(--line-soft); }
.person-top { display: flex; justify-content: space-between; align-items: flex-end; position: relative; }
.person-badges { padding-bottom: 6px; }
.person-badges .pill i { margin-right: 3px; }
.person-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.person-handle { color: var(--muted); font-size: 12.5px; margin-top: -6px; }
.person-handle i { margin-right: 2px; font-size: 11px; }
.person-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.person-meta i { margin-right: 3px; }
.meta-good { color: var(--brand); }
.meta-warn { color: #B7791F; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #9AA8A1; }
.status-dot.on { color: var(--brand); font-weight: 600; }
.status-dot.on::before { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.danger-outline { color: var(--red); border-color: #F3C7C2; }
.btn.danger-outline:hover { background: var(--red-soft); color: var(--red); }
.person-add {
  align-items: center; justify-content: center; text-align: center; min-height: 230px; padding: 18px;
  border: 2px dashed #CFDAD3; background: transparent; color: var(--ink); text-decoration: none;
}
.person-add:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.add-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.role-box { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; background: #FAFBFA; }
.role-box p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* Merchant rows */
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.input-icon-wrap { position: relative; display: block; }
.input-icon-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon-wrap > .input { width: 100%; padding-left: 40px; }
.merchant-list { display: flex; flex-direction: column; gap: 10px; }
.merchant-row {
  display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(240px, 1.6fr) minmax(150px, .9fr) minmax(150px, .9fr) auto;
  gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.merchant-row:hover { border-color: #BFD8CB; box-shadow: 0 6px 18px rgba(19, 32, 26, .06); }
.mr-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.biz-logo {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--tone), #13201A 160%); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px;
}
.mr-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 3px; }
.slug-tag { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; background: var(--line-soft); border-radius: 6px; padding: 1px 7px; color: #3B4A43; }
.slug-tag i { font-size: 10px; margin-right: 4px; color: var(--muted); }
.mr-owner { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mr-owner-name { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.mr-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.plan-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.plan-badge i { color: var(--brand); }
.mr-usage .ink { color: var(--ink); }
.wa-ok { color: #128C7E; margin-top: 6px; font-weight: 600; }
.mr-usage .muted.small { margin-top: 6px; }
.mr-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.icon-btn .fa-whatsapp { color: #128C7E; font-size: 15px; }
.text-red { color: var(--red); font-weight: 600; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 10px; text-align: center; }
.empty-state p { margin: 0; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--line-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
@media (max-width: 1100px) {
  .merchant-row { grid-template-columns: 1fr 1fr; }
  .mr-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .merchant-row { grid-template-columns: 1fr; }
}

/* Forgot / reset password */
.auth-icon {
  width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 22px; box-shadow: 0 6px 16px rgba(11, 122, 83, .15);
}
.auth-icon.bad { background: var(--red-soft); color: var(--red); box-shadow: 0 6px 16px rgba(192, 54, 44, .12); }
.secure-steps { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.secure-step { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; }
.secure-step > span { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .12); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.secure-step b { display: block; font-size: 14px; }
.secure-step small { opacity: .75; font-size: 12.5px; }

/* Console e-mail log */
.tabs-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tab-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13px; }
.tab-pill:hover { border-color: var(--brand); color: var(--brand); }
.tab-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.mail-list { display: flex; flex-direction: column; gap: 8px; }
.mail-row { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mail-row[open] { border-color: #BFD8CB; box-shadow: 0 6px 18px rgba(19, 32, 26, .06); }
.mail-row > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.mail-row > summary::-webkit-details-marker { display: none; }
.mail-main { flex: 1 1 auto; min-width: 0; }
.mail-subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; margin-top: 2px; }
.mail-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.mail-body { padding: 0 14px 14px; }
.mail-preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 10px; background: #EEF2EF; }

/* ===== Pipeline ===== */
.funnel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.funnel-step { display: flex; align-items: center; gap: 10px; flex: 1 1 150px; min-width: 0; }
.funnel-step.revenue { margin-left: auto; padding-left: 16px; border-left: 1px dashed var(--line); }
.funnel-arrow { color: #B8C4BD; font-size: 12px; }
.funnel-icon { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.funnel-icon.blue { background: var(--blue-soft); color: var(--blue); }
.funnel-icon.violet { background: #F1EAFE; color: #7C3AED; }
.funnel-icon.amber { background: var(--amber-soft); color: #B7791F; }
.funnel-icon.green { background: var(--brand-soft); color: var(--brand); }
.board-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.board-toolbar select.input { padding-left: 40px; }
.source-mix { display: flex; flex-wrap: wrap; gap: 6px; }
.source-mix b { margin-left: 2px; }

.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.board-col { flex: 0 0 280px; scroll-snap-align: start; background: #EEF2EF; border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 220px; border: 2px solid transparent; transition: border-color .12s, background .12s; }
.board-col.drag-over { border-color: var(--brand); background: var(--brand-soft); }
.board-col.won { background: #E6F4EE; }
.board-col.lost { background: #F6EEED; }
.board-col-head { padding: 12px 14px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-col-title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.board-col.won .board-col-title i { color: var(--brand); }
.board-col.lost .board-col-title i { color: var(--red); }
.board-count { background: #fff; border-radius: 99px; padding: 1px 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.board-col-total { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.board-cards { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1 1 auto; }
.board-empty { display: none; border: 2px dashed #C9D3CD; border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
.board-cards:not(:has(.lead-card)) .board-empty { display: block; }
.board-more { text-align: center; padding: 4px; }
.lead-card {
  display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 12px; padding: 11px 12px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid #C9D3CD; box-shadow: 0 1px 2px rgba(19, 32, 26, .04); cursor: grab; transition: box-shadow .12s, transform .12s;
}
.lead-card:hover { color: var(--ink); box-shadow: 0 8px 20px rgba(19, 32, 26, .1); transform: translateY(-1px); }
.lead-card.dragging { opacity: .45; transform: rotate(1.5deg); }
.lead-card.heat-hot { border-left-color: #E5484D; }
.lead-card.heat-warm { border-left-color: #F5A524; }
.lead-card.heat-cold { border-left-color: #4C9AFF; }
.lead-card-top { display: flex; align-items: center; gap: 6px; }
.heat-tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 6px; }
.heat-hot .heat-tag { background: #FDECEC; color: #C62828; }
.heat-warm .heat-tag { background: #FFF4E0; color: #A15C00; }
.heat-cold .heat-tag { background: #E8F1FF; color: #1D5FD1; }
.src-tag { width: 22px; height: 22px; border-radius: 7px; background: var(--line-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.lead-value { margin-left: auto; font-weight: 800; font-size: 13px; color: var(--brand-dark); }
.lead-title { font-weight: 700; line-height: 1.3; }
.lead-contact { font-size: 12.5px; color: var(--muted); }
.lead-next { font-size: 12px; background: var(--line-soft); border-radius: 8px; padding: 4px 8px; color: #3B4A43; }
.lead-next.overdue { background: var(--red-soft); color: #B42318; font-weight: 600; }
.lead-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.lead-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; min-width: 0; }

/* Lead page */
.lead-head { display: flex; gap: 14px; align-items: center; }
.lead-head h1 { font-size: 22px; }
.lead-head-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.heat-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.heat-pill.heat-hot { background: #FDECEC; color: #C62828; }
.heat-pill.heat-warm { background: #FFF4E0; color: #A15C00; }
.heat-pill.heat-cold { background: #E8F1FF; color: #1D5FD1; }
.stage-track { display: flex; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; overflow-x: auto; }
.stage-step { flex: 1 1 0; min-width: 110px; margin: 0; position: relative; }
.stage-step + .stage-step::before { content: ""; position: absolute; top: 23px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stage-step.done::before, .stage-step.current::before { background: var(--brand); }
.stage-step button { position: relative; z-index: 1; width: 100%; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; font: inherit; color: var(--muted); }
.stage-step button:disabled { cursor: default; }
.stage-dot { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: transform .12s; }
.stage-step button:not(:disabled):hover .stage-dot { border-color: var(--brand); transform: scale(1.08); }
.stage-step.done .stage-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.stage-step.current .stage-dot { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgba(19, 32, 26, .12); }
.stage-step.current.won .stage-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 122, 83, .2); }
.stage-step.current.lost .stage-dot { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px rgba(192, 54, 44, .18); }
.stage-step.current .stage-name { color: var(--ink); font-weight: 700; }
.stage-name { font-size: 12.5px; white-space: nowrap; }
.lead-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.lead-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lead-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.ai-summary { background: linear-gradient(120deg, #F1EAFE, #EAF6F0); border: 1px solid #DCD0F7; border-radius: var(--radius); padding: 14px 16px; }
.ai-summary p { margin: 8px 0 0; line-height: 1.55; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #6D28D9; background: #fff; border-radius: 99px; padding: 3px 10px; }
.heat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.heat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.heat-opt span { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13px; background: #fff; }
.heat-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.heat-hot input:checked + span { background: #FDECEC; border-color: #E5484D; color: #C62828; }
.heat-warm input:checked + span { background: #FFF4E0; border-color: #F5A524; color: #A15C00; }
.heat-cold input:checked + span { background: #E8F1FF; border-color: #4C9AFF; color: #1D5FD1; }
.heat-none input:checked + span { background: var(--line-soft); border-color: #B8C4BD; }
.note-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.note-form textarea { width: 100%; resize: vertical; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 10px; position: relative; padding-bottom: 14px; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line-soft); }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--line-soft); color: var(--muted); font-size: 12px; }
.tl-note .tl-icon { background: #FFF4E0; color: #A15C00; }
.tl-stagechanged .tl-icon { background: var(--blue-soft); color: var(--blue); }
.tl-created .tl-icon { background: var(--brand-soft); color: var(--brand); }
.tl-ai .tl-icon { background: #F1EAFE; color: #7C3AED; }
.tl-handoff .tl-icon { background: var(--red-soft); color: var(--red); }
.tl-text { white-space: pre-wrap; word-break: break-word; }
.tl-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; z-index: 1000; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

/* Inbox: AI */
.pill.violet { background: #F1EAFE; color: #6D28D9; }
.ai-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #6D28D9; background: #F1EAFE; border-radius: 99px; padding: 5px 10px; margin-right: 6px; }
.ai-live i { animation: ai-pulse 1.6s ease-in-out infinite; }
@keyframes ai-pulse { 50% { opacity: .35; } }
.btn.ai-btn { color: #6D28D9; border-color: #DCD0F7; }
.btn.ai-btn:hover { background: #F1EAFE; color: #5B21B6; }
.ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #6D28D9; margin-bottom: 3px; }
@media (prefers-reduced-motion: reduce) { .ai-live i { animation: none; } }

/* ===== AI assistant page ===== */
.ai-state { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.ai-state .dot { width: 9px; height: 9px; border-radius: 50%; background: #9AA8A1; }
.ai-state.on { background: #F1EAFE; color: #6D28D9; }
.ai-state.on .dot { background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.ai-state.off { background: var(--line-soft); color: var(--muted); }
.ai-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ai-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ai-side { flex: 1 1 340px; position: sticky; top: 16px; }
.test-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.test-row .btn { margin-left: auto; }
.card-head-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; margin-bottom: 12px; }
.card-head-row h2 { margin: 0; }
.k-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.k-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.k-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--brand-soft); color: var(--brand); }
.k-icon.url { background: var(--blue-soft); color: var(--blue); }
.k-icon.faq { background: var(--amber-soft); color: #B7791F; }
.k-main { flex: 1 1 auto; min-width: 0; }
.k-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-actions { display: flex; gap: 6px; }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
button.icon-btn { cursor: pointer; font: inherit; }
.k-add { border-top: 1px dashed var(--line); padding-top: 14px; }
.k-form { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.k-form > .btn { align-self: flex-end; }
.k-form textarea { resize: vertical; min-height: 120px; }
.k-form[hidden] { display: none; }
button.tab-pill { background: #fff; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; }

/* test chat phone */
.phone { background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; height: 600px; box-shadow: 0 16px 40px rgba(19, 32, 26, .1); }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #075E54; color: #fff; }
.phone-head .small { opacity: .8; }
.phone-head .avatar-x { box-shadow: none; }
.phone-reset { margin-left: auto; background: rgba(255, 255, 255, .15); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.phone-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: #EFEAE2; background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px); background-size: 16px 16px; }
.phone-hint { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.phone-hint .chip { cursor: pointer; background: #fff; }
.tbubble { max-width: 85%; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.tbubble.in { align-self: flex-end; background: #D9FDD3; }
.tbubble.out { align-self: flex-start; background: #fff; }
.tbubble.err { align-self: center; background: var(--red-soft); color: #8E2219; font-size: 12.5px; }
.tbubble.typing { color: var(--muted); font-style: italic; }
.tinsight { align-self: flex-start; max-width: 92%; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11.5px; }
.tinsight span { background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.tinsight .hot { background: #FDECEC; color: #C62828; border-color: #F7C6C6; }
.tinsight .warm { background: #FFF4E0; color: #A15C00; border-color: #F7DDAE; }
.tinsight .cold { background: #E8F1FF; color: #1D5FD1; border-color: #C8DBFB; }
.tinsight .hand { background: #FFF7E6; color: #8A5A00; border-color: #F1DDB0; font-weight: 700; }
.phone-compose { display: flex; gap: 8px; padding: 10px; background: #F0F2F5; margin: 0; }
.phone-compose .input { border-radius: 99px; }
.send-round { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #00A884; color: #fff; cursor: pointer; }
.send-round:disabled { opacity: .5; cursor: wait; }
@media (max-width: 900px) { .ai-side { position: static; } .phone { height: 520px; } }

/* Captcha + sign-up */
.captcha-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.captcha-img { border-radius: 10px; border: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.captcha-row .fld-control { flex: 1 1 140px; }
.captcha-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 700; }
.captcha-row .icon-btn { height: 40px; width: 40px; }
.login-card.wide-card { max-width: 520px; }
.signup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signup-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .signup-grid { grid-template-columns: 1fr; } }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.terms-row small { color: var(--muted); font-size: 12.5px; }
.signup-cta { border-style: dashed; color: var(--brand); }
.signup-cta:hover { background: var(--brand-soft); color: var(--brand-dark); }
.ai-live.bot { background: var(--amber-soft); color: #9A5B00; }
.bot-run { display: inline-flex; gap: 6px; align-items: center; }
.input.small-select { height: 32px; padding: 4px 8px; font-size: 13px; width: auto; max-width: 170px; }

/* ===== Flows & sequences ===== */
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.auto-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; border-top: 4px solid #C9D3CD; }
.auto-card.on { border-top-color: var(--brand); }
.auto-card-head { display: flex; gap: 12px; align-items: center; }
.auto-card-head > div { flex: 1 1 auto; }
.auto-icon { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--amber-soft); color: #B7791F; font-size: 16px; }
.auto-card.on .auto-icon { background: var(--brand-soft); color: var(--brand); }
.auto-title { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-title:hover { color: var(--brand); }
.auto-desc { margin: 0; }
.auto-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: #FAFBFA; border-radius: 12px; padding: 10px; text-align: center; }
.auto-stats b { display: block; font-size: 17px; }
.auto-stats span { font-size: 11px; color: var(--muted); }
.auto-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.switch-btn { width: 44px; height: 24px; border-radius: 99px; border: 0; background: #C9D3CD; position: relative; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
.switch-btn span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch-btn.on { background: var(--brand); }
.switch-btn.on span { left: 23px; }
.switch-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.starter { margin: 0; }
.starter-btn { width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.starter-btn:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(19, 32, 26, .08); transform: translateY(-1px); }
.starter-btn.blank { border-style: dashed; }
.starter-trigger { color: var(--brand); font-weight: 600; }

/* Flow builder */
.fs-full .fs-intro { flex-basis: 100%; max-width: none; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.fs-full .fs-intro .fs-icon { grid-row: span 2; margin: 0; }
.flow-steps-body { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.flow-builder { display: flex; flex-direction: column; gap: 14px; }
.fb-card { border: 1px solid var(--line); border-left: 5px solid #C9D3CD; border-radius: 14px; background: #fff; padding: 12px 14px 14px; position: relative; scroll-margin: 90px; }
.fb-card.is-start { box-shadow: 0 0 0 2px rgba(11, 122, 83, .18); }
.fb-card.t-message { border-left-color: #1D5FD1; }
.fb-card.t-list { border-left-color: #0E7490; }
.fb-card.t-question { border-left-color: #7C3AED; }
.fb-card.t-lead { border-left-color: #0B7A53; }
.fb-card.t-handoff { border-left-color: #C2410C; }
.fb-card.t-ai { border-left-color: #BE185D; }
.fb-card.t-end { border-left-color: #5B6B63; }
.fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.fb-type { font-weight: 700; font-size: 13px; white-space: nowrap; }
.input.fb-label { flex: 1 1 160px; height: 32px; font-size: 13px; padding: 4px 10px; }
.fb-tools { display: flex; gap: 4px; margin-left: auto; }
.fb-tools .icon-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.fb-tools .icon-btn:disabled { opacity: .35; cursor: default; }
.fb-start-tag { position: absolute; top: -10px; right: 14px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.fb-hint { margin: 6px 0 10px; font-size: 12.5px; color: var(--muted); }
.fb-body { display: flex; flex-direction: column; gap: 12px; }
.fb-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fb-field textarea { resize: vertical; }
.fb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fb-options { display: flex; flex-direction: column; gap: 8px; background: #FAFBFA; border-radius: 12px; padding: 10px; }
.fb-opt { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.t-list .fb-opt { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.fb-opt-num { width: 22px; height: 22px; border-radius: 6px; background: var(--line-soft); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fb-opt .input { height: 36px; padding: 6px 10px; }
.add-step-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; border: 2px dashed #CFDAD3; border-radius: 14px; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card span { display: flex; flex-direction: column; gap: 3px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; height: 100%; background: #fff; }
.choice-card span i { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.choice-card small { color: var(--muted); }
.choice-card input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.choice-card input:checked + span i { color: var(--brand); }
.choice-card input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sim-choices { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; width: 78%; }
.sim-choice { background: #fff; border: 0; border-radius: 8px; padding: 8px; color: #00A884; font-weight: 600; cursor: pointer; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); font: inherit; font-size: 13px; }
.sim-choices.list .sim-choice { text-align: left; color: var(--ink); font-weight: 500; }
.sim-choice:hover { background: #F0FAF6; }
.sim-note { font-style: normal; }
@media (max-width: 700px) { .fb-row, .fb-opt, .t-list .fb-opt { grid-template-columns: 1fr; } .fb-opt-num { display: none; } }

/* Sequence editor */
.seq-steps { display: flex; flex-direction: column; gap: 14px; }
.seq-card { border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 14px; background: #fff; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.seq-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #FAFBFA; border-radius: 10px; padding: 8px 10px; font-weight: 600; font-size: 13.5px; }
.seq-wait i { color: var(--brand); }
.input.seq-num { width: 80px; height: 34px; }
.input.seq-unit { width: 110px; height: 34px; padding: 4px 8px; }
.seq-tpl { display: flex; flex-direction: column; gap: 10px; background: #F5F9FF; border: 1px solid #DCE7FB; border-radius: 12px; padding: 12px; }
.seq-tpl-body { white-space: pre-wrap; font-size: 13px; background: #fff; border-radius: 10px; padding: 10px; border: 1px solid #E6EDF8; }
.check-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { display: inline-flex; border: 1.5px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; }
.check-pill input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.check-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.followups { display: flex; flex-direction: column; gap: 8px; }
.followup-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; }
.tl-bot .tl-icon { background: var(--amber-soft); color: #B7791F; }

/* Plan / billing */
.nav-link.nav-locked { opacity: .6; }
.nav-link.nav-locked::after { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; margin-left: auto; }
.plan-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.plan-banner > span { flex: 1 1 260px; }
.plan-banner.trial { background: #EEF3FC; color: #1B3F86; border: 1px solid #D5E1F7; }
.plan-banner.due { background: #FFF6E5; color: #7A4B00; border: 1px solid #F3DDAD; }
.upgrade-card { max-width: 620px; margin: 30px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 24px; }
.upgrade-card h1 { font-size: 22px; margin: 6px 0 0; }
.upgrade-icon { background: var(--amber-soft); color: #B7791F; }
.plan-hero { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; background: linear-gradient(120deg, #0B7A53, #13201A); color: #fff; border-radius: 18px; padding: 20px 22px; }
.plan-hero.trial { background: linear-gradient(120deg, #1D5FD1, #13201A); }
.plan-hero.due { background: linear-gradient(120deg, #B7791F, #13201A); }
.plan-hero-main { display: flex; gap: 14px; align-items: center; }
.plan-hero-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.14); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.plan-hero-name { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.plan-hero .small { opacity: .85; }
.plan-usage { display: flex; gap: 22px; flex-wrap: wrap; }
.plan-usage > div { min-width: 120px; display: flex; flex-direction: column; }
.plan-usage b { font-size: 17px; }
.plan-usage .meter { background: rgba(255,255,255,.2); }
.plan-usage .meter span { background: #fff; }
.pay-box { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; align-items: center; background: #FFF8EA; border: 1px solid #F3DDAD; border-radius: 16px; padding: 16px 18px; }
.pay-box h2 { margin: 0 0 4px; }
.pay-ways { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bank-lines { white-space: pre-line; background: #fff; border-radius: 10px; padding: 6px 10px; border: 1px solid var(--line); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.plan-card { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.plan-card.current { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 122, 83, .12); }
.plan-card-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.plan-card-head i { color: var(--brand); }
.plan-price { font-size: 24px; font-weight: 800; }
.plan-price small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.plan-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.plan-feats i { width: 16px; color: var(--brand); }
.plan-feats li.off { color: #9AA8A1; }
.plan-feats li.off i { color: #C0362C; opacity: .6; }
.plan-request { display: flex; gap: 6px; margin-top: auto; }
a.mr-name { display: block; color: var(--ink); text-decoration: none; }
a.mr-name:hover { color: var(--brand); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.pay-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.price-total { font-size: 18px; font-weight: 800; padding: 6px 0; }
.status-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.plan-card.is-off { opacity: .65; }

/* ===== Reports (charts) ===== */
.viz-root { --series-1: #257de0; --series-2: #f47230; display: flex; flex-direction: column; gap: 20px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chart-card { display: flex; flex-direction: column; gap: 8px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chart-head h2 { margin: 0; font-size: 16px; }
.chart-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key.line { display: inline-block; width: 16px; height: 2px; border-radius: 2px; }
.key.s1 { background: var(--series-1); }
.key.s2 { background: var(--series-2); }
.chart { width: 100%; min-height: 60px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: #EDF1EE; stroke-width: 1; }
.chart-svg .grid.base { stroke: #C9D3CD; }
.chart-svg .axis { font-size: 11px; fill: var(--muted); }
.chart-svg .axis.strong { fill: var(--ink); font-weight: 600; font-size: 12px; }
.chart-svg .direct { font-size: 12px; fill: var(--ink); font-weight: 600; }
.chart-svg .crosshair { stroke: #8A9A92; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .bar { transition: opacity .12s; }
.chart-svg rect:hover + .bar, .chart-svg .cell:hover { opacity: .8; stroke: var(--ink); stroke-width: 1; }
.chart-svg rect[tabindex]:focus { outline: none; }
.chart-svg rect[tabindex]:focus-visible { stroke: var(--brand); stroke-width: 2; }
.chart-table { max-height: 320px; overflow: auto; }
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.heat-legend i { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }
.heat-legend .h1 { background: #cce3fd; } .heat-legend .h2 { background: #9dc8f7; } .heat-legend .h3 { background: #338ced; } .heat-legend .h4 { background: #1757ac; } .heat-legend .h5 { background: #0e3d7e; }
.chart-tip { position: absolute; z-index: 50; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: 0 8px 24px rgba(19, 32, 26, .14); font-size: 12.5px; min-width: 120px; }
.tip-title { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row b { font-size: 14px; color: var(--ink); }
.tip-row span { color: var(--muted); }
.tip-key { width: 12px; height: 2px; border-radius: 2px; display: inline-block; }
.stat-list { display: flex; flex-direction: column; }
.stat-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.stat-list > div:last-child { border-bottom: 0; }
.stat-list span { color: var(--muted); }
table.data th.num, table.data td.num { text-align: right; }


/* ============================================================
   UI polish v3 — bigger, clearer controls everywhere (Update 8)
   ============================================================ */
body { font-size: 14.5px; }
.small { font-size: 12.5px; }
h1 { font-size: 27px; letter-spacing: -.3px; }
h2 { font-size: 17px; }

/* Buttons: bigger touch targets, soft lift */
.btn { height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 11px; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { box-shadow: 0 4px 12px rgba(19,32,26,.08); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #0E8A5E, var(--brand)); box-shadow: 0 4px 14px rgba(11,122,83,.25); }
.btn.primary:hover { box-shadow: 0 6px 18px rgba(11,122,83,.32); }
.btn.small { height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn.link, .btn.danger-link { box-shadow: none; height: auto; font-size: 14px; }
.btn.link:hover { text-decoration: underline; box-shadow: none; }
.btn i { font-size: .95em; }
.btn:focus-visible, .chip:focus-visible, a:focus-visible { outline: 3px solid rgba(11,122,83,.35); outline-offset: 2px; }

/* Chips / filter tabs */
.chips { gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 13.5px; border-radius: 20px; background: #FFFFFF; color: #24342C; transition: background .15s, border-color .15s; }
.chip i { font-size: 12px; color: var(--muted); }
.chip:hover { border-color: #B9C9C0; background: #F7FAF8; color: var(--ink); }
.chip.on { box-shadow: 0 3px 10px rgba(11,122,83,.25); }
.chip.on i { color: #FFFFFF; }

/* Pills, tags, tables */
.pill { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; }
.soon-tag { font-size: 10.5px; padding: 1px 6px; }
.nav-title { font-size: 11.5px; }
table.data { font-size: 14px; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 8px; }
table.data td { padding-top: 11px; padding-bottom: 11px; }
.copy-btn { padding: 6px 11px; font-size: 12.5px; }
.fld-action { font-size: 12.5px; padding: 7px 11px; }
.input, select.input, textarea.input { font-size: 14.5px; }

/* Alerts with a call-to-action */
.alert { font-size: 14px; padding: 12px 16px; }
.alert-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 4px solid #E3A53B; }
.alert-cta > div { flex: 1 1 260px; line-height: 1.5; }
.alert-cta-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: #FFFFFF; color: #1FA855; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 2px 8px rgba(138,90,0,.12); }

/* Search boxes with icon */
.inbox-list-head .input-icon-wrap { position: relative; display: block; }
.inbox-list-head .input-icon-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.inbox-list-head .input-icon-wrap .input { padding-left: 40px; width: 100%; border-radius: 12px; background: #F7F9F7; }
.inbox-list-head .input-icon-wrap .input:focus { background: #FFFFFF; }

/* Inbox empty states */
.inbox { box-shadow: 0 6px 24px rgba(19,32,26,.05); }
.inbox-thread { background: #EFEAE2 radial-gradient(rgba(11,122,83,.06) 1px, transparent 1px) 0 0 / 18px 18px; }
.list-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 20px; }
.list-empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 6px; }
.list-empty b { font-size: 15px; }
.thread-empty { max-width: 460px; }
.thread-empty h2 { font-size: 20px; margin-top: 6px; }
.thread-empty p { font-size: 14.5px; margin: 8px 0 18px; }
.thread-empty-art { position: relative; width: 280px; margin: 0 auto 18px; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px; background: #FFFFFFB3; border-radius: 20px; box-shadow: 0 10px 30px rgba(19,32,26,.08); }
.te-bubble { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.te-bubble.in { align-self: flex-start; background: #FFFFFF; border-top-left-radius: 4px; }
.te-bubble.out { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 4px; }
.te-badge { position: absolute; top: -18px; right: -14px; width: 46px; height: 46px; border-radius: 50%; background: #25D366; color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 6px 16px rgba(37,211,102,.4); }
.te-tips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.te-tips span { background: #FFFFFF; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #24342C; }
.te-tips i { color: var(--brand); margin-right: 4px; }

/* Audit / pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; }
.audit-table td { vertical-align: top; }
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search-bar label { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 720px) {
  .btn { height: 44px; }
  .btn.small { height: 38px; }
  .thread-empty-art { width: 230px; }
}
.thread-empty { width: 100%; }

/* ============================================================
   Support tickets (Update 9)
   ============================================================ */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #E5484D; color: #FFFFFF; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(229,72,77,.35); }
.chip-count { background: var(--line-soft); color: var(--ink); border-radius: 10px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
.chip.on .chip-count { background: rgba(255,255,255,.25); color: #FFFFFF; }

/* hero */
.support-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 30px 32px; margin-bottom: 18px; border-radius: 20px; color: #FFFFFF;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.14) 0, transparent 40%), linear-gradient(120deg, #075C3E 0%, #0B7A53 55%, #12A06C 100%); box-shadow: 0 14px 40px rgba(11,122,83,.25); }
.support-hero-text { flex: 1 1 420px; }
.support-hero .lp-eyebrow { background: rgba(255,255,255,.16); color: #FFFFFF; margin-bottom: 12px; }
.support-hero h1 { font-size: 32px; color: #FFFFFF; }
.support-hero p { margin: 8px 0 18px; color: #D7F3E6; font-size: 15px; max-width: 560px; }
.support-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.support-hero-actions .btn:not(.primary) { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #FFFFFF; }
.support-hero-actions .btn:not(.primary):hover { background: rgba(255,255,255,.22); }
.support-hero-actions .btn.primary { background: #FFFFFF; color: var(--brand-dark); border-color: #FFFFFF; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.support-hero-stats { display: flex; gap: 12px; }
.support-hero-stats div { min-width: 96px; text-align: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 14px 12px; }
.support-hero-stats b { display: block; font-size: 28px; line-height: 1.1; }
.support-hero-stats span { font-size: 12.5px; color: #D7F3E6; }
.support-hero-stats .hot { background: #FFFFFF; color: var(--brand-dark); }
.support-hero-stats .hot span { color: var(--brand); }

/* topic tiles + category icons */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.topic-tile { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); font-weight: 600; transition: transform .15s, box-shadow .15s, border-color .15s; }
.topic-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(19,32,26,.08); border-color: #C9D3CD; color: var(--ink); }
.topic-go { margin-left: auto; color: #B9C6BF; font-size: 12px; }
.topic-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; background: var(--line-soft); color: #3B4A43; }
.topic-icon.big { width: 54px; height: 54px; flex-basis: 54px; font-size: 23px; border-radius: 16px; }
.cat-whatsapp { background: #E3F9EA; color: #1FA855; }
.cat-campaigns { background: #FFF1E6; color: #D8620F; }
.cat-inbox { background: var(--blue-soft); color: var(--blue); }
.cat-automation { background: #F1EAFE; color: #7C3AED; }
.cat-ai { background: #FCE7F6; color: #C026D3; }
.cat-billing { background: #FFF7E0; color: #A16207; }
.cat-account { background: #E6F6FA; color: #0E7490; }
.cat-bug { background: var(--red-soft); color: var(--red); }
.cat-feature { background: #FEF9C3; color: #A16207; }

/* list */
.ticket-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ticket-search { flex: 0 1 300px; }
.ticket-list { display: flex; flex-direction: column; }
.ticket-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 12px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); border-radius: 12px; transition: background .15s; }
.ticket-row:hover { background: #F7FAF8; color: var(--ink); }
.ticket-row.is-unread { background: #F2FBF6; }
.ticket-row.is-unread .ticket-subject::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.ticket-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ticket-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ticket-subject { font-size: 15px; }
.ticket-preview { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; }
.ticket-meta i { margin-right: 3px; }
.ticket-no { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: #3B4A43; background: var(--line-soft); border-radius: 6px; padding: 0 6px; }
.ticket-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }

/* status + priority */
.tstatus { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tstatus-open { background: #FFF4E0; color: #9A5B00; }
.tstatus-answered { background: var(--blue-soft); color: var(--blue); }
.tstatus-resolved { background: var(--brand-soft); color: var(--brand); }
.tstatus-closed { background: var(--line-soft); color: var(--muted); }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 3px 8px; }
.prio-low { color: var(--muted); background: var(--line-soft); }
.prio-normal { color: #3B4A43; background: var(--line-soft); }
.prio-high { color: #B45309; background: #FFF1E0; }
.prio-urgent { color: #FFFFFF; background: #E5484D; }

/* new ticket pickers */
.cat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cat-option, .prio-option { position: relative; cursor: pointer; }
.cat-option input, .prio-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 13.5px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.cat-option:hover .cat-card { border-color: #B9C9C0; }
.cat-option input:checked + .cat-card { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,122,83,.15); background: #F4FBF7; }
.cat-option input:focus-visible + .cat-card, .prio-option input:focus-visible + span { outline: 3px solid rgba(11,122,83,.35); outline-offset: 2px; }
.prio-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.prio-option span { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.prio-option span i { font-size: 15px; margin-bottom: 4px; }
.prio-option small { color: var(--muted); font-size: 12.5px; }
.po-low i { color: var(--muted); } .po-normal i { color: var(--blue); } .po-high i { color: #D97706; } .po-urgent i { color: #E5484D; }
.prio-option { background: none; padding: 0; }
.prio-option input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,122,83,.15); background: #F4FBF7; }
.po-urgent input:checked + span { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.15); background: #FFF5F5; }

/* ticket page */
.ticket-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ticket-head-main { flex: 1 1 320px; min-width: 0; }
.ticket-head h1 { font-size: 23px; margin-top: 4px; }
.ticket-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ticket-layout { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.ticket-col { flex: 999 1 520px; min-width: 0; }
.ticket-aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.ticket-aside h2 { margin-bottom: 10px; }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.tmsg { display: flex; gap: 12px; align-items: flex-start; max-width: 860px; }
.tmsg.from-me { flex-direction: row-reverse; margin-left: auto; }
.tmsg-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--line-soft); color: #3B4A43; }
.tmsg.from-support .tmsg-avatar { background: linear-gradient(135deg, #0B7A53, #12A06C); color: #FFFFFF; }
.tmsg.from-me .tmsg-avatar { background: var(--brand-soft); color: var(--brand); }
.tmsg-bubble { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; min-width: 0; box-shadow: 0 2px 8px rgba(19,32,26,.04); }
.tmsg.from-me .tmsg-bubble { background: #EEF8F2; border-color: #CDE9DA; border-top-right-radius: 4px; }
.tmsg:not(.from-me) .tmsg-bubble { border-top-left-radius: 4px; }
.tmsg.from-support .tmsg-bubble { border-left: 3px solid var(--brand); }
.tmsg.internal .tmsg-bubble { background: #FFFBEB; border: 1px dashed #E3A53B; }
.tmsg-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.tmsg-head span:last-child { color: var(--muted); }
.tmsg-body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.6; }
.tmsg-system { align-self: center; font-size: 12.5px; color: var(--muted); background: var(--line-soft); border-radius: 20px; padding: 5px 14px; }
.reply-card { display: flex; flex-direction: column; gap: 10px; }
.reply-card textarea { width: 100%; resize: vertical; min-height: 120px; line-height: 1.55; }
.reply-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.reply-actions > span { margin-right: auto; }
.reply-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.reply-tabs label { cursor: pointer; }
.reply-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.reply-tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 600; font-size: 13.5px; }
.reply-tabs input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.reply-tabs label:last-child input:checked + span { border-color: #E3A53B; background: #FFFBEB; color: #8A5A00; }
.canned { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.canned .chip { cursor: pointer; font: inherit; font-size: 12.5px; padding: 5px 11px; }
.resolve-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; margin-top: 12px; color: var(--muted); font-weight: 600; }
.ticket-closed { text-align: center; color: var(--muted); }
.rate-card { margin-top: 14px; text-align: center; }
.rate-card h2 { margin-bottom: 8px; }
.star-pick { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 12px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { font-size: 32px; color: #D8DED9; cursor: pointer; transition: color .1s, transform .1s; }
.star-pick label:hover, .star-pick label:hover ~ label, .star-pick input:checked ~ label { color: #F5A623; }
.star-pick label:hover { transform: scale(1.12); }
.star-pick input:focus-visible + label { outline: 3px solid rgba(11,122,83,.35); border-radius: 6px; }
.rate-row { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; flex-wrap: wrap; }
.rate-row .input { flex: 1 1 260px; }
.rate-done { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.stars-static { color: #F5A623; font-size: 18px; letter-spacing: 2px; }
.ctx { margin-top: 10px; }
.ctx summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--brand); }
.aside-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.aside-actions form { display: inline; }
.aside-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.aside-form .input { width: 100%; margin-bottom: 6px; }

@media (max-width: 720px) {
  .support-hero { padding: 22px; }
  .support-hero h1 { font-size: 26px; }
  .ticket-row { flex-wrap: wrap; }
  .ticket-side { flex-direction: row; align-items: center; width: 100%; padding-left: 54px; }
  .tmsg { max-width: 100%; }
}

/* ============================================================
   Topbar v2, Dashboard v2, Audit feed (Update 10)
   ============================================================ */
.topbar { min-height: 66px; padding: 10px 28px; position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
.topbar-biz { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-biz b { display: block; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.topbar-biz small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.topbar-biz small i { color: #D99A1E; margin-right: 2px; }
.tb-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; background: linear-gradient(135deg, #0B7A53, #19B37A); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; box-shadow: 0 4px 12px rgba(11,122,83,.25); }
.tb-logo.console { background: linear-gradient(135deg, #13201A, #2C4A3D); font-size: 16px; }
.topbar-user { gap: 8px; }
.tb-icon { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; color: #3B4A43; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.tb-icon:hover { background: var(--brand-soft); color: var(--brand); border-color: #CDE9DA; }
.tb-logout:hover { background: var(--red-soft); color: var(--red); border-color: #F5C2C0; }
.tb-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #E5484D; border: 2px solid #FFFFFF; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 30px; background: #FFFFFF; margin: 0 2px; }
.user-chip .avatar { width: 34px; height: 34px; background: linear-gradient(135deg, #13201A, #2C4A3D); }
.user-chip-text b { display: block; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.user-chip-text small { display: block; font-size: 11.5px; color: var(--muted); }
@media (max-width: 720px) { .user-chip-text, .topbar-biz small { display: none; } .user-chip { padding: 3px; } }

/* hero */
.dash-hero { display: flex; flex-wrap: wrap; gap: 22px; padding: 28px 30px; margin-bottom: 18px; border-radius: 22px; color: #FFFFFF; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(37,211,102,.35) 0, transparent 45%), radial-gradient(circle at 0% 100%, rgba(255,255,255,.08) 0, transparent 40%), linear-gradient(125deg, #06402C 0%, #0B7A53 60%, #0E9465 100%);
  box-shadow: 0 16px 40px rgba(6,64,44,.28); }
.dash-hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255,255,255,.05); pointer-events: none; }
.dash-hero-main { flex: 1 1 440px; min-width: 0; position: relative; z-index: 1; }
.dash-date { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #CFEFE0; background: rgba(255,255,255,.1); border-radius: 20px; padding: 5px 12px; }
.dash-date i { color: #FFD166; }
.dash-hero h1 { color: #FFFFFF; font-size: 32px; margin: 14px 0 16px; letter-spacing: -.5px; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 1; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .wave { animation: none; } }
.dash-biz { display: inline-flex; align-items: center; gap: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 10px 16px 10px 10px; margin-bottom: 18px; }
.dash-biz-logo { width: 44px; height: 44px; border-radius: 12px; background: #FFFFFF; color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.dash-biz b { display: block; font-size: 17px; }
.dash-biz span { font-size: 13px; color: #D7F3E6; }
.dash-biz .pill, .dash-biz [class*="status"] { font-size: 11.5px; padding: 2px 8px; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.hero-primary { background: #FFFFFF; color: var(--brand-dark); border-color: #FFFFFF; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn.hero-primary:hover { background: #F0FFF7; color: var(--brand-dark); }
.btn.hero-ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #FFFFFF; }
.btn.hero-ghost:hover { background: rgba(255,255,255,.2); color: #FFFFFF; }
.hero-count { background: #FFD166; color: #3A2A00; border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 800; margin-left: 4px; }
.dash-hero-side { flex: 0 1 320px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.dash-number, .dash-trial { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.dash-number small, .dash-trial span { display: block; color: var(--muted); font-size: 12.5px; }
.dash-number b, .dash-trial b { display: block; font-size: 16px; margin: 1px 0 2px; }
.dn-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #FFFFFF; background: #25D366; box-shadow: 0 6px 14px rgba(37,211,102,.35); }
.dash-number.off .dn-icon { background: #B9C6BF; box-shadow: none; }
.dn-status { color: var(--brand) !important; font-weight: 700; }
.dn-status i { font-size: 8px; vertical-align: middle; margin-right: 3px; }
.dn-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--brand); text-decoration: none; margin-top: 4px; }
.dn-link:hover { text-decoration: underline; }
.q { font-style: normal; font-weight: 700; font-size: 11.5px; border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.q-green, .q-high { background: var(--brand-soft); color: var(--brand); } .q-yellow, .q-medium { background: var(--amber-soft); color: #9A5B00; } .q-red, .q-low { background: var(--red-soft); color: var(--red); }
.trial-ring { --p: 50; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, #FFFFFF 78%, transparent 80% 100%), conic-gradient(#F59E0B calc(var(--p) * 1%), #F3E8D2 0); }
.trial-ring b { font-size: 18px; line-height: 1; margin: 0; }
.trial-ring small { font-size: 10px; color: var(--muted); }

/* KPI cards */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dk { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.dk:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19,32,26,.07); }
.dk::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--dk); }
.dk-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--dk-soft); color: var(--dk); margin-bottom: 12px; }
.dk-value { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.dk-label { font-weight: 600; color: #3B4A43; margin-top: 2px; }
.dk-foot { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.dk-green { --dk: #0B7A53; --dk-soft: #E6F4EE; } .dk-blue { --dk: #2563EB; --dk-soft: #E8F0FE; } .dk-amber { --dk: #D97706; --dk-soft: #FFF4E0; } .dk-violet { --dk: #7C3AED; --dk-soft: #F1EAFE; } .dk-rose { --dk: #E11D48; --dk-soft: #FFE8EE; }

/* grid + cards */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-grid > .card { margin: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--brand); text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.dash-week .card-link { margin-top: 10px; }
.center { text-align: center; }
.key:not(.line) { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 210px; padding: 10px 4px 0; }
.wb-bars { border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 43px, var(--line-soft) 43px, var(--line-soft) 44px); }
.wb-day { display: flex; flex-direction: column; align-items: center; height: 100%; }
.wb-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.wb { width: 34%; max-width: 18px; border-radius: 5px 5px 0 0; min-height: 0; transition: filter .15s; }
.wb:hover { filter: brightness(1.12); }
.wb.s1 { background: var(--series-1); } .wb.s2 { background: var(--series-2); }
.wb-label { font-size: 12px; color: var(--muted); padding-top: 8px; height: 26px; }
.dash-week { --series-1: #257de0; --series-2: #f47230; }
.wb-day.today .wb-label { color: var(--ink); font-weight: 700; }

/* getting started */
.setup-count { font-weight: 800; color: var(--brand); background: var(--brand-soft); border-radius: 20px; padding: 3px 12px; font-size: 13px; }
.setup-bar { height: 8px; border-radius: 6px; background: var(--line-soft); overflow: hidden; margin-bottom: 14px; }
.setup-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #0B7A53, #25D366); }
.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; }
.setup-list li:not(.done):hover { background: #F7FAF8; }
.setup-dot { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; background: var(--line-soft); color: #52625A; border: 2px dashed #C9D3CD; }
.setup-list li.done .setup-dot { background: var(--brand); color: #FFFFFF; border: 0; }
.setup-text { flex: 1; min-width: 0; }
.setup-text b { display: block; font-size: 14px; }
.setup-text span { display: block; font-size: 12.5px; color: var(--muted); }
.setup-list li.done .setup-text b { color: var(--muted); text-decoration: line-through; text-decoration-color: #B9C6BF; }

/* mini lists */
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.mini-row + .mini-row { border-top: 1px solid var(--line-soft); }
.mini-row:hover { background: #F7FAF8; color: var(--ink); }
.mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-main > span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mini-side small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mini-side .unread { margin-left: 0; }
.camp-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--ink) !important; }
.camp-bar { height: 7px; border-radius: 6px; background: var(--line-soft); overflow: hidden; margin: 6px 0 4px; }
.camp-bar span { display: block; height: 100%; background: linear-gradient(90deg, #0B7A53, #25D366); border-radius: 6px; }
.camp-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(19,32,26,.07); border-color: #C9D3CD; color: var(--ink); }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile .topic-icon { margin-bottom: 4px; }

/* audit feed */
.audit-card { padding: 8px 20px 16px; }
.audit-feed { position: relative; }
.audit-day { position: sticky; top: 66px; z-index: 2; padding: 14px 0 8px; background: var(--card); }
.audit-day span { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border-radius: 20px; padding: 4px 12px; }
.audit-item { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 12px 10px 12px 0; border-radius: 12px; }
.audit-item::before { content: ""; position: absolute; left: 19px; top: 52px; bottom: -12px; width: 2px; background: var(--line-soft); }
.audit-item:last-child::before { display: none; }
.audit-item:hover { background: #FAFCFB; }
.audit-icon { position: relative; z-index: 1; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 0 0 4px var(--card); }
.al-blue { background: var(--blue-soft); color: var(--blue); } .al-amber { background: #FFF4E0; color: #B7791F; } .al-violet { background: #F1EAFE; color: #7C3AED; }
.al-orange { background: #FFF1E6; color: #D8620F; } .al-pink { background: #FCE7F6; color: #C026D3; } .al-teal { background: #E6F6FA; color: #0E7490; }
.al-green { background: var(--brand-soft); color: var(--brand); } .al-red { background: var(--red-soft); color: var(--red); } .al-grey { background: var(--line-soft); color: #52625A; }
.audit-body { flex: 1; min-width: 0; }
.audit-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.audit-line b { font-size: 14.5px; }
.audit-detail { color: #3B4A43; font-size: 13.5px; }
.audit-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.audit-who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.audit-biz { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; color: var(--brand); text-decoration: none; font-weight: 600; background: #FFFFFF; }
.audit-biz:hover { border-color: var(--brand); }
.audit-biz.platform { color: #52625A; }
.audit-ip { font-family: Consolas, "Courier New", monospace; }
.audit-code { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; color: #8A968F; background: var(--line-soft); border-radius: 6px; padding: 1px 6px; }
.audit-time { flex: 0 0 auto; text-align: right; }
.audit-time b { display: block; font-size: 13.5px; }
.audit-time small { color: var(--muted); font-size: 12px; }
.search-bar.card { padding: 14px 16px; }
.search-bar label.small { background: var(--line-soft); border-radius: 10px; padding: 0 0 0 10px; }
.search-bar label .input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
@media (max-width: 720px) { .audit-time { display: none; } .dash-hero h1 { font-size: 26px; } .dash-hero { padding: 22px; } }
.dash-biz .dash-biz-logo { color: var(--brand-dark); font-size: 16px; }

/* ============================================================
   Page hero + restyled lists (Update 11) — reuse on every new page
   ============================================================ */
.page-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: 24px 26px; margin-bottom: 18px; border-radius: 20px; color: #FFFFFF; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(37,211,102,.32) 0, transparent 42%), linear-gradient(125deg, #06402C 0%, #0B7A53 62%, #0E9465 100%); box-shadow: 0 12px 32px rgba(6,64,44,.22); }
.page-hero::after { content: ""; position: absolute; right: -50px; top: -70px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255,255,255,.05); pointer-events: none; }
.ph-icon { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 16px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ph-text { flex: 1 1 380px; min-width: 0; position: relative; z-index: 1; }
.ph-text h1 { color: #FFFFFF; font-size: 26px; margin: 0; }
.ph-text p { color: #D7F3E6; margin: 4px 0 0; font-size: 14.5px; max-width: 720px; }
.ph-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ph-stats span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 4px 12px; font-size: 13px; color: #E6F7EF; }
.ph-stats b { color: #FFFFFF; font-size: 14px; margin-right: 2px; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: relative; z-index: 1; }
.ph-actions form { display: inline; }
.ph-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 6px 12px; background: rgba(255,255,255,.12); cursor: help; }
.ph-status i { font-size: 8px; }
.ph-status.ok i { color: #4ADE80; } .ph-status.warn i { color: #FBBF24; }
@media (max-width: 720px) { .page-hero { padding: 20px; } .ph-icon { display: none; } .ph-text h1 { font-size: 22px; } }

/* contacts */
.contacts-table td { vertical-align: middle; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell .copy-chip { margin-top: 3px; }
.city { color: #3B4A43; } .city i { color: var(--muted); margin-right: 3px; }
.row-icon { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #FFFFFF; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; }
.row-icon:hover { border-color: var(--brand); color: var(--brand); }
.row-icon.danger:hover { border-color: #F5C2C0; background: var(--red-soft); color: var(--red); }
.group-link { align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.group-link i { color: var(--muted); width: 18px; }
.group-link.on i { color: var(--brand); }
.group-link span { margin-left: auto; background: var(--line-soft); border-radius: 10px; padding: 1px 8px; font-weight: 700; color: #3B4A43; }
.group-link.on span { background: var(--brand); color: #FFFFFF; }
.groups-card h2 { font-size: 15px; margin-bottom: 10px; }

/* campaign cards */
.camp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.camp-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.camp-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cs, #C9D3CD); }
.camp-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(19,32,26,.08); color: var(--ink); }
.cs-blue { --cs: var(--blue); } .cs-green { --cs: var(--brand); } .cs-amber { --cs: #F59E0B; } .cs-red { --cs: var(--red); } .cs-grey { --cs: #C9D3CD; }
.cc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cc-top small { color: var(--muted); font-size: 12.5px; }
.camp-card h3 { margin: 2px 0 0; font-size: 17px; }
.cc-tpl { color: var(--muted); font-size: 13px; }
.cc-progress { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.cc-progress b { color: var(--ink); font-size: 15px; }
.cc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.cc-stats div { background: #F7F9F7; border-radius: 10px; padding: 8px 6px; text-align: center; }
.cc-stats b { display: block; font-size: 16px; }
.cc-stats span { font-size: 11.5px; color: var(--muted); }
.cc-stats .bad { background: var(--red-soft); } .cc-stats .bad b, .cc-stats .bad span { color: var(--red); }

/* templates */
.tpl-card { border-top: 4px solid #C9D3CD; transition: transform .15s, box-shadow .15s; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(19,32,26,.07); }
.tpl-ok { border-top-color: var(--brand); } .tpl-bad { border-top-color: var(--red); } .tpl-wait { border-top-color: #F59E0B; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tpl-tags .tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #3B4A43; background: var(--line-soft); border-radius: 6px; padding: 2px 8px; }

/* settings open/closed badge */
.open-badge { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 16px; padding: 12px 16px; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.open-badge b { display: block; font-size: 15px; }
.open-badge small { color: var(--muted); font-size: 12.5px; }
.ob-dot { width: 14px; height: 14px; border-radius: 50%; background: #C9D3CD; }
.open-badge.open .ob-dot { background: #22C55E; box-shadow: 0 0 0 5px rgba(34,197,94,.2); }
.open-badge.closed .ob-dot { background: #F59E0B; box-shadow: 0 0 0 5px rgba(245,158,11,.2); }

/* Every other page header gets the same family look (soft card + gradient icon tile) */
.page-head { align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin-bottom: 18px; box-shadow: 0 4px 16px rgba(19,32,26,.04); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, #0B7A53, #25D366); }
.page-head h1 { font-size: 24px; display: flex; align-items: center; }
.page-head h1 .head-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; margin-right: 14px; font-size: 19px; display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; background: linear-gradient(135deg, #0B7A53, #19B37A); box-shadow: 0 6px 14px rgba(11,122,83,.25); }
.page-head p { padding-left: 60px; }
.page-head .head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 720px) { .page-head p { padding-left: 0; } }

/* ============================================================
   WhatsApp number + Connect with Facebook + console onboarding (Update 12)
   ============================================================ */
.wa-card { border-left: 5px solid var(--brand); }
.wa-card.bad { border-left-color: var(--red); }
.wa-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wa-card-title { flex: 1 1 260px; min-width: 0; }
.wa-card-title h2 { margin: 0; font-size: 20px; }
.wa-card-title p { margin: 2px 0 0; font-size: 13.5px; }
.dn-icon.off { background: #B9C6BF; box-shadow: none; }
.tag-soft { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; background: var(--line-soft); border-radius: 6px; padding: 1px 8px; color: #3B4A43; }
.tag-soft .fa-facebook { color: #1877F2; }
.wa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.wa-stats > div { background: #F7F9F7; border-radius: 12px; padding: 12px 14px; }
.wa-stats span { display: block; font-size: 12px; color: var(--muted); }
.wa-stats b { font-size: 16px; }
.wa-stats .good b { color: var(--brand); } .wa-stats .bad { background: var(--red-soft); } .wa-stats .bad b { color: var(--red); }
.q-box.q-green b, .q-box.q-high b { color: var(--brand); } .q-box.q-yellow b, .q-box.q-medium b { color: #B7791F; } .q-box.q-red b, .q-box.q-low b { color: var(--red); }
.q-none { background: var(--line-soft); color: var(--muted); }

.fb-connect { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 28px; border: 1px solid #D6E4FF; background: radial-gradient(circle at 100% 0%, #EAF2FF 0, transparent 45%), #FFFFFF; }
.fb-main { flex: 1 1 420px; min-width: 0; }
.fb-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #1554C0; background: #E7F0FF; border-radius: 20px; padding: 4px 12px; }
.fb-main h2 { font-size: 24px; margin: 12px 0 6px; }
.fb-main > p { color: var(--muted); margin: 0 0 16px; max-width: 600px; }
.fb-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fb-steps li { display: flex; gap: 10px; align-items: flex-start; background: #F7F9FC; border: 1px solid #E6ECF5; border-radius: 12px; padding: 10px 12px; }
.fb-steps li > span { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: #1877F2; color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.fb-steps b { display: block; font-size: 13.5px; }
.fb-steps small { color: var(--muted); font-size: 12.5px; }
.btn.fb-button { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 12px; background: #1877F2; border-color: #1877F2; color: #FFFFFF; box-shadow: 0 8px 20px rgba(24,119,242,.3); }
.btn.fb-button:hover { background: #0F65D6; color: #FFFFFF; }
.btn.fb-button i { font-size: 20px; }
.btn.fb-button.is-loading, .btn.fb-button:disabled { opacity: .6; cursor: progress; }
.btn.fb-button.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #FFFFFF; animation: spin .8s linear infinite; margin-left: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fb-status { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.fb-status.info { background: #E7F0FF; color: #1554C0; } .fb-status.warn { background: var(--amber-soft); color: #8A5A00; } .fb-status.error { background: var(--red-soft); color: var(--red); }
.fb-art { flex: 0 1 280px; display: flex; justify-content: center; }
.fb-phone { width: 250px; border-radius: 28px; padding: 14px; background: #EFEAE2; border: 8px solid #13201A; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 40px rgba(19,32,26,.2); }
.fb-phone-top { background: #075E54; color: #FFFFFF; margin: -14px -14px 6px; padding: 12px 14px; border-radius: 18px 18px 0 0; font-weight: 700; font-size: 13.5px; }
.fb-phone-top i { margin-right: 6px; }
.manual-link { text-align: center; margin: 4px 0 18px; font-size: 13.5px; }
.manual-link a { color: var(--muted); }
.manual-link a:hover { color: var(--brand); }

.onb-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.onb-settings { flex: 1 1 360px; max-width: 460px; }
.onb-settings .toggle-row { margin-bottom: 6px; }
.onb-settings .input-icon-wrap { position: relative; display: block; }
.onb-settings .input-icon-wrap > i, .search-bar .input-icon-wrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.onb-settings .input-icon-wrap .input { padding-left: 38px; width: 100%; }
.onb-settings .webhook-box { margin-top: 16px; }
.onb-settings .howto { margin-top: 14px; }
.onb-list { flex: 999 1 520px; min-width: 0; }
.onb-numbers { display: flex; flex-direction: column; }
.onb-row { display: flex; gap: 14px; align-items: center; padding: 14px 8px; border-top: 1px solid var(--line-soft); }
.onb-row.bad { background: #FFFAFA; }
.onb-main { flex: 1; min-width: 0; }
.onb-top b { font-size: 15.5px; margin-right: 6px; }
.onb-side { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.onb-side form { display: inline; }
.fb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
@media (max-width: 640px) { .fb-steps { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   Console → AI providers (Update 13)
   ============================================================ */
.alert.info { background: #E8F0FE; color: #1E3A8A; border: 1px solid #C7D7FB; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.prov-card { display: flex; flex-direction: column; gap: 8px; margin: 0; border-top: 4px solid var(--brand); transition: opacity .15s; }
.prov-card.off { border-top-color: #C9D3CD; background: #FAFBFA; }
.prov-card.off .prov-icon { filter: grayscale(1); opacity: .6; }
.prov-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.prov-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.prov-anthropic { background: #FBEFE6; color: #C15F3C; } .prov-openai { background: #E9F5F0; color: #10A37F; } .prov-gemini { background: #E8F0FE; color: #4285F4; }
.prov-azureopenai { background: #E6F2FB; color: #0078D4; } .prov-openaicompatible { background: #F1EAFE; color: #7C3AED; }
.prov-title { flex: 1; min-width: 0; }
.prov-title b { display: block; font-size: 15px; }
.prov-title small { color: var(--muted); font-size: 12.5px; }
.prov-card textarea { width: 100%; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 48px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #C9D3CD; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { left: 23px; }
.switch input:focus-visible + span { outline: 3px solid rgba(11,122,83,.35); outline-offset: 2px; }
.policy-card { margin-bottom: 16px; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 20px; align-items: start; }
.policy-grid .wide { grid-column: 1 / -1; }
.policy-grid .input { width: 100%; }
.policy-grid .input-icon-wrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.policy-grid .input-icon-wrap .input { padding-left: 38px; }
.danger-toggle { background: #FFF8F7; border: 1px solid #F5D5D2; border-radius: 12px; padding: 12px; }

/* ============================================================
   Inbox media + composer + quick replies (Update 14)
   ============================================================ */
.compose-form { position: relative; flex-direction: column; align-items: stretch; gap: 8px; border-radius: 14px; transition: background .15s, outline-color .15s; }
.compose-form.drag { outline: 2px dashed var(--brand); outline-offset: 4px; background: #F2FBF6; }
.compose-row { display: flex; gap: 8px; align-items: flex-end; }
.compose-row .compose-input { flex: 1; min-width: 0; border-radius: 14px; }
.compose-tools { display: flex; gap: 6px; padding-bottom: 4px; }
.tool-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #FFFFFF; color: #3B4A43; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; transition: all .15s; }
.tool-btn:hover, .tool-btn[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand); border-color: #CDE9DA; }
.tool-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.tool-btn:focus-within { outline: 3px solid rgba(11,122,83,.35); outline-offset: 2px; }
.compose-send { height: 48px; border-radius: 14px; }
.compose-send.is-busy { opacity: .7; cursor: progress; }
.compose-attach { display: flex; align-items: center; gap: 10px; background: #F2FBF6; border: 1px solid #CDE9DA; border-radius: 12px; padding: 8px 10px; }
.compose-attach .ca-icon { color: var(--brand); }
.compose-attach img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ca-name { font-weight: 700; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-hint { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.ca-remove { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #FFFFFF; color: var(--muted); cursor: pointer; }
.ca-remove:hover { background: var(--red-soft); color: var(--red); }

.qr-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(19,32,26,.18); overflow: hidden; }
.qr-pop-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line-soft); }
.qr-pop-head .input-icon-wrap { flex: 1; position: relative; }
.qr-pop-head .input-icon-wrap > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.qr-pop-head .input { width: 100%; padding-left: 36px; height: 38px; }
.qr-pop-list { list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow-y: auto; }
.qr-opt { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.qr-opt:hover, .qr-opt.on { background: var(--brand-soft); }
.qr-opt code { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: var(--brand); background: #FFFFFF; border: 1px solid #CDE9DA; border-radius: 6px; padding: 1px 6px; flex: 0 0 auto; }
.qr-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qr-opt-text b { font-size: 13px; }
.qr-opt-text b:empty { display: none; }
.qr-opt-text span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-opt-file { color: var(--brand); }
.qr-pop-empty { padding: 14px; color: var(--muted); font-size: 13.5px; text-align: center; }

.msg-media { display: block; margin: -2px -6px 6px; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.04); }
.msg-media img { display: block; max-width: 300px; width: 100%; max-height: 320px; object-fit: cover; }
.msg-video { max-width: 300px; width: 100%; border-radius: 10px; margin-bottom: 6px; background: #000; }
.msg-audio { width: 260px; max-width: 100%; margin-bottom: 4px; }
.msg-doc { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 300px; padding: 10px 12px; margin-bottom: 6px; background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.06); border-radius: 10px; text-decoration: none; color: var(--ink); }
.msg-doc:hover { background: #FFFFFF; color: var(--ink); }
.doc-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.doc-icon.pdf { background: var(--red-soft); color: #D93025; }
.doc-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-doc > .fa-download { color: var(--muted); }
.media-missing { display: inline-block; font-size: 12.5px; color: var(--muted); font-style: italic; padding: 6px 0; }

/* Settings → Quick replies */
.qr-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.qr-form { flex: 1 1 340px; max-width: 460px; display: flex; flex-direction: column; gap: 6px; }
.qr-form .input { width: 100%; }
.qr-form textarea { resize: vertical; line-height: 1.5; }
.qr-form .btn.block { margin-top: 10px; }
.qr-slash { position: relative; display: block; }
.qr-slash > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 800; color: var(--brand); font-size: 16px; }
.qr-slash .input { padding-left: 30px; font-family: Consolas, "Courier New", monospace; }
.qr-tokens { display: flex; gap: 6px; }
.qr-tokens .chip { cursor: pointer; font: inherit; font-size: 12px; padding: 4px 10px; }
.file-drop { position: relative; display: flex; align-items: center; gap: 10px; border: 1.5px dashed #B9C9C0; border-radius: 12px; padding: 14px; color: var(--muted); cursor: pointer; transition: all .15s; }
.file-drop:hover { border-color: var(--brand); color: var(--brand); background: #F7FBF9; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop i { font-size: 20px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--line-soft); border-radius: 10px; padding: 6px 10px; font-size: 13px; margin: 4px 0; }
.qr-list { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.qr-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; transition: border-color .15s; }
.qr-item.editing { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,122,83,.12); }
.qr-item-head { display: flex; align-items: center; gap: 10px; }
.qr-item-head b { flex: 1; min-width: 0; }
.qr-code { font-family: Consolas, "Courier New", monospace; font-weight: 800; color: var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 3px 8px; }
.qr-uses { color: var(--muted); font-size: 12px; white-space: nowrap; }
.qr-body { white-space: pre-wrap; color: #3B4A43; font-size: 13.5px; margin-top: 8px; line-height: 1.5; }
.qr-thumb { display: block; max-width: 180px; max-height: 120px; border-radius: 10px; margin-top: 8px; object-fit: cover; }
@media (max-width: 720px) { .ca-hint { display: none; } .msg-media img, .msg-video, .msg-doc { max-width: 230px; } }
.brand-mark.brand-img { background: none; padding: 0; object-fit: contain; }

/* Sign-up closed page */
.closed-card { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.closed-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.closed-text { color: #3B4A43; font-size: 15px; line-height: 1.6; margin: 0; }
.btn.closed-wa { background: #25D366; border-color: #25D366; color: #FFFFFF; height: 50px; font-size: 16px; box-shadow: 0 8px 20px rgba(37,211,102,.3); }
.btn.closed-wa:hover { background: #1EBE5A; color: #FFFFFF; }
.closed-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; font-size: 14px; color: var(--muted); }
