/* ═══════════════════════════════════════════
   ClosingAI Agent — main.css
   App-like, clean dark SaaS aesthetic
   Font: Syne (display) + Plus Jakarta Sans (body)
═══════════════════════════════════════════ */

:root {
  --bg:        #080b12;
  --bg2:       #0d1120;
  --surface:   #111827;
  --surface2:  #1a2235;
  --surface3:  #202d44;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --accent:    #3b82f6;
  --accent2:   #60a5fa;
  --accent3:   #10b981;
  --danger:    #ef4444;
  --warning:   #f59e0b;
  --text:      #f1f5f9;
  --text2:     #94a3b8;
  --text3:     #4b5563;
  --glow:      rgba(59,130,246,0.25);
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-disp: 'Syne', sans-serif;
  --sidebar-w: 240px;
  --topbar-h:  64px;
  --radius:    12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ─── BUTTONS ─── */
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-solid:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 20px var(--glow); color: #fff; }
.btn-solid.lg { padding: 14px 32px; font-size: 15px; border-radius: var(--radius); }
.btn-solid.full { width: 100%; }
.btn-solid.sm { padding: 7px 14px; font-size: 13px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--text2);
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border2); cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }
.btn-ghost.sm { padding: 6px 14px; font-size: 13px; }

/* ─── FORMS ─── */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 12px; font-weight: 700; color: var(--text2); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 7px; }
.form-field input,
.form-field textarea,
.form-field select,
.full-select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  outline: none; transition: border-color .2s; resize: vertical;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .full-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text3); }
.form-field select option, .full-select option { background: var(--bg2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field .req { color: var(--accent); }
.field-hint { font-size: 12px; color: var(--text3); margin-top: 6px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 40px; }
.pass-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; opacity: .6; }
.pass-toggle:hover { opacity: 1; }

/* ─── ALERTS ─── */
.auth-alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.auth-alert.error   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.auth-alert.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }

.info-banner {
  background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2);
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--accent2); margin-bottom: 16px;
}

/* ─── LANDING PAGE NAV ─── */
.app-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 48px;
  background: rgba(8,11,18,0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-disp); font-size: 18px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.nav-brand em { font-style: normal; color: var(--accent2); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text2); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-auth { display: flex; gap: 10px; align-items: center; }

/* Brand icon */
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px;
}
.brand-icon span {
  display: block; border-radius: 2px;
  background: rgba(255,255,255,0.9);
}
.brand-icon span:last-child { grid-column: span 2; }
.brand-icon.sm { width: 26px; height: 26px; padding: 5px; border-radius: 6px; }

/* ─── LANDING HERO ─── */
.lp-hero {
  min-height: 100vh; padding: 100px 48px 80px;
  position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; top: -200px; right: -200px;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.lp-hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 24px;
  background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2);
  padding: 5px 12px; border-radius: 100px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent3); box-shadow: 0 0 8px var(--accent3);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.lp-hero-text h1 {
  font-family: var(--font-disp); font-size: clamp(40px, 5vw, 72px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-hero-text p { font-size: 17px; color: var(--text2); line-height: 1.7; margin-bottom: 32px; max-width: 440px; }
.hero-cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.hero-stat-row { display: flex; align-items: center; gap: 12px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-family: var(--font-disp); font-size: 18px; color: var(--text); }
.hero-stat span { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-sep { color: var(--text3); font-size: 18px; }

/* ─── CHAT PREVIEW ─── */
.chat-preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.chat-preview-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  background: var(--surface2);
}
.cp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.cp-name { font-size: 14px; font-weight: 700; }
.cp-status { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 4px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent3); box-shadow: 0 0 6px var(--accent3); }
.chat-preview-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; }

