
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ── */
:root {
  /* Brand */
  /* --accent:       #5b5fe8;
  --accent-dk:    #4448c4;
  --accent-lt:    #eeeeff;
  --accent-md:    #8487ee; */

  
  /* Brand */
  --accent:       #6E7297;
  --accent-dk:    #565a7a;
  --accent-lt:    #f6f6f8;
  --accent-md:    #9a9dbf;
  

  /* Semantic */
  --green:        #16a34a;
  --green-bg:     #f0fdf4;
  --green-bd:     #bbf7d0;
  --red:          #dc2626;
  --red-bg:       #fef2f2;
  --red-bd:       #fecaca;
  --amber:        #d97706;
  --amber-bg:     #fffbeb;
  --amber-bd:     #fde68a;

  /* Neutrals */
  --text:         #1b1d2e;
  --sub:          #6b7280;
  --muted:        #9ca3af;
  --border:       #e4e6f0;
  --border-table-inv:       #e4e6f083;
  --bg:           #f0f2f8;
  --white:        #ffffff;

  /* Shadows */
  --sh:           0 1px 3px rgba(15,17,35,.05), 0 4px 16px rgba(15,17,35,.06);
  --sh-md:        0 2px 8px rgba(15,17,35,.06), 0 8px 28px rgba(15,17,35,.09);
  --sh-lg:        0 4px 16px rgba(15,17,35,.07), 0 20px 48px rgba(15,17,35,.12);

  /* Layout */
  --r:            12px;
  --r-lg:         16px;

  /* Legacy aliases */
  --brand:        var(--accent);
  --brand-dk:     var(--accent-dk);
  --brand-lt:     var(--accent-lt);
  --brand-md:     var(--accent-md);
  --orange:       var(--amber);
  --orange-bg:    var(--amber-bg);
  --hero-text:    var(--text);
  --hero-accent:  var(--accent);
  --hero-sub:     var(--sub);
  --hero-meta:    var(--muted);
  --hero-warn:    var(--accent);
  --primary:      var(--accent);
}

/* ── Base ── */
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  background-image: url('/images/background_image.png');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ════════════════════════════════════
   NAV
════════════════════════════════════ */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  box-shadow: 0 1px 0 rgba(15,17,35,.06);
  position: sticky;
  top: 0;
  z-index: 300;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,95,232,.2);
}

.nav-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.3px;
}

.nav-brand-name em { color: var(--accent-md); font-style: normal; }

.nav-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-invoices {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  background: var(--accent-lt);
  border: 1px solid rgba(91,95,232,.2);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.nav-invoices:hover { background: #e0e1ff; border-color: rgba(91,95,232,.35); }

.nav-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }

.nav-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  background: none;
  border: 1px solid transparent;
  color: var(--sub);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.nav-logout:hover { color: var(--red); background: var(--red-bg); border-color: var(--red-bd); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--accent);
}

.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15,17,35,.08);
  position: sticky;
  top: 58px;
  z-index: 299;
}

.nav-drawer.open { display: flex; }

.nav-drawer a, .nav-drawer button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  text-align: left;
}

.nav-drawer a:hover { background: var(--accent-lt); color: var(--accent-dk); }
.nav-drawer button:hover { background: var(--red-bg); color: var(--red); }

/* ════════════════════════════════════
   PAGE LAYOUT
════════════════════════════════════ */
.ov-main {
  flex: 1;
  max-width: 70%;
  margin: 0 auto;
  padding: 32px 20px 80px;
  width: 100%;
}

.plan-main {
  flex: 1;
  max-width: 70%;
  margin: 0 auto;
  padding: 32px 40px 80px;
  margin: 20px auto;
  width: 100%;
  background-color: var(--white);
  border-radius: var(--r-lg);
}

.suc-main {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 50px 20px 80px;
  width: 100%;
}

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.p-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh);
  margin-bottom: 24px;
}

