html {
  html {
    font-size: 14px;
  }

  @media (min-width: 768px) {
    html { font-size: 16px; }
  }

  html, body {
    height: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #eef1f6;
    background-image:
      linear-gradient(135deg, rgba(27,58,107,.04) 25%, transparent 25%),
      linear-gradient(225deg, rgba(27,58,107,.04) 25%, transparent 25%),
      linear-gradient(315deg, rgba(27,58,107,.04) 25%, transparent 25%),
      linear-gradient(45deg,  rgba(27,58,107,.04) 25%, transparent 25%);
    background-size: 40px 40px;
  }

  main {
    flex: 1 0 auto;
  }

  footer {
    flex-shrink: 0;
    background-color: #1b3a6b;
    color: #cdd8ea;
    padding: 1.25rem 0;
    border-top: none !important;
  }

  footer a {
    color: #1bc8f0;
    text-decoration: none;
  }

  footer a:hover {
    color: #fff;
  }

  .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #1bc8f0;
  }

/* ?? Brand colours ????????????????????????????????????????? */
:root {
  --navy:   #1b3a6b;
  --cyan:   #1bc8f0;
  --light:  #f5f6f8;
  --white:  #ffffff;
}

/* ?? Navbar ???????????????????????????????????????????????? */
.navbar {
  border-bottom: 3px solid var(--cyan) !important;
}

.navbar-brand-img {
  height: 50px;
  width: auto;
}

.nav-link:hover {
  color: var(--cyan) !important;
}

