/* ═══════════════════════════════════════════════════════════════════
   SEO Intelligence — Enterprise Design System
   Global agency command center · Ahrefs clarity · Semrush scale
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

.app-shell--enterprise {
  --intel-font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --intel-font-body: 'DM Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
  --intel-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --intel-canvas: #eceef2;
  --intel-surface: #ffffff;
  --intel-border: rgba(15, 23, 42, 0.07);
  --intel-border-strong: rgba(15, 23, 42, 0.11);

  --intel-sidebar-bg: #ffffff;
  --intel-sidebar-surface: rgba(15, 23, 42, 0.03);
  --intel-sidebar-border: rgba(15, 23, 42, 0.08);
  --intel-sidebar-text: #64748b;
  --intel-sidebar-text-hover: #0b1220;
  --intel-sidebar-active: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.06) 100%);

  --intel-accent: #6366f1;
  --intel-accent-deep: #4f46e5;
  --intel-accent-glow: rgba(99, 102, 241, 0.4);
  --intel-emerald: #059669;
  --intel-sky: #0284c7;
  --intel-violet: #7c3aed;
  --intel-amber: #d97706;

  --intel-text: #0b1220;
  --intel-text-secondary: #475569;
  --intel-text-muted: #94a3b8;

  --intel-radius: 14px;
  --intel-radius-lg: 18px;
  --intel-radius-xl: 22px;

  --intel-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 32px rgba(15, 23, 42, 0.06);
  --intel-shadow-hover: 0 8px 40px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(15, 23, 42, 0.06);

  font-family: var(--intel-font-body);
  background: var(--intel-canvas);
  color: var(--intel-text);
}

.app-shell--enterprise::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 30%);
}

.app-shell--enterprise .app-main-wrap {
  z-index: 1;
}

.app-shell--enterprise .app-main {
  max-width: 1440px;
  padding: 32px 48px 56px;
  animation: intelFadeUp 0.45s ease-out;
}

@keyframes intelFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Sidebar ── */
.app-shell--enterprise .intel-sidebar {
  width: 272px;
  background: var(--intel-sidebar-bg);
  border-right: 1px solid var(--intel-sidebar-border);
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.04), 4px 0 24px rgba(15, 23, 42, 0.04);
}

.app-shell--enterprise .intel-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.35;
}

.app-shell--enterprise .intel-brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.app-shell--enterprise .intel-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.app-shell--enterprise .intel-brand-title {
  font-family: var(--intel-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--intel-text);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.app-shell--enterprise .intel-brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--intel-text-muted);
  margin-top: 3px;
}

.app-shell--enterprise .app-nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--intel-text-muted);
  padding: 20px 16px 8px;
}

.app-shell--enterprise .app-nav-item {
  margin: 2px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--intel-sidebar-text);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.app-shell--enterprise .app-nav-item:hover {
  color: var(--intel-sidebar-text-hover);
  background: rgba(15, 23, 42, 0.04);
}

.app-shell--enterprise .app-nav-item.active {
  color: var(--intel-accent-deep);
  background: var(--intel-sidebar-active);
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-shell--enterprise .app-nav-item svg {
  opacity: 0.65;
  width: 18px;
  height: 18px;
}

.app-shell--enterprise .app-nav-item.active svg {
  opacity: 1;
  color: var(--intel-accent);
}

.app-shell--enterprise .intel-sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 10px 12px;
  border-radius: 12px;
  background: var(--intel-sidebar-surface);
  border: 1px solid var(--intel-sidebar-border);
}

.app-shell--enterprise .intel-sidebar-action {
  width: 100%;
  margin: 2px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--intel-sidebar-text);
  transition: all 0.18s;
}

.app-shell--enterprise .intel-sidebar-action:hover {
  color: var(--intel-text);
  background: rgba(15, 23, 42, 0.04);
}

