/* ==========================================================================
   MESSENGER PRO 24/7 — NEXT-GEN SAAS COMMAND CENTER UI (2026 OVERHAUL)
   Aesthetic: Obsidian Slate Glassmorphism + Linear/Raycast Precision
   ========================================================================== */

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

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Core Brand Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-light: rgba(37, 99, 235, 0.10);
  --primary-glow: rgba(37, 99, 235, 0.36);
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --messenger-gradient: linear-gradient(135deg, #0084ff 0%, #00c6ff 100%);

  /* Semantic Colors */
  --purple: #8b5cf6;
  --purple-light: rgba(139, 92, 246, 0.12);
  --purple-glow: rgba(139, 92, 246, 0.32);

  --cyan: #06b6d4;
  --cyan-light: rgba(6, 182, 212, 0.12);
  --cyan-glow: rgba(6, 182, 212, 0.32);

  --green: #10b981;
  --green-light: rgba(16, 185, 129, 0.12);
  --green-glow: rgba(16, 185, 129, 0.32);

  --orange: #f97316;
  --orange-light: rgba(249, 115, 22, 0.12);
  --orange-glow: rgba(249, 115, 22, 0.32);

  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.10);
  --red-glow: rgba(239, 68, 68, 0.30);

  /* Semantic Accent Text Tokens */
  --accent-blue-text: #1d4ed8;
  --accent-green-text: #047857;
  --accent-purple-text: #6d28d9;
  --accent-amber-text: #c2410c;
  --accent-cyan-text: #0e7490;
  --accent-red-text: #b91c1c;

  --accent-blue: var(--accent-blue-text);
  --accent-green: var(--accent-green-text);
  --accent-purple: var(--accent-purple-text);
  --accent-amber: var(--accent-amber-text);
  --accent-cyan: var(--accent-cyan-text);
  --accent-red: var(--accent-red-text);

  --bg: #eef4ff;
  --bg-pattern:
    url("assets/dashboard-waves.svg"),
    radial-gradient(circle at 42% 6%, rgba(244, 114, 182, 0.15) 0%, rgba(192, 132, 252, 0.12) 26%, transparent 54%),
    radial-gradient(circle at 12% 16%, rgba(59, 130, 246, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(96, 165, 250, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, #f4f8ff 0%, #eaf2ff 50%, #eef2ff 100%);

  --sidebar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.92) 100%);
  --sidebar-border: rgba(219, 230, 246, 0.95);
  --topbar-bg: transparent;
  --topbar-border: transparent;

  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-hover: #f8fbff;
  --surface-2: #f4f8ff;
  --surface-3: #e6effd;

  --border: rgba(219, 230, 246, 0.95);
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;

  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #52637a;
  --text-dim: #64748b;

  --card-shadow: 0 12px 32px -10px rgba(30, 64, 175, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.03), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --card-shadow-hover: 0 20px 42px -12px rgba(37, 99, 235, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.05), inset 0 1px 0 0 #ffffff;
  --popover-shadow: 0 22px 54px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.08);

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

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Plus Jakarta Sans', "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-active: #1d4ed8;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-glow: rgba(59, 130, 246, 0.38);

  --purple: #a855f7;
  --purple-light: rgba(168, 85, 247, 0.14);
  --cyan: #06b6d4;
  --cyan-light: rgba(6, 182, 212, 0.14);
  --green: #10b981;
  --green-light: rgba(16, 185, 129, 0.14);
  --orange: #f59e0b;
  --orange-light: rgba(245, 158, 11, 0.14);
  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.14);

  /* Semantic Accent Text Tokens */
  --accent-blue-text: #60a5fa;
  --accent-green-text: #34d399;
  --accent-purple-text: #c084fc;
  --accent-amber-text: #fbbf24;
  --accent-cyan-text: #22d3ee;
  --accent-red-text: #f87171;

  --accent-blue: var(--accent-blue-text);
  --accent-green: var(--accent-green-text);
  --accent-purple: var(--accent-purple-text);
  --accent-amber: var(--accent-amber-text);
  --accent-cyan: var(--accent-cyan-text);
  --accent-red: var(--accent-red-text);

  /* Obsidian Dark Surfaces */
  --bg: #060913;
  --bg-pattern:
    radial-gradient(circle at 15% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(139, 92, 246, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.07) 0%, transparent 50%),
    #060913;

  --sidebar-bg: rgba(10, 15, 29, 0.94);
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --topbar-bg: transparent;
  --topbar-border: transparent;

  --surface: rgba(15, 23, 42, 0.82);
  --surface-solid: #0f172a;
  --surface-hover: rgba(30, 41, 59, 0.76);
  --surface-2: rgba(19, 28, 49, 0.88);
  --surface-3: rgba(30, 41, 59, 0.95);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-focus: #3b82f6;

  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --card-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --card-shadow-hover: 0 22px 45px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --popover-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-pattern);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--accent-blue-text);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-item:focus-visible,
