@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');
/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --text-xs: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.875rem, 0.84rem + 0.18vw, 0.9375rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);

  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  --sidebar-width: 260px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================
   DARK THEME (DEFAULT)
   ============================================ */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-surface: #1a1a1a;
  --bg-surface-2: #222222;
  --bg-surface-3: #2a2a2a;
  --bg-surface-hover: #303030;
  --bg-elevated: #333333;

  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --text-faint: #555555;

  --border-color: rgba(255,255,255,0.04);
  --border-color-strong: rgba(255,255,255,0.08);

  --accent-gold: #d4a017;
  --accent-gold-hover: #e8b830;
  --accent-gold-dim: rgba(212,160,23,0.15);
  --accent-blue: #3b82f6;
  --accent-blue-dim: rgba(59,130,246,0.15);
  --accent-purple: #7c3aed;
  --accent-purple-dim: rgba(124,58,237,0.15);
  --accent-green: #22c55e;
  --accent-green-dim: rgba(34,197,94,0.15);
  --accent-red: #ef4444;
  --accent-red-dim: rgba(239,68,68,0.15);
  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245,158,11,0.15);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.15);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.2);

  --scrollbar-track: #1a1a1a;
  --scrollbar-thumb: #333;
}

/* ============================================
   VERTICAL ACCENT COLORS
   ============================================ */
[data-active-vertical="search"]  { --v-accent: #06b6d4; --v-accent-dim: rgba(6,182,212,0.12); --v-accent-name: 'teal'; }
[data-active-vertical="sports"]  { --v-accent: #22c55e; --v-accent-dim: rgba(34,197,94,0.12); --v-accent-name: 'green'; }
[data-active-vertical="finance"] { --v-accent: #f59e0b; --v-accent-dim: rgba(245,158,11,0.12); --v-accent-name: 'gold'; }
[data-active-vertical="realestate"] { --v-accent: #3b82f6; --v-accent-dim: rgba(59,130,246,0.12); --v-accent-name: 'blue'; }
[data-active-vertical="medical"] { --v-accent: #ef4444; --v-accent-dim: rgba(239,68,68,0.12); --v-accent-name: 'red'; }
[data-active-vertical="tech"]    { --v-accent: #8b5cf6; --v-accent-dim: rgba(139,92,246,0.12); --v-accent-name: 'purple'; }
[data-active-vertical="news"]    { --v-accent: #e5e7eb; --v-accent-dim: rgba(229,231,235,0.08); --v-accent-name: 'white'; }
/* Default fallback */
:root { --v-accent: #06b6d4; --v-accent-dim: rgba(6,182,212,0.12); }

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --bg-primary: #f8f8f8;
  --bg-secondary: #f0f0f0;
  --bg-surface: #ffffff;
  --bg-surface-2: #f5f5f5;
  --bg-surface-3: #ebebeb;
  --bg-surface-hover: #e5e5e5;
  --bg-elevated: #ffffff;

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-faint: #bbbbbb;

  --border-color: rgba(0,0,0,0.03);
  --border-color-strong: rgba(0,0,0,0.08);

  --accent-gold: #b8860b;
  --accent-gold-hover: #d4a017;
  --accent-gold-dim: rgba(184,134,11,0.1);
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37,99,235,0.1);
  --accent-purple: #6d28d9;
  --accent-purple-dim: rgba(109,40,217,0.1);
  --accent-green: #16a34a;
  --accent-green-dim: rgba(22,163,74,0.1);
  --accent-red: #dc2626;
  --accent-red-dim: rgba(220,38,38,0.1);
  --accent-amber: #d97706;
  --accent-amber-dim: rgba(217,119,6,0.1);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);

  --scrollbar-track: #f0f0f0;
  --scrollbar-thumb: #ccc;
}

/* ============================================
   BASE RESET & GLOBALS
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: var(--text-sm); line-height: 1.5; color: var(--text-primary); background: var(--bg-primary); overflow: hidden; height: 100vh; width: 100vw; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.8)} }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.skeleton { background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface-3) 50%, var(--bg-surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }

/* ============================================
   APP SHELL
   ============================================ */
.app-shell { display: flex; height: 100vh; width: 100vw; overflow: hidden; position: relative; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { width: var(--sidebar-width); min-width: var(--sidebar-width); height: 100vh; background: var(--bg-secondary); border-right: none; display: flex; flex-direction: column; transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-normal) var(--ease-out); z-index: 100; overflow: hidden; }
.sidebar-header { padding: var(--space-5) var(--space-5) var(--space-3); flex-shrink: 0; }
.sidebar-logo { display: flex; align-items: center; gap: 11px; margin-bottom: var(--space-1); cursor: pointer; transition: opacity 0.2s; }
.sidebar-logo:hover { opacity: 0.88; }
.sidebar-logo-icon { height: 40px; width: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: none; background: transparent; }
.sidebar-logo-text-wrap { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.sidebar-logo-text { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 20px; font-weight: 700; color: var(--accent-gold); letter-spacing: -0.035em; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.sidebar-logo-tm { font-size: 7px; color: rgba(212,160,23,0.6); vertical-align: super; font-weight: 400; letter-spacing: 0.02em; }
.sidebar-logo-labs { font-family: 'Orbitron', sans-serif; font-size: 10.5px; font-weight: 600; letter-spacing: 0.32em; color: var(--accent-green); text-transform: uppercase; line-height: 1; text-shadow: 0 0 18px var(--accent-green-glow), 0 0 6px rgba(57,255,20,0.12); margin-top: 1px; }
.sidebar-tagline { font-family: 'Inter', -apple-system, sans-serif; font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; margin-top: 2px; -webkit-font-smoothing: antialiased; }
.new-chat-btn { display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: var(--space-2) var(--space-3); margin-top: var(--space-3); background: var(--accent-gold-dim); color: var(--accent-gold); border: none; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 500; transition: all var(--duration-fast) var(--ease-out); }
.new-chat-btn:hover { background: rgba(212,160,23,0.25); }
.new-chat-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--space-2) var(--space-2); overscroll-behavior: contain; }
.nav-section-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; padding: var(--space-3) var(--space-3) var(--space-1); }
.nav-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-secondary); transition: all var(--duration-fast) var(--ease-out); cursor: pointer; position: relative; }
.nav-item:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.nav-item.active { background: var(--bg-surface); color: var(--text-primary); font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; color: var(--accent-gold); }
.nav-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: var(--radius-full); background: var(--accent-gold); color: #000; letter-spacing: 0.04em; margin-left: auto; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.03); margin: var(--space-2) var(--space-3); }
.recent-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--text-muted); cursor: pointer; transition: all var(--duration-fast) var(--ease-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item:hover { color: var(--text-secondary); background: var(--bg-surface); }

.sidebar-footer { padding: var(--space-3) var(--space-4); border-top: none; flex-shrink: 0; }
.user-profile { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-md); cursor: pointer; transition: background var(--duration-fast) var(--ease-out); }
.user-profile:hover { background: var(--bg-surface); }
.user-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--accent-gold), #b8860b); display: flex; align-items: center; justify-content: center; font-size: var(--text-xs); font-weight: 700; color: #000; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: var(--text-sm); font-weight: 500; }
.user-plan-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); background: var(--accent-gold); color: #000; letter-spacing: 0.04em; margin-left: var(--space-2); vertical-align: middle; }
.user-settings { padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); transition: color var(--duration-fast); }
.user-settings:hover { color: var(--text-primary); }
.user-settings svg { width: 16px; height: 16px; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.sidebar-overlay.open { display: block; }

/* v8.8.1 — Sidebar Collapse (Desktop + PWA) */
.sidebar-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-1); }
.sidebar-collapse-btn { background: none; border: none; color: var(--text-muted); padding: 4px; border-radius: var(--radius-sm); cursor: pointer; transition: color 0.2s, background 0.2s; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sidebar-collapse-btn:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
.sidebar-expand-btn { display: none; position: absolute; top: 14px; left: 12px; z-index: 101; background: var(--bg-surface, #1a1a1a); border: 1px solid var(--border-subtle, #1e1e1e); color: var(--text-secondary); padding: 6px; border-radius: var(--radius-md); cursor: pointer; transition: color 0.2s, background 0.2s; }
.sidebar-expand-btn:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
.app-shell.sidebar-collapsed .sidebar { width: 0; min-width: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: width 0.3s var(--ease-out), min-width 0.3s var(--ease-out), opacity 0.2s var(--ease-out); }
.app-shell.sidebar-collapsed .sidebar-expand-btn { display: flex; }
.app-shell.sidebar-collapsed .topbar { padding-left: 52px; }
.app-shell.sidebar-collapsed .builder-topbar { padding-left: 52px; }
.sidebar { transition: width 0.3s var(--ease-out), min-width 0.3s var(--ease-out), opacity 0.2s var(--ease-out), transform var(--duration-normal) var(--ease-out); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-5); border-bottom: none; flex-shrink: 0; height: 52px; gap: var(--space-3); }
.topbar-left { display: flex; align-items: center; gap: var(--space-3); }
.hamburger-btn { display: none; padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-secondary); transition: color var(--duration-fast); }
.hamburger-btn:hover { color: var(--text-primary); }
.hamburger-btn svg { width: 20px; height: 20px; }
.topbar-breadcrumb { font-size: var(--text-sm); color: var(--text-secondary); font-weight: 500; }
.topbar-breadcrumb span { color: var(--v-accent); }
.topbar-right { display: flex; align-items: center; gap: var(--space-3); }
.compute-meter { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); background: var(--bg-surface); border: none; border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-secondary); }
.compute-bar-wrap { width: 48px; height: 4px; background: var(--bg-surface-3); border-radius: 2px; overflow: hidden; }
.compute-bar-fill { height: 100%; width: 62%; background: var(--accent-gold); border-radius: 2px; transition: width var(--duration-slow) var(--ease-out); }
.theme-toggle { padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); transition: color var(--duration-fast); }
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.topbar-avatar { width: 28px; height: 28px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--accent-gold), #b8860b); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #000; cursor: pointer; }

/* ============================================
   VIEWS (shared)
   ============================================ */
.view { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.view.active { display: flex; }
.app-footer { text-align: center; font-size: var(--text-xs); color: var(--text-faint); padding: var(--space-3) var(--space-4); flex-shrink: 0; }
.app-footer a { color: var(--text-muted); transition: color var(--duration-fast); }
.app-footer a:hover { color: var(--accent-gold); }

/* ============================================
   DISCOVER FEED VIEW (MAIN CHAT/VERTICAL)
   ============================================ */
.chat-view { position: relative; }

/* (old market-ticker-bar removed — replaced by universal .ticker-banner) */

/* Discover feed area */
.discover-area { flex: 1; overflow-y: auto; padding: var(--space-6) var(--space-5); }
.discover-area.hidden { display: none; }
.discover-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); max-width: 900px; margin: 0 auto; }
.discover-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-5); cursor: pointer; transition: all var(--duration-fast) var(--ease-out); animation: fadeIn 0.3s var(--ease-out); }
.discover-card:hover { background: var(--bg-surface-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.discover-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.discover-card-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); background: var(--v-accent-dim); color: var(--v-accent); text-transform: uppercase; letter-spacing: 0.04em; }
.discover-card-time { font-size: var(--text-xs); color: var(--text-faint); }
.discover-card-title { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.discover-card-summary { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; margin-bottom: var(--space-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.discover-card-sources { font-size: 10px; color: var(--text-faint); font-weight: 500; display: flex; align-items: center; gap: var(--space-1); }
.discover-card-sources svg { width: 12px; height: 12px; }

/* Skeleton cards */
.discover-skeleton { background: var(--bg-surface); border: none; border-radius: var(--radius-lg); padding: var(--space-5); }
.discover-skeleton .skel-badge { width: 60px; height: 18px; margin-bottom: var(--space-3); }
.discover-skeleton .skel-title { width: 80%; height: 16px; margin-bottom: var(--space-2); }
.discover-skeleton .skel-title2 { width: 60%; height: 16px; margin-bottom: var(--space-3); }
.discover-skeleton .skel-text { width: 100%; height: 12px; margin-bottom: var(--space-1); }
.discover-skeleton .skel-text2 { width: 70%; height: 12px; }

/* ============================================
   CHAT THREAD AREA
   ============================================ */
.chat-thread-area { flex: 1; overflow-y: auto; padding: var(--space-6) var(--space-5); display: none; }
.chat-thread-area.active { display: block; }
.chat-thread-inner { max-width: 820px; margin: 0 auto; animation: fadeIn 0.3s var(--ease-out); }

.back-to-discover { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); cursor: pointer; padding: var(--space-2) 0; margin-bottom: var(--space-4); transition: color var(--duration-fast); }
.back-to-discover:hover { color: var(--accent-gold); }
.back-to-discover svg { width: 16px; height: 16px; }

/* Chat messages */
.chat-messages { display: flex; flex-direction: column; gap: var(--space-6); }
.chat-msg { }
.chat-msg-query { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); padding-bottom: var(--space-4); border-bottom: 1px solid rgba(255,255,255,0.04); margin-bottom: var(--space-4); }
.chat-msg-sources { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.source-pill { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-secondary); transition: all var(--duration-fast); cursor: pointer; }
.source-pill:hover { color: var(--accent-gold); background: var(--accent-gold-dim); }
.source-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-gold); flex-shrink: 0; }
.chat-msg-answer { font-size: var(--text-base); line-height: 1.75; color: var(--text-secondary); }
.chat-msg-answer p { margin-bottom: var(--space-4); }
.chat-msg-answer strong, .chat-msg-answer b { color: var(--text-primary); font-weight: 600; }
.chat-msg-answer h2, .chat-msg-answer h3 { color: var(--text-primary); font-weight: 700; margin: var(--space-5) 0 var(--space-3); font-size: var(--text-lg); }
.chat-msg-answer ul, .chat-msg-answer ol { padding-left: var(--space-5); margin-bottom: var(--space-4); }
.chat-msg-answer li { margin-bottom: var(--space-2); }
.chat-msg-answer code { background: var(--bg-surface-2); padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.9em; font-family: 'SF Mono', 'Fira Code', monospace; }
.chat-msg-answer pre { background: var(--bg-surface); border: none; border-radius: var(--radius-md); padding: var(--space-4); overflow-x: auto; margin-bottom: var(--space-4); }
.chat-msg-answer pre code { background: none; padding: 0; }
.citation-num { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; font-size: 10px; font-weight: 700; background: var(--accent-gold-dim); color: var(--accent-gold); border-radius: var(--radius-sm); vertical-align: super; margin: 0 1px; cursor: pointer; padding: 0 3px; transition: all var(--duration-fast); }
.citation-num:hover { background: var(--accent-gold); color: #000; }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: var(--space-4) 0; }
.typing-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-gold); animation: pulse 1.2s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* Followup prompt in chat */
.chat-followup { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,0.04); }

/* ============================================
   PROMPT BAR
   ============================================ */
.prompt-bar-wrap { padding: var(--space-2) var(--space-5) var(--space-4); flex-shrink: 0; max-width: 820px; margin: 0 auto; width: 100%; }
.prompt-bar-actions { display: flex; align-items: center; gap: var(--space-2); margin-bottom: 6px; }
.prompt-action-btn { display: flex; align-items: center; gap: 5px; padding: 4px 10px; background: transparent; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-md); color: var(--text-muted); font-size: 11px; font-weight: 500; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; white-space: nowrap; }
.prompt-action-btn:hover { color: var(--accent-gold); border-color: rgba(212,160,23,0.35); background: rgba(212,160,23,0.05); }
.prompt-bar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: all var(--duration-fast); }
.prompt-bar:focus-within { border-color: rgba(212,160,23,0.3); box-shadow: 0 0 0 3px var(--accent-gold-dim); }
.prompt-attach { padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); transition: color var(--duration-fast); flex-shrink: 0; }
.prompt-attach:hover { color: var(--text-primary); }
.prompt-attach svg { width: 18px; height: 18px; }
.prompt-input { flex: 1; background: none; border: none; outline: none; font-size: var(--text-sm); color: var(--text-primary); padding: var(--space-1) 0; min-width: 0; }
.prompt-input::placeholder { color: var(--text-faint); }
.prompt-model-select { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2); background: var(--bg-surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer; transition: all var(--duration-fast); flex-shrink: 0; white-space: nowrap; }
.prompt-model-select:hover { background: var(--bg-surface-3); color: var(--text-primary); }
.prompt-mic { padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); transition: color var(--duration-fast); flex-shrink: 0; }
.prompt-mic:hover { color: var(--text-primary); }
.prompt-mic svg { width: 18px; height: 18px; }
.prompt-send { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--accent-gold); border-radius: var(--radius-md); color: #000; transition: background var(--duration-fast); flex-shrink: 0; }
.prompt-send:hover { background: var(--accent-gold-hover); }
.prompt-send:disabled { opacity: 0.5; cursor: not-allowed; }
.prompt-send svg { width: 16px; height: 16px; }
.prompt-footer { text-align: center; font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-2); letter-spacing: 0.02em; }

/* ============================================
   PRICING VIEW
   ============================================ */
.pricing-view { overflow-y: auto; padding: 0; }
.pricing-inner { max-width: 1280px; margin: 0 auto; padding: var(--space-10) var(--space-5) var(--space-16); }
.pricing-header { text-align: center; margin-bottom: var(--space-10); }
.pricing-title { font-size: var(--text-2xl); font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; margin-bottom: var(--space-2); }
.pricing-subtitle { font-size: var(--text-base); color: var(--text-muted); max-width: 500px; margin: 0 auto var(--space-6); }
.billing-toggle-wrap { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-bottom: var(--space-8); }
.billing-label { font-size: var(--text-sm); color: var(--text-muted); font-weight: 500; cursor: pointer; transition: color var(--duration-fast); }
.billing-label.active { color: var(--text-primary); }
.billing-toggle { width: 44px; height: 24px; background: var(--bg-surface-3); border-radius: 12px; cursor: pointer; position: relative; transition: background var(--duration-fast); }
.billing-toggle.annual { background: var(--accent-gold); }
.billing-toggle-knob { width: 18px; height: 18px; background: white; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform var(--duration-fast) var(--ease-out); box-shadow: var(--shadow-sm); }
.billing-toggle.annual .billing-toggle-knob { transform: translateX(20px); }
.billing-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); background: var(--accent-gold); color: #000; letter-spacing: 0.04em; opacity: 0; transform: translateY(4px); transition: all var(--duration-fast) var(--ease-out); }
.billing-badge.visible { opacity: 1; transform: translateY(0); }