.chat-msg {
  max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5;
  opacity: 0; animation: msgIn .4s ease forwards;
}
.chat-msg.agent { background: var(--surface2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user  { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-msg.typing-delay-1 { animation-delay: .8s; }
.chat-msg.typing-delay-2 { animation-delay: 1.8s; }
.chat-msg.typing-delay-3 { animation-delay: 2.6s; }

.chat-typing {
  display: flex; gap: 4px; align-items: center; padding: 10px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; border-bottom-left-radius: 4px;
  width: fit-content; align-self: flex-start;
  opacity: 0; animation: msgIn .3s 3.2s ease forwards;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text3);
  animation: typingBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typingBounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

.chat-preview-badge {
  padding: 12px 20px; background: rgba(16,185,129,0.08);
  border-top: 1px solid rgba(16,185,129,0.15);
  font-size: 12px; color: var(--accent3); text-align: center; font-weight: 600;
}

/* ─── INTEGRATIONS BAR ─── */
.integrations-bar {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg2); padding: 20px 48px;
  display: flex; align-items: center; gap: 24px; justify-content: center;
  flex-wrap: wrap;
}
.integrations-bar > span { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
.int-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.int-pill {
  background: var(--surface); border: 1px solid var(--border2);
  padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--text2);
}

/* ─── LANDING SECTIONS ─── */
.lp-how, .lp-features { padding: 100px 48px; }
.lp-how { background: var(--bg2); }
.container { max-width: 1100px; margin: 0 auto; }
.center { text-align: center; }

.section-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent2);
  background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 16px;
}
.lp-title {
  font-family: var(--font-disp); font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 48px;
}

.steps-grid { display: flex; align-items: center; gap: 0; justify-content: center; }
.step-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 32px 28px;
  flex: 1; max-width: 300px; position: relative;
  transition: border-color .25s, transform .25s;
}
.step-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-4px); }
.step-num {
  font-family: var(--font-disp); font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 12px;
}
.step-icon { font-size: 32px; margin-bottom: 12px; }
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.step-card p { font-size: 13px; color: var(--text2); line-height: 1.7; }
.step-arrow { font-size: 24px; color: var(--text3); padding: 0 16px; flex-shrink: 0; }

/* ─── BENTO GRID ─── */
.feat-bento {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.bento-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 28px;
  transition: border-color .25s, transform .2s;
}
.bento-card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-3px); }
.bento-wide { grid-column: span 2; }
.bento-accent { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(16,185,129,0.05)); border-color: rgba(59,130,246,0.25); }
.bento-icon { font-size: 28px; margin-bottom: 14px; }
.bento-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.bento-card p { font-size: 13px; color: var(--text2); line-height: 1.7; }
.bento-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent2);
  background: rgba(59,130,246,0.1); padding: 4px 10px; border-radius: 100px; margin-top: 12px;
}

/* ─── LANDING CTA ─── */
.lp-cta {
  padding: 100px 48px; background: var(--bg2);
  border-top: 1px solid var(--border); text-align: center;
}
.lp-cta p { font-size: 16px; color: var(--text2); max-width: 400px; margin: 0 auto; }

/* ─── APP FOOTER (landing) ─── */
.app-footer {
  border-top: 1px solid var(--border); padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand a { font-family: var(--font-disp); font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; }
.footer-brand span { font-size: 13px; color: var(--text3); }
.footer-copy { font-size: 12px; color: var(--text3); }

/* ─── AUTH PAGES ─── */
.auth-page {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-left {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 60px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; top: -100px; left: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.08), transparent 70%);
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-disp); font-size: 17px; font-weight: 700; color: var(--text);
  text-decoration: none; position: relative; z-index: 1;
}
.auth-tagline { position: relative; z-index: 1; }
.auth-tagline h2 { font-family: var(--font-disp); font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 14px; }
.auth-tagline p { font-size: 15px; color: var(--text2); line-height: 1.7; }
.auth-left-deco { display: flex; gap: 24px; position: relative; z-index: 1; }
.deco-stat { display: flex; flex-direction: column; gap: 2px; }
.deco-stat strong { font-family: var(--font-disp); font-size: 28px; color: var(--accent2); }
.deco-stat span { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.auth-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.af-item { font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.af-check { color: var(--accent3); font-weight: 700; }

.auth-right {
  display: flex; align-items: center; justify-content: center; padding: 60px 48px;
  background: var(--bg);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-family: var(--font-disp); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text2); margin-bottom: 28px; }
.auth-sub a { color: var(--accent2); }
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-tos { font-size: 12px; color: var(--text3); text-align: center; margin-top: 12px; line-height: 1.6; }
.auth-tos a { color: var(--text3); text-decoration: underline; }

/* ─── APP SHELL (dashboard) ─── */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 22px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-disp); font-size: 16px; font-weight: 700; color: var(--text);
}
.sidebar-nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.snav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: all .15s; text-decoration: none;
}
.snav-item:hover { background: var(--surface2); color: var(--text); }
.snav-item.active { background: rgba(59,130,246,0.12); color: var(--accent2); font-weight: 700; }
.snav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-bottom {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.credit-badge {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius-sm);
}
.cb-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }
.cb-val { font-size: 15px; font-weight: 800; color: var(--accent3); font-family: var(--font-disp); }
.sidebar-ext { font-size: 12px; color: var(--text3); text-align: center; transition: color .2s; }
.sidebar-ext:hover { color: var(--text2); }

