@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ─────────────────────────────────────────
   DESIGN TOKENS — Soraven Theme (Purple/Violet)
───────────────────────────────────────── */
:root {
  --bg:           #f5f0ff;
  --bg-surface:   #faf8ff;
  --bg-elevated:  #ffffff;
  --border:       rgba(124, 58, 237, 0.10);
  --border-strong: rgba(124, 58, 237, 0.20);

  --ink:          #1a0a2e;
  --ink-muted:    #6d5a8a;
  --ink-faint:    #9d8bb5;

  --accent:       #7C3AED;
  --accent-soft:  rgba(124, 58, 237, 0.08);
  --accent-glow:  rgba(124, 58, 237, 0.20);
  --accent-lighter: #A78BFA;
  --accent-dark:  #5B21B6;

  --pink:         #EC4899;
  --pink-soft:    rgba(236, 72, 153, 0.10);
  --pink-glow:    rgba(236, 72, 153, 0.18);

  --amber:        #F59E0B;
  --amber-soft:   rgba(245, 158, 11, 0.12);
  --teal:         #14B8A6;
  --teal-soft:    rgba(20, 184, 166, 0.10);
  --red:          #DC2626;
  --red-soft:     rgba(220, 38, 38, 0.10);

  --shadow-sm:    0 2px 8px rgba(124, 58, 237, 0.07);
  --shadow-md:    0 8px 28px rgba(124, 58, 237, 0.10);
  --shadow-lg:    0 20px 60px rgba(124, 58, 237, 0.14);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sidebar-w: 272px;
  --topbar-h: 64px;

  --font-body: "Poppins", "Inter", "Trebuchet MS", sans-serif;
  --font-display: "Plus Jakarta Sans", "Poppins", Georgia, serif;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:           #0f0a1a;
  --bg-surface:   #1a1230;
  --bg-elevated:  #251c40;
  --border:       rgba(167, 139, 250, 0.10);
  --border-strong: rgba(167, 139, 250, 0.18);

  --ink:          #e8e0f0;
  --ink-muted:    #9485b8;
  --ink-faint:    #6d5a9a;

  --accent:       #A78BFA;
  --accent-soft:  rgba(167, 139, 250, 0.10);
  --accent-glow:  rgba(167, 139, 250, 0.18);
  --accent-lighter: #C4B5FD;
  --accent-dark:  #8B5CF6;

  --pink:         #F472B6;
  --pink-soft:    rgba(244, 114, 182, 0.10);
  --pink-glow:    rgba(244, 114, 182, 0.18);

  --amber:        #FBBF24;
  --amber-soft:   rgba(251, 191, 36, 0.12);
  --teal:         #2DD4BF;
  --teal-soft:    rgba(45, 212, 191, 0.10);
  --red:          #F87171;
  --red-soft:     rgba(248, 113, 113, 0.12);

  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow-md:    0 8px 28px rgba(0, 0, 0, 0.40);
  --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.50);

  color-scheme: dark;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88em;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* ─────────────────────────────────────────
   SHARED COMPONENTS
───────────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { 
  color: var(--accent); 
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  height: var(--topbar-h);
  background: rgba(245, 240, 255, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 0.3s;
}
[data-theme="dark"] .topbar { background: rgba(15, 10, 26, 0.88); }

.topbar-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.topbar-brand:hover { text-decoration: none; color: var(--ink); }

.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--accent-soft);
  transition: transform 0.2s ease;
}
.topbar-brand:hover .topbar-logo {
  transform: scale(1.05);
}

.brand-dot {
  width: 10px; height: 10px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  animation: pulse 2.5s ease infinite;
  flex-shrink: 0;
  display: none;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px var(--accent-glow); }
  50% { box-shadow: 0 0 0 9px transparent; }
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Language toggle ── */
.lang-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: 'SF Mono','Fira Code',monospace;
}
.lang-toggle:hover { 
  color: var(--accent); 
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ─────────────────────────────────────────
   DASHBOARD PAGE
───────────────────────────────────────── */
.noise-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .noise-layer { opacity: 0.04; }

.orb {
  position: fixed; z-index: 0;
  border-radius: 999px; filter: blur(80px); pointer-events: none;
  transition: opacity 0.5s ease;
}
.orb-a {
  width: 500px; height: 500px; top: -140px; left: -100px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.20), transparent 68%);
}
.orb-b {
  width: 380px; height: 380px; bottom: 40px; right: -80px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15), transparent 68%);
}
.orb-c {
  width: 300px; height: 300px; bottom: 50%; right: 30%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 68%);
}
[data-theme="dark"] .orb-a { background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 68%); }
[data-theme="dark"] .orb-b { background: radial-gradient(circle, rgba(244, 114, 182, 0.10), transparent 68%); }
[data-theme="dark"] .orb-c { background: radial-gradient(circle, rgba(196, 181, 253, 0.08), transparent 68%); }