.pricing-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); margin-bottom: var(--space-12); }
.pricing-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-6) var(--space-5); position: relative; display: flex; flex-direction: column; transition: all var(--duration-fast) var(--ease-out); }
.pricing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border: 1px solid rgba(212,160,23,0.12); box-shadow: 0 0 30px rgba(212,160,23,0.06); }
.card-popular-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; padding: 2px 12px; background: var(--accent-gold); color: #000; border-radius: var(--radius-full); letter-spacing: 0.06em; white-space: nowrap; }
.card-tier-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; padding: 2px 12px; border-radius: var(--radius-full); letter-spacing: 0.06em; white-space: nowrap; }
.card-accent { width: 100%; height: 3px; border-radius: 2px; margin-bottom: var(--space-4); }
.card-free .card-accent { background: var(--text-faint); }
.card-starter .card-accent { background: var(--accent-blue); }
.card-pro .card-accent { background: var(--accent-gold); }
.card-teams .card-accent { background: var(--accent-purple); }
.card-enterprise .card-accent { background: var(--text-muted); }
.card-icon-wrap { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); }
.card-icon-wrap svg { width: 28px; height: 28px; }
.card-free .card-icon-wrap svg { stroke: var(--text-faint); }
.card-starter .card-icon-wrap svg { stroke: var(--accent-blue); }
.card-pro .card-icon-wrap svg { stroke: var(--accent-gold); }
.card-teams .card-icon-wrap svg { stroke: var(--accent-purple); }
.card-enterprise .card-icon-wrap svg { stroke: var(--text-muted); }
.card-tier-name { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); }
.card-desc { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2); }
.card-free .card-desc { color: var(--text-faint); }
.card-starter .card-desc { color: var(--accent-blue); }
.card-pro .card-desc { color: var(--accent-gold); }
.card-teams .card-desc { color: var(--accent-purple); }
.card-enterprise .card-desc { color: var(--text-muted); }
.card-price { margin-bottom: var(--space-3); }
.card-price-amount { font-size: var(--text-xl); font-weight: 800; color: var(--text-primary); }
.card-price-period { font-size: var(--text-sm); color: var(--text-muted); }
.card-tagline { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-5); line-height: 1.4; flex: 1; }
.card-features { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.card-feature { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-secondary); }
.card-feature-check { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--accent-green); }
.card-cta { display: block; text-align: center; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; transition: all var(--duration-fast) var(--ease-out); }
.card-free .card-cta { background: var(--bg-surface-2); color: var(--text-secondary); border: none; }
.card-free .card-cta:hover { background: var(--bg-surface-hover); }
.card-starter .card-cta { background: var(--accent-blue-dim); color: var(--accent-blue); border: none; }
.card-starter .card-cta:hover { background: var(--accent-blue); color: #fff; }
.card-pro .card-cta { background: var(--accent-gold); color: #000; }
.card-pro .card-cta:hover { background: var(--accent-gold-hover); }
.card-teams .card-cta { background: var(--accent-purple-dim); color: var(--accent-purple); border: none; }
.card-teams .card-cta:hover { background: var(--accent-purple); color: #fff; }
.card-enterprise .card-cta { background: #fff; color: #000; border: none; font-weight: 700; }
.card-enterprise .card-cta:hover { background: #e0e0e0; }

/* Comparison table */
.comparison-section { margin-bottom: var(--space-12); }
.comparison-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-5); text-align: center; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.comparison-table th, .comparison-table td { padding: var(--space-3) var(--space-4); text-align: center; border-bottom: 1px solid rgba(255,255,255,0.03); }
.comparison-table th { font-weight: 600; color: var(--text-primary); background: var(--bg-surface); }
.comparison-table td:first-child { text-align: left; font-weight: 500; color: var(--text-primary); }
.comparison-table td { color: var(--text-secondary); }
.check-yes { color: var(--accent-green); }
.check-no { color: var(--text-faint); }

/* Overage rates */
.overage-section { text-align: center; }
.overage-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.overage-subtitle { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-5); }
.overage-cards { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }
.overage-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); min-width: 140px; }
.overage-card-model { font-size: var(--text-xs); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-1); }
.overage-card-rate { font-size: var(--text-lg); font-weight: 800; color: var(--accent-gold); }
.overage-card-unit { font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); }

/* ============================================
   WELCOME VIEW
   ============================================ */
.welcome-view { overflow-y: auto; }
.welcome-inner { max-width: 500px; margin: 0 auto; padding: var(--space-16) var(--space-5); text-align: center; animation: fadeIn 0.5s var(--ease-out); }
.welcome-icon { width: 80px; height: 80px; border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-6); }
.welcome-greeting { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-3); }
.welcome-tier-badge { display: inline-block; font-size: var(--text-xs); font-weight: 700; padding: var(--space-1) var(--space-4); border-radius: var(--radius-full); margin-bottom: var(--space-6); letter-spacing: 0.06em; }
.welcome-compute { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-1); }
.welcome-compute-amount { font-size: var(--text-2xl); font-weight: 800; color: var(--accent-gold); margin-bottom: var(--space-8); }
.welcome-cta { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); background: var(--accent-gold); color: #000; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; transition: background var(--duration-fast); }
.welcome-cta:hover { background: var(--accent-gold-hover); }

/* ============================================
   ACCOUNT VIEW
   ============================================ */
.account-view { overflow-y: auto; }
.account-inner { max-width: 700px; margin: 0 auto; padding: var(--space-8) var(--space-5); }
.account-title { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-6); }
.account-section { margin-bottom: var(--space-6); padding: var(--space-5); background: var(--bg-surface); border: none; border-radius: var(--radius-lg); }
.account-section-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-3); }
.profile-row { display: flex; align-items: center; gap: var(--space-4); }
.profile-avatar-lg { width: 48px; height: 48px; border-radius: var(--radius-full); background: linear-gradient(135deg, var(--accent-gold), #b8860b); display: flex; align-items: center; justify-content: center; font-size: var(--text-lg); font-weight: 700; color: #000; flex-shrink: 0; }
.profile-details { }
.profile-name { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.profile-email { font-size: var(--text-xs); color: var(--text-muted); }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.plan-info { display: flex; align-items: center; gap: var(--space-3); }
.plan-badge-lg { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 11px; font-weight: 700; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); background: var(--accent-gold); color: #000; letter-spacing: 0.04em; }
.plan-manage-btn { padding: var(--space-2) var(--space-4); background: var(--bg-surface-2); border: none; border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 500; color: var(--text-secondary); transition: all var(--duration-fast); }
.plan-manage-btn:hover { background: var(--accent-gold-dim); color: var(--accent-gold); }
.usage-meter-wrap { margin-top: var(--space-2); }
.usage-labels { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-2); }
.usage-bar { width: 100%; height: 8px; background: var(--bg-surface-3); border-radius: 4px; overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 4px; transition: width var(--duration-slow) var(--ease-out); }
.usage-bar-fill.normal { background: var(--accent-gold); }
.usage-bar-fill.warning { background: var(--accent-amber); }
.usage-bar-fill.danger { background: var(--accent-red); }
.usage-status { margin-top: var(--space-2); font-size: var(--text-xs); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.usage-status.warning { background: var(--accent-amber-dim); color: var(--accent-amber); }
.usage-status.danger { background: var(--accent-red-dim); color: var(--accent-red); }
.services-grid { display: flex; flex-direction: column; gap: var(--space-3); }

/* Compute Info Grid */
.compute-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-2); }
.compute-info-card { background: var(--bg-surface-2); padding: var(--space-4); border-radius: var(--radius-md); }
.compute-info-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--space-1); }
.compute-info-value { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); }
.compute-tier-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.compute-tier-badge.mini, .compute-tier-badge[data-tier="mini"] { background: rgba(107,114,128,0.15); color: #9CA3AF; }
.compute-tier-badge.pro, .compute-tier-badge[data-tier="pro"] { background: rgba(16,185,129,0.15); color: #10B981; }
.compute-tier-badge.max, .compute-tier-badge[data-tier="max"] { background: rgba(139,92,246,0.15); color: #8B5CF6; }
.compute-tier-badge.max_pro, .compute-tier-badge[data-tier="max_pro"] { background: rgba(245,158,11,0.15); color: #F59E0B; }
@media (max-width: 480px) { .compute-info-grid { grid-template-columns: 1fr; } }
.service-item { display: flex; align-items: center; gap: var(--space-3); }
.service-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-icon svg { width: 18px; height: 18px; }
.service-name { font-size: var(--text-sm); font-weight: 500; color: var(--text-primary); }
.service-status { font-size: var(--text-xs); color: var(--text-muted); }
.service-status.connected { color: var(--accent-green); }

/* ============================================
   STUDIO VIEW
   ============================================ */
.studio-view { overflow: hidden; }
.studio-layout { display: flex; flex: 1; overflow: hidden; }
.studio-left { width: 320px; min-width: 320px; display: flex; flex-direction: column; border-right: none; background: var(--bg-secondary); overflow: hidden; }
.studio-left-header { padding: var(--space-4); flex-shrink: 0; }
.studio-left-header h3 { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-3); }
.studio-left-header h3 svg { width: 16px; height: 16px; color: var(--accent-gold); }
.studio-prompt-area { width: 100%; height: 80px; background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-3); font-size: var(--text-sm); color: var(--text-primary); resize: none; outline: none; }
.studio-prompt-area:focus { border-color: var(--accent-gold); }
.studio-prompt-area::placeholder { color: var(--text-faint); }
.studio-generate-btn { width: 100%; padding: var(--space-2) var(--space-3); background: var(--accent-gold); color: #000; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; margin-top: var(--space-2); display: flex; align-items: center; justify-content: center; gap: var(--space-2); transition: background var(--duration-fast); }
.studio-generate-btn:hover { background: var(--accent-gold-hover); }
.studio-generate-btn svg { width: 14px; height: 14px; }
.studio-model-select { display: flex; gap: var(--space-1); margin-top: var(--space-2); }
.studio-model-btn { flex: 1; padding: var(--space-1); font-size: var(--text-xs); border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid transparent; color: var(--text-muted); transition: all var(--duration-fast); }
.studio-model-btn.active { background: var(--accent-gold-dim); border: 1px solid transparent; color: var(--accent-gold); }
.studio-history { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-4); }
.studio-history-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-2); }
.studio-history-item { display: flex; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: var(--text-xs); color: var(--text-muted); line-height: 1.4; }
.studio-history-num { width: 18px; height: 18px; border-radius: var(--radius-sm); background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }
.studio-followup { padding: var(--space-3) var(--space-4); border-top: 1px solid rgba(255,255,255,0.04); flex-shrink: 0; }
.studio-followup-bar { display: flex; gap: var(--space-2); }
.studio-followup-input { flex: 1; background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); font-size: var(--text-xs); outline: none; }
.studio-followup-input:focus { border-color: var(--accent-gold); }
.studio-followup-send { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--accent-gold); border-radius: var(--radius-md); color: #000; flex-shrink: 0; }
.studio-followup-send svg { width: 14px; height: 14px; }

.studio-templates { padding: var(--space-3) var(--space-4); }
.studio-template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-top: var(--space-2); }
.studio-template-card { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--bg-surface); border-radius: var(--radius-md); cursor: pointer; transition: all var(--duration-fast) var(--ease-out); }
.studio-template-card:hover { background: var(--bg-surface-hover); transform: translateY(-1px); }
.studio-template-icon { font-size: 16px; flex-shrink: 0; }
.studio-template-name { font-size: var(--text-xs); font-weight: 500; color: var(--text-secondary); }
.studio-action-btn.deploy-action { background: var(--accent-gold-dim); color: var(--accent-gold); }
.studio-action-btn.deploy-action:hover { background: var(--accent-gold); color: #000; }
.studio-integration-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; font-size: var(--text-xs); color: var(--text-secondary); }
.studio-int-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.studio-int-dot.connected { background: var(--accent-green); }
.studio-int-status { margin-left: auto; font-size: 10px; color: var(--text-faint); }
.studio-center { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.studio-toolbar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-bottom: none; background: var(--bg-surface); flex-shrink: 0; }
.studio-url-bar { display: flex; align-items: center; gap: var(--space-2); flex: 1; min-width: 0; padding: var(--space-1) var(--space-2); background: var(--bg-surface-2); border-radius: var(--radius-sm); }
.studio-url-bar svg { width: 14px; height: 14px; color: var(--text-faint); flex-shrink: 0; }
.studio-url-text { font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-toolbar-btn { padding: var(--space-1); border-radius: var(--radius-sm); color: var(--text-muted); transition: color var(--duration-fast); }
.studio-toolbar-btn:hover { color: var(--text-primary); }
.studio-toolbar-btn svg { width: 16px; height: 16px; }
.studio-device-group { display: flex; gap: 1px; background: var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.studio-device-btn { padding: var(--space-1) var(--space-2); background: var(--bg-surface); color: var(--text-muted); transition: all var(--duration-fast); }
.studio-device-btn.active { background: var(--bg-surface-2); color: var(--text-primary); }
.studio-device-btn svg { width: 16px; height: 16px; }
.studio-deploy-btn { padding: var(--space-1) var(--space-3); background: var(--accent-gold); color: #000; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600; }
.studio-preview { flex: 1; overflow: auto; background: var(--bg-primary); position: relative; }
.studio-preview-content { position: absolute; inset: 0; overflow: auto; }
.studio-code-editor { display: none; flex: 1; overflow: auto; background: var(--bg-surface); font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; padding: var(--space-3); }
.studio-code-editor.active { display: block; }
.code-line { display: flex; gap: var(--space-3); line-height: 1.6; }
.code-line-num { width: 28px; text-align: right; color: var(--text-faint); flex-shrink: 0; user-select: none; }
.code-kw { color: #c678dd; }
.code-str { color: #98c379; }
.code-fn { color: #61afef; }
.code-tag { color: #e06c75; }
.code-attr { color: #d19a66; }
.code-punc { color: var(--text-muted); }
.code-val { color: #d19a66; }
.code-txt { color: var(--text-secondary); }
.studio-tab-bar { display: flex; border-top: none; flex-shrink: 0; }
.studio-tab { flex: 1; padding: var(--space-2); text-align: center; font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all var(--duration-fast); border-top: 2px solid transparent; }
.studio-tab.active { color: var(--text-primary); border-top-color: var(--accent-gold); }

.studio-right { width: 240px; min-width: 240px; display: flex; flex-direction: column; border-left: none; background: var(--bg-secondary); overflow-y: auto; }
.studio-right-header { padding: var(--space-3) var(--space-4); font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.studio-file-tree { padding: var(--space-2); }
.file-tree-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--text-muted); cursor: pointer; transition: all var(--duration-fast); }
.file-tree-item:hover { background: var(--bg-surface); color: var(--text-secondary); }
.file-tree-item.active { background: var(--accent-gold-dim); color: var(--accent-gold); }
.file-tree-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.file-tree-item.folder svg { color: var(--accent-gold); }
.file-tree-indent { padding-left: var(--space-6); }
.studio-right-section { padding: var(--space-3) var(--space-4); border-top: 1px solid rgba(255,255,255,0.04); }
.studio-right-section-title { font-size: var(--text-xs); font-weight: 600; color: var(--text-faint); text-transform: uppercase; margin-bottom: var(--space-2); }
.studio-prop-row { display: flex; justify-content: space-between; font-size: var(--text-xs); padding: 2px 0; }
.studio-prop-row span:first-child { color: var(--text-muted); }
.studio-prop-row span:last-child { color: var(--text-secondary); }
.studio-action-btn { width: 100%; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); font-size: var(--text-xs); color: var(--text-secondary); margin-bottom: var(--space-2); transition: all var(--duration-fast); }
.studio-action-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.studio-action-btn svg { width: 14px; height: 14px; }

/* Mock preview in studio */
.mock-preview { padding: 0; background: #0d0d0d; color: #fff; min-height: 100%; font-family: var(--font-sans); }
.mock-nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.mock-nav-logo { font-size: 16px; font-weight: 700; }
.mock-nav-links { display: flex; gap: 20px; font-size: 13px; color: rgba(255,255,255,0.6); }
.mock-hero { text-align: center; padding: 64px 24px; max-width: 600px; margin: 0 auto; }
.mock-hero h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; background: linear-gradient(135deg, #d4a017, #f5d060); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mock-hero p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 24px; }
.mock-hero-btn { display: inline-block; padding: 10px 24px; background: #d4a017; color: #000; border-radius: 8px; font-size: 14px; font-weight: 600; }
.mock-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 24px 48px; max-width: 700px; margin: 0 auto; }
.mock-feature-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.02); border-radius: 10px; padding: 20px; }
.mock-feature-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mock-feature-card p { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* ============================================
   DOMAINS VIEW
   ============================================ */
.domains-view { overflow-y: auto; }
.domains-inner { max-width: 800px; margin: 0 auto; padding: var(--space-8) var(--space-5); }
.domains-hero { text-align: center; margin-bottom: var(--space-6); }
.domains-hero h1 { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.domains-hero p { font-size: var(--text-sm); color: var(--text-muted); }
.domains-search { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.domains-search-input { flex: 1; padding: var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); font-size: var(--text-sm); outline: none; }
.domains-search-input:focus { border-color: rgba(212,160,23,0.3); box-shadow: 0 0 0 2px var(--accent-gold-dim); }
.domains-search-btn { padding: var(--space-3) var(--space-5); background: var(--accent-gold); color: #000; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.domains-filters { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.domain-filter-chip { padding: var(--space-1) var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-muted); transition: all var(--duration-fast); }
.domain-filter-chip.active { background: var(--accent-gold-dim); border: 1px solid transparent; color: var(--accent-gold); }
.domains-results { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-6); }
.domain-result { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--bg-surface); border: none; border-radius: var(--radius-md); }
.domain-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); flex: 1; }
.domain-price { font-size: var(--text-sm); font-weight: 600; color: var(--accent-gold); }
.domain-price span { font-size: var(--text-xs); font-weight: 400; color: var(--text-muted); }
.domain-status { font-size: var(--text-xs); font-weight: 500; padding: 2px 8px; border-radius: var(--radius-full); }
.domain-status.available { background: var(--accent-green-dim); color: var(--accent-green); }
.domain-status.taken { background: var(--bg-surface-2); color: var(--text-faint); }
.domain-buy-btn { padding: var(--space-1) var(--space-3); background: var(--accent-gold); color: #000; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600; }
.domain-buy-btn.disabled { background: var(--bg-surface-2); color: var(--text-faint); cursor: not-allowed; }
.domains-powered { text-align: center; font-size: var(--text-xs); color: var(--text-faint); margin-bottom: var(--space-6); }
.domains-managed { margin-bottom: var(--space-6); }
.domains-managed-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-4); }
.managed-domain { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); background: var(--bg-surface); border: none; border-radius: var(--radius-md); margin-bottom: var(--space-2); flex-wrap: wrap; }
.managed-domain-info { flex: 1; min-width: 200px; }
.managed-domain-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.managed-domain-meta { font-size: var(--text-xs); color: var(--text-muted); }
.managed-domain-status { font-size: var(--text-xs); font-weight: 500; color: var(--accent-green); }
.managed-domain-btn { padding: var(--space-1) var(--space-3); background: var(--bg-surface-2); border: none; border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--text-secondary); }

/* Domain Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-surface); border: none; border-radius: var(--radius-xl); padding: var(--space-6); max-width: 420px; width: 90%; box-shadow: var(--shadow-lg); }
.modal-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-4); }
.modal-field { margin-bottom: var(--space-4); }
.modal-label { display: block; font-size: var(--text-xs); font-weight: 500; color: var(--text-muted); margin-bottom: var(--space-1); }
.modal-select { width: 100%; padding: var(--space-2) var(--space-3); background: var(--bg-surface-2); border: 1px solid transparent; border-radius: var(--radius-md); font-size: var(--text-sm); outline: none; }
.modal-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.modal-toggle-label { font-size: var(--text-sm); color: var(--text-primary); }
.modal-toggle-label span { display: block; font-size: var(--text-xs); color: var(--text-muted); }
.mini-toggle { width: 36px; height: 20px; background: var(--bg-surface-3); border-radius: 10px; position: relative; cursor: pointer; flex-shrink: 0; }
.mini-toggle.on { background: var(--accent-gold); }
.mini-toggle-knob { width: 16px; height: 16px; background: #fff; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: transform var(--duration-fast) var(--ease-out); }
.mini-toggle.on .mini-toggle-knob { transform: translateX(16px); }
.modal-total { display: flex; justify-content: space-between; padding: var(--space-4) 0; font-size: var(--text-base); font-weight: 600; color: var(--text-primary); border-top: 1px solid rgba(255,255,255,0.04); margin-top: var(--space-3); }
.modal-cta { width: 100%; padding: var(--space-3); background: var(--accent-gold); color: #000; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; margin-top: var(--space-3); }

/* ============================================
   LAUNCH PAD VIEW
   ============================================ */
.launchpad-view { overflow-y: auto; }
.launchpad-inner { max-width: 900px; margin: 0 auto; padding: var(--space-8) var(--space-5); }
.launchpad-hero { text-align: center; margin-bottom: var(--space-6); }
.launchpad-hero h1 { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.launchpad-hero p { font-size: var(--text-sm); color: var(--text-muted); }
.lp-steps { display: flex; align-items: center; justify-content: center; gap: var(--space-2); margin-bottom: var(--space-6); flex-wrap: wrap; }
.lp-step { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-faint); font-weight: 500; }
.lp-step.active { color: var(--accent-gold); }
.lp-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-surface-2); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.lp-step.active .lp-step-num { background: var(--accent-gold); color: #000; }
.lp-step-connector { width: 24px; height: 2px; background: var(--border-color); }
.lp-entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-bottom: var(--space-8); }
.lp-entity-card { background: var(--bg-surface); border: 2px solid transparent; border-radius: var(--radius-lg); padding: var(--space-5); cursor: pointer; transition: all var(--duration-fast); text-align: center; }
.lp-entity-card:hover { box-shadow: var(--shadow-md); }
.lp-entity-card.selected { border-color: transparent; background: var(--accent-gold-dim); box-shadow: 0 0 0 2px rgba(212,160,23,0.4); }
.lp-entity-icon { width: 40px; height: 40px; margin: 0 auto var(--space-3); display: flex; align-items: center; justify-content: center; }
.lp-entity-icon svg { width: 28px; height: 28px; color: var(--text-muted); }
.lp-entity-card.selected .lp-entity-icon svg { color: var(--accent-gold); }
.lp-entity-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-1); }
.lp-entity-desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.4; }
.lp-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-8); }
.lp-package { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-5); }
.lp-package.recommended { box-shadow: 0 0 0 1px rgba(212,160,23,0.3), 0 0 16px rgba(212,160,23,0.06); }
.lp-package-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-1); }
.lp-package-price { font-size: var(--text-xl); font-weight: 800; color: var(--accent-gold); margin-bottom: var(--space-3); }
.lp-package-features { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.lp-package-feature { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-secondary); }
.lp-package-feature svg { width: 14px; height: 14px; color: var(--accent-green); flex-shrink: 0; }
.lp-package-btn { width: 100%; padding: var(--space-2); background: var(--bg-surface-2); border: none; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); }
.lp-package.recommended .lp-package-btn { background: var(--accent-gold); color: #000; border-color: var(--accent-gold); }
.lp-filings { margin-bottom: var(--space-6); }
.lp-filings-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-4); }
.lp-alert { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--accent-amber-dim); border: 1px solid rgba(245,158,11,0.08); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--accent-amber); margin-bottom: var(--space-4); }
.lp-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.lp-filing-card { background: var(--bg-surface); border: none; border-radius: var(--radius-lg); padding: var(--space-4); margin-bottom: var(--space-3); }
.lp-filing-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.lp-filing-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.lp-filing-status { font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.lp-filing-status.review { background: var(--accent-amber-dim); color: var(--accent-amber); }
.lp-filing-status.complete { background: var(--accent-green-dim); color: var(--accent-green); }
.lp-filing-progress { display: flex; gap: 4px; margin-bottom: var(--space-1); }
.lp-filing-step { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-surface-3); }
.lp-filing-step.done { background: var(--accent-gold); }
.lp-filing-step.current { background: var(--accent-amber); }
.lp-filing-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-faint); margin-bottom: var(--space-3); }
.lp-filing-actions { display: flex; gap: var(--space-2); }
.lp-filing-btn { padding: var(--space-1) var(--space-3); background: var(--bg-surface-2); border: none; border-radius: var(--radius-sm); font-size: var(--text-xs); color: var(--text-secondary); }
.lp-powered { text-align: center; font-size: var(--text-xs); color: var(--text-faint); }

