/* CSS Design System - SmartPaisaTools.in */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  /* Premium Palette - Light Mode */
  --white: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-gradient-hero: linear-gradient(180deg, #EFF6FF 0%, #F8FAFC 100%);
  
  --primary: #1A56DB;
  --primary-dark: #113894;
  --primary-light: #EEF2FF;
  --primary-gradient: linear-gradient(135deg, #1A56DB 0%, #2563EB 100%);
  
  --green: #10B981;
  --green-dark: #047857;
  --green-light: #ECFDF5;
  --green-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  
  --red: #EF4444;
  --red-dark: #B91C1C;
  --red-light: #FEF2F2;
  
  --gold: #F59E0B;
  --gold-dark: #B45309;
  --gold-light: #FFFBEB;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #93C5FD;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 6px 20px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 36px -8px rgba(15, 23, 42, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 10px 25px -5px rgba(26, 86, 219, 0.2);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  
  /* Fonts */
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-speed: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Premium Palette - Dark Mode */
  --white: #1E293B;
  --bg-light: #0B132B;
  --bg-card: #1C2541;
  --bg-subtle: #2A365C;
  --bg-gradient-hero: linear-gradient(180deg, #101935 0%, #0B132B 100%);
  
  --primary: #3B82F6;
  --primary-dark: #60A5FA;
  --primary-light: #1E3A8A;
  --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  
  --green: #10B981;
  --green-dark: #34D399;
  --green-light: #064E3B;
  
  --red: #F87171;
  --red-dark: #FCA5A5;
  --red-light: #7F1D1D;
  
  --gold: #FBBF24;
  --gold-dark: #FDE68A;
  --gold-light: #78350F;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #2E3B65;
  --border-focus: #3B82F6;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

h1 { font-size: 2.2rem; font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* Global Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-red { background: var(--red-light); color: var(--red-dark); }
.badge-gold { background: var(--gold-light); color: var(--gold-dark); }

/* Value Highlighting */
.val-green { color: var(--green) !important; font-family: var(--font-mono); font-weight: 700; }
.val-red { color: var(--red) !important; font-family: var(--font-mono); font-weight: 700; }
.val-gold { color: var(--gold) !important; font-family: var(--font-mono); font-weight: 700; }
.val-primary { color: var(--primary) !important; font-family: var(--font-mono); font-weight: 700; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
