/* ============================================================
   DemoSherpa — Design B: Light & Clean
   Shared Stylesheet
   ============================================================ */

/* --- Reset & Base --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #ffffff;
  --bg-page: #f8f9fa;
  --bg-sidebar: #ffffff;
  --border: #e5e7eb;
  --border-focus: #f97316;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-light: #fff7ed;
  --teal: #0d9488;
  --teal-light: #f0fdfa;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --sidebar-width: 260px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: 1.714rem; }
h2 { font-size: 1.429rem; }
h3 { font-size: 1.143rem; }

p { color: var(--text-secondary); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.929rem;
}

/* --- Utility Classes --- */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-blue { color: var(--blue); }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.929rem; }
.text-xs { font-size: 0.857rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  font-size: 0.929rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-page); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-page); color: var(--text-primary); }

.btn-destructive {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-destructive:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-destructive-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-destructive-outline:hover { background: var(--red-light); }

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 0.857rem;
}
.btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  padding: 0;
}
.btn-icon.btn-sm { width: 30px; }

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 0.786rem;
  font-weight: 500;
  border-radius: 999px;
  line-height: 1.5;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-gray { background: #f3f4f6; color: var(--text-secondary); }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-accent { background: var(--accent-light); color: var(--accent); }

/* --- Form Elements --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.929rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  height: 36px;
  padding: 0 12px;
  font-size: 0.929rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}
.form-input.mono, .form-textarea.mono {
  font-family: var(--font-mono);
  font-size: 0.857rem;
}

.form-textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-helper {
  font-size: 0.857rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-error {
  font-size: 0.857rem;
  color: var(--red);
}

.form-input.error { border-color: var(--red); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tag Input */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  align-items: center;
  cursor: text;
}
.tag-input-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.857rem;
  background: #f3f4f6;
  border-radius: 4px;
  color: var(--text-primary);
}
.tag-fixed {
  background: #e5e7eb;
  color: var(--text-secondary);
}
.tag .tag-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
}
.tag .tag-remove:hover { color: var(--red); }
.tag-input {
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.929rem;
  flex: 1;
  min-width: 80px;
  background: transparent;
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.segmented-control button {
  padding: 6px 16px;
  font-size: 0.857rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid var(--border);
}
.segmented-control button:last-child { border-right: none; }
.segmented-control button.active {
  background: var(--accent);
  color: #fff;
}
.segmented-control button:hover:not(.active) {
  background: var(--bg-page);
}

/* Toggle / Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.929rem;
  cursor: pointer;
  color: var(--text-primary);
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Radio */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.929rem;
}
.radio-card:hover { border-color: var(--text-muted); }
.radio-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}
.radio-card input { accent-color: var(--accent); }

