/**
 * Hibrinix Growth OS - Unified Sapphire Obsidian Design System
 * Merged from: KokonutUI Financial + ElevenLabs + Perplexity AI + Waitlist + ShadCN + Shaders + Email Interface
 * Two Themes: Dark (Deep Obsidian) | Light (Crisp Slate) — Electric Sapphire Blue accent throughout
 */

/* =========================================================================
   DESIGN TOKENS — LIGHT MODE (Waitlist Radix-Tuned Slate)
   ========================================================================= */
:root, html[data-theme="light"] {
  /* Surfaces & Canvas */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-muted: #e2e8f0;
  --surface-hover: #f8fafc;
  --surface-active: #eff6ff;
  --surface-2: #ffffff;
  --surface-3: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.85);

  /* KokonutUI Crisp Light Sidebar */
  --sidebar: #ffffff;
  --sidebar-hover: #f1f5f9;
  --sidebar-active: #eff6ff;
  --sidebar-line: #e2e8f0;
  --sidebar-text: #475569;
  --sidebar-text-strong: #0f172a;
  --sidebar-text-muted: #94a3b8;

  /* Typography — Waitlist precision tracking */
  --text: #334155;
  --text-strong: #0f172a;
  --muted: #64748b;
  --subtle: #94a3b8;

  /* Hairline Borders */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  /* Electric Sapphire Blue (ElevenLabs + Growth OS) */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;
  --primary-glow: rgba(37, 99, 235, 0.22);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;

  /* Status Colors */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #e11d48;
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --info-border: #bae6fd;

  /* Header */
  --header-bg: rgba(255, 255, 255, 0.88);
  --header-border: #e2e8f0;

  /* Waitlist 5-Stage Realistic Elevation Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-card-hover:
    0 7px 15px 0 rgba(18, 18, 19, 0.08),
    0 27px 27px 0 rgba(18, 18, 19, 0.06),
    0 0 20px rgba(37, 99, 235, 0.12);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.18), 0 4px 14px rgba(37, 99, 235, 0.12);

  /* Geometry */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --sidebar-width: 260px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
}

/* =========================================================================
   DESIGN TOKENS — DARK MODE (KokonutUI + Shaders Deep Obsidian)
   ========================================================================= */
html[data-theme="dark"] {
  /* KokonutUI + Shaders Obsidian Canvas */
  --bg: #070a12;
  --surface: #0d1322;
  --surface-subtle: #131b2e;
  --surface-muted: #1e293b;
  --surface-hover: #141d33;
  --surface-active: #1a2540;
  --surface-2: #0d1322;
  --surface-3: #131b2e;
  --surface-glass: rgba(13, 19, 34, 0.85);

  /* KokonutUI Dark Sidebar */
  --sidebar: #090d16;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(59, 130, 246, 0.16);
  --sidebar-line: rgba(255, 255, 255, 0.07);
  --sidebar-text: #94a3b8;
  --sidebar-text-strong: #f8fafc;
  --sidebar-text-muted: #64748b;

  /* Typography */
  --text: #cbd5e1;
  --text-strong: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;

  /* Luminescent Borders */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Luminous Sapphire Blue */
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-active: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(59, 130, 246, 0.35);
  --primary-glow: rgba(59, 130, 246, 0.35);
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.14);

  /* Dark Status Tints */
  --success: #34d399;
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-border: rgba(16, 185, 129, 0.3);
  --warning: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(245, 158, 11, 0.3);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.3);
  --info: #38bdf8;
  --info-bg: rgba(2, 132, 199, 0.14);
  --info-border: rgba(2, 132, 199, 0.3);

  /* Header */
  --header-bg: rgba(13, 19, 34, 0.88);
  --header-border: rgba(255, 255, 255, 0.08);

  /* Deep Glow Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-card-hover:
    0 16px 36px -4px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(59, 130, 246, 0.22),
    0 0 1px rgba(59, 130, 246, 0.4);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3), 0 4px 14px rgba(59, 130, 246, 0.2);
}

/* =========================================================================
   BASE RESETS & GLOBAL TYPOGRAPHY (Waitlist precision)
   ========================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.7); }
::-webkit-scrollbar-button { display: none !important; width: 0 !important; height: 0 !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricprecision;
}

/* Global smooth transitions on theme switch */
body, .app-header, .app-sidebar, .card, .stat-card, .action-card,
.table, .btn, .input, .select, .textarea, .list-item, .notice,
.status-card, .task-card, .kpi-card, .platform-card {
  transition:
    background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: rgba(37, 99, 235, 0.18); color: #1e3a8a; }
html[data-theme="dark"] ::selection { background: rgba(59, 130, 246, 0.28); color: #eff6ff; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  transform: translateY(-160%); padding: 8px 14px;
  border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text-strong); box-shadow: var(--shadow);
  font-weight: 600; font-size: 12px;
}
.skip-link:focus { transform: none; }

/* =========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================= */
@keyframes pulse-cobalt {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes shimmer-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

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

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow); }
}

