/* ===== CSS Reset & Variables ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors — Dark Theme (default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);

  --text-primary: #f1f1f6;
  --text-secondary: #9898ad;
  --text-muted: #5c5c72;

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);

  --principal-color: #6366f1;
  --interest-color: #f59e0b;
  --total-color: #10b981;
  --danger-color: #ef4444;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --header-height: 64px;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #eeeef5;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(99, 102, 241, 0.3);

  --text-primary: #1a1a2e;
  --text-secondary: #52526e;
  --text-muted: #8888a0;

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

  --accent-glow: rgba(99, 102, 241, 0.12);
}

/* ===== Global Styles ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ===== Ambient Background ===== */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
}

[data-theme="light"] .ambient-orb {
  opacity: 0.08;
}

.ambient-orb-1 {
  width: 600px;
  height: 600px;
  background: #6366f1;
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.ambient-orb-2 {
  width: 500px;
  height: 500px;
  background: #a855f7;
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.ambient-orb-3 {
  width: 400px;
  height: 400px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.02); }
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal);
}

@media (max-width: 768px) {
  .site-header {
    height: calc(var(--header-height) + 50px) !important;
    padding-top: max(env(safe-area-inset-top, 0px), 50px) !important;
  }
  .hero {
    padding-top: calc(var(--header-height) + 54px) !important;
  }
}

[data-theme="light"] .site-header {
  background: rgba(245, 245, 250, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--accent-light);
  border-color: var(--border-active);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  color: var(--accent-light);
  background: var(--bg-card-hover);
  border-color: var(--border-active);
}

/* Mobile Navigation Dropdown Drawer */
.mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(var(--header-height) + 4px);
  right: 16px;
  left: 16px;
  background: #12121a !important;
  background-color: #12121a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7);
  z-index: 99999;
}

[data-theme="light"] .mobile-nav-dropdown {
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22) !important;
}

.mobile-nav-dropdown.active {
  display: flex;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

[data-theme="light"] .mobile-nav-link {
  color: #334155;
  background: transparent;
}

[data-theme="light"] .mobile-nav-link:hover,
[data-theme="light"] .mobile-nav-link.active {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex !important;
  }
  .tool-switcher-bar {
    display: none !important;
  }
}

.icon-moon { display: block; }
.icon-sun { display: none; }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: block; }

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-height) + 4px) 0 2px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.hero-pre {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

.hero-title, .section-title, h1, h2 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 2px;
}

.hero-subtitle, .section-subtitle {
  font-size: 0.82rem !important;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 0.5rem;
  text-align: center;
}
.card-title, h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ===== Tool Switcher Bar ===== */
.tool-switcher-bar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin: 10px auto 24px;
  padding: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  position: sticky;
  top: calc(var(--header-height) + 2px);
  z-index: 99;
  box-sizing: border-box;
}

.switcher-pill {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-align: center;
}

.switcher-pill:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.switcher-pill.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ===== Loan Category Select Dropdown ===== */
.loan-type-select-group {
  margin-bottom: 12px;
  display: block;
}

.loan-type-select-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.loan-type-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239898ad' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
}

.loan-type-select:focus, .loan-type-select:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-card-hover);
}

/* ===== Loan Tabs ===== */
.loan-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.loan-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font-sans);
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.loan-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.loan-tab.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.loan-tab.active svg {
  stroke: #fff;
}

/* ===== Calculator Grid ===== */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== Input Groups ===== */
.calc-inputs {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  box-sizing: border-box;
}

.input-group.compact {
  gap: 8px;
}

