@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Dark Mode Defaults (MUGEN Contract) */
  --bg-void: #050710;
  --bg-canvas: #080b12;
  --bg-surface-1: #0e121c;
  --bg-surface-2: #141a28;
  --bg-surface-3: #1b2233;
  --glass-fill: rgba(255, 255, 255, 0.035);
  --glass-border: rgba(148, 163, 184, 0.12);
  --glass-blur: blur(16px) saturate(140%);
  --border-hairline: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --border-accent: rgba(34, 211, 238, 0.38);
  
  --text-primary: #f1f5f9;
  --text-secondary: #a9b4c6;
  --text-muted: #7c899e;
  
  --accent-cyan: #22d3ee;
  --accent-mint: #34d399;
  --accent-blue: #60a5fa;
  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #22d3ee 48%, #34d399 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(59,130,246,.16), rgba(52,211,153,.10));
  
  --status-good: #34d399;
  --status-warn: #f59e0b;
  --status-critical: #f87171;
  --status-info: #60a5fa;
  
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-popover: 0 16px 48px rgba(0, 0, 0, 0.6);
  --glow-cyan: 0 0 20px -4px rgba(34, 211, 238, 0.45);
  --glow-good: 0 0 20px -4px rgba(52, 211, 153, 0.45);
  --glow-critical: 0 0 20px -4px rgba(248, 113, 113, 0.45);
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --sidebar-width: 220px;
}

[data-theme="light"] {
  --bg-void: #f1f5f9;
  --bg-canvas: #f8fafc;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #f1f5f9;
  --bg-surface-3: #e2e8f0;
  --glass-fill: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(203, 213, 225, 0.8);
  --border-hairline: rgba(203, 213, 225, 0.6);
  --border-strong: rgba(148, 163, 184, 0.4);
  --border-accent: rgba(8, 145, 178, 0.5);
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-cyan: #0891b2;
  --accent-mint: #059669;
  --accent-blue: #2563eb;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Page Background Hero Radial Glow */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(34, 211, 238, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* SIDEBAR LAYOUT */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg-surface-1);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 1rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-hairline);
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  box-shadow: var(--glow-cyan);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 600;
}

.sidebar-nav {
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke: var(--text-muted);
  transition: stroke 0.2s ease;
}

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

.nav-item:hover svg {
  stroke: var(--accent-cyan);
}

.nav-item.active {
  background: var(--gradient-brand-soft);
  color: var(--accent-cyan);
  font-weight: 600;
  border: 1px solid var(--border-accent);
}

.nav-item.active svg {
  stroke: var(--accent-cyan);
}

.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* MAIN CONTENT CONTAINER */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-wrapper.collapsed {
  margin-left: 0;
}

/* HEADER BAR */
.top-header {
  height: 52px;
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-hairline);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sidebar-toggle-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface-3);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.clock-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.clock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 8px var(--accent-mint);
}

.theme-toggle-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-3);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: var(--radius-pill);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* CONTENT VIEWPORT */
.content-body {
  padding: 1.15rem 1.25rem;
  flex: 1;
}

/* PAGE HEADER & CONTROLS */
.page-header {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* FILTER BARS */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  background: var(--bg-surface-1);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:focus {
  border-color: var(--accent-cyan);
}

/* SEGMENTED TAB BUTTONS */
.segmented-control {
  display: flex;
  gap: 0.3rem;
  background: var(--bg-surface-2);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  margin-bottom: 1rem;
  width: fit-content;
}

.segmented-btn {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segmented-btn.active {
  background: var(--bg-surface-1);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* STAT CARDS GRID */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.7;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.72rem;
}

.trend-badge.up {
  background: rgba(52, 211, 153, 0.15);
  color: var(--status-good);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.trend-badge.down {
  background: rgba(248, 113, 113, 0.15);
  color: var(--status-critical);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* GLASS PANELS */
.glass-panel {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.25rem;
}
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* MARKETING CALENDAR VIEW */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.calendar-header-day {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem;
}

.calendar-day-box {
  min-height: 90px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calendar-day-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.calendar-event-tag {
  background: var(--gradient-brand-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ACCOUNT CONNECTION CARDS */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.account-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.account-handle {
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* DANCERS CARDS & PROGRESS BARS */
.dancer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1400px) {
  .dancer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .dancer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.dancer-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.dancer-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

/* DANCER DRAWER (75% SCREEN WIDTH) */
#dancer-drawer .drawer-panel {
  width: 75vw;
  max-width: 1200px;
}

@media (max-width: 1024px) {
  #dancer-drawer .drawer-panel {
    width: 92vw;
  }
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 0.5rem;
  border: 1px solid var(--border-hairline);
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease, background 0.3s ease;
}

.progress-bar-fill.danger {
  background: linear-gradient(90deg, #ef4444, #f87171) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.progress-bar-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.progress-bar-fill.good {
  background: linear-gradient(90deg, #10b981, #34d399) !important;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.drinks-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.drinks-day-cell {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  padding: 0.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drinks-day-date {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.drinks-day-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-mint);
  margin-top: 0.15rem;
}

/* STAFF PROFILES GRID */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.staff-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.staff-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.staff-card-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.staff-avatar-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.staff-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
}

.staff-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface-1);
}

.staff-status-dot.active {
  background: var(--status-good);
  box-shadow: 0 0 8px var(--status-good);
}

.staff-status-dot.inactive {
  background: var(--status-critical);
}

.staff-main-info {
  display: flex;
  flex-direction: column;
}

.staff-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.staff-nickname {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.staff-role-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.staff-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-hairline);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.staff-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.line-badge {
  background: rgba(6, 199, 85, 0.15);
  color: #06c755;
  border: 1px solid rgba(6, 199, 85, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.78rem;
}

/* SLIDE-OVER DETAIL DRAWER & MODALS */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 16, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open, .modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: -520px;
  width: 500px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-surface-1);
  border-left: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-popover);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.drawer-backdrop.open .drawer-panel {
  right: 0;
}

.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 540px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  padding: 1.75rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-panel {
  transform: translate(-50%, -50%) scale(1);
}

.drawer-header, .modal-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-close-btn, .modal-close-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drawer-close-btn:hover, .modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.drawer-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-textarea, .form-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-cyan);
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-hairline);
}

.profile-hero-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  margin-bottom: 1rem;
}

.profile-hero-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-hero-role {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.info-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface-2);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  font-size: 0.9rem;
}

.info-row-key {
  color: var(--text-secondary);
}

.info-row-val {
  color: var(--text-primary);
  font-weight: 600;
}

/* DATA TABLES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  padding: 0.85rem 1rem;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom: 1px solid var(--border-hairline);
}

.custom-table td {
  padding: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-hairline);
}

.custom-table tr:hover td {
  background: var(--bg-surface-2);
}

/* STATUS PILLS */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
}

.status-pill.good {
  background: rgba(52, 211, 153, 0.15);
  color: var(--status-good);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-pill.warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warn);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.critical {
  background: rgba(248, 113, 113, 0.15);
  color: var(--status-critical);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-pill.info {
  background: rgba(96, 165, 250, 0.15);
  color: var(--status-info);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

/* RECOMMENDATIONS CARDS */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.rec-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.rec-card.high {
  border-left: 4px solid var(--accent-cyan);
}

.rec-card.medium {
  border-left: 4px solid var(--accent-mint);
}

.rec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.rec-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rec-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-hairline);
  padding-top: 0.85rem;
}

.impact-badge {
  background: var(--gradient-brand-soft);
  color: var(--accent-cyan);
  border: 1px solid var(--border-accent);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

/* BUTTONS */
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: var(--glow-cyan);
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}
