/* ============================================================
   Drexora Support — Global Stylesheet
   Theme: Premium Modern Dark
   Color Palette System:
     Main background: #0A0A0A
     Secondary dark sections/sidebar: #171717
     Cards/panels/modals: #1F1F1F
     Borders/dividers: #2A2A2A
     Primary text: #FFFFFF
     Secondary text: #A3A3A3
     Accent/action color: #3B82F6
   ============================================================ */

:root {
  /* Brand Accent */
  --primary:          #3B82F6;
  --primary-light:    #60A5FA;
  --primary-dark:     #2563EB;
  --accent:           rgba(59, 130, 246, 0.15);

  /* Backgrounds */
  --bg-base:          #0A0A0A;
  --bg-mid:           #171717;
  --bg-top:           #1F1F1F;

  /* Surfaces */
  --surface:          #1F1F1F;
  --surface-raised:   #171717;
  --surface-overlay:  rgba(255, 255, 255, .04);

  /* Borders / glass */
  --border:           #2A2A2A;
  --border-strong:    #3A3A3A;
  --glass-bg:         #1F1F1F;
  --glass-border:     #2A2A2A;
  --glass-hover:      #262626;
  --glass-active:     rgba(59, 130, 246, .15);

  /* Text */
  --text-primary:     #FFFFFF;
  --text-secondary:   #A3A3A3;
  --text-muted:       #737373;
  --text-on-primary:  #FFFFFF;

  /* Specific surfaces */
  --sidebar-bg:       #171717;
  --sidebar-border:   #2A2A2A;
  --topbar-bg:        rgba(23, 23, 23, .90);
  --navbar-bg:        rgba(23, 23, 23, .90);
  --modal-bg:         #1F1F1F;
  --toast-bg:         #1F1F1F;
  --auth-card-bg:     #1F1F1F;
  --input-bg:         #171717;
  --code-bg:          #171717;
  --code-color:       #60A5FA;

  /* Page gradient */
  --page-grad:        linear-gradient(160deg, #0A0A0A 0%, #171717 50%, #0A0A0A 100%);
  --page-radial-1:    rgba(59, 130, 246, .08);
  --page-radial-2:    rgba(37, 99, 235, .05);

  /* Landing hero preview */
  --hero-preview-bg:  linear-gradient(135deg, #1F1F1F, #171717);

  /* Status */
  --success:          #10B981;
  --warning:          #F59E0B;
  --danger:           #EF4444;
  --info:             #3B82F6;

  /* Sizing */
  --sidebar-w:        250px;
  --radius:           14px;
  --radius-sm:        8px;
  --radius-lg:        20px;

  /* Shadows */
  --shadow-sm:        0 1px 4px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md:        0 4px 16px rgba(0, 0, 0, .5), 0 8px 32px rgba(0, 0, 0, .4);
  --shadow-lg:        0 12px 40px rgba(0, 0, 0, .6), 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-glow:      0 0 24px rgba(59, 130, 246, .2);

  --transition:       all .2s ease;
}

/* ── Dark theme override (matches root for full dark consistency) ── */
.dark-mode {
  --bg-base:          #0A0A0A;
  --bg-mid:           #171717;
  --bg-top:           #1F1F1F;

  --surface:          #1F1F1F;
  --surface-raised:   #171717;
  --surface-overlay:  rgba(255, 255, 255, .04);

  --border:           #2A2A2A;
  --border-strong:    #3A3A3A;
  --glass-bg:         #1F1F1F;
  --glass-border:     #2A2A2A;
  --glass-hover:      #262626;
  --glass-active:     rgba(59, 130, 246, .15);

  --text-primary:     #FFFFFF;
  --text-secondary:   #A3A3A3;
  --text-muted:       #737373;
  --text-on-primary:  #FFFFFF;

  --sidebar-bg:       #171717;
  --sidebar-border:   #2A2A2A;
  --topbar-bg:        rgba(23, 23, 23, .90);
  --navbar-bg:        rgba(23, 23, 23, .90);
  --modal-bg:         #1F1F1F;
  --toast-bg:         #1F1F1F;
  --auth-card-bg:     #1F1F1F;
  --input-bg:         #171717;
  --code-bg:          #171717;
  --code-color:       #60A5FA;

  --page-grad:        linear-gradient(160deg, #0A0A0A 0%, #171717 50%, #0A0A0A 100%);
  --page-radial-1:    rgba(59, 130, 246, .08);
  --page-radial-2:    rgba(37, 99, 235, .05);

  --hero-preview-bg:  linear-gradient(135deg, #1F1F1F, #171717);

  --success:          #10B981;
  --warning:          #F59E0B;
  --danger:           #EF4444;
  --info:             #3B82F6;

  --shadow-sm:        0 1px 4px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-md:        0 4px 16px rgba(0, 0, 0, .5), 0 8px 32px rgba(0, 0, 0, .4);
  --shadow-lg:        0 12px 40px rgba(0, 0, 0, .6), 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-glow:      0 0 24px rgba(59, 130, 246, .2);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; max-width: 100vw; overflow-x: hidden; background-color: #0A0A0A; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
  word-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Page background ────────────────────────────────────────── */
.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--page-radial-1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, var(--page-radial-2) 0%, transparent 55%),
    var(--page-grad);
  z-index: -1;
  transition: background .3s ease;
}

/* ── Theme toggle button ────────────────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
  background: var(--glass-hover);
}
.theme-toggle-icon { font-size: .95rem; line-height: 1; }
.theme-toggle-label { font-size: .78rem; }

/* ── Glass card ─────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: var(--transition);
  max-width: 100%;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card--elevated {
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  max-width: 100%;
}
.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 16px rgba(59, 130, 246, .35);
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, .50);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--glass-bg);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: var(--glass-hover);
}
.btn-danger {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .30);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(239, 68, 68, .22); }
.btn-success {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .30);
  color: var(--success);
}
.btn-success:hover { background: rgba(16, 185, 129, .22); }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; width: 100%; }
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.form-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: .9rem;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #171717;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .20);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 90px; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }

/* ── App layout ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; width: 100%; max-width: 100vw; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  max-width: 85vw;
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  overflow-y: auto;
  transition: transform .3s ease, background .3s ease;
  transform: translateX(-100%);
}
.sidebar.open { transform: translateX(0); }
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 0;
}
.sidebar-close {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: .85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sidebar-close:hover { background: var(--glass-hover); color: var(--text-primary); }
.nav-search-wrap {
  position: relative;
  margin: 0 2px 10px;
}
.nav-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.nav-search-input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: .8rem;
  outline: none;
}
.nav-search-input:focus { border-color: var(--primary); }
.nav-search-hidden { display: none !important; }
.nav-group { display: flex; flex-direction: column; }
.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 12px;
}
.nav-group.expanded .nav-sub { display: flex; }
.nav-sub-item { font-size: .8rem; padding: 7px 11px; }
.sidebar-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
  background: #1F1F1F;
  padding: 2px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.sidebar-logo-icon {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
  color: #FFFFFF;
}
.sidebar-logo-text { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: #FFFFFF; }
.sidebar-logo-text span { color: var(--primary); }
.sidebar-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-section-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(59, 130, 246, .15);
  color: var(--primary);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.nav-icon { width: 18px; height: 18px; opacity: .8; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--border);
}
.sidebar-avatar,
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; overflow: hidden; }
.sidebar-user-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; color: var(--text-primary); }
.sidebar-user-role,
.sidebar-user-email {
  font-size: .68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.sidebar-logout {
  margin-left: auto;
  font-size: .75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .25);
  color: var(--danger);
  transition: var(--transition);
}
.sidebar-logout:hover { background: rgba(239, 68, 68, .22); }

/* Main content */
.main-content {
  flex: 1;
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 18px 64px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .3s ease;
  width: 100%;
}
.topbar-title { font-size: 1.05rem; font-weight: 700; word-break: break-word; color: var(--text-primary); }
.topbar-subtitle { font-size: .8rem; color: var(--text-muted); margin-top: 1px; word-break: break-word; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.page-body { padding: 28px 32px; flex: 1; width: 100%; max-width: 100vw; }

/* Menu button — always visible; opens the full nav drawer */
.sidebar-toggle {
  display: flex;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 250;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 280;
}
.sidebar-overlay.open { display: block; }

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.stat-icon.purple { background: rgba(59, 130, 246, .12); color: var(--primary); }
.stat-icon.cyan   { background: rgba(16, 185, 129, .12); color: var(--success); }
.stat-icon.green  { background: rgba(16, 185, 129, .12); color: var(--success); }
.stat-icon.amber  { background: rgba(245, 158, 11, .12); color: var(--warning); }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--text-primary); word-break: break-all; }
.stat-label { font-size: .8rem; color: var(--text-secondary); font-weight: 500; }
.stat-change {
  font-size: .75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead tr { border-bottom: 1px solid var(--border); background: var(--surface-raised); }
th {
  padding: 12px 16px;
  text-align: left;
  font-size: .73rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-break: break-word;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--glass-hover); }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.badge-primary { background: rgba(59, 130, 246, .15); color: var(--primary); border: 1px solid rgba(59, 130, 246, .3); }
.badge-success { background: rgba(16, 185, 129, .12); color: var(--success); border: 1px solid rgba(16, 185, 129, .3); }
.badge-warning { background: rgba(245, 158, 11, .12); color: var(--warning); border: 1px solid rgba(245, 158, 11, .3); }
.badge-danger  { background: rgba(239, 68, 68, .12); color: var(--danger);  border: 1px solid rgba(239, 68, 68, .3); }
.badge-info    { background: rgba(59, 130, 246, .15); color: var(--info);    border: 1px solid rgba(59, 130, 246, .3); }
.badge-muted   { background: var(--surface-raised); color: var(--text-secondary); border: 1px solid var(--border); }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px;
  text-align: center; color: var(--text-muted); gap: 12px;
}
.empty-state-icon { font-size: 3rem; opacity: .4; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.empty-state-desc { font-size: .875rem; max-width: 320px; line-height: 1.6; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.modal-title { font-size: 1.05rem; font-weight: 700; word-break: break-word; color: var(--text-primary); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: grid; place-items: center;
  font-size: 1.1rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--glass-hover); color: var(--text-primary); }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; flex-wrap: wrap; }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  background: var(--toast-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-md);
  width: 320px;
  max-width: 100%;
  animation: toastIn .3s ease both;
  pointer-events: all;
  font-size: .875rem;
  color: var(--text-primary);
  word-break: break-word;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--info); }