.input-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.input-header label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-value-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.input-value-display:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.currency-symbol {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.value-input {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: right;
  outline: none;
  padding: 0 4px 0 0;
  margin: 0;
}

.tenure-display {
  gap: 8px;
}

.tenure-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.tenure-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.tenure-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ===== Sliders ===== */
.slider-container {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  outline: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 2px 8px var(--accent-glow), 0 0 0 1px var(--accent);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 16px var(--accent-glow), 0 0 0 1px var(--accent);
}

.slider::-webkit-slider-thumb:active {
  transform: scale(1.05);
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 2px 8px var(--accent-glow);
  cursor: pointer;
}

.slider-track {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 3px;
  background: var(--accent-gradient);
  pointer-events: none;
  z-index: 1;
  transition: width 0.05s linear;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ===== Prepayment Section ===== */
.prepayment-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.prepayment-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.prepayment-toggle::-webkit-details-marker {
  display: none;
}

.prepayment-toggle:hover {
  color: var(--accent);
}

.prepayment-toggle svg {
  transition: transform var(--transition-normal);
}

[open] .prepayment-toggle svg {
  transform: rotate(45deg);
}

.prepayment-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.prepayment-frequency label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.freq-options {
  display: flex;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.freq-btn {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.freq-btn.active {
  background: var(--accent-glow);
  color: var(--accent-light);
  border-color: var(--accent);
}

/* ===== Results ===== */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emi-hero {
  text-align: center;
  padding: 18px 16px;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

/* ===== Prepayment Impact Card ===== */
.prepayment-impact-card {
  padding: 16px 18px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.impact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.impact-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: -0.01em;
}

.savings-percent-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 14px;
}

.impact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.impact-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.impact-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.impact-val.highlight-green {
  color: #10b981;
}

.impact-val.highlight-cyan {
  color: #06b6d4;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.emi-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(-10%, -10%) rotate(0deg); }
  50% { transform: translate(10%, 10%) rotate(5deg); }
}

.emi-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  position: relative;
}

.emi-amount {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
  letter-spacing: -1px;
  position: relative;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.emi-sublabel {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  position: relative;
}

/* ===== Breakdown Cards ===== */
.breakdown-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.breakdown-card {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.breakdown-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.principal-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--principal-color);
}

.interest-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--interest-color);
}

.total-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--total-color);
}

.breakdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.breakdown-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.breakdown-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Charts ===== */
.charts-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid var(--border-subtle);
  width: fit-content;
}

.chart-tab {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.chart-tab:hover {
  color: var(--text-primary);
}

.chart-tab.active {
  background: var(--accent);
  color: #fff;
}

.chart-area {
  padding: 24px;
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-center-text {
  position: absolute;
  top: calc(50% - 14px);
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chart-center-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chart-center-value {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ===== Schedule & Section Spacing ===== */
.schedule-section,
.compare-section,
.eligibility-section,
.formula-section {
  padding: 24px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

.schedule-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.schedule-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid var(--border-subtle);
}

.view-btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.view-btn.active {
  background: var(--accent);
  color: #fff;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.export-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

.schedule-scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  margin-bottom: 14px;
  text-align: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.schedule-scroll-hint svg {
  color: var(--accent-light);
  flex-shrink: 0;
}

.schedule-table-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.schedule-table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.schedule-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.schedule-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.schedule-table thead th {
  padding: 13px 16px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  white-space: nowrap;
  min-width: 95px;
}

.schedule-table thead th:first-child,
.schedule-table tbody td:first-child {
  text-align: left;
  min-width: 115px;
}

.schedule-table thead th:last-child,
.schedule-table tbody td:last-child {
  min-width: 135px;
}

.schedule-table tbody tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.schedule-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.schedule-table tbody td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
}

.schedule-table .paid-bar {
  display: inline-block;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-gradient);
  margin-left: 8px;
  vertical-align: middle;
  transition: width var(--transition-normal);
  min-width: 3px;
}

/* Expandable year rows */
.schedule-table .year-row td {
  font-weight: 600;
}

.schedule-table .month-row {
  display: none;
}

.schedule-table .month-row.show {
  display: table-row;
}

.schedule-table .month-row td {
  font-weight: 400;
  color: var(--text-secondary);
  padding-left: 32px;
  font-size: 0.78rem;
}

.schedule-table .year-expand-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
  vertical-align: middle;
}

.schedule-table .year-row.expanded .year-expand-icon {
  transform: rotate(90deg);
}

/* ===== Compare Section ===== */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.compare-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
}

.compare-badge.badge-2 {
  background: rgba(245, 158, 11, 0.15);
  color: var(--interest-color);
}

.compare-badge.badge-3 {
  background: rgba(16, 185, 129, 0.15);
  color: var(--total-color);
}

.compare-fill-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.compare-fill-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

.compare-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.compare-input-group label {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.compare-input {
  width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: right;
  outline: none;
  transition: border-color var(--transition-fast);
}

.compare-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.compare-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.compare-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.compare-result-row span:first-child {
  color: var(--text-muted);
}

.compare-result-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

.compare-emi {
  font-size: 1.05rem !important;
  color: var(--accent-light) !important;
}

.compare-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border-subtle);
  overflow: hidden;
  margin-top: 4px;
}

.compare-bar-principal {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-gradient);
  transition: width var(--transition-slow);
}

.compare-chart-area {
  padding: 24px;
}

/* ===== Eligibility ===== */
.eligibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.eligibility-inputs {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eligibility-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.eligibility-info svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-light);
}

