/* ==========================================================================
   Central & PSU 7th / 8th Pay Portal - Custom Design System & Tokens
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;0,800;0,900;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Primary Colors */
  --navy: #083344;
  --navy-mid: #0e7490;
  --navy-light: #ecfeff;
  --navy-dark: #041d27;
  
  /* Brand Accent Colors */
  --blue-accent: #2563eb;
  --blue-light: #eff6ff;
  --gold: #ca8a04;
  --gold-mid: #d97706;
  --gold-light: #fefce8;
  --green: #059669;
  --green-light: #ecfdf5;
  --red: #dc2626;
  --red-light: #fef2f2;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  
  /* Neutral Palette - Light Theme */
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-border-hover: #cbd5e1;
  --text-dark: #0f172a;
  --text-mid: #334155;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  
  /* Elevation Shadows */
  --sh-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
  --sh-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --sh-lg: 0 10px 30px -4px rgba(15, 23, 42, 0.1);
  --sh-xl: 0 20px 45px -10px rgba(15, 23, 42, 0.14);
  --sh-gold: 0 8px 24px -4px rgba(202, 138, 4, 0.25);
}

/* Dark Mode Overrides */
html.dark {
  --page-bg: #0b1120;
  --card-bg: #131c31;
  --card-border: #1e293b;
  --card-border-hover: #334155;
  --text-dark: #f8fafc;
  --text-mid: #cbd5e1;
  --text-light: #94a3b8;
  --text-muted: #64748b;
  --input-bg: #0f172a;
  --input-border: #334155;
  --navy-light: #164e63;
  --gold-light: #451a03;
  --green-light: #064e3b;
  --red-light: #450a0a;
  --blue-light: #1e3a8a;
  --purple-light: #3b0764;
  --sh-md: 0 4px 16px -2px rgba(0, 0, 0, 0.35);
  --sh-xl: 0 20px 45px -10px rgba(0, 0, 0, 0.55);
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--page-bg);
  color: #0f172a;
  font-weight: 450;
  letter-spacing: -0.01em;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* High-Legibility Font & Text Contrast Enhancements */
.text-slate-400 {
  color: #475569 !important; /* Upgraded from faint #94a3b8 to readable slate-600 */
}
.text-slate-500 {
  color: #334155 !important; /* Upgraded from #64748b to dark slate-700 */
}
.text-slate-600 {
  color: #1e293b !important; /* Deep slate-800 for high readability */
}

.text-\[10px\] {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}
.text-\[10\.5px\] {
  font-size: 12px !important;
  font-weight: 600 !important;
}
.text-\[11px\] {
  font-size: 12px !important;
  font-weight: 500 !important;
}

label {
  color: #0f172a !important;
  font-weight: 700 !important;
  letter-spacing: 0.025em !important;
}

.calc-input, .calc-select {
  color: #0f172a !important;
  font-weight: 600 !important;
}

.calc-input::placeholder {
  color: #64748b !important;
  font-weight: 400 !important;
}

/* Typography Fonts */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-body { font-family: 'Plus Jakarta Sans', sans-serif; }
.font-accent { font-family: 'Outfit', sans-serif; }

/* Top Accent Bar */
.top-accent-bar {
  height: 3.5px;
  background: linear-gradient(90deg, #083344 0%, #2563eb 32%, #0d9488 68%, #ca8a04 100%);
  width: 100%;
}

/* Header Gradient Band */
.card-band-gradient {
  background: linear-gradient(130deg, #083344 0%, #0e7490 55%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.card-band-gradient::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.card-band-gradient::after {
  content: '';
  position: absolute;
  bottom: -45px;
  left: 90px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

/* Gross Salary Gradient Card */
.gross-card-gradient {
  background: linear-gradient(130deg, #083344 0%, #0e7490 55%, #2563eb 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(14, 116, 144, 0.28);
}

.gross-card-gradient::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.gross-card-gradient::after {
  content: '';
  position: absolute;
  bottom: -35px;
  left: 60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* Buttons with Pulse Glow & Shimmer */
@keyframes buttonPulseGlow {
  0% { box-shadow: 0 0 16px rgba(14, 116, 144, 0.35); }
  50% { box-shadow: 0 0 32px rgba(14, 116, 144, 0.65); transform: translateY(-1px); }
  100% { box-shadow: 0 0 16px rgba(14, 116, 144, 0.35); }
}

@keyframes goldPulseGlow {
  0% { box-shadow: 0 0 18px rgba(202, 138, 4, 0.35); }
  50% { box-shadow: 0 0 36px rgba(202, 138, 4, 0.65); transform: translateY(-1px); }
  100% { box-shadow: 0 0 18px rgba(202, 138, 4, 0.35); }
}

.btn-glow {
  animation: buttonPulseGlow 3s ease-in-out infinite;
}

.btn-glow-gold {
  animation: goldPulseGlow 2.8s ease-in-out infinite;
}

.btn-glow:hover, .btn-glow-gold:hover {
  animation: none;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

html.dark .glass-panel {
  background: rgba(19, 28, 49, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

/* Form Controls */
.calc-input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-input:focus {
  background-color: var(--card-bg);
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3.5px rgba(14, 116, 144, 0.15);
}

.calc-input.is-invalid {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

html.dark .calc-input.is-invalid {
  background-color: #450a0a !important;
}

.input-error-msg {
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Custom Select Dropdown Arrow */
.calc-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background-color: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230e7490' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-select:focus {
  background-color: var(--card-bg);
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3.5px rgba(14, 116, 144, 0.15);
}

/* Keyframes for animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-fade-up {
  animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--page-bg);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Focus Visible for Accessibility (WCAG 2.1 AA) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid #2563eb !important;
  outline-offset: 2.5px !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Stylesheet */
@media print {
  .no-print,
  nav,
  footer,
  .top-accent-bar,
  #globalNavOverlay,
  #globalMenuBtn,
  #bottomNavBar,
  #searchModal,
  .share-wrap,
  .ad-slot-container {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .calc-card, .results-wrap, .print-card {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 15px 0 !important;
    background: #ffffff !important;
  }

  .card-band-gradient, .gross-card-gradient {
    background: #083344 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .r-item {
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .official-disclaimer {
    display: block !important;
    font-size: 9pt !important;
    color: #475569 !important;
    border-top: 1px solid #e2e8f0 !important;
    margin-top: 20px !important;
    padding-top: 10px !important;
  }
}

/* Dedicated Income Tax Computation Printable Statement Styles */
#taxPrintStatementContainer {
  display: none;
}

@media print {
  body > *:not(#taxPrintStatementContainer) {
    display: none !important;
  }

  #taxPrintStatementContainer {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 15mm;
    box-sizing: border-box;
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  }

  .print-page {
    width: 100%;
    page-break-after: always;
  }

  .print-page:last-child {
    page-break-after: avoid;
  }

  .print-table {
    page-break-inside: avoid;
  }

  .print-table th, .print-table td {
    border-color: #cbd5e1 !important;
  }
}

