/* ═══════════════════════ DaisyNova — Enterprise Design System ═══════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #070b14;
  --bg2: #0c1320;
  --bg3: #121b2c;
  --surface: rgba(255,255,255,0.035);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.16);
  --text: #eaf0fb;
  --text2: #98a6c0;
  --text3: #5e6e8a;
  --blue: #4f8cff;
  --emerald: #00e08f;
  --grad: linear-gradient(135deg, #4f8cff 0%, #00e08f 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,140,255,.15), rgba(0,224,143,.12));
  --green: #25d366;
  --green2: #1eb858;
  --red: #ff5470;
  --wa-chat-bg: #0a121b;
  --wa-msg-out: #0b5e4d;
  --wa-msg-in: #16212e;
  --topbar-h: 60px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --shadow-glow: 0 0 0 1px rgba(0,224,143,.4), 0 12px 40px rgba(0,224,143,.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,140,255,.10), transparent 60%),
    radial-gradient(1000px 500px at 0% 0%, rgba(0,224,143,.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
/* Sticky footer: active page grows to fill, footer sits at the very bottom */
.page.active { flex: 1 0 auto; }
.site-foot { margin-top: auto; }
a { color: var(--emerald); text-decoration: none; }

/* ─── Animations ─── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { opacity: 0; animation: fadeInUp .55s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d, 0) * 70ms); }

/* ─── Pages ─── */
.page { display: none; }
.page.active { display: block; animation: fadeInUp .4s ease; }
#page-chat.active { display: block; animation: none; }
.container { max-width: 1160px; margin: 0 auto; padding: 32px 24px 64px; }
.container.narrow { max-width: 780px; }

/* ─── Top bar ─── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(7,11,20,.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); border: 1px solid var(--border2);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.brand-name.wordmark { font-size: 20px; letter-spacing: 2px; font-weight: 800; }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { font-size: 10.5px; color: var(--text3); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

.topnav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  background: transparent; border: none; color: var(--text2);
  font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: .18s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.sys-status { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text2); margin: 0 6px; }
.sys-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); animation: pulse 2.4s infinite; }

/* ─── Buttons ─── */
.btn-primary {
  background: var(--grad); color: #04121a; border: none;
  padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: .2s; white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,224,143,.28); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-lg { width: 100%; padding: 15px; font-size: 15px; border-radius: 12px; }

/* ─── Home / marketing ─── */
.hero { position: relative; overflow: hidden; padding: 70px 24px 50px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 2; }
.hero-glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(circle, rgba(0,224,143,.14), transparent 60%); pointer-events: none; z-index: 1; }
.hero-badge { display: inline-block; background: var(--surface); border: 1px solid var(--border2); color: var(--text2); font-size: 12.5px; font-weight: 600; padding: 7px 16px; border-radius: 100px; margin-bottom: 22px; }
.hero-title { font-size: clamp(34px, 6vw, 60px); font-weight: 900; letter-spacing: -1.8px; line-height: 1.05; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: clamp(15px, 2.2vw, 18px); color: var(--text2); max-width: 660px; margin: 20px auto 0; line-height: 1.7; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.btn-lg-inline { padding: 14px 26px; font-size: 15px; border-radius: 12px; }
.btn-ghost { background: transparent; border: 1px solid var(--border2); color: var(--text); padding: 14px 24px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .2s; }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); }
.hero-trust { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 34px; font-size: 12.5px; color: var(--text3); }
.hero-trust strong { color: var(--text); }
.hero-trust .dot { opacity: .5; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 40px; }
.pillar { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: .22s; }
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: transparent; }
.pillar-ico { font-size: 28px; margin-bottom: 14px; }
.pillar h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.3px; }
.pillar p { color: var(--text2); font-size: 13.5px; line-height: 1.65; }