@keyframes border-glow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =========================================================================
   APPLICATION SHELL — KokonutUI Grid Layout
   ========================================================================= */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: var(--bg);
}

/* =========================================================================
   SIDEBAR — KokonutUI Financial Dashboard Style
   ========================================================================= */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-line);
  display: flex;
  flex-direction: column;
  z-index: 50;
  user-select: none;
  overflow: hidden;
}

/* Sidebar Brand */
.sidebar-brand {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-line);
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--primary-glow);
  flex-shrink: 0;
}

.brand-mark img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.brand-copy { display: flex; flex-direction: column; }

.brand-copy strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--sidebar-text-strong);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--sidebar-text-muted);
  letter-spacing: 0.02em;
}

.brand-pill {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 700;
  border: 1px solid var(--primary-border);
}

.sidebar-close { display: none !important; }

/* Sidebar Search Dock */
.sidebar-search-dock {
  padding: 10px 14px 4px;
  flex-shrink: 0;
}

.sidebar-search-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-search-btn:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
  color: var(--text-strong);
}

.sidebar-search-btn .ui-icon {
  width: 14px;
  height: 14px;
  margin-right: 7px;
  color: var(--primary);
}

.sidebar-search-btn span { flex: 1; text-align: left; }

.sidebar-search-btn kbd {
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Sidebar Nav */
.sidebar-nav {
  padding: 10px 10px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  flex: 1;
}

.sidebar-nav:hover { scrollbar-color: rgba(148, 163, 184, 0.2) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 4px; }

.nav-group { margin-bottom: 16px; }
.nav-group:last-child { margin-bottom: 0; }

.nav-label {
  padding: 4px 10px 5px;
  color: var(--sidebar-text-muted);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-group-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-strong);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary);
  font-weight: 600;
}

.nav-item-icon {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.nav-item-icon .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--sidebar-text-muted);
  transition: color 0.15s ease;
}

.nav-item:hover .nav-item-icon .ui-icon { color: var(--sidebar-text-strong); }
.nav-item.active .nav-item-icon .ui-icon { color: var(--primary); }
.nav-item-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-item-active-bar {
  position: absolute;
  right: 8px;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Sidebar Footer — KokonutUI Profile Card */
.sidebar-footer {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--sidebar-line);
  background: var(--sidebar);
  flex-shrink: 0;
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.profile-avatar-box {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 6px var(--primary-glow);
  flex-shrink: 0;
}

.profile-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--surface);
}

.profile-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.profile-meta strong { font-size: 12px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.profile-logout-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--muted);
  transition: all 0.15s ease;
  text-decoration: none;
}

.profile-logout-btn:hover { background: var(--danger-bg); color: var(--danger); }
.profile-logout-btn .ui-icon { width: 15px; height: 15px; }

/* =========================================================================
   TOP HEADER — KokonutUI TopNav
   ========================================================================= */
.app-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.top-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.breadcrumb-root {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: color 0.15s ease;
}
.breadcrumb-root:hover { color: var(--primary); }

.breadcrumb-mark {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
}

.breadcrumb-separator { display: grid; place-items: center; color: var(--subtle); }
.breadcrumb-separator .ui-icon { width: 13px; height: 13px; }
.breadcrumb-current { color: var(--text-strong); font-weight: 600; letter-spacing: -0.015em; }

/* Header Center — Perplexity-style Command Pill */
.header-center {
  flex: 1;
  max-width: 460px;
  margin: 0 16px;
}

.header-cmd-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.header-cmd-pill:hover {
  background: var(--surface);
  border-color: var(--primary-border);
  color: var(--text-strong);
  box-shadow: 0 2px 14px rgba(37, 99, 235, 0.1);
}

.header-cmd-pill .ui-icon { width: 14px; height: 14px; color: var(--primary); }
.header-cmd-pill span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kbd-pill {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.header-engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.header-engine-pill:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.engine-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-cobalt 2s infinite;
}

.header-action-icon, .icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.header-action-icon:hover, .icon-btn:hover {
  background: var(--surface-subtle);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateY(-1px);
}

.header-action-icon .ui-icon, .icon-btn .ui-icon { width: 15px; height: 15px; }

.server-admin-btn {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.server-admin-btn:hover { background: var(--surface-hover); border-color: var(--line-strong); color: var(--text-strong); }

.user-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.avatar-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid var(--surface);
}

.user-profile-name { font-size: 12.5px; font-weight: 600; color: var(--text-strong); letter-spacing: -0.01em; }

.signout-link {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.signout-link:hover { color: var(--danger); background: var(--danger-bg); }
.signout-link .ui-icon { width: 14px; height: 14px; }

/* Main Content Stage */
.content {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px 32px 72px;
  flex: 1;
}

.content > br { display: block; content: ""; height: 20px; line-height: 0; }

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--subtle);
  letter-spacing: -0.01em;
}

.nav-scrim { display: none; }

/* =========================================================================
   TYPOGRAPHY SYSTEM — Waitlist Negative Tracking
   ========================================================================= */