.app-shell--enterprise .app-sidebar-cta {
  margin: 8px 10px 4px;
  width: calc(100% - 20px);
  height: 44px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ── Topbar ── */
.app-shell--enterprise .intel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 48px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--intel-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-shell--enterprise .intel-topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--intel-border);
  color: var(--intel-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.app-shell--enterprise .intel-topbar-search:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.04);
  color: var(--intel-text-secondary);
}

.app-shell--enterprise .intel-topbar-search kbd {
  margin-left: auto;
  font-family: var(--intel-font-mono);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--intel-border);
  color: var(--intel-text-muted);
}

.app-shell--enterprise .intel-topbar-agency {
  font-family: var(--intel-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--intel-text-secondary);
  letter-spacing: -0.2px;
}

.app-shell--enterprise .intel-topbar-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--intel-accent-deep);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.app-shell--enterprise .app-topbar-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--intel-border);
  background: var(--intel-surface);
  color: var(--intel-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.app-shell--enterprise .app-topbar-icon:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--intel-accent);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.app-shell--enterprise .app-topbar-badge {
  top: -2px;
  right: -2px;
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.app-shell--enterprise .app-topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-family: var(--intel-font-display);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.app-shell--enterprise .app-topbar-user-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--intel-text);
}

.app-shell--enterprise .app-topbar-user-email {
  font-size: 11px;
  color: var(--intel-text-muted);
}

/* ── Page header ── */
.app-shell--enterprise .intel-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--intel-border);
}

.app-shell--enterprise .intel-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--intel-accent-deep);
  margin-bottom: 10px;
}

.app-shell--enterprise .intel-page-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--intel-emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: intelPulse 2s ease-in-out infinite;
}

@keyframes intelPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.app-shell--enterprise .intel-page-title {
  font-family: var(--intel-font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
  color: var(--intel-text);
  margin: 0;
}

.app-shell--enterprise .intel-page-desc {
  font-size: 15px;
  color: var(--intel-text-secondary);
  margin-top: 8px;
  max-width: 520px;
  line-height: 1.6;
}

/* ── Command hero ── */
.app-shell--enterprise .intel-command-hero {
  position: relative;
  border-radius: var(--intel-radius-xl);
  padding: 36px 40px;
  margin-bottom: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e1a 0%, #12182b 40%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.app-shell--enterprise .intel-command-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

.app-shell--enterprise .intel-command-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.app-shell--enterprise .intel-command-inner {
  position: relative;
  z-index: 1;
}

.app-shell--enterprise .intel-command-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.9);
  margin-bottom: 8px;
}

.app-shell--enterprise .intel-command-title {
  font-family: var(--intel-font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.app-shell--enterprise .intel-command-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.52);
  margin-bottom: 24px;
}

.app-shell--enterprise .intel-command-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
}

.app-shell--enterprise .intel-command-input {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  font-family: var(--intel-font-body);
  outline: none;
  transition: all 0.2s;
}

.app-shell--enterprise .intel-command-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.app-shell--enterprise .intel-command-input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.app-shell--enterprise .intel-command-btn {
  height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}

.app-shell--enterprise .intel-command-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55);
}

/* ── KPI grid ── */
.app-shell--enterprise .intel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.app-shell--enterprise .intel-kpi {
  background: var(--intel-surface);
  border: 1px solid var(--intel-border);
  border-radius: var(--intel-radius-lg);
  padding: 22px 24px;
  box-shadow: var(--intel-shadow);
  transition: all 0.22s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-shell--enterprise .intel-kpi:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--intel-shadow-hover);
  transform: translateY(-2px);
}

