/* ============================================
   SKILLBRIDGE — MAIN CSS
   Design System: Variables, Base, Layout, Pages
   ============================================ */

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

/* --- CSS VARIABLES (Light Theme) --- */
:root {
  --primary: #4F46E5;
  --primary-light: #EEF2FF;
  --primary-dark: #3730A3;
  --secondary: #10B981;
  --secondary-light: #D1FAE5;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  --purple: #8B5CF6;
  --purple-light: #EDE9FE;
  --pink: #EC4899;
  --pink-light: #FCE7F3;
  --cyan: #06B6D4;
  --cyan-light: #CFFAFE;

  --bg: #F9FAFB;
  --bg-alt: #F3F4F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAFA;

  --text: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;

  --border: #E5E7EB;
  --border-focus: var(--primary);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition: 200ms ease;
  --transition-slow: 350ms ease;

  --nav-height: 68px;
  --sidebar-width: 260px;
}

/* --- DARK THEME --- */
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-alt: #1E293B;
  --bg-card: #1E293B;
  --bg-card-hover: #263349;

  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;

  --border: #334155;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.3);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.5);

  --primary-light: rgba(79,70,229,0.15);
  --secondary-light: rgba(16,185,129,0.15);
  --accent-light: rgba(245,158,11,0.15);
  --purple-light: rgba(139,92,246,0.15);
  --pink-light: rgba(236,72,153,0.15);
  --cyan-light: rgba(6,182,212,0.15);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-slow), color var(--transition-slow);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- CONTAINER --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* --- SECTION --- */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.bg-alt { background: var(--bg-alt); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-cta { text-align: center; margin-top: 40px; }

/* --- GRADIENT TEXT --- */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { color: var(--text-muted); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249,250,251,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
[data-theme="dark"] .navbar { background: rgba(15,23,42,0.85); }
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.2rem; color: var(--text);
  text-decoration: none;
}
.brand-icon { font-size: 1.4rem; }
.brand-text { color: var(--text); }

.navbar-links {
  display: flex; align-items: center; gap: 4px;
}
.navbar-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
  transition: all var(--transition);
}
.navbar-links a:hover { color: var(--primary); background: var(--primary-light); }

.navbar-actions { display: flex; align-items: center; gap: 10px; }
.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
  background: transparent;
}
.btn-icon:hover { color: var(--primary); background: var(--primary-light); }
.btn-icon svg { width: 18px; height: 18px; }

.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  .navbar-links {
    display: none; flex-direction: column; position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 12px; gap: 4px; box-shadow: var(--shadow-md);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { width: 100%; text-align: center; }
  .mobile-menu-btn { display: flex; }
  .navbar-actions .btn { display: none; }
  .navbar-actions .btn:last-child { display: inline-flex; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  text-align: center;
}
.hero-bg-shapes {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.shape {
  position: absolute; border-radius: 50%; opacity: 0.07;
  animation: float 6s ease-in-out infinite;
}
.shape-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -200px; left: -100px;
}
.shape-2 {
  width: 350px; height: 350px;
  background: var(--secondary);
  top: 50px; right: -100px;
  animation-delay: 2s;
}
.shape-3 {
  width: 200px; height: 200px;
  background: var(--accent);
  bottom: -50px; left: 40%;
  animation-delay: 4s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-content { position: relative; z-index: 1; }
.hero-badge { margin-bottom: 24px; }
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 24px;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-social-proof {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.avatars-stack {
  display: flex; align-items: center;
}
.avatars-stack img {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--bg-card);
  margin-left: -10px; background: var(--bg-alt);
}
.avatars-stack img:first-child { margin-left: 0; }
.hero-social-proof p { font-size: 0.9rem; color: var(--text-muted); }
.hero-social-proof strong { color: var(--text); }

/* ============================================
   STATS
   ============================================ */
.stats-section {
  padding: 40px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card { padding: 20px; }
.stat-number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }

.bg-primary-light { background: var(--primary-light); }
.bg-green-light { background: var(--secondary-light); }
.bg-amber-light { background: var(--accent-light); }
.bg-purple-light { background: var(--purple-light); }
.bg-pink-light { background: var(--pink-light); }
.bg-cyan-light { background: var(--cyan-light); }

.icon-primary { color: var(--primary); stroke: var(--primary); }
.icon-green { color: var(--secondary); stroke: var(--secondary); }
.icon-amber { color: var(--accent); stroke: var(--accent); }
.icon-purple { color: var(--purple); stroke: var(--purple); }
.icon-pink { color: var(--pink); stroke: var(--pink); }
.icon-cyan { color: var(--cyan); stroke: var(--cyan); }

.feature-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--text); }
.feature-card p { font-size: 0.9rem; line-height: 1.65; }

/* ============================================
   HOW IT WORKS
   ============================================ */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}
@media (max-width: 768px) {
  .steps-grid { flex-direction: column; align-items: center; }
  .step-divider { transform: rotate(90deg); }
}
.step-card {
  flex: 1; max-width: 300px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  position: relative;
}
.step-number {
  font-size: 3rem; font-weight: 900;
  color: var(--primary); opacity: 0.1;
  position: absolute; top: 16px; right: 20px;
  line-height: 1;
}
.step-icon {
  width: 56px; height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--primary);
}
.step-icon svg { width: 26px; height: 26px; stroke: var(--primary); }
.step-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.step-card p { font-size: 0.9rem; line-height: 1.65; }
.step-divider {
  color: var(--text-light);
  padding-top: 40px;
  flex-shrink: 0;
}
.step-divider svg { width: 28px; height: 28px; }