.p-hero::before {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,95,232,.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.p-hero > * { position: relative; z-index: 1; }

.p-hero-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.p-hero-left { max-width: 520px; }

.p-hero-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.p-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.p-hero-title {
  font-family: 'DM Sans', serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
}

.p-hero-title em { font-style: italic; color: var(--accent); }

.p-hero-sub {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 32px;
}

.p-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.p-stat { padding: 0 28px; }
.p-stat:first-child { padding-left: 0; }
.p-stat + .p-stat { border-left: 1px solid var(--border); }

.p-stat-n {
  font-family: 'DM Sans', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.p-stat-n.warn { color: var(--accent); }

.p-stat-l {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

/* Flash inside hero */
.flash-success {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #15803d;
  margin-top: 20px;
  line-height: 1.5;
  max-width: 560px;
}

/* Steps card (hero right) */
.p-steps-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-md);
  min-width: 340px;
  max-width: 360px;
}

.p-steps-eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.p-step { display: flex; gap: 12px; }

.p-step-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.p-step-dot.done { background: var(--accent); color: white; }
.p-step-dot.active { background: var(--accent-lt); color: var(--accent); border: 1.5px solid var(--accent); }
.p-step-dot.todo { background: rgba(15,17,35,.05); color: var(--muted); }

.p-step-line {
  width: 1.5px;
  flex: 1;
  min-height: 14px;
  background: var(--border);
  margin: 4px 0;
}

.p-step-body { padding-bottom: 14px; }
.p-step:last-child .p-step-body { padding-bottom: 0; }

.p-step-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 22px;
  margin-bottom: 1px;
}

.p-step-title.muted { color: var(--muted); font-weight: 400; }

.p-step-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ════════════════════════════════════
   BRAND BLOCKS
════════════════════════════════════ */
.brand-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}

.brand-block:hover {
  box-shadow: var(--sh-md);
  border-color: #d0d4e8;
}

.brand-hdr {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
  flex-wrap: wrap;
}

.brand-inf { flex: 1; min-width: 0; }

.logo-box {
  height: 70px;
  width: 200px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-box img {
  max-height: 70px;
  max-width: 250px;
  object-fit: contain;
  display: block;
  width: 100%;
}

.brand-pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--accent-lt);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════
   INVOICE TABLE
════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch;padding: 10px 30px; }