h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  line-height: 1.2;
}

h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.35;
}

h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  line-height: 1.4;
}

.content > h2, .content > h3 { margin: 0 0 14px; }
.card h2, .card h3 { margin: 0 0 8px; }
.card > p:not([class]) { margin: 0 0 14px; }
.card > p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-weight: 700;
}

.muted { color: var(--muted); margin: 0; }
.mini { font-size: 11px; color: var(--muted); }

.mono, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 2px 6px;
  border-radius: 4px;
}

/* =========================================================================
   LAYOUT GRIDS
   ========================================================================= */
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* =========================================================================
   CARD SYSTEM — Merged KokonutUI + Waitlist + ShadCN + Shaders
   ========================================================================= */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Gradient top-edge accent on all cards */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary) 30%,
    rgba(56, 189, 248, 0.7) 60%,
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before { opacity: 1; }

.card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
}

.card[href]:hover, a.card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Premium glass card variant */
.card.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--line);
}

/* Gradient card variant */
.card.gradient {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-subtle) 60%, var(--primary-soft) 100%);
}

/* =========================================================================
   EXECUTIVE DASHBOARD HERO — Perplexity + KokonutUI
   ========================================================================= */
.dashboard-hero {
  position: relative;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-subtle) 50%, var(--primary-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #38bdf8, #10b981, #8b5cf6, var(--primary));
  background-size: 200% 100%;
  animation: border-glow 4s ease infinite;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--primary-soft);
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.dashboard-hero-header { display: flex; flex-direction: column; gap: 6px; }

.dashboard-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary);
  width: fit-content;
  letter-spacing: -0.01em;
}

.dashboard-hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-cobalt 2s infinite;
}

.dashboard-hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  margin: 0;
  line-height: 1.15;
}

.dashboard-hero-sub {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.55;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Perplexity AI Search Dock */
.dash-search-container { width: 100%; }

.dash-search-dock {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.dash-search-dock:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow);
}

.dash-search-input-row {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 12px;
}

.dash-search-icon { display: grid; place-items: center; color: var(--primary); flex-shrink: 0; }
.dash-search-icon .ui-icon { width: 18px; height: 18px; }

.dash-search-input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  font-size: 14.5px !important;
  color: var(--text-strong) !important;
  padding: 7px 0 !important;
  outline: none !important;
  box-shadow: none !important;
  letter-spacing: -0.015em;
}

.dash-search-input::placeholder { color: var(--muted); opacity: 0.7; }

/* ElevenLabs Shimmer Submit Button */
.dash-search-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px var(--primary-glow);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.dash-search-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-search-submit:hover::before { transform: translateX(100%); }
.dash-search-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 22px var(--primary-glow); }
.dash-search-submit .ui-icon { width: 14px; height: 14px; }

.dash-search-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px 11px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
  gap: 10px;
  flex-wrap: wrap;
}

.dash-search-modes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.mode-chip:hover { color: var(--text-strong); border-color: var(--line-strong); }
.mode-chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); font-weight: 600; }
.mode-chip .ui-icon { width: 12px; height: 12px; }

.dash-search-telemetry { display: flex; align-items: center; gap: 8px; }

.telemetry-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.telemetry-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }

.dash-search-suggestions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sugg-label { font-size: 11px; font-weight: 600; color: var(--muted); }

.sugg-pill {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.sugg-pill:hover { background: var(--surface-hover); border-color: var(--primary-border); color: var(--primary); transform: translateY(-1px); }

/* =========================================================================
   KPI METRIC CARDS — KokonutUI Financial + ShadCN
   ========================================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  min-width: 0;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.kpi-card:hover::before { opacity: 1; }

.kpi-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.kpi-card-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.kpi-card-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  display: grid;
  place-items: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.kpi-card:hover .kpi-card-icon-box {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px var(--primary-glow);
}

.kpi-card-icon-box .ui-icon { width: 16px; height: 16px; }

.kpi-card-value {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.kpi-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kpi-trend .ui-icon { width: 11px; height: 11px; }
.kpi-trend.up { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.kpi-trend.neutral { background: var(--surface-subtle); color: var(--muted); border: 1px solid var(--line); }
.kpi-trend.attention { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.kpi-trend-sub { color: var(--muted); }

/* =========================================================================
   ACTION MODULE CARDS — Dashboard Design Requirements
   ========================================================================= */
.action-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.action-module-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.action-module-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-soft) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.action-module-card:hover::after { opacity: 1; }

.action-module-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 8px 26px -4px var(--primary-glow);
  transform: translateY(-2px);
}

.action-module-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  display: grid;
  place-items: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.action-module-card:hover .action-module-icon-wrap {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px var(--primary-glow);
}

