/*
  PROPOSAL 1 — Warm Terracotta & Deep Teal
  Faithfully follows proposal-3 design system
  Accent: Terra-cotta primary, Teal secondary
  Fonts: Cormorant Garamond (serif) + Space Grotesk (sans)
*/

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  --cream:       #faf7f2;
  --cream-100:   #f4ede1;
  --cream-200:   #e8ddd0;
  --cream-300:   #d9cab8;

  --terra-600:   #c4440c;
  --terra-500:   #d4571c;
  --terra-400:   #e06b33;
  --terra-300:   #e8855a;
  --terra-100:   #fae5d8;

  --teal-900:    #0d2b2a;
  --teal-800:    #123736;
  --teal-700:    #194a47;
  --teal-600:    #1f5e5a;
  --teal-500:    #28756f;
  --teal-400:    #369087;
  --teal-300:    #60b3aa;
  --teal-100:    #d4efed;

  --brown-900:   #2a1a0e;
  --brown-700:   #4a2e18;
  --brown-500:   #6b4226;
  --brown-400:   #8a5c38;

  --white:       #ffffff;
  --text-dark:   #1e1409;
  --text-mid:    #5a4030;
  --text-light:  #8a7060;

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Space Grotesk', system-ui, sans-serif;

  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-soft:      cubic-bezier(0.4, 0, 0.2, 1);

  --section-pad:   clamp(4rem, 8vw, 7rem);
  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);

  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   28px;
  --radius-pill: 100px;

  --shadow-warm: 0 4px 24px rgba(100,50,20,0.12), 0 1px 4px rgba(100,50,20,0.06);
  --shadow-lift: 0 12px 48px rgba(100,50,20,0.14), 0 4px 16px rgba(100,50,20,0.08);
  --shadow-card: 0 2px 12px rgba(100,50,20,0.08);
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-mid);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ============================================================
   NAVIGATION
