/* ============================================================
   PNGI Design System - Global CSS Variables & Base Styles
   Prajapati NexaTech Global Institute
   ============================================================ */

:root {
  /* Primary Brand Colors */
  --pngi-navy: #050a1a;
  --pngi-navy-2: #0a1628;
  --pngi-navy-3: #0f2044;
  --pngi-blue: #1a6cf7;
  --pngi-blue-2: #2d7fff;
  --pngi-cyan: #00d4ff;
  --pngi-cyan-2: #00f0ff;
  --pngi-violet: #7c3aed;
  --pngi-purple: #a855f7;
  --pngi-purple-2: #c084fc;
  --pngi-white: #ffffff;
  --pngi-off-white: #f0f4ff;

  /* Gradient Definitions */
  --grad-primary: linear-gradient(135deg, #1a6cf7 0%, #7c3aed 100%);
  --grad-cyan: linear-gradient(135deg, #00d4ff 0%, #1a6cf7 100%);
  --grad-hero: linear-gradient(135deg, #050a1a 0%, #0f2044 50%, #0a0520 100%);
  --grad-card: linear-gradient(145deg, rgba(26,108,247,0.08) 0%, rgba(124,58,237,0.08) 100%);
  --grad-neon: linear-gradient(90deg, #00d4ff, #1a6cf7, #7c3aed, #a855f7);

  /* Glassmorphism */
  --glass-bg: rgba(255,255,255,0.05);
  --glass-bg-2: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.1);
  --glass-border-2: rgba(0,212,255,0.2);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow-blue: 0 0 20px rgba(26,108,247,0.4);
  --shadow-glow-cyan: 0 0 20px rgba(0,212,255,0.4);
  --shadow-glow-purple: 0 0 20px rgba(124,58,237,0.4);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);

  /* Typography */
  --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Sora', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-overlay: 500;

  /* Dark Theme (default) */
  --bg-primary: #050a1a;
  --bg-secondary: #0a1628;
  --bg-tertiary: #0f2044;
  --bg-card: rgba(10, 22, 40, 0.8);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.45);
  --border-color: rgba(255,255,255,0.1);
  --border-color-2: rgba(0,212,255,0.2);
  --input-bg: rgba(255,255,255,0.06);
  --sidebar-bg: rgba(5,10,26,0.95);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8eef9;
  --bg-card: rgba(255,255,255,0.9);
  --text-primary: #050a1a;
  --text-secondary: rgba(5,10,26,0.7);
  --text-muted: rgba(5,10,26,0.45);
  --border-color: rgba(5,10,26,0.1);
  --border-color-2: rgba(26,108,247,0.3);
  --input-bg: rgba(5,10,26,0.04);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-bg-2: rgba(255,255,255,0.9);
  --glass-border: rgba(5,10,26,0.1);
  --sidebar-bg: rgba(240,244,255,0.98);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
.text-gradient {
  background: var(--grad-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-6); }
.container-full { width: 100%; padding: 0 var(--space-6); }
.section { padding: var(--space-20) 0; }
.section-sm { padding: var(--space-12) 0; }
.section-lg { padding: var(--space-24) 0; }

.grid { display: grid; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.glass-card:hover {
  border-color: var(--border-color-2);
  box-shadow: var(--shadow-card), var(--shadow-glow-blue);
  transform: translateY(-2px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}
.btn:hover::before { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(26,108,247,0.4);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(26,108,247,0.6); transform: translateY(-1px); }

.btn-cyan {
  background: var(--grad-cyan);
  color: var(--pngi-navy);
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,212,255,0.4);
}
.btn-cyan:hover { box-shadow: 0 8px 32px rgba(0,212,255,0.6); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover { border-color: var(--pngi-cyan); color: var(--pngi-cyan); box-shadow: 0 0 12px rgba(0,212,255,0.2); }

.btn-ghost {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--glass-bg-2); border-color: var(--border-color-2); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: var(--text-xs); }
.btn-lg { padding: 1rem 2.5rem; font-size: var(--text-base); }
.btn-xl { padding: 1.25rem 3rem; font-size: var(--text-lg); }
.btn-icon { padding: 0.75rem; border-radius: var(--radius-md); }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-blue { background: rgba(26,108,247,0.2); color: var(--pngi-blue-2); border: 1px solid rgba(26,108,247,0.3); }
.badge-cyan { background: rgba(0,212,255,0.15); color: var(--pngi-cyan); border: 1px solid rgba(0,212,255,0.3); }
.badge-purple { background: rgba(124,58,237,0.2); color: var(--pngi-purple); border: 1px solid rgba(124,58,237,0.3); }
.badge-green { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.badge-orange { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-danger { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pngi-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.section-label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--pngi-cyan);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}
.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================================
   INPUTS & FORMS
   ============================================================ */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--pngi-blue);
  box-shadow: 0 0 0 3px rgba(26,108,247,0.15);
  background: var(--glass-bg-2);
}
.form-input::placeholder { color: var(--text-muted); }
.form-error { font-size: var(--text-xs); color: #ef4444; margin-top: var(--space-1); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-primary);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow-blue); }
.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  font-family: var(--font-display);
  background: var(--grad-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: var(--text-sm); color: var(--text-secondary); margin-top: var(--space-2); }

/* ============================================================
   COURSE CARD
   ============================================================ */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--pngi-blue);
  box-shadow: 0 20px 60px rgba(26,108,247,0.2);
}
.course-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.course-card:hover .course-card-image { transform: scale(1.05); }
.course-card-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.course-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.4;
}
.course-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.course-card-price {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-current { font-size: var(--text-xl); font-weight: 800; color: var(--pngi-cyan); }
.price-original { font-size: var(--text-sm); text-decoration: line-through; color: var(--text-muted); }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.erp-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 60px 1fr;
  min-height: 100vh;
  background: var(--bg-primary);
}
.erp-layout.sidebar-collapsed { grid-template-columns: 70px 1fr; }
.erp-sidebar {
  grid-row: 1 / -1;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width var(--transition-base);
  backdrop-filter: blur(20px);
  z-index: var(--z-sticky);
}
.erp-topbar {
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
.erp-main { padding: var(--space-6); overflow-y: auto; }

/* Sidebar Nav */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
}
.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--grad-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--text-sm);
  color: white;
  flex-shrink: 0;
}
.sidebar-logo-text { font-size: var(--text-sm); font-weight: 700; line-height: 1.3; }
.sidebar-logo-sub { font-size: var(--text-xs); color: var(--text-muted); }

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-5) var(--space-5) var(--space-2);
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-radius: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.sidebar-nav-item:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}
.sidebar-nav-item.active {
  background: rgba(26,108,247,0.15);
  color: var(--pngi-blue-2);
  font-weight: 600;
}
.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--pngi-blue);
  border-radius: 0 3px 3px 0;
}
.sidebar-nav-icon { font-size: 1rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-nav-badge {
  margin-left: auto;
  background: var(--pngi-blue);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Dashboard Widgets */
.widget-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
.widget-card:hover { border-color: var(--border-color-2); transform: translateY(-2px); }
.widget-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}
.widget-number {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-1);
}
.widget-label { font-size: var(--text-sm); color: var(--text-secondary); }
.widget-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  margin-top: var(--space-2);
}
.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.erp-table thead {
  background: var(--glass-bg);
}
.erp-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.erp-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.erp-table tbody tr:last-child td { border-bottom: none; }
.erp-table tbody tr:hover { background: var(--glass-bg); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(26,108,247,0.3); }
  50% { box-shadow: 0 0 40px rgba(26,108,247,0.6), 0 0 60px rgba(0,212,255,0.3); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
@keyframes countUp { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-fade-up { animation: fadeInUp 0.6s ease both; }
.animate-fade { animation: fadeIn 0.5s ease both; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-bg-2) 50%, var(--glass-bg) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.pngi-loader {
  position: fixed;
  inset: 0;
  background: var(--pngi-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.pngi-loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo {
  width: 80px;
  height: 80px;
  background: var(--grad-primary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: white;
  margin-bottom: var(--space-5);
  animation: pulse-glow 1.5s ease-in-out infinite;
}
.loader-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.loader-subtitle { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-8); }
.loader-bar-wrap {
  width: 200px;
  height: 3px;
  background: var(--glass-bg);
  border-radius: 3px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: var(--grad-neon);
  border-radius: 3px;
  animation: loader-progress 1.8s ease forwards;
}
@keyframes loader-progress { from { width: 0; } to { width: 100%; } }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  animation: slideInLeft 0.3s ease;
  backdrop-filter: blur(20px);
}
.toast-success { border-left: 3px solid #10b981; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info { border-left: 3px solid var(--pngi-blue); }
.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-close { margin-left: auto; color: var(--text-muted); font-size: 1rem; cursor: pointer; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-base);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-color);
}
.modal-title { font-size: var(--text-lg); font-weight: 700; }
.modal-close { color: var(--text-muted); font-size: 1.25rem; cursor: pointer; transition: color var(--transition-fast); }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: var(--space-6); }
.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-color);
}