.toast-icon { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.5; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Section header ─────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.section-title { font-size: 1rem; font-weight: 700; word-break: break-word; color: var(--text-primary); }
.section-desc { font-size: .8rem; color: var(--text-muted); margin-top: 2px; word-break: break-word; }

/* ── Code block ─────────────────────────────────────────────── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: .8rem;
  color: var(--code-color);
  word-break: break-all;
  line-height: 1.7;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.code-copy {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 10px;
  font-size: .72rem;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  transition: var(--transition);
  font-family: system-ui, sans-serif;
  font-weight: 600;
}
.code-copy:hover { background: var(--primary-dark); }

/* ── Search input ───────────────────────────────────────────── */
.search-wrap { position: relative; flex: 1; max-width: 320px; width: 100%; }
.search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: .9rem;
}
.search-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 14px 9px 36px;
  font-size: .875rem;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .20);
}
.search-input::placeholder { color: var(--text-muted); }

/* ── Divider ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Loading spinner ────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(59, 130, 246, .15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 60px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 10, 10, .85);
  display: grid; place-items: center;
  border-radius: inherit; z-index: 5;
}
.dark-mode .loading-overlay { background: rgba(10, 10, 10, .85); }

/* ── Colour swatch picker ───────────────────────────────────── */
.colour-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.colour-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.colour-swatch.selected { border-color: var(--text-primary); box-shadow: 0 0 0 3px var(--primary); }

