/* ============================================================================
   EdgeOrigin — Admin Design System v2
   Palette:
     --bg-base    #0B0F1A  deep navy, page background
     --bg-panel   #10162A  sidebar / topbar
     --bg-card    rgba(255,255,255,0.04)  glass card fill
     --accent     #FF7A33  primary orange (actions, active states)
     --accent-2   #FFB454  secondary amber (highlights, badges)
     --text-hi    #E8ECF6  primary text
     --text-mid   #9AA4BF  secondary text
     --text-low   #5C6584  tertiary / placeholder
   Type: Inter (UI), JetBrains Mono (data / stat numbers)
   ========================================================================== */

/* ── Imports ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-base:       #0b0f1a;
  --bg-panel:      #10162a;
  --bg-panel-2:    #141b30;
  --bg-card:       rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-glass:  rgba(255, 255, 255, 0.08);
  --border-hover:  rgba(255, 255, 255, 0.14);
  --accent:        #ff7a33;
  --accent-dim:    rgba(255, 122, 51, 0.15);
  --accent-glow:   rgba(255, 122, 51, 0.35);
  --accent-2:      #ffb454;
  --text-hi:       #e8ecf6;
  --text-mid:      #9aa4bf;
  --text-low:      #5c6584;
  --success:       #34d399;
  --success-dim:   rgba(52, 211, 153, 0.15);
  --danger:        #f87171;
  --danger-dim:    rgba(248, 113, 113, 0.15);
  --warning:       #fbbf24;
  --warning-dim:   rgba(251, 191, 36, 0.15);
  --info:          #60a5fa;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Fonts */
  --font-ui:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Sidebar */
  --sidebar-w:           260px;
  --sidebar-collapsed-w: 64px;
  --topbar-h:            60px;

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-normal: 0.2s ease;
  --t-slow:   0.3s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-hi);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden; /* shell handles scrolling */
}

body {
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(255, 122, 51, 0.07), transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(255, 180, 84, 0.04), transparent 50%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Shell — Two-column grid ───────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns var(--t-normal);
}

.shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-w) 1fr;
}

/* ═══════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════ */
.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;  /* only .sidebar-scroll scrolls */
  position: relative;
  transition: width var(--t-normal);
  z-index: 20;
}

/* ── Sidebar Header (sticky) ─────────────────────────────────────────── */
.sidebar-header {
  flex-shrink: 0;
  padding: 20px 12px 10px;
  border-bottom: 1px solid var(--border-glass);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  min-width: 0;
}

.brand-mark-wrap {
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px var(--accent-glow);
}

.brand-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: opacity var(--t-normal), width var(--t-normal);
}

/* Collapse button */
.sidebar-collapse-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-low);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--t-fast), background var(--t-fast);
  margin-left: auto;
}

.sidebar-collapse-btn:hover {
  color: var(--text-hi);
  background: var(--bg-card);
}

/* Nav Search */
.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-low);
  pointer-events: none;
  display: flex;
}

.nav-search {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 32px 8px 34px;
  color: var(--text-hi);
  font-family: inherit;
  font-size: 13px;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.nav-search::placeholder { color: var(--text-low); }

.nav-search:focus {
  border-color: var(--accent);
  background: rgba(255, 122, 51, 0.06);
}

.nav-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-low);
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 4px;
  transition: color var(--t-fast);
}

.nav-search-clear:hover { color: var(--text-hi); }

/* ── Scrollable Nav Body ─────────────────────────────────────────────── */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px 12px;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-glass) transparent;
}

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 99px;
}

/* Active Site Selector */
.nav-site-wrap {
  padding: 10px 6px 6px;
}

.nav-site-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-low);
  margin-bottom: 6px;
  padding: 0 4px;
}

.nav-site-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-hi);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.nav-site-select:focus { border-color: var(--accent); outline: none; }

/* ── Nav Section (collapsible) ───────────────────────────────────────── */
.nav-section {
  margin-top: 6px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--t-fast);
  gap: 6px;
}

.nav-section-header:hover { background: var(--bg-card); }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-low);
  white-space: nowrap;
}

.section-chevron {
  color: var(--text-low);
  flex-shrink: 0;
  transition: transform var(--t-normal);
  display: flex;
}

.nav-section.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.nav-section-body {
  overflow: hidden;
  max-height: 800px;
  transition: max-height var(--t-slow), opacity var(--t-normal);
  opacity: 1;
}