/* --- Cards --- */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-sm { padding: 16px; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { margin: 0; }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-description {
  font-size: 0.929rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Tables --- */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.929rem;
}

thead th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.857rem;
  color: var(--text-secondary);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:hover { background: #f3f4f6; }
tbody tr.clickable { cursor: pointer; }

/* --- Layout: Public Pages --- */
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Nav (Marketing) */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-nav .logo {
  font-size: 1.286rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-nav .logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.929rem;
}

.top-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.top-nav .nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.929rem;
  transition: color 0.15s;
}
.top-nav .nav-links a:hover { color: var(--text-primary); }

.top-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Auth Card (Login, Signup, Forgot) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  padding: 32px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo a {
  font-size: 1.429rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.auth-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.auth-card h1 {
  font-size: 1.429rem;
  margin-bottom: 4px;
}

.auth-card .auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-card .form-group + .form-group { margin-top: 16px; }

.auth-card .btn-primary { width: 100%; margin-top: 20px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.857rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.929rem;
  color: var(--text-secondary);
}

.password-field {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.857rem;
  font-family: var(--font-sans);
}
.password-toggle:hover { color: var(--text-primary); }

.btn-google {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
}
.btn-google:hover { background: var(--bg-page); }
.btn-google svg { width: 18px; height: 18px; }

.inline-error {
  background: var(--red-light);
  border: 1px solid #fecaca;
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.929rem;
  margin-bottom: 16px;
}

.success-state {
  text-align: center;
  padding: 20px 0;
}
.success-state .success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

/* --- Layout: Dashboard (Sidebar + Main) --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
  transition: transform 0.2s;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.857rem;
}
.sidebar-logo span {
  font-size: 1.143rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-back {
  padding: 8px 20px;
}
.sidebar-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.857rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.sidebar-back a:hover { color: var(--accent); }

.sidebar-site-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.sidebar-site-header .site-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.sidebar-site-header .site-domain {
  font-family: var(--font-mono);
  font-size: 0.786rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-section-label {
  padding: 16px 20px 6px;
  font-size: 0.714rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
}
.sidebar-nav a, .sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  font-size: 0.929rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}
.sidebar-nav a:hover, .sidebar-nav button:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}
.sidebar-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
  border-right: 3px solid var(--accent);
}
.sidebar-nav a .nav-icon, .sidebar-nav button .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-nav .nav-badge {
  margin-left: auto;
  background: #f3f4f6;
  color: var(--text-muted);
  font-size: 0.714rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  margin-top: auto;
}
.sidebar-footer .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.857rem;
}
.sidebar-footer .user-details {
  flex: 1;
  min-width: 0;
}
.sidebar-footer .user-name {
  font-size: 0.857rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer .user-email {
  font-size: 0.786rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer .sign-out {
  font-size: 0.786rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.sidebar-footer .sign-out:hover { color: var(--red); }

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-width: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 40;
}

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h1 { margin-bottom: 4px; }
.page-header-left .page-subtitle {
  color: var(--text-secondary);
  font-size: 0.929rem;
}
.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.857rem;
  margin-bottom: 12px;
}
.breadcrumbs a { color: var(--text-muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .separator { color: var(--text-muted); }
.breadcrumbs .current { color: var(--text-secondary); font-weight: 500; }

/* --- Stat Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .stat-value {
  font-size: 1.714rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.857rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.stat-card .stat-trend {
  font-size: 0.786rem;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* --- Dashboard Two-Column --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.right-rail { display: flex; flex-direction: column; gap: 16px; }

/* --- Section Cards --- */
.section-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.section-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.section-card-description {
  font-size: 0.857rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.section-card .form-group + .form-group { margin-top: 16px; }

/* --- Onboarding Banner --- */
.onboarding-banner {
  background: var(--amber-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.onboarding-banner .banner-content { flex: 1; }
.onboarding-banner .banner-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.onboarding-steps {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.929rem;
}
.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fde68a;
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.786rem;
  font-weight: 600;
  flex-shrink: 0;
}
.step-number.done {
  background: var(--green);
  color: #fff;
}
.banner-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.2rem;
  line-height: 1;
}
.banner-dismiss:hover { color: var(--text-primary); }

/* --- Info Callout --- */
.callout {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.929rem;
  line-height: 1.5;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.callout-amber {
  background: var(--amber-light);
  border: 1px solid #fde68a;
  color: var(--text-primary);
}
.callout-blue {
  background: var(--blue-light);
  border: 1px solid #bfdbfe;
  color: var(--text-primary);
}
.callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.callout-content { flex: 1; }
.callout .callout-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

/* --- Site Cards Grid --- */
.site-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.site-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.site-card:hover { border-color: var(--text-muted); }
.site-card .site-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.site-card .site-card-name {
  font-size: 1.071rem;
  font-weight: 600;
}
.site-card .site-card-domain {
  font-family: var(--font-mono);
  font-size: 0.857rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.site-card .site-card-stats {
  display: flex;
  gap: 16px;
  font-size: 0.857rem;
  color: var(--text-secondary);
  margin: 12px 0;
}
.site-card .site-card-agent {
  font-size: 0.857rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.site-card .site-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.site-card .site-card-footer .kebab {
  margin-left: auto;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state-icon {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 1.143rem;
  margin-bottom: 8px;
}
.empty-state p {
  max-width: 400px;
  margin: 0 auto 20px;
  font-size: 0.929rem;
}

/* --- Split View (Elements, Pages, Workflows) --- */
.split-view {
  display: grid;
  grid-template-columns: 1fr 0;
  gap: 0;
  transition: grid-template-columns 0.2s;
}
.split-view.panel-open {
  grid-template-columns: 60% 40%;
}

.split-list {
  min-width: 0;
}

.split-panel {
  display: none;
  border-left: 1px solid var(--border);
  background: var(--bg-primary);
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 32px;
}
.split-view.panel-open .split-panel {
  display: block;
  padding: 24px;
}
.split-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.split-panel-header h3 {
  font-size: 1.143rem;
}
.split-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 4px;
}
.split-panel-close:hover { color: var(--text-primary); }
.split-panel-footer {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* --- List Items (for split views) --- */
.list-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.list-filter-bar .form-input {
  max-width: 280px;
}

.filter-pills {
  display: flex;
  gap: 4px;
}
.filter-pill {
  padding: 4px 12px;
  font-size: 0.857rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-sans);
}
.filter-pill:hover { border-color: var(--text-muted); }
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.config-list {
  display: flex;
  flex-direction: column;
}
.config-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-primary);
}
.config-item:hover {
  border-color: var(--text-muted);
  background: #fafbfc;
}
.config-item.active {
  border-color: var(--accent);
  background: var(--accent-light);
}
.config-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  flex-shrink: 0;
}
.config-item-content {
  flex: 1;
  min-width: 0;
}
.config-item-role {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.929rem;
  color: var(--text-primary);
}
.config-item-desc {
  font-size: 0.857rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.config-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.config-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.config-item:hover .config-item-actions { opacity: 1; }
.config-item-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.config-item-actions button:hover { color: var(--text-primary); background: #f3f4f6; }
.config-item-actions button.delete:hover { color: var(--red); background: var(--red-light); }

/* --- Playbook Cards --- */
.playbook-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.playbook-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s;
}
.playbook-card:hover { border-color: var(--text-muted); }
.playbook-card.inactive {
  opacity: 0.6;
}
.playbook-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.playbook-card-header h3 { font-size: 1.071rem; }
.playbook-card-desc {
  font-size: 0.857rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.playbook-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.786rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.playbook-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.playbook-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}
.keyword-pill {
  padding: 2px 8px;
  font-size: 0.786rem;
  background: #f3f4f6;
  border-radius: 4px;
  color: var(--text-secondary);
}
.playbook-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.playbook-card-footer .kebab { margin-left: auto; }

/* --- Step Builder --- */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--bg-page);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step-row .step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.786rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 4px;
}
.step-row .step-content { flex: 1; min-width: 0; }
.step-row .step-content .form-group + .form-group { margin-top: 8px; }
.step-row .step-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-top: 4px;
}
.step-row .step-remove:hover { color: var(--red); }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-event {
  position: relative;
  padding-bottom: 24px;
}
.timeline-event:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -32px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-dot.green { border-color: var(--green); color: var(--green); }
.timeline-dot.blue { border-color: var(--blue); color: var(--blue); }
.timeline-dot.indigo { border-color: #6366f1; color: #6366f1; }
.timeline-dot.orange { border-color: var(--accent); color: var(--accent); }
.timeline-dot.red { border-color: var(--red); color: var(--red); }
.timeline-dot.gray { border-color: var(--text-muted); color: var(--text-muted); }

.timeline-event .event-time {
  font-size: 0.786rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.timeline-event .event-label {
  font-weight: 600;
  font-size: 0.929rem;
  margin-bottom: 4px;
}
.timeline-event .event-content {
  font-size: 0.929rem;
  color: var(--text-secondary);
}
.event-quote {
  border-left: 3px solid var(--border);
  padding-left: 12px;
  margin-top: 4px;
  font-style: italic;
  color: var(--text-secondary);
}
.event-code-block {
  margin-top: 8px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.857rem;
  overflow-x: auto;
  line-height: 1.6;
}
.event-source-badge {
  display: inline-flex;
  padding: 1px 6px;
  font-size: 0.714rem;
  background: #f3f4f6;
  border-radius: 4px;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 500;
}
.toggle-args {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.857rem;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  margin-top: 4px;
}
.toggle-args:hover { text-decoration: underline; }

/* --- Code Block --- */
.code-block-container {
  position: relative;
  margin: 16px 0;
}
.code-block {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.857rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}
.code-block .comment { color: #64748b; }
.code-block .string { color: #a5d6ff; }
.code-block .attr { color: #7dd3fc; }
.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.786rem;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.code-copy-btn:hover { background: rgba(255,255,255,0.2); color: #e2e8f0; }

/* --- Tabs --- */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 0.929rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Slide-Over Panel --- */
.slide-over-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
}
.slide-over-backdrop.open { display: block; }
.slide-over {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--bg-primary);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.slide-over.open { transform: translateX(0); }
.slide-over-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.slide-over-header h2 { font-size: 1.286rem; }
.slide-over-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.4rem;
  padding: 4px;
}
.slide-over-close:hover { color: var(--text-primary); }
.slide-over-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.slide-over-body .form-group + .form-group { margin-top: 16px; }
.slide-over-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* --- Modal --- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.15s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  padding: 20px 24px 0;
}
.modal-header h3 { font-size: 1.143rem; }
.modal-body {
  padding: 16px 24px;
}
.modal-body p { margin-bottom: 12px; }
.modal-footer {
  padding: 0 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }
.toast.info { border-left: 4px solid var(--blue); }
.toast-icon { flex-shrink: 0; }
.toast-message { flex: 1; font-size: 0.929rem; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 0.857rem;
  color: var(--text-secondary);
}
.pagination-controls {
  display: flex;
  gap: 4px;
}
.pagination-controls button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.857rem;
  cursor: pointer;
  font-family: var(--font-sans);
}
.pagination-controls button:hover { background: var(--bg-page); }
.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Accordion --- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion + .accordion { margin-top: 8px; }
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.929rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
}
.accordion-header:hover { background: #fafbfc; }
.accordion-arrow {
  transition: transform 0.2s;
  color: var(--text-muted);
}
.accordion.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body {
  display: none;
  padding: 0 18px 18px;
  font-size: 0.929rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.accordion.open .accordion-body { display: block; }

/* --- Danger Zone --- */
.danger-zone {
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 24px;
  background: #fffbfb;
  margin-top: 32px;
}
.danger-zone h3 {
  color: var(--red);
  margin-bottom: 8px;
}
.danger-zone p {
  margin-bottom: 16px;
  font-size: 0.929rem;
}

/* --- Preview Mock Browser --- */
.browser-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-primary);
}
.browser-mock-bar {
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-dots {
  display: flex;
  gap: 6px;
}
.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}
.browser-url {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 0.786rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.browser-mock-content {
  min-height: 480px;
  position: relative;
  background: #fafbfc;
  padding: 32px;
}

/* Widget Mock */
.widget-launcher {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.929rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-panel {
  position: absolute;
  bottom: 80px;
  right: 24px;
  width: 340px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.widget-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.widget-panel-header .widget-logo {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.786rem;
}
.widget-panel-header .widget-name {
  font-weight: 600;
  font-size: 0.929rem;
  flex: 1;
}
.widget-panel-header .widget-close {
  color: var(--text-muted);
  cursor: pointer;
}
.widget-panel-body {
  padding: 32px 24px;
  text-align: center;
}
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  margin-bottom: 12px;
}
.waveform span {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
.waveform span:nth-child(1) { height: 16px; animation-delay: 0s; }
.waveform span:nth-child(2) { height: 28px; animation-delay: 0.1s; }
.waveform span:nth-child(3) { height: 40px; animation-delay: 0.2s; }
.waveform span:nth-child(4) { height: 32px; animation-delay: 0.3s; }
.waveform span:nth-child(5) { height: 20px; animation-delay: 0.4s; }
.waveform span:nth-child(6) { height: 36px; animation-delay: 0.5s; }
.waveform span:nth-child(7) { height: 24px; animation-delay: 0.6s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
.widget-status {
  font-size: 0.857rem;
  color: var(--green);
  font-weight: 500;
}
.widget-mute {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.857rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: none;
  font-family: var(--font-sans);
}
.widget-mute:hover { background: var(--bg-page); }

/* --- Verification Checklist --- */
.checklist {
  list-style: none;
  padding: 0;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.929rem;
  color: var(--text-secondary);
}
.checklist .check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

/* --- Playbook Editor Two-Column --- */
.editor-grid {
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 24px;
  align-items: start;
}
.reference-panel {
  position: sticky;
  top: 32px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.reference-panel .tab-bar { padding: 0 16px; }
.reference-panel .tab-content { padding: 16px; }
.reference-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.857rem;
}
.reference-item:last-child { border-bottom: none; }
.reference-item:hover { color: var(--accent); }
.reference-item .ref-role {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
}
.reference-item .ref-desc {
  color: var(--text-muted);
  font-size: 0.786rem;
}

/* --- Marketing Page Specific --- */
.hero {
  padding: 80px 32px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--bg-page) 100%);
}
.hero h1 {
  font-size: 2.571rem;
  max-width: 700px;
  margin: 0 auto 16px;
  line-height: 1.15;
}
.hero .hero-sub {
  font-size: 1.143rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero .hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hero .hero-proof {
  font-size: 0.857rem;
  color: var(--text-muted);
}

.marketing-section {
  padding: 80px 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.marketing-section.bg-white { background: #fff; }
.marketing-section .section-title {
  text-align: center;
  font-size: 1.714rem;
  margin-bottom: 12px;
}
.marketing-section .section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.step-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.step-card .step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.286rem;
  font-weight: 700;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 0.929rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.feature-card h3 { margin-bottom: 6px; font-size: 1rem; }
.feature-card p { font-size: 0.857rem; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.pricing-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  position: relative;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-card .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.786rem;
  font-weight: 600;
}
.pricing-card .plan-name {
  font-size: 1.143rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.pricing-card .plan-price {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.pricing-card .plan-period {
  font-size: 0.857rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}
.pricing-card ul li {
  padding: 6px 0;
  font-size: 0.929rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-card ul li::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%2316a34a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.testimonial-card .quote {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.929rem;
  line-height: 1.6;
}
.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.testimonial-card .author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-page);
}
.testimonial-card .author-name {
  font-weight: 600;
  font-size: 0.857rem;
}
.testimonial-card .author-role {
  font-size: 0.786rem;
  color: var(--text-muted);
}

.cta-section {
  background: #1e293b;
  padding: 64px 32px;
  text-align: center;
  color: #fff;
}
.cta-section h2 {
  color: #fff;
  font-size: 1.714rem;
  margin-bottom: 12px;
}
.cta-section p {
  color: #94a3b8;
  margin-bottom: 24px;
}

.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 48px 32px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p {
  font-size: 0.857rem;
  margin-top: 8px;
}
.footer-col h4 {
  font-size: 0.857rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a {
  font-size: 0.857rem;
  color: var(--text-secondary);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-copyright {
  font-size: 0.786rem;
  color: var(--text-muted);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Video Placeholder --- */
.video-placeholder {
  background: #1e293b;
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  gap: 8px;
}
.video-placeholder .play-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

/* --- Donut Chart Placeholder --- */
.donut-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid var(--green);
  border-left-color: var(--border);
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* --- Kebab Menu --- */
.kebab {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 1px;
}
.kebab:hover { background: #f3f4f6; color: var(--text-primary); }

.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 20;
  padding: 4px;
}
.dropdown-menu.open { display: block; }
.dropdown-menu button, .dropdown-menu a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 0.857rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--bg-page); }
.dropdown-menu .danger { color: var(--red); }
.dropdown-menu .danger:hover { background: var(--red-light); }

/* --- Quick Links --- */
.quick-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.929rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.quick-links a:last-child { border-bottom: none; }
.quick-links a:hover { color: var(--accent); }

/* --- Sites Summary (Right Rail) --- */
.site-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.857rem;
}
.site-summary-item:last-child { border-bottom: none; }
.site-summary-domain {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 500;
}
.site-summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Settings Reminder --- */
.settings-reminder {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}
.settings-reminder h4 {
  font-size: 0.929rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.settings-reminder dl {
  font-size: 0.857rem;
}
.settings-reminder dt {
  color: var(--text-muted);
  font-weight: 500;
}
.settings-reminder dd {
  color: var(--text-primary);
  margin-bottom: 6px;
  margin-left: 0;
}

/* --- CSS Selector Tester --- */
.selector-tester {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 8px;
  display: none;
}
.selector-tester.open { display: block; }
.selector-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.selector-example {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.786rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
}
.selector-example:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 1280px) {
  .site-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .right-rail { display: none; }
  .editor-grid { grid-template-columns: 1fr; }
  .reference-panel { position: static; }
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding: 24px 16px; padding-top: 60px; }
  .stats-grid, .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-cards-grid { grid-template-columns: 1fr; }
  .playbook-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .split-view.panel-open { grid-template-columns: 1fr; }
  .split-panel { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; max-height: 100vh; border-left: none; }
  .hero h1 { font-size: 1.714rem; }
  .hero .hero-sub { font-size: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .onboarding-steps { flex-direction: column; gap: 8px; }
}