.btn-launch {
  background-color: var(--cyan);
  color: var(--navy);
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: .45rem 1.4rem;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-launch:hover { background-color: #0fb3d8; color: var(--navy); }

/* Hero CTA – prominent cyan default */
.btn-launch-hero {
  display: inline-block;
  background-color: #0fb3d8;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  padding: .75rem 2rem;
  text-decoration: none;
  letter-spacing: .5px;
  box-shadow: 0 4px 20px rgba(27,200,240,.4);
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn-launch-hero:hover {
  background-color: #0a9dbf;
  color: var(--navy);
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(27,200,240,.6);
}

/* ?? Hero ?????????????????????????????????????????????????? */
.hero-section {
  background: linear-gradient(135deg, #daf4fb 0%, #eef1f6 60%, #dde5f0 100%);
  padding: 36px 0 32px;
}
.hero-headline {
  font-size: 3rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: .2rem;
}
.hero-tagline {
  font-size: 1.25rem;
  color: var(--cyan);
  font-weight: 700;
  margin-top: .2rem;
  margin-bottom: .2rem;
}
.hero-sub {
  color: #555;
  margin-top: .35rem;
  max-width: 480px;
  line-height: 1.6;
}
.dashboard-card {
  background: linear-gradient(145deg, #1b3a6b 0%, #1a5080 100%) !important;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(27,58,107,.35);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(27,200,240,.25);
}
.dashboard-label  { color: #ffffff; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.dashboard-counter { font-size: 3rem; font-weight: 800; color: #1bc8f0; margin: .25rem 0; text-shadow: 0 0 20px rgba(27,200,240,.4); }
.dashboard-sub    { color: rgba(255,255,255,.7); font-weight: 600; }
.yield-bar-wrap   { background: rgba(255,255,255,.15); border-radius: 50px; height: 8px; margin-top: 1.5rem; overflow: hidden; }
.yield-bar        { height: 100%; width: 0; background: linear-gradient(90deg, #1bc8f0, #ffffff); border-radius: 50px; transition: width .05s linear; }

/* ?? How it Works ?????????????????????????????????????????? */
.loop-section {
  padding: 48px 0;
  background: var(--navy);
}
.loop-section .section-title {
  color: var(--white);
}
.loop-step {
  background: #ffffff;
  border: 1px solid rgba(27,200,240,.4);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  width: 220px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.loop-step h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: .6rem 0 .4rem; }
.loop-step p  { font-size: .875rem; color: #444; }
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
}
.loop-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.loop-connector {
  width: 60px;
  flex-shrink: 0;
  align-self: center;
}
.loop-connector svg { width: 100%; }
.loop-step-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
}
.loop-step h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: .6rem 0 .4rem; }
.loop-step p  { font-size: .875rem; color: #555; }

/* ?? Impact Calculator ????????????????????????????????????? */
.calculator-section {
  padding: 36px 0;
  background: linear-gradient(160deg, #ddf3fa 0%, #e8eef6 100%);
}
.calc-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(27,58,107,.10);
  padding: 1.5rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.calc-label   { font-weight: 600; color: var(--navy); display: block; margin-bottom: .4rem; font-size: 1rem; }
.calc-amount  { color: var(--cyan); font-size: 1.2rem; }
.calc-slider-row { margin-bottom: 1rem; }
.calc-slider-hint { font-size: .75rem; color: #aaa; margin-top: .2rem; letter-spacing: .5px; }

/* Slider track */
.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--cyan) 0%, #e8ecf2 0%);
  outline: none;
  cursor: pointer;
}
.form-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 50px;
}
/* Thumb – webkit */
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  background-color: #1b3a6b !important;
  border: 5px solid #1bc8f0 !important;
  box-shadow: 0 2px 8px rgba(27,58,107,.45) !important;
  cursor: grab;
  margin-top: -11px;
  transition: transform .15s, box-shadow .15s;
}
.form-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(27,58,107,.6) !important;
}
/* Thumb – moz */
.form-range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  background-color: #1b3a6b !important;
  border: 5px solid #1bc8f0 !important;
  box-shadow: 0 2px 8px rgba(27,58,107,.45) !important;
  cursor: grab;
}
.form-range::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}
.calc-results {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.calc-result-card {
  flex: 1;
  min-width: 140px;
  background: var(--light);
  border-radius: 14px;
  padding: .75rem .75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.calc-result-card.accent { background: var(--navy); }
.calc-result-card.accent .calc-year,
.calc-result-card.accent .calc-total,
.calc-result-card.accent .calc-note { color: var(--white); }
.calc-year  { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; font-weight: 600; }
.calc-total { font-size: 1.75rem; font-weight: 800; color: var(--navy); }
.calc-note  { font-size: .75rem; color: #888; }
.calc-footnote { font-size: .8rem; color: #999; text-align: center; }

/* ?? Responsive ???????????????????????????????????????????? */
@media (max-width: 767px) {
  .hero-section { padding: 50px 0 40px; text-align: center; }
  .hero-headline { font-size: 2rem; }
  .hero-sub { margin: 1rem auto; }
  .hero-right { margin-top: 2rem; }
  .loop-connector { display: none; }
}

/* ?? Auth pages ????????????????????????????????????????????? */
.auth-wrapper {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(27,58,107,.12);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.hero-logo {
  height: 175px;
  width: auto;
  display: block;
  margin: 0 auto 1rem auto;
}
/* Tighten hero left copy now that CTA moved */
.hero-left .hero-sub { margin-bottom: 0; }

/* Account type toggle on register page */
.acct-type-toggle {
  display: flex;
  gap: .5rem;
  margin-top: .35rem;
}
.acct-type-btn {
  flex: 1;
  padding: .55rem .75rem;
  border: 1.5px solid #dde3ee;
  border-radius: 50px;
  background: #fff;
  font-weight: 600;
  font-size: .875rem;
  color: #1b3a6b;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.acct-type-btn:hover  { border-color: #1bc8f0; }
.acct-type-btn.active { background: #1b3a6b; border-color: #1b3a6b; color: #1bc8f0; }
.auth-logo {
  text-align: center;
  margin-bottom: 1.25rem;
}
.auth-logo img {
  height: 100px;
  width: auto;
}
.auth-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1b3a6b;
  margin-bottom: .25rem;
}
.auth-sub {
  text-align: center;
  color: #888;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.auth-field {
  margin-bottom: 1rem;
}
.auth-field label {
  font-weight: 600;
  color: #1b3a6b;
  font-size: .9rem;
  margin-bottom: .3rem;
  display: block;
}
.auth-field .form-control {
  border-radius: 10px;
  border: 1.5px solid #dde3ee;
  padding: .55rem .85rem;
}
.auth-field .form-control:focus {
  border-color: #1bc8f0;
  box-shadow: 0 0 0 3px rgba(27,200,240,.15);
}
.auth-field-error {
  color: #e05;
  font-size: .8rem;
  margin-top: .2rem;
  display: block;
}
.auth-error {
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: .6rem .9rem;
  color: #c00;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  font-size: .9rem;
  color: #555;
}
.auth-divider {
  border-color: #eee;
  margin: 1.25rem 0;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .55rem 1rem;
  border: 1.5px solid #dde3ee;
  border-radius: 50px;
  background: #fff;
  font-weight: 600;
  color: #333;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.btn-google:hover {
  border-color: #1bc8f0;
  box-shadow: 0 2px 8px rgba(27,200,240,.2);
}
.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .875rem;
  color: #888;
}
.auth-switch a {
  color: #1b3a6b;
  font-weight: 700;
  text-decoration: none;
}
.auth-switch a:hover { color: #1bc8f0; }

/* ?? Dashboard ????????????????????????????????????????????? */
.dashboard-wrapper { background: #eef1f6; min-height: 80vh; }

.dash-banner {
  background: linear-gradient(135deg, #1b3a6b 0%, #1a5080 100%);
  padding: 2.5rem 0 2rem;
}
.dash-greeting {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .25rem;
}
.dash-greeting span { color: #1bc8f0; }
.dash-tagline { color: rgba(255,255,255,.7); margin: 0; }

.dash-body { padding: 2rem 1rem 3rem; }

.dash-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.dash-stat-card {
  flex: 1;
  min-width: 200px;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 4px 20px rgba(27,58,107,.08);
}
.dash-stat-card.accent {
  background: #1b3a6b;
}
.dash-stat-card.accent .dash-stat-label,
.dash-stat-card.accent .dash-stat-note { color: rgba(255,255,255,.65); }
.dash-stat-card.accent .dash-stat-value { color: #1bc8f0; }
.dash-stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: #888; font-weight: 600; margin-bottom: .35rem; }
.dash-stat-value { font-size: 2rem; font-weight: 800; color: #1b3a6b; margin-bottom: .2rem; }
.dash-stat-note  { font-size: .75rem; color: #aaa; margin: 0; }

.dash-section {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(27,58,107,.08);
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.dash-section-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1b3a6b;
  margin: 0;
}
.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #999;
}
.dash-table-wrap { overflow-x: auto; }
.dash-table {
  width: 100%;
  font-size: .9rem;
}
.dash-table thead th {
  color: #1b3a6b;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid #eef1f6;
}
.dash-table tbody tr:hover { background: #f7f9fc; }
.yield-cell { color: #1bc8f0; font-weight: 700; }
.status-badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
}
.status-completed { background: #e6f9f0; color: #1a8a55; }
.status-pending   { background: #fff8e0; color: #b07a00; }
.status-failed    { background: #ffeaea; color: #c0001a; }

/* ?? Donate page ??????????????????????????????????????????? */
.donate-wrapper {
  background: #eef1f6;
  min-height: 80vh;
  padding: 3rem 1rem;
}
.donate-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(27,58,107,.10);
  padding: 2.5rem 2rem;
  max-width: 580px;
  margin: 0 auto;
}
.donate-logo { height: 55px; width: auto; display: block; margin: 0 auto 1rem; }
.donate-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #1b3a6b;
  margin-bottom: .25rem;
}
.donate-sub {
  text-align: center;
  color: #777;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.donate-section { margin-bottom: 1.5rem; }
.donate-label {
  display: block;
  font-weight: 700;
  color: #1b3a6b;
  font-size: .9rem;
  margin-bottom: .6rem;
}

/* Cause cards */
.cause-grid {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.cause-option {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1.5px solid #dde3ee;
  border-radius: 12px;
  padding: .85rem 1rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.cause-option:has(input:checked) {
  border-color: #1bc8f0;
  background: #f0fbff;
}
.cause-option input { margin-top: .2rem; accent-color: #1b3a6b; }
.cause-label-inner { display: flex; flex-direction: column; gap: .15rem; }
.cause-label-inner strong { color: #1b3a6b; font-size: .95rem; }
.cause-label-inner small  { color: #888; font-size: .8rem; }

/* Tier buttons */
.tier-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.tier-btn {
  flex: 1;
  min-width: 70px;
  padding: .6rem .5rem;
  border: 1.5px solid #dde3ee;
  border-radius: 50px;
  background: #fff;
  font-weight: 700;
  color: #1b3a6b;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.tier-btn:hover  { border-color: #1bc8f0; }
.tier-btn.active {
  background: #1b3a6b;
  border-color: #1b3a6b;
  color: #1bc8f0;
}
.custom-amount-wrap { margin-top: .75rem; }
.custom-amount-wrap .form-control {
  border-radius: 10px;
  border: 1.5px solid #dde3ee;
}
.custom-amount-wrap .form-control:focus {
  border-color: #1bc8f0;
  box-shadow: 0 0 0 3px rgba(27,200,240,.15);
}

/* Impact preview */
.donate-impact {
  background: linear-gradient(135deg, #1b3a6b, #1a5080);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  text-align: center;
  margin-top: .5rem;
}
.impact-label { color: rgba(255,255,255,.9); font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .75rem; font-weight: 600; }
.impact-horizons {
  display: flex;
  justify-content: space-around;
  gap: .5rem;
  margin-bottom: .75rem;
}
.impact-horizon { display: flex; flex-direction: column; gap: .15rem; }
.impact-horizon-label { color: rgba(255,255,255,.75); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.impact-horizon-value { color: #1bc8f0; font-size: 1.15rem; font-weight: 800; }
.impact-note  { color: rgba(255,255,255,.9); font-size: .85rem; margin: 0; }

.donate-secure {
  text-align: center;
  font-size: .78rem;
  color: #aaa;
  margin-top: .6rem;
}

/* ========== Admin Pages ========== */
.admin-wrapper {
  background: #f4f7fb;
  min-height: 100vh;
  padding: 2.5rem 0 4rem;
}
.admin-body { max-width: 1000px; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1b3a6b;
  margin: 0;
}
.admin-tabs {
  display: flex;
  gap: .4rem;
  background: #e6edf8;
  border-radius: 50px;
  padding: .25rem;
}
.admin-tab {
  padding: .4rem 1.1rem;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 600;
  color: #1b3a6b;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.admin-tab:hover  { background: #fff; color: #1b3a6b; }
.admin-tab.active { background: #1b3a6b; color: #1bc8f0; }

.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(27,58,107,.07);
  margin-bottom: 1.5rem;
}
.admin-card h5 {
  font-weight: 700;
  color: #1b3a6b;
  margin-bottom: 1rem;
}

/* ========== Public Causes Page ========== */
.causes-wrapper {
  background: #f4f7fb;
  min-height: 100vh;
  padding: 3rem 0 5rem;
}
.causes-body  { max-width: 1000px; }
.causes-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.causes-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1b3a6b;
  margin-bottom: .5rem;
}
.causes-sub {
  color: #666;
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}
.causes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cause-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 12px rgba(27,58,107,.07);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform .2s, box-shadow .2s;
}
.cause-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(27,58,107,.13);
}
.cause-card-icon { font-size: 2rem; }
.cause-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1b3a6b;
  margin: 0;
}
.cause-card-desc {
  color: #666;
  font-size: .9rem;
  flex-grow: 1;
  margin: 0;
}
.causes-empty {
  color: #999;
  text-align: center;
  grid-column: 1/-1;
  padding: 3rem 0;
}