:root {
  --navy: #0d2c6e;
  --navy-dark: #071b47;
  --teal: #005a9c;
  --teal-light: #3f7fb8;
  --orange: #e8792f;
  --gold: #c9a24b;
  --red: #a6192e;
  --grey-bg: #f4f5f7;
  --text-dark: #202430;
  --text-muted: #5b6270;
  --white: #ffffff;
  --border: #d5d9e0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--grey-bg);
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TOP BAR ---------- */
.topbar {
  background: var(--navy);
  color: var(--white);
  border-bottom: 3px solid var(--red);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.brand-icon {
  width: 30px; height: 30px;
  background: var(--white);
  color: var(--navy);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.8;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 14px;
}
.topbar-actions a.btn-outline {
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 16px;
  border-radius: 2px;
}
.topbar-actions a.btn-fill {
  background: var(--red);
  padding: 9px 16px;
  border-radius: 2px;
}

/* ---------- NAV ---------- */
.navbar {
  background: var(--navy-dark);
}
.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.navbar-inner a {
  padding: 14px 0;
  display: inline-block;
  opacity: 0.9;
}
.navbar-inner a:hover { opacity: 1; text-decoration: underline; }

/* ---------- HERO ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 64px 24px 76px;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: 0;
}
.hero p { max-width: 480px; font-size: 17px; color: rgba(255,255,255,0.88); margin: 0 0 26px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-ctas .btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.hero-ctas .btn-ghost:hover { border-color: rgba(255,255,255,0.8); }

.hero-trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.hero-trust-line span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust-line svg { flex-shrink: 0; color: var(--teal-light); }

/* Card mockup - static, no float animation, squarer corners */
.hero-card-scene { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.bank-card {
  width: 300px;
  aspect-ratio: 1.586;
  border-radius: 6px;
  padding: 22px;
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.bank-card.behind {
  position: absolute;
  z-index: 1;
  transform: rotate(-6deg) translate(-14px, 10px);
  opacity: 0.5;
  filter: saturate(0.7);
}
.bank-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.bank-card-wordmark { font-weight: 800; font-size: 13px; letter-spacing: 1.5px; color: rgba(255,255,255,0.95); }
.bank-card-chip { width: 32px; height: 24px; border-radius: 3px; background: linear-gradient(135deg, var(--gold), #e6c977); position: relative; }
.bank-card-chip::before, .bank-card-chip::after {
  content: ''; position: absolute; left: 4px; right: 4px; height: 1px; background: rgba(0,0,0,0.25);
}
.bank-card-chip::before { top: 8px; }
.bank-card-chip::after { top: 16px; }
.bank-card-number {
  font-family: plus-jakarta-sans, Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.95);
}
.bank-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.bank-card-name { font-size: 11px; letter-spacing: 1px; color: rgba(255,255,255,0.8); text-transform: uppercase; }
.bank-card-icon { color: rgba(255,255,255,0.85); }

@media (prefers-reduced-motion: reduce) {
  .bank-card { animation: none; }
}

/* ---------- PHOTO FEATURE (image + overlay caption, then copy below) ---------- */
.photo-feature {
  position: relative;
  height: 420px;
  overflow: hidden;
}
.photo-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,27,71,0.75) 0%, rgba(7,27,71,0.15) 45%, transparent 70%);
}
.photo-feature-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 32px;
  z-index: 2;
  color: var(--white);
}
.photo-feature-caption h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 34px;
  margin: 0;
  line-height: 1.15;
}
.photo-feature-copy {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 24px;
  font-size: 16px;
  color: var(--text-muted);
  background: var(--white);
}