/* ============================================
   CONNECTORS VIEW
   ============================================ */
.connectors-view { overflow-y: auto; }
.connectors-inner { max-width: 1100px; margin: 0 auto; padding: var(--space-8) var(--space-5); }
.connectors-header { margin-bottom: var(--space-5); }
.connectors-header h1 { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); }
.connectors-count { font-size: var(--text-xs); color: var(--text-muted); }
.connectors-filters { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.connector-filter { padding: var(--space-1) var(--space-3); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-full); font-size: var(--text-xs); color: var(--text-muted); transition: all var(--duration-fast); }
.connector-filter.active { background: var(--accent-gold-dim); border: 1px solid transparent; color: var(--accent-gold); }
.connectors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-3); }
.connector-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-4); cursor: pointer; transition: all var(--duration-fast); }
.connector-card:hover { box-shadow: var(--shadow-md); }
.connector-card.expanded { box-shadow: 0 0 0 1px rgba(212,160,23,0.3), var(--shadow-md); }
.connector-card-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.connector-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.connector-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.connector-sub { font-size: var(--text-xs); color: var(--text-muted); }
.connector-badge { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius-full); margin-left: auto; text-transform: uppercase; letter-spacing: 0.04em; }
.connector-badge.ai { background: var(--accent-green-dim); color: var(--accent-green); }
.connector-badge.search { background: var(--accent-blue-dim); color: var(--accent-blue); }
.connector-badge.voice { background: var(--accent-amber-dim); color: var(--accent-amber); }
.connector-badge.business { background: var(--accent-purple-dim); color: var(--accent-purple); }
.connector-badge.domains { background: var(--accent-gold-dim); color: var(--accent-gold); }
.connector-badge.infra { background: var(--bg-surface-3); color: var(--text-muted); }
.connector-badge.analytics { background: var(--accent-blue-dim); color: var(--accent-blue); }
.connector-desc { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-3); line-height: 1.4; }
.connector-footer { display: flex; align-items: center; justify-content: space-between; }
.connector-status { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); font-weight: 500; }
.connector-status.connected { color: var(--accent-green); }
.connector-status.disconnected { color: var(--text-faint); }
.connector-status-dot { width: 6px; height: 6px; border-radius: 50%; }
.connector-status.connected .connector-status-dot { background: var(--accent-green); }
.connector-status.disconnected .connector-status-dot { background: var(--text-faint); }
.connector-connect-btn { font-size: var(--text-xs); font-weight: 600; color: var(--accent-gold); }
.connector-detail { display: none; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid rgba(255,255,255,0.04); }
.connector-card.expanded .connector-detail { display: block; }
.connector-detail-row { display: flex; justify-content: space-between; font-size: var(--text-xs); padding: 2px 0; }
.connector-detail-row span:first-child { color: var(--text-muted); }
.connector-manage-btn { width: 100%; padding: var(--space-2); background: var(--bg-surface-2); border: none; border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 500; color: var(--text-secondary); margin-top: var(--space-3); transition: all var(--duration-fast); }
.connector-manage-btn:hover { background: var(--accent-gold-dim); color: var(--accent-gold); }

/* ============================================
   BUSINESS PLAN VIEW
   ============================================ */
.bizplan-view { overflow-y: auto; }
.bizplan-inner { max-width: 900px; margin: 0 auto; padding: var(--space-8) var(--space-5); }
.bizplan-hero { text-align: center; margin-bottom: var(--space-6); }
.bizplan-hero h1 { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.bizplan-hero p { font-size: var(--text-sm); color: var(--text-muted); }
.bizplan-form { background: var(--bg-surface); border: none; border-radius: var(--radius-lg); padding: var(--space-6); margin-bottom: var(--space-8); }
.bizplan-form-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-5); }
.bizplan-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
.bizplan-field { }
.bizplan-field.full { grid-column: 1 / -1; }
.bizplan-label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); margin-bottom: var(--space-1); text-transform: uppercase; letter-spacing: 0.04em; }
.bizplan-input, .bizplan-select, .bizplan-textarea { width: 100%; padding: var(--space-2) var(--space-3); background: var(--bg-surface-2); border: 1px solid transparent; border-radius: var(--radius-md); font-size: var(--text-sm); outline: none; }
.bizplan-input:focus, .bizplan-select:focus, .bizplan-textarea:focus { border-color: rgba(212,160,23,0.3); box-shadow: 0 0 0 2px var(--accent-gold-dim); }
.bizplan-textarea { min-height: 80px; resize: vertical; }
.bizplan-slider-wrap { display: flex; align-items: center; gap: var(--space-3); }
.bizplan-slider { flex: 1; -webkit-appearance: none; height: 4px; background: var(--bg-surface-3); border-radius: 2px; outline: none; }
.bizplan-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-gold); cursor: pointer; }
.bizplan-slider-val { font-size: var(--text-sm); font-weight: 700; color: var(--accent-gold); min-width: 60px; }
.bizplan-generate-btn { display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%; padding: var(--space-3); background: var(--accent-gold); color: #000; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; }
.bizplan-generate-btn svg { width: 16px; height: 16px; }
.bizplan-preview { margin-bottom: var(--space-8); }
.bizplan-section { background: var(--bg-surface); border: none; border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--space-4); }
.bizplan-section h2 { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-base); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-4); }
.bizplan-section h2 svg { width: 18px; height: 18px; color: var(--accent-gold); }
.bizplan-section p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; }
.bizplan-section .highlight { color: var(--accent-gold); font-weight: 600; }
.bizplan-chart { display: flex; align-items: flex-end; gap: var(--space-4); height: 160px; padding: var(--space-4) 0; }
.chart-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; background: linear-gradient(180deg, var(--accent-gold), rgba(212,160,23,0.3)); border-radius: 4px 4px 0 0; min-height: 8px; }
.chart-value { font-size: 10px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.chart-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.bizplan-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.bizplan-table th, .bizplan-table td { padding: var(--space-2) var(--space-3); text-align: right; border-bottom: 1px solid rgba(255,255,255,0.03); }
.bizplan-table th { font-weight: 600; color: var(--text-primary); text-align: right; }
.bizplan-table td:first-child, .bizplan-table th:first-child { text-align: left; }
.bizplan-table td { color: var(--text-secondary); }
.bizplan-timeline { display: flex; gap: var(--space-3); overflow-x: auto; padding: var(--space-2) 0; }
.timeline-item { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-gold); margin-bottom: var(--space-2); }
.timeline-label { font-size: var(--text-xs); font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.timeline-sub { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.bizplan-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); margin-bottom: var(--space-6); }
.kanban-col { background: var(--bg-surface); border: none; border-radius: var(--radius-md); padding: var(--space-3); }
.kanban-col-header { font-size: var(--text-xs); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-3); display: flex; align-items: center; gap: var(--space-2); }
.kanban-count { font-size: 10px; background: var(--bg-surface-2); padding: 0 6px; border-radius: var(--radius-full); color: var(--text-muted); }
.kanban-card { background: var(--bg-surface-2); border: none; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2); }
.kanban-card-title { font-size: var(--text-xs); font-weight: 500; color: var(--text-secondary); margin-bottom: var(--space-1); }
.kanban-card-tag { font-size: 9px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius-full); }
.kanban-card-tag.finance { background: var(--accent-green-dim); color: var(--accent-green); }
.kanban-card-tag.marketing { background: var(--accent-purple-dim); color: var(--accent-purple); }
.kanban-card-tag.tech { background: var(--accent-blue-dim); color: var(--accent-blue); }
.kanban-card-tag.formation { background: var(--accent-amber-dim); color: var(--accent-amber); }
.bizplan-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.bizplan-action-btn { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-secondary); transition: all var(--duration-fast); }
.bizplan-action-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.bizplan-action-btn svg { width: 16px; height: 16px; }
.bizplan-action-btn.primary { background: var(--accent-gold); color: #000; border-color: var(--accent-gold); }

/* ============================================
   UNIVERSAL TICKER BANNER (ALL VERTICALS)
   ============================================ */
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-banner { display: none; flex-shrink: 0; background: transparent; overflow: hidden; position: relative; height: 36px; }
.ticker-banner.visible { display: block; }
.ticker-banner-track { display: flex; align-items: center; gap: var(--space-5); white-space: nowrap; animation: tickerScroll 40s linear infinite; padding: var(--space-2) 0; height: 36px; }
.ticker-banner-track:hover { animation-play-state: paused; }

/* Stock ticker items */
.ticker-stock { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); }
.ticker-stock-sym { font-weight: 700; color: var(--text-primary); }
.ticker-stock-val { font-weight: 500; color: var(--text-secondary); }
.ticker-stock-chg { font-weight: 700; font-size: 10px; padding: 1px 5px; border-radius: var(--radius-sm); }
.ticker-stock-chg.up { color: var(--accent-green); background: var(--accent-green-dim); }
.ticker-stock-chg.down { color: var(--accent-red); background: var(--accent-red-dim); }
.ticker-divider { width: 1px; height: 16px; background: var(--border-color); flex-shrink: 0; }

/* Sports ticker items */
.ticker-score { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); }
.ticker-league { font-weight: 800; font-size: 9px; padding: 1px 5px; border-radius: var(--radius-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.ticker-league.nba { background: rgba(200,60,30,0.15); color: #c83c1e; }
.ticker-league.nfl { background: rgba(0,80,40,0.15); color: #22c55e; }
.ticker-league.mlb { background: rgba(0,50,160,0.15); color: #3b82f6; }
.ticker-league.nhl { background: rgba(0,0,0,0.1); color: var(--text-secondary); }
[data-theme="dark"] .ticker-league.nba { background: rgba(200,60,30,0.2); color: #ef7654; }
[data-theme="dark"] .ticker-league.nhl { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.ticker-teams { font-weight: 600; color: var(--text-primary); }
.ticker-status { font-size: 10px; font-weight: 600; color: var(--accent-gold); }
.ticker-detail { font-size: 10px; color: var(--text-muted); }

/* News/headline ticker items */
.ticker-headline { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-secondary); }
.ticker-headline-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-gold); flex-shrink: 0; }

/* Tech ticker — two rows: stocks top, announcements bottom */
.ticker-banner.tech-dual { height: 60px; }
.ticker-banner.tech-dual .ticker-banner-track { height: 28px; }
.ticker-banner.tech-dual .ticker-banner-track.row2 { animation-duration: 55s; animation-direction: reverse; }

/* ============================================
   ENGAGEMENT SECTION (NEWS + CTAs per vertical)
   ============================================ */
.engagement-section { max-width: 900px; margin: 0 auto var(--space-6); }
.engagement-news-title { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-3); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: var(--space-2); }
.engagement-news-title svg { width: 16px; height: 16px; color: var(--accent-gold); }
.engagement-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.engagement-news-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: all var(--duration-fast) var(--ease-out); }
.engagement-news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.engagement-news-img { width: 100%; height: 140px; object-fit: cover; background: var(--bg-surface-2); }
.engagement-news-body { padding: var(--space-3) var(--space-4); }
.engagement-news-cat { display: inline-block; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: var(--radius-full); background: var(--accent-gold-dim); color: var(--accent-gold); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-2); }
.engagement-news-card-title { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: var(--space-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.engagement-news-summary { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.engagement-news-time { font-size: 10px; color: var(--text-faint); margin-top: var(--space-1); }

.engagement-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-6); }
.engagement-cta-card { background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-lg); padding: var(--space-5); cursor: pointer; transition: all var(--duration-fast) var(--ease-out); position: relative; overflow: hidden; }
.engagement-cta-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.engagement-cta-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.engagement-cta-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); }
.engagement-cta-icon svg { width: 22px; height: 22px; }
.engagement-cta-title { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); }
.engagement-cta-sub { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; margin-bottom: var(--space-3); }
.engagement-cta-btn { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-xs); font-weight: 600; transition: all var(--duration-fast); }
.engagement-cta-btn:hover { filter: brightness(1.1); }

@media (max-width: 768px) {
  .engagement-news-grid { grid-template-columns: 1fr; }
  .engagement-ctas { grid-template-columns: 1fr; }
}

/* ============================================
   MOBILE TAB BAR
   ============================================ */
.mobile-tabs { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 80; background: var(--bg-secondary); border-top: none; padding-bottom: env(safe-area-inset-bottom); }
.mobile-tabs-inner { display: flex; }
.mobile-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--space-2) var(--space-1); font-size: 10px; color: var(--text-faint); transition: color var(--duration-fast); }
.mobile-tab.active { color: var(--accent-gold); }
.mobile-tab svg { width: 20px; height: 20px; }

.mobile-more-menu { display: none; position: fixed; bottom: 56px; left: 0; right: 0; z-index: 79; background: var(--bg-surface); border-top: none; padding: var(--space-4); }
.mobile-more-menu.active { display: block; }
.mobile-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.mobile-more-item { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius-md); font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer; }
.mobile-more-item:hover { background: var(--bg-surface-2); }
.mobile-more-item svg { width: 20px; height: 20px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .pricing-cards { grid-template-columns: repeat(3, 1fr); }
  .studio-right { display: none; }
  .studio-left { width: 260px; min-width: 260px; }
  .bizplan-kanban { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .hamburger-btn { display: block; }
  /* .mobile-tabs removed in v8.5.0 — using mobile-bottom-nav */
  .main-content { padding-bottom: 56px; }
  .pricing-cards { grid-template-columns: 1fr; }
  .studio-layout { flex-direction: column; }
  .studio-left { width: 100%; min-width: 100%; max-height: 40vh; }
  .lp-entity-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-packages { grid-template-columns: 1fr; }
  .bizplan-form-grid { grid-template-columns: 1fr; }
  .bizplan-kanban { grid-template-columns: 1fr; }
  .discover-grid { grid-template-columns: 1fr; }
  .topbar-right .compute-meter { display: none; }
}

@media (max-width: 480px) {
  .lp-entity-grid { grid-template-columns: 1fr; }
  .lp-steps { gap: var(--space-1); }
  .prompt-model-select { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* Hero section for home feed */
.home-hero {
  position: relative;
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212,160,23,0.06) 0%, rgba(57,255,20,0.04) 50%, rgba(212,160,23,0.03) 100%);
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent-green), var(--accent-gold), transparent);
  opacity: 0.4;
}
.home-hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.home-hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  border: none;
  background: transparent;
}
.home-hero-text { flex: 1; }
.home-hero-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: var(--space-1);
  letter-spacing: -0.02em;
}
.home-hero-title .labs-green {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-green);
  text-shadow: 0 0 20px var(--accent-green-glow);
  letter-spacing: 0.1em;
}
.home-hero-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.5;
}
.home-hero-badges {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}
.home-hero-badge.gold { background: rgba(212,160,23,0.12); color: var(--accent-gold); }
.home-hero-badge.green { background: rgba(57,255,20,0.08); color: var(--accent-green); }
.home-hero-badge.blue { background: rgba(59,130,246,0.1); color: var(--accent-blue); }

/* Section headers */
.feed-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
}
.feed-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--v-accent-dim);
}
.feed-section-icon svg { stroke: var(--v-accent); }
.feed-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* CTA cards upgrade */
.cta-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.cta-action-card {
  padding: var(--space-5);
  border-radius: 14px;
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.cta-action-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
  transition: opacity 0.3s;
}
.cta-action-card.gold-accent::before { background: var(--accent-gold); opacity: 0.5; }
.cta-action-card.green-accent::before { background: var(--accent-green); opacity: 0.4; }
.cta-action-card.blue-accent::before { background: var(--accent-blue); opacity: 0.5; }
.cta-action-card.purple-accent::before { background: var(--accent-purple); opacity: 0.5; }
.cta-action-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.cta-action-card:hover::before { opacity: 1; }
.cta-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.cta-card-title { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-1); }
.cta-card-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }
.cta-card-arrow { position: absolute; top: var(--space-4); right: var(--space-4); color: var(--text-faint); transition: color 0.2s, transform 0.2s; }
.cta-action-card:hover .cta-card-arrow { color: var(--accent-gold); transform: translateX(3px); }

/* Bottom news row polish */
.discover-bottom-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