table.inv {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

table.inv thead tr { background: #fafbfd; }

table.inv th {
  padding: 10px 20px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.inv td {
  padding: 13px 20px;
  border-bottom: 1px solid #f3f4f9;
  font-size: 13px;
  vertical-align: middle;
  color: var(--text);
}

table.inv tr:last-child td { border-bottom: none; }
table.inv tbody tr:hover td { background: #f8f9fd; }

.dt { color: var(--sub); font-size: 12.5px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.b-ov { background: var(--amber-bg); color: var(--amber); }
.b-up { background: var(--red-bg); color: var(--red); }
.b-rm { background: var(--accent-lt); color: var(--accent); }

.am { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ams { font-size: 11.5px; color: var(--sub); margin-top: 2px; }
.amd { font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* ════════════════════════════════════
   TOTAL BAR
════════════════════════════════════ */
.total-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: #fafbfd;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tot-l .tlbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.tot-l .tamt {
  font-family: 'DM Sans', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.tamt span { font-size: 13px; color: var(--sub); margin-left: 3px; }

.tot-chip--rec {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tot-chip--rec .tlbl {
  margin-bottom: 0;
}

/* ── CTA buttons ── */
.btn-prop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(91,95,232,.3);
  transition: background .15s, box-shadow .15s, transform .15s;
}

.btn-prop:hover {
  background: var(--accent-dk);
  box-shadow: 0 4px 16px rgba(91,95,232,.4);
}

.btn-prop:active { transform: scale(.98); }

.btn-sent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
}

.chk-ico {
  width: 18px;
  height: 18px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plan-unavailable {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sub);
  background: #f8f9fc;
  border: 1px dashed #d8dce8;
  border-radius: 8px;
  padding: 9px 14px;
  max-width: 340px;
  line-height: 1.5;
}

/* ════════════════════════════════════
   GRAND TOTAL
════════════════════════════════════ */
.grand-total {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--sh);
}

.gt-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.gt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: var(--accent-lt);
  color: var(--accent);
}

.gt-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.gt-amt {
  font-family: 'DM Sans', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.gt-amt-sub { font-size: 11px; color: var(--muted); }

@media (max-width: 480px) {
    .grand-total {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 12px;
    }
    .gt-right {
        align-items: flex-start;
        width: 100%;
    }
    .gt-amt {
        font-size: 22px;
    }
}
/* ════════════════════════════════════
   FLASH / ALERTS
════════════════════════════════════ */
.int-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  color: var(--green);
  margin-top: 9px;
  line-height: 1.5;
}

/* ════════════════════════════════════
   PLAN PAGE
════════════════════════════════════ */
.back-lnk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid rgba(91,95,232,.25);
  border-radius: 8px;
  background: var(--accent-lt);
  transition: all .15s;
  margin-bottom: 20px;
}

.back-lnk:hover { background: #e0e1ff; }

.inv-strip {
  background: var(--white);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.inv-strip-l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.inv-strip-logo {
  height: 60px;
  display: flex;
  align-items: center;
}

.inv-strip-logo img {
  max-height: 70px;
  object-fit: contain;
}

.inv-strip-ref {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.inv-strip-meta { font-size: 12px; color: var(--sub); }

.badge-imp {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: .5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* S-card (info panels) */
.s-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-bottom: 16px;
  overflow: hidden;
}

.s-card-head {
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.s-ico {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s-card-head h2 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.s-body { padding: 18px 20px; }

.intro-p { font-size: 14px; line-height: 1.75; color: var(--sub); margin-bottom: 10px; }

.tip-bar {
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 11px 14px;
  font-size: 12.5px;
  color: #15803d;
  font-weight: 600;
  margin-top: 10px;
}

.debt-box {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfd;
  flex-wrap: wrap;
  gap: 12px;
}

.debt-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 3px;
}

.debt-val {
  font-family: 'DM Sans', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
}

.debt-val sup { font-size: 14px; color: var(--sub); margin-left: 3px; }

/* Form rows */
.f-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.f-row:last-child { margin-bottom: 0; }

.f-lbl {
  width: 200px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding-top: 10px;
  line-height: 1.4;
}

.f-ctrl { flex: 1; min-width: 220px; }

/* Amount input */
.amt-row { display: flex; align-items: stretch; gap: 10px; }

.amt-input-group {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}

.amt-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,95,232,.12);
}

.months-num-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  min-width: 0;
  -moz-appearance: textfield;
  font-family: 'DM Sans', serif;
}

.months-num-input::-webkit-inner-spin-button,
.months-num-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.amt-unit {
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  background: #f5f6fa;
  border-left: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Legacy amt-wrap alias */
.amt-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}

.amt-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,95,232,.12);
}

.amt-wrap input {
  flex: 1;
  border: none;
  padding: 9px 14px;
  font-family: 'DM Sans', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  min-width: 0;
  width: 100px;
}

.amt-wrap input:focus { outline: none; }

/* Par mois pill */
.par-mois-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #f8f9fc;
  padding: 10px 18px;
  min-width: 90px;
  white-space: nowrap;
}

.par-mois-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.par-mois-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  font-family: 'DM Sans', serif;
}

/* Slider */
.slider-wrap { margin-top: 14px; position: relative; }

input[type=range],
.months-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--pct, 33%),
    #e4e6f0 var(--pct, 33%),
    #e4e6f0 100%
  );
}

input[type=range]::-webkit-slider-thumb,
.months-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(91,95,232,.4);
  cursor: pointer;
  transition: transform .15s;
}

input[type=range]::-webkit-slider-thumb:hover,
.months-range::-webkit-slider-thumb:hover { transform: scale(1.15); }

input[type=range]::-moz-range-thumb,
.months-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(91,95,232,.4);
  cursor: pointer;
}

.sl-lbls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  position: relative;
}

.sl-sug {
  position: absolute;
  transform: translateX(-50%);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.sl-sug-center { font-weight: 600; color: var(--accent); }
.ctrl-hint { margin-top: 5px; font-size: 12px; color: var(--muted); }

/* Date chip */
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-lt);
  border: 1px solid rgba(91,95,232,.2);
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dk);
}

/* Plan table */
.ptbl-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
}

table.ptbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 380px;
}

table.ptbl thead tr{background:var(--brand)}