.nav-section.collapsed .nav-section-body {
  max-height: 0;
  opacity: 0;
}

/* ── Nav Item ────────────────────────────────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-hi);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon-svg {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity var(--t-fast);
}

.nav-item:hover .nav-icon-svg,
.nav-item.active .nav-icon-svg {
  opacity: 1;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--t-normal);
}

/* ── Sidebar Footer (sticky) ─────────────────────────────────────────── */
.sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-glass);
  padding: 12px 14px;
}

.sf-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
}

.sf-row-meta { margin-top: 2px; }

.sf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-low);
  transition: background var(--t-normal), box-shadow var(--t-normal);
}

.sf-dot.ok {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.sf-dot.warn {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
}

.sf-dot.err {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.sf-key {
  font-size: 11px;
  color: var(--text-low);
  font-weight: 500;
}

.sf-val {
  font-size: 11px;
  color: var(--text-mid);
  margin-left: auto;
  font-weight: 600;
  font-family: var(--font-mono);
}

.sf-dot-sep { font-size: 11px; color: var(--text-low); }

.sf-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 4px 0;
}

.env-badge-dev  { color: var(--accent-2); }
.env-badge-prod { color: var(--success); }

/* ═══════════════════════════════════════════════════════════════════════
   MAIN AREA
   ═══════════════════════════════════════════════════════════════════════ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(11, 15, 26, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-hi);
  padding: 6px;
  border-radius: var(--radius-sm);
  align-items: center;
  transition: background var(--t-fast);
}

.sidebar-toggle:hover { background: var(--bg-card); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.bc-section {
  font-size: 13px;
  color: var(--text-low);
  white-space: nowrap;
  font-weight: 500;
}

.bc-sep {
  color: var(--text-low);
  font-size: 14px;
  flex-shrink: 0;
}

.bc-page {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar Actions */
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-shrink: 0;
}

.topbar-site-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  white-space: nowrap;
}

.env-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Quick Actions */
.qa-btn {
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
}

.qa-chevron {
  opacity: 0.7;
  display: flex;
}

.quick-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  min-width: 160px;
  overflow: hidden;
  z-index: 40;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-hi);
  transition: background var(--t-fast);
}

.quick-action-item:hover { background: var(--bg-card-hover); }

/* Icon button (bell, etc.) */
.topbar-icon-btn {
  background: none;
  border: none;
  color: var(--text-mid);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  position: relative;
  transition: color var(--t-fast), background var(--t-fast);
}

.topbar-icon-btn:hover {
  color: var(--text-hi);
  background: var(--bg-card);
}

.notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}

/* User info */
.current-user {
  font-size: 13px;
  color: var(--text-mid);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #1a1206;
  border: none;
  cursor: pointer;
  transition: box-shadow var(--t-fast);
  flex-shrink: 0;
}

.avatar:hover { box-shadow: 0 0 0 2px var(--accent-glow); }

/* User dropdown menu */
.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  min-width: 180px;
  overflow: hidden;
  z-index: 40;
}

.user-menu-email {
  padding: 12px 14px 10px;
  font-size: 12px;
  color: var(--text-low);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-sep {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 0;
}

.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-hi);
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast);
}

.user-menu-item:hover { background: var(--bg-card-hover); }
.user-menu-danger { color: var(--danger) !important; }

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 19;
}

/* Content Area */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px 60px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-glass) transparent;
}

.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 99px;
}

/* Topbar legacy compat — page-title removed, breadcrumb replaces it */
.page-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════
   GLASS CARDS
   ═══════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  padding: 20px;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.card:hover { background: var(--bg-card-hover); }

/* ── Stat Grid ───────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast), background var(--t-fast);
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255, 122, 51, 0.05));
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.stat-label {
  font-size: 11px;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-icon {
  color: var(--accent);
  opacity: 0.8;
  flex-shrink: 0;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  margin-top: 8px;
  color: var(--text-hi);
}

.stat-value.accent { color: var(--accent-2); }

.stat-sublabel {
  font-size: 12px;
  color: var(--text-low);
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════ */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-low);
  font-weight: 600;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

td {
  padding: 13px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-hi);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

.td-title {
  font-weight: 500;
  color: var(--text-hi);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-meta {
  color: var(--text-mid);
  font-size: 13px;
}

.empty-cell {
  text-align: center;
  color: var(--text-low);
  padding: 36px 16px !important;
  font-size: 13px;
}

.table-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--t-fast);
}

