/* Base Calculator Grid */
.calculator-hero h1 {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-navy) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-8);
  margin-top: var(--spacing-8);
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 2fr 1.5fr;
    align-items: stretch;
  }

  .calculator-grid>div {
    display: flex;
    flex-direction: column;
  }

  .calculator-grid .card {
    flex: 1;
  }
}

/* Calculator Card: clean card, no extra border */
.calculator-grid .card {
  background: var(--bg-card);
  border: 1.5px dashed var(--color-primary);
}

/* Remove hover effect from calculator cards as per user request */
.calculator-grid .card:hover {
  transform: none;
  box-shadow: var(--shadow-md);
}

/* ===== Global Tab Switching Styles ===== */
.tenure-type-toggle {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 2px;
  border: 1px dashed var(--border-main);
}

.tenure-type-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--color-gray-600);
}

.tenure-type-btn.active {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.tenure-type-btn:hover:not(.active) {
  color: var(--color-primary);
  border-color: var(--border-main);
}

@media (max-width: 640px) {
  .calculator-hero h1 {
    font-size: var(--font-size-2xl);
  }

  .calculator-grid {
    gap: var(--spacing-4);
    margin-top: var(--spacing-4);
  }

  .card {
    padding: var(--spacing-4) !important;
  }
}

.panel-title {
  color: var(--color-navy);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-6);
  border-bottom: 1px dashed var(--color-gray-100);
  padding-bottom: var(--spacing-3);
}

/* Input Groups */
.input-group {
  margin-bottom: var(--spacing-4);
  /* Reduced from 6 */
}

.input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-2);
}

.input-field-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1.5px dashed var(--color-primary);
  border-radius: var(--radius-md);
  padding: 0 var(--spacing-3);
  width: auto;
  min-width: 120px;
  transition: all 0.2s ease;
}

.input-field-wrapper:focus-within {
  border-color: var(--color-primary-dark);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

@media (max-width: 480px) {
  .input-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-field-wrapper {
    width: 100%;
    margin-top: var(--spacing-2);
  }
}

.input-field-wrapper .form-input {
  border: none;
  background: transparent;
  padding: var(--spacing-2) var(--spacing-1);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
}

.input-field-wrapper .form-input:focus {
  box-shadow: none;
}

.prefix,
.suffix {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
}

.text-right {
  text-align: right;
}

/* Range Slider Premium Styles */
.range-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  /* Slightly thicker for better touch/click */
  background: var(--gray-200);
  border-radius: var(--radius-full);
  outline: none;
  transition: all 0.2s ease;
  margin-top: var(--spacing-4);
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px dashed var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s;
  /* Gentle transition only */
}

.range-slider::-webkit-slider-thumb:hover {
  border-color: var(--color-primary-dark);
}

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px dashed var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.range-slider::-moz-range-thumb:hover {
  border-color: var(--color-primary-dark);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
  margin-top: var(--spacing-2);
}

/* Summary Box - Row on large screens, column on small screens */
.summary-box {
  background: transparent !important;
  border: none !important;
  padding: var(--spacing-4) 0;
  border-bottom: 1px dashed var(--color-gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.summary-box:last-child {
  border-bottom: none;
}

.summary-box.highlight {
  background: transparent !important;
  border-bottom: none;
  padding-top: var(--spacing-6);
  margin-top: var(--spacing-2);
}

.summary-label {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  margin-bottom: 0;
  font-weight: var(--font-weight-medium);
}

.summary-value {
  margin: 0;
  font-size: 3.25rem;
  /* Increased size */
  font-weight: 600;
  color: var(--color-navy);
  word-break: break-word;
}

.summary-box.highlight .summary-value {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .summary-value {
    font-size: 2.75rem;
    /* Even larger for desktop */
  }
}

.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Gap is now handled by padding and border-bottom on items */
}

@media (max-width: 640px) {
  .summary-box {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-1);
  }

  .summary-label {
    margin-bottom: var(--spacing-1);
  }

  .summary-value {
    font-size: var(--font-size-2xl) !important;
  }

  .summary-grid {
    gap: var(--spacing-3);
  }

  .chart-container {
    height: 250px !important;
  }
}