table.ptbl th {
  padding: 10px 16px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  color: #fff;
  text-align: left;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .3px;
}

table.ptbl td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f2f8;
  color: var(--text);
}

table.ptbl tbody tr:nth-child(even) td { background: #fafbfd; }
table.ptbl tbody tr:last-child td { border-bottom: none; }

table.ptbl tbody td:first-child {
  color: var(--muted);
  font-weight: 600;
}

table.ptbl tfoot tr {
  background: #fafbfd;
  border-top: 2px solid var(--border);
}

table.ptbl tfoot td {
  padding: 11px 16px;
  font-weight: 700;
  color: var(--text);
}

table.ptbl .tot-row td {
  background: var(--accent-lt) !important;
  font-weight: 700;
  border-top: 2px solid rgba(91,95,232,.2);
  color: var(--accent-dk);
}

.rn {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--accent-lt);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Summary pills */
.sum-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.sum-pill {
  flex: 1;
  min-width: 80px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbfd;
  text-align: center;
}

.sp-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sp-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: 'DM Sans', serif;
}

.sp-val.green { color: var(--green); }

/* Action bar */
.act-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.act-info { font-size: 12px; color: var(--sub); }
.act-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-cancel {
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}

.btn-cancel:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

.btn-accept {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 2px 8px rgba(91,95,232,.3);
}

.btn-accept:hover { background: var(--accent-dk); box-shadow: 0 4px 16px rgba(91,95,232,.4); }
.btn-accept:active { transform: scale(.98); }

/* ════════════════════════════════════
   SUCCESS PAGE
════════════════════════════════════ */
.suc-card {
  background: var(--white);
  border: 1px solid var(--green-bd);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(22,163,74,.1);
  overflow: hidden;
}

.suc-head {
  background: var(--green);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.suc-circle {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: popIn .4s cubic-bezier(.22,.68,0,1.4) .1s both;
}

.suc-head h2 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.suc-head p { font-size: 13px; color: rgba(255,255,255,.8); }

.suc-body { padding: 22px; }
.suc-body > p { font-size: 14px; line-height: 1.75; color: var(--sub); margin-bottom: 10px; }

.suc-summary {
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-radius: 10px;
  padding: 4px 0;
  margin: 16px 0;
}

.ss-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--green-bd);
  font-size: 13px;
  gap: 12px;
  flex-wrap: wrap;
}

.ss-row:last-child { border-bottom: none; }
.ss-lbl { color: var(--sub); font-weight: 500; }
.ss-val { font-weight: 700; font-size: 14px; color: var(--text); }
.ss-val.green { color: var(--green); }

.btn-done {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(91,95,232,.3);
  transition: all .15s;
}

.btn-done:hover { background: var(--accent-dk); box-shadow: 0 4px 16px rgba(91,95,232,.4); }

/* ════════════════════════════════════
   LOGIN
════════════════════════════════════ */
.login-hero {
  background: linear-gradient(135deg, var(--accent) 0%, #8487ee 100%);
  padding: 56px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M26 0l26 26-26 26L0 26z'/%3E%3C/g%3E%3C/svg%3E");
}

.login-hero h1 { font-size: 26px; font-weight: 700; color: #fff; position: relative; margin-bottom: 8px; }
.login-hero p { color: rgba(255,255,255,.78); font-size: 14px; position: relative; line-height: 1.6; }

.login-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 36px 16px 80px; }

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  animation: rise .4s cubic-bezier(.22,.68,0,1.2) both;
}

.card-head {
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-ico {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-head h2 { font-size: 13.5px; font-weight: 700; color: var(--text); }

.card-body { padding: 22px 20px; }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.req { color: var(--red); }

.field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,95,232,.12);
}

.field input::placeholder { color: #c0c4d6; }

.error { color: var(--red); font-size: 12px; margin-top: 4px; }

.submit-btn {
  width: 100%;
  height: 46px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(91,95,232,.3);
  transition: background .15s, box-shadow .15s;
}

.submit-btn:hover { background: var(--accent-dk); box-shadow: 0 4px 16px rgba(91,95,232,.4); }

/* ════════════════════════════════════
   MISC
════════════════════════════════════ */
/* Support button */
.support-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(91,95,232,.35);
  transition: all .2s ease;
  z-index: 9999;
}