.table-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-published  { background: var(--success-dim);  color: var(--success); }
.badge-draft      { background: rgba(154, 164, 191, 0.12); color: var(--text-mid); }
.badge-scheduled  { background: var(--accent-dim);   color: var(--accent-2); }
.badge-trashed    { background: var(--danger-dim);   color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════ */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-hi);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { filter: brightness(0.95); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1206;
}

.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border-glass);
  color: var(--text-hi);
}

.btn-ghost:hover { background: var(--bg-card-hover); }

.btn-secondary {
  background: var(--accent-dim);
  border: 1px solid rgba(255, 122, 51, 0.3);
  color: var(--accent-2);
}

.btn-danger {
  background: var(--danger-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mid);
}

.empty-state h3 {
  color: var(--text-hi);
  font-size: 16px;
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 14px;
  margin: 0 0 18px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════════════
   COMING SOON / PLACEHOLDER
   ═══════════════════════════════════════════════════════════════════════ */
.coming-soon {
  max-width: 580px;
  margin: 0 auto;
}

.cs-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.cs-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  border: 1px solid rgba(255, 122, 51, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cs-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.cs-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent-2);
  padding: 3px 10px;
  border-radius: 99px;
}

.cs-desc {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.cs-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-mid);
}

.cs-feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.status-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-row-dot.ok       { background: var(--success);  box-shadow: 0 0 8px var(--success); }
.status-row-dot.down     { background: var(--danger);   box-shadow: 0 0 8px var(--danger); }
.status-row-dot.warning  { background: var(--warning);  box-shadow: 0 0 8px var(--warning); }

.status-row-label { font-size: 13px; color: var(--text-hi); }

.status-site {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 20px;
}

.login-card {
  padding: 32px 28px;
  border-radius: var(--radius-lg);
}

.login-brand {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 4px;
  justify-content: center;
}

.login-sub {
  text-align: center;
  color: var(--text-mid);
  font-size: 13px;
  margin: 4px 0 24px;
}

.login-error {
  background: var(--danger-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.login-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  filter: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   NOTIFICATION DOT (topbar legacy compat)
   ═══════════════════════════════════════════════════════════════════════ */
.topbar-notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  padding: 4px;
  color: var(--text-mid);
  transition: color var(--t-fast);
}

.topbar-notification-btn:hover { color: var(--text-hi); }
.notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (768–1024px): icon-only collapsed sidebar
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
  .shell {
    grid-template-columns: var(--sidebar-collapsed-w) 1fr;
  }

  .sidebar {
    width: var(--sidebar-collapsed-w);
  }

  .sidebar.expanded {
    width: var(--sidebar-w);
    position: absolute;
    height: 100vh;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  /* Hide text labels when collapsed */
  .sidebar:not(.expanded) .brand-name,
  .sidebar:not(.expanded) .brand-collapse-btn,
  .sidebar:not(.expanded) .nav-search-wrap,
  .sidebar:not(.expanded) .nav-section-header,
  .sidebar:not(.expanded) .nav-label,
  .sidebar:not(.expanded) .nav-site-wrap,
  .sidebar:not(.expanded) .sf-key,
  .sidebar:not(.expanded) .sf-val,
  .sidebar:not(.expanded) .sf-dot-sep,
  .sidebar:not(.expanded) .sf-divider,
  .sidebar:not(.expanded) .sf-row-meta {
    display: none;
  }

  .sidebar:not(.expanded) .nav-section-body {
    max-height: 800px;
    opacity: 1;
  }

  .sidebar:not(.expanded) .nav-item {
    justify-content: center;
    padding: 10px 0;
  }

  .sidebar:not(.expanded) .nav-item.active::before {
    left: -2px;
    top: 50%;
    bottom: 50%;
    height: 60%;
    top: 20%;
    bottom: auto;
  }

  .sidebar:not(.expanded) .sf-grid {
    align-items: center;
  }

  .sidebar:not(.expanded) .sf-row {
    justify-content: center;
  }

  .sidebar-toggle { display: flex; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (<768px): full drawer
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-w);
    transform: translateX(calc(-1 * var(--sidebar-w)));
    transition: transform var(--t-normal);
    z-index: 20;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
    opacity: 0;
    transition: opacity var(--t-normal);
    pointer-events: none;
  }

  .sidebar.open ~ .main .sidebar-overlay,
  .sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-toggle { display: flex; }
  .sidebar-collapse-btn { display: none; }

  .content { padding: 20px 16px 40px; }
  .topbar  { padding: 0 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .current-user { display: none; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar-site-badge { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & MOTION
   ═══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Focus rings */
a:focus-visible,
button:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   SEARCH HIGHLIGHT
   ═══════════════════════════════════════════════════════════════════════ */
.nav-item-hidden { display: none !important; }
.nav-section-hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   TOPBAR SEARCH (legacy – kept for compat)
   ═══════════════════════════════════════════════════════════════════════ */
.topbar-search {
  flex: 1;
  max-width: 300px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 32px;
  color: var(--text-hi);
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.topbar-search input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}

.topbar-search::before {
  content: "🔍";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════════════
   IMPORT CENTER WIZARD
   ═══════════════════════════════════════════════════════════════════════ */
.wizard-container {
  max-width: 900px;
  margin: 0 auto;
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 32px;
  padding: 0 10px;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-glass);
  z-index: 1;
}

.wizard-progress-bar {
  position: absolute;
  top: 15px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 2;
  transition: width var(--t-normal);
  width: 0%;
}

.wizard-step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 32px;
  cursor: pointer;
}

.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 2px solid var(--border-glass);
  color: var(--text-low);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.wizard-step-label {
  position: absolute;
  top: 40px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-low);
  white-space: nowrap;
  transition: color var(--t-fast);
}

/* Active State */
.wizard-step-node.active .wizard-step-circle {
  border-color: var(--accent);
  color: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-glow);
}

.wizard-step-node.active .wizard-step-label {
  color: var(--text-hi);
  font-weight: 700;
}

/* Completed State */
.wizard-step-node.completed .wizard-step-circle {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #1a1206;
}

.wizard-step-node.completed .wizard-step-label {
  color: var(--accent-2);
}

/* Source Selection Grid */
.source-category-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-low);
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 6px;
}