/* Mobile hero adjustments */
@media (max-width: 768px) {
  .home-hero { padding: var(--space-5) var(--space-4); }
  .home-hero-content { flex-direction: column; text-align: center; }
  .home-hero-logo { width: 60px; height: 60px; }
  .home-hero-badges { justify-content: center; }
  .home-hero-title { font-size: var(--text-xl); }
  .cta-card-row { grid-template-columns: 1fr; }
}

.footer-labs-green { font-family: 'Orbitron', sans-serif; color: var(--accent-green); letter-spacing: 0.2em; text-shadow: 0 0 10px var(--accent-green-glow); }

/* Chat phase indicators — searching, thinking, streaming */
.chat-phase-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  animation: phaseFadeIn 0.3s ease;
}
.phase-spinner { color: var(--accent-gold); flex-shrink: 0; }
.phase-text { font-weight: 500; letter-spacing: 0.01em; }

@keyframes phaseFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Smoother answer text appearance */
.chat-msg-answer p, .chat-msg-answer h2, .chat-msg-answer h3, .chat-msg-answer ul, .chat-msg-answer li {
  animation: textFadeIn 0.15s ease;
}
@keyframes textFadeIn {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

/* Source pills upgrade — more polished */
.chat-msg-sources {
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  animation: phaseFadeIn 0.3s ease;
}


/* ═══════════════════════════════════════════════════════════════
   STUDIO — AI Creative Engine
   ═══════════════════════════════════════════════════════════════ */
/* ═══════ Studio v7.7 — 3-Panel IDE Workspace ═══════ */
.studio-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  height: calc(100vh - 48px);
  transition: grid-template-columns 0.3s ease;
}
.studio-layout.sidebar-collapsed { grid-template-columns: 0px 1fr; }
.studio-layout.sidebar-collapsed .studio-sidebar { width: 0; padding: 0; overflow: hidden; opacity: 0; }
/* Right sidebar collapsed into Project tab — always hidden */
.studio-right-sidebar { display: none !important; }
.studio-layout.right-collapsed { grid-template-columns: 260px 1fr; }
.studio-layout.sidebar-collapsed.right-collapsed { grid-template-columns: 0px 1fr; }

/* Sidebar */
.studio-sidebar {
  background: var(--bg-surface-2);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}
.studio-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.studio-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}
.studio-sidebar-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px; border-radius: 4px;
}
.studio-sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-surface); }

/* Compute Tier Selector */
.studio-tier-selector { padding: 0; }
.studio-tier-label {
  font-size: var(--text-xs); font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px;
}
.studio-tier-pills { display: flex; flex-direction: column; gap: 4px; }
.studio-tier-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px;
  background: transparent; color: var(--text-secondary); font-size: var(--text-xs);
  font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.studio-tier-pill:hover { border-color: var(--text-muted); color: var(--text-primary); }
.studio-tier-pill.active {
  background: var(--bg-surface); border-color: var(--accent-gold); color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--accent-gold);
}
.studio-tier-pill.locked { opacity: 0.4; cursor: not-allowed; }
.tier-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tier-price { margin-left: auto; color: var(--text-muted); font-size: 10px; }

/* Model List in Sidebar */
.studio-model-list { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; }
.studio-model-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  transition: all 0.15s; color: var(--text-secondary);
}
.studio-model-item:hover { background: var(--bg-surface); color: var(--text-primary); }
.studio-model-item.active { background: var(--bg-surface); color: var(--accent-gold); }
.studio-model-item.locked { opacity: 0.35; cursor: not-allowed; }
.studio-model-item .model-name { font-size: var(--text-sm); font-weight: 500; flex: 1; }
.studio-model-item .model-provider { font-size: 10px; color: var(--text-muted); }
.studio-model-item .model-credits { font-size: 10px; color: var(--text-muted); }
.model-fallback-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  margin-left: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Mode Divider */
.studio-mode-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Gallery Section */
.studio-gallery-section { margin-top: auto; }

/* Content Area */
.studio-content {
  display: flex; flex-direction: column; overflow: hidden;
}
.studio-content-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-color);
}
.studio-active-model {
  display: flex; align-items: center; gap: 8px; font-size: var(--text-sm);
  color: var(--text-primary); font-weight: 500;
}
.studio-model-badge {
  padding: 2px 8px; border-radius: 4px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.studio-model-badge.mini { background: rgba(107,114,128,0.2); color: #9CA3AF; }
.studio-model-badge.pro { background: rgba(16,185,129,0.2); color: #10B981; }
.studio-model-badge.max { background: rgba(139,92,246,0.2); color: #8B5CF6; }
.studio-model-badge.max_pro { background: rgba(245,158,11,0.2); color: #F59E0B; }
.studio-model-cost { font-size: var(--text-xs); color: var(--text-muted); }

/* View Toggle */
.studio-view-toggle {
  display: flex; gap: 2px; background: var(--bg-surface); border-radius: 6px; padding: 2px;
}
.studio-view-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: none; background: transparent;
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 500;
  border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.studio-view-btn:hover { color: var(--text-primary); }
.studio-view-btn.active { background: var(--bg-surface-2); color: var(--accent-gold); }

/* Right sidebar toggle in header */
.studio-right-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 6px; border-radius: 4px; transition: all 0.15s;
}
.studio-right-toggle:hover { color: var(--text-primary); background: var(--bg-surface); }

/* Chat Panel */
.studio-chat-panel {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.studio-messages {
  flex: 1; overflow-y: auto; padding: 20px;
}
/* Project Panel */
.studio-project-panel {
  flex: 1; overflow: auto; padding: 20px; display: flex;
  flex-direction: column;
}
.studio-project-content {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

/* RIGHT SIDEBAR */
.studio-right-sidebar {
  background: var(--bg-surface-2);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s ease;
}
.studio-rs-section {
  padding: 8px 0;
}
.studio-rs-section + .studio-rs-section {
  border-top: 1px solid var(--border-color);
}
.studio-rs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  padding: 4px 0;
}
.studio-rs-header svg { color: var(--text-muted); flex-shrink: 0; }
.studio-rs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.studio-rs-empty {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 8px 4px;
}
.studio-rs-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.studio-rs-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.studio-rs-item svg { color: var(--text-muted); flex-shrink: 0; }
.studio-rs-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.studio-rs-file:hover { background: var(--bg-surface); }
.studio-rs-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-rs-file-size { font-size: 10px; color: var(--text-muted); }

@media (max-width: 1024px) {
  .studio-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
  .studio-layout { grid-template-columns: 0px 1fr; }
  .studio-sidebar { display: none; }
}

/* Social Mode Grid */
.studio-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 20px;
}
.studio-social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: 12px;
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.studio-social-card:hover {
  background: var(--bg-surface-3, rgba(255,255,255,0.06));
  transform: translateY(-2px);
}
.studio-social-icon { width: 32px; height: 32px; }
.studio-social-icon svg { width: 32px; height: 32px; }
.studio-social-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.studio-social-status {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 500;
}

/* Chat Messages */
.studio-msg {
  margin-bottom: 16px; padding: 12px 16px; border-radius: 12px;
  font-size: var(--text-sm); line-height: 1.6;
}
.studio-msg.user {
  background: var(--bg-surface-2); margin-left: 40px;
  border-bottom-right-radius: 4px;
}
.studio-msg.assistant {
  background: transparent; margin-right: 40px;
  border-bottom-left-radius: 4px;
}
.studio-msg-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 10px; color: var(--text-muted);
}

/* Input Area */
.studio-input-area {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-color);
}
.studio-prompt-bar {
  display: flex; align-items: flex-end; gap: 8px;
}
.studio-prompt-input {
  flex: 1; background: var(--bg-surface-2); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 10px 14px; color: var(--text-primary);
  font-size: var(--text-sm); font-family: inherit; resize: none;
  transition: border-color 0.15s; box-sizing: border-box;
  max-height: 120px;
}
.studio-prompt-input:focus { outline: none; border-color: var(--accent-gold); }
.studio-generate-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-gold); border: none; color: #000;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.studio-generate-btn:hover { filter: brightness(1.1); transform: scale(1.05); }
.studio-generate-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.studio-input-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; font-size: 10px; color: var(--text-muted);
}
.studio-credits-info { font-size: 10px; }
.studio-tier-badge {
  padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 10px;
}
.studio-tier-badge.mini { background: rgba(107,114,128,0.15); color: #9CA3AF; }
.studio-tier-badge.pro { background: rgba(16,185,129,0.15); color: #10B981; }
.studio-tier-badge.max { background: rgba(139,92,246,0.15); color: #8B5CF6; }
.studio-tier-badge.max_pro { background: rgba(245,158,11,0.15); color: #F59E0B; }

/* Preview Panel */
.studio-preview-panel {
  flex: 1; overflow: auto; padding: 20px; display: flex;
  align-items: center; justify-content: center;
}
.studio-preview-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; color: var(--text-muted); font-size: var(--text-sm);
}
.studio-result-area { width: 100%; }
.studio-result-area img { max-width: 100%; border-radius: 8px; }
.studio-result-area video { max-width: 100%; border-radius: 8px; }
.studio-select {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}
.studio-gen-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}
.studio-gen-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.studio-gen-btn.generating { opacity: 0.7; pointer-events: none; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Studio result */
.studio-result-area {
  background: var(--bg-surface-2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.studio-result-media { margin-bottom: 12px; }
.studio-result-img, .studio-result-video {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}
.studio-result-audio { width: 100%; }
.studio-result-meta {
  display: flex;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 12px;
}
.studio-result-actions { display: flex; gap: 8px; }
.studio-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-surface-3);
  color: var(--text-primary);
  border: none;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.studio-action-btn:hover { background: var(--bg-surface); }
.studio-action-btn.gold { background: var(--accent-gold); color: #000; }
.studio-action-btn.gold:hover { filter: brightness(1.1); }
.studio-error {
  color: var(--accent-red);
  padding: 16px;
  font-size: var(--text-sm);
}

/* Gallery sidebar */
.studio-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.studio-gallery-count {
  font-size: var(--text-xs);
  background: var(--bg-surface-3);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}
.studio-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.studio-gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface-3);
  position: relative;
  transition: transform 0.15s;
}
.studio-gallery-item:hover { transform: scale(1.03); }
.studio-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-video-thumb, .gallery-audio-thumb {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.gallery-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 9px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 12px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ═══════════════════════════════════════════════════════════════
   STITCH DESIGN MODE — Preview & Screen Cards
   ═══════════════════════════════════════════════════════════════ */
.stitch-refresh-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-md);
  background: var(--bg-surface-2); border: 1px solid var(--border-color);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.stitch-refresh-btn:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
.stitch-result { padding: 16px; }
.stitch-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.stitch-result-title {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--text-md); font-weight: 600; color: var(--text-primary);
}
.stitch-open-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-md);
  background: var(--accent-gold); color: #000;
  font-size: var(--text-xs); font-weight: 600;
  text-decoration: none; transition: all 0.15s;
}
.stitch-open-btn:hover { filter: brightness(1.15); }
.stitch-preview-img {
  border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 16px; background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
}
.stitch-preview-img img {
  width: 100%; display: block;
}
.stitch-raw-result {
  padding: 12px; border-radius: var(--radius-md);
  background: var(--bg-surface-2); color: var(--text-secondary);
  font-size: var(--text-xs); white-space: pre-wrap;
  max-height: 200px; overflow-y: auto;
}
.stitch-screens-header {
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.stitch-screens-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.stitch-screen-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 12px; border-radius: var(--radius-lg);
  background: var(--bg-surface-2); border: 1px solid var(--border-color);
  cursor: pointer; transition: all 0.15s; gap: 8px;
}
.stitch-screen-card:hover {
  border-color: var(--accent-gold);
  background: rgba(212,160,23,0.06);
}
.stitch-screen-icon { color: var(--text-muted); }
.stitch-screen-card:hover .stitch-screen-icon { color: var(--accent-gold); }
.stitch-screen-name {
  font-size: var(--text-xs); color: var(--text-secondary);
  text-align: center; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 100%;
}
.stitch-screen-detail { padding: 0; }
.stitch-screen-detail-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-color);
  font-size: var(--text-sm); font-weight: 600; color: var(--text-primary);
}
.stitch-back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-md);
  background: var(--bg-surface-2); border: 1px solid var(--border-color);
  color: var(--text-secondary); font-size: var(--text-xs); cursor: pointer;
  transition: all 0.15s;
}
.stitch-back-btn:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.stitch-code-section { padding: 16px; }
.stitch-code-header {
  font-size: var(--text-xs); font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.stitch-code {
  background: var(--bg-base); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 14px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px; line-height: 1.5; color: var(--text-secondary);
  overflow-x: auto; max-height: 400px;
  white-space: pre; margin: 0;
}
.stitch-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--text-muted); font-size: var(--text-sm); gap: 12px;
}
.stitch-spinner {
  width: 24px; height: 24px; border: 2px solid var(--border-color);
  border-top-color: var(--accent-gold); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stitch-error {
  padding: 32px 20px; text-align: center;
  color: var(--error, #ef4444); font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════
   SOCIAL COMPOSER MODAL
   ═══════════════════════════════════════════════════════════════ */
.social-composer-modal {
  max-width: 560px;
  width: 90vw;
}
.social-composer-header {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.social-post-textarea {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  resize: vertical;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.social-post-textarea:focus { outline: none; border-color: var(--accent-gold); }
.social-select-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.social-platform-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.social-plat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}
.social-plat-chip:hover { border-color: var(--text-secondary); }
.social-plat-chip.selected {
  border-color: var(--accent-gold);
  background: rgba(212,160,23,0.08);
}
.social-plat-chip.disconnected {
  opacity: 0.5;
  border-style: dashed;
}
.social-plat-chip.disconnected:hover { opacity: 0.8; }
.plat-connect-hint {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 600;
}
.social-composer-actions { display: flex; gap: 10px; }
.social-post-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.social-post-btn:hover { filter: brightness(1.1); }
.social-cancel-btn {
  padding: 10px 20px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  font-size: var(--text-sm);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   CONNECTORS VIEW — Social Platform Management
   ═══════════════════════════════════════════════════════════════ */
.connectors-layout {
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.connectors-header { margin-bottom: 32px; }
.connectors-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.connectors-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.connectors-category {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 24px 0 12px;
}
.connectors-category:first-child { margin-top: 0; }
.connectors-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.connector-platform-card {
  background: var(--bg-surface-2);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.15s;
}
.connector-platform-card:hover { background: var(--bg-surface-3); }
.connector-platform-card.connected { border-left: 3px solid var(--accent-green); }
.connector-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.connector-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.connector-info { flex: 1; min-width: 0; }
.connector-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.connector-account {
  font-size: var(--text-xs);
  color: var(--accent-green);
  font-weight: 500;
}
.connector-scopes {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.connector-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.connector-status.on { color: var(--accent-green); background: rgba(57,255,20,0.08); }
.connector-status.off { color: var(--text-muted); background: var(--bg-surface-3); }
.connector-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.connector-feature-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--bg-surface-3);
  color: var(--text-secondary);
  border-radius: 4px;
}
.connector-actions { display: flex; }
.connector-btn {
  width: 100%;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.connector-btn.connect {
  background: var(--accent-gold);
  color: #000;
}
.connector-btn.connect:hover { filter: brightness(1.1); }
.connector-btn.connected {
  background: var(--bg-surface-3);
  color: var(--text-muted);
}
.connector-btn.connected:hover { color: var(--accent-red); }

/* Modal overlay (reuse for social composer + domain modal) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }

/* Vertical Selector Modal */
.vertical-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface-2);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vertical-option:hover {
  border-color: rgba(255, 215, 9, 0.3);
  background: rgba(255, 215, 9, 0.04);
}
.vertical-option.selected {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 9, 0.08);
}
.vertical-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.vertical-option-info {
  flex: 1;
}
.vertical-option-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.vertical-option-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.vertical-option-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle, rgba(255,255,255,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.vertical-option.selected .vertical-option-check {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

/* Enhanced Welcome View */
.welcome-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0;
  text-align: left;
}
.welcome-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.welcome-feature svg {
  flex-shrink: 0;
  color: var(--accent-gold);
}
.welcome-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 215, 9, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-content {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

/* Responsive */
@media (max-width: 768px) {
  .studio-layout { grid-template-columns: 1fr; }
  .studio-sidebar { display: none; }
  .studio-content-header { flex-direction: column; gap: 8px; align-items: flex-start; }
  .studio-control-row { flex-direction: column; }
  .connectors-layout { padding: 16px; }
  .connectors-cat-grid { grid-template-columns: 1fr; }
}


/* Metering — Credit Cost Display */
.studio-credit-cost {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-gold);
  opacity: 0.8;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(212,160,23,0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212,160,23,0.1);
}
.studio-credit-cost svg { flex-shrink: 0; }
/* ============================================================================
   AUTH MODAL — SaintSal™ Labs Login/Signup
   ============================================================================ */

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: authFadeIn 0.2s ease;
}
.auth-modal-overlay.auth-modal-closing {
  animation: authFadeOut 0.2s ease forwards;
}

@keyframes authFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes authFadeOut { from { opacity: 1; } to { opacity: 0; } }

.auth-modal {
  background: #111;
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  position: relative;
  animation: authSlideUp 0.25s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

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

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.auth-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.auth-modal-header {
  padding: 32px 32px 16px;
  text-align: center;
}

.auth-modal-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: transparent;
  border: none;
}

.auth-modal-brand {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 0.5px;
}
.auth-modal-brand .labs-green {
  color: #39ff14;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.auth-modal-subtitle {
  color: #888;
  font-size: 14px;
  margin-top: 4px;
}

.auth-modal-body {
  padding: 8px 32px 24px;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  border-color: rgba(212, 160, 23, 0.5);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}
.auth-field input::placeholder {
  color: #555;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #d4a017, #b8860b);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.3);
}
.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top: 2px solid #000;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #555;
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.auth-magic-btn {
  width: 100%;
  padding: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #ccc;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-magic-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.auth-google-btn {
  width: 100%;
  padding: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #ccc;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.auth-google-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.auth-google-btn svg {
  flex-shrink: 0;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #888;
}
.auth-switch a {
  color: #d4a017;
  text-decoration: none;
  font-weight: 600;
}
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-success {
  background: rgba(57, 255, 20, 0.06);
  border: 1px solid rgba(57, 255, 20, 0.2);
  color: #39ff14;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-modal-footer {
  padding: 16px 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.auth-tier-info {
  font-size: 12px;
  color: #666;
}

.auth-free-badge {
  display: inline-block;
  background: rgba(57, 255, 20, 0.1);
  color: #39ff14;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

/* ─── Plan Tier Badges ─────────────────────────────────────────────────── */
.tier-free { background: rgba(255,255,255,0.06); color: #888; }
.tier-starter { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.tier-pro { background: rgba(212, 160, 23, 0.15); color: #d4a017; }
.tier-teams { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.tier-enterprise { background: rgba(57, 255, 20, 0.12); color: #39ff14; }

/* ─── Toast Notifications ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  max-width: 360px;
}
.toast-visible {
  transform: translateX(0);
}

.toast-success {
  background: #111;
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: #39ff14;
}
.toast-info {
  background: #111;
  border: 1px solid rgba(212, 160, 23, 0.3);
  color: #d4a017;
}
.toast-error {
  background: #111;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ─── Account View Auth Section ────────────────────────────────────────── */
.auth-prompt-section {
  text-align: center;
  padding: 40px 20px;
}
.auth-prompt-section .auth-prompt-title {
  font-size: 20px;
  font-weight: 700;
  color: #d4a017;
  margin-bottom: 8px;
}
.auth-prompt-section .auth-prompt-desc {
  color: #888;
  font-size: 14px;
  margin-bottom: 24px;
}
.auth-prompt-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.auth-prompt-buttons button {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.auth-btn-primary {
  background: linear-gradient(135deg, #d4a017, #b8860b);
  border: none;
  color: #000;
}
.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}
.auth-btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
}
.auth-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
}

/* Logout button in account view */
.account-logout-btn {
  margin-top: 24px;
  padding: 10px 24px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #ef4444;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.account-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   STUDIO — Mode Tabs, Controls, Messages Empty State
   ═══════════════════════════════════════════════════════════════ */

.studio-mode-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.studio-mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}
.studio-mode-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.studio-mode-btn.active {
  background: var(--bg-surface);
  color: var(--accent-gold);
}
.studio-mode-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}
.studio-mode-btn.active svg { opacity: 1; }

/* Studio Controls Row (mode-specific selects) */
.studio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.studio-control-select {
  flex: 1;
  min-width: 120px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.studio-control-select:focus { outline: none; border-color: var(--accent-gold); }

/* Messages empty state */
.studio-messages-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--text-faint);
  font-size: var(--text-sm);
}
.studio-messages-empty svg { opacity: 0.4; }

/* Studio Showcase Cards */
.studio-showcase { width: 100%; max-width: 520px; padding: 0 var(--space-4); }
.studio-showcase-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.studio-showcase-title svg { opacity: 1; }
.studio-showcase-sub { color: var(--text-muted); font-size: var(--text-sm); margin-bottom: var(--space-6); }
.studio-showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.studio-showcase-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border-radius: var(--radius-lg);
  background: var(--surface-1); border: 1px solid var(--border-subtle);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.studio-showcase-card:hover { border-color: var(--border-hover); background: var(--surface-2); }
.showcase-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.showcase-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.showcase-card-desc { font-size: 11px; color: var(--text-muted); line-height: 1.3; }

/* ═══════════════════════════════════════════════════════════════
   VOICE AI VIEW
   ═══════════════════════════════════════════════════════════════ */

.voice-view {
  overflow-y: auto;
}
.voice-inner {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) 0;
}
.voice-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}
.voice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}
.voice-model-select {
  flex-shrink: 0;
}
.voice-model-dropdown {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
}
.voice-model-dropdown:focus { outline: none; border-color: var(--accent-gold); }

/* Voice Stage — orb + waveform */
.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) 0;
  flex-shrink: 0;
}
.voice-orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.voice-orb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  /* Gold gradient border via box-shadow */
  box-shadow: 0 0 0 2px var(--accent-gold), 0 0 20px rgba(212,160,23,0.2);
}
.voice-orb:hover {
  box-shadow: 0 0 0 3px var(--accent-gold), 0 0 32px rgba(212,160,23,0.35);
  transform: scale(1.04);
}
.voice-orb.active {
  box-shadow: 0 0 0 3px var(--accent-gold), 0 0 40px rgba(212,160,23,0.45);
  background: var(--accent-gold-dim);
}
.voice-orb svg { color: var(--text-primary); position: relative; z-index: 1; }
.voice-orb.active svg { color: var(--accent-gold); }

/* Pulse rings */
.voice-orb-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,160,23,0.3);
  animation: voicePulse 2s ease-out infinite;
  pointer-events: none;
}
.voice-ring-2 {
  inset: -16px;
  border-color: rgba(212,160,23,0.15);
  animation-delay: 0.5s;
}
.voice-orb.active .voice-orb-ring {
  animation-duration: 1.2s;
  border-color: rgba(212,160,23,0.5);
}
@keyframes voicePulse {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

.voice-cta-label {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.voice-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.voice-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.3s;
}

/* Waveform */
.voice-waveform {
  width: 100%;
  max-width: 400px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.waveform-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 100%;
}
.wbar {
  display: inline-block;
  width: 3px;
  height: 4px;
  background: var(--text-faint);
  border-radius: 2px;
  transition: height 0.15s ease, background 0.3s;
}
.wbar.active {
  background: var(--accent-gold);
  animation: waveAnim 0.6s ease-in-out infinite alternate;
}
@keyframes waveAnim {
  from { height: 4px; }
  to { height: var(--wh, 20px); }
}

/* Transcript */
.voice-transcript-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: var(--space-4);
}
.voice-transcript-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
  flex-shrink: 0;
}
.voice-transcript {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-surface-2);
  border-radius: 10px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 120px;
}
.voice-transcript-empty {
  color: var(--text-faint);
  font-size: var(--text-sm);
  text-align: center;
  margin: auto;
}
.voice-transcript-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vt-role {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.voice-transcript-user .vt-role { color: var(--accent-gold); }
.voice-transcript-sal .vt-role,
.voice-transcript-system .vt-role { color: var(--accent-blue); }
.vt-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.5;
}