.stat-card:focus-visible,
.feature-card:focus-visible,
.shortcut-card:focus-visible,
.picker-pill:focus-visible,
.template:focus-visible,
.visual-contact-item:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible,
.icon-button:focus-visible,
.theme-toggle-btn:focus-visible,
.topbar-add-acc-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.account-select:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.52);
}

/* ==========================================================================
   APP SHELL LAYOUT (SIDEBAR + WORKSPACE)
   ========================================================================== */
.dashboard-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 278px;
  background: var(--sidebar-bg);
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 4px 0 28px -14px rgba(30, 64, 175, 0.08);
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  z-index: 40;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.logo-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-text strong {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-blue-text);
  letter-spacing: 0.01em;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  padding: 12px 12px 6px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}

.nav-item > span:not(.nav-pill) {
  min-width: 0;
  white-space: nowrap;
}

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

.nav-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16) 0%, rgba(147, 197, 253, 0.18) 100%);
  color: var(--accent-blue-text);
  border-color: rgba(59, 130, 246, 0.22);
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.16);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 26px;
  border-radius: 0 4px 4px 0;
  background: var(--primary-gradient);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-item[data-view="compose"] .nav-icon {
  color: #2563eb;
}

.nav-item[data-view="tools"] .nav-icon {
  color: #4f46e5;
}

.nav-item.active .nav-icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.45);
}

.nav-pill {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--accent-blue-text);
  border: 1px solid rgba(59, 130, 246, 0.18);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-pill.accent {
  background: rgba(168, 85, 247, 0.14);
  color: var(--accent-purple-text);
  border-color: rgba(168, 85, 247, 0.26);
}

.sidebar-note {
  margin-top: 16px;
  padding: 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px -10px rgba(30, 64, 175, 0.08);
}

.sidebar-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-note p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}
.theme-toggle-btn svg {
  width: 15px;
  height: 15px;
}
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }

/* ==========================================================================
   TOPBAR & WORKSPACE
   ========================================================================== */
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: relative;
  z-index: 30;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  padding: 20px 30px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.breadcrumb {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.breadcrumb svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

#page-title {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  padding-top: 4px;
}

.sys-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 15px 0 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-green-text);
  border: 1px solid rgba(16, 185, 129, 0.26);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.06);
}

.sys-pill-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.45);
}

.sys-pill-icon svg {
  width: 15px;
  height: 15px;
}

.sys-pill .pulse-dot {
  display: none;
}

.account-select {
  width: auto !important;
  max-width: 220px;
  height: 42px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  white-space: nowrap;
}
.account-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.session-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.07);
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.session-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  margin-left: 2px;
  flex-shrink: 0;
}

.session-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.session-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.session-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.18;
}
.session-card {
  min-width: 0;
  max-width: 100%;
}
.session-info strong,
.session-info small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-info strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.session-info small {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.topbar-add-acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 22px -6px rgba(59, 130, 246, 0.55);
  transition: var(--transition);
}
.topbar-add-acc-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