.source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.source-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.source-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 12px var(--accent-glow);
}

.source-card-icon {
  font-size: 28px;
}

.source-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-hi);
}

/* Verification and Details */
.verification-instructions {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.6;
}

.code-instruction-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.code-instruction-copy {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-mid);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.code-instruction-copy:hover {
  color: var(--text-hi);
  background: var(--bg-card-hover);
}

/* Log output terminal */
.log-screen {
  background: #060913;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #9cdcfe;
  height: 280px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.log-line {
  margin-bottom: 4px;
}

.log-line.info { color: var(--text-mid); }
.log-line.success { color: var(--success); }
.log-line.error { color: var(--danger); }
.log-line.warn { color: var(--warning); }

/* Report Cards */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.report-card-val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
}

.report-card-label {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-card.success { border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.03); }
.report-card.success .report-card-val { color: var(--success); }

.report-card.warning { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.03); }
.report-card.warning .report-card-val { color: var(--warning); }

.report-card.danger { border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.03); }
.report-card.danger .report-card-val { color: var(--danger); }

/* Options checklist */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.option-checkbox-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--t-fast);
}

.option-checkbox-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.option-checkbox-card input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.option-checkbox-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-hi);
}

/* Preview Table Scroll */
.preview-scroll-area {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.preview-scroll-area table {
  width: 100%;
}

/* ============================================================================
   Platform Super Admin — Design System Extension
   Accent palette: indigo/violet (#7C3AED base) distinct from CMS orange
   ============================================================================ */

:root {
  --platform:        #7c3aed;
  --platform-dim:    rgba(124, 58, 237, 0.15);
  --platform-glow:   rgba(124, 58, 237, 0.35);
  --platform-2:      #a78bfa;
  --platform-light:  #c4b5fd;
  --infra:           #0ea5e9;
  --infra-dim:       rgba(14, 165, 233, 0.15);
}

/* ── Platform Mode Body Accent ──────────────────────────────────────────── */
body.platform-mode {
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(124, 58, 237, 0.08), transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(167, 139, 250, 0.05), transparent 50%);
}

/* ── Platform Badge in Topbar ───────────────────────────────────────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--platform-dim);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--platform-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--platform);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--platform-glow);
  animation: platform-pulse 2s ease-in-out infinite;
}

@keyframes platform-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Website Switcher (topbar) ──────────────────────────────────────────── */
.website-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.website-switcher-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-hi);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  cursor: pointer;
  transition: border-color var(--t-fast);
  max-width: 160px;
}

.website-switcher-select:hover,
.website-switcher-select:focus {
  border-color: var(--platform-2);
  outline: none;
}