.action-module-icon-wrap .ui-icon { width: 18px; height: 18px; }
.action-module-content { flex: 1; min-width: 0; }
.action-module-title { font-size: 13.5px; font-weight: 700; color: var(--text-strong); margin-bottom: 3px; letter-spacing: -0.015em; }
.action-module-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.action-module-arrow { color: var(--subtle); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.action-module-card:hover .action-module-arrow { transform: translateX(4px); color: var(--primary); }
.action-module-arrow .ui-icon { width: 15px; height: 15px; }

/* =========================================================================
   LEDGER GRID — KokonutUI List-01 / List-02 Pattern
   ========================================================================= */
.ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.ledger-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.ledger-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ledger-card-title-group { display: flex; flex-direction: column; gap: 3px; }
.ledger-card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.025em; color: var(--text-strong); margin: 0; }
.ledger-card-subtitle { font-size: 12px; color: var(--muted); margin: 0; }

/* Platform Ledger List */
.platform-ledger-list { display: flex; flex-direction: column; gap: 4px; }

.platform-ledger-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.platform-ledger-row:hover {
  background: var(--surface-subtle);
  border-color: var(--line);
  transform: translateX(2px);
}

.platform-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-strong);
  transition: all 0.15s ease;
}

.platform-icon-tile .ui-icon { width: 17px; height: 17px; }
.platform-info-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.platform-name { font-size: 13px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.015em; }
.platform-desc { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform-status-box { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.platform-row-arrow { color: var(--subtle); display: grid; place-items: center; }
.platform-row-arrow .ui-icon { width: 13px; height: 13px; }

/* Activity Ledger List */
.activity-ledger-list { display: flex; flex-direction: column; gap: 6px; }

.activity-ledger-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}

.activity-ledger-row:hover { background: var(--surface-hover); border-color: var(--primary-border); }

.activity-icon-tile {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}

.activity-icon-tile.good { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.activity-icon-tile.active { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-border); }
.activity-icon-tile.warn { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.activity-icon-tile.bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.activity-icon-tile .ui-icon { width: 15px; height: 15px; }

.activity-info-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.activity-row-top { display: flex; align-items: center; gap: 6px; }
.activity-kind { font-size: 13px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.015em; }
.activity-id-pill { font-size: 10px; font-weight: 600; color: var(--muted); font-family: ui-monospace, monospace; }
.activity-meta { display: flex; align-items: center; gap: 8px; }
.activity-platform-pill { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.activity-status-box { flex-shrink: 0; }

.empty-stream-box {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.empty-stream-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.empty-stream-icon .ui-icon { width: 22px; height: 22px; }
.empty-stream-text { font-size: 13px; color: var(--muted); margin: 0; letter-spacing: -0.01em; }

/* =========================================================================
   SECTION HEADER
   ========================================================================= */
.metric { font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.04em; color: var(--text-strong); margin-top: 12px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 { margin: 0; }

.section-head > a:not(.btn) { color: var(--accent); font-size: 11.5px; font-weight: 600; }
.section-head > a:not(.btn):hover { text-decoration: underline; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* Status Cards */
.status-card,
.grid.stats .card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  overflow: hidden;
}

.status-card:hover, .grid.stats .card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.status-card > b, .grid.stats .card .muted:first-child { color: var(--text-strong); font-size: 13px; font-weight: 700; letter-spacing: -0.015em; }
.status-card .metric, .grid.stats .card .metric { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--text-strong); margin: 8px 0 4px; }
.status-card small, .grid.stats .card small { display: block; margin-top: auto; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

/* =========================================================================
   BUTTONS — ElevenLabs Shimmer + KokonutUI
   ========================================================================= */
.actions, .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; }

.btn {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-strong);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn:hover {
  background: var(--surface-subtle);
  border-color: var(--primary-border);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active { transform: translateY(0); }

/* ElevenLabs Shimmer Primary Button */
.btn.primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.btn.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn.primary:hover::before { transform: translateX(100%); }

.btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary-active));
  border-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn.danger { border-color: var(--danger-border); color: var(--danger); background: var(--danger-bg); }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2); }

.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-subtle); border-color: var(--line); }
.btn.danger.ghost { color: var(--danger); background: transparent; border-color: transparent; }
.btn.danger.ghost:hover { background: var(--danger-bg); border-color: var(--danger-border); }

.btn.small { min-height: 32px; padding: 5px 12px; font-size: 11.5px; border-radius: 7px; }

/* =========================================================================
   BADGES & STATUS PILLS — Dashboard Design + Shaders
   ========================================================================= */
.badge, .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
}

.badge .badge-dot, .status-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge.good, .status-badge.success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge.warn, .status-badge.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge.bad, .status-badge.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

