/* ==========================================================================
   AHLICPNS.ID — DESIGN SYSTEM & GLOBAL CSS TOKENS
   Theme: Modern, Premium, Vibrant Fintech/EdTech Aesthetic
   Font: Plus Jakarta Sans & Outfit
   Supports: Full Dynamic Light Theme & Dark Theme
   ========================================================================== */

:root {
  /* Brand Colors (Universal) */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5; /* Primary Accent */
  --primary-700: #4338ca;
  --primary-800: #3730a3;
  --primary-900: #312e81;

  /* Vibrant Secondary / Gold / Accent Colors */
  --accent-amber: #f59e0b;
  --accent-amber-light: #fef3c7;
  --accent-emerald: #10b981;
  --accent-emerald-light: #d1fae5;
  --accent-rose: #f43f5e;
  --accent-rose-light: #ffe4e6;
  --accent-sky: #0284c7;
  --accent-sky-light: #e0f2fe;

  /* Neutral Dark / Light Palette */
  --slate-950: #090d16;
  --slate-900: #0f172a;
  --slate-850: #131d33;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #2563eb 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-dark-surface: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  --grad-hero-glow: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.18) 0%, rgba(124, 58, 237, 0.08) 45%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-primary: 0 10px 30px -5px rgba(79, 70, 229, 0.35);
  --shadow-gold: 0 10px 25px -5px rgba(245, 158, 11, 0.35);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Transitions & Animation */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ==========================================================================
     DYNAMIC SEMANTIC THEME TOKENS (LIGHT DEFAULT)
     ========================================================================== */
  --theme-bg-body: #f8fafc;
  --theme-bg-surface: #ffffff;
  --theme-bg-surface-secondary: #f1f5f9;
  --theme-bg-card: #ffffff;
  --theme-bg-card-hover: #ffffff;
  --theme-bg-card-elevated: #ffffff;
  --theme-bg-sidebar: #ffffff;
  --theme-bg-topbar: rgba(255, 255, 255, 0.88);
  --theme-bg-modal: #ffffff;
  --theme-bg-input: #ffffff;

  --theme-text-title: #0f172a;
  --theme-text-primary: #1e293b;
  --theme-text-secondary: #475569;
  --theme-text-muted: #64748b;
  --theme-text-subtle: #94a3b8;

  --theme-border: #e2e8f0;
  --theme-border-subtle: #f1f5f9;
  --theme-border-accent: rgba(99, 102, 241, 0.35);

  --theme-table-header-bg: #f8fafc;
  --theme-table-header-color: #475569;
  --theme-table-row-hover: #f1f5f9;
  --theme-table-border: #e2e8f0;

  --theme-nav-link: #475569;
  --theme-nav-link-hover: #0f172a;
  --theme-nav-link-active-bg: rgba(79, 70, 229, 0.1);
  --theme-nav-link-active-text: #4f46e5;

  --theme-glow-color: rgba(99, 102, 241, 0.08);
}

/* ==========================================================================
   DARK THEME SEMANTIC TOKENS
   ========================================================================== */
:root[data-theme="dark"] {
  --theme-bg-body: #090d16;
  --theme-bg-surface: #0f172a;
  --theme-bg-surface-secondary: #131d33;
  --theme-bg-card: rgba(30, 41, 59, 0.65);
  --theme-bg-card-hover: rgba(30, 41, 59, 0.9);
  --theme-bg-card-elevated: #1e293b;
  --theme-bg-sidebar: #090d16;
  --theme-bg-topbar: rgba(15, 23, 42, 0.85);
  --theme-bg-modal: #0f172a;
  --theme-bg-input: #1e293b;

  --theme-text-title: #ffffff;
  --theme-text-primary: #f8fafc;
  --theme-text-secondary: #cbd5e1;
  --theme-text-muted: #94a3b8;
  --theme-text-subtle: #64748b;

  --theme-border: rgba(255, 255, 255, 0.08);
  --theme-border-subtle: rgba(255, 255, 255, 0.04);
  --theme-border-accent: rgba(99, 102, 241, 0.4);

  --theme-table-header-bg: #111827;
  --theme-table-header-color: #94a3b8;
  --theme-table-row-hover: rgba(255, 255, 255, 0.03);
  --theme-table-border: rgba(255, 255, 255, 0.06);

  --theme-nav-link: #94a3b8;
  --theme-nav-link-hover: #ffffff;
  --theme-nav-link-active-bg: linear-gradient(90deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  --theme-nav-link-active-text: #ffffff;

  --theme-glow-color: rgba(99, 102, 241, 0.2);
}

/* ==========================================================================
   BASE RESETS & STYLING
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--theme-text-primary);
  background-color: var(--theme-bg-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--theme-text-title);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-500);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition-fast);
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   UTILITY CLASSES & HELPERS
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-primary {
  background-color: var(--primary-50);
  color: var(--primary-600);
  border: 1px solid var(--primary-200);
}

:root[data-theme="dark"] .badge-primary {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--primary-300);
  border-color: rgba(99, 102, 241, 0.3);
}

.badge-gold {
  background-color: var(--accent-amber-light);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

:root[data-theme="dark"] .badge-gold {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-emerald {
  background-color: var(--accent-emerald-light);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

:root[data-theme="dark"] .badge-emerald {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-rose {
  background-color: var(--accent-rose-light);
  color: #be123c;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

:root[data-theme="dark"] .badge-rose {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.badge-dark {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Common Section Heading */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-header .badge {
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 2.35rem;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  color: var(--theme-text-title);
}

.section-header p {
  color: var(--theme-text-secondary);
  font-size: 1.125rem;
  line-height: 1.65;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.625rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(79, 70, 229, 0.45);
  color: var(--white);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--theme-bg-surface);
  color: var(--theme-text-primary);
  border: 1px solid var(--theme-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--theme-bg-surface-secondary);
  border-color: var(--theme-border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--theme-text-title);
}

.btn-gold {
  background: var(--grad-gold);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px rgba(245, 158, 11, 0.45);
  color: var(--white);
}

.btn-ghost {
  color: var(--theme-text-secondary);
}

.btn-ghost:hover {
  background-color: var(--theme-border-subtle);
  color: var(--theme-text-title);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

/* Glassmorphic Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--theme-border);
  box-shadow: var(--shadow-xl);
}

:root[data-theme="dark"] .glass-panel {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
}

.glass-panel-dark {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-2xl);
  color: var(--slate-100);
}

/* ==========================================================================
   THEME TOGGLE BUTTON COMPONENT
   ========================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--theme-bg-surface-secondary);
  border: 1px solid var(--theme-border);
  color: var(--theme-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: var(--theme-border);
  color: var(--primary-600);
  transform: scale(1.05);
}

.theme-toggle-btn .theme-icon-sun {
  display: none;
  font-size: 1.15rem;
  transition: transform 0.3s ease;
}

.theme-toggle-btn .theme-icon-moon {
  display: block;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

:root[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-header h2 {
    font-size: 1.85rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
}