============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.45s var(--ease-out-quart),
              padding 0.45s var(--ease-out-quart),
              box-shadow 0.45s ease;
}
.nav.scrolled {
  background: rgba(250,247,242,0.96);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 var(--cream-200), 0 4px 20px rgba(100,50,20,0.08);
}
.nav__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.nav__logo {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.25);
}
.nav.scrolled .nav__logo { border-color: var(--cream-200); }
.nav__brand-text { line-height: 1.2; }
.nav__name {
  font-family: var(--font-serif);
  font-size: 1.1rem; font-weight: 600;
  color: var(--white);
  transition: color 0.3s;
}
.nav.scrolled .nav__name { color: var(--teal-800); }
.nav__sub {
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}
.nav.scrolled .nav__sub { color: var(--text-light); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav__links a {
  font-size: 0.82rem; font-weight: 500;
  color: rgba(255,255,255,0.82);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav.scrolled .nav__links a { color: var(--text-mid); }
.nav__links a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav.scrolled .nav__links a:hover { color: var(--terra-500); background: var(--terra-100); }
.nav__links a.active { color: var(--terra-300) !important; }
.nav.scrolled .nav__links a.active { color: var(--terra-600) !important; }
.nav__cta {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem; font-weight: 600;
  color: var(--white) !important;
  background: var(--terra-500);
  padding: 0.6rem 1.35rem;
  border-radius: var(--radius-pill);
  transition: background 0.2s, transform 0.2s var(--ease-out-expo), box-shadow 0.2s;
  box-shadow: 0 3px 14px rgba(212,87,28,0.35);
}
.nav__cta:hover {
  background: var(--terra-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,87,28,0.45);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: background 0.3s, transform 0.3s;
}
.nav.scrolled .nav__toggle span { background: var(--teal-700); }

/* ============================================================
   PAGE HERO (authenticated pages)
============================================================ */
.page-hero {
  padding: 7rem 0 3.5rem;
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 60%, var(--teal-600) 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(212,87,28,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero__waves {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  overflow: hidden;
  line-height: 0;
}
.page-hero__inner { position: relative; z-index: 2; }
.page-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}
.page-hero__kicker-line {
  width: 28px; height: 2px;
  background: var(--terra-400); border-radius: 2px;
}
.page-hero__kicker-text {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terra-300);
}
.page-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600; line-height: 1.1;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.page-hero__title em { font-style: italic; color: var(--teal-300); }

/* ============================================================
   LOGIN PAGE
============================================================ */
.login-page-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--container-pad);
  position: relative;
  overflow: hidden;
}
.login-page-wrap::before {
  content: '';
  position: absolute;
  top: -10%; right: -5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(212,87,28,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.login-brand__logo {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  padding: 6px;
}
.login-brand__name {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 600;
  color: var(--white);
  text-align: center;
}
.login-brand__sub {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.15);
}
.login-card__title {
  font-family: var(--font-serif);
  font-size: 1.75rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.375rem;
}
.login-card__sub {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1.75rem;
}

/* ============================================================
   FORM ELEMENTS
============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.5rem;
}
.form-input {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  border: 1.5px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(40,117,111,0.12);
  background: var(--white);
}
.form-input::placeholder { color: var(--text-light); opacity: 0.7; }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 100px; }

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}
.form-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--teal-600);
  cursor: pointer;
  flex-shrink: 0;
}
.form-checkbox label {
  font-size: 0.875rem;
  color: var(--text-mid);
  cursor: pointer;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-pill);
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-quart);
  border: none;
  text-decoration: none;
}
.btn--terra {
  background: var(--terra-500);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(212,87,28,0.38);
}
.btn--terra:hover {
  background: var(--terra-600);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(212,87,28,0.48);
}
.btn--teal {
  background: var(--teal-600);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(31,94,90,0.35);
}
.btn--teal:hover {
  background: var(--teal-700);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(31,94,90,0.45);
}
.btn--outline {
  background: transparent;
  color: var(--teal-700);
  border: 1.5px solid var(--teal-500);
}
.btn--outline:hover {
  background: var(--teal-100);
  transform: translateY(-2px);
}
.btn--outline.btn--active {
  background: var(--teal-700);
  color: #fff;
  border-color: var(--teal-700);
}
.btn--ghost {
  background: transparent;
  color: var(--terra-500);
  border: none;
  padding: 0.5rem 0;
  border-radius: 0;
  font-size: 0.875rem;
}
.btn--ghost:hover { color: var(--terra-600); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.6rem 1.25rem; font-size: 0.8rem; }

/* Login-specific button */
.btn-login {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: var(--terra-500);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.9rem 2rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(212,87,28,0.38);
}
.btn-login:hover {
  background: var(--terra-600);
  transform: translateY(-2px);
  box-shadow: 0 7px 28px rgba(212,87,28,0.48);
}
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ============================================================
   ALERTS
============================================================ */
.alert {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.alert--info { background: var(--teal-100); color: var(--teal-800); }
.alert--success { background: #d4f0e4; color: #1a5c38; }
.alert--warning { background: #fef3cd; color: #7a4f10; }
.alert--danger { background: #fde8e8; color: #7a1a1a; }

/* ============================================================
   ACCOUNT HEADER (used on authenticated pages)
============================================================ */
.acct-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.acct-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-warm);
}
.acct-card__label {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--terra-500);
  margin-bottom: 0.5rem;
}
.acct-card__title {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.acct-card__sub {
  font-size: 0.85rem;
  color: var(--text-light);
  overflow-wrap: break-word;
  word-break: break-all;
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

/* Balance card */
.balance-wrap { display: flex; flex-direction: column; gap: 1rem; }
.balance-item {}
.balance-item__label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.balance-item__amount {
  font-family: var(--font-sans);
  font-size: 1.9rem; font-weight: 700;
  color: var(--teal-700);
  line-height: 1;
  letter-spacing: -0.02em;
}
.balance-item__amount.negative {
  color: #c0392b;
}

/* Controls card */
.controls-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.controls-meta { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.controls-meta__item { font-size: 0.85rem; color: var(--text-light); }
.controls-meta__item strong { color: var(--text-mid); }

/* Year toggle — fancy switch */
.year-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.year-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  position: relative;
  width: 44px; height: 24px;
  background: var(--teal-200);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease;
  flex-shrink: 0;
  outline: none;
}
.year-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.25s ease;
}
.year-toggle input[type="checkbox"]:checked {
  background: var(--teal-600);
}
.year-toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}
.year-toggle label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
}

/* ============================================================
   STATEMENT TABLE (Fresh Design)
============================================================ */
.statement-section { margin-bottom: 2rem; }
.statement-section__title {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cream-200);
}
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-warm); }
.stmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--white);
}
.stmt-table thead tr {
  background: var(--teal-800);
}
.stmt-table thead th {
  padding: 1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  text-align: left;
  white-space: nowrap;
}
.stmt-table thead th.align-right { text-align: right; }
.stmt-table tbody tr {
  border-bottom: 1px solid var(--cream-200);
  transition: background 0.15s;
}
.stmt-table tbody tr:hover { background: var(--cream); }
.stmt-table tbody tr:last-child { border-bottom: none; }
.stmt-table tbody td {
  padding: 0.875rem 1.25rem;
  color: var(--text-mid);
  vertical-align: middle;
}
.stmt-table tbody td.align-right { text-align: right; }
.stmt-table .cell-negative { color: #c0392b; font-weight: 600; }
.stmt-table .cell-positive { color: var(--teal-700); font-weight: 600; }

/* Row color coding via inline style but mapped to CSS variables */
.stmt-table .row-payment { background: rgba(212,87,28,0.06); }
.stmt-table .row-charge { background: rgba(13,43,42,0.04); }

/* Type badge */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--cream-100);
  color: var(--text-mid);
}