.dash-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column;
}

.dash-main {
  flex: 1;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 80px;
  display: flex; flex-direction: column; gap: 76px;
  position: relative; z-index: 1;
}

/* Hero */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent-soft), var(--pink-soft));
  border: 1px solid var(--accent-glow);
  color: var(--accent);
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 22px;
  animation: fadeUp 0.5s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.96;
  color: var(--ink);
  margin-bottom: 22px;
  animation: fadeUp 0.5s 0.07s ease both;
}
.hero-title em { 
  font-style: normal; 
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.02rem; line-height: 1.78;
  color: var(--ink-muted);
  max-width: 540px; margin-bottom: 32px;
  animation: fadeUp 0.5s 0.14s ease both;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  animation: fadeUp 0.5s 0.21s ease both;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.40); 
  text-decoration: none; 
  color: #fff;
}
[data-theme="dark"] .btn-primary { 
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0f0a1a;
  box-shadow: 0 4px 15px rgba(167, 139, 250, 0.25);
}
[data-theme="dark"] .btn-primary:hover { color: #0f0a1a; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--ink);
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease; text-decoration: none;
}
.btn-secondary:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: var(--accent-soft);
  text-decoration: none; 
}

.btn-secondary-wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(37, 211, 102, 0.25);
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(37, 211, 102, 0.03));
  color: #25D366;
  font-weight: 700; font-size: 0.95rem;
  transition: all 0.2s ease; text-decoration: none;
}
.btn-secondary-wa:hover { 
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.12);
  color: #25D366;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.20);
}

/* Status card */
.status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.5s 0.3s ease both;
  position: sticky; top: 80px;
  backdrop-filter: blur(8px);
}

.status-badge {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.status-indicator {
  width: 11px; height: 11px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  flex-shrink: 0; animation: pulse 2s ease infinite;
}
.status-indicator.offline { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); animation: none; }
.status-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.status-value { font-weight: 700; font-size: 0.9rem; color: var(--ink); margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-item {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color 0.2s ease;
}
.stat-item:hover { border-color: var(--accent-glow); }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em; line-height: 1;
}
.stat-label { font-size: 0.72rem; color: var(--ink-muted); margin-top: 4px; font-weight: 500; }

/* Section header */
.section-eyebrow {
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--amber), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.04em;
  color: var(--ink); margin-bottom: 40px;
}

/* Features grid */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature-card {
  padding: 26px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.feature-card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-md); 
  border-color: var(--accent-glow);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 1.7rem; margin-bottom: 14px; display: flex; align-items: center; color: var(--accent); }
.feature-icon svg { width: 28px; height: 28px; }
.feature-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.02em; }
.feature-desc { font-size: 0.86rem; color: var(--ink-muted); line-height: 1.65; }

/* Category chips */
.category-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: 99px; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--ink);
  font-size: 0.86rem; font-weight: 600;
  transition: all 0.2s ease; text-decoration: none; cursor: pointer;
}
.cat-chip:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: var(--accent-soft); 
  text-decoration: none;
  transform: translateY(-1px);
}
.cat-chip-count {
  padding: 1px 7px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.7rem; font-weight: 700;
  transition: all 0.2s ease;
}
.cat-chip:hover .cat-chip-count { background: var(--accent); color: #fff; }

/* Quick examples */
.examples-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.ex-chip {
  padding: 8px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--ink-muted); font-size: 0.82rem; font-weight: 600;
  font-family: 'SF Mono','Fira Code',monospace;
  transition: all 0.2s ease; text-decoration: none;
}
.ex-chip:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: var(--accent-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Dashboard footer */
.dash-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--ink-faint);
}

/* ─────────────────────────────────────────
   CHAT PAGE
───────────────────────────────────────── */
.chat-page {
  display: flex; height: 100vh; overflow: hidden; flex-direction: column;
}