.emotion-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(0,224,143,.06)); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 40px; margin: 20px 0 40px; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--emerald); margin-bottom: 12px; }
.emotion-left h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; letter-spacing: -.8px; line-height: 1.15; }
.emotion-left p { color: var(--text2); margin-top: 14px; line-height: 1.7; }
.emotion-left em { color: var(--text); font-style: italic; }
.emo-chat { background: var(--wa-chat-bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.emo-b { padding: 10px 14px; border-radius: 12px; font-size: 13.5px; max-width: 88%; }
.emo-b.in { background: var(--wa-msg-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.emo-b.out { background: var(--wa-msg-out); align-self: flex-end; border-bottom-right-radius: 4px; }
.emo-tagline { font-size: 11px; color: var(--emerald); text-align: center; margin-top: 4px; font-weight: 600; }

.section-center { text-align: center; max-width: 640px; margin: 30px auto 24px; }
.section-center h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; letter-spacing: -.8px; }
.muted { color: var(--text2); }
.muted.small { font-size: 12.5px; }
.how-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 44px; }
.how-step { display: flex; gap: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.how-n { font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.how-step h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.how-step p { color: var(--text2); font-size: 13px; line-height: 1.6; }

.cta-band { text-align: center; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 50px 30px; margin-bottom: 30px; }
.cta-band h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.cta-band p { color: var(--text2); margin: 14px auto 26px; max-width: 480px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Enterprise / Snowflake ─── */
.split-band { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; margin: 6px 0 14px; }
.split-col { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.split-x { display: flex; align-items: center; font-size: 28px; font-weight: 800; color: var(--text3); }
.split-lead { font-size: 18px; font-weight: 700; margin: 4px 0 14px; }
.split-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.split-list li { color: var(--text2); font-size: 13.5px; padding-left: 18px; position: relative; }
.split-list li::before { content: '◆'; position: absolute; left: 0; color: var(--emerald); font-size: 8px; top: 5px; }
.band-tagline { text-align: center; font-size: clamp(17px,2.4vw,22px); color: var(--text2); margin: 12px 0 6px; }
.band-tagline strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.ent-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: .22s; }
.ent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: transparent; }
.ent-ico { font-size: 26px; margin-bottom: 12px; }
.ent-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.2px; }
.ent-card p { color: var(--text2); font-size: 13px; line-height: 1.6; }
.ent-out { margin-top: 12px; font-size: 11.5px; font-weight: 700; color: #aef0d0; background: rgba(0,224,143,.08); border: 1px solid rgba(0,224,143,.3); border-radius: 8px; padding: 7px 10px; }
.arch { max-width: 560px; margin: 0 auto 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.arch-step { width: 100%; text-align: center; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; padding: 15px; font-weight: 600; font-size: 14px; }
.arch-daisy { background: var(--grad-soft); border-color: rgba(0,224,143,.4); }
.arch-out { background: var(--grad); color: #04121a; font-weight: 800; border: none; }
.arch-arrow { color: var(--text3); font-size: 18px; }

.coming-soon { text-align: center; padding: 60px 20px; }
.cs-badge { display: inline-block; background: var(--surface); border: 1px solid var(--border2); color: var(--text2); font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 100px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px; }
.coming-soon h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; letter-spacing: -1.2px; line-height: 1.1; }
.coming-soon p { color: var(--text2); max-width: 500px; margin: 18px auto 28px; line-height: 1.7; }

/* ─── Page head ─── */
.page-head { margin-bottom: 26px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1, .setup-header h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -1px; }
.page-head p, .setup-header p { color: var(--text2); margin-top: 6px; max-width: 620px; }

/* ─── Stat row ─── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
}
.stat-card::after { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: .3s; }
.stat-card:hover::after { opacity: 1; }
.stat-ico { font-size: 20px; margin-bottom: 10px; }
.stat-val { font-size: 30px; font-weight: 800; letter-spacing: -1px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; position: relative; }
.stat-lbl { font-size: 12px; color: var(--text3); font-weight: 600; position: relative; }

/* ─── Panel ─── */
.panel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 26px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-note { font-size: 12.5px; color: var(--text3); }
.section-head { margin: 4px 0 16px; }

/* ─── Capability chips ─── */
.chips-strip { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.cap-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border2); color: var(--text2);
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 100px; transition: .2s;
}
.cap-chip:hover { color: var(--text); border-color: var(--blue); }
.cap-chip.live { color: #d6ffe9; border-color: rgba(37,211,102,.5); background: rgba(37,211,102,.08); }
.cap-chip.ai { color: #dbe6ff; border-color: rgba(79,140,255,.4); background: rgba(79,140,255,.07); }
.cap-chip.tiny { font-size: 11px; padding: 4px 10px; }
.cap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); animation: pulse 2s infinite; }
.cap-sep { width: 1px; height: 22px; background: var(--border2); margin: 0 4px; }

/* ─── Agents grid ─── */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.brand-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; cursor: pointer; transition: .22s; position: relative;
  animation: fadeInUp .5s ease both;
}
.brand-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: transparent; }
.brand-card-icon {
  width: 50px; height: 50px; border-radius: 13px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; color: #04121a; margin-bottom: 15px;
}
.brand-card-icon img, .demo-brand-icon img, .wa-brand-icon img, .wa-chat-avatar img {
  width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff;
}
.brand-card-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.brand-card-ind { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.brand-card-actions { display: flex; gap: 8px; }
.brand-card-actions button { flex: 1; padding: 8px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; border: none; font-family: inherit; transition: .18s; }
.btn-chat { background: var(--grad); color: #04121a; }
.btn-chat:hover { box-shadow: 0 6px 18px rgba(0,224,143,.3); }
.btn-edit { background: var(--surface); color: var(--text2); border: 1px solid var(--border) !important; flex: 0 0 auto !important; padding: 8px 14px !important; }
.btn-edit:hover { color: var(--text); }
.btn-del { background: rgba(255,84,112,.1); color: var(--red); flex: 0 0 auto !important; padding: 8px 13px !important; }
.btn-del:hover { background: rgba(255,84,112,.2); }
.empty-state { grid-column: 1/-1; text-align: center; padding: 70px 24px; color: var(--text3); }
.empty-state h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }
.loading-card { grid-column: 1/-1; text-align: center; padding: 50px; color: var(--text3); }

/* ─── Setup / forms ─── */
.setup-header { margin-bottom: 26px; }
.setup-form { display: flex; flex-direction: column; gap: 18px; }
.quick-create { background: var(--grad-soft); border: 1px solid rgba(79,140,255,.3); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 18px; }
.quick-badge { display: inline-block; background: var(--grad); color: #04121a; font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 100px; letter-spacing: .5px; margin-bottom: 13px; }
.quick-create h3 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 6px; }
.quick-sub { color: var(--text2); font-size: 13px; margin-bottom: 18px; }
.quick-input-row { display: flex; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.quick-input-row input { flex: 1; min-width: 180px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 11px; padding: 13px 16px; color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: .18s; }
.quick-input-row input:focus { border-color: var(--emerald); }
.quick-input-row input::placeholder { color: var(--text3); }
.quick-or { text-align: center; color: var(--text3); font-size: 12px; margin: 13px 0; }
.quick-progress { margin-top: 18px; }
.quick-progress-bar { height: 6px; background: var(--bg3); border-radius: 100px; overflow: hidden; }
.quick-progress-fill { height: 100%; width: 0; background: var(--grad); border-radius: 100px; transition: width .4s ease; }
.quick-progress-text { font-size: 12px; color: var(--emerald); margin-top: 8px; text-align: center; }
.manual-toggle { cursor: pointer; color: var(--text2); font-size: 13px; font-weight: 600; padding: 10px 0; user-select: none; transition: .18s; }
.manual-toggle:hover { color: var(--emerald); }

.form-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: var(--emerald); margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text2); }
.label-hint { color: var(--text3); font-weight: 400; }
.form-group input, .form-group select {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 11px 14px;
  color: var(--text); font-size: 13px; font-family: inherit; outline: none; transition: .18s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--emerald); }
.form-group input::placeholder { color: var(--text3); }
.add-btn { background: transparent; border: 1px dashed var(--border2); color: var(--emerald); padding: 4px 12px; border-radius: 7px; font-size: 12px; cursor: pointer; font-family: inherit; transition: .18s; }
.add-btn:hover { background: rgba(0,224,143,.1); }
.product-item, .faq-item { display: grid; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; position: relative; }
.product-item { grid-template-columns: 1fr 1fr 110px; }
.product-item input, .faq-item input { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text); font-size: 13px; font-family: inherit; outline: none; }
.remove-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,84,112,.12); border: none; color: var(--red); cursor: pointer; font-size: 15px; width: 22px; height: 22px; border-radius: 5px; }
.form-actions { padding-top: 6px; }