/* Outstanding bills */
.outstanding-header {
  background: #fde8e8;
  border: 1.5px solid #e8b4b4;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #7a1a1a;
  font-weight: 600;
}
.outstanding-header::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
}

/* ============================================================
   SECTION / INFO PANEL
============================================================ */
.info-panel {
  background: var(--teal-800);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}
.info-panel__title {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.info-panel__body {
  font-size: 0.88rem; line-height: 1.72;
  color: rgba(255,255,255,0.65);
}
.info-panel__body p { margin-bottom: 0.5rem; }
.info-panel__actions { margin-top: 1.25rem; }

/* ============================================================
   APP PROMO BANNER
============================================================ */
.app-promo {
  background: var(--cream-100);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  box-shadow: var(--shadow-card);
}
.app-promo__text-title {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.app-promo__text-sub {
  font-size: 0.875rem;
  color: var(--text-light);
}
.app-promo__badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   PAYMENT PAGE
============================================================ */
.payment-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.payment-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-warm);
}
.payment-card__heading {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.payment-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.payment-step {
  font-size: 0.8rem; font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--cream-100);
  color: var(--text-light);
}
.payment-step.active {
  background: var(--terra-100);
  color: var(--terra-600);
}
.payment-step-sep { color: var(--cream-300); }

.suggested-amount {
  background: var(--teal-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--teal-800);
}
.suggested-amount strong { font-size: 1.1rem; }

.review-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.review-table td { padding: 0.75rem 0; border-bottom: 1px solid var(--cream-200); font-size: 0.9rem; }
.review-table td:first-child { color: var(--text-light); font-weight: 600; width: 40%; }
.review-table td:last-child { color: var(--text-dark); }

.alt-payment-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-warm);
  height: fit-content;
}
.alt-payment-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--cream-200);
}
.alt-option {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-mid);
}
.alt-option__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--terra-100);
  color: var(--terra-600);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bank-block {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  margin-top: 0.625rem;
  font-size: 0.82rem;
  line-height: 1.8;
}
.bank-block strong { font-weight: 700; color: var(--text-dark); }

/* ============================================================
   PROFILE PAGE — account info grid
============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.profile-section-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-warm);
}
.profile-section-card__title {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream-200);
}
.profile-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cream-100);
  font-size: 0.875rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-row__key { color: var(--text-light); flex: 0 0 45%; font-weight: 500; }
.profile-row__val { color: var(--text-dark); flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-all; }
.status-active {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #1a6b3d;
  font-weight: 600;
}
.status-active::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #27ae60;
}

/* Service property card */
.service-prop-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-warm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  display: flex;
}
.service-prop-card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-800);
  min-width: 80px;
  padding: 1.5rem;
}
.service-prop-card__num-text {
  font-family: var(--font-serif);
  font-size: 2.5rem; font-weight: 600;
  color: var(--teal-300);
}
.service-prop-card__address {
  flex: 0 0 300px;
  padding: 1.5rem;
  border-right: 1px solid var(--cream-100);
}
.service-prop-card__address-title {
  font-family: var(--font-sans);
  font-size: 0.9rem; font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}