/* Voice Input Bar */
.voice-input-bar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4) 0 var(--space-5);
  flex-shrink: 0;
}
.voice-text-input {
  flex: 1;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  transition: border-color 0.15s;
}
.voice-text-input:focus { outline: none; border-color: var(--accent-gold); }
.voice-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.voice-send-btn:hover { filter: brightness(1.1); transform: scale(1.05); }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD VIEW
   ═══════════════════════════════════════════════════════════════ */

.dashboard-view {
  overflow-y: auto;
}
.dashboard-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Welcome Banner */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  gap: var(--space-4);
}
.dash-welcome-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gold-dim);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent-gold);
  flex-shrink: 0;
}
.dash-greeting {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dash-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.dash-cta-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-gold);
  color: #000;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.dash-cta-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Stats Row */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.dash-stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.dash-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-stat-content { flex: 1; min-width: 0; }
.dash-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.dash-stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

/* Two Column Layout */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* Section */
.dash-section {
  background: var(--bg-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.dash-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.dash-section-action {
  font-size: var(--text-xs);
  color: var(--accent-gold);
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}
.dash-section-action:hover { background: var(--accent-gold-dim); }

/* Saved Search Cards */
.dash-saved-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.dash-saved-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: background 0.15s;
}
.dash-saved-card:hover { background: var(--bg-surface-3); }
.dash-saved-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.dash-saved-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-vertical-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.dash-saved-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.dash-rerun-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--accent-gold);
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
  transition: opacity 0.15s;
}
.dash-rerun-btn:hover { opacity: 0.75; }

/* Activity Feed */
.dash-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dash-activity-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  position: relative;
}
.dash-activity-item + .dash-activity-item {
  border-top: 1px solid var(--border-color);
}
.dash-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.dash-activity-content { flex: 1; min-width: 0; }
.dash-activity-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.4;
}
.dash-activity-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Preferences */
.dash-prefs {
  grid-column: 1 / -1;
}
.dash-prefs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.dash-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
}
.dash-pref-info { flex: 1; min-width: 0; }
.dash-pref-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.dash-pref-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Dashboard Toggle */
.dash-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-surface-3);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.dash-toggle.on { background: var(--accent-green); }
.dash-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.dash-toggle.on .dash-toggle-knob { transform: translateX(18px); }

/* Responsive Dashboard */
@media (max-width: 900px) {
  .dash-stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-two-col { grid-template-columns: 1fr; }
  .dash-prefs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-stats-row { grid-template-columns: 1fr 1fr; }
  .dash-welcome { flex-direction: column; align-items: flex-start; }
}

/* ═══ PROFILE AVATAR UPLOAD ═══ */
.profile-avatar-wrap {
  position: relative; cursor: pointer; border-radius: 50%; overflow: hidden;
  width: 64px; height: 64px; flex-shrink: 0;
}
.profile-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 24px; font-weight: 800; background: var(--accent-gold);
  color: #000; overflow: hidden;
}
.profile-avatar-lg img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.profile-avatar-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  opacity: 0; transition: opacity 0.2s; color: #fff; font-size: 10px; font-weight: 600;
}
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }
.profile-edit-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-color);
  background: transparent; color: var(--text-secondary); font-size: 11px; cursor: pointer;
  transition: all 0.15s;
}
.profile-edit-btn:hover { border-color: var(--accent-gold); color: var(--text-primary); }

/* ============================================
   LANDING PAGE — Social Showcase
   ============================================ */
.landing-view { overflow-y: auto; }
.landing-container {
  max-width: 960px; margin: 0 auto; padding: 60px 24px 40px;
}
.landing-hero {
  text-align: center; padding: 48px 0 56px;
}
.landing-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: rgba(212,160,23,0.1); color: var(--accent-gold);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 20px;
}
.landing-title {
  font-size: 52px; font-weight: 900; color: var(--text-primary);
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px;
}
.landing-labs {
  color: var(--accent-green, #22c55e); font-family: 'Orbitron', var(--font-display), sans-serif;
}
.landing-subtitle {
  font-size: 18px; color: var(--text-secondary); max-width: 600px;
  margin: 0 auto 32px; line-height: 1.6;
}
.landing-cta-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }
.landing-cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; background: var(--accent-gold); color: #000;
  border: none; border-radius: 12px; font-size: 16px; font-weight: 800;
  cursor: pointer; transition: opacity 0.15s;
}
.landing-cta-primary:hover { opacity: 0.9; }
.landing-cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; background: var(--bg-surface-2); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.landing-cta-secondary:hover { border-color: var(--accent-gold); }
.landing-trust {
  font-size: 12px; color: var(--text-faint); letter-spacing: 0.04em;
}

/* Sections */
.landing-section { margin-bottom: 56px; }
.landing-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent-gold); margin-bottom: 20px;
}

/* Pillars Grid */
.landing-pillars-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.landing-pillar {
  padding: 24px 20px; background: var(--bg-surface); border-radius: 14px;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.landing-pillar:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.landing-pillar-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 14px;
}
.landing-pillar-name {
  font-size: 16px; font-weight: 800; color: var(--text-primary); margin-bottom: 6px;
}
.landing-pillar-desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
}

/* Studio Showcase */
.landing-studio-showcase {
  background: var(--bg-surface); border-radius: 16px; padding: 36px;
  position: relative; overflow: hidden;
}
.landing-studio-showcase::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(212,160,23,0.04), transparent 60%);
  pointer-events: none;
}
.landing-studio-hero { position: relative; z-index: 1; margin-bottom: 24px; }
.landing-studio-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 10px;
}
.landing-studio-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px;
  max-width: 500px;
}
.landing-cta-gold {
  padding: 12px 28px; background: var(--accent-gold); color: #000;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: opacity 0.15s;
}
.landing-cta-gold:hover { opacity: 0.9; }
.landing-studio-modes {
  display: flex; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1;
}
.landing-mode {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--bg-surface-2); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.landing-mode-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Stats */
.landing-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.landing-stat {
  text-align: center; padding: 24px 16px; background: var(--bg-surface);
  border-radius: 14px;
}
.landing-stat-value {
  font-size: 36px; font-weight: 900; color: var(--accent-gold);
  letter-spacing: -0.02em;
}
.landing-stat-label {
  font-size: 13px; color: var(--text-muted); margin-top: 4px;
}

/* Footer */
.landing-footer {
  text-align: center; padding: 40px 0 20px;
  border-top: 1px solid var(--border-color);
}
.landing-footer-brand {
  font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 6px;
}
.landing-footer-sub {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
}
.landing-footer-links {
  display: flex; gap: 8px; justify-content: center; font-size: 12px;
}
.landing-footer-links a { color: var(--text-secondary); text-decoration: none; }
.landing-footer-links a:hover { color: var(--accent-gold); }
.landing-footer-links span { color: var(--text-faint); }

@media (max-width: 768px) {
  .landing-title { font-size: 36px; }
  .landing-subtitle { font-size: 15px; }
  .landing-cta-row { flex-direction: column; align-items: center; }
  .landing-pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-stats-row { grid-template-columns: repeat(2, 1fr); }
  .landing-studio-showcase { padding: 24px; }
}
@media (max-width: 480px) {
  .landing-pillars-grid { grid-template-columns: 1fr; }
  .landing-container { padding: 40px 16px 30px; }
}

/* ============================================
   STUDIO BUILDER — Full-Stack Publishing
   ============================================ */
.builder-project-panel {
  padding: 24px; overflow-y: auto; flex: 1;
}
.builder-header { margin-bottom: 32px; }
.builder-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 800; color: var(--text-primary);
}
.builder-subtitle {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}
.builder-section { margin-bottom: 28px; }
.builder-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px;
}

/* Templates Grid */
.builder-templates-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.builder-template {
  padding: 18px 16px; background: var(--bg-surface-2); border-radius: 12px;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; text-align: center;
}
.builder-template:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.builder-template-icon {
  width: 44px; height: 44px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 20px;
  margin: 0 auto 10px;
}
.builder-template-name {
  font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;
}
.builder-template-desc {
  font-size: 11px; color: var(--text-muted);
}

/* Publishing Grid */
.builder-publish-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.builder-publish-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--bg-surface-2); border-radius: 12px;
  cursor: pointer; transition: all 0.15s;
}
.builder-publish-card:hover { background: var(--bg-surface-3); }
.builder-publish-icon {
  width: 40px; height: 40px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--text-primary);
}
.builder-publish-name {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.builder-publish-desc {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}

/* DNS Instructions */
.builder-dns-info {
  background: var(--bg-surface-2); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.builder-dns-step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.builder-dns-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-gold); color: #000; display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.builder-dns-step code {
  padding: 2px 6px; background: var(--bg-surface-3); border-radius: 4px;
  font-size: 12px; color: var(--accent-green);
}

/* Build Log */
.builder-log {
  background: var(--bg-surface-2); border-radius: 12px; padding: 16px;
  max-height: 200px; overflow-y: auto; font-family: monospace; font-size: 12px;
}
.builder-log-empty { color: var(--text-faint); }
.builder-log-entry {
  display: flex; gap: 10px; padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}
.builder-log-entry:last-child { border-bottom: none; }
.builder-log-time { color: var(--text-faint); white-space: nowrap; }
.builder-log-msg { color: var(--text-secondary); }
.builder-log-entry.success .builder-log-msg { color: var(--accent-green); }
.builder-log-entry.error .builder-log-msg { color: var(--accent-red); }
.builder-log-entry.info .builder-log-msg { color: var(--text-muted); }

@media (max-width: 768px) {
  .builder-templates-grid { grid-template-columns: repeat(2, 1fr); }
  .builder-publish-grid { grid-template-columns: 1fr; }
}

/* ─── Builder IDE Enhancements ──────────────────────────── */
.builder-preview-frame {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: var(--bg-secondary); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.builder-preview-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--bg-surface-2); border-bottom: 1px solid var(--border-subtle);
}
.builder-preview-dots { display: flex; gap: 6px; }
.builder-preview-dots span {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.builder-preview-url {
  flex: 1; font-size: 11px; color: var(--text-muted); font-family: 'SF Mono', Menlo, monospace;
  background: var(--bg-primary); padding: 3px 10px; border-radius: 4px;
}
.builder-code-view {
  border-radius: 8px; overflow: hidden; border: 1px solid var(--border-subtle);
}
.builder-code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: #161b22; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.builder-code-filename {
  font-size: 12px; color: var(--text-secondary); font-family: 'SF Mono', Menlo, monospace;
}
.builder-code-copy {
  font-size: 11px; padding: 3px 10px; border-radius: 4px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted); transition: all 0.15s;
}
.builder-code-copy:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.builder-gen-result { padding: 4px; }
.builder-file-card:hover { border-color: var(--accent-gold) !important; }
.studio-rs-item.file-item.active {
  background: rgba(212,160,23,0.08); border-left: 2px solid var(--accent-gold);
  padding-left: 10px;
}
.studio-rs-item.file-item { transition: background 0.15s; border-left: 2px solid transparent; }
.studio-rs-item.file-item:hover { background: rgba(255,255,255,0.03); }
.studio-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s;
}
.studio-action-btn:hover {
  background: rgba(212,160,23,0.12); border-color: var(--accent-gold); color: var(--accent-gold);
}


.mobile-more-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint, #666);
  padding: 0 4px 8px;
}