.badge.active {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

/* Live pulsing badge dot */
.badge.active .badge-dot { animation: pulse-cobalt 2s infinite; }

/* =========================================================================
   GLOBAL SVG ICON CONSTRAINTS
   ========================================================================= */
.ui-icon, svg.ui-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.btn .ui-icon, .btn svg { width: 15px !important; height: 15px !important; max-width: 15px !important; max-height: 15px !important; flex-shrink: 0; }
.btn.small .ui-icon, .btn.small svg { width: 13px !important; height: 13px !important; max-width: 13px !important; max-height: 13px !important; }
.platform-card-meta .ui-icon, .platform-card-meta svg { width: 14px !important; height: 14px !important; max-width: 14px !important; max-height: 14px !important; flex-shrink: 0; }

/* =========================================================================
   FORMS — Perplexity AI Dock Style
   ========================================================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field.full { grid-column: 1 / -1; }

.field button, .field .btn, .form-grid button, .form-grid .btn { width: auto !important; justify-self: start; }

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  transition: all 0.15s ease;
  user-select: none;
  letter-spacing: -0.01em;
}

.checkbox-pill:hover { background: var(--surface-hover); border-color: var(--primary-border); }
.checkbox-pill input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }

.field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Perplexity-inspired input fields */
.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-strong);
  padding: 10px 14px;
  border-radius: 9px;
  outline: none;
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
  letter-spacing: -0.01em;
}

.input, .select { min-height: 40px; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }

.input:hover, .textarea:hover, .select:hover { border-color: var(--primary-border); }

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-xs);
  background: var(--surface);
}

.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.65; }
.field input[type=checkbox], .field input[type=radio] { accent-color: var(--primary); }

/* =========================================================================
   TABS & PILL NAVIGATION
   ========================================================================= */
.tabs, .subnav, .pillbar, .platform-switch {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tabs a, .subnav a, .platform-switch a, .pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.tabs a:hover, .subnav a:hover, .platform-switch a:hover, .pill:hover { border-color: var(--primary-border); color: var(--primary); }
.tabs a.active, .subnav a.active, .platform-switch a.active { background: var(--primary-soft); border-color: var(--primary-border); color: var(--primary); font-weight: 700; }
.pill { cursor: pointer; user-select: none; }
.pill:has(input:checked) { background: var(--primary-soft); border-color: var(--primary-border); color: var(--primary); font-weight: 700; }

/* =========================================================================
   DATA TABLES — ShadCN Enterprise Style
   ========================================================================= */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.table td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
  font-size: 13px;
  max-width: 440px;
  word-break: break-word;
  letter-spacing: -0.01em;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.1s ease; }
.table tbody tr:hover { background: var(--surface-subtle); }
.table td:first-child { color: var(--text-strong); font-weight: 600; }

.mono-id-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 700;
}

.platform-table-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; color: var(--text-strong); }

.platform-table-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.platform-table-icon .ui-icon { width: 13px; height: 13px; }

/* =========================================================================
   EMPTY STATES — KokonutUI Premium
   ========================================================================= */
.empty-state-card, .empty, .empty-state {
  padding: 52px 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-subtle) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.empty-state-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.empty-state-icon-box .ui-icon { width: 24px; height: 24px; }
.empty-state-copy { display: flex; flex-direction: column; gap: 4px; }
.empty-state-title, .empty-state strong { font-size: 15px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.025em; margin: 0; }
.empty-state-body, .empty-state p { font-size: 12.5px; color: var(--muted); max-width: 460px; line-height: 1.55; margin: 0; }
.empty-state-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* =========================================================================
   NOTICES & ALERTS
   ========================================================================= */
.notice {
  padding: 13px 18px;
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  color: var(--primary);
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.notice.bad { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
.notice.good { border-color: var(--success-border); background: var(--success-bg); color: var(--success); }

/* =========================================================================
   CONNECTED PLATFORM CARDS — KokonutUI
   ========================================================================= */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.platform-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 190px;
  overflow: hidden;
}

.platform-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.platform-card:hover::before { opacity: 1; }

.platform-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 12px 32px -4px var(--primary-glow), var(--shadow-card-hover);
  transform: translateY(-2px);
}

.platform-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.platform-card-identity { display: flex; align-items: center; gap: 12px; }

.platform-brand-tile {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.18s ease;
}

