*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0F2D52;
  --navy-mid: #1A4175;
  --teal: #1D8F75;
  --teal-light: #E1F5EE;
  --teal-mid: #0F6E56;
  --gold: #C9891A;
  --gold-light: #FEF3E2;
  --red: #C0392B;
  --red-light: #FDEDEC;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-500: #868E96;
  --gray-700: #495057;
  --gray-900: #212529;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #F0F4F8;
  color: var(--gray-900);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* === HEADER === */
.header {
  background: var(--navy);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 18px; color: white; font-weight: 400;
}
.logo-text { font-size: 16px; font-weight: 600; color: white; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: .5px; text-transform: uppercase; }

.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all .2s;
}
.nav-tab:hover { background: rgba(255,255,255,.1); color: white; }
.nav-tab.active { background: rgba(255,255,255,.15); color: white; }

/* === MAIN LAYOUT === */
.main { max-width: 1100px; margin: 0 auto; padding: 28px 28px 60px; }

/* === SECTION PAGES === */
.page { display: none; }
.page.active { display: block; }

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
}
.card-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.card-title { font-weight: 600; font-size: 14px; color: var(--navy); }
.card-body { padding: 22px; }

/* === GRID === */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* === FORM FIELDS === */
.field { margin-bottom: 14px; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--gray-700); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .2s;
  outline: none;
}
input:focus, select:focus { border-color: var(--navy); }
input[readonly] { background: var(--gray-100); color: var(--gray-700); cursor: not-allowed; }
.field-note { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.field-note.auto { color: var(--teal-mid); font-weight: 500; }

/* === STAT CARDS === */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.stat-label { font-size: 11px; font-weight: 500; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 600; color: var(--navy); font-family: 'DM Serif Display', serif; }
.stat-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

.stat-card.teal { background: var(--teal-light); border-color: #9FE1CB; }
.stat-card.teal .stat-value { color: var(--teal-mid); }
.stat-card.gold { background: var(--gold-light); border-color: #FAC775; }
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.red { background: var(--red-light); border-color: #F7C1C1; }
.stat-card.red .stat-value { color: var(--red); }

/* === DSR BAR === */
.dsr-bar-wrap { margin: 16px 0; }
.dsr-bar-track { background: var(--gray-200); border-radius: 99px; height: 10px; position: relative; overflow: hidden; }
.dsr-bar-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }
.dsr-bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.dsr-limit-line {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--red);
  border-radius: 1px;
  left: 60%;
  transition: left .4s ease;
}

/* === CCRIS TABLE === */
.ccris-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--navy);
  color: white;
  padding: 9px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
td { padding: 6px 8px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.tfoot td { background: var(--gray-50); font-weight: 600; color: var(--navy); }

td input[type="number"], td input[type="text"] {
  padding: 5px 8px; font-size: 13px; margin: 0; border-radius: 5px;
}
td select { padding: 5px 8px; font-size: 13px; margin: 0; border-radius: 5px; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.badge-good { background: var(--teal-light); color: var(--teal-mid); }
.badge-warn { background: var(--gold-light); color: var(--gold); }
.badge-bad { background: var(--red-light); color: var(--red); }

/* === SOLUTION CARDS === */
.solution-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.solution-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.solution-card:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(15,110,86,.12); }
.solution-card.best { border-color: var(--teal); border-width: 2px; }

.sol-header {
  padding: 14px 18px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
}
.sol-header.teal { background: var(--teal-mid); }
.sol-bank { font-size: 13px; font-weight: 600; color: white; }
.sol-badge {
  font-size: 10px; font-weight: 600; background: rgba(255,255,255,.2);
  color: white; padding: 3px 9px; border-radius: 99px; text-transform: uppercase;
  letter-spacing: .5px;
}
.best-badge {
  background: var(--teal); color: white; padding: 3px 9px; border-radius: 99px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}

.sol-body { padding: 16px 18px; }
.sol-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--gray-100); }
.sol-row:last-child { border-bottom: none; }
.sol-key { font-size: 12px; color: var(--gray-500); }
.sol-val { font-size: 13px; font-weight: 600; color: var(--gray-900); }

.sol-compare {
  margin: 12px 0;
  background: var(--gray-50);
  border-radius: 8px;
  padding: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sol-compare-col { flex: 1; text-align: center; }
.sol-compare-label { font-size: 10px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }
.sol-compare-val { font-size: 20px; font-weight: 600; font-family: 'DM Serif Display', serif; }
.sol-compare-val.green { color: var(--teal-mid); }
.sol-compare-val.red { color: var(--red); }
.sol-divider { font-size: 16px; color: var(--gray-300); }
.sol-arrow { font-size: 18px; color: var(--gray-400); }

.sol-savings {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; margin-top: 8px;
}
.sol-savings.pos { background: var(--teal-light); }
.sol-savings.neg { background: var(--red-light); }
.sol-savings-label { font-size: 12px; font-weight: 500; }
.sol-savings.pos .sol-savings-label { color: var(--teal-mid); }
.sol-savings.neg .sol-savings-label { color: var(--red); }
.sol-savings-amt { font-size: 16px; font-weight: 700; }
.sol-savings.pos .sol-savings-amt { color: var(--teal-mid); }
.sol-savings.neg .sol-savings-amt { color: var(--red); }

.sol-inputs { margin-bottom: 0; }
.sol-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.sol-input-row .field { margin-bottom: 0; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all .2s;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-mid); }
.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover { background: var(--teal-mid); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--gray-300); }
.btn-outline:hover { border-color: var(--navy); background: var(--gray-50); }

.btn-row { display: flex; gap: 10px; margin-top: 20px; }

/* === SECTION TITLES === */
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 6px;
}
.section-sub { font-size: 13px; color: var(--gray-500); margin-bottom: 24px; }

/* === PAGE HEADER BANNER === */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.banner-title { font-family: 'DM Serif Display', serif; font-size: 28px; color: white; font-weight: 400; margin-bottom: 4px; }
.banner-sub { font-size: 13px; color: rgba(255,255,255,.65); }
.banner-date { font-size: 12px; color: rgba(255,255,255,.5); text-align: right; }

/* === ELIGIBILITY TABLE === */
.elig-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.elig-table tr td {
  padding: 10px 14px;
  background: var(--gray-50);
  border-bottom: none;
}
.elig-table tr td:first-child { border-radius: 8px 0 0 8px; }
.elig-table tr td:last-child { border-radius: 0 8px 8px 0; text-align: right; }
.elig-label { font-weight: 500; color: var(--gray-700); font-size: 13px; }
.elig-val { font-weight: 700; color: var(--navy); font-size: 15px; font-family: 'DM Serif Display', serif; }

/* === PRINT === */
@media print {
  body { background: white; }
  .header, .nav-tabs, .btn-row { display: none !important; }
  .page { display: block !important; }
}

/* === RESPONSIVE === */
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .header-inner { padding: 12px 16px; }
  .solution-grid { grid-template-columns: 1fr; }
}

.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.color-teal { color: var(--teal-mid); }
.color-red { color: var(--red); }
.color-gold { color: var(--gold); }
.small { font-size: 11px; color: var(--gray-500); }
.disclaimer {
  font-size: 11px; color: var(--gray-500);
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: 6px;
  border-left: 3px solid var(--gray-300);
  margin-top: 16px;
  line-height: 1.5;
}