/* mobile-bottom-nav:upgrade_mobile */
/* ─── Mobile Bottom Tab Navigation ──────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: var(--surface-1, #111);
  border-top: 1px solid var(--border, #222);
  padding: 4px 0 env(safe-area-inset-bottom, 8px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border: none;
  background: none;
  color: var(--text-secondary, #888);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item.active { color: var(--gold, #d4a017); }
.mobile-nav-item svg { width: 22px; height: 22px; }

.mobile-nav-more-menu {
  display: none;
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 8999;
  background: var(--surface-1, #111);
  border-top: 1px solid var(--border, #222);
  padding: 12px 16px;
  max-height: 50vh;
  overflow-y: auto;
}

.mobile-nav-more-menu.show { display: block; }

.mobile-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mobile-more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border-radius: 10px;
  background: var(--surface-2, #1a1a1a);
  border: none;
  color: var(--text-primary, #eee);
  font-size: 11px;
  cursor: pointer;
}

.mobile-more-item svg { width: 20px; height: 20px; stroke: var(--gold, #d4a017); }

/* ─── Mobile Responsive Overrides ───────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: block; }
  
  .sidebar {
    /* Use transform instead of display:none so hamburger can reveal it */
    position: fixed !important;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 100 !important;
    width: 260px;
    height: 100vh;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    display: flex !important;
  }
  
  .main-area, .main-content, [class*="main"] {
    margin-left: 0 !important;
    padding-left: 0 !important;
    width: 100% !important;
  }
  
  /* Add bottom padding so content isn't hidden behind bottom nav */
  body { padding-bottom: 70px; }

  
  .topbar {
    padding: 8px 12px;
  }
  
  .topbar-left .brand-text { display: none; }
  
  /* Chat input adjustments */
  .chat-input-area, .input-area, [class*="input-area"] {
    bottom: 64px !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  
  /* Search bar mobile */
  .search-container, .chat-input-wrapper {
    margin: 0 8px;
  }
  
  /* Landing page mobile */
  .landing-hero { padding: 20px 16px; }
  .landing-hero h1 { font-size: 24px; }
  .landing-pillars { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .landing-stats { flex-wrap: wrap; gap: 8px; }
  .landing-stat { font-size: 12px; }
  
  /* Pricing grid mobile */
  .pricing-grid, .plans-grid { grid-template-columns: 1fr !important; }
  
  /* Studio mobile */
  .studio-tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .studio-tab { flex-shrink: 0; }
  
  /* Account usage grid mobile */
  .account-usage-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Discover grid mobile */
  .discover-grid, [class*="discover-grid"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Real Estate panel mobile */
  .re-tools-grid { grid-template-columns: 1fr !important; }
  
  /* Medical tabs mobile */
  .med-tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  
  /* Connectors grid mobile */
  .connectors-grid { grid-template-columns: 1fr !important; }
  
  /* Modals on mobile */
  .modal-content, [class*="modal-content"] {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
  }
  
  /* Ticker mobile */
  .ticker-bar { font-size: 12px; }
  
  /* Hide desktop-only elements */
  .desktop-only { display: none !important; }
}

@media (max-width: 480px) {
  .landing-pillars { grid-template-columns: 1fr; }
  .mobile-more-grid { grid-template-columns: repeat(3, 1fr); }
  .account-usage-grid { grid-template-columns: 1fr; }
}

/* ─── Account Profile ─────────────────────────────────────── */
.account-guest { text-align: center; padding: 80px 20px; }
.account-guest-icon { margin-bottom: 20px; }
.account-guest-title { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.account-guest-sub { color: var(--text-secondary); font-size: 15px; margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }
.account-guest-actions { display: flex; gap: 12px; justify-content: center; }
.account-profile { padding: 24px; max-width: 700px; }
.account-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.account-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.account-plan-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; margin-top: 4px; }
.account-section { margin-bottom: 28px; }
.account-section-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.account-usage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.account-usage-card { background: var(--surface-2); border-radius: 10px; padding: 16px; text-align: center; }
.account-usage-value { font-size: 22px; font-weight: 700; color: var(--gold); }
.account-usage-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.account-billing { background: var(--surface-2); border-radius: 10px; padding: 16px; }
.account-billing-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.account-billing-row:last-of-type { border-bottom: none; margin-bottom: 12px; }
.account-settings { background: var(--surface-2); border-radius: 10px; padding: 16px; }
.account-setting-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.account-setting-row:last-child { border-bottom: none; }
.account-select { background: var(--surface-1); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; color: var(--text-primary); font-size: 13px; }
.btn-outline-sm { padding: 4px 12px; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-primary); cursor: pointer; }
.btn-outline-danger { padding: 8px 20px; border: 1px solid #EF4444; border-radius: 8px; background: transparent; color: #EF4444; cursor: pointer; font-weight: 600; }
.btn-outline-danger:hover { background: #EF4444; color: #fff; }
.account-danger { border-top: 1px solid rgba(239,68,68,0.2); padding-top: 20px; }

/* ─── Onboarding Tour ──────────────────────────────────────── */
.onboard-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; animation: fadeIn 0.3s ease; }
.onboard-overlay.fade-out { animation: fadeOut 0.3s ease forwards; }
.onboard-card { background: var(--surface-1, #1a1a1a); border: 1px solid var(--border, #333); border-radius: 16px; padding: 40px; max-width: 480px; width: 90%; text-align: center; }
.onboard-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
.onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border, #333); transition: all 0.3s; }
.onboard-dot.active { background: var(--gold, #d4a017); transform: scale(1.3); }
.onboard-dot.done { background: var(--accent-green, #22c55e); }
.onboard-icon { font-size: 48px; margin-bottom: 16px; }
.onboard-title { font-size: 22px; font-weight: 700; color: var(--text-primary, #fff); margin-bottom: 8px; }
.onboard-desc { font-size: 15px; color: var(--text-secondary, #aaa); line-height: 1.6; margin-bottom: 28px; }
.onboard-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.onboard-btn-next { padding: 10px 28px; border-radius: 8px; border: none; background: var(--gold, #d4a017); color: #000; font-weight: 600; font-size: 14px; cursor: pointer; }
.onboard-btn-back { padding: 10px 28px; border-radius: 8px; border: 1px solid var(--border, #333); background: transparent; color: var(--text-primary, #fff); font-size: 14px; cursor: pointer; }
.onboard-skip { background: none; border: none; color: var(--text-secondary, #666); font-size: 13px; cursor: pointer; }
.onboard-skip:hover { color: var(--text-primary, #fff); }

/* ─── System Messages ──────────────────────────────────────── */
.system-message { padding: 8px 14px; margin: 8px 0; background: rgba(212,160,23,0.1); border-left: 3px solid var(--gold, #d4a017); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--gold, #d4a017); display: flex; align-items: center; gap: 8px; }
.system-msg-icon { font-size: 14px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ─── Builder Attach & Mic Buttons ──────────────────────────── */
.studio-attach-btn, .studio-mic-btn {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 8px; border: 1px solid var(--border-subtle, #333);
  background: transparent; color: var(--text-secondary, #888);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.studio-attach-btn:hover { color: var(--accent-gold, #d4a017); border-color: var(--accent-gold, #d4a017); background: rgba(212,160,23,0.08); }
.studio-mic-btn:hover { color: var(--accent-green, #22c55e); border-color: var(--accent-green, #22c55e); background: rgba(34,197,94,0.08); }
.studio-mic-btn.recording { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,0.12); animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }

/* Drag-over highlight on prompt bar */
.studio-prompt-bar.drag-over {
  border: 2px dashed var(--accent-gold, #d4a017) !important;
  background: rgba(212,160,23,0.06);
}

/* ─── Upload Preview Strip ──────────────────────────────────── */
.studio-upload-preview {
  display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap;
  background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-subtle, #222);
  max-height: 120px; overflow-y: auto;
}
.upload-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px; border-radius: 8px;
  background: var(--bg-secondary, #1a1a1a); border: 1px solid var(--border-subtle, #333);
  font-size: 12px; color: var(--text-secondary, #aaa);
  animation: fadeIn 0.2s ease;
}
.upload-chip-thumb {
  width: 28px; height: 28px; border-radius: 4px; object-fit: cover;
  background: var(--bg-tertiary, #222);
}
.upload-chip-icon {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--bg-tertiary, #222); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted, #666); font-size: 12px;
}
.upload-chip-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-chip-remove {
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: rgba(239,68,68,0.2); color: #ef4444; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.upload-chip-remove:hover { background: rgba(239,68,68,0.4); }
.upload-chip.uploading { opacity: 0.6; }
.upload-chip.uploading::after {
  content: ''; width: 12px; height: 12px;
  border: 2px solid var(--border-subtle, #333); border-top-color: var(--accent-gold, #d4a017);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ─── Voice Status ──────────────────────────────────────────── */
.studio-voice-status {
  font-size: 11px; color: #ef4444; display: flex; align-items: center; gap: 4px;
}
.voice-dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: micPulse 1.2s ease-in-out infinite; }

/* ─── Social Creator Cards (overhauled) ─────────────────────── */
.social-creator-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; padding: 16px 20px;
}
.social-creator-card {
  background: var(--bg-secondary, #1a1a1a); border: 1px solid var(--border-subtle, #333);
  border-radius: 12px; padding: 16px; cursor: pointer;
  transition: all 0.2s; display: flex; flex-direction: column; gap: 10px;
}
.social-creator-card:hover { border-color: var(--accent-gold, #d4a017); transform: translateY(-2px); }
.social-creator-header { display: flex; align-items: center; gap: 10px; }
.social-creator-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.social-creator-name { font-weight: 600; font-size: 14px; color: var(--text-primary, #fff); }
.social-creator-size { font-size: 11px; color: var(--text-muted, #666); }
.social-creator-types { display: flex; gap: 4px; flex-wrap: wrap; }
.social-type-tag {
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 500;
  background: rgba(212,160,23,0.1); color: var(--accent-gold, #d4a017);
}

/* Social generation result panel */
.social-result {
  padding: 20px; animation: fadeIn 0.3s ease;
}
.social-result-image { max-width: 100%; border-radius: 8px; margin-bottom: 12px; }
.social-result-caption {
  background: var(--bg-secondary, #1a1a1a); border: 1px solid var(--border-subtle, #333);
  border-radius: 8px; padding: 12px; font-size: 14px; color: var(--text-primary, #fff);
  line-height: 1.6; white-space: pre-wrap; margin-bottom: 8px;
}
.social-result-hashtags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.social-hashtag {
  padding: 2px 8px; border-radius: 4px; font-size: 12px;
  background: rgba(34,197,94,0.1); color: var(--accent-green, #22c55e);
}
.social-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.social-result-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-subtle, #333);
  background: transparent; color: var(--text-primary, #fff); font-size: 13px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.social-result-btn:hover { border-color: var(--accent-gold, #d4a017); color: var(--accent-gold, #d4a017); }
.social-result-btn.primary { background: var(--accent-gold, #d4a017); color: #000; border-color: var(--accent-gold, #d4a017); font-weight: 600; }
.social-result-btn.primary:hover { opacity: 0.9; }

/* Social generation loading */
.social-generating {
  padding: 40px 20px; text-align: center; color: var(--text-muted, #666);
}
.social-generating-spinner {
  width: 32px; height: 32px; border: 3px solid var(--border-subtle, #333);
  border-top-color: var(--accent-gold, #d4a017); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 12px;
}

/* Social platform picker in prompt area */
.social-platform-picker {
  display: flex; gap: 6px; padding: 8px 0; flex-wrap: wrap;
}
.social-plat-btn {
  padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-subtle, #333);
  background: transparent; color: var(--text-secondary, #888); font-size: 12px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 4px;
}
.social-plat-btn:hover, .social-plat-btn.active { border-color: var(--accent-gold, #d4a017); color: var(--accent-gold, #d4a017); background: rgba(212,160,23,0.08); }

/* ════════════════════════════════════════════════════════════════════
   REAL ESTATE PILLAR — Complete Styles
   ════════════════════════════════════════════════════════════════════ */

/* Override discover-grid when RE panel is loaded */
.discover-grid:has(.re-industry-grid),
.discover-grid:has(.re-tabs) {
  display: block !important;
  grid-template-columns: unset !important;
}

/* Also target via class for browsers without :has */
.discover-grid .home-hero {
  grid-column: 1 / -1;
}
.discover-grid .re-industry-grid,
.discover-grid .re-showcase-row,
.discover-grid .re-tabs,
.discover-grid .re-tab-panel {
  grid-column: 1 / -1;
}

/* ── Hero badge red variant ── */
.home-hero-badge.red { background: rgba(239,68,68,0.1); color: var(--accent-red, #ef4444); }

/* ── Industry Tiles (3 feature cards) ── */
.re-industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.re-industry-tile {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-industry-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-surface-2);
}
.re-industry-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
}
.re-industry-content {
  padding: var(--space-4);
}
.re-industry-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: var(--space-1);
}
.re-industry-label.hot { color: var(--accent-red, #ef4444); }
.re-industry-label.blue { color: var(--accent-blue); }
.re-industry-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.re-industry-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Showcase Row (example searches + deal analyzer) ── */
.re-showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.re-showcase-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Example search cards */
.re-example-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-example-card:hover {
  background: var(--bg-surface-2);
  transform: translateX(4px);
}
.re-example-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.re-example-body { flex: 1; min-width: 0; }
.re-example-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.re-example-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Deal analyzer preview */
.re-deal-preview {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-deal-preview:hover {
  background: var(--bg-surface-2);
  box-shadow: var(--shadow-md);
}
.re-deal-preview-header {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.re-deal-preview-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.re-deal-preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.re-deal-metric { text-align: center; }
.re-deal-metric-val {
  font-size: var(--text-lg);
  font-weight: 800;
}
.re-deal-metric-val.grade {
  font-size: var(--text-xl);
}
.re-deal-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.re-deal-preview-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-green);
}

/* CookinCapital CTA */
.re-cookin-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, rgba(239,68,68,0.06), rgba(212,160,23,0.06));
  border-radius: var(--radius-lg);
  margin-top: var(--space-3);
}
.re-cookin-logo { font-size: 28px; flex-shrink: 0; }
.re-cookin-body { flex: 1; min-width: 0; }
.re-cookin-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.re-cookin-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.re-cookin-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--accent-gold);
  color: var(--bg-base);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-cookin-btn:hover {
  background: var(--accent-gold-hover, #c4940f);
  transform: scale(1.03);
}

/* ── Tab Navigation ── */
.re-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  margin-bottom: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}
.re-tabs::-webkit-scrollbar { display: none; }
.re-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}
.re-tab-btn.active {
  color: var(--accent-gold);
  background: rgba(212,160,23,0.1);
  font-weight: 600;
}

/* ── Tab Panels ── */
.re-tab-panel {
  display: none;
}
.re-tab-panel.active {
  display: block;
}

/* ── Search Bar ── */
.re-search-bar {
  margin-bottom: var(--space-4);
}
.re-search-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}
.re-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
}
.re-search-input::placeholder { color: var(--text-muted); }
.re-search-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--accent-gold);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-search-btn:hover { background: var(--accent-gold-hover, #c4940f); }
.re-filters {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.re-filter-select, .re-filter-input {
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}
.re-filter-select:focus, .re-filter-input:focus {
  border-color: var(--accent-gold);
}
.re-search-results {
  min-height: 100px;
}

/* ── Empty / Loading States ── */
.re-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
}
.re-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
}
.re-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border-subtle, #333);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Results Header ── */
.re-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ── Property Cards Grid ── */
.re-property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.re-property-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-property-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface-2);
}
.re-property-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.re-property-img.re-no-img {
  background: var(--bg-surface-2);
}
.re-property-status {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  padding: 2px 8px;
  background: rgba(57,255,20,0.85);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.re-property-status.rental {
  background: rgba(59,130,246,0.85);
  color: #fff;
}
.re-property-body {
  padding: var(--space-3) var(--space-4);
}
.re-property-price {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 2px;
}
.re-property-price.rental { color: var(--accent-blue); }
.re-property-addr {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 2px;
}
.re-property-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.re-property-meta {
  display: flex;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.re-card-actions {
  display: flex;
  gap: var(--space-2);
}

/* Small action buttons */
.re-btn-sm {
  padding: 4px 10px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.re-btn-sm:hover { color: var(--text-primary); border-color: var(--text-muted); }
.re-btn-sm.accent-green {
  background: rgba(57,255,20,0.08);
  border-color: rgba(57,255,20,0.2);
  color: var(--accent-green);
}
.re-btn-sm.accent-green:hover {
  background: rgba(57,255,20,0.15);
}
.re-btn-sm.outline {
  background: transparent;
}

/* ── Comps / Valuation Panel ── */
.re-comps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.re-comps-address {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
}
.re-comps-actions-bar {
  display: flex;
  gap: var(--space-2);
}
.re-val-rent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.re-val-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.re-val-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.re-val-main-value {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--accent-gold);
}
.re-val-main-value.rent { color: var(--accent-blue); }
.re-val-main-value span { font-size: var(--text-sm); font-weight: 500; }
.re-val-range {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}
.re-val-ppsf {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.re-val-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}
.re-val-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--space-4) 0;
}
.re-val-rule {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.re-val-rule.pass { background: rgba(57,255,20,0.06); }
.re-val-rule.fail { background: rgba(239,68,68,0.06); }
.re-val-rule-label { color: var(--text-secondary); font-weight: 500; }
.re-val-rule-value { font-weight: 700; color: var(--text-primary); }
.re-val-rule-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.re-val-rule.pass .re-val-rule-badge { background: var(--accent-green); color: #000; }
.re-val-rule.fail .re-val-rule-badge { background: var(--accent-red, #ef4444); color: #fff; }

/* Comp cards grid */
.re-comps-section { margin-bottom: var(--space-5); }
.re-comps-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}
.re-comps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.re-comp-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.re-comp-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.re-comp-price {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--accent-gold);
}
.re-comp-addr {
  font-size: 13px;
  color: var(--text-primary);
  margin: var(--space-1) 0;
  line-height: 1.3;
}
.re-comp-meta {
  display: flex;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.re-comp-detail {
  display: flex;
  gap: var(--space-3);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

/* ── Distressed Deals ── */
.re-distressed-controls {
  margin-bottom: var(--space-4);
}
.re-distressed-chips {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.re-distressed-chip {
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-distressed-chip:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.re-distressed-chip.active {
  background: rgba(212,160,23,0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}
.re-distressed-filters {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
}
.re-distressed-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.re-stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}
.re-stat-value {
  font-size: var(--text-lg);
  font-weight: 800;
}
.re-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.re-distressed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}
.re-distressed-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-distressed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.re-distressed-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.re-distressed-type-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
}
.re-distressed-type-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.re-distressed-type-badge.foreclosure { background: var(--accent-red, #ef4444); color: #fff; }
.re-distressed-type-badge.pre_foreclosure { background: var(--accent-amber, #f59e0b); color: #000; }
.re-distressed-type-badge.tax_lien { background: var(--accent-purple, #a855f7); color: #fff; }
.re-distressed-type-badge.nod { background: var(--accent-blue, #3b82f6); color: #fff; }
.re-distressed-status-badge {
  padding: 2px 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}
.re-distressed-body {
  padding: var(--space-3) var(--space-4);
}
.re-distressed-price {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: var(--space-2);
}
.re-distressed-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.re-kpi-label { color: var(--text-secondary); }
.re-kpi-value { font-weight: 600; color: var(--text-primary); }
.re-kpi-value.red { color: var(--accent-red, #ef4444); }
.re-distressed-kpi.good { background: rgba(57,255,20,0.04); padding: 4px 6px; border-radius: 4px; }
.re-distressed-kpi.warn { background: rgba(245,158,11,0.06); padding: 4px 6px; border-radius: 4px; }
.re-distressed-discount {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: var(--space-1);
}
.re-distressed-addr {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
  margin-top: var(--space-2);
  line-height: 1.3;
}
.re-distressed-location {
  font-size: 12px;
  color: var(--text-muted);
}
.re-distressed-specs {
  display: flex;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}
.re-distressed-actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle, #222);
}

/* ── Deal Calculator ── */
.calc-form {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.calc-form-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.calc-form-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.calc-field { display: flex; flex-direction: column; gap: 4px; }
.calc-field.full { grid-column: 1 / -1; }
.calc-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.calc-field input {
  padding: 8px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
}
.calc-field input:focus { border-color: var(--accent-gold); }
.calc-analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--accent-green), #22c55e);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.calc-analyze-btn:hover { transform: scale(1.01); box-shadow: 0 4px 20px rgba(57,255,20,0.3); }

/* Calculator results */
.calc-results {
  margin-top: var(--space-4);
}
.calc-results-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.calc-grade {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--text-xl);
  font-weight: 900;
  flex-shrink: 0;
}
.calc-verdict-wrap { flex: 1; }
.calc-verdict {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.calc-badges { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.calc-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.calc-badge.pass { background: rgba(57,255,20,0.1); color: var(--accent-green); }
.calc-badge.fail { background: rgba(239,68,68,0.1); color: var(--accent-red, #ef4444); }
.calc-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.calc-metric {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
}
.calc-metric.positive { border-left: 3px solid var(--accent-green); }
.calc-metric.negative { border-left: 3px solid var(--accent-red, #ef4444); }
.calc-metric-value {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
}
.calc-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.calc-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}
.calc-expenses {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.calc-expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle, #1a1a1a);
}
.calc-expense-row:last-child { border-bottom: none; }
.calc-expense-row.total { font-weight: 700; color: var(--text-primary); border-top: 1px solid var(--border-subtle, #333); margin-top: var(--space-1); padding-top: var(--space-2); }
.calc-expense-row.income { color: var(--accent-blue); font-weight: 600; }
.calc-expense-row.profit { color: var(--accent-green); font-weight: 700; }
.calc-expense-row.loss { color: var(--accent-red, #ef4444); font-weight: 700; }

/* ── Market Data Panel ── */
.re-market-search {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.re-market-input {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle, #333);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
}
.re-market-input:focus { border-color: var(--accent-gold); }
.re-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.re-market-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}
.re-market-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}
.re-market-card-value {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--accent-gold);
}
.re-market-card-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}
.re-market-card-change.up { color: var(--accent-green); }
.re-market-card-change.down { color: var(--accent-red, #ef4444); }
.re-market-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  margin-top: var(--space-4);
}
.re-market-history {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  max-height: 300px;
  overflow-y: auto;
}
.re-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle, #1a1a1a);
  font-size: 13px;
}
.re-history-row:last-child { border-bottom: none; }
.re-history-date { color: var(--text-secondary); }
.re-history-val { font-weight: 600; color: var(--accent-gold); }
.re-history-val.rent { color: var(--accent-blue); }
.re-distressed-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.re-summary-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.re-summary-card:hover {
  background: var(--bg-surface-2);
  transform: translateY(-2px);
}
.re-summary-count {
  font-size: var(--text-xl);
  font-weight: 800;
}
.re-summary-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.re-market-total {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  padding: var(--space-2) 0;
}

/* ── RE Mobile Responsive ── */
@media (max-width: 768px) {
  .re-industry-grid { grid-template-columns: 1fr; }
  .re-showcase-row { grid-template-columns: 1fr; }
  .re-val-rent-grid { grid-template-columns: 1fr; }
  .re-distressed-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .re-tabs { gap: 2px; }
  .re-tab-btn { font-size: 12px; padding: 6px 8px; }
  .re-deal-preview-metrics { grid-template-columns: repeat(2, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BUSINESS CENTER — Full CorpNet Catalog
   ============================================================ */
.bc-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── Hero ── */
.bc-hero {
  text-align: center;
  margin-bottom: 28px;
}
.bc-hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-muted, #777);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 14px;
  letter-spacing: .3px;
}
.bc-hero-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff 30%, var(--accent-gold, #D4AF37));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bc-hero-sub {
  color: var(--text-muted, #777);
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Tabs ── */
.bc-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.bc-tabs::-webkit-scrollbar { display: none; }
.bc-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted, #777);
  background: transparent;
  border: 1px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.bc-tab:hover {
  color: var(--text-primary, #e0e0e0);
  background: rgba(255,255,255,.04);
}
.bc-tab.on {
  color: var(--accent-gold, #D4AF37);
  background: rgba(212,175,55,.08);
  border-color: rgba(212,175,55,.2);
}
.bc-tab-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* ── Animation ── */
.bc-anim {
  animation: bcFade .3s ease;
}
@keyframes bcFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Section Label ── */
.bc-sl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #777);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}

/* ── Package Selector ── */
.bc-pkg-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.bc-pkg {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
}
.bc-pkg:hover {
  border-color: rgba(212,175,55,.25);
  background: rgba(255,255,255,.03);
}
.bc-pkg.hl {
  border-color: var(--accent-gold, #D4AF37);
  background: rgba(212,175,55,.06);
  box-shadow: 0 0 20px rgba(212,175,55,.08);
}
.bc-pkg-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--accent-gold, #D4AF37);
  color: #000;
  white-space: nowrap;
}
.bc-pkg-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 4px;
  text-align: center;
}
.bc-pkg-name.active {
  color: var(--accent-gold, #D4AF37);
}
.bc-pkg-price {
  font-size: 12px;
  color: var(--text-muted, #777);
  margin-bottom: 12px;
  text-align: center;
}
.bc-pkg-feat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary, #999);
  margin-bottom: 6px;
  line-height: 1.4;
}
.bc-check {
  color: var(--accent-gold, #D4AF37);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
}

/* ── Speed Selector ── */
.bc-speed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.bc-speed-btns {
  display: flex;
  gap: 6px;
}
.bc-spd {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted, #777);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .2s ease;
}
.bc-spd:hover {
  color: var(--text-primary, #e0e0e0);
  border-color: rgba(255,255,255,.15);
}
.bc-spd.on {
  background: rgba(212,175,55,.1);
  color: var(--accent-gold, #D4AF37);
  border-color: rgba(212,175,55,.3);
}

/* ── Grid Header (Formation) ── */
.bc-grid-header {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 4px;
}
.bc-gh-left {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #777);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.bc-gh-col {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #777);
  text-transform: uppercase;
  letter-spacing: .4px;
  text-align: center;
}

/* ── Entity Rows ── */
.bc-erow {
  border-radius: 10px;
  margin-bottom: 4px;
  overflow: hidden;
  transition: background .2s ease;
}
.bc-erow:hover {
  background: rgba(255,255,255,.02);
}
.bc-erow.open {
  background: rgba(212,175,55,.04);
}
.bc-erow-main {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px 28px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  transition: background .15s ease;
}
.bc-erow-main:hover {
  background: rgba(255,255,255,.02);
}
.bc-erow-info {
  min-width: 0;
}
.bc-erow-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bc-erow-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
}
.bc-chip {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
}
.bc-erow-sub {
  font-size: 12px;
  color: var(--text-muted, #777);
  margin-top: 2px;
}
.bc-erow-prices {
  display: contents;
}
.bc-erow-price {
  text-align: center;
  font-size: 13px;
}
.bc-erow-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted, #777);
  transition: color .15s ease;
}
.bc-erow.open .bc-erow-toggle {
  color: var(--accent-gold, #D4AF37);
}

/* ── Expanded Detail ── */
.bc-erow-detail {
  padding: 0 12px 14px;
  animation: bcFade .2s ease;
}
.bc-erow-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.bc-btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-gold, #D4AF37), #b8941e);
  color: #000;
  text-decoration: none;
  transition: all .2s ease;
  border: none;
  cursor: pointer;
}
.bc-btn-gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.bc-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--text-primary, #e0e0e0);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.1);
  transition: all .2s ease;
  cursor: pointer;
}
.bc-btn-ghost:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.03);
}
.bc-note-inline {
  font-size: 11px;
  color: var(--text-muted, #555);
  font-style: italic;
}

/* ── Compliance Table ── */
.bc-table {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.015);
  border: 1px solid rgba(255,255,255,.04);
}
.bc-compliance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.bc-srow {
  display: grid;
  grid-template-columns: 1fr 90px 90px 90px;
  gap: 8px;
  padding: 10px 14px;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s ease;
}
.bc-srow:last-child { border-bottom: none; }
.bc-srow:hover { background: rgba(255,255,255,.02); }
.bc-srow-header {
  background: rgba(255,255,255,.03);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #777);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.bc-srow-header:hover { background: rgba(255,255,255,.03); }
.bc-srow-name {
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-srow-col {
  text-align: center;
  font-size: 13px;
}
.bc-link {
  color: var(--text-primary, #e0e0e0);
  text-decoration: none;
  transition: color .15s ease;
}
.bc-link:hover {
  color: var(--accent-gold, #D4AF37);
}
.bc-hide-mobile {}

/* ── Tax / RA rows ── */
.bc-rarow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background .15s ease;
}
.bc-rarow:last-child { border-bottom: none; }
.bc-rarow:hover { background: rgba(255,255,255,.02); }
.bc-gold-price {
  color: var(--accent-gold, #D4AF37);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* ── RA Grid ── */
.bc-ra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bc-ra-table-header {
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.bc-ra-features {
  background: rgba(255,255,255,.015);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.bc-ra-features-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 14px;
}

/* ── Trademark Cards ── */
.bc-tm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.bc-tm-card {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 20px 16px;
  transition: all .2s ease;
}
.bc-tm-card:hover {
  border-color: rgba(212,175,55,.2);
  background: rgba(255,255,255,.03);
}
.bc-tm-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #e0e0e0);
  margin-bottom: 14px;
}
.bc-tm-prices {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bc-tm-price-col {
  text-align: center;
}
.bc-tm-price-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted, #777);
  margin-bottom: 4px;
}
.bc-tm-price-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold, #D4AF37);
}

/* ── Info Box ── */
.bc-info-box {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(212,175,55,.04);
  border: 1px solid rgba(212,175,55,.1);
  font-size: 12px;
  color: var(--text-secondary, #999);
  line-height: 1.5;
  margin-top: 16px;
}

/* ── Notes ── */
.bc-note {
  font-size: 11px;
  color: var(--text-muted, #555);
  line-height: 1.5;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.04);
}

/* ── Footer ── */
.bc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,.04);
  font-size: 11px;
  color: var(--text-muted, #555);
  flex-wrap: wrap;
  gap: 8px;
}
.bc-footer a {
  color: var(--accent-gold, #D4AF37);
  text-decoration: none;
}
.bc-footer a:hover { text-decoration: underline; }
.bc-footer-right {
  font-weight: 600;
  color: var(--text-secondary, #999);
}

/* ── BC Mobile Responsive ── */
@media (max-width: 768px) {
  .bc-wrap { padding: 20px 14px; }
  .bc-hero-title { font-size: 24px; }
  .bc-hero-sub { font-size: 13px; }
  .bc-tabs { gap: 2px; }
  .bc-tab { padding: 6px 10px; font-size: 12px; }
  .bc-pkg-row { grid-template-columns: 1fr; gap: 10px; }
  .bc-grid-header { grid-template-columns: 1fr 60px 60px 60px; }
  .bc-erow-main { grid-template-columns: 1fr 60px 60px 60px 24px; font-size: 12px; }
  .bc-srow { grid-template-columns: 1fr 70px 70px; }
  .bc-hide-mobile { display: none; }
  .bc-ra-grid { grid-template-columns: 1fr; }
  .bc-tm-grid { grid-template-columns: 1fr; }
  .bc-footer { flex-direction: column; text-align: center; }
}

/* ============================================================
   VOICE ENGINE — Mic Recording, TTS, Accessibility
   ============================================================ */

/* ── Chat Mic Recording State ── */
.prompt-mic.recording {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
  animation: micPulse 1.2s ease-in-out infinite;
}
.prompt-mic.recording svg {
  stroke: #ef4444;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .3); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* ── TTS Speaker Button on Messages ── */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
}
.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
  background: transparent;
  color: var(--text-muted, #777);
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}
.tts-btn:hover {
  color: var(--accent-gold, #D4AF37);
  border-color: rgba(212,175,55,.25);
  background: rgba(212,175,55,.06);
}
.tts-btn.tts-loading {
  color: var(--accent-gold, #D4AF37);
  animation: ttsPulse 1s ease-in-out infinite;
}
.tts-btn.tts-playing {
  color: var(--accent-green, #10b981);
  border-color: rgba(16,185,129,.3);
  background: rgba(16,185,129,.08);
}
@keyframes ttsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Studio Mic Recording State ── */
.studio-mic-btn.recording {
  background: rgba(239, 68, 68, .15);
  color: #ef4444;
  animation: micPulse 1.2s ease-in-out infinite;
}

/* ═══════ Preview Viewport Toggle ═══════ */
.preview-viewport-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.preview-viewport-toggles {
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 2px;
}
.preview-vp-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.preview-vp-btn:hover { color: var(--text-primary); }
.preview-vp-btn.active {
  background: var(--bg-surface);
  color: var(--accent-gold);
}
.preview-vp-label {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}
.preview-vp-refresh {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.preview-vp-refresh:hover { color: var(--text-primary); background: var(--bg-surface); }
.preview-viewport-frame {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 16px;
  background: var(--bg-primary);
  transition: all 0.3s ease;
}
.preview-viewport-frame .studio-result-area {
  width: 100%;
  max-width: 100%;
  height: 100%;
  transition: all 0.3s ease;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.preview-viewport-frame[data-viewport="tablet"] .studio-result-area {
  max-width: 768px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
  border-radius: 16px;
}
.preview-viewport-frame[data-viewport="mobile"] .studio-result-area {
  max-width: 375px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
  border-radius: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   SAL PERSONALITY / SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */

.personality-view { background: var(--bg-base); overflow-y: auto; }
.personality-inner { min-height: 100%; }

.personality-section {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
}

.personality-label {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.personality-sublabel {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: -4px 0 var(--space-4) 0;
}

.personality-input {
  width: 100%;
  padding: 12px 60px 12px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  transition: border-color 0.2s;
}
.personality-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.personality-textarea {
  width: 100%;
  padding: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 180px;
  transition: border-color 0.2s;
}
.personality-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.personality-char-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}
.personality-section > div > .personality-char-count,
.personality-section .personality-char-count:not([style]) {
  position: static;
  transform: none;
}

.personality-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s;
}
.personality-btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.personality-btn-save {
  padding: 10px 32px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.personality-btn-save:hover {
  background: #d4a94a;
  transform: translateY(-1px);
}

.personality-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dim);
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.personality-pref-row:last-child { border-bottom: none; }

.personality-select {
  padding: 6px 28px 6px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.personality-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.personality-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-dim);
}
.personality-toggle-row:last-child { border-bottom: none; }

.personality-toggle-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.personality-toggle-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-dim);
  border-radius: 24px;
  transition: all 0.3s;
}
.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}
.toggle-switch input:checked + .toggle-slider:before {
  background: #000;
  transform: translateX(20px);
}

/* ============================================================================
   CONVERSATION SIDEBAR — Recent chats with rename/delete
   ============================================================================ */
.recent-conv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.recent-conv-item:hover {
  background: rgba(255,255,255,0.06);
}
.recent-conv-item.conv-active {
  background: rgba(16,185,129,0.12);
}
.recent-conv-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.recent-conv-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.recent-conv-title {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.recent-conv-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-conv-menu {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}
.recent-conv-item:hover .recent-conv-menu {
  opacity: 1;
}
.recent-conv-menu:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
}

/* Context Menu */
.conv-context-menu {
  position: fixed;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 140px;
}
.conv-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s;
}
.conv-menu-item:hover {
  background: rgba(255,255,255,0.08);
}
.conv-menu-delete {
  color: #ef4444;
}
.conv-menu-delete:hover {
  background: rgba(239,68,68,0.12);
}

/* Modal overlay for rename (shared with other modals) */
.modal-overlay#renameModal,
.modal-overlay#savePromptModal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  width: 90%;
}

/* Mic active state — pulsing red */
.prompt-mic.mic-active {
  animation: micPulse 1s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════
   v7.27.0 — UNIFIED BUILDER CHAT STYLES
   ═══════════════════════════════════════════════════════════════ */

.builder-chat-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-shrink: 0;
}

.builder-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.builder-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.builder-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(212, 160, 23, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 160, 23, 0.3);
}

.builder-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.builder-capabilities {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.builder-cap-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--bg-secondary);
  cursor: default;
  white-space: nowrap;
}

.builder-new-chat-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.builder-new-chat-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-gold);
}

/* Messages Area */
.builder-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px;
  scroll-behavior: smooth;
}

/* Welcome Screen */
.builder-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}

.builder-welcome-icon {
  margin-bottom: 16px;
  opacity: 0.7;
}

.builder-welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.builder-welcome-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ── Showcase Build Cards ──────────────────────────────────────── */
.builder-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 680px;
  margin-bottom: 20px;
}
.builder-showcase-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}
.builder-showcase-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.builder-showcase-preview {
  height: 140px;
  padding: 8px;
  position: relative;
  overflow: hidden;
}
.showcase-mock-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  margin-bottom: 6px;
}
.showcase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.showcase-url {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
  margin-left: 4px;
  font-family: monospace;
}

/* SaaS Preview */
.showcase-preview-saas {
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1040 50%, #0d1b2a 100%);
}
.showcase-mock-hero {
  text-align: center;
  padding: 4px;
}
.showcase-hero-badge {
  font-size: 7px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}
.showcase-hero-text {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #d4a017);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.showcase-hero-sub {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.showcase-mock-cards {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 8px;
}
.showcase-mini-card {
  width: 50px;
  height: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
}

/* Portfolio Preview */
.showcase-preview-portfolio {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 100%);
}
.showcase-mock-portfolio {
  text-align: center;
  padding: 4px;
}
.showcase-port-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.showcase-port-role {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.showcase-port-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.showcase-port-item {
  height: 22px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
}

/* Restaurant Preview */
.showcase-preview-restaurant {
  background: linear-gradient(135deg, #1a0a0a 0%, #2a1515 50%, #1a0f05 100%);
}
.showcase-mock-restaurant {
  text-align: center;
  padding: 4px;
}
.showcase-rest-brand {
  font-size: 12px;
  font-weight: 700;
  color: #f5deb3;
  font-style: italic;
}
.showcase-rest-tagline {
  font-size: 7px;
  color: rgba(245,222,179,0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.showcase-rest-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.showcase-menu-item {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  padding: 2px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Showcase Card Info */
.builder-showcase-info {
  padding: 10px 12px;
}
.builder-showcase-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.builder-showcase-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 6px;
}
.builder-showcase-tags {
  display: flex;
  gap: 4px;
}
.showcase-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.showcase-tag.tag-code {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}
.showcase-tag.tag-deploy {
  background: rgba(212,160,23,0.15);
  color: var(--accent-gold);
}

/* ── Social Showcase Row ──────────────────────────────────────── */
.builder-showcase-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  margin-top: 4px;
  width: 100%;
  max-width: 680px;
  text-align: left;
}
.builder-social-showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  margin-bottom: 20px;
}
.builder-social-showcase {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.builder-social-showcase:hover {
  border-color: var(--accent-gold);
  background: rgba(212,160,23,0.04);
}
.social-showcase-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.social-showcase-preview {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.social-showcase-meta {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.builder-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 680px;
}

.builder-quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.builder-quick-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
  background: rgba(212, 160, 23, 0.05);
}

/* Message Bubbles */
.builder-msg {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.builder-msg-user {
  display: flex;
  justify-content: flex-end;
}

.builder-msg-user .builder-msg-content {
  background: rgba(212, 160, 23, 0.12);
  border: 1px solid rgba(212, 160, 23, 0.2);
  color: var(--text-primary);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 16px;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.builder-msg-assistant {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-msg-assistant .builder-msg-content {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

/* Phase Indicator */
.builder-phase {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.builder-phase-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ═══ SaintVision Trivia Cards ═══ */
.builder-trivia-container {
  margin: 8px 0 4px 0;
  min-height: 70px;
}
.builder-trivia-card {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.builder-trivia-inner {
  background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, rgba(34,197,94,0.04) 100%);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 420px;
}
.builder-trivia-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.builder-trivia-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: contain;
}
.builder-trivia-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-gold);
  opacity: 0.85;
}
.builder-trivia-text {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Intent Badge */
.builder-intent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: fit-content;
}

/* Inline Image */
.builder-inline-image {
  max-width: 100%;
  border-radius: 12px;
  margin: 8px 0;
  cursor: pointer;
  transition: transform 0.2s;
}
.builder-inline-image:hover { transform: scale(1.01); }

/* Inline Audio */
.builder-inline-audio {
  width: 100%;
  margin: 8px 0;
  border-radius: 8px;
}

/* Inline Code Preview */
.builder-code-preview {
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
  border: 1px solid var(--border-subtle);
}

.builder-code-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.builder-code-preview-dots {
  display: flex;
  gap: 4px;
}
.builder-code-preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.builder-code-preview-label {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

.builder-code-preview iframe {
  width: 100%;
  height: 400px;
  border: none;
  background: #fff;
}

.builder-code-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-secondary);
}

.builder-code-file-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
}
.builder-code-file-tag:hover { color: var(--text-primary); }

.builder-code-file-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Code Actions */
.builder-code-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  flex-wrap: wrap;
}

.builder-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.builder-action-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.builder-action-btn.primary {
  background: var(--accent-green);
  color: #000;
  border-color: var(--accent-green);
  font-weight: 600;
}
.builder-action-btn.primary:hover {
  opacity: 0.9;
}

/* Social Result */
.builder-social-result {
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0;
  border: 1px solid var(--border-subtle);
}

.builder-social-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.builder-social-caption {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.builder-social-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}

.builder-social-hashtag {
  font-size: 11px;
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Deploy Targets */
.builder-deploy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.builder-deploy-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s;
}
.builder-deploy-card:hover {
  border-color: var(--accent-green);
  background: rgba(0, 255, 136, 0.03);
}

/* Storyboard */
.builder-storyboard {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 14px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 300px;
  overflow-y: auto;
}

/* Input Area */
.builder-input-area {
  padding: 0 20px 16px;
  flex-shrink: 0;
}

.builder-upload-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.builder-prompt-bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 8px 8px 8px 12px;
  transition: border-color 0.2s;
}
.builder-prompt-bar:focus-within {
  border-color: var(--accent-gold);
}

.builder-attach-btn, .builder-mic-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s;
}
.builder-attach-btn:hover, .builder-mic-btn:hover {
  color: var(--text-primary);
}

.builder-prompt-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 120px;
  font-family: inherit;
}
.builder-prompt-input::placeholder {
  color: var(--text-muted);
}

.builder-send-btn {
  background: var(--accent-gold);
  border: none;
  border-radius: 10px;
  color: #000;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.builder-send-btn:hover { opacity: 0.85; }
.builder-send-btn:disabled { opacity: 0.4; cursor: default; }

.builder-send-btn.generating {
  background: var(--accent-gold);
  animation: pulse-dot 1.5s infinite;
}

.builder-input-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 0;
  font-size: 10px;
  color: var(--text-muted);
}

/* ═══ Compute Tier Selector ═══ */
.builder-tier-selector {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 2px;
}
.builder-tier-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.builder-tier-pill:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.builder-tier-pill.active {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-weight: 600;
}
.builder-tier-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.builder-tier-rate {
  opacity: 0.5;
  font-size: 9px;
  font-weight: 400;
}
.builder-tier-pill.active .builder-tier-rate {
  opacity: 0.8;
}

.builder-deploy-targets {
  opacity: 0.6;
}

/* Markdown in builder messages */
.builder-msg-content pre {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}

.builder-msg-content code {
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', monospace;
}

.builder-msg-content pre code {
  background: none;
  padding: 0;
}

.builder-msg-content a {
  color: var(--accent-gold);
  text-decoration: none;
}
.builder-msg-content a:hover {
  text-decoration: underline;
}

.builder-msg-content h1, .builder-msg-content h2, .builder-msg-content h3 {
  color: var(--text-primary);
  margin: 12px 0 6px;
}

.builder-msg-content ul, .builder-msg-content ol {
  padding-left: 20px;
  margin: 6px 0;
}

.builder-msg-content blockquote {
  border-left: 3px solid var(--accent-gold);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--text-secondary);
}

.builder-msg-content strong { color: var(--text-primary); }

/* Citations */
.builder-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.builder-citation-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  text-decoration: none;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.builder-citation-link:hover {
  background: rgba(139, 92, 246, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .builder-chat-layout { max-width: 100%; }
  .builder-capabilities { display: none; }
  .builder-showcase-grid { grid-template-columns: 1fr; max-width: 100%; }
  .builder-social-showcase-row { grid-template-columns: 1fr; max-width: 100%; }
  .builder-quick-actions { grid-template-columns: 1fr; max-width: 100%; }
  .builder-showcase-section-label { max-width: 100%; }
  .builder-deploy-grid { grid-template-columns: 1fr; }
  .builder-msg-user .builder-msg-content { max-width: 90%; }
  .builder-header { padding: 10px 14px; }
  .builder-messages { padding: 0 14px 14px; }
  .builder-input-area { padding: 0 14px 12px; }
  .builder-tier-selector { gap: 1px; }
  .builder-tier-pill { padding: 3px 5px; font-size: 9px; }
  .builder-tier-rate { display: none; }
  .builder-input-meta { flex-wrap: wrap; gap: 4px; }
}

/* Mic active state */
.builder-mic-btn.recording {
  color: #ef4444;
  animation: pulse-dot 1.5s infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Career Suite v1.0
   ═══════════════════════════════════════════════════════════════════════════════ */
@keyframes csSpin {
  to { transform: rotate(360deg); }
}

.career-view {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Career Suite scrollbar */
#careerSuiteRoot ::-webkit-scrollbar { width: 4px; height: 4px; }
#careerSuiteRoot ::-webkit-scrollbar-track { background: transparent; }
#careerSuiteRoot ::-webkit-scrollbar-thumb { background: var(--border-subtle, #333); border-radius: 4px; }

/* Responsive */
@media (max-width: 640px) {
  #careerSuiteRoot { padding: 12px 10px 100px !important; }
}


/* ============================================
   ADMIN DASHBOARD v8.2
   ============================================ */
.admin-dashboard-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.admin-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-refresh-btn {
  background: var(--bg-surface-2);
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-refresh-btn:hover { background: var(--bg-surface-3); color: var(--text-primary); }
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.admin-stat-card {
  background: var(--bg-surface-2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.admin-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
}
.admin-section {
  background: var(--bg-surface-2);
  border-radius: 12px;
  padding: 20px;
}
.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.admin-add-user-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary, #333);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  flex: 1;
  min-width: 180px;
}
.admin-input:focus { border-color: var(--accent-gold); }
.admin-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary, #333);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}
.admin-select:focus { border-color: var(--accent-gold); }
.admin-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.admin-btn.primary {
  background: var(--accent-gold);
  color: #000;
}
.admin-btn.primary:hover { opacity: 0.9; }
.admin-btn.small {
  padding: 6px 12px;
  font-size: 11px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary, #333);
  margin-right: 4px;
}
.admin-btn.small:hover { color: var(--text-primary); background: var(--bg-surface-3); }
.admin-btn.small.danger { color: #ef4444; border-color: rgba(239,68,68,0.3); }
.admin-btn.small.danger:hover { background: rgba(239,68,68,0.1); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-primary, #222);
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-metering-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.admin-meter-card {
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.admin-meter-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
}
.admin-meter-rate {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.admin-meter-desc {
  font-size: 12px;
  color: var(--text-muted);
}
@media (max-width: 900px) {
  .admin-stats-row { grid-template-columns: repeat(3, 1fr); }
  .admin-metering-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .admin-metering-grid { grid-template-columns: 1fr 1fr; }
  .admin-add-user-form { flex-direction: column; }
  .admin-input { width: 100%; min-width: unset; }
}

/* ─── NAV POINTER EVENTS (position handled by flex layout + mobile media query) ─── */
#sidebar a,#sidebar button,.sidebar a,.sidebar button{pointer-events:auto!important;cursor:pointer!important;}
.bottom-nav,#bottom-nav,[id*="bottom-nav"],[class*="bottom-nav"]{position:fixed!important;bottom:0;left:0;right:0;z-index:100;pointer-events:auto!important;}

/* ─── PWA BODY PADDING ─── */
body { padding-bottom: 64px !important; }
.main-content, #main-content { padding-bottom: 64px; }

/* ─── COOKIN CARDS ANIMATIONS ─── */
@keyframes ccFloat { 0%,100%{transform:translateY(0) rotate(0deg);opacity:0.7} 50%{transform:translateY(-8px) rotate(10deg);opacity:1} }
@keyframes ccShimmer { 0%{background-position:0%} 100%{background-position:200%} }

/* ─── GROK AGENT CARDS ─── */
.agent-card {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(19,19,19,0.8);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.agent-card.agent-standby { border-color: rgba(255,255,255,0.06); opacity: 0.6; }
.agent-card.agent-active  { border-color: #22c55e; box-shadow: 0 0 16px rgba(34,197,94,0.2); opacity: 1; }
.agent-card.agent-complete{ border-color: rgba(245,158,11,0.5); box-shadow: 0 0 12px rgba(245,158,11,0.15); opacity: 1; }
.agent-card.agent-error   { border-color: rgba(239,68,68,0.5); opacity: 1; }

.agent-card-header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.agent-card-icon   { font-size:20px; flex-shrink:0; }
.agent-card-info   { flex:1; }
.agent-card-name   { font-size:11px; font-weight:900; color:#E5E5E5; letter-spacing:1.5px; }
.agent-card-status { font-size:10px; font-weight:700; margin-top:2px; }
.agent-standby .agent-card-status { color:#444; }
.agent-active  .agent-card-status { color:#22c55e; }
.agent-complete .agent-card-status{ color:#F59E0B; }
.agent-error   .agent-card-status { color:#ef4444; }
.agent-card-msg { font-size:11px; color:#555; padding-left:30px; }
.agent-active .agent-card-msg { color:#888; }
.agent-complete .agent-card-msg { color:#666; }

.agent-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(34,197,94,0.2);
  border-top-color: #22c55e;
  animation: agentSpin 0.8s linear infinite;
  flex-shrink: 0;
  transition: opacity 0.3s;
}
@keyframes agentSpin {
  0%   { transform:rotate(0deg);   box-shadow:0 0 6px rgba(34,197,94,0.4); }
  50%  { box-shadow:0 0 20px rgba(34,197,94,0.8), 0 0 40px rgba(34,197,94,0.3); }
  100% { transform:rotate(360deg); box-shadow:0 0 6px rgba(34,197,94,0.4); }
}

/* ─── iPhone 17 Pro Max (430px) + modern mobile safe area ────────────────── */
@media (max-width: 440px) {
  /* Bottom nav — safe area for home indicator */
  #bottom-nav, .mobile-bottom-nav {
    height: 80px !important;
    padding-bottom: 20px !important;
  }

  /* Touch targets — Apple HIG 44pt minimum */
  .nav-tab, .nav-link, .mobile-bottom-nav a, .mobile-bottom-nav button {
    min-height: 44px !important;
  }

  /* Sidebar */
  #sidebar {
    width: 280px !important;
    max-width: 85vw !important;
  }

  /* Chat input — stays above nav */
  .chat-input-area, #chat-form, .input-area {
    bottom: 80px !important;
    padding: 0 12px !important;
  }

  /* Cards */
  .card, .panel, .view-card {
    margin: 8px !important;
    border-radius: 12px !important;
  }

  /* Typography */
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
  h3 { font-size: 17px !important; }
  p, li { font-size: 15px !important; }

  /* Builder agent cards — stack on mobile */
  #sal-card-grok, #sal-card-stitch, #sal-card-claude {
    grid-column: span 3;
  }

  /* Ticker */
  .ticker-text { font-size: 12px !important; }

  /* More sheet */
  #more-sheet, .more-sheet {
    height: 70vh !important;
    border-radius: 20px 20px 0 0 !important;
  }

  /* Frame-corner Stitch spinner */
  @keyframes frameCorner {
    0%,100% { width: 8px; height: 8px; }
    50% { width: 14px; height: 14px; }
  }

  /* Kinetic grid — reduce opacity on mobile for performance */
  .kinetic-grid {
    background-size: 60px 60px !important;
  }
}

/* ════════════════════════════════════════════════════════
   KINETIC BLUEPRINT — Builder v9.0
   Design System: #050508 bg · #00FF88 neon · #FFD700 gold
   0px border-radius · Space Grotesk · grid bg pattern
   ════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;900&display=swap');

/* ── Core variables ── */
:root {
  --kb-bg: #050508;
  --kb-surface: #0d0d12;
  --kb-border: rgba(255,255,255,0.08);
  --kb-border-strong: rgba(255,255,255,0.15);
  --kb-neon: #00FF88;
  --kb-gold: #FFD700;
  --kb-muted: #777;
  --kb-font: 'Space Grotesk', sans-serif;
}

/* ── State containers ── */
#studioView {
  background: var(--kb-bg) !important;
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}
#studioView.active {
  display: flex;
}

.kb-state {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  font-family: var(--kb-font);
  color: #fff;
}

/* ── Grid background ── */
.kb-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
.kb-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--kb-border);
  background: rgba(5,5,8,0.95);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.kb-header-compact {
  padding: 12px 20px;
}

.kb-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kb-brand-text {
  font-family: var(--kb-font);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
}

.kb-brand-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kb-gold);
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.2);
  padding: 2px 8px;
}

.kb-phase-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kb-muted);
}

.kb-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--kb-neon);
}

.kb-status-dot {
  width: 6px;
  height: 6px;
  background: var(--kb-neon);
  border-radius: 50%;
  flex-shrink: 0;
}

.kb-status-dot.pulse {
  animation: kbPulse 1.2s ease-in-out infinite;
}

@keyframes kbPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--kb-neon); }
  50% { opacity: 0.4; box-shadow: none; }
}

.kb-back-btn {
  background: none;
  border: 1px solid var(--kb-border);
  color: var(--kb-muted);
  font-family: var(--kb-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-back-btn:hover {
  color: #fff;
  border-color: var(--kb-border-strong);
}

/* ── INPUT STATE ── */
.kb-input-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  gap: 28px;
  overflow-y: auto;
}

.kb-hero {
  text-align: center;
}

.kb-hero-title {
  font-family: var(--kb-font);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,0.5));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 16px;
}

.kb-hero-sub {
  font-size: 14px;
  color: var(--kb-muted);
  margin: 0;
  max-width: 440px;
}

/* ── Prompt wrapper ── */
.kb-prompt-wrap {
  position: relative;
  width: 100%;
  max-width: 700px;
  background: var(--kb-surface);
  border: 1px solid var(--kb-border-strong);
}

/* Corner brackets */
.kb-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--kb-neon);
  border-style: solid;
  z-index: 2;
}
.kb-tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.kb-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.kb-bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.kb-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.kb-prompt-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--kb-font);
  font-size: 16px;
  font-weight: 500;
  padding: 20px 20px 0;
  resize: none;
  outline: none;
  box-sizing: border-box;
  min-height: 100px;
  line-height: 1.5;
}

.kb-prompt-input::placeholder {
  color: rgba(255,255,255,0.2);
}

.kb-prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
}

.kb-prompt-hint {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
}

.kb-build-btn {
  background: var(--kb-neon);
  color: #003d1f;
  border: none;
  font-family: var(--kb-font);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-build-btn:hover {
  background: #00ff99;
  box-shadow: 0 0 20px rgba(0,255,136,0.4);
}

.kb-build-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Suggestions ── */
.kb-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 700px;
}

.kb-suggestion {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--kb-border);
  color: rgba(255,255,255,0.6);
  font-family: var(--kb-font);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kb-suggestion:hover {
  background: rgba(0,255,136,0.06);
  border-color: rgba(0,255,136,0.3);
  color: var(--kb-neon);
}

/* ── Footer badges ── */
.kb-input-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--kb-border);
  background: rgba(5,5,8,0.8);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.kb-footer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kb-muted);
}

.kb-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kb-footer-latency {
  margin-left: auto;
  font-family: monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
}

/* ── PLANNING STATE ── */
.kb-planning-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  overflow-y: auto;
}

/* ── Agent Card ── */
.kb-agent-card {
  position: relative;
  background: var(--kb-surface);
  border: 1px solid var(--kb-border);
  padding: 16px;
  transition: all 0.25s;
}

.kb-agent-card.active,
.kb-agent-card[id^="kbGrokCard"] {
  border-color: var(--kb-neon);
  box-shadow: 0 0 20px rgba(0,255,136,0.15);
}

.kb-agent-card.done {
  border-color: rgba(255,215,0,0.3);
  box-shadow: 0 0 12px rgba(255,215,0,0.08);
}

.kb-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kb-card-icon {
  width: 36px;
  height: 36px;
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kb-card-icon.done {
  background: rgba(255,215,0,0.1);
  border-color: rgba(255,215,0,0.2);
}

.kb-card-info {
  flex: 1;
  min-width: 0;
}

.kb-card-name {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

.kb-card-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--kb-neon);
  font-family: monospace;
}

.kb-card-status.done {
  color: var(--kb-gold);
}

.kb-card-badge {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
  flex-shrink: 0;
}

.kb-card-badge.done {
  background: rgba(255,215,0,0.15);
  color: var(--kb-gold);
  border: 1px solid rgba(255,215,0,0.3);
}

/* ── Progress bar ── */
.kb-card-progress {
  height: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.kb-card-bar {
  height: 100%;
  transition: width 0.8s ease;
  background: var(--kb-neon);
  box-shadow: 0 0 8px var(--kb-neon);
}

.kb-card-bar.done {
  background: var(--kb-gold);
  box-shadow: 0 0 6px var(--kb-gold);
}

/* ── Plan grid ── */
.kb-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--kb-border);
  border: 1px solid var(--kb-border);
}

.kb-plan-cell {
  background: var(--kb-surface);
  padding: 14px;
}

.kb-plan-label {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border-bottom: 1px solid var(--kb-border);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.kb-plan-items {
  font-size: 10px;
  font-family: monospace;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.kb-plan-value {
  font-size: 18px;
  font-weight: 900;
  font-family: var(--kb-font);
  color: #fff;
  text-transform: uppercase;
}

/* ── Log terminal ── */
.kb-log-terminal {
  background: var(--kb-surface);
  border: 1px solid var(--kb-border);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.kb-log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--kb-border);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.kb-log-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kb-neon);
  box-shadow: 0 0 6px var(--kb-neon);
  animation: kbPulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.kb-log-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  line-height: 1.6;
}

.kb-log-stream p {
  margin: 0;
  color: #a4ffb9;
}

/* ── BUILDING STATE ── */
.kb-building-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.kb-agent-pipeline {
  display: flex;
  gap: 1px;
  background: var(--kb-border);
  border-bottom: 1px solid var(--kb-border);
  flex-shrink: 0;
}

.kb-agent-pipeline .kb-agent-card {
  flex: 1;
  border: none;
  padding: 12px 16px;
}

.kb-agent-pipeline .kb-card-progress {
  margin-top: 8px;
}

.kb-build-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--kb-border);
  overflow: hidden;
}

.kb-code-panel,
.kb-preview-panel {
  background: var(--kb-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--kb-border);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.kb-code-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  line-height: 1.7;
  color: #a4ffb9;
}

.kb-preview-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
}

.kb-preview-building {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--kb-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kb-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(0,255,136,0.2);
  border-top-color: var(--kb-neon);
  border-radius: 50%;
  animation: kbSpin 0.8s linear infinite;
}

@keyframes kbSpin {
  to { transform: rotate(360deg); }
}

.kb-device-toggle {
  display: flex;
  gap: 4px;
}

.kb-device-btn {
  background: none;
  border: 1px solid var(--kb-border);
  color: var(--kb-muted);
  font-family: var(--kb-font);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-device-btn.active {
  border-color: var(--kb-neon);
  color: var(--kb-neon);
}

/* ── COMPLETE STATE ── */
.kb-complete-badge {
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--kb-neon);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 12px;
}

.kb-action-btn {
  background: none;
  border: 1px solid var(--kb-border-strong);
  color: rgba(255,255,255,0.6);
  font-family: var(--kb-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-action-btn:hover {
  color: #fff;
  border-color: var(--kb-border-strong);
}

.kb-deploy-btn {
  background: var(--kb-neon);
  color: #003d1f;
  border: none;
  font-family: var(--kb-font);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-deploy-btn:hover {
  background: #00ff99;
  box-shadow: 0 0 20px rgba(0,255,136,0.4);
}

.kb-complete-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kb-complete-agents {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--kb-border);
  flex-shrink: 0;
}

.kb-agent-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.2);
  padding: 4px 12px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.kb-chip-done {
  color: var(--kb-gold);
}

.kb-complete-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kb-browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.4);
  border-bottom: 1px solid var(--kb-border);
  flex-shrink: 0;
}

.kb-browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.kb-browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: block;
}

.kb-browser-url {
  flex: 1;
  font-family: monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--kb-border);
  padding: 3px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-browser-btn {
  background: none;
  border: 1px solid var(--kb-border);
  color: var(--kb-muted);
  font-family: var(--kb-font);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.kb-browser-btn:hover {
  color: #fff;
  border-color: var(--kb-border-strong);
}

.kb-complete-frame {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.kb-complete-meta {
  display: flex;
  gap: 1px;
  background: var(--kb-border);
  border-top: 1px solid var(--kb-border);
  flex-shrink: 0;
}

.kb-meta-item {
  flex: 1;
  background: var(--kb-surface);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kb-meta-label {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.kb-meta-value {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ── Mobile Bottom Nav ── */
.kb-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(5,5,8,0.97);
  border-top: 1px solid rgba(0,255,136,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  display: none;
  align-items: flex-end;
  justify-content: space-around;
}

.kb-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-family: var(--kb-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 4px;
  cursor: pointer;
  transition: color 0.15s;
}

.kb-nav-btn:hover,
.kb-nav-btn.active {
  color: var(--kb-neon);
}

.kb-nav-btn svg {
  flex-shrink: 0;
}

/* Center helmet button */
.kb-nav-center {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 4px;
}

.kb-helm-ring {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.2) 0%, rgba(0,255,136,0.05) 70%, transparent 100%);
  border: 2px solid rgba(0,255,136,0.4);
  box-shadow: 0 0 20px rgba(0,255,136,0.3);
  animation: kbHelmGlow 2s ease-in-out infinite;
}

@keyframes kbHelmGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,255,136,0.3); }
  50% { box-shadow: 0 0 30px rgba(0,255,136,0.5); }
}

.kb-nav-center svg,
.kb-helm-img {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
}

@media (max-width: 768px) {
  .kb-mobile-nav {
    display: flex;
  }

  /* Give space for nav on mobile */
  #studioView {
    padding-bottom: 65px;
  }

  .kb-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kb-build-workspace {
    grid-template-columns: 1fr;
  }

  .kb-preview-panel {
    display: none;
  }

  .kb-agent-pipeline {
    flex-direction: column;
    gap: 0;
  }

  .kb-hero-title {
    font-size: 44px;
  }

  .kb-complete-agents {
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (min-width: 769px) {
  .kb-mobile-nav {
    display: none !important;
  }
}


/* Intelligence Layer overrides removed — were bleeding into all chat views with !important */