/* ─── Demo picker ─── */
.demo-brands-list { display: flex; flex-direction: column; gap: 10px; }
.demo-brand-item { display: flex; align-items: center; gap: 15px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 18px; cursor: pointer; transition: .2s; }
.demo-brand-item:hover { border-color: var(--emerald); transform: translateX(3px); }
.demo-brand-icon { width: 44px; height: 44px; border-radius: 11px; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: #04121a; flex-shrink: 0; }
.demo-brand-name { font-weight: 700; font-size: 15px; }
.demo-brand-ind { font-size: 12px; color: var(--text3); }
.demo-brand-arrow { margin-left: auto; color: var(--text3); font-size: 20px; }

/* ═══════════════════════ CHAT ═══════════════════════ */
.chat-shell { display: flex; height: calc(100dvh - var(--topbar-h)); background: var(--wa-chat-bg); }
.chat-sidebar { width: 280px; flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px; }
.cs-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.wa-brand-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; color: #04121a; flex-shrink: 0; }
.wa-brand-name { font-weight: 700; font-size: 14px; }
.wa-brand-ind { font-size: 11px; color: var(--text3); margin-top: 2px; }
.cs-actions { display: flex; flex-direction: column; gap: 7px; padding: 16px 0; }
.cs-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text2); padding: 10px 14px; border-radius: 9px; font-size: 12.5px; cursor: pointer; text-align: left; font-family: inherit; transition: .18s; }
.cs-btn:hover { color: var(--text); border-color: var(--border2); background: var(--bg3); }
.cs-channels { padding: 14px 0; border-top: 1px solid var(--border); }
.cs-channels-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text3); font-weight: 700; margin-bottom: 9px; }
.cs-channel-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-foot { margin-top: auto; font-size: 11px; color: var(--text3); line-height: 1.6; background: var(--surface); border-radius: 9px; padding: 11px; }