/* ── Avatar upload ──────────────────────────────────────────── */
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.avatar-preview {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary);
  display: grid; place-items: center;
  font-size: 1.5rem; color: #fff; font-weight: 700;
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── Landing page ───────────────────────────────────────────── */
.landing-body {
  background:
    radial-gradient(ellipse 90% 70% at 15% 5%,  var(--page-radial-1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 85% 85%, var(--page-radial-2) 0%, transparent 50%),
    var(--page-grad);
  min-height: 100vh;
  transition: background .3s ease;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease;
  width: 100%;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; font-weight: 800;
  flex-shrink: 0;
  color: var(--text-primary);
}
.navbar-brand-img {
  width: 34px; height: 34px;
  object-fit: contain;
  border-radius: 7px;
  background: #1F1F1F;
  border: 1px solid var(--border);
  padding: 2px;
  box-shadow: var(--shadow-sm);
}
.navbar-brand-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 99px;
  display: grid; place-items: center; font-size: 1rem;
  color: #fff;
}
.navbar-links {
  display: flex; align-items: center; gap: 32px;
  font-size: .875rem; color: var(--text-secondary);
}
.navbar-links a:hover { color: var(--text-primary); }
.navbar-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 20px 80px; position: relative;
  width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  background: rgba(59, 130, 246, .10);
  border: 1px solid rgba(59, 130, 246, .25);
  border-radius: 99px;
  font-size: .8rem; color: var(--primary); margin-bottom: 24px; font-weight: 600;
  max-width: 100%;
}
.hero-title {
  font-size: clamp(1.8rem, 6vw, 4.2rem);
  font-weight: 900; line-height: 1.15;
  letter-spacing: -.03em; margin-bottom: 22px;
  max-width: 780px; margin-left: auto; margin-right: auto;
  color: var(--text-primary);
  word-break: break-word;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem); color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 36px; line-height: 1.7;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-preview { margin-top: 56px; position: relative; max-width: 900px; margin-left: auto; margin-right: auto; width: 100%; }