.eligibility-result {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.eligibility-amount-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.eligibility-amount {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.eligibility-meter {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.eligibility-meter-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  transition: width var(--transition-slow);
}

.eligibility-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.eligibility-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.eligibility-detail span:first-child {
  color: var(--text-muted);
}

.eligibility-detail span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ===== Formula ===== */
.formula-section {
  padding: 12px 0;
}

.formula-content {
  padding: 16px 20px;
}

.formula-display {
  text-align: center;
  margin-bottom: 14px;
}

.formula-box {
  display: inline-block;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.formula-text {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 3.5vw, 1.1rem);
  font-weight: 500;
  color: var(--accent-light);
  white-space: nowrap;
}

.formula-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-symbol {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.legend-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.formula-example h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.example-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.step-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.step-text strong {
  color: var(--text-primary);
}

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-copy p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calc-inputs,
.emi-hero,
.breakdown-cards,
.charts-container {
  animation: fadeInUp 0.6s ease forwards;
}

.emi-hero { animation-delay: 0.1s; }
.breakdown-cards { animation-delay: 0.2s; }
.charts-container { animation-delay: 0.3s; }

/* ===== Counter Animation ===== */
.animate-value {
  transition: opacity 0.15s;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .calc-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .calc-inputs,
  .calc-results {
    position: static;
    padding: 16px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .input-header {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .input-header label {
    font-size: 0.78rem;
  }

  .input-value-display {
    padding: 6px 12px;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
    margin-left: 0;
    min-width: 0;
  }

  .value-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    text-align: right;
    padding: 0 4px 0 0;
    margin: 0;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .eligibility-grid {
    grid-template-columns: 1fr;
  }

  .breakdown-cards {
    grid-template-columns: 1fr;
  }

  .formula-legend {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  p.hero-subtitle { display: none !important; }
  .tool-switcher-bar {
    display: flex;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    padding: 4px;
    gap: 6px;
    border-radius: 14px;
    box-sizing: border-box;
    margin-top: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tool-switcher-bar::-webkit-scrollbar {
    display: none;
  }
  .switcher-pill {
    flex: 1 0 auto;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    white-space: nowrap;
  }

  .header-nav {
    display: none;
  }

  .loan-tabs {
    display: none !important;
  }

  .loan-type-select-group {
    display: block !important;
  }

  .calc-inputs {
    padding: 14px 12px;
  }

  .input-header {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .input-header label {
    font-size: 0.78rem;
  }

  .input-value-display {
    padding: 6px 12px;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .value-input {
    font-size: 0.88rem;
    padding-right: 4px;
  }

  .formula-content {
    padding: 24px;
  }

  .formula-text {
    font-size: 0.9rem;
  }

  .emi-amount {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .schedule-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-scroll-hint {
    display: inline-flex;
  }

  .schedule-table-wrapper {
    margin: 0;
    border-radius: var(--radius-md);
  }

  .schedule-table {
    min-width: 620px;
    font-size: 0.8rem;
  }

  .schedule-table thead th {
    padding: 10px 10px;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
  }

  .schedule-table tbody td {
    padding: 10px 10px;
    font-size: 0.78rem;
  }

  .schedule-table thead th:first-child,
  .schedule-table tbody td:first-child {
    min-width: 95px;
    padding-left: 12px;
  }

  .schedule-table .month-row td {
    padding-left: 20px;
    font-size: 0.74rem;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
  background: var(--accent-glow);
  color: var(--text-primary);
}

/* ===== Interest Rate Type Enhancements ===== */
.interest-type-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.interest-type-info-badge {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}

[data-theme="light"] .interest-type-info-badge {
  background: rgba(99, 102, 241, 0.06);
}

.compare-input-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compare-select {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.compare-select:focus {
  border-color: var(--accent);
}

.compare-effective-row {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 6px;
  margin-top: 4px;
}

.effective-rate-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  text-align: right;
}

/* ===== Comparison Dynamic Slots & Empty State ===== */
.compare-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.add-loan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.add-loan-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.add-loan-btn.disabled,
.add-loan-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.add-loan-counter {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.compare-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  margin-bottom: 24px;
  border: 1px dashed var(--border-subtle);
}

.compare-empty-state .empty-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.compare-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.compare-empty-state p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 460px;
}

.compare-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-remove-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: var(--radius-full);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.compare-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ===== Reverse Loan Calculator / Parameter Finder ===== */
.param-mode-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.param-mode-pill {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.param-mode-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.param-mode-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.param-main-result {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.param-result-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.param-result-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  line-height: 1.2;
}

.param-result-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.param-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.param-bd-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-bd-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.param-bd-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.param-alert-box {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-container-embedded {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 48px auto 0 auto;
}