.chat-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px; height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; z-index: 200;
  transition: background 0.3s;
}

.sidebar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 18px;
  transition: all 0.2s ease; flex-shrink: 0;
}
.sidebar-toggle:hover { 
  color: var(--accent); 
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.chat-topbar .topbar-brand { flex: 1; font-size: 1.05rem; }
.chat-topbar .topbar-logo { width: 32px; height: 32px; border-radius: 8px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-status {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 99px; border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.76rem; font-weight: 600; color: var(--ink-muted);
}
.topbar-status-dot {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--accent); animation: pulse 2s ease infinite;
}
.topbar-status-dot.offline { background: var(--red); animation: none; }

/* Layout */
.chat-body { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
              opacity 0.3s ease,
              transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar.collapsed { width: 0; opacity: 0; pointer-events: none; transform: translateX(-8px); }

.sidebar-inner {
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}

.sidebar-search-wrap {
  padding: 12px 12px 8px;
  flex-shrink: 0; border-bottom: 1px solid var(--border);
}
.sidebar-search {
  width: 100%; padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg); color: var(--ink);
  font-size: 0.86rem; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-search::placeholder { color: var(--ink-faint); }
.sidebar-search:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-elevated);
}

.sidebar-header {
  padding: 12px 14px 6px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.sidebar-count { font-size: 0.7rem; font-weight: 600; color: var(--ink-faint); }

.cat-list { flex: 1; overflow-y: auto; padding: 0 6px 14px; }

.cat-all-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 10px;
  border-radius: var(--r-sm); background: transparent;
  color: var(--ink-muted); font-size: 0.86rem; font-weight: 600;
  transition: all 0.15s ease; margin-bottom: 3px;
}
.cat-all-btn:hover, .cat-all-btn.active { background: var(--accent-soft); color: var(--accent); }
.cat-all-count {
  padding: 2px 7px; border-radius: 99px;
  background: var(--border); color: var(--ink-muted);
  font-size: 0.68rem; font-weight: 700;
  transition: all 0.15s ease;
}
.cat-all-btn.active .cat-all-count { background: var(--accent); color: #fff; }

.cat-item { margin-bottom: 1px; }
.cat-header {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 10px;
  border-radius: var(--r-sm); background: transparent;
  color: var(--ink-muted); font-size: 0.86rem; font-weight: 600;
  transition: all 0.15s ease; text-align: left; cursor: pointer;
}
.cat-header:hover { background: var(--bg); color: var(--ink); }
.cat-header.open { color: var(--ink); }

.cat-icon { font-size: 0.95rem; flex-shrink: 0; display: flex; align-items: center; }
.cat-icon svg { display: block; }
.cat-label { flex: 1; }
.cat-count {
  padding: 2px 7px; border-radius: 99px;
  background: var(--border); color: var(--ink-muted);
  font-size: 0.68rem; font-weight: 700;
  transition: all 0.15s ease;
}
.cat-header.open .cat-count { background: var(--accent-soft); color: var(--accent); }

.cat-chevron {
  font-size: 9px; color: var(--ink-faint);
  transition: transform 0.25s ease; flex-shrink: 0;
  display: flex; align-items: center;
}
.cat-chevron svg { display: block; }
.cat-header.open .cat-chevron { transform: rotate(90deg); }

.cat-dropdown {
  overflow: hidden; max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cat-dropdown.open { max-height: 800px; }

.cmd-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 8px 7px 26px;
  border-radius: var(--r-sm); background: transparent;
  color: var(--ink-muted); font-size: 0.8rem; font-weight: 500;
  transition: all 0.15s ease; text-align: left; cursor: pointer;
}
.cmd-btn:hover { background: var(--bg); color: var(--ink); }
.cmd-btn-name {
  font-family: 'SF Mono','Fira Code',monospace;
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent); flex-shrink: 0;
}
.cmd-btn.limited .cmd-btn-name { color: var(--amber); }
.cmd-btn-help {
  font-size: 0.71rem; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}

/* Main chat */
.chat-main {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: var(--bg);
  transition: background 0.3s;
}