.hero-preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 16px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, .10);
  width: 100%;
}
.hero-preview-img {
  border-radius: 12px; width: 100%; min-height: 260px;
  background: var(--hero-preview-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .9rem; overflow: hidden;
}

/* Dashboard preview mock */
.dash-preview {
  width: 100%; padding: 16px;
  display: grid; grid-template-columns: 200px 1fr;
  gap: 16px; min-height: 300px;
}
.dp-sidebar {
  background: var(--surface-raised);
  border-radius: 10px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.dp-nav-item { height: 30px; border-radius: 6px; background: var(--border); }
.dp-nav-item.active { background: rgba(59, 130, 246, .25); }
.dp-main { display: flex; flex-direction: column; gap: 12px; }
.dp-header { height: 40px; background: var(--border); border-radius: 8px; }
.dp-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.dp-stat {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.dp-stat-val { height: 22px; width: 60%; background: rgba(59, 130, 246, .30); border-radius: 4px; }
.dp-stat-lbl { height: 10px; width: 80%; background: var(--border); border-radius: 4px; }
.dp-table { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 10px; flex: 1; }

/* Features section */
.features-section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; width: 100%; }
.section-label {
  text-align: center; font-size: .8rem; font-weight: 700;
  color: var(--primary); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 12px;
}
.section-heading {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px;
  color: var(--text-primary);
}
.section-subheading {
  text-align: center; font-size: 1rem; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto 48px; line-height: 1.7;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.4rem; margin-bottom: 18px;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .25);
  color: var(--primary);
}
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.feature-desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.65; }

/* How it works */
.how-section { padding: 80px 20px; max-width: 900px; margin: 0 auto; width: 100%; }
.steps { display: grid; gap: 0; position: relative; }
.steps::before {
  content: '';
  position: absolute;
  left: 22px; top: 28px; bottom: 28px;
  width: 2px;
  background: var(--primary);
  opacity: .35;
}
.step { display: flex; gap: 20px; padding: 24px 0; animation: fadeUp .5s ease both; }
.step-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary);
  display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; color: #fff;
  flex-shrink: 0; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-base), var(--shadow-glow);
}
.step-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.step-desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.65; }

/* Pricing */
.pricing-section { padding: 80px 20px; max-width: 900px; margin: 0 auto; width: 100%; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 20px; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: var(--transition); position: relative;
  box-shadow: var(--shadow-sm);
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff; font-size: .7rem; font-weight: 800;
  padding: 3px 14px; border-radius: 99px; letter-spacing: .05em;
  white-space: nowrap;
}
.pricing-name { font-size: .8rem; font-weight: 700; color: var(--primary); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.pricing-price { font-size: 2.4rem; font-weight: 900; line-height: 1; margin-bottom: 4px; color: var(--text-primary); }
.pricing-period { font-size: .8rem; color: var(--text-muted); margin-bottom: 20px; }
.pricing-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.pricing-feature { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--text-secondary); }
.pricing-feature-check { color: var(--success); font-size: .9rem; flex-shrink: 0; }