/* ============================================================
   NEON GLOW EFFECTS
   ============================================================ */
.neon-border {
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.neon-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-neon);
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.neon-border:hover::before { opacity: 1; }

/* ============================================================
   SCROLL BAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pngi-blue); }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 1024px) {
  .erp-layout { grid-template-columns: 1fr; grid-template-rows: 60px auto; }
  .erp-sidebar { display: none; position: fixed; width: 260px; z-index: var(--z-modal); box-shadow: var(--shadow-lg); }
  .erp-sidebar.mobile-open { display: flex; flex-direction: column; }
  .container { padding: 0 var(--space-4); }
}
@media (max-width: 768px) {
  .section { padding: var(--space-12) 0; }
  .section-title { font-size: var(--text-3xl); }
  .stat-number { font-size: var(--text-3xl); }
  .btn-xl { padding: 0.875rem 2rem; font-size: var(--text-base); }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .modal { border-radius: var(--radius-lg); }
}

/* Progress Bar */
.progress-bar { width: 100%; height: 6px; background: var(--glass-bg); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--grad-primary); border-radius: 3px; transition: width 1s ease; }

/* Avatar */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar-md { width: 48px; height: 48px; font-size: var(--text-sm); }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-lg); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--text-2xl); }

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

/* Sticky CTA Button */
.sticky-apply {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Particle Canvas */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* Animated Grid Lines */
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,108,247,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,108,247,0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ============================================================
   DESIGN SYSTEM V5 — chunk 1: core tokens and base styling
   (§5041–5060, §5061–5067, §5068–5069, §5165–5182, §5368)
   ------------------------------------------------------------
   Scope of this chunk, deliberately narrow:
   brand / surface / text colour, type ramp, spacing, radii, shadows,
   focus, basic buttons, basic inputs, basic cards.
   Tables, modals, badges, drawers, toasts, loading/empty states and the
   ERP chrome repoints are the NEXT chunk — nothing here changes their
   markup or their cascade today.

   Rules this layer obeys:
   - Additive: no token above this line was renamed or removed (§5430).
   - Aliased, never copied: a V5 token points at the legacy token that
     already carries the value, so branding stays a one-line change.
     Only the six accent presets below state a literal colour, and each
     one is a contrast-checked pair.
   - Zero-specificity `:where()` selectors, so any class a page already
     uses still wins. No page needed editing (§5432).
   ============================================================ */
:root {
  /* ---- Typography (§5051, §5052, §5054) ----
     The ramp is kept close to what pages render today: it standardises
     sizes without shifting existing layouts. */
  --font-body: var(--font-primary);
  --fs-display: clamp(2.5rem, 1.35rem + 4.4vw, 4.5rem);
  --fs-h1: clamp(1.75rem, 1.5rem + 0.9vw, 2.25rem);
  --fs-h2: clamp(1.4rem, 1.3rem + 0.45vw, 1.75rem);
  --fs-h3: 1.25rem;
  --fs-h4: 1.0625rem;
  --fs-h5: 1rem;
  --fs-h6: 0.9375rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-small: 0.875rem;
  --fs-label: 0.8125rem;
  --fs-caption: 0.75rem;
  --lh-tight: 1.15;
  --lh-body: 1.6;
  --lh-loose: 1.75;
  --tracking-label: 0.06em;
  --tracking-title: 0.01em;
  --measure: 68ch;                 /* readable line length (§5053) */
  --measure-wide: 92ch;

  /* ---- Surfaces, text and lines (§5045) ---- */
  --surface: var(--bg-card);
  --surface-elevated: var(--bg-tertiary);
  --surface-sunken: rgba(0, 0, 0, 0.22);
  --surface-solid: var(--bg-secondary);   /* opaque twin, for rows that scroll under a header */
  --text-disabled: rgba(255, 255, 255, 0.3);
  --border: var(--border-color);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-accent: var(--border-color-2);
  --field-bg: var(--input-bg);
  --field-bg-focus: var(--glass-bg-2);

  /* ---- Accent: one knob for institute branding (§5050) ---- */
  --accent: var(--pngi-blue);
  --accent-hover: var(--pngi-blue-2);
  --accent-soft: rgba(26, 108, 247, 0.16);
  --accent-on: #ffffff;             /* the colour that sits ON --accent */
  --accent-ring: rgba(26, 108, 247, 0.35);

  /* ---- Status (§5084) — each tone ships a soft field and an "on" colour ---- */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.16);
  --success-on: #04211a;
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.16);
  --warning-on: #241601;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.16);
  --danger-on: #2b0606;
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.16);
  --info-on: #04202c;

  /* ---- Radii (§5044) ---- */
  --radius-xs: 4px;
  --radius-pill: var(--radius-full);

  /* ---- Shadows / elevation (§5045, §5368) ---- */
  --elev-1: var(--shadow-sm);
  --elev-2: var(--shadow-md);
  --elev-3: var(--shadow-lg);
  --shadow-focus: 0 0 0 3px var(--accent-ring);

  /* ---- Motion (§5232) ---- */
  --duration-fast: 150ms;
  --duration-base: 260ms;
  --duration-slow: 480ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  /* ---- Layout rhythm (§5044, §5129, §5155) ----
     These are declared now so the later chunks (tables, drawers, ERP
     chrome) consume tokens instead of new magic numbers. */
  --container-max: 1280px;
  --container-narrow: 960px;
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 70px;
  --topbar-h: 60px;
  --touch-min: 44px;
  --row-h: 44px;
  --table-pad-y: 0.75rem;
  --table-pad-x: 1rem;
  --pad-card: var(--space-6);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* ---- Z-index contract (§5368) — one list, no ad-hoc numbers ---- */
  --z-content: 1;
  --z-nav: 120;
  --z-drawer: 250;
  --z-loader: 9000;

  /* ---- Breakpoints (§5129) ----
     CSS cannot interpolate a custom property inside a media query, so
     this set exists for JS (computed style) and for the audit that fails
     any @media width outside it. The project uses exactly these six. */
  --bp-xs: 320px;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1440px;
  --bp-3xl: 1920px;
}