/* Global Table Responsiveness */
.table-responsive,
.schedule-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule-table,
.emi-table,
.comparison-table {
  width: 100%;
  min-width: 600px;
  /* Force scroll on mobile for better readability */
}

.schedule-table th,
.schedule-table td,
.emi-table th,
.emi-table td {
  white-space: nowrap;
}

@media (max-width: 640px) {

  .schedule-table,
  .emi-table {
    font-size: var(--font-size-xs);
  }
}

/* Breadcrumbs */
.breadcrumb-container {
  margin-bottom: var(--spacing-4);
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  font-size: var(--font-size-sm);
  padding: 0;
}

.breadcrumb li {
  color: var(--color-gray-400);
}

.breadcrumb a {
  color: var(--color-primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li+li::before {
  content: "/\00a0";
  color: var(--color-gray-400);
}

.breadcrumb .active {
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
}

/* Specialized Calculator Modules */

/* BMI Calculator */
.bmi-meter {
  height: 10px;
  background: linear-gradient(to right, #3B82F6 0%, #10B981 18.5%, #F59E0B 25%, #EF4444 30%, #991B1B 100%);
  border-radius: 5px;
  position: relative;
  margin-top: 20px;
}

.bmi-marker {
  position: absolute;
  top: -8px;
  width: 4px;
  height: 26px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: left 0.5s ease;
}

.status-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
}

.status-underweight {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-normal {
  background: #D1FAE5;
  color: #065F46;
}

.status-overweight {
  background: #FEF3C7;
  color: #92400E;
}

.status-obese {
  background: #FEE2E2;
  color: #991B1B;
}

/* Age Calculator */
.age-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.age-unit-card {
  background: var(--color-gray-50);
  padding: 15px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px dashed var(--color-gray-100);
}

.age-unit-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.age-unit-label {
  font-size: 12px;
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.next-birthday-panel {
  background: var(--color-navy);
  color: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-top: 25px;
  text-align: center;
}

/* Currency Converter */
.currency-box {
  max-width: 500px;
  margin: 0 auto;
  padding: var(--spacing-8);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.curr-input-group {
  margin-bottom: var(--spacing-6);
}

.curr-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-500);
  margin-bottom: var(--spacing-2);
  display: block;
}

.curr-field {
  display: flex;
  gap: var(--spacing-4);
  align-items: center;
  background: var(--color-gray-50);
  padding: var(--spacing-2) var(--spacing-4);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-gray-100);
  transition: border-color 0.3s;
}

.curr-field:focus-within {
  border-color: var(--color-primary);
}

.curr-field input {
  border: none;
  background: transparent;
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-navy);
  width: 100%;
  outline: none;
}

.curr-field select {
  border: none;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding-right: var(--spacing-2);
}

/* Custom Scrollable Select */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  height: 50px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-navy);
  justify-content: space-between;
}

.custom-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-white);
  border: 2px solid var(--border-main);
  border-top: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: none;
}

.custom-dropdown.active .custom-dropdown-options {
  display: block;
}

.custom-dropdown-search {
  padding: 10px;
  border-bottom: 1px dashed var(--border-main);
  background: var(--bg-gray-50);
  position: sticky;
  top: 0;
  z-index: 2;
}

.custom-dropdown-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  font-size: 13px;
  outline: none;
}