main {
  padding: 14px 30px 44px;
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

.view {
  display: none;
  animation: viewFadeIn 0.22s ease-out;
}
.view.active-view {
  display: block;
}

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

/* ==========================================================================
   HERO, KPI STATS & BENTO CARDS (DASHBOARD)
   ========================================================================== */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  background:
    radial-gradient(circle at 68% 45%, rgba(168, 85, 247, 0.42) 0%, rgba(96, 165, 250, 0.24) 30%, transparent 62%),
    radial-gradient(circle at 22% 10%, rgba(56, 189, 248, 0.25) 0%, transparent 45%),
    linear-gradient(118deg, #061c56 0%, #0d3695 34%, #1d56d8 64%, #4f46e5 85%, #7c3aed 100%);
  border: 1px solid rgba(147, 197, 253, 0.45);
  box-shadow: 0 22px 46px -14px rgba(29, 78, 216, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 232px;
}

.hero-content {
  flex: 1.18;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(30, 64, 175, 0.58);
  border: 1px solid rgba(147, 197, 253, 0.38);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hero-badge-icon {
  width: 13px;
  height: 13px;
  color: #60a5fa;
  flex-shrink: 0;
}

.hero-badge .pulse-dot {
  display: none;
}

.dashboard-hero h2 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.24;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.hero-highlight {
  background: linear-gradient(90deg, #60a5fa 0%, #7dd3fc 55%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-hero p {
  margin: 0 0 18px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 13.5px;
  max-width: 610px;
  line-height: 1.58;
}

.hero-feature-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(7, 21, 64, 0.46);
  border: 1px solid rgba(147, 197, 253, 0.28);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.hero-feature-pill svg {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  flex-shrink: 0;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.hero-illustration-wrap {
  width: 280px;
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
  user-select: none;
}

.hero-illustration {
  width: 320px;
  max-width: none;
  height: auto;
  max-height: 224px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(6, 18, 56, 0.35));
}

.hero-status-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

.hero-status-pill {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.98);
  color: #0f172a;
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  box-shadow: 0 14px 30px -8px rgba(7, 18, 56, 0.32);
}

.hero-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-status-icon svg {
  width: 17px;
  height: 17px;
}

.hero-status-icon.shield-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.45);
}

.hero-status-icon.clock-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
}

.hero-status-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-status-text strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.hero-status-text strong em {
  font-style: normal;
  color: #059669;
  font-weight: 800;
}

.hero-status-text small {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
}

.hero-status-chevron {
  width: 14px;
  height: 14px;
  color: #64748b;
  margin-left: 2px;
  flex-shrink: 0;
}

.pulse-dot, .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
  margin-left: auto;
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

/* Stats Strip */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-align: left;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(59, 130, 246, 0.35);
}