.support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(91,95,232,.45);
  background: var(--accent-dk);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 11px 22px;
  border-radius: 40px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(15,17,35,.25);
  z-index: 9999;
  opacity: 0;
  transition: all .3s cubic-bezier(.22,.68,0,1.2);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Footer */
footer {
  text-align: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  background: var(--white);
  margin-top: auto;
}

/* ════════════════════════════════════
   ANIMATIONS
════════════════════════════════════ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 640px) {
  nav { padding: 0 16px; height: 54px; }
  .nav-r { display: none !important; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-drawer { top: 54px; }

  .ov-main, .plan-main { padding: 20px 14px 60px; max-width: 100%; }

  .p-hero { padding: 28px 24px; }
  .p-hero-grid { flex-direction: column; gap: 24px; }
  .p-hero-title { font-size: 30px; }
  .p-hero-stats { gap: 0; }
  .p-stat { padding: 0 10px; }
  .p-stat:first-child { padding-left: 0; }

  .brand-hdr { padding: 12px 16px; gap: 12px; }
  table.inv th { padding: 9px 12px; font-size: 9px; }
  table.inv td { padding: 11px 12px; font-size: 12.5px; }
  .total-bar { padding: 12px 16px; gap: 10px; }
  .tot-l .tamt { font-size: 20px; }
  .btn-prop { padding: 10px 16px; font-size: 12.5px; width: 100%; justify-content: center; }
  .btn-sent { width: 100%; justify-content: center; }
  .plan-unavailable { max-width: 100%; }
  .grand-total { padding: 16px 20px; }
  .gt-amt { font-size: 22px; }

  .f-lbl { width: 100%; padding-top: 0; }
  .f-ctrl { min-width: 0; width: 100%; }
  .f-row { flex-direction: column; gap: 6px; }
  .amt-row { flex-direction: column; }
  .par-mois-pill { flex-direction: row; gap: 8px; justify-content: flex-start; }
  .debt-val { font-size: 26px; }
  .s-body { padding: 14px; }
  .s-card-head { padding: 12px 14px; }
  .act-bar { flex-direction: column; align-items: stretch; }
  .act-btns { width: 100%; }
  .btn-cancel, .btn-accept { flex: 1; justify-content: center; }

  .suc-main { padding: 24px 14px 60px; }
  .suc-head { padding: 18px 16px; }
  .sum-pill { min-width: calc(50% - 4px); }

  .login-hero { padding: 36px 16px 46px; }
  .login-hero h1 { font-size: 22px; }
  .login-body { padding: 20px 14px 60px; }
  .card-body { padding: 18px 16px; }

    .logo-box {
        height: 60px;
        width: 120px;
        display: flex;
    }
    .logo-box img {
        max-height: 70px;
        max-width: 150px;
        object-fit: contain;
    }
}

@media (max-width: 400px) {
  .p-stat { padding: 0 14px; }
  .brand-pill { display: none; }
}

@media (max-width: 1024px) {
    .ov-main {
        max-width: 95%;
    }
    .plan-main {
        max-width: 95%;
    }
}

/* ════════════════════════════════════
   TABLE PADDING FIX
   Add this to your existing CSS
════════════════════════════════════ */

/* Indent the table inside each brand block */
.tbl-wrap {
  padding: 0 16px;
}

/* Compensate — keep inner table full-width */
table.inv {
  width: 100%;
  border-collapse: collapse;
  min-width: 488px; /* 520 - 32px padding */
}

/* Round the table itself slightly inside the padded container */
table.inv thead tr:first-child th:first-child { border-radius: 8px 0 0 0; }
table.inv thead tr:first-child th:last-child  { border-radius: 0 8px 0 0; }

/* ════════════════════════════════════
   1. URGENCY BANNER
   Shows the nearest overdue invoice
   Place above the brand blocks loop
════════════════════════════════════ */
.urgency-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  border-radius: var(--r);
  padding: 14px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.urgency-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(217,119,6,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.urgency-body { flex: 1; min-width: 0; }

.urgency-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

.urgency-sub {
  font-size: 12px;
  color: #b45309;
}

.urgency-amt {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: #92400e;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ════════════════════════════════════
   2. TIPS CARD
   Static, no backend needed
   Place below the brand blocks loop
════════════════════════════════════ */
.tips-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  margin-top: 20px;
}

.tips-card-head {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-md) 100%);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-card-head-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 1px;
}