.back-to-platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--platform-dim);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 20px;
  color: var(--platform-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.back-to-platform-btn:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--platform);
  color: var(--platform-light);
}

/* ── Platform Sidebar Overrides ─────────────────────────────────────────── */
.sidebar.platform-mode .brand-mark {
  background: linear-gradient(135deg, var(--platform) 0%, var(--platform-2) 100%);
}

.sidebar.platform-mode .nav-item.active {
  background: var(--platform-dim);
  color: var(--platform-2);
  border-left-color: var(--platform);
}

.sidebar.platform-mode .nav-item:hover:not(.active) {
  background: rgba(124, 58, 237, 0.08);
  color: var(--platform-light);
}

.sidebar.platform-mode .nav-section-label {
  color: var(--platform-2);
}

/* ── Platform Dashboard Layout ──────────────────────────────────────────── */
.platform-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero header */
.platform-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(14,165,233,0.1) 100%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.platform-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124,58,237,0.15), transparent 70%);
  pointer-events: none;
}

.platform-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-hi);
  margin: 0 0 4px;
  background: linear-gradient(90deg, #e8ecf6 0%, var(--platform-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.platform-hero-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin: 0;
}

.platform-hero-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Platform Stat Grid ─────────────────────────────────────────────────── */
.platform-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.platform-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t-fast), transform var(--t-fast);
  position: relative;
  overflow: hidden;
}

.platform-stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--card-accent, var(--platform));
  opacity: 0.7;
}

.platform-stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.platform-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg, var(--platform-dim));
  flex-shrink: 0;
}

.platform-stat-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--icon-color, var(--platform-2));
}

.platform-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1;
}

.platform-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.platform-stat-sub {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 2px;
}

/* ── System Health Bar ──────────────────────────────────────────────────── */
.system-health-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.health-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-dot.ok   { background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.5); }
.health-dot.warn { background: var(--warning); }
.health-dot.err  { background: var(--danger); }

.health-label { color: var(--text-mid); font-weight: 500; }
.health-val   { color: var(--text-hi); font-weight: 600; margin-left: 2px; }

.health-divider {
  width: 1px;
  height: 20px;
  background: var(--border-glass);
}

/* ── Platform Two-Column Layout ─────────────────────────────────────────── */
.platform-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

@media (max-width: 1100px) {
  .platform-main-grid { grid-template-columns: 1fr; }
}

/* ── Site Health Cards Grid ─────────────────────────────────────────────── */
.site-health-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-health-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--t-fast);
}

.site-health-card:hover { border-color: var(--border-hover); }

.site-health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.site-health-dot.active    { background: var(--success); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.site-health-dot.suspended { background: var(--warning); }
.site-health-dot.inactive  { background: var(--text-low); }

.site-health-info { flex: 1; min-width: 0; }

.site-health-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-health-meta {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 2px;
}

.site-health-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Activity Feed ──────────────────────────────────────────────────────── */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-glass);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--platform-2);
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-dot.post  { background: var(--accent); }
.activity-dot.page  { background: var(--info); }

.activity-body { flex: 1; min-width: 0; }

.activity-title {
  font-size: 13px;
  color: var(--text-hi);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 11px;
  color: var(--text-low);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.activity-site-tag {
  background: var(--platform-dim);
  color: var(--platform-2);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
}

/* ── Platform Websites Table ────────────────────────────────────────────── */
.site-status-active    { color: var(--success); font-weight: 600; }
.site-status-suspended { color: var(--warning); font-weight: 600; }
.site-status-inactive  { color: var(--text-low); font-weight: 600; }

.btn-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--platform-dim);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-sm);
  color: var(--platform-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}

.btn-platform:hover {
  background: rgba(124,58,237,0.25);
  border-color: var(--platform);
  color: var(--platform-light);
}

/* ── Platform Modal Overlay ─────────────────────────────────────────────── */
.platform-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.platform-modal {
  background: #181f35;
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

.platform-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-hi);
  margin: 0 0 20px;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Platform Nav Sidebar Sections ─────────────────────────────────────── */
.nav-section-infra .nav-item.active   { border-left-color: var(--infra); color: var(--infra); }
.nav-section-infra .nav-item.active   { background: var(--infra-dim); }

/* ── Quick Stats row in Platform Sidebar Footer ─────────────────────────── */
.platform-sf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--platform-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  background: var(--platform-dim);
  border-radius: 4px;
}