.stat-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 14px -4px rgba(15, 23, 42, 0.06);
}
.stat-icon-wrap svg {
  width: 25px;
  height: 25px;
}
.user-icon-wrap {
  background: linear-gradient(145deg, #e0f2fe 0%, #dbeafe 100%);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.api-icon-wrap {
  background: linear-gradient(145deg, #d1fae5 0%, #dcfce7 100%);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.amber-icon-wrap {
  background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.28);
}
.send-icon-wrap {
  background: linear-gradient(145deg, #f3e8ff 0%, #e9d5ff 100%);
  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.stat-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.stat-body span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.stat-body strong {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-body strong.live-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-green-text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.stat-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.stat-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.stat-spark-bars {
  width: 38px;
  height: 30px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-left: auto;
}
.stat-spark-bars.blue-bars {
  color: #3b82f6;
}
.stat-spark-bars.purple-bars {
  color: #a855f7;
}

.stat-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
}

.stat-link {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* Feature Bento Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  grid-column: span 3;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.feature-card.wide-card {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
}

.feature-card-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 0;
  z-index: 2;
}

.feature-card-art {
  width: 176px;
  height: 132px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
  align-self: flex-end;
  margin-right: -6px;
  margin-bottom: -8px;
  filter: drop-shadow(0 10px 18px rgba(30, 64, 175, 0.08));
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(96, 165, 250, 0.45);
}

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

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 14px -4px rgba(15, 23, 42, 0.07);
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}

.blue-card .feature-icon {
  background: linear-gradient(145deg, #e0f2fe 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.green-card .feature-icon {
  background: linear-gradient(145deg, #d1fae5 0%, #dcfce7 100%);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.purple-card .feature-icon {
  background: linear-gradient(145deg, #f3e8ff 0%, #ede9fe 100%);
  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.cyan-card .feature-icon {
  background: linear-gradient(145deg, #cffafe 0%, #ccfbf1 100%);
  color: #0d9488;
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.orange-card .feature-icon {
  background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 100%);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.feature-badge {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.blue-card .feature-badge {
  background: #dbeafe;
  color: #1d4ed8;
}
.green-card .feature-badge {
  background: #dcfce7;
  color: #047857;
}
.purple-card .feature-badge {
  background: #f3e8ff;
  color: #6d28d9;
}
.cyan-card .feature-badge {
  background: #cffafe;
  color: #0e7490;
}
.orange-card .feature-badge {
  background: #ffedd5;
  color: #c2410c;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feature-copy strong {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--text);
}
.feature-copy small {
  font-size: 12.8px;
  color: var(--text-muted);
  line-height: 1.55;
}

.feature-action {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 8px 18px -5px rgba(37, 99, 235, 0.5);
  transition: var(--transition);
}

.feature-action::after {
  content: "›";
  font-size: 15px;
  line-height: 1;
  opacity: 0.9;
}

.blue-card .feature-action {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 18px -5px rgba(37, 99, 235, 0.5);
}
.green-card .feature-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 8px 18px -5px rgba(16, 185, 129, 0.5);
}
.purple-card .feature-action {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 8px 18px -5px rgba(124, 58, 237, 0.5);
}
.cyan-card .feature-action {
  background: linear-gradient(135deg, #14b8a6 0%, #0891b2 100%);
  box-shadow: 0 8px 18px -5px rgba(13, 148, 136, 0.5);
}
.orange-card .feature-action {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 8px 18px -5px rgba(234, 88, 12, 0.5);
}

.feature-card:hover .feature-action {
  filter: brightness(1.06);
  transform: translateX(2px);
}

/* ==========================================================================
   PANELS, GRIDS & FORMS
   ========================================================================== */
.content-grid, .notes-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1120px) {
  .content-grid, .notes-layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.full-panel {
  margin-bottom: 22px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-blue-text);
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

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

label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

input[type="text"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

.field-help {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.url-input-row {
  display: flex;
  gap: 10px;
}

.input-with-icon {
  position: relative;
  flex: 1;
}
.input-with-icon .field-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-with-icon input {
  padding-left: 38px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 13px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 22px -6px var(--primary-glow);
  transition: var(--transition);
}
.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px var(--primary-glow);
  filter: brightness(1.06);
}
.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 700;
  font-size: 12.5px;
  transition: var(--transition);
  white-space: nowrap;
}
.secondary-button:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--accent-blue-text);
}
.secondary-button.compact {
  padding: 7px 12px;
  font-size: 12px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--red-light);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: var(--accent-red-text);
  font-weight: 700;
  font-size: 12.5px;
  transition: var(--transition);
}
.danger-button:hover:not(:disabled) {
  background: #ef4444;
  color: #ffffff;
}

.badge, .char-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.live-badge {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-green-text);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-success {
  background: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green-text);
}

.badge-danger {
  background: var(--red-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red-text);
}

.badge-info {
  background: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-blue-text);
}

.badge-warning {
  background: var(--orange-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber-text);
}

/* ==========================================================================
   VISUAL CONTACT PICKER & AVATARS
   ========================================================================== */
.avatar-circle-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  flex-shrink: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.selected-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.32);
  margin-bottom: 14px;
}

.visual-picker-box {
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 16px;
}

.visual-picker-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
  align-items: center;
  flex-wrap: wrap;
}
.visual-picker-toolbar input {
  flex: 1;
  min-width: 160px;
  height: 36px;
  font-size: 12.5px;
  padding: 0 12px;
}

.picker-filter-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.picker-pill {
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.picker-pill.active, .picker-pill:hover {
  background: var(--primary-light);
  color: var(--accent-blue-text);
  border-color: var(--primary);
}

.visual-contact-list {
  max-height: 270px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.visual-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}
.visual-contact-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.visual-contact-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-glow);
}

.visual-contact-info {
  flex: 1;
  min-width: 0;
}
.visual-contact-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visual-contact-info small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   TEMPLATES, SCHEDULE & LIVE MESSENGER PREVIEW
   ========================================================================== */
.templates-section {
  margin-bottom: 16px;
}
.templates-title {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.template {
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.template:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--accent-blue-text);
}

.schedule-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

/* Compose View Layout: Prioritize Spacious Composer */
#compose-view .content-grid {
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

#compose-view.composer-wide .content-grid {
  grid-template-columns: 320px 1fr;
}

@media (max-width: 1140px) {
  #compose-view .content-grid {
    grid-template-columns: 1fr;
  }
}

#message-text {
  min-height: 155px;
  font-size: 14.5px;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
}

/* Repeat Card Styling */
.repeat-card {
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-solid) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px -4px rgba(168, 85, 247, 0.10);
  transition: var(--transition);
}

.repeat-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