.app-shell--enterprise .intel-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-shell--enterprise .intel-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-shell--enterprise .intel-kpi-icon.blue { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.app-shell--enterprise .intel-kpi-icon.green { background: rgba(16, 185, 129, 0.1); color: #059669; }
.app-shell--enterprise .intel-kpi-icon.violet { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.app-shell--enterprise .intel-kpi-icon.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.app-shell--enterprise .intel-kpi-icon.sky { background: rgba(14, 165, 233, 0.1); color: #0284c7; }

.app-shell--enterprise .intel-kpi-value {
  font-family: var(--intel-font-mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--intel-text);
}

.app-shell--enterprise .intel-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--intel-text-muted);
  margin-top: 6px;
}

/* ── Panels ── */
.app-shell--enterprise .dash-panel {
  background: var(--intel-surface);
  border: 1px solid var(--intel-border);
  border-radius: var(--intel-radius-lg);
  box-shadow: var(--intel-shadow);
  transition: box-shadow 0.22s, border-color 0.22s;
}

.app-shell--enterprise .dash-panel:hover {
  border-color: var(--intel-border-strong);
  box-shadow: var(--intel-shadow-hover);
}

.app-shell--enterprise .dash-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.app-shell--enterprise .dash-panel-title {
  font-family: var(--intel-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--intel-text);
}

.app-shell--enterprise .dash-panel-sub {
  font-size: 13px;
  color: var(--intel-text-muted);
  margin-top: 3px;
}

.app-shell--enterprise .dash-panel-body {
  padding: 22px 24px;
}

/* ── Buttons ── */
.app-shell--enterprise .ui-btn-primary {
  height: 42px;
  padding: 0 22px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13.5px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: all 0.18s;
}

.app-shell--enterprise .ui-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.app-shell--enterprise .ui-btn-secondary,
.app-shell--enterprise .ui-btn-outline {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--intel-border-strong);
  background: var(--intel-surface);
  color: var(--intel-text-secondary);
  transition: all 0.18s;
}

.app-shell--enterprise .ui-btn-secondary:hover,
.app-shell--enterprise .ui-btn-outline:hover {
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--intel-accent-deep);
  background: rgba(99, 102, 241, 0.04);
}

.app-shell--enterprise .ui-btn-ghost {
  font-weight: 600;
  font-size: 13px;
  color: var(--intel-accent);
}

/* ── Forms ── */
.app-shell--enterprise .ui-input {
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--intel-border-strong);
  background: var(--intel-surface);
  font-family: var(--intel-font-body);
  font-size: 14px;
  transition: all 0.18s;
}

.app-shell--enterprise .ui-input:focus {
  border-color: var(--intel-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  outline: none;
}

.app-shell--enterprise .ui-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--intel-text-secondary);
  margin-bottom: 6px;
}

/* ── Tables ── */
.app-shell--enterprise .seo-table th {
  font-family: var(--intel-font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--intel-text-muted);
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.025);
  border-bottom: 1px solid var(--intel-border);
}

.app-shell--enterprise .seo-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.app-shell--enterprise .seo-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

.app-shell--enterprise .seo-rank {
  font-family: var(--intel-font-mono);
  font-weight: 700;
}

/* ── Lists ── */
.app-shell--enterprise .dash-list-item {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: all 0.18s;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-shell--enterprise .dash-list-item:hover {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.12);
}

.app-shell--enterprise .dash-list-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--intel-text);
}

.app-shell--enterprise .dash-list-meta {
  font-size: 12px;
  color: var(--intel-text-muted);
}

.app-shell--enterprise .dash-score-pill {
  font-family: var(--intel-font-mono);
  font-weight: 700;
  font-size: 13px;
}

/* ── Quick actions ── */
.app-shell--enterprise .intel-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.app-shell--enterprise .intel-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--intel-border);
  background: rgba(15, 23, 42, 0.02);
  text-decoration: none;
  color: var(--intel-text);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.18s;
}

.app-shell--enterprise .intel-quick-link:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  color: var(--intel-accent-deep);
  transform: translateX(3px);
}

.app-shell--enterprise .intel-quick-link svg {
  color: var(--intel-accent);
  flex-shrink: 0;
}

/* ── Stat cards (legacy) ── */
.app-shell--enterprise .dash-stat-card {
  border-radius: var(--intel-radius-lg);
  border: 1px solid var(--intel-border);
  box-shadow: var(--intel-shadow);
}

.app-shell--enterprise .dash-stat-value {
  font-family: var(--intel-font-mono);
}