.custom-option {
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.custom-option:hover {
  background: var(--color-gray-50);
  color: var(--color-primary);
}

.custom-option.selected {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

.custom-option i {
  width: 20px;
  text-align: center;
  color: var(--color-gray-400);
}

.custom-option.selected i {
  color: var(--color-primary);
}

/* Custom Scrollbar for Dropdowns */
.custom-dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
  background: var(--bg-gray-50);
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 10px;
}

.custom-dropdown-options::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

.swap-v-btn {
  width: 44px;
  height: 44px;
  margin: -10px auto;
  z-index: 2;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px dashed var(--color-white);
  cursor: pointer;
  transition: transform 0.3s;
}

.swap-v-btn:hover {
  transform: rotate(180deg);
}

/* Tip Calculator */
.tip-percent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.tip-btn {
  padding: 10px;
  background: var(--color-gray-100);
  border: 1px dashed var(--border-main);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tip-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.tip-btn:hover:not(.active) {
  border-color: var(--color-primary);
}

.split-summary {
  background: var(--color-gray-500);
  color: var(--color-green);
  padding: 25px;
  border-radius: var(--radius-lg);
  margin-top: 25px;
}

.split-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.split-label {
  font-size: 12px;
  font-weight: 500
}

.split-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
}

@media (max-width: 640px) {
  .age-highlight-grid {
    grid-template-columns: 1fr;
  }

  .tip-percent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .currency-box {
    padding: var(--spacing-4);
  }
}

/* Unit Converter */
.unit-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 25px;
}

.unit-type-btn {
  padding: 12px 8px;
  background: var(--color-white);
  border: 1.5px dashed var(--border-main);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-gray-600);
  box-shadow: var(--shadow-sm);
}

.unit-type-btn i {
  font-size: 20px;
  color: var(--color-gray-400);
  transition: color 0.3s;
}

.unit-type-btn:hover:not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.unit-type-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #EFF6FF;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.unit-type-btn.active i {
  color: var(--color-primary);
}

.alt-units-details {
  background: var(--color-white);
  border: 1px dashed var(--border-main);
  border-radius: var(--radius-md);
  padding: 15px;
  transition: all 0.3s ease;
}

.alt-units-details[open] {
  box-shadow: var(--shadow-sm);
  border-style: solid;
  border-color: var(--color-primary);
}

.alt-units-details summary {
  list-style: none;
  outline: none;
}

.alt-units-details summary::-webkit-details-marker {
  display: none;
}

.alt-unit-row {
  transition: background 0.2s;
}

.alt-unit-row:hover {
  background: var(--bg-gray-50);
}

.converter-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.converter-row select {
  flex: 1;
  padding: 10px;
  border: 1px dashed var(--color-gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.converter-row input {
  flex: 2;
  padding: 12px;
  border: 1px dashed var(--color-gray-200);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy);
}

.swap-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-gray-100);
  border: none;
  cursor: pointer;
  color: var(--color-gray-600);
}

/* Percentage Calculator */
.percent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.percent-row input {
  width: 100px;
  padding: 8px;
  border: 1px dashed var(--color-gray-200);
  border-radius: 4px;
}

.percent-row span {
  font-size: 14px;
  color: var(--color-gray-600);
}

.percent-result {
  font-weight: 700;
  color: var(--color-primary);
}

@media (max-width: 640px) {
  .unit-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .converter-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Date Difference Calculator */
.date-diff-summary {
  padding: 20px;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  margin-top: 25px;
}

.date-diff-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--color-gray-200);
}

.date-diff-item:last-child {
  border-bottom: none;
}

.date-diff-label {
  color: var(--color-gray-600);
  font-weight: 500;
}

.date-diff-value {
  color: var(--color-navy);
  font-weight: 700;
}

/* --- Dark Mode Support for Calculators --- */
body.dark-mode .calculator-hero h1 {
  background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .panel-title {
  color: var(--text-heading);
  border-bottom-color: var(--border-main);
}

/* Dark mode Tab Switching */
body.dark-mode .tenure-type-toggle {
  background: var(--gray-800);
  border-color: var(--border-main);
}

body.dark-mode .tenure-type-btn {
  color: var(--text-muted);
}

body.dark-mode .tenure-type-btn.active {
  background: var(--bg-card);
  color: #60A5FA;
  border-color: #60A5FA;
}

body.dark-mode .input-field-wrapper {
  background-color: var(--bg-body);
  /* Use a darker background */
  background-image: linear-gradient(var(--bg-body), var(--bg-body)),
    linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-navy) 100%);
}