.platform-card:hover .platform-brand-tile { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.platform-brand-tile .ui-icon { width: 20px; height: 20px; }
.platform-card-title-group { display: flex; flex-direction: column; gap: 2px; }
.platform-card-eyebrow { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.platform-card-title { font-size: 16px; font-weight: 800; color: var(--text-strong); letter-spacing: -0.025em; margin: 0; }
.platform-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.platform-card-desc { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 0; letter-spacing: -0.01em; }

.platform-card-meta {
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-card-meta b { color: var(--text-strong); }
.platform-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.platform-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Platform Brand Tile Colors */
.platform-brand-tile.instagram, .platform-icon-tile.instagram { color: #e1306c; background: rgba(225, 48, 108, 0.08); border-color: rgba(225, 48, 108, 0.2); }
.platform-brand-tile.facebook, .platform-icon-tile.facebook { color: #1877f2; background: rgba(24, 119, 242, 0.08); border-color: rgba(24, 119, 242, 0.2); }
.platform-brand-tile.linkedin, .platform-icon-tile.linkedin { color: #0a66c2; background: rgba(10, 102, 194, 0.08); border-color: rgba(10, 102, 194, 0.2); }
.platform-brand-tile.whatsapp, .platform-icon-tile.whatsapp { color: #25d366; background: rgba(37, 211, 102, 0.08); border-color: rgba(37, 211, 102, 0.2); }
.platform-brand-tile.youtube, .platform-icon-tile.youtube { color: #ff0000; background: rgba(255, 0, 0, 0.08); border-color: rgba(255, 0, 0, 0.2); }
.platform-brand-tile.x, .platform-icon-tile.x { color: var(--text-strong); background: var(--surface-subtle); border-color: var(--line-strong); }
.platform-brand-tile.threads, .platform-icon-tile.threads { color: var(--text-strong); background: var(--surface-subtle); border-color: var(--line-strong); }
.platform-brand-tile.messenger, .platform-icon-tile.messenger { color: #0084ff; background: rgba(0, 132, 255, 0.08); border-color: rgba(0, 132, 255, 0.2); }
.platform-brand-tile.google, .platform-icon-tile.google { color: #ea4335; background: rgba(234, 67, 53, 0.08); border-color: rgba(234, 67, 53, 0.2); }

/* =========================================================================
   LISTS & ROWS
   ========================================================================= */
.list { display: grid; gap: 8px; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all 0.12s ease;
}

.list-item:hover { background: var(--surface-subtle); border-color: var(--primary-border); }
.list-item small { font-size: 11px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row small { color: var(--muted); }

.kpi-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 18px;
}

/* =========================================================================
   UNIFIED INBOX — Email Interface Style
   ========================================================================= */
.inbox-thread-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}

.inbox-thread-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-card-hover); }
.inbox-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.inbox-contact-group { display: flex; align-items: center; gap: 12px; }

/* Email Interface overlaid avatar badge */
.inbox-contact-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-strong);
  flex-shrink: 0;
}

.inbox-contact-avatar .ui-icon { width: 18px !important; height: 18px !important; }
.inbox-contact-info { display: flex; flex-direction: column; gap: 2px; }
.inbox-contact-name { font-size: 14px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.015em; }
.inbox-contact-meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.inbox-reply-drawer { padding-top: 12px; border-top: 1px solid var(--line); }
.inbox-reply-form { display: flex; flex-direction: column; gap: 10px; }
.inbox-reply-form .textarea { min-height: 80px; font-size: 13px; }
.inbox-reply-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* =========================================================================
   CONVERSATIONS & CHAT
   ========================================================================= */
.conversation {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.conversation-list { border-right: 1px solid var(--line); background: var(--surface-subtle); overflow: auto; }
.conversation-item { padding: 14px; border-bottom: 1px solid var(--line); transition: background 0.15s; }
.conversation-item:hover, .conversation-item.active { background: var(--surface); }
.conversation-item.active { box-shadow: inset 3px 0 var(--primary); }
.message-pane { padding: 20px; display: flex; flex-direction: column; background: var(--surface); }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 12px; margin: 4px 0; background: var(--surface-subtle); color: var(--text-strong); font-size: 13px; }
.bubble.out { align-self: flex-end; background: var(--primary); color: #ffffff; }

.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 18px; }
.timeline-item { position: relative; margin: 0 0 16px; }
.timeline-item::before { content: ""; position: absolute; left: -24px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }

/* =========================================================================
   CODE & TECHNICAL BLOCKS
   ========================================================================= */
.codebox {
  white-space: pre-wrap;
  background: #060a14;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: var(--radius-sm);
  max-height: 380px;
  overflow: auto;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.6;
}

.file-drop {
  padding: 32px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  background: var(--surface-subtle);
  transition: all 0.15s ease;
}

.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }

.danger-zone { border-color: var(--danger-border); background: var(--danger-bg); }

.progress {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* =========================================================================
   APPROVAL CENTER & TASK CARDS
   ========================================================================= */
.approval-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 160px)) minmax(280px, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.approval-summary > div, .approval-summary > p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 14px 16px;
}

.approval-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-summary span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.approval-summary b { font-size: 22px; color: var(--text-strong); font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }

.approval-summary > p {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  background: var(--surface-subtle);
  line-height: 1.5;
}

.approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.task-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  position: relative;
}

.task-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.task-card:hover::before { opacity: 1; }
.task-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-card-hover); }
.task-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.task-card-head h3 { margin: 2px 0 6px; font-size: 14px; letter-spacing: -0.015em; }
.task-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }

.task-card > .task-image {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.task-image > div { display: flex; flex-direction: column; gap: 2px; min-width: 100px; }
.task-image span { font-weight: 700; color: var(--text-strong); }
.task-image small { color: var(--muted); }
.task-image img { width: 76px; height: 76px; margin-left: auto; border-radius: 6px; object-fit: cover; }
.task-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.task-details summary { cursor: pointer; color: var(--primary); font-size: 11px; font-weight: 600; letter-spacing: -0.01em; }
.task-details .codebox { margin-top: 8px; max-height: 240px; }

.linkedin-company-publisher {
  border-color: var(--primary-border);
  background: linear-gradient(135deg, var(--surface) 60%, var(--primary-soft) 100%);
}

/* =========================================================================
   IMAGE QUEUE — Event Kiosk Media Card Style
   ========================================================================= */
.image-queue-tools { align-items: stretch; }
.image-queue-tools > .card { height: 100%; }

.image-paste-zone {
  position: relative;
  min-height: 240px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
}

.image-paste-zone:hover, .image-paste-zone:focus, .image-paste-zone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px var(--primary-glow);
  transform: translateY(-1px);
}