.repeat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.repeat-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.repeat-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.repeat-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid var(--border-strong);
}

.repeat-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.22);
}

.repeat-switch input:checked + .repeat-slider {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border-color: #c084fc;
}

.repeat-switch input:checked + .repeat-slider:before {
  transform: translateX(20px);
}

.repeat-switch input:focus-visible + .repeat-slider {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--purple-light);
}

.repeat-title-wrap {
  flex: 1;
}

.repeat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.repeat-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.repeat-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(168, 85, 247, 0.25);
  animation: viewFadeIn 0.2s ease-out;
}

.repeat-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .repeat-controls-grid {
    grid-template-columns: 1fr;
  }
}

.repeat-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.repeat-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.repeat-input-group input[type="number"] {
  width: 90px;
  font-weight: 700;
  text-align: center;
}

.repeat-input-group select {
  flex: 1;
}

.repeat-presets-wrap {
  margin: 12px 0;
}

.repeat-presets-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-purple-text);
  margin-bottom: 6px;
}

.repeat-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.repeat-presets .picker-pill {
  border-color: rgba(168, 85, 247, 0.3);
  font-size: 11.5px;
}

.repeat-presets .picker-pill:hover,
.repeat-presets .picker-pill.active {
  background: rgba(168, 85, 247, 0.16);
  border-color: var(--purple);
  color: var(--accent-purple-text);
}

.repeat-summary-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.25);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-purple-text);
}

.repeat-summary-banner svg {
  width: 16px;
  height: 16px;
  color: var(--accent-purple-text);
  flex-shrink: 0;
}

.badge-purple {
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.30);
  color: var(--accent-purple-text);
}

.schedule-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.schedule-hint-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.schedule-hint-box svg {
  width: 15px;
  height: 15px;
  color: var(--accent-blue-text);
  flex-shrink: 0;
}

.preview-box {
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.preview-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-blue-text);
}
.preview-title svg {
  width: 14px;
  height: 14px;
}
.preview-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.preview-chat-container {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}
.preview-chat-bubble {
  max-width: 88%;
  padding: 10px 15px;
  border-radius: 18px 18px 4px 18px;
  background: var(--messenger-gradient);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 132, 255, 0.28);
}
.preview-chat-bubble p {
  margin: 0 0 4px;
  font-size: 13.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-timestamp {
  display: block;
  text-align: right;
  font-size: 10px;
  opacity: 0.82;
}

.send-disclaimer {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.send-disclaimer svg {
  width: 13px;
  height: 13px;
  color: var(--green);
}

/* ==========================================================================
   8 FACEBOOK TOOLS GRID & DETAIL WORKSPACE
   ========================================================================== */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
  transition: var(--transition);
  position: relative;
}

.shortcut-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: var(--card-shadow);
}

.shortcut-card.active-tool {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, rgba(139, 92, 246, 0.10) 100%);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 12px 28px -8px rgba(59, 130, 246, 0.25);
}

.shortcut-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shortcut-icon svg {
  width: 22px;
  height: 22px;
}

.icon-cyan   { background: var(--cyan-light);    color: var(--accent-cyan-text);   border: 1px solid rgba(6,182,212,0.3); }
.icon-blue   { background: var(--primary-light); color: var(--accent-blue-text);   border: 1px solid rgba(59,130,246,0.3); }
.icon-purple { background: var(--purple-light);  color: var(--accent-purple-text); border: 1px solid rgba(168,85,247,0.3); }
.icon-orange { background: var(--orange-light);  color: var(--accent-amber-text);  border: 1px solid rgba(245,158,11,0.3); }
.icon-green  { background: var(--green-light);   color: var(--accent-green-text);  border: 1px solid rgba(16,185,129,0.3); }
.icon-red    { background: var(--red-light);     color: var(--accent-red-text);    border: 1px solid rgba(239,68,68,0.3); }
.icon-amber  { background: var(--orange-light);  color: var(--accent-amber-text);  border: 1px solid rgba(245,158,11,0.3); }

.shortcut-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.shortcut-info strong {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.shortcut-info small {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.tool-type-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-secondary);
  align-self: flex-start;
  margin-top: 3px;
}

.facebook-tool-detail {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border-strong);
}

.tool-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tool-detail-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.tool-detail-heading p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.tool-detail-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* ==========================================================================
   DATA TABLES & ROWS
   ========================================================================== */