body.dark-mode .input-field-wrapper .form-input {
  color: var(--text-main);
}

body.dark-mode .range-slider {
  background: var(--gray-800);
}

body.dark-mode .summary-box {
  border-bottom-color: var(--border-main);
}

body.dark-mode .summary-label {
  color: var(--text-muted);
}

body.dark-mode .summary-value {
  color: var(--text-heading);
}

/* Ensure the highlight green gradient is still vibrant in dark mode */
body.dark-mode .summary-box.highlight .summary-value {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

body.dark-mode .schedule-table thead {
  background: var(--gray-800) !important;
}

body.dark-mode .schedule-table th {
  color: var(--text-heading) !important;
}

body.dark-mode .schedule-table td {
  color: var(--text-main) !important;
}

body.dark-mode .age-unit-card {
  background: var(--bg-body);
  border-color: var(--border-main);
}

body.dark-mode .curr-field {
  background: var(--bg-body);
  border-color: var(--border-main);
}

body.dark-mode .curr-field input {
  color: var(--text-heading);
}

body.dark-mode .tip-btn {
  background: var(--gray-800);
  color: var(--text-main);
}

body.dark-mode .unit-type-btn {
  background: var(--bg-card);
  border-color: var(--border-main);
  color: var(--text-muted);
}

body.dark-mode .unit-type-btn.active {
  background: var(--color-primary-dark);
  color: var(--color-white);
  border-color: var(--color-primary);
}

body.dark-mode .converter-row input,
body.dark-mode .converter-row select {
  background: var(--bg-body);
  border-color: var(--border-main);
  color: var(--text-main);
}

body.dark-mode .date-diff-summary {
  background: var(--bg-body);
}

body.dark-mode .date-diff-item {
  border-bottom-color: var(--border-main);
}

body.dark-mode .date-diff-label {
  color: var(--text-muted);
}

body.dark-mode .date-diff-value {
  color: var(--text-heading);
}

/* ===== Brokerage Calculator ===== */
.broker-type-group {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--spacing-6);
  border: 1px dashed var(--border-main);
}

.broker-type-btn {
  flex: 1;
  padding: 8px 16px;
  border: 1px dashed transparent;
  background: transparent;
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  font-size: 14px;
}

.broker-type-btn:hover:not(.active) {
  color: var(--color-primary);
  border-color: var(--border-main);
}

.broker-type-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.charge-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.charge-label {
  color: var(--color-gray-600);
  font-size: 14px;
}

.charge-value {
  font-weight: 600;
  color: var(--color-navy);
}

/* ===== SIP Compare ===== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.scenario-panel {
  background-color: var(--bg-card);
  border: 1px dashed var(--border-main);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.scenario-panel.scenario-b {
  border-top-color: var(--color-green);
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Rent vs Buy ===== */
.decision-badge {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 18px;
  margin-top: 15px;
  box-shadow: var(--shadow-md);
}

.badge-buy {
  background: #DCFCE7;
  color: #166534;
  border: 2px dashed #166534;
}

.badge-rent {
  background: #FEF9C3;
  color: #854D0E;
  border: 2px dashed #854D0E;
}

/* ===== Mutual Fund Returns & ELSS (investment type toggle) ===== */
.investment-type-group {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--spacing-6);
  border: 1px dashed var(--border-main);
}