.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; background-image: radial-gradient(circle at 25% 15%, rgba(79,140,255,.04), transparent 45%), radial-gradient(circle at 80% 85%, rgba(0,224,143,.04), transparent 45%); }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 11px 18px; background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-back { display: none; background: none; border: none; color: var(--text2); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.wa-chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #04121a; flex-shrink: 0; }
.chat-h-info { flex: 1; min-width: 0; }
.wa-chat-name { font-weight: 700; font-size: 15px; }
.wa-chat-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); margin-top: 1px; }
.status-dot { width: 7px; height: 7px; background: var(--emerald); border-radius: 50%; animation: pulse 2s infinite; }
.emo-tag { color: var(--blue); font-weight: 600; }
.chat-h-actions { display: none; gap: 5px; margin-left: auto; }
.chat-h-actions button { background: var(--surface); border: 1px solid var(--border); color: var(--text2); width: 38px; height: 38px; border-radius: 10px; font-size: 16px; cursor: pointer; line-height: 1; }
.chat-h-actions button:active { background: var(--bg3); }
.chat-channel-badge { font-size: 11px; font-weight: 700; color: #d6ffe9; background: rgba(37,211,102,.12); border: 1px solid rgba(37,211,102,.4); padding: 5px 11px; border-radius: 100px; }

.wa-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.wa-messages::-webkit-scrollbar { width: 5px; }
.wa-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.wa-date-label { text-align: center; font-size: 11px; color: var(--text3); background: rgba(0,0,0,.3); padding: 4px 12px; border-radius: 100px; width: fit-content; margin: 6px auto; }
.wa-msg { display: flex; flex-direction: column; max-width: 70%; animation: msgIn .22s ease; }
.wa-msg.out { align-self: flex-end; }
.wa-msg.in { align-self: flex-start; }
.wa-bubble { padding: 10px 14px; border-radius: 13px; font-size: 14px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; }
.wa-msg.out .wa-bubble { background: var(--wa-msg-out); border-bottom-right-radius: 4px; }
.wa-msg.in .wa-bubble { background: var(--wa-msg-in); border-bottom-left-radius: 4px; }
.wa-bubble strong { font-weight: 700; }
.wa-link { color: #6cc7ff; text-decoration: underline; word-break: break-all; }
.wa-msg.out .wa-link { color: #aef0d0; }
.wa-time { font-size: 10px; color: var(--text3); margin-top: 3px; padding: 0 4px; }
.wa-msg.out .wa-time { text-align: right; }

/* Product cards */
.wa-products { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.wa-product-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 10px; align-items: center; transition: .2s; }
.wa-product-card:hover { border-color: var(--emerald); }
.wa-pc-img { width: 56px; height: 56px; border-radius: 9px; background-size: cover; background-position: center; background-color: var(--bg3); flex-shrink: 0; }
.wa-pc-noimg { display: flex; align-items: center; justify-content: center; color: var(--emerald); font-size: 20px; background: var(--grad-soft); }
.wa-pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-pc-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.wa-pc-price { font-size: 12px; color: var(--emerald); font-weight: 700; }
.wa-pc-btn { align-self: flex-start; margin-top: 4px; background: var(--grad); color: #04121a; font-size: 11px; font-weight: 700; padding: 6px 13px; border-radius: 100px; text-decoration: none; border: none; cursor: pointer; font-family: inherit; transition: .18s; }
.wa-pc-btn:hover { box-shadow: 0 5px 14px rgba(0,224,143,.3); }

/* Suggestion chips */
.wa-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; align-self: flex-start; max-width: 90%; animation: msgIn .28s ease; }
.wa-chip { background: rgba(0,224,143,.08); border: 1px solid rgba(0,224,143,.5); color: #aef0d0; font-size: 12.5px; font-weight: 600; padding: 8px 15px; border-radius: 100px; cursor: pointer; font-family: inherit; transition: .15s; }
.wa-chip:hover { background: var(--emerald); color: #04121a; transform: translateY(-1px); }

/* Typing */
.wa-typing { padding: 6px 22px 0; display: flex; gap: 4px; flex-shrink: 0; }
.wa-typing span { width: 7px; height: 7px; background: var(--text3); border-radius: 50%; animation: typingDot 1.2s infinite; }
.wa-typing span:nth-child(2) { animation-delay: .2s; }
.wa-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Input */
.wa-input-area { padding: 12px 16px 14px; background: var(--bg2); border-top: 1px solid var(--border); flex-shrink: 0; }
.wa-input-wrap { display: flex; align-items: flex-end; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 24px; padding: 7px 7px 7px 16px; }
.wa-input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-size: 16px; font-family: inherit; resize: none; max-height: 120px; line-height: 1.5; padding: 6px 0; }
.wa-input::placeholder { color: var(--text3); }
.wa-send-btn { width: 40px; height: 40px; background: var(--grad); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #04121a; flex-shrink: 0; transition: .18s; }
.wa-send-btn:hover { transform: scale(1.06); }
.wa-send-btn:disabled { background: var(--text3); cursor: not-allowed; transform: none; }
.powered { text-align: center; font-size: 11px; color: var(--text3); margin-top: 8px; }

/* ─── Footer ─── */
.site-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 24px; border-top: 1px solid var(--border); color: var(--text3); font-size: 12px; }
body[data-page="page-chat"] .site-foot { display: none; }

/* ─── Toast ─── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--bg3); border: 1px solid var(--border2); color: var(--text); padding: 13px 24px; border-radius: 100px; font-size: 13px; font-weight: 600; z-index: 9999; transition: transform .3s; white-space: nowrap; box-shadow: var(--shadow); max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--emerald); color: #aef0d0; }
.toast.error { border-color: var(--red); color: #ffb3c0; }

/* ─── Agent Brain ─── */
.brain-textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-size: 13.5px; font-family: inherit;
  outline: none; resize: vertical; line-height: 1.6; min-height: 90px;
}
.brain-textarea:focus { border-color: var(--emerald); }
.brain-textarea::placeholder { color: var(--text3); }
.cs-btn-accent { border-color: rgba(0,224,143,.5) !important; color: #aef0d0 !important; background: rgba(0,224,143,.08) !important; }
.cs-btn-accent:hover { background: rgba(0,224,143,.16) !important; }
.brain-overlay { position: fixed; inset: 0; background: rgba(3,6,12,.72); backdrop-filter: blur(5px); z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeInUp .2s ease; }
.brain-modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 560px; box-shadow: var(--shadow); }
.brain-modal-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 6px; }
.brain-x { background: none; border: none; color: var(--text3); font-size: 24px; cursor: pointer; line-height: 1; }
.brain-x:hover { color: var(--text); }
.brain-help { color: var(--text2); font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.brain-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ═══════════════ Landing (refined dark, world-class) ═══════════════ */
.eyebrow { display:inline-block; font-size:12px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--emerald); margin-bottom:18px; }
.lp-hero { position:relative; overflow:hidden; padding:104px 24px 76px; text-align:center; }
.lp-glow { position:absolute; top:-280px; left:50%; transform:translateX(-50%); width:1100px; height:700px; background:radial-gradient(circle, rgba(0,224,143,.13), transparent 60%); pointer-events:none; }
.lp-hero-inner { position:relative; z-index:2; max-width:880px; margin:0 auto; }
.lp-h1 { font-size:clamp(40px,7vw,76px); font-weight:900; letter-spacing:-2.5px; line-height:1.02; }
.lp-lead { font-size:clamp(16px,2.2vw,20px); color:var(--text2); max-width:680px; margin:24px auto 0; line-height:1.65; }
.lp-cta { display:flex; gap:14px; justify-content:center; margin-top:36px; flex-wrap:wrap; }
.hero-onboard { display:flex; gap:10px; max-width:540px; margin:34px auto 0; }
.hero-onboard + .lp-cta { margin-top:14px; gap:10px; }
.hero-onboard + .lp-cta .btn-ghost { padding:11px 20px; font-size:13px; border-radius:10px; }
.hero-url { flex:1; min-width:0; background:var(--bg3); border:1px solid var(--border2); border-radius:12px; padding:15px 18px; color:var(--text); font-size:16px; font-family:inherit; outline:none; transition:.18s; }
.hero-url:focus { border-color:var(--emerald); box-shadow:0 0 0 3px rgba(0,224,143,.12); }
.hero-url::placeholder { color:var(--text3); }
.hero-onboard .btn-primary { padding:15px 22px; white-space:nowrap; }
/* sticky-header scroll offset + active section highlight (fixes mobile/section-on-scroll) */
html { scroll-padding-top: 76px; }
.lp-section, .lp-marquee-wrap, #top { scroll-margin-top: 76px; }
.nav-link.active { color: var(--emerald); }
/* channel marquee */
.lp-marquee-wrap { max-width:1100px; margin:0 auto; padding:8px 24px 0; text-align:center; }
.lp-marquee-label { font-size:13px; color:var(--text3); margin-bottom:16px; letter-spacing:.3px; }
.lp-marquee { overflow:hidden; -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent); mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent); }
.lp-track { display:flex; gap:14px; width:max-content; animation:marquee 30s linear infinite; }
.lp-track span { white-space:nowrap; padding:11px 20px; border:1px solid var(--border2); border-radius:100px; color:var(--text2); font-weight:600; font-size:14px; background:var(--surface); }
.lp-marquee:hover .lp-track { animation-play-state:paused; }
@keyframes marquee { to { transform:translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .lp-track{animation:none;} }
@media (max-width:680px){ .hero-onboard{flex-direction:column;} .hero-onboard .btn-primary{width:100%;} }
.lp-trust { display:flex; gap:14px; align-items:center; justify-content:center; flex-wrap:wrap; margin-top:42px; font-size:13px; color:var(--text3); }
.lp-trust strong { color:var(--text); }
.lp-trust i { width:4px; height:4px; border-radius:50%; background:var(--text3); opacity:.5; }
.lp-section { max-width:1100px; margin:0 auto; padding:92px 24px; }
.lp-section.tight { padding-top:16px; }
.lp-head { text-align:center; max-width:700px; margin:0 auto 48px; }
.lp-head h2 { font-size:clamp(28px,4.5vw,46px); font-weight:800; letter-spacing:-1.4px; line-height:1.08; }
.lp-muted { color:var(--text2); line-height:1.7; }
.lp-muted.center { max-width:640px; margin:16px auto 0; text-align:center; }
.steps3, .lp-grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.step3 { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:30px; }
.step3-n { font-size:14px; font-weight:800; color:var(--emerald); letter-spacing:1px; margin-bottom:16px; }
.step3 h4 { font-size:17px; font-weight:700; margin-bottom:8px; }
.step3 p, .lp-card p { color:var(--text2); font-size:13.5px; line-height:1.65; }
.lp-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:30px; transition:.25s; }
.lp-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-glow); border-color:transparent; }
.lp-card.sm { padding:24px; }
.lp-ico { font-size:30px; margin-bottom:16px; }
.lp-card h3 { font-size:18px; font-weight:700; margin-bottom:9px; letter-spacing:-.3px; }
.emotion2 { display:grid; grid-template-columns:1.05fr .95fr; gap:40px; align-items:center; }
.emotion2 h2 { font-size:clamp(26px,4vw,40px); font-weight:800; letter-spacing:-1.2px; line-height:1.1; }
.emotion2 .lp-muted { margin-top:14px; }
.emotion2 .lp-muted em { color:var(--text); font-style:italic; }
.chatmock { background:var(--wa-chat-bg); border:1px solid var(--border2); border-radius:20px; padding:20px; display:flex; flex-direction:column; gap:10px; box-shadow:var(--shadow); }
.cm-row { padding:11px 15px; border-radius:14px; font-size:14px; max-width:92%; }
.cm-row.in { background:var(--wa-msg-in); align-self:flex-start; border-bottom-left-radius:5px; }
.cm-row.out { background:var(--wa-msg-out); align-self:flex-end; border-bottom-right-radius:5px; }
.cm-tag { font-size:11px; color:var(--emerald); text-align:center; font-weight:600; margin-top:2px; }
.commerce-demo { display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:center; max-width:940px; margin:0 auto; }
.ticks { list-style:none; display:flex; flex-direction:column; gap:14px; margin-bottom:26px; }
.ticks li { position:relative; padding-left:30px; color:var(--text); font-size:15px; }
.ticks li::before { content:'✓'; position:absolute; left:0; top:-1px; width:20px; height:20px; border-radius:50%; background:rgba(0,224,143,.15); color:var(--emerald); font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; }
.cmrc-card { background:var(--bg2); border:1px solid var(--border2); border-radius:var(--radius-lg); padding:24px; box-shadow:var(--shadow); }
.cmrc-head { display:flex; align-items:center; justify-content:space-between; font-weight:700; font-size:15px; margin-bottom:16px; }
.shopii-badge { font-size:11px; font-weight:800; color:#04121a; background:var(--grad); padding:3px 11px; border-radius:100px; }
.shopii-logo { height:18px; vertical-align:middle; opacity:.95; }
.rotator { color: var(--emerald); font-weight:700; display:inline-block; min-width:128px; text-align:left; transition:opacity .25s ease, transform .25s ease; }
.lp-track span { display:inline-flex; align-items:center; }
.lp-track span img { width:18px; height:18px; margin-right:8px; }
.nav-profile { width:34px; height:34px; border-radius:50%; border:1px solid var(--border2); background:var(--grad-soft); color:var(--text); font-size:12px; font-weight:800; cursor:pointer; font-family:inherit; letter-spacing:.5px; flex-shrink:0; }
.nav-profile:hover { border-color:var(--emerald); }
.set-row { display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--border); font-size:13.5px; }
.set-row:last-child { border-bottom:none; }
.set-row .v { color:var(--text2); font-weight:600; }
.cmrc-line { display:flex; justify-content:space-between; font-size:13.5px; color:var(--text2); padding:8px 0; }
.cmrc-line.offer { color:var(--emerald); }
.cmrc-line.reward { color:#7fd0f5; }
.cmrc-total { display:flex; justify-content:space-between; font-weight:800; font-size:18px; padding:14px 0 16px; border-top:1px solid var(--border); margin-top:6px; }
.cmrc-btn { width:100%; background:var(--grad); color:#04121a; border:none; border-radius:11px; padding:13px; font-weight:700; font-size:14px; cursor:pointer; font-family:inherit; }
.cmrc-foot { text-align:center; font-size:11px; color:var(--text3); margin-top:12px; }
.ent-uses { margin-top:22px; }
.agency-band { text-align:center; background:linear-gradient(135deg, rgba(79,140,255,.12), rgba(0,224,143,.07)); border:1px solid var(--border2); border-radius:var(--radius-lg); padding:60px 36px; }
.agency-band h2 { font-size:clamp(28px,4.5vw,46px); font-weight:800; letter-spacing:-1.4px; line-height:1.1; }
.agency-band .lp-muted { max-width:640px; margin:18px auto 0; }
.agency-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-top:38px; }
.agency-stats div { display:flex; flex-direction:column; gap:4px; }
.as-n { font-size:30px; font-weight:800; background:var(--grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.as-l { font-size:12px; color:var(--text3); }
.lp-cta-band { text-align:center; padding:72px 30px; background:var(--bg2); border:1px solid var(--border2); border-radius:var(--radius-lg); }
.lp-cta-band h2 { font-size:clamp(30px,5vw,52px); font-weight:900; letter-spacing:-1.6px; }
.lp-cta-band .lp-muted { margin:14px 0 28px; }
.brain-top { border-color:rgba(0,224,143,.3) !important; background:linear-gradient(135deg, rgba(0,224,143,.06), rgba(79,140,255,.04)); }

/* scroll reveal */
.reveal { opacity:0; transform:translateY(22px); transition:opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay:calc(var(--d,0)*90ms); }
.reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .reveal{opacity:1;transform:none;transition:none;} }

/* In-chat Shopii cart / checkout */
.wa-cart { margin-top:8px; background:var(--surface); border:1px solid var(--border2); border-radius:14px; padding:14px; max-width:300px; }
.wa-cart-head { display:flex; align-items:center; justify-content:space-between; font-weight:700; font-size:13px; margin-bottom:8px; }
.wc-line { display:flex; justify-content:space-between; gap:10px; font-size:12.5px; color:var(--text2); padding:4px 0; }
.wc-line.offer { color:var(--emerald); }
.wc-line.reward { color:#7fd0f5; }
.wc-total { display:flex; justify-content:space-between; font-weight:800; font-size:15px; padding:9px 0 11px; border-top:1px solid var(--border); margin-top:5px; }
.wc-btn { width:100%; background:var(--grad); color:#04121a; border:none; border-radius:9px; padding:10px; font-weight:700; font-size:13px; cursor:pointer; font-family:inherit; transition:.18s; }
.wc-btn:hover { box-shadow:0 6px 16px rgba(0,224,143,.3); }
.wc-foot { text-align:center; font-size:10px; color:var(--text3); margin-top:8px; }
.wc-done { text-align:center; padding:8px 4px; }
.wc-done .wc-check { font-size:26px; display:block; margin-bottom:4px; }

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .sys-status { display: none; }
  .brand-sub { display: none; }
  .pillars, .how-row { grid-template-columns: 1fr; }
  .emotion-band { grid-template-columns: 1fr; padding: 28px; }
  .nav-link { padding: 8px 7px; font-size: 12px; }
  .ent-grid { grid-template-columns: 1fr; }
  .split-band { grid-template-columns: 1fr; }
  .split-x { display: none; }
  .steps3, .lp-grid3 { grid-template-columns: 1fr; }
  .emotion2, .commerce-demo { grid-template-columns: 1fr; }
  .agency-stats { grid-template-columns: repeat(2, 1fr); }
  .lp-section { padding: 64px 20px; }
  .lp-hero { padding: 72px 20px 56px; }
}
@media (max-width: 680px) {
  .container { padding: 22px 16px 48px; }
  .topbar { padding: 0 14px; }
  .nav-link { padding: 8px 8px; }
  .form-row { grid-template-columns: 1fr; }
  .product-item { grid-template-columns: 1fr; }
  /* Chat goes full-screen single column */
  .chat-sidebar { display: none; }
  .chat-back { display: block; }
  .chat-h-actions { display: flex; }
  .wa-msg { max-width: 86%; }
  .quick-input-row { flex-direction: column; }
  .quick-input-row .btn-primary { width: 100%; }
  /* Full-screen immersive chat on phones */
  body[data-page="page-chat"] .topbar { display: none; }
  .chat-shell { height: 100dvh; }
  .chat-header { padding: 10px 12px; gap: 10px; }
  .wa-input-area { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .wa-messages { padding: 14px; }
  .page-head { flex-direction: column; }
  .cta-band, .emotion-band { padding: 26px 18px; }
  .topnav .nav-link:not(.nav-strong) { display: none; }
  .agency-band, .lp-cta-band { padding: 40px 22px; }
}
@media (max-width: 400px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-val { font-size: 24px; }
}