.image-paste-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 28px;
}

.image-paste-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 4px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.image-paste-icon svg { width: 22px; height: 22px; }
.image-paste-empty b { color: var(--text-strong); font-size: 15px; letter-spacing: -0.02em; }
.image-paste-empty > span:not(.image-paste-icon):not(.image-browse-action) { color: var(--muted); font-size: 11.5px; }
.image-paste-empty kbd { padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--primary); font: 600 10px/1.4 inherit; }
.image-paste-empty .image-browse-action { display: inline-flex; margin-top: 4px; padding: 6px 14px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--primary); font-size: 11px; font-weight: 600; box-shadow: var(--shadow-xs); }
.image-paste-zone img { width: 100%; height: 300px; object-fit: contain; background: #090d16; }

/* Image Queue Grid — Event Kiosk aspect ratio cards */
.image-queue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.image-queue-card {
  display: grid;
  grid-template-rows: 260px minmax(210px, auto);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.image-queue-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Event kiosk hover scale effect on image */
.image-queue-preview {
  position: relative;
  z-index: 0;
  height: 260px;
  background: #090d16;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.image-queue-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.image-queue-card:hover .image-queue-preview img { transform: scale(1.03); }

.image-queue-body { display: flex; min-height: 210px; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); }
.image-queue-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.image-queue-title h3 { margin: 0; color: var(--text-strong); font-size: 15px; letter-spacing: -0.02em; }
.image-queue-description { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.image-queue-meta { display: flex; gap: 10px; font-size: 11px; color: var(--subtle); }

.image-queue-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* Generated Image Grid */
.generated-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.generated-image-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.generated-image-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.generated-image-preview {
  position: relative;
  height: 280px;
  background: #090d16;
  overflow: hidden;
}

.generated-image-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.generated-image-card:hover .generated-image-preview img { transform: scale(1.04); }

.generated-image-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================================================
   LOGIN PAGE — Premium Dark Glass
   ========================================================================= */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.15) 0%, #070a12 65%);
}

.login-card {
  width: min(420px, 100%);
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 40px rgba(37, 99, 235, 0.1);
}

.login-card h1 { font-size: 22px; margin: 6px 0 16px; color: var(--text-strong); letter-spacing: -0.03em; }

/* =========================================================================
   MODAL
   ========================================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal.open { display: flex; }

.modal-card {
  width: min(600px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: fade-in 0.2s ease;
}

/* =========================================================================
   MICRO-ICON BADGES — KokonutUI Category Tints
   ========================================================================= */
.micro-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.micro-icon-badge.emerald { background: rgba(16, 185, 129, 0.14); color: #10b981; }
.micro-icon-badge.blue { background: rgba(59, 130, 246, 0.14); color: #3b82f6; }
.micro-icon-badge.purple { background: rgba(147, 51, 234, 0.14); color: #a855f7; }
.micro-icon-badge.red { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.micro-icon-badge.gold { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }

/* =========================================================================
   PAGE HEADING — Premium Section Title
   ========================================================================= */
.page-heading {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-heading h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  margin: 0;
}

.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  letter-spacing: -0.01em;
}

/* =========================================================================
   PILL INPUT WITH NESTED BUTTON — Waitlist Style
   ========================================================================= */
.pill-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.pill-input-field {
  width: 100%;
  height: 44px;
  padding: 0 110px 0 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: -0.01em;
}

.pill-input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.pill-input-btn {
  position: absolute;
  right: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
  letter-spacing: -0.01em;
}

.pill-input-btn:hover { background: var(--primary-hover); }

/* =========================================================================
   AI STUDIO — Shaders Chat App Glass Dock
   ========================================================================= */
.ai-prompt-dock {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ai-prompt-dock:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow);
}

.ai-dock-input {
  width: 100%;
  padding: 14px 18px 8px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14.5px;
  color: var(--text-strong);
  resize: none;
  letter-spacing: -0.015em;
}

.ai-dock-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 1px solid var(--line);
}

.ai-model-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -0.01em;
}

/* =========================================================================
   SPECIFIC COMPONENT OVERRIDES
   ========================================================================= */
.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-heading-row h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--text-strong); margin: 0; }
.page-heading-row p { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; letter-spacing: -0.01em; }

/* =========================================================================
   PLATFORM-SPECIFIC COLORED MICRO-ICONS
   ========================================================================= */
.platform-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-strong);
}

.platform-icon-tile .ui-icon { width: 17px; height: 17px; }

/* =========================================================================
   FORM HELPERS
   ========================================================================= */