.service-prop-card__phone { font-size: 0.875rem; color: var(--text-light); }
.service-prop-card__services {
  flex: 1;
  padding: 1.5rem;
}
.service-prop-card__services-title {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.service-item__key { font-weight: 600; color: var(--text-mid); }
.service-item__val { color: var(--text-light); }

/* ============================================================
   PROPANE PAGE
============================================================ */
.propane-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-warm);
  margin-bottom: 2rem;
}
.propane-form-card__title {
  font-family: var(--font-serif);
  font-size: 1.4rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.date-display {
  background: var(--cream);
  border: 1.5px solid var(--cream-200);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* ============================================================
   NOTIFICATION SETTINGS
============================================================ */
.notif-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-warm);
  max-width: 640px;
  margin: 0 auto;
}
.notif-section { margin-bottom: 1.75rem; }
.notif-section__title {
  font-family: var(--font-sans);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream-200);
}
.notif-provider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

/* ============================================================
   RETRIEVE ACCOUNT
============================================================ */
.popup-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lift);
  max-width: 460px;
  margin: 2rem auto;
}
.popup-card__title {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-align: center;
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--teal-900);
  padding: 3rem 0 1.75rem;
}
.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.footer__brand { flex: 1; min-width: 200px; }
.footer__brand-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.footer__logo {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 3px;
}
.footer__brand-name {
  font-family: var(--font-serif);
  font-size: 0.95rem; font-weight: 600;
  color: var(--white);
}
.footer__tagline {
  font-size: 0.8rem; font-style: italic;
  color: rgba(255,255,255,0.38);
  font-family: var(--font-serif);
}
.footer__col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer__col-title {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: 0.4rem;
}
.footer__col a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--terra-300); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer__copy { font-size: 0.76rem; color: rgba(255,255,255,0.28); }
.footer__est {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--terra-400);
}

/* ============================================================
   AUTHENTICATED NAV (top bar for logged-in pages)
============================================================ */
.top-bar {
  background: var(--teal-900);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.top-bar__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.top-bar__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.top-bar__logo {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  padding: 3px;
}
.top-bar__name {
  font-family: var(--font-serif);
  font-size: 0.95rem; font-weight: 600;
  color: var(--white);
}
.top-bar__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.top-bar__nav a {
  font-size: 0.78rem; font-weight: 500;
  color: rgba(255,255,255,0.6);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.top-bar__nav a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.top-bar__nav a.active { color: var(--terra-300); }
.top-bar__nav a.nav-logout {
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  margin-left: 0.5rem;
}
.top-bar__nav a.nav-logout:hover { color: #f9a8a8; border-color: rgba(249,168,168,0.3); background: rgba(249,168,168,0.06); }
.top-bar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.top-bar__toggle span {
  display: block;
  width: 22px; height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,0.7);
}

/* ============================================================
   PAGE WRAPPER (authenticated)
============================================================ */
.page-wrap {
  min-height: calc(100vh - 64px);
  background: var(--cream);
  padding: 2rem 0 4rem;
}
.page-header {
  margin-bottom: 2rem;
}
.page-header__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.page-header__kicker-line { width: 24px; height: 2px; background: var(--terra-400); border-radius: 2px; }
.page-header__kicker-text {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terra-500);
}
.page-header__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.15;
}

/* ============================================================
   WAVE DIVIDER
============================================================ */
.wave-divider {
  position: relative;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}
.wave-svg {
  position: absolute;
  bottom: 0; left: 0;
  width: 200%; height: 100%;
  display: block;
}
.wave-svg--back { animation: waveFwd 14s linear infinite; }
.wave-svg--front { animation: waveFwd 9s linear infinite; }
@keyframes waveFwd {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   TYPOGRAPHY UTILS
============================================================ */
.section-label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--terra-500);
  margin-bottom: 0.75rem;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600; line-height: 1.1;
  color: var(--text-dark);
}
.section-sub {
  font-size: 0.95rem; line-height: 1.72;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* ============================================================
   MONTHLY AVERAGE TABLE
============================================================ */
.avg-panel {
  background: var(--cream-100);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
}
.avg-panel__title {
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-600);
  text-align: center;
  margin-bottom: 1.25rem;
}