.app-shell--enterprise .dash-stat {
  border-radius: var(--intel-radius-lg);
  border: 1px solid var(--intel-border);
  background: var(--intel-surface);
  box-shadow: var(--intel-shadow);
}

/* ── Site cards, members ── */
.app-shell--enterprise .seo-site-card {
  border-radius: 12px;
  border: 1px solid var(--intel-border);
  background: var(--intel-surface);
  transition: all 0.18s;
}

.app-shell--enterprise .seo-site-card.active {
  border-color: var(--intel-accent);
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.app-shell--enterprise .pp-member-card {
  border-radius: var(--intel-radius);
  border: 1px solid var(--intel-border);
  background: var(--intel-surface);
  box-shadow: var(--intel-shadow);
}

.app-shell--enterprise .pp-member-avatar {
  border-radius: 12px;
}

/* ── Empty states ── */
.app-shell--enterprise .dash-empty {
  border-radius: var(--intel-radius-lg);
  border: 1px dashed var(--intel-border-strong);
  background: rgba(15, 23, 42, 0.02);
}

/* ── Dark mode ── */
.dark {
  --i-sidebar: #0f1319;
  --i-sidebar-surface: rgba(255, 255, 255, 0.04);
  --i-sidebar-border: rgba(255, 255, 255, 0.08);
  --i-sidebar-text: rgba(255, 255, 255, 0.55);
  --i-sidebar-text-desc: rgba(255, 255, 255, 0.35);
  --i-sidebar-text-active: #f8fafc;
  --i-sidebar-hover: rgba(255, 255, 255, 0.05);
  --i-sidebar-icon: rgba(255, 255, 255, 0.45);
  --i-sidebar-icon-active: #c7d2fe;
  --i-sidebar-active-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.1) 100%);
  --i-sidebar-active-border: rgba(129, 140, 248, 0.28);
}

.dark .intel-sidebar {
  box-shadow: 4px 0 48px rgba(0, 0, 0, 0.35);
}

.dark .intel-sidebar::after {
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
}