.data-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.table-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.table-row strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.table-row p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
}

.empty-state {
  margin: 0;
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}

/* Export Panel */
.export-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.export-panel h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.export-panel p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.export-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition);
}
.export-actions button:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--accent-blue-text);
}
.export-actions svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   TOGGLE SWITCH, MODAL & TOAST
   ========================================================================== */
.switch-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 50px;
  height: 27px;
  background: var(--surface-3);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  transition: var(--transition);
}
input:checked + .toggle-switch {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 14px var(--green-glow);
}
input:checked + .toggle-switch::after {
  transform: translateX(23px);
}
.switch-wrap input:focus-visible + .toggle-switch,
#ar-enabled:focus-visible + .toggle-switch {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--popover-shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.icon-button:hover {
  color: var(--text);
  background: var(--red-light);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--popover-shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: var(--transition);
  max-width: 420px;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1200px) {
  .workspace:has(#dashboard-view.active-view) .topbar {
    padding: 10px 26px 6px;
  }

  .workspace:has(#dashboard-view.active-view) #page-title {
    font-size: 22px;
    line-height: 1.15;
  }

  .workspace:has(#dashboard-view.active-view) .topbar-subtitle {
    font-size: 12px;
    margin-top: 1px;
  }

  .workspace:has(#dashboard-view.active-view) .topbar-right {
    padding-top: 0;
    gap: 10px;
  }

  .workspace:has(#dashboard-view.active-view) .sys-pill,
  .workspace:has(#dashboard-view.active-view) .account-select,
  .workspace:has(#dashboard-view.active-view) .session-card,
  .workspace:has(#dashboard-view.active-view) .topbar-add-acc-btn {
    height: 38px;
  }

  .workspace:has(#dashboard-view.active-view) .session-avatar {
    width: 30px;
    height: 30px;
  }

  .workspace:has(#dashboard-view.active-view) main {
    padding: 8px 26px 12px;
  }

  #dashboard-view .dashboard-hero {
    padding: 14px 20px;
    margin-bottom: 10px;
    min-height: 148px;
    gap: 16px;
  }

  #dashboard-view .hero-badge {
    padding: 4px 11px;
    font-size: 10px;
    margin-bottom: 6px;
  }

  #dashboard-view .dashboard-hero h2 {
    font-size: 21px;
    line-height: 1.2;
    margin: 0 0 6px;
  }

  #dashboard-view .dashboard-hero p {
    font-size: 12.2px;
    line-height: 1.42;
    margin: 0 0 10px;
    max-width: 680px;
  }

  #dashboard-view .hero-feature-pills {
    gap: 8px;
  }

  #dashboard-view .hero-feature-pill {
    padding: 4px 10px;
    font-size: 11px;
    gap: 6px;
  }

  #dashboard-view .hero-illustration-wrap {
    width: 190px;
    height: 128px;
  }

  #dashboard-view .hero-illustration {
    width: 216px;
    max-height: 142px;
  }

  #dashboard-view .hero-status-stack {
    gap: 8px;
  }

  #dashboard-view .hero-status-pill {
    padding: 7px 12px;
    border-radius: 13px;
    font-size: 11.5px;
    gap: 9px;
  }

  #dashboard-view .hero-status-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  #dashboard-view .hero-status-icon svg {
    width: 14px;
    height: 14px;
  }

  #dashboard-view .hero-status-text strong {
    font-size: 11.5px;
  }

  #dashboard-view .hero-status-text small {
    font-size: 10.5px;
  }

  #dashboard-view .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 10px;
  }

  #dashboard-view .stat-card {
    padding: 11px 14px;
    gap: 11px;
  }

  #dashboard-view .stat-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  #dashboard-view .stat-icon-wrap svg {
    width: 20px;
    height: 20px;
  }

  #dashboard-view .stat-body span {
    font-size: 11.5px;
  }

  #dashboard-view .stat-body strong {
    font-size: 20px;
    line-height: 1.12;
  }

  #dashboard-view .stat-body strong.live-text {
    font-size: 14.5px;
    margin: 1px 0;
  }

  #dashboard-view .stat-meta {
    font-size: 10.5px;
  }

  #dashboard-view .stat-spark-bars {
    width: 32px;
    height: 24px;
  }

  #dashboard-view .feature-grid {
    gap: 11px;
  }

  #dashboard-view .feature-card {
    grid-column: span 3;
    padding: 13px 15px;
    gap: 8px;
  }

  #dashboard-view .feature-card.wide-card {
    grid-column: span 6;
    padding: 13px 18px;
    gap: 12px;
  }

  #dashboard-view .feature-card-main {
    gap: 7px;
  }

  #dashboard-view .feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  #dashboard-view .feature-icon svg {
    width: 19px;
    height: 19px;
  }

  #dashboard-view .feature-badge {
    font-size: 9.5px;
    padding: 3px 8px;
  }

  #dashboard-view .feature-copy {
    gap: 3px;
  }

  #dashboard-view .feature-copy strong {
    font-size: 14.5px;
    line-height: 1.24;
  }

  #dashboard-view .feature-copy small {
    font-size: 11.5px;
    line-height: 1.38;
  }

  #dashboard-view .feature-action {
    font-size: 11.5px;
    padding: 6px 13px;
  }

  #dashboard-view .feature-card-art {
    width: 124px;
    height: 92px;
    margin-bottom: -4px;
  }
}