/* Native form controls, scrollbars and date/time pickers follow the theme (§5157) */
:root { color-scheme: dark; }
[data-theme="light"], [data-theme="system"][data-theme-resolved="light"] { color-scheme: light; }

/* Light-theme twins of the tokens the legacy block above predates.
   Kept beside [data-theme="light"] rather than inside it, so the shipped
   theme block stays byte-identical for pages that pin it. */
[data-theme="light"] {
  --surface-sunken: rgba(5, 10, 26, 0.04);
  --surface-solid: #ffffff;
  --text-disabled: rgba(5, 10, 26, 0.32);
  --border-strong: rgba(5, 10, 26, 0.22);
  --accent-on: #ffffff;
  --success-on: #04211a;
}

/* Accent presets — every pair is contrast-checked, which is what "safe
   accent colors" has to mean (§5050). A custom accent outside this list is
   allowed only if it clears 4.5:1 against its own text colour. */
[data-accent="blue"]   { --accent: #1a6cf7; --accent-hover: #2d7fff; --accent-soft: rgba(26,108,247,0.16); --accent-on: #ffffff; --accent-ring: rgba(26,108,247,0.35); }
[data-accent="cyan"]   { --accent: #00d4ff; --accent-hover: #00f0ff; --accent-soft: rgba(0,212,255,0.18); --accent-on: #04121f; --accent-ring: rgba(0,212,255,0.40); }
[data-accent="violet"] { --accent: #7c3aed; --accent-hover: #8b5cf6; --accent-soft: rgba(124,58,237,0.18); --accent-on: #ffffff; --accent-ring: rgba(124,58,237,0.38); }
[data-accent="teal"]   { --accent: #0d9488; --accent-hover: #14b8a6; --accent-soft: rgba(13,148,136,0.18); --accent-on: #ffffff; --accent-ring: rgba(13,148,136,0.38); }
[data-accent="amber"]  { --accent: #f59e0b; --accent-hover: #fbbf24; --accent-soft: rgba(245,158,11,0.20); --accent-on: #241601; --accent-ring: rgba(245,158,11,0.42); }
[data-accent="rose"]   { --accent: #e11d48; --accent-hover: #f43f5e; --accent-soft: rgba(225,29,72,0.18); --accent-on: #ffffff; --accent-ring: rgba(225,29,72,0.38); }
[data-accent] { --grad-primary: linear-gradient(135deg, var(--accent) 0%, var(--pngi-violet) 100%); }

/* ---- Focus (§5172): one visible indicator, keyboard only ---- */
:where(a, button, input, select, textarea, [tabindex], [role="button"], [role="link"]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ds-focusable:focus-visible { box-shadow: var(--shadow-focus); }
.form-input:focus-visible, .form-select:focus-visible, .form-textarea:focus-visible,
.btn:focus-visible, .ds-card--interactive:focus-visible { box-shadow: var(--shadow-focus); }

/* ---- Skip link (§5173) ---- */
.ds-skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: var(--z-loader);
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--accent-on);
  border-radius: var(--radius-md);
  font-size: var(--fs-small);
  font-weight: 700;
  transition: top var(--duration-fast) var(--ease-out);
}
.ds-skip-link:focus { top: calc(var(--space-4) + var(--safe-top)); }

/* ---- Text primitives (§5186, §5367) ---- */
.ds-sr-only,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.ds-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ds-nowrap { white-space: nowrap; }
.ds-num { font-variant-numeric: tabular-nums; }   /* §5300: figures line up in columns */

/* ---- Typography utilities (§5051, §5053) ---- */
:where(h1) { font-size: var(--fs-h1); line-height: var(--lh-tight); }
:where(h2) { font-size: var(--fs-h2); line-height: var(--lh-tight); }
:where(h3) { font-size: var(--fs-h3); }
:where(h4) { font-size: var(--fs-h4); }
:where(h5, h6) { font-size: var(--fs-h5); }
.ds-display { font-family: var(--font-display); font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: -0.015em; font-weight: 800; }
.ds-h1 { font-size: var(--fs-h1); }
.ds-h2 { font-size: var(--fs-h2); }
.ds-h3 { font-size: var(--fs-h3); }
.ds-lead { font-size: var(--fs-body-lg); line-height: var(--lh-loose); color: var(--text-secondary); }
.ds-small { font-size: var(--fs-small); }
.ds-label { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 700; color: var(--text-muted); }
.ds-caption { font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.ds-mono { font-family: var(--font-mono); font-size: 0.92em; }
.ds-prose { max-width: var(--measure); line-height: var(--lh-loose); }
.ds-prose-wide { max-width: var(--measure-wide); }
.ds-prose p + p { margin-top: var(--space-4); }

/* ---- Buttons (§5057–5060) — the shipped .btn keeps its variants and
       appearance; V5 adds the missing ones, the sizes named in the spec,
       and the states that were absent entirely (disabled, loading). ---- */
.btn-secondary { background: var(--glass-bg-2); color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--glass-bg); border-color: var(--accent); color: var(--accent); }
.btn-accent { background: var(--accent); color: var(--accent-on); box-shadow: 0 4px 18px var(--accent-ring); }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #f87171; }
.btn-success { background: var(--success); color: var(--success-on); font-weight: 700; }
.btn-md { padding: 0.625rem 1.5rem; font-size: var(--fs-small); }
.btn-block { display: flex; width: 100%; min-height: var(--touch-min); }
.btn { min-height: var(--touch-min); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"], .btn.is-loading {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { transform: none; }
.btn[disabled]::before, .btn[aria-disabled="true"]::before { background: transparent; }
.btn.is-loading { color: transparent; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.05em; height: 1.05em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--text-primary);
  animation: ds-spin 0.7s linear infinite;
}
.btn-primary.is-loading::after, .btn-danger.is-loading::after,
.btn-accent.is-loading::after, .btn-success.is-loading::after { color: #fff; }
.btn-cyan.is-loading::after { color: var(--pngi-navy); }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { color: var(--accent-hover); }
.underline-on-hover:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Inputs (§5061–5067) — extensions of .form-*, not a second system ---- */
.form-field { margin-bottom: var(--space-4); }
.form-field__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.form-required { color: var(--danger); font-weight: 700; margin-left: 2px; }
.form-help { font-size: var(--fs-caption); color: var(--text-muted); margin-top: var(--space-1); line-height: 1.5; }
/* Touch target floor (§5155) applies to single-line controls only: a textarea
   keeps the 120px height the shipped rules already give it. */
.form-input, .form-select { min-height: var(--touch-min); }
.form-input[readonly], .form-textarea[readonly] {
  background: var(--surface-sunken);
  color: var(--text-secondary);
  border-style: dashed;
  cursor: default;
}
.form-input[disabled], .form-select[disabled], .form-textarea[disabled] { opacity: 0.6; cursor: not-allowed; }
.form-input[aria-invalid="true"], .form-select[aria-invalid="true"], .form-textarea[aria-invalid="true"],
.form-field.is-invalid .form-input {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.form-field.is-valid .form-input, .form-input[data-state="valid"] { border-color: var(--success); }
.form-error { display: flex; align-items: flex-start; gap: 4px; color: var(--danger); }
.form-error::before {
  content: '!';
  flex-shrink: 0;
  width: 14px; height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1;
}
.form-affix { position: relative; display: block; }
.form-affix .form-input { padding-right: 3rem; }
.form-affix-btn {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  min-width: 34px; min-height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
}
.form-affix-btn:hover { color: var(--text-primary); background: var(--glass-bg); }
.form-search .form-input { padding-right: 2.5rem; }
.form-search [type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.form-search .form-clear { right: 6px; }
fieldset.form-field { border: 0; padding: 0; margin: 0 0 var(--space-4); }
legend { font-size: var(--fs-label); font-weight: 700; color: var(--text-secondary); margin-bottom: var(--space-2); }
select.form-select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* ---- Cards (§5068, §5069, §5070) ----
   `.ds-card--metric` carries the structure the spec names: label, value,
   trend, context, drilldown. The trend row is only rendered when there is
   real history behind it; `.ds-trend--none` is the honest state. */
.ds-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--pad-card); box-shadow: var(--elev-1); }
.ds-card--flat { box-shadow: none; }
.ds-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.ds-card__title { font-size: var(--fs-h4); font-weight: 700; }
.ds-card__body { color: var(--text-secondary); font-size: var(--fs-small); }
.ds-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.ds-card--interactive { transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.ds-card--interactive:hover { transform: translateY(-2px); border-color: var(--border-accent); box-shadow: var(--elev-2); }
.ds-card--metric { display: grid; gap: var(--space-2); align-content: start; }
.ds-card--metric .ds-card__value { font-family: var(--font-display); font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.5rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ds-card--metric .ds-card__context { font-size: var(--fs-caption); color: var(--text-muted); }
.ds-card--metric .ds-card__drill { font-size: var(--fs-small); color: var(--accent); font-weight: 600; }
.ds-trend { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-caption); font-weight: 700; }
.ds-trend--up, .trend-up { color: var(--success); }
.ds-trend--down, .trend-down { color: var(--danger); }
.ds-trend--flat { color: var(--text-muted); }
.ds-trend--none { color: var(--text-muted); font-weight: 500; }
.ds-trend--up::before { content: '\25B2'; font-size: 9px; }
.ds-trend--down::before { content: '\25BC'; font-size: 9px; }
.ds-trend--flat::before { content: '\2500'; font-size: 10px; }
.ds-card--alert { border-left: 3px solid var(--accent); }
.ds-card--alert[data-tone="danger"] { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), transparent 55%); }
.ds-card--alert[data-tone="warning"] { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-soft), transparent 55%); }
.ds-card--alert[data-tone="success"] { border-left-color: var(--success); background: linear-gradient(90deg, var(--success-soft), transparent 55%); }
.ds-card--alert[data-tone="info"] { border-left-color: var(--info); background: linear-gradient(90deg, var(--info-soft), transparent 55%); }
.ds-card--profile { display: flex; gap: var(--space-4); align-items: center; }
.ds-card--action { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; }
.ds-timeline { position: relative; padding-left: var(--space-6); }
.ds-timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.ds-timeline__item { position: relative; padding-bottom: var(--space-4); }
.ds-timeline__item::before { content: ''; position: absolute; left: calc(-1 * var(--space-6) + 3px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface-solid); }
.ds-timeline__item[data-tone="danger"]::before { background: var(--danger); }
.ds-timeline__item[data-tone="warning"]::before { background: var(--warning); }
.ds-timeline__item[data-tone="success"]::before { background: var(--success); }

/* ---- Base viewport behaviour (§5153, §5254, §5366) ----
   Container widths move onto tokens; the ERP grid itself is untouched
   until the layout chunk. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.container { max-width: min(100%, var(--container-max)); }
.container--narrow { max-width: min(100%, var(--container-narrow)); }
body { min-height: 100vh; }
@supports (height: 100dvh) { body { min-height: 100dvh; } }

/* ---- Motion (§5182, §5234) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .glass-card:hover, .stat-card:hover, .course-card:hover { transform: none; }
  #particles-canvas { display: none; }
}
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
}
html[data-motion="reduced"] #particles-canvas { display: none; }
html[data-motion="full"] { scroll-behavior: smooth; }