.dark .intel-brand-title { color: #f3f5fa; }
.dark .intel-brand-sub { color: rgba(255, 255, 255, 0.38); }
.dark .intel-nav-group__label { color: rgba(255, 255, 255, 0.28); opacity: 1; }
.dark .nav-link--active .nav-link__desc { color: rgba(199, 210, 254, 0.75); }
.dark .intel-sidebar__footer { background: rgba(0, 0, 0, 0.12); }
.dark .intel-sidebar-user__name { color: #eef1f7; }
.dark .intel-sidebar-user__email { color: rgba(255, 255, 255, 0.38); }

.dark .app-shell--enterprise {
  --intel-canvas: #07090f;
  --intel-surface: #0f1319;
  --intel-border: rgba(255, 255, 255, 0.07);
  --intel-border-strong: rgba(255, 255, 255, 0.11);
  --intel-text: #f1f5f9;
  --intel-text-secondary: #94a3b8;
  --intel-text-muted: #64748b;
  --intel-sidebar-bg: #06080f;
  --intel-sidebar-surface: rgba(255, 255, 255, 0.04);
  --intel-sidebar-border: rgba(255, 255, 255, 0.06);
  --intel-sidebar-text: rgba(255, 255, 255, 0.52);
  --intel-sidebar-text-hover: rgba(255, 255, 255, 0.88);
  --intel-sidebar-active: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.dark .app-shell--enterprise .nav-link--active {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}

.dark .app-shell--enterprise .nav-link--active .nav-link__label { color: #fff; }
.dark .app-shell--enterprise .nav-link--active .nav-link__desc { color: rgba(199, 210, 254, 0.75); }
.dark .app-shell--enterprise .nav-link--active .nav-link__icon {
  background: rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
}

.dark .app-shell--enterprise .intel-topbar {
  background: rgba(15, 19, 25, 0.9);
}

.dark .app-shell--enterprise .intel-topbar-search {
  background: rgba(255, 255, 255, 0.04);
}

.dark .app-shell--enterprise .ui-input {
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
}

.dark .app-shell--enterprise .seo-table th {
  background: rgba(255, 255, 255, 0.03);
}

.app-shell--enterprise .intel-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.app-shell--enterprise .app-main-wrap {
  margin-left: 272px;
}

@media (max-width: 1200px) {
  .app-shell--enterprise .intel-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .app-shell--enterprise .intel-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-shell--enterprise .app-main-wrap { margin-left: 0; }
}

@media (max-width: 900px) {
  .app-shell--enterprise .app-main { padding: 24px 24px 48px; }
  .app-shell--enterprise .intel-topbar { padding: 12px 24px; }
  .app-shell--enterprise .intel-page-title { font-size: 32px; }
  .app-shell--enterprise .intel-topbar-search { display: none; }
}

@media (max-width: 640px) {
  .app-shell--enterprise .intel-kpi-grid,
  .app-shell--enterprise .intel-quick-grid { grid-template-columns: 1fr; }
  .app-shell--enterprise .intel-command-hero { padding: 24px; }
  .app-shell--enterprise .intel-command-form { flex-direction: column; }
  .app-shell--enterprise .intel-command-btn { width: 100%; justify-content: center; }
  .app-shell--enterprise .app-topbar-user-meta { display: none; }
}

/* ── BEM bridge (gerçek sınıf isimleri) ── */
.app-shell--enterprise .intel-main-wrap { z-index: 1; }

.app-shell--enterprise .intel-topbar__search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--intel-border);
  color: var(--intel-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.app-shell--enterprise .intel-topbar__search:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.04);
  color: var(--intel-text-secondary);
}

.app-shell--enterprise .intel-topbar__search kbd {
  margin-left: auto;
  font-family: var(--intel-font-mono);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--intel-border);
  color: var(--intel-text-muted);
}

.app-shell--enterprise .intel-topbar__agency {
  font-family: var(--intel-font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--intel-text-secondary);
}

.app-shell--enterprise .intel-topbar__role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--intel-accent-deep);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.app-shell--enterprise .intel-topbar__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid var(--intel-border);
  background: var(--intel-surface);
  color: var(--intel-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.18s;
  text-decoration: none;
}

.app-shell--enterprise .intel-topbar__icon:hover {
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--intel-accent);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.app-shell--enterprise .intel-topbar__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
}

.app-shell--enterprise .intel-topbar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  font-family: var(--intel-font-display);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.app-shell--enterprise .intel-topbar__user-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--intel-text);
}

.app-shell--enterprise .intel-topbar__user-email {
  font-size: 11px;
  color: var(--intel-text-muted);
}

.app-shell--enterprise .nav-link--active {
  background: var(--intel-sidebar-active);
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.app-shell--enterprise .nav-link--active .nav-link__label { color: var(--intel-accent-deep); }
.app-shell--enterprise .nav-link--active .nav-link__desc { color: #6366f1; opacity: 0.75; }
.app-shell--enterprise .nav-link--active .nav-link__icon {
  background: rgba(99, 102, 241, 0.12);
  color: var(--intel-accent);
}

.app-shell--enterprise .metric-tile,
.app-shell--enterprise .surface,
.app-shell--enterprise .module-link {
  background: var(--intel-surface);
  border-color: var(--intel-border);
  box-shadow: var(--intel-shadow);
}

.app-shell--enterprise .metric-tile--link:hover,
.app-shell--enterprise .module-link:hover {
  box-shadow: var(--intel-shadow-hover);
}

.app-shell--enterprise .audit-hero {
  border-radius: var(--intel-radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.app-shell--enterprise .intel-sidebar-cta {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.app-shell--enterprise .intel-nav-group__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--intel-text-muted);
  padding: 20px 16px 8px;
}

@media (max-width: 768px) {
  .app-shell--enterprise .intel-topbar__search { display: none; }
  .app-shell--enterprise .intel-topbar__user-meta { display: none; }
}