.tips-card-head-sub {
  font-size: 11px;
  color: rgba(255,255,255,.7);
}

.tips-card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tip-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tip-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-lt);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.tip-txt {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
}

.tip-txt strong {
  color: var(--text);
  font-weight: 600;
}

/* ════════════════════════════════════
   3. SAVINGS SIMULATOR
   Place below tips card
════════════════════════════════════ */
.sim-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-top: 12px;
  overflow: hidden;
}

.sim-card-head {
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-card-head-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sim-card-body {
  padding: 18px 22px;
}

.sim-desc {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.6;
  margin-bottom: 16px;
}

.sim-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sim-tile {
  flex: 1;
  min-width: 120px;
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.sim-tile-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 6px;
}

.sim-tile-val {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.sim-tile-val.red  { color: var(--red); }
.sim-tile-val.green { color: var(--green); }

/* ════════════════════════════════════
   4. ACTIVITY TIMELINE
   Place below savings simulator
════════════════════════════════════ */
.timeline-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-top: 12px;
  overflow: hidden;
}

.timeline-card-head {
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-card-head-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.timeline-body {
  padding: 18px 22px;
}

.tl-row {
  display: flex;
  gap: 14px;
}

.tl-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.tl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tl-dot.green  { background: var(--green-bg); }
.tl-dot.blue   { background: var(--accent-lt); }
.tl-dot.amber  { background: var(--amber-bg); }
.tl-dot.gray   { background: rgba(15,17,35,.05); }

.tl-line {
  width: 1.5px;
  flex: 1;
  min-height: 12px;
  background: var(--border);
  margin: 4px 0;
}

.tl-body {
  padding-bottom: 16px;
  flex: 1;
  min-width: 0;
}

.tl-row:last-child .tl-body { padding-bottom: 0; }

.tl-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 28px;
}

.tl-sub {
  font-size: 11px;
  color: var(--sub);
  line-height: 1.5;
  margin-top: 1px;
}

.tl-date {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ════════════════════════════════════
   5. HELP STRIP
   Sticky-bottom-ish contact bar
   Place at very bottom of ov-main
════════════════════════════════════ */
.help-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 22px;
  margin-top: 20px;
  box-shadow: var(--sh);
  flex-wrap: wrap;
}

.help-strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.help-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.help-sub { font-size: 12px; color: var(--sub); }

.help-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid rgba(91,95,232,.2);
  border-radius: 7px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
  display: inline-block;
}

.help-btn:hover { background: #e0e1ff; }

/* ════════════════════════════════════
   RESPONSIVE PATCHES
════════════════════════════════════ */
@media (max-width: 640px) {
  .tbl-wrap { padding: 0 10px; }
  .urgency-banner { padding: 12px 14px; }
  .urgency-amt { font-size: 18px; }
  .sim-grid { flex-direction: column; }
  .sim-tile { min-width: 0; }
  .help-strip { flex-direction: column; align-items: flex-start; }
  .tips-card-body { padding: 14px 16px; }
  .timeline-body { padding: 14px 16px; }
}

/* ════════════════════════════════════════════════════════
   LAYOUT ADDITIONS — append to apurement-modern.css
   ════════════════════════════════════════════════════════ */

/* ── Hero: left column stacks title + stats with space-between ── */
.p-hero-grid {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
}

.p-hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 520px;
}

.p-hero-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  align-self: center;
}

/* Stats sit at the bottom of the left column */
.p-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 0; /* controlled by flex space-between */
}

/* Remove the <br><br> gap — handle spacing via margin-bottom on hero */
.p-hero { margin-bottom: 16px; }

/* Step title muted variant */
.p-step-title.muted {
  color: var(--muted);
  font-weight: 400;
}