@media (min-width: 1200px) and (max-height: 820px) {
  .workspace:has(#dashboard-view.active-view) .topbar {
    padding: 7px 22px 4px;
  }

  .workspace:has(#dashboard-view.active-view) #page-title {
    font-size: 19px;
  }

  .workspace:has(#dashboard-view.active-view) .topbar-subtitle {
    font-size: 11.2px;
  }

  .workspace:has(#dashboard-view.active-view) main {
    padding: 6px 22px 8px;
  }

  #dashboard-view .dashboard-hero {
    padding: 10px 16px;
    margin-bottom: 8px;
    min-height: 116px;
  }

  #dashboard-view .hero-badge {
    padding: 3px 9px;
    font-size: 9.5px;
    margin-bottom: 4px;
  }

  #dashboard-view .dashboard-hero h2 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  #dashboard-view .dashboard-hero p {
    font-size: 11.2px;
    line-height: 1.34;
    margin-bottom: 7px;
  }

  #dashboard-view .hero-feature-pill {
    padding: 3px 8px;
    font-size: 10.5px;
  }

  #dashboard-view .hero-illustration-wrap {
    width: 146px;
    height: 102px;
  }

  #dashboard-view .hero-illustration {
    width: 168px;
    max-height: 112px;
  }

  #dashboard-view .hero-status-pill {
    padding: 5px 10px;
    font-size: 10.8px;
  }

  #dashboard-view .stats-grid {
    gap: 8px;
    margin-bottom: 8px;
  }

  #dashboard-view .stat-card {
    padding: 8px 11px;
    gap: 9px;
  }

  #dashboard-view .stat-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  #dashboard-view .stat-body strong {
    font-size: 17px;
  }

  #dashboard-view .stat-body strong.live-text {
    font-size: 13px;
  }

  #dashboard-view .feature-grid {
    gap: 8px;
  }

  #dashboard-view .feature-card,
  #dashboard-view .feature-card.wide-card {
    padding: 10px 13px;
    gap: 6px;
  }

  #dashboard-view .feature-card-main {
    gap: 5px;
  }

  #dashboard-view .feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  #dashboard-view .feature-icon svg {
    width: 16px;
    height: 16px;
  }

  #dashboard-view .feature-copy strong {
    font-size: 13.2px;
  }

  #dashboard-view .feature-copy small {
    font-size: 10.8px;
    line-height: 1.3;
  }

  #dashboard-view .feature-action {
    font-size: 10.8px;
    padding: 4px 11px;
  }

  #dashboard-view .feature-card-art {
    width: 96px;
    height: 72px;
  }
}

@media (max-width: 1199px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature-card {
    grid-column: span 6;
  }
  .feature-card.wide-card {
    grid-column: span 6;
  }
  .hero-illustration-wrap {
    width: 220px;
    height: 170px;
  }
  .hero-illustration {
    width: 250px;
  }
}