/* ---------- TRUST STRIP ---------- */
.strip {
  background: var(--navy-dark);
  color: var(--white);
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.strip-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 0; justify-content: space-between;
}
.strip-item {
  font-size: 13px;
  padding: 4px 22px;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.strip-item:first-child { border-left: none; padding-left: 0; }
.strip-item strong { display: block; font-size: 15px; color: var(--white); }

/* ---------- CARDS / SECTIONS ---------- */
.section { padding: 64px 24px; }
.section-alt { background: var(--white); }
.section-eyebrow {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.section h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  text-align: center;
  font-size: 28px;
  margin: 0 auto 12px;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  font-size: 15px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.icon-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 26px;
  transition: box-shadow 0.15s ease;
}
.icon-card:hover { box-shadow: 0 4px 10px -4px rgba(13,44,110,0.2); }
.icon-card .icon {
  width: 46px; height: 46px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.icon-card h3 { margin: 0 0 8px; font-size: 16px; }
.icon-card p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- HOW IT WORKS (steps) ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.step { text-align: center; padding: 0 12px; }
.step-num {
  width: 40px; height: 40px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  color: var(--navy);
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.step h3 { margin: 0 0 8px; font-size: 16px; }
.step p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- TESTIMONIAL CAROUSEL ---------- */
.carousel {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
}
.carousel-slide {
  flex: 0 0 100%;
  text-align: center;
  padding: 0 56px;
  box-sizing: border-box;
}
.carousel-quote {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: normal;
  font-size: 19px;
  line-height: 1.5;
  color: var(--navy);
  margin: 0 0 16px;
}
.carousel-author { color: var(--navy); font-weight: 700; font-size: 14px; }

.carousel-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--navy);
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.carousel-arrow:hover { background: var(--grey-bg); }
.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}
.carousel-dot.active { background: var(--navy); width: 22px; border-radius: 4px; }

/* ---------- CTA BAND ---------- */
.cta-band {
  background: var(--navy-dark);
  color: var(--white);
  text-align: center;
  padding: 60px 24px;
}
.cta-band h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 12px;
}
.cta-band p { color: rgba(255,255,255,0.85); margin: 0 0 26px; }

/* ---------- FORMS / CARD PANELS ---------- */
.form-page {
  max-width: 460px;
  margin: 60px auto;
  background: var(--white);
  border-radius: 4px;
  border: 1px solid var(--border);
  padding: 40px;
}
.form-page.wide { max-width: 620px; }
.form-page h1 { margin-top: 0; font-size: 22px; color: var(--navy); font-family: Georgia, serif; }
.form-page .subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; color: var(--text-dark); }
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); }