/* ── Urgency banner ── */
.urgency-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
  border-radius: var(--r);
  padding: 13px 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.urgency-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(217,119,6,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.urgency-body { flex: 1; min-width: 0; }

.urgency-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

.urgency-sub { font-size: 11.5px; color: #b45309; }

.urgency-amt {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: #92400e;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Table padding (inset rows from card edges) ── */
.tbl-wrap {
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Bottom 2-col grid ── */
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

/* ── Info cards (shared by all 4 bottom cards) ── */
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  overflow: hidden;
}

.info-card-head {
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.info-card-body { padding: 16px 18px; }

.info-card-desc {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Tips rows */
.btip-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.btip-row:last-child { margin-bottom: 0; }

.btip-n {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-lt);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.btip-t {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.55;
}

.btip-t strong { color: var(--text); font-weight: 600; }

/* Savings simulator */
.sim-grid {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.sim-tile {
  flex: 1;
  min-width: 80px;
  background: #f8f9fc;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
}

.sim-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 5px;
}

.sim-val {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.sim-val--red  { color: var(--red); }
.sim-val--green { color: var(--green); }

/* Timeline */
.tl-row {
  display: flex;
  gap: 10px;
}

.tl-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.tl-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tl-dot--blue  { background: var(--accent-lt); }
.tl-dot--amber { background: var(--amber-bg); }
.tl-dot--gray  { background: rgba(15,17,35,.05); }

.tl-line {
  width: 1.5px;
  flex: 1;
  min-height: 10px;
  background: var(--border);
  margin: 3px 0;
}

.tl-body {
  padding-bottom: 14px;
  flex: 1;
  min-width: 0;
}

.tl-row:last-child .tl-body { padding-bottom: 0; }

.tl-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 26px;
}

.tl-sub  { font-size: 11px; color: var(--sub); line-height: 1.4; }
.tl-date { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Help card CTAs */
.help-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid rgba(91,95,232,.2);
  border-radius: 7px;
  padding: 7px 14px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}

.help-cta-btn:hover { background: #e0e1ff; }

.help-cta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-bd);
  border-radius: 7px;
  padding: 7px 14px;
  white-space: nowrap;
}

.help-contact-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .p-hero-grid { flex-direction: column; gap: 24px; }
  .p-hero-left { max-width: 100%; }
  .p-hero-right { max-width: 100%; width: 100%; align-items: left; align-self: left;}
  .p-steps-card { max-width: 100%; min-width: 0; width: 100%;text-align: left; }
  .urgency-banner { padding: 11px 14px; gap: 10px; }
  .urgency-amt { font-size: 17px; }
  .tbl-wrap { padding: 0 10px; }
  .sim-grid { flex-direction: column; }
  .bottom-grid { margin-top: 12px; }
}

/* ════════════════════════════════════════════════════════
   INVOICE CARDS — improved separation + responsive grid
   ════════════════════════════════════════════════════════ */

.inv-cards {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: single column */
  gap: 12px;
  padding: 16px;
}

/* Each invoice = one card — now a proper card with shadow */
.inv-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .15s;
}

.inv-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.10);
  transform: translateY(-1px);
}

/* ── Row 1: Reference + Badge ── */
.inv-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);  /* separates ref from data */
}

.inv-card-ref {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.1px;
}

/* ── 2-col grid (dates row + amounts row) ── */
.inv-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.inv-card-cell {
  padding-right: 14px;
}