@media (max-width: 1024px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-visual {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .feature-card.wide-card {
    grid-column: span 12;
  }
}

@media (max-width: 920px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 14px 16px 6px;
    gap: 10px;
  }
  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  main {
    padding: 12px 16px 36px;
  }
  .account-select {
    max-width: 100%;
  }
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
    gap: 16px;
  }
  .hero-content {
    min-width: 0;
  }
  .hero-badge {
    white-space: normal;
  }
  .hero-visual {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-illustration-wrap {
    width: 100%;
    height: 160px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .feature-card,
  .feature-card.wide-card {
    grid-column: span 12;
  }
  .feature-card.wide-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .feature-card-art {
    align-self: center;
    margin: 4px 0 0;
  }
}

/* ==========================================================================
   FB AIO SUITE STYLES (TARGET LOOKUP BAR, SUB-TABS & BULK ACTIONS)
   ========================================================================== */
.primary-button.compact {
  width: auto;
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 10px;
}

.danger-button.compact {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.fbaio-target-bar {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(59, 130, 246, 0.26);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fbaio-target-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fbaio-target-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.fbaio-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.fbaio-target-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  color: var(--text);
}

.fbaio-target-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.fbaio-input-wrap {
  flex: 1;
  min-width: 260px;
}

.fbaio-target-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fbaio-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.fbaio-subtabs.hidden {
  display: none;
}

.fbaio-subtab-btn {
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
}

.fbaio-select-all-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.fbaio-select-all-wrap input,
.fbaio-row-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.fbaio-bulk-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   LIGHT MODE COMPONENT OVERRIDES
   ========================================================================== */
[data-theme="dark"] .logo-text strong {
  background: linear-gradient(90deg, #f8fafc 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .sidebar {
  box-shadow: none;
}

[data-theme="dark"] .sidebar-note {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.55));
  border-color: var(--border);
  box-shadow: none;
}

[data-theme="dark"] .sys-pill {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--accent-green-text);
}

[data-theme="dark"] .session-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%);
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .hero-status-pill {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.22);
  color: #f8fafc;
}

[data-theme="dark"] .hero-status-text strong {
  color: #f8fafc;
}

[data-theme="dark"] .hero-status-text strong em {
  color: #34d399;
}

[data-theme="dark"] .hero-status-text small {
  color: #cbd5e1;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .feature-card {
  border-color: var(--border);
}

[data-theme="dark"] .stat-icon-wrap,
[data-theme="dark"] .feature-icon {
  box-shadow: none;
}

[data-theme="dark"] .user-icon-wrap,
[data-theme="dark"] .blue-card .feature-icon {
  background: var(--primary-light);
  color: var(--accent-blue-text);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .api-icon-wrap,
[data-theme="dark"] .green-card .feature-icon {
  background: var(--green-light);
  color: var(--accent-green-text);
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .amber-icon-wrap,
[data-theme="dark"] .orange-card .feature-icon {
  background: var(--orange-light);
  color: var(--accent-amber-text);
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .send-icon-wrap,
[data-theme="dark"] .purple-card .feature-icon {
  background: var(--purple-light);
  color: var(--accent-purple-text);
  border-color: rgba(168, 85, 247, 0.3);
}

[data-theme="dark"] .cyan-card .feature-icon {
  background: var(--cyan-light);
  color: var(--accent-cyan-text);
  border-color: rgba(6, 182, 212, 0.3);
}

[data-theme="dark"] .blue-card .feature-badge {
  background: rgba(59, 130, 246, 0.16);
  color: var(--accent-blue-text);
}
[data-theme="dark"] .green-card .feature-badge {
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-green-text);
}
[data-theme="dark"] .purple-card .feature-badge {
  background: rgba(168, 85, 247, 0.16);
  color: var(--accent-purple-text);
}
[data-theme="dark"] .cyan-card .feature-badge {
  background: rgba(6, 182, 212, 0.16);
  color: var(--accent-cyan-text);
}
[data-theme="dark"] .orange-card .feature-badge {
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent-amber-text);
}

[data-theme="dark"] .repeat-slider {
  background: #334155;
}

@media (max-width: 640px) {
  .tool-detail-controls { flex-wrap: wrap; align-items: stretch; }
  .tool-detail-controls .input-with-icon { flex: 1 1 180px; min-width: 0; }
  #facebook-tool-search { width: 100%; min-width: 0; }
  #facebook-tool-count { margin-left: auto; }
}

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

  .view,
  .repeat-body,
  .pulse-dot,
  .status-indicator {
    animation: none !important;
  }

  .stat-card:hover,
  .feature-card:hover,
  .shortcut-card:hover,
  .session-card:hover,
  .topbar-add-acc-btn:hover,
  .primary-button:hover:not(:disabled) {
    transform: none !important;
  }
}