.investment-type-btn {
  flex: 1;
  padding: 8px 16px;
  border: 1px dashed transparent;
  background: transparent;
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.investment-type-btn:hover:not(.active) {
  color: var(--color-primary);
  border-color: var(--border-main);
}

.investment-type-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

/* ===== Loan EMI Manager ===== */
.loan-entry {
  background: var(--bg-card);
  border: 1px dashed var(--border-main);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.remove-loan-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  font-size: 1.2rem;
}

.loan-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.add-loan-btn {
  width: 100%;
  padding: 1rem;
  border: 2px dashed var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-loan-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ===== Income Tax (radio toggle) ===== */
.radio-toggle {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: var(--spacing-2);
  border: 1px dashed var(--border-main);
}

.radio-toggle input[type="radio"] {
  display: none;
}

.radio-toggle label {
  flex: 1;
  text-align: center;
  padding: var(--spacing-2) var(--spacing-4);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-600);
  transition: all 0.2s ease;
  border: 1px dashed transparent;
}

.radio-toggle input[type="radio"]:checked+label {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ===== GST Calculator (radio group) ===== */
.radio-group {
  display: flex;
  background: var(--color-gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  width: 100%;
  border: 1px dashed var(--border-main);
}

.radio-label {
  flex: 1;
  text-align: center;
  position: relative;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-label-text {
  display: block;
  padding: var(--spacing-2) var(--spacing-4);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  border: 1px dashed transparent;
}

.radio-label input[type="radio"]:checked+.radio-label-text {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

/* ===== DTI Calculator ===== */
.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
}

.status-excellent {
  background: #DCFCE7;
  color: #166534;
}

.status-good {
  background: #FEF9C3;
  color: #854D0E;
}

.status-caution {
  background: #FFEDD5;
  color: #9A3412;
}

.status-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.debt-categories {
  border-top: 1px dashed var(--border-main);
  margin-top: 20px;
  padding-top: 20px;
}

/* ===== Tenure & Gender Toggles (Global) ===== */
.tenure-type-toggle,
.gender-toggle {
  display: flex;
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 2px;
  border: 1px dashed var(--border-main);
}

.tenure-btn,
.tenure-type-btn,
.gender-btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
}

.tenure-btn:hover:not(.active),
.tenure-type-btn:hover:not(.active),
.gender-btn:hover:not(.active) {
  color: var(--color-primary);
  border-color: var(--border-main);
}

.tenure-btn.active,
.tenure-type-btn.active,
.gender-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== Dark Mode for new components ===== */
body.dark-mode .broker-type-group,
body.dark-mode .investment-type-group,
body.dark-mode .radio-toggle,
body.dark-mode .radio-group {
  background: var(--gray-800);
  border-color: var(--border-main);
}

body.dark-mode .broker-type-btn,
body.dark-mode .investment-type-btn,
body.dark-mode .radio-toggle label {
  color: var(--text-muted);
}

body.dark-mode .broker-type-btn.active,
body.dark-mode .investment-type-btn.active {
  background: var(--bg-card);
  color: #60A5FA;
  border-color: #60A5FA;
}

body.dark-mode .radio-toggle input[type="radio"]:checked+label {
  background: var(--color-primary);
  color: var(--color-white);
}

body.dark-mode .radio-label-text {
  color: var(--text-muted);
}

body.dark-mode .radio-label input[type="radio"]:checked+.radio-label-text {
  background: var(--bg-card);
  color: #60A5FA;
  border-color: #60A5FA;
}

body.dark-mode .tenure-type-toggle,
body.dark-mode .gender-toggle {
  background: var(--gray-800);
}

body.dark-mode .tenure-btn,
body.dark-mode .tenure-type-btn,
body.dark-mode .gender-btn {
  color: var(--text-muted);
}

body.dark-mode .tenure-btn.active,
body.dark-mode .tenure-type-btn.active,
body.dark-mode .gender-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

body.dark-mode .loan-entry {
  background: var(--bg-card);
  border-color: var(--border-main);
}

body.dark-mode .charge-value {
  color: var(--text-heading);
}

body.dark-mode .charge-label {
  color: var(--text-muted);
}

body.dark-mode .scenario-panel {
  background-color: var(--bg-card);
  border-color: var(--border-main);
}

body.dark-mode .debt-categories {
  border-top-color: var(--border-main);
}