.sidebar-toggle {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 16px; cursor: pointer; color: var(--text);
}

.app-main {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}
.app-topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h); padding: 0 32px;
  background: rgba(8,11,18,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.page-title { font-family: var(--font-disp); font-size: 20px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text2); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}

/* ─── VIEWS ─── */
.view { display: none; padding: 32px; flex: 1; }
.view.active { display: block; }
.view-header { margin-bottom: 28px; }
.view-header h2 { font-family: var(--font-disp); font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.view-header p { font-size: 14px; color: var(--text2); }

/* ─── STATS GRID ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 20px 24px;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-2px); }
.stat-card.loading { opacity: .5; }
.sc-icon { font-size: 22px; margin-bottom: 8px; }
.sc-val { font-family: var(--font-disp); font-size: 32px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.sc-label { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── DASH GRID ─── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 24px;
}
.dash-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }
.panel-head {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head h3 { font-size: 15px; font-weight: 700; }

.empty-state { padding: 40px; text-align: center; }
.es-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state p { font-size: 13px; color: var(--text3); }

/* Agent list items */
.agent-item {
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .15s;
}
.agent-item:hover { background: rgba(255,255,255,0.02); }
.agent-item:last-child { border-bottom: none; }
.ai-info { display: flex; flex-direction: column; gap: 2px; }
.ai-name { font-size: 14px; font-weight: 700; }
.ai-channel { font-size: 11px; color: var(--text3); }
.ai-status {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
}
.ai-status.inactive { background: rgba(75,85,99,0.3); color: var(--text3); }
.ai-status.active { background: rgba(16,185,129,0.15); color: var(--accent3); }

/* Conversation list */
.conv-item {
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  transition: background .15s;
}
.conv-item:hover { background: rgba(255,255,255,0.02); }
.conv-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--surface2);
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.conv-info { flex: 1; min-width: 0; }
.conv-contact { font-size: 13px; font-weight: 700; }
.conv-last { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 11px; color: var(--text3); }
.conv-badge {
  font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 100px;
}
.conv-badge.closing { background: rgba(16,185,129,0.15); color: var(--accent3); }
.conv-badge.open { background: rgba(59,130,246,0.15); color: var(--accent2); }

/* ─── ANALISA VIEW ─── */
.analisa-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.persona-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.ptab-btn {
  padding: 8px 18px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border2);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all .2s;
}
.ptab-btn.active { background: rgba(59,130,246,0.12); border-color: var(--accent); color: var(--accent2); }
.persona-panel { }
.persona-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 20px; }
.persona-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.persona-row .pr-key { color: var(--text3); }
.persona-row .pr-val { font-weight: 600; text-align: right; max-width: 60%; }
.persona-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.persona-tag { background: var(--surface2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 100px; font-size: 11px; color: var(--text2); }
.analisa-section { margin-top: 20px; }
.analisa-section h4 { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.strategi-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 16px; font-size: 13px; color: var(--text2); line-height: 1.7; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); padding: 5px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--accent2); }
.objeksi-list { display: flex; flex-direction: column; gap: 10px; }
.objeksi-item { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 14px; }
.obj-q { font-size: 13px; font-weight: 700; color: var(--warning); margin-bottom: 6px; }
.obj-a { font-size: 13px; color: var(--text2); line-height: 1.6; }
.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.result-head h3 { font-size: 16px; font-weight: 700; }
.result-actions { margin-top: 24px; }