.btn {
  display: inline-block;
  border: none;
  padding: 12px 22px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: #00436f; }
.btn-full { width: 100%; margin-top: 20px; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-outline-small {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 6px 12px;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
}

.alert {
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f4c7c3; }
.alert-success { background: #e7f7ee; color: #1e7e42; border: 1px solid #bfe8cf; }

.form-footer-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.form-footer-link a { color: var(--navy); font-weight: 700; }

/* ---------- DASHBOARD ---------- */
.dash-header {
  background: var(--navy);
  color: var(--white);
  padding: 30px 24px;
  border-bottom: 3px solid var(--red);
}
.dash-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.dash-header h1 { margin: 0; font-size: 22px; font-family: Georgia, serif; }
.dash-header .sub { color: rgba(255,255,255,0.75); font-size: 13px; }

.balance-card {
  background: var(--navy-dark);
  color: var(--white);
  border-radius: 6px;
  padding: 30px;
  margin-bottom: 24px;
}
.balance-card .label { font-size: 13px; opacity: 0.85; letter-spacing: 0.5px; text-transform: uppercase; }
.balance-card .amount { font-size: 38px; font-weight: 700; margin: 8px 0; font-family: plus-jakarta-sans, Arial, sans-serif; }
.balance-card .acct { font-size: 14px; opacity: 0.9; }

.quick-actions { display: flex; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }

.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}
.panel h2 { margin-top: 0; font-size: 18px; color: var(--navy); font-family: Georgia, serif; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); }
tr:last-child td { border-bottom: none; }

.amount-pos { color: #1e7e42; font-weight: 700; }
.amount-neg { color: #b3261e; font-weight: 700; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}
.badge-review { background: #fff4e0; color: #a6631a; }
.badge-approved { background: #e7f7ee; color: #1e7e42; }
.badge-declined { background: #fdecea; color: #b3261e; }
.badge-paid { background: #e7eefc; color: #0d2c6e; }
.badge-active { background: #e7f7ee; color: #1e7e42; }
.badge-frozen { background: #eceff3; color: #5b6270; }

.empty-state { color: var(--text-muted); font-size: 14px; padding: 20px 0; text-align: center; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  padding: 40px 24px 24px;
  margin-top: 60px;
  font-size: 14px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.site-footer h4 { color: var(--white); margin-bottom: 12px; font-size: 14px; }
.site-footer p.disclaimer { text-align: center; margin-top: 30px; font-size: 12px; opacity: 0.6; }

/* ---------- ADMIN ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 30px; }
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--navy); font-family: Georgia, serif; }
.stat-card .lbl { font-size: 13px; color: var(--text-muted); }

.admin-nav { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-nav a {
  padding: 8px 16px;
  border-radius: 3px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.admin-nav a.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.inline-form { display: inline; }

@media (max-width: 768px) {
  /* ---- General spacing ---- */
  .container { padding: 0 16px; }
  .section, .hero, .strip, .site-footer { padding-left: 16px; padding-right: 16px; }

  /* ---- Top bar: stack brand and buttons instead of squeezing them side by side ---- */
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .brand { font-size: 16px; }
  .topbar-actions { width: 100%; gap: 10px; font-size: 13px; flex-wrap: wrap; }
  .topbar-actions a.btn-outline,
  .topbar-actions a.btn-fill { padding: 8px 12px; }

  /* ---- Nav: horizontal scroll instead of wrapping/overflowing the screen ---- */
  .navbar-inner {
    padding: 0 16px;
    gap: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .navbar-inner a { flex: 0 0 auto; }

  /* ---- Hero: stack the copy above the card mockup, shrink type ---- */
  .hero { padding: 40px 16px 50px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-trust-line { justify-content: center; }
  .hero-card-scene { order: -1; min-height: 180px; }
  .bank-card { width: 240px; }
  .bank-card.behind { display: none; }

  .photo-feature { height: 300px; }
  .photo-feature-caption { padding: 20px; }
  .photo-feature-caption h2 { font-size: 24px; }

  .strip-inner { flex-direction: column; gap: 14px; }
  .strip-item { border-left: none; padding: 0; }

  .section h2 { font-size: 22px; }
  .steps-grid { gap: 24px; }
  .cta-band h2 { font-size: 20px; }

  .carousel-slide { padding: 0 40px; }
  .carousel-quote { font-size: 16px; }

  /* ---- Forms ---- */
  .form-page { margin: 20px 12px; padding: 22px 18px; }
  .form-page.wide { max-width: 100%; }

  /* ---- Dashboard header ---- */
  .dash-header { padding: 20px 16px; }
  .dash-header h1 { font-size: 19px; }

  .balance-card { padding: 22px; }
  .balance-card .amount { font-size: 28px; }

  /* Quick action buttons: full-width stacked instead of cramped side by side */
  .quick-actions { flex-direction: column; gap: 10px; }
  .quick-actions .btn,
  .quick-actions a.btn-outline-small { width: 100%; text-align: center; }

  .panel { padding: 16px; }

  /* ---- Tables: the #1 mobile problem. Instead of squeezing every column onto a
     320-430px screen (unreadable), let the table scroll horizontally within its
     panel while the rest of the page stays put. ---- */
  .panel { overflow-x: auto; }
  table { min-width: 560px; font-size: 13px; }
  th, td { padding: 8px 6px; white-space: nowrap; }

  /* ---- Footer ---- */
  .site-footer .container { flex-direction: column; gap: 24px; }

  /* ---- Admin ---- */
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 20px; }
  .admin-nav { gap: 8px; }
  .admin-nav a { padding: 7px 12px; font-size: 12px; }

  /* Inline flex forms (balance adjust, loan repayment) - force full-width fields
     and buttons so they stack cleanly instead of squashing side by side. */
  .panel form[style*="flex"] { flex-direction: column; align-items: stretch !important; }
  .panel form[style*="flex"] > div,
  .panel form[style*="flex"] input,
  .panel form[style*="flex"] select,
  .panel form[style*="flex"] button { width: 100% !important; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 22px; }
  .balance-card .amount { font-size: 24px; }
  .brand-icon { width: 26px; height: 26px; }
  .brand { font-size: 14px; }
}