/* ============================================================
   FEATURE: OUTSTANDING BANNER (feature 4)
============================================================ */
.outstanding-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fde8e8;
  border: 1.5px solid #e8b4b4;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.outstanding-banner__icon {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.outstanding-banner__content {
  flex: 1;
  font-size: 0.88rem;
  color: #7b1f1f;
  line-height: 1.5;
}
.outstanding-banner .btn--terra { flex-shrink: 0; }

/* ============================================================
   FEATURE: BALANCE SPARKLINE (feature 1)
============================================================ */
.sparkline-wrap {
  margin: 0.875rem 0 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-200);
}
.sparkline-wrap__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}
.sparkline-svg {
  display: block;
  width: 100%;
  height: 36px;
  overflow: visible;
}
.sparkline-months {
  display: flex;
  justify-content: space-between;
  margin-top: 0.2rem;
}
.sparkline-months span {
  font-size: 0.6rem;
  color: var(--text-light);
}

/* ============================================================
   FEATURE: YOY COMPARISON CELLS (feature 5)
============================================================ */
.yoy-up   { color: #c0392b; font-weight: 600; }
.yoy-down { color: var(--teal-700); font-weight: 600; }
.yoy-flat { color: var(--text-light); }

/* ============================================================
   PRINTABLE (email_astatement / printable_astatement)
============================================================ */
.print-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--white);
}
.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--teal-800);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}
.print-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.print-header__logo { width: 48px; height: 48px; }
.print-header__name {
  font-family: var(--font-serif);
  font-size: 1.3rem; font-weight: 600;
  color: var(--teal-800);
}
.print-header__meta { font-size: 0.8rem; color: var(--text-light); text-align: right; line-height: 1.7; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .payment-layout { grid-template-columns: 1fr; }
  .acct-header { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav__links, .top-bar__nav { display: none; }
  .nav__toggle, .top-bar__toggle { display: flex; }
  .nav__links.open, .top-bar__nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--teal-900);
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 999;
  }
  .nav__links.open a, .top-bar__nav.open a {
    font-size: 1.1rem; padding: 0.875rem 2rem;
    color: rgba(255,255,255,0.85);
  }
  .acct-header { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .service-prop-card { flex-direction: column; }
  .service-prop-card__address { flex: none; border-right: none; border-bottom: 1px solid var(--cream-100); }
}
@media (max-width: 480px) {
  .footer__inner { flex-direction: column; }
  .services-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   FEEDBACK MODAL
============================================================ */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feedback-modal[hidden] { display: none; }

.feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}
.feedback-modal__card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  max-width: 400px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  animation: feedback-slide-up 0.3s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes feedback-slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.feedback-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.feedback-modal__close:hover { color: var(--text-dark); background: var(--gray-100); }
.feedback-modal__icon { font-size: 2.5rem; line-height: 1; margin-bottom: 0.5rem; }
.feedback-modal__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 0.4rem;
}
.feedback-modal__sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.feedback-modal__thumbs {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.feedback-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  font-size: 2rem;
  color: var(--text-dark);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  line-height: 1;
}
.feedback-thumb span {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-muted);
}
.feedback-thumb:hover { transform: scale(1.06); }
.feedback-thumb--up:hover   { border-color: var(--teal-500); background: var(--teal-50, #f0faf9); }
.feedback-thumb--down:hover { border-color: #e67e22; background: #fef9f5; }
.feedback-modal__textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  margin-bottom: 1rem;
}
.feedback-modal__textarea:focus { border-color: var(--teal-500); }
.feedback-modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.btn--ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.btn--ghost:hover { color: var(--text-dark); background: var(--gray-100); }

/* ============================================================
   ADMIN FEEDBACK TABLE (admin.feedback.php)
============================================================ */
.feedback-admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.feedback-admin-table th { background: var(--teal-700); color: #fff; padding: 0.6rem 0.9rem; text-align: left; font-weight: 600; }
.feedback-admin-table td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.feedback-admin-table tr:hover td { background: var(--gray-50, #f9f9f9); }
.feedback-liked-yes { color: var(--teal-600); font-weight: 700; }
.feedback-liked-no  { color: #c0392b; font-weight: 700; }