/* CTA */
.cta-section { padding: 60px 20px 100px; text-align: center; width: 100%; }
.cta-card {
  max-width: 700px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(37, 99, 235, .06));
  border: 1px solid rgba(59, 130, 246, .25);
  border-radius: var(--radius-lg); padding: 48px 24px;
  box-shadow: var(--shadow-glow), var(--shadow-md);
  width: 100%;
}
.cta-title { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.cta-desc { font-size: 1rem; color: var(--text-secondary); margin-bottom: 32px; }

/* Footer */
.landing-footer {
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: .8rem; color: var(--text-muted);
  flex-wrap: wrap; gap: 16px;
  background: var(--surface-raised);
  width: 100%;
}
.footer-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-logo {
  width: 22px; height: 22px; object-fit: contain;
  border-radius: 4px; background: #1F1F1F; padding: 2px;
  border: 1px solid var(--border);
}

/* Auth pages */
.auth-page {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center; padding: 24px 16px;
  width: 100%;
  background: var(--bg-base);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--auth-card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex; align-items: center;
  justify-content: center; gap: 10px; margin-bottom: 24px;
}
.auth-logo-img {
  width: 48px; height: 48px; object-fit: contain;
  border-radius: 12px; background: #1F1F1F; padding: 4px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.auth-logo-text { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
.auth-title { font-size: 1.35rem; font-weight: 800; text-align: center; margin-bottom: 6px; color: var(--text-primary); }
.auth-subtitle { font-size: .875rem; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { color: var(--primary-light); }

/* ── Widget install box ─────────────────────────────────────── */
.install-box {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 10px;
  width: 100%;
}
.install-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.install-step:last-child { border-bottom: none; padding-bottom: 0; }
.install-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; color: #fff;
  flex-shrink: 0; margin-top: 2px;
}
.install-step-body { flex: 1; min-width: 0; }
.install-step-title { font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.install-step-desc { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .app-layout { flex-direction: column; }
  .main-content { margin-left: 0; width: 100%; max-width: 100vw; }
  .dashboard-cols { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .topbar { padding: 14px 16px 14px 60px; flex-wrap: wrap; gap: 10px; }
  .topbar-subtitle { display: none; }
  .page-body { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .navbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .navbar-links { display: none; }
  .cta-card { padding: 36px 20px; }
  .landing-footer { padding: 20px 16px; flex-direction: column; align-items: center; text-align: center; }
  .dp-sidebar { display: none; }
  .dash-preview { grid-template-columns: 1fr; }
  .theme-toggle-label { display: none; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .modal-footer { flex-direction: column-reverse; width: 100%; }
  .modal-footer .btn { width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 18px; border-radius: var(--radius); }
  .modal-overlay { padding: 8px; align-items: flex-start; }
  .modal { padding: 20px 16px; max-height: calc(100dvh - 16px); margin: auto; border-radius: var(--radius); width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
  .page-body { padding: 16px 12px; }
  .topbar { padding: 12px 12px 12px 56px; }
  .topbar-title { font-size: .95rem; }
  .topbar-actions .btn-sm { padding: 5px 10px; font-size: .75rem; }
  .theme-toggle { padding: 5px 9px; }
  .hero { padding: 100px 14px 60px; }
  .hero-preview-wrap { padding: 10px; }
  .hero-preview-img { min-height: 220px; }
  .dash-preview { padding: 10px; gap: 10px; }
  .dp-stats { grid-template-columns: 1fr; }
  .cta-section { padding: 40px 14px 80px; }
  .steps::before { left: 18px; }
  .step-num { width: 38px; height: 38px; font-size: .8rem; }
  .step { gap: 14px; }
  .account-type-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 1.6rem; }
  .navbar-brand span { font-size: .9rem; }
  .navbar-cta .btn { padding: 5px 10px; font-size: .75rem; }
  .sidebar-toggle { width: 34px; height: 34px; top: 10px; left: 10px; font-size: 1rem; }
  .topbar { padding-left: 50px; }
}

/* ── Modal Popups ────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .2s ease-out;
}

.modal-card {
  position: relative;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .25s ease-out;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.animate-fadeUp { animation: fadeUp .5s ease both; }
.animate-fadeIn { animation: fadeIn .4s ease both; }
.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .10s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .20s; }

/* ── FAQ management ─────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: var(--transition); box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.faq-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.faq-item-body { flex: 1; min-width: 200px; }
.faq-question { font-size: .9rem; font-weight: 600; margin-bottom: 5px; color: var(--text-primary); word-break: break-word; }
.faq-answer { font-size: .825rem; color: var(--text-secondary); line-height: 1.6; word-break: break-word; }
.faq-actions { display: flex; gap: 8px; flex-shrink: 0; margin-top: 4px; }

/* ── Chat messages ──────────────────────────────────────────── */
.chat-messages { display: flex; flex-direction: column; gap: 12px; padding: 20px; width: 100%; }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 85%; }
.msg.visitor { align-self: flex-end; }
.msg.bot { align-self: flex-start; }
.msg-bubble {
  padding: 10px 14px; border-radius: 12px;
  font-size: .875rem; line-height: 1.55;
  word-break: break-word;
}
.msg.bot .msg-bubble {
  background: #171717;
  border: 1px solid #2A2A2A;
  border-top-left-radius: 3px;
  color: var(--text-primary);
}
.msg.visitor .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 3px;
}
.msg-time { font-size: .72rem; color: var(--text-muted); }
.msg.visitor .msg-time { text-align: right; }

/* ── Settings sections ──────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
@media (max-width: 850px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-section-title {
  font-size: .95rem; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

/* ── Multi-website switcher ─────────────────────────────────── */
.sidebar-website-switcher {
  padding: 6px 12px 4px;
}
.website-switcher { position: relative; }
.website-switcher-current {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: #171717;
  border: 1px solid #2A2A2A; border-radius: 10px;
  padding: 8px 10px; cursor: pointer; text-align: left; color: var(--text-primary);
  transition: var(--transition);
}
.website-switcher-current:hover { border-color: var(--primary); }
.website-switcher-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.website-switcher-name { font-size: .85rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.website-switcher-caret { margin-left: auto; color: var(--text-muted); font-weight: 700; }
.website-switcher-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 100;
  background: #1F1F1F; border: 1px solid #2A2A2A;
  border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; max-height: min(420px, 60vh); overflow-y: auto;
}
.website-switcher-header { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); padding: 6px 10px; }
.website-switcher-empty { font-size: .8rem; color: var(--text-muted); padding: 10px; text-align: center; }
.website-switcher-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.website-switcher-item:hover { background: rgba(59, 130, 246, .10); }
.website-switcher-item.active { background: rgba(59, 130, 246, .18); }
.website-switcher-item-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.website-switcher-item-name { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.website-switcher-item-widget { font-size: .68rem; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.website-switcher-item-actions { display: flex; gap: 2px; flex-shrink: 0; }
.website-switcher-item-actions .ws-action {
  background: transparent; border: none; cursor: pointer; font-size: .85rem; padding: 3px;
  border-radius: 6px; opacity: .65; transition: var(--transition); color: var(--text-secondary);
}
.website-switcher-item-actions .ws-action:hover { opacity: 1; background: rgba(255, 255, 255, .05); color: var(--text-primary); }
.website-switcher-add {
  padding: 9px 10px; margin: 4px 0 2px; border-top: 1px solid var(--border);
  font-size: .8rem; font-weight: 700; color: var(--primary); cursor: pointer; text-align: center; border-radius: 8px;
}
.website-switcher-add:hover { background: rgba(59, 130, 246, .10); }
.website-help {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.6;
}

/* ── Website script modal ───────────────────────────────────── */
.ws-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 2000;
  display: grid; place-items: center; padding: 16px; animation: fadeIn .25s ease both;
}
.ws-modal {
  background: var(--modal-bg); border: 1px solid var(--border); border-radius: 16px;
  max-width: 620px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg);
}
.ws-modal-title { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.ws-modal-sub { font-size: .85rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 14px; }
.ws-modal-code {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem;
  color: var(--code-color); overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.ws-modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