.inv-card-cell--right {
  padding-right: 0;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.inv-card-lbl {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.inv-card-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.inv-card-val--warn   { color: var(--amber); }
.inv-card-val--accent { color: var(--accent); font-size: 15px; }

.inv-card-paid {
  font-size: 11px;
  color: var(--sub);
  margin-top: 2px;
}

/* ── Divider between dates and amounts rows ── */
.inv-card-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ── Remove old tbl-wrap padding ── */
.tbl-wrap {
  padding: 0;
  overflow-x: visible;
}



.inv-cards {
  display: grid;
  /* Cards stay between 280px–340px, as many columns as fit */
  grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
  gap: 14px;
  padding: 20px 24px;
  justify-content: start;   /* left-align the grid, no stretching */
}


/* Mobile: show cards, hide table */
.tbl-wrap { display: none; }
.inv-cards { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; }

/* Desktop: show table, hide cards */
@media (min-width: 768px) {
  .tbl-wrap { display: block; }
  .inv-cards { display: none; }
}


.tbl-wrap { padding: 20px 30px;}
.inv { 
    border: 1px solid var(--border-table-inv);
    box-shadow: 0 1px 0 rgba(15,17,35,.06);
    border-radius: 10px;
}

/* ── Language switcher dropdown ─────────────────────── */
.lang-switcher {
    position: relative;
}
.lang-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border, #e2e4ed);
    background: transparent;
    color: var(--muted, #8b90a8);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.lang-trigger:hover {
    background: var(--surface, #f4f5f9);
    color: var(--text, #1a1c2e);
}
.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: var(--bg, #fff);
    border: 1px solid var(--border, #e2e4ed);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 4px;
    z-index: 999;
}
.lang-switcher:focus-within .lang-dropdown,
.lang-switcher.open .lang-dropdown {
    display: block;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--text, #1a1c2e);
    text-decoration: none;
    transition: background 0.12s;
}
.lang-option:hover {
    background: var(--surface, #f4f5f9);
}
.lang-option.active {
    font-weight: 700;
    color: var(--brand, #5b6cf8);
}
.lang-option .lang-flag {
    font-size: 16px;
    line-height: 1;
}
/* ── Drawer language select ─────────────────────── */
.drawer-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--muted, #8b90a8);
    width: 100%;
}

.drawer-lang svg {
    flex-shrink: 0;
    color: var(--muted, #8b90a8);
}

.drawer-lang select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--surface, #f4f5f9);
    border: 1px solid var(--border, #e2e4ed);
    border-radius: 8px;
    padding: 5px 24px 5px 8px;
    font-size: 12px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    color: var(--text, #1a1c2e);
    cursor: pointer;
    line-height: 1.3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b90a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 10px;
}

.drawer-lang select:focus {
    outline: none;
    border-color: var(--brand, #5b6cf8);
}
/* ── SweetAlert2 — app theme ────────────────────────── */
.swal-apurement {
    border-radius: 18px !important;
    padding: 0 !important;
    background: var(--white) !important;
    box-shadow: 0 8px 32px rgba(15,17,35,.14), 0 2px 8px rgba(15,17,35,.08) !important;
    font-family: 'DM Sans', sans-serif !important;
    border: 1px solid var(--border) !important;
    overflow: hidden !important;
    width: 420px !important;
    max-width: 92vw !important;
}

/* Coloured top bar */
.swal-apurement::before {
    content: '';
    display: block;
    height: 4px;
    width: 100%;
}

.swal2-header {
    padding: 28px 28px 0 !important;
}

.swal2-title {
    font-family: 'Nunito', sans-serif !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    color: var(--text) !important;
    padding: 0 !important;
    margin: 5 !important;
    text-align: center !important;
    letter-spacing: -.01em !important;
}

.swal2-html-container {
    margin: 0 !important;
    padding: 20px 28px 0 !important;
    font-size: 14px !important;
    color: var(--text) !important;
    text-align: left !important;
}

/* Actions */
.swal2-actions {
    padding: 20px 28px 28px !important;
    margin: 0 !important;
    gap: 10px !important;
    justify-content: stretch !important;
    flex-direction: row !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.swal2-confirm,
.swal2-cancel {
    flex: 1 !important;
    margin: 0 !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all .15s !important;
    letter-spacing: .01em !important;
}

.swal2-confirm {
    background: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(86,88,177,.4) !important;
}
.swal2-confirm:hover {
    background: var(--accent-dk) !important;
    box-shadow: 0 6px 18px rgba(86,88,177,.45) !important;
    transform: translateY(-1px) !important;
}
.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(86,88,177,.25) !important;
}

.swal2-cancel {
    background: var(--white) !important;
    color: var(--sub) !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: none !important;
}
.swal2-cancel:hover {
    background: var(--bg) !important;
    color: var(--text) !important;
    border-color: var(--accent-md) !important;
}

/* Backdrop */
.swal2-backdrop-show {
    background: rgba(15,17,35,.45) !important;
    backdrop-filter: blur(3px) !important;
}