/* ─── SETUP VIEW ─── */
.setup-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.setup-steps { display: flex; flex-direction: column; gap: 4px; }
.setup-step {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
}
.setup-step:hover { background: var(--surface2); }
.setup-step.active { background: rgba(59,130,246,0.08); border-color: var(--accent); }
.ss-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.setup-step.active .ss-num { background: var(--accent); color: #fff; }
.ss-info strong { display: block; font-size: 13px; font-weight: 700; }
.ss-info small { font-size: 11px; color: var(--text3); }
.setup-panel { display: none; }
.setup-panel.active { display: block; }
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

.channel-select { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.ch-opt {
  padding: 16px; border: 1px solid var(--border2); border-radius: var(--radius-sm);
  cursor: pointer; text-align: center; transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ch-opt:hover { border-color: rgba(59,130,246,0.4); }
.ch-opt.active { background: rgba(59,130,246,0.08); border-color: var(--accent); }
.ch-icon { font-size: 24px; }
.ch-opt strong { font-size: 13px; display: block; }
.ch-opt small { font-size: 11px; color: var(--text3); }

.config-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.config-section-title { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }

.review-summary { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.rv-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.rv-label { color: var(--text3); flex-shrink: 0; }
.rv-val { font-weight: 600; text-align: right; max-width: 65%; word-break: break-word; }

/* ─── TEST VIEW ─── */
.test-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; height: calc(100vh - var(--topbar-h) - 100px); }
.test-config { display: flex; flex-direction: column; gap: 0; overflow-y: auto; }
.agent-info-box { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; font-size: 13px; color: var(--text2); line-height: 1.6; }
.tips-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tips-list li { font-size: 13px; color: var(--text2); padding-left: 12px; position: relative; }
.tips-list li::before { content: '·'; position: absolute; left: 0; color: var(--accent); }
.full-width { width: 100%; }

.test-chat-area { display: flex; flex-direction: column; border: 1px solid var(--border2); border-radius: var(--radius); overflow: hidden; }
.chat-window { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg2); }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text3); }
.ce-icon { font-size: 40px; margin-bottom: 12px; }
.chat-empty p { font-size: 14px; line-height: 1.6; }

.msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.msg-bubble.agent { background: var(--surface); border: 1px solid var(--border2); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-bubble.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-time { font-size: 11px; opacity: .5; margin-top: 4px; }

.chat-input-area {
  padding: 16px; background: var(--surface); border-top: 1px solid var(--border);
  display: flex; gap: 10px;
}
.chat-input-area input {
  flex: 1; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px;
  padding: 11px 16px; font-family: var(--font-body); font-size: 14px; color: var(--text); outline: none;
}
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area input::placeholder { color: var(--text3); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 10px; background: var(--accent);
  border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: #2563eb; }
.chat-send-btn:disabled { background: var(--surface3); cursor: not-allowed; }
.chat-input-area input:disabled { opacity: .5; cursor: not-allowed; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .lp-hero { text-align: center; }
  .hero-cta { align-items: center; }
  .hero-stat-row { justify-content: center; }
  .lp-hero-text p { margin: 0 auto 32px; }
  .steps-grid { flex-direction: column; gap: 16px; }
  .step-arrow { transform: rotate(90deg); }
  .feat-bento { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: span 2; }
  .analisa-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .lp-how, .lp-features, .lp-cta { padding: 72px 24px; }
  .integrations-bar { padding: 16px 24px; }
  .app-footer { padding: 24px; flex-direction: column; text-align: center; }

  .app-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .setup-layout { grid-template-columns: 1fr; }
  .test-layout { grid-template-columns: 1fr; height: auto; }
  .form-row { grid-template-columns: 1fr; }
  .channel-select { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 40px 24px; }
  .feat-bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