.messages-area {
  flex: 1; overflow-y: auto;
  padding: 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Bubbles */
.chat-bubble {
  display: flex; flex-direction: column;
  max-width: 680px;
  animation: fadeUp 0.28s ease both;
}
.chat-bubble.user { align-self: flex-end; align-items: flex-end; }
.chat-bubble.bot, .chat-bubble.notice, .chat-bubble.error { align-self: flex-start; align-items: flex-start; }

.bubble-meta {
  font-size: 0.69rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 5px;
}

.bubble-body {
  padding: 13px 17px;
  border-radius: var(--r-lg);
  font-size: 0.91rem; line-height: 1.65;
  word-break: break-word;
}
.chat-bubble.bot .bubble-body {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-bubble.user .bubble-body {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
}
[data-theme="dark"] .chat-bubble.user .bubble-body {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0f0a1a;
}
.chat-bubble.notice .bubble-body {
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: var(--amber);
}
[data-theme="dark"] .chat-bubble.notice .bubble-body { border-color: rgba(251, 191, 36, 0.2); }
.chat-bubble.error .bubble-body {
  background: var(--red-soft);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: var(--red);
}

.bubble-pre {
  white-space: pre-wrap; word-break: break-word;
  font-family: var(--font-body); font-size: inherit; line-height: inherit;
}

.bubble-preview, .bubble-media {
  margin-top: 10px; padding: 12px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--bg); display: grid; gap: 8px;
}
.bubble-preview img, .bubble-media img, .bubble-media video { max-width: 100%; border-radius: 8px; }
.bubble-preview a, .bubble-media a { color: var(--teal); font-weight: 600; }

/* Quick chips */
.quick-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 28px 0; flex-shrink: 0;
}
.quick-chip {
  padding: 6px 13px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--ink-muted); font-size: 0.78rem; font-weight: 600;
  font-family: 'SF Mono','Fira Code',monospace;
  transition: all 0.15s ease;
}
.quick-chip:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Input bar */
.input-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex; align-items: flex-end; gap: 10px;
  flex-shrink: 0;
  transition: background 0.3s;
}

.cmd-textarea {
  flex: 1; min-height: 46px; max-height: 180px;
  padding: 12px 15px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink); font-size: 0.91rem;
  resize: none; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
}
.cmd-textarea::placeholder { color: var(--ink-faint); }
.cmd-textarea:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.send-btn {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 18px; flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
[data-theme="dark"] .send-btn { 
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #0f0a1a;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.20);
}
.send-btn:hover { 
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}
.send-btn:disabled { opacity: 0.45; transform: none; cursor: wait; }

.reload-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 13px; height: 46px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--ink-muted);
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; transition: all 0.15s ease; flex-shrink: 0;
}
.reload-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.input-hint {
  padding: 5px 18px 8px;
  font-size: 0.69rem; color: var(--ink-faint); flex-shrink: 0;
}

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: center; gap: 5px;
  padding: 13px 17px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); border-bottom-left-radius: 4px;
  width: fit-content;
}
.typing-dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: var(--accent);
  animation: typeBounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes typeBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; top: var(--topbar-h);
  background: rgba(15, 10, 26, 0.50);
  z-index: 299; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.visible { opacity: 1; pointer-events: all; }

/* ─────────────────────────────────────────
   AUTH MODAL
───────────────────────────────────────── */
.auth-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 10, 26, 0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.auth-overlay.open { display: flex; }

.auth-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: min(400px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  animation: slideUp 0.25s ease;
}

.auth-modal * {
  box-sizing: border-box;
}

.auth-close {
  float: right;
  width: 32px; height: 32px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
  cursor: pointer;
}
.auth-close:hover { border-color: var(--red); color: var(--red); }

.auth-title {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800;
  color: var(--ink); margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.auth-tabs {
  display: flex; gap: 0;
  margin-bottom: 24px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.auth-tab {
  flex: 1; padding: 10px;
  text-align: center;
  font-weight: 600; font-size: 0.86rem;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-tab.active {
  background: var(--accent);
  color: #fff;
}
.auth-tab:hover:not(.active) {
  background: var(--accent-soft);
  color: var(--accent);
}

.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 5px;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.auth-google-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.auth-google-icon { font-size: 1.2rem; }

.auth-submit {
  width: 100%; padding: 13px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700; font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}
.auth-submit:disabled { opacity: 0.5; transform: none; cursor: wait; }

.auth-error {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.82rem;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }

.auth-success {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.82rem;
  margin-bottom: 14px;
  display: none;
}
.auth-success.show { display: block; }

/* ─────────────────────────────────────────
   PROFILE MODAL
───────────────────────────────────────── */
.profile-modal {
  padding: 0 !important;
  overflow: hidden;
  width: min(420px, calc(100vw - 32px));
}

.profile-header {
  text-align: center;
  padding: 36px 28px 24px;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  position: relative;
}

.profile-modal .auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  float: none;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md);
  animation: fadeUp 0.4s ease both;
}
.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-initial {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-display);
}