/* ============================================
   SUCCESS STORIES
   ============================================ */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .stories-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; } }

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.story-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
  transform: scale(1.02);
}
.story-quote {
  font-size: 4rem; line-height: 0.5;
  color: var(--primary); opacity: 0.2;
  font-family: Georgia, serif;
  margin-bottom: 12px;
}
.story-text { font-size: 0.95rem; line-height: 1.7; margin-bottom: 24px; color: var(--text-muted); font-style: italic; }
.story-author { display: flex; align-items: center; gap: 12px; }
.story-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-alt); }
.story-author strong { display: block; font-size: 0.9rem; color: var(--text); }
.story-author span { font-size: 0.8rem; color: var(--text-muted); }
.story-metric { font-size: 0.8rem; color: var(--secondary); font-weight: 600; margin-top: 4px; }

/* ============================================
   MENTOR CARDS
   ============================================ */
.mentors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .mentors-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mentors-grid { grid-template-columns: 1fr; } }

.mentor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.mentor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mentor-card-header {
  height: 80px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  position: relative;
  display: flex; align-items: flex-end; padding: 0 20px;
}
.mentor-avatar {
  width: 64px; height: 64px;
  border-radius: 50%; border: 3px solid var(--bg-card);
  background: var(--bg-alt);
  transform: translateY(50%);
  position: relative; z-index: 1;
}
.mentor-availability {
  position: absolute; bottom: 16px; right: 20px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--bg-card);
}
.mentor-availability.available { background: var(--secondary); }
.mentor-availability.busy { background: var(--accent); }
.mentor-availability.offline { background: var(--text-light); }

.mentor-card-body { padding: 44px 20px 16px; }
.mentor-card-body h3 { font-size: 1rem; margin-bottom: 2px; }
.mentor-title { font-size: 0.85rem; color: var(--text-muted); }
.mentor-company { font-size: 0.8rem; color: var(--primary); font-weight: 500; margin-bottom: 12px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.skill-tag {
  font-size: 0.75rem; padding: 3px 10px;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-full); font-weight: 500;
}
.mentor-stats { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-muted); }
.mentor-card-footer { padding: 12px 20px 20px; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================
   LEARNING TRACKS
   ============================================ */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .tracks-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tracks-grid { grid-template-columns: 1fr; } }

.track-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  border-top: 4px solid var(--track-color, var(--primary));
  transition: all var(--transition);
}
.track-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.track-icon { font-size: 2rem; margin-bottom: 12px; }
.track-card h3 { font-size: 1rem; margin-bottom: 8px; }
.track-card p { font-size: 0.85rem; line-height: 1.5; margin-bottom: 14px; }
.track-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============================================
   PARTNERS
   ============================================ */
.partners-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 16px; align-items: center;
}
.partner-logo {
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 700; font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.partner-logo:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-container { max-width: 720px; margin: 0 auto; }
.accordion { display: flex; flex-direction: column; gap: 12px; }
.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; font-size: 0.95rem; font-weight: 600; color: var(--text);
  background: none; text-align: left; gap: 12px;
  transition: all var(--transition);
}
.accordion-btn:hover { color: var(--primary); }
.accordion-btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--transition); stroke: currentColor; }
.accordion-item.open .accordion-btn svg { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height var(--transition-slow);
}
.accordion-item.open .accordion-body { max-height: 300px; }
.accordion-body p { padding: 0 20px 20px; font-size: 0.9rem; line-height: 1.7; }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-content { position: relative; z-index: 1; }
.cta-content h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px; }
.cta-content p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 36px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand p { font-size: 0.9rem; margin: 12px 0 20px; line-height: 1.65; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
}
.social-links a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.social-links svg { width: 16px; height: 16px; }

.footer-col h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex; flex-direction: column; gap: 4px;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 0.82rem; color: var(--text-light); }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition-slow);
}
.main-content {
  flex: 1;
  padding: 32px;
  overflow-x: hidden;
  background: var(--bg);
}
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); top: var(--nav-height); }
  .sidebar.open { transform: translateX(0); }
  .main-content { padding: 20px 16px; }
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition); text-decoration: none;
  cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { color: var(--primary); background: var(--primary-light); }
.nav-item.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-light);
  padding: 16px 12px 6px; margin-top: 8px;
}
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

/* Dashboard page content */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p { font-size: 0.9rem; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow); }
.kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 6px; }
.kpi-change { font-size: 0.8rem; font-weight: 500; }
.kpi-change.up { color: var(--secondary); }
.kpi-change.down { color: #EF4444; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.card-link { font-size: 0.82rem; color: var(--primary); font-weight: 500; }

/* Progress bars */
.progress-bar {
  height: 8px; background: var(--bg-alt);
  border-radius: var(--radius-full); overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition); cursor: pointer; border: 2px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }

.btn-secondary {
  background: var(--secondary); color: #fff; border-color: var(--secondary);
}
.btn-secondary:hover { background: #059669; transform: translateY(-1px); }

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

.btn-outline-white {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-white {
  background: #fff; color: var(--primary); border-color: #fff;
}
.btn-white:hover { background: #f0f0f0; transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }

.btn-danger {
  background: #EF4444; color: #fff; border-color: #EF4444;
}
.btn-danger:hover { background: #DC2626; }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 0.8rem; font-weight: 600;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--secondary-light); color: #065F46; }
.badge-amber { background: var(--accent-light); color: #92400E; }
.badge-purple { background: var(--purple-light); color: #5B21B6; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-gray { background: var(--bg-alt); color: var(--text-muted); }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.9rem;
  color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ============================================
   SELECTION
   ============================================ */
::selection { background: rgba(79,70,229,0.2); color: var(--text); }