.input.compact { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.textarea.compact { min-height: 76px; }

small.muted { font-size: 11px; color: var(--muted); line-height: 1.5; letter-spacing: -0.01em; }

/* =========================================================================
   WELLZYNES CRM BENTO GRID & KPI CARDS
   ========================================================================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.bento-kpi-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.bento-kpi-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.bento-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bento-kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.bento-kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.bento-kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.bento-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  margin-top: 4px;
}

/* =========================================================================
   CHIP BUTTONS & MULTI-STEP SELECTOR (Crypto Onboarding)
   ========================================================================= */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip-button:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
  color: var(--text-strong);
}

.chip-button.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 0 14px var(--primary-glow);
}

.chip-check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
}

/* Stepper Progress Bar */
.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 24px 0 32px;
}

.stepper-progress-bg {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
  z-index: 0;
}

.stepper-progress-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--primary);
  transform: translateY(-50%);
  z-index: 1;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: width 0.3s ease;
}

.stepper-step {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.stepper-step.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 14px var(--primary-glow);
}

.stepper-step.completed {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* =========================================================================
   VERSATILE AGENT TELEMETRY STEPS
   ========================================================================= */
.agent-step-block {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.agent-step-block:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
}

.agent-step-block.streaming {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--surface) 80%, var(--primary-soft));
  box-shadow: 0 0 20px var(--primary-glow);
}

.agent-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-strong);
}

.latency-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-left: auto;
  font-family: ui-monospace, monospace;
}

/* =========================================================================
   MINIMALIST MEDIA CARD-08
   ========================================================================= */
.card-media-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.card-media-overlay:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.card-media-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #090d16;
}

.card-media-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-media-overlay:hover .card-media-img-wrap img {
  transform: scale(1.05);
}

.card-media-gradient-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 10, 18, 0.88) 100%);
  pointer-events: none;
}

.card-media-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-media-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin: 0;
}

.card-media-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.card-media-arrow {
  margin-left: auto;
  color: var(--primary);
  transition: transform 0.25s ease;
}

.card-media-overlay:hover .card-media-arrow {
  transform: translate(3px, -3px);
}

/* =========================================================================
   AUDIO WAVE BAR & SPEECH-TO-TEXT (v0-chat-input)
   ========================================================================= */
.audio-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
  padding: 0 12px;
}

.audio-wave-bar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--primary);
  animation: wave-pulse 1s ease-in-out infinite alternate;
}

@keyframes wave-pulse {
  0% { height: 4px; opacity: 0.3; }
  100% { height: 24px; opacity: 1; }
}

.mic-recording-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse-ring-danger 1.5s infinite;
}

@keyframes pulse-ring-danger {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* =========================================================================
   NETWORK TRAFFIC TELEMETRY STREAM
   ========================================================================= */
.packet-stream-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
  margin-bottom: 6px;
  transition: background 0.15s ease;
}

.packet-stream-row:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
}

.protocol-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.protocol-pill.oauth { background: rgba(37, 99, 235, 0.15); color: var(--primary); }
.protocol-pill.webhook { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.protocol-pill.api { background: rgba(147, 51, 234, 0.15); color: #a855f7; }
.protocol-pill.browser { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* =========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================= */
@media (max-width: 1280px) {
  .bento-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-modules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-grid, .generated-image-grid { grid-template-columns: 1fr; }
  .image-queue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content, .app-header { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    transform: translateX(-102%);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .app-sidebar { transform: none; }
  .sidebar-close { display: inline-grid !important; }
  .nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 18, 0.6);
    backdrop-filter: blur(4px);
    z-index: 40;
  }
  body.nav-open .nav-scrim { display: block; }
  .mobile-menu { display: inline-grid; }
  .header-center { display: none; }
  .user-profile-name { display: none; }
  .header-engine-pill { display: none; }
  .app-header { padding: 10px 16px; min-height: 62px; }
  .content { padding: 20px 16px 52px; }
  .app-footer { padding: 14px 16px; }
  .split, .conversation { grid-template-columns: 1fr; }
  .conversation-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
}

@media (max-width: 650px) {
  .page-heading h1, .dashboard-hero-title { font-size: 19px; }
  .top-breadcrumbs { display: none; }
  .kpi-grid, .action-modules-grid { grid-template-columns: 1fr; }
  .dash-search-bottom-row { flex-direction: column; align-items: flex-start; }
  .grid.stats, .grid.two, .grid.three, .status-grid, .form-grid { grid-template-columns: 1fr; }
  .image-queue-grid { grid-template-columns: 1fr; }
  .platform-card { grid-template-columns: 1fr; }
  .content { padding-left: 14px; padding-right: 14px; }
  .card, .ledger-card { padding: 18px; }
  .app-footer { flex-direction: column; gap: 4px; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td {
    border: 0;
    padding: 4px 0;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
    max-width: none;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--subtle);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
  }
  .table-wrap { overflow: visible; }
  .approval-summary { grid-template-columns: 1fr 1fr; }
  .approval-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