.profile-name-large {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  animation: fadeUp 0.4s 0.07s ease both;
}

.profile-role-badge {
  display: inline-block;
  padding: 4px 14px;
  margin-top: 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: fadeUp 0.4s 0.14s ease both;
}
[data-theme="dark"] .profile-role-badge {
  color: #0f0a1a;
}

.profile-body {
  padding: 8px 28px 28px;
}

.profile-loading,
.profile-error {
  text-align: center;
  padding: 28px;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.profile-error {
  color: var(--red);
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.3s ease both;
}
.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.profile-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.profile-row-highlight .profile-value {
  color: var(--red);
}

/* ── Profile edit mode ── */
.profile-actions {
  margin-top: 16px;
}

.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.profile-edit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.avatar-edit-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.profile-avatar-large {
  position: relative;
}

.profile-edit-footer {
  display: flex;
  gap: 10px;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.profile-cancel-btn {
  padding: 11px 22px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.profile-cancel-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.profile-save-btn {
  padding: 11px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: all 0.15s ease;
}
.profile-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}
.profile-save-btn:disabled {
  opacity: 0.5;
  transform: none;
  cursor: wait;
}
[data-theme="dark"] .profile-save-btn { color: #0f0a1a; }

.profile-name-input {
  width: 100%;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 2px solid var(--accent);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-name-input:focus {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.profile-edit-field {
  margin-bottom: 10px;
}
.profile-edit-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 5px;
}
.profile-url-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.86rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.profile-upload-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.profile-upload-row .profile-url-input {
  flex: 1;
}

.profile-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.profile-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.profile-edit-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 5px;
}

.profile-saved-toast {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 99px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.3s ease both;
  white-space: nowrap;
  z-index: 10;
}

/* ── User avatar in topbar ── */
.user-avatar-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.user-avatar-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.user-name {
  font-size: 0.78rem; font-weight: 600;
  color: var(--ink);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 500;
  overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  border: none; background: transparent;
  color: var(--ink); font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
}
.user-dropdown button:hover { background: var(--accent-soft); color: var(--accent); }
.user-dropdown .danger-btn:hover { background: var(--red-soft); color: var(--red); }

/* ─────────────────────────────────────────
   CONTEXTUAL INPUT (Downloader / Game modes)
───────────────────────────────────────── */
.context-bar {
  display: none;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
  align-items: center; gap: 10px;
  transition: background 0.3s;
}
.context-bar.active { display: flex; }

.context-label {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.context-url-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.context-url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.context-url-input::placeholder { color: var(--ink-faint); }

.context-action-btn {
  padding: 10px 20px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700; font-size: 0.88rem;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.20);
  transition: all 0.15s ease;
}
.context-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.30);
}
[data-theme="dark"] .context-action-btn { color: #0f0a1a; }

/* Game mode selector */
.context-game-wrap {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.context-game-btn {
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.context-game-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.context-game-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
[data-theme="dark"] .context-game-btn.selected { color: #0f0a1a; }

.context-game-start {
  padding: 8px 20px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700; font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.20);
}
.context-game-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.30);
}
[data-theme="dark"] .context-game-start { color: #0f0a1a; }

/* SVG icon sizing in buttons */
button svg {
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Empty state */
.empty-state {
  padding: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--ink-faint);
  text-align: center; font-size: 0.875rem;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 920px) {
  .hero-section { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .status-card { position: static; }
}

@media (max-width: 640px) {
  .dash-main { padding: 36px 0 56px; gap: 52px; }
  .features-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; height: 56px; }
  .topbar-logo { width: 30px; height: 30px; }
  .dash-footer { flex-direction: column; gap: 6px; text-align: center; }

  .sidebar {
    position: fixed; left: 0; top: var(--topbar-h); bottom: 0;
    z-index: 300; box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay { display: block; }
  .messages-area { padding: 16px; }
  .quick-chips { padding: 8px 16px 0; }
  .input-bar { padding: 10px 14px; }
}
