﻿* {
  box-sizing: border-box;
}

:root {
  --navy: #16324F;
  --glacier: #2E6F95;
  --ice: #E9F2F7;
  --ice2: #F5F9FB;
  --gold: #D9982F;
  --text: #22313F;
  --muted: #5B6B7A;
  --line: #D8E4EC;
  --card: #ffffff;
  --shadow: 0 2px 12px rgba(22,50,79,.08);
  --bg: var(--ice2);
  --surface: var(--card);
  --surface-soft: var(--ice2);
  --border: var(--line);
  --primary: var(--glacier);
  --primary-dark: var(--navy);
  --green: var(--glacier);
  --red: #991b1b;
  --yellow-bg: #fff9c4;
  --pink-bg: #ffebee;
  --blue-bg: #e3f2fd;
  --shadow-sm: 0 2px 8px rgba(22,50,79,.07);
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 152, 47, 0.55);
  outline-offset: 3px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  background: var(--primary-dark);
  color: white;
  padding: 14px 22px;
}

.header h1 {
  margin: 0 0 9px;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.9;
}

.nav-menu a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.footer-legal-links a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-legal-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.share-cluster {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0 auto 18px;
}

.share-cluster > span {
  color: #0f2347;
  font-size: 0.82rem;
  font-weight: 900;
}

.share-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(15, 35, 71, 0.10);
}

.share-link span {
  transform: translateY(-0.5px);
}

.share-facebook {
  background: #1877f2;
}

.share-x {
  background: #111827;
}

.share-linkedin {
  background: #0a66c2;
}

.share-pinterest {
  background: #bd081c;
}

.share-link:hover,
.share-link:focus-visible {
  opacity: 0.9;
  transform: translateY(-1px);
}

.feedback-prompt {
  margin: 12px 0 0;
  color: #53677f;
  font-size: 0.86rem;
  font-weight: 750;
}

.feedback-prompt a {
  color: #145da0;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback-prompt-card {
  padding: 14px 18px;
  border-color: #d7e6f2;
  background: linear-gradient(145deg, #ffffff, #f7fbff);
}

.feedback-prompt-card .feedback-prompt {
  margin: 0;
}

.add-bill-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 12%, rgba(34, 197, 94, 0.10), transparent 30%),
    radial-gradient(circle at 4% 0%, rgba(20, 93, 160, 0.10), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
}

.add-bill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.72), transparent 44%);
  pointer-events: none;
}

.add-bill-card > * {
  position: relative;
  z-index: 1;
}

.add-bill-card .dashboard-section-title {
  margin-bottom: 6px;
}

.add-bill-card .dashboard-section-title h3 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.add-bill-card .section-helper {
  max-width: 980px;
  color: #455d7a;
  line-height: 1.45;
}

.add-bill-card .enhanced-bill-input {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(150px, 0.7fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, 0.90);
  border-radius: 20px;
  background: rgba(255,255,255,0.76);
  box-shadow: 0 14px 28px rgba(15, 35, 71, 0.07), inset 0 1px 0 rgba(255,255,255,0.95);
}

.add-bill-card .enhanced-bill-input input,
.add-bill-card .enhanced-bill-input select {
  width: 100%;
  max-width: none;
  min-height: 46px;
  border-color: #bdd1e8;
  border-radius: 14px;
  background-color: rgba(255,255,255,0.95);
  box-shadow: 0 8px 16px rgba(15, 35, 71, 0.045);
}

.add-bill-card .enhanced-bill-input input:focus,
.add-bill-card .enhanced-bill-input select:focus {
  border-color: #145da0;
  box-shadow: 0 0 0 3px rgba(20, 93, 160, 0.13), 0 10px 18px rgba(15, 35, 71, 0.06);
}

.add-bill-card .add-bill-payment-source {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) minmax(230px, 1.45fr);
  grid-column: span 2;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(215, 230, 246, 0.95);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(248,251,255,0.80));
}

.add-bill-card .add-bill-payment-source span {
  color: #0f2347;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.add-bill-card .add-bill-payment-source small {
  color: #415a77;
  font-size: 0.78rem;
  line-height: 1.3;
}

.add-bill-card #dashboardAddBillBtn {
  margin-top: 14px;
  min-height: 42px;
  padding-inline: 18px;
  border-radius: 14px;
  box-shadow: 0 12px 22px rgba(20, 93, 160, 0.18);
}

@media (max-width: 980px) {
  .add-bill-card .enhanced-bill-input {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .add-bill-card .add-bill-payment-source {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .add-bill-card .enhanced-bill-input {
    grid-template-columns: 1fr;
    padding: 13px;
    border-radius: 18px;
  }

  .add-bill-card .add-bill-payment-source {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .add-bill-card .add-bill-payment-source span {
    white-space: normal;
  }

  .add-bill-card #dashboardAddBillBtn {
    width: 100%;
  }
}

.dashboard-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.dashboard-footer-actions .support-page-link {
  color: #047857;
}

.hero {
  background: linear-gradient(135deg, #0f2347, #1d5f9f);
  color: white;
  padding: 30px 0;
}

.hero h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  font-size: 0.98rem;
  color: #dbeafe;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.calculator-page,
.login-page,
.auth-page {
  padding: 22px 0 54px;
}

.calculator-card,
.dashboard-stat-card,
.saved-bill-card,
.paycheck-mini-card,
.login-card,
.auth-card,
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calculator-card {
  padding: 18px;
  margin-bottom: 16px;
}

.dashboard-section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.dashboard-section-title h3,
.calculator-card h3,
.login-card h2,
.auth-card h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.dashboard-help-link {
  appearance: none;
  border: 1px solid rgba(20, 93, 160, 0.18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 0;
  max-width: none;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(237, 246, 255, 0.86);
  color: #145da0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}

.dashboard-help-link:hover,
.dashboard-help-link:focus-visible {
  background: #dff0ff;
  border-color: rgba(20, 93, 160, 0.32);
  color: #0f3f73;
}

.inline-help-link {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  font-size: 0.7rem;
}

.dashboard-help-modal.hidden {
  display: none;
}

.dashboard-help-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 35, 71, 0.18);
  backdrop-filter: blur(5px);
}

.dashboard-help-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(207, 224, 243, 0.95);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: 0 22px 60px rgba(15, 35, 71, 0.18);
}

.dashboard-help-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  min-height: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  color: #145da0;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.dashboard-help-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-help-panel h3 {
  margin: 0 42px 8px 0;
  color: #0f2347;
  font-size: 1.18rem;
  line-height: 1.2;
}

.dashboard-help-panel p {
  margin: 0 0 14px;
  color: #425466;
  line-height: 1.55;
}

.dashboard-help-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #e8f1ff;
  color: #145da0;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.dashboard-help-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .dashboard-help-link {
    width: fit-content;
    max-width: 100%;
  }

  .dashboard-help-close {
    width: 34px;
    max-width: 34px;
  }

  .dashboard-help-panel {
    padding: 18px;
  }
}

.section-helper,
.calculator-card p,
.login-card p,
.auth-card p {
  color: var(--muted);
  margin-top: 8px;
}

.calculator-card ol.section-helper {
  padding-left: 1.65rem;
  margin-left: 0;
  list-style-position: outside;
}

.calculator-card ol.section-helper li {
  padding-left: 0.25rem;
}

button,
.btn,
input[type="submit"] {
  border: 0;
  border-radius: 9px;
  padding: 7px 11px;
  min-height: 34px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1.1;
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
  opacity: 0.92;
}

.secondary-btn,
.edit-bill-btn {
  background: #e8eef7;
  color: #17365d;
}

.text-btn,
.delete-btn {
  background: #fff1f2;
  color: var(--red);
}

.mark-paid-btn {
  background: var(--green);
  color: white;
}

.apply-payment-btn {
  background: var(--primary);
  color: white;
}

input,
select,
textarea {
  font: inherit;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: white;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(20, 93, 160, 0.16);
  border-color: var(--primary);
}

.bill-input,
.enhanced-bill-input,
.dashboard-actions,
.saved-bill-card-actions,
.save-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.calculator-card input,
.calculator-card select {
  max-width: 210px;
}

.dashboard-top-grid,
.compact-dashboard-grid,
.paycheck-cards-grid,
.bills-card-list {
  display: grid;
  gap: 12px;
}

.compact-dashboard-grid,
.paycheck-cards-grid {
  grid-template-columns: repeat(4, 1fr);
}

.dashboard-stat-card {
  padding: 13px;
  box-shadow: var(--shadow-sm);
}

.dashboard-stat-card span,
.saved-bill-card-grid span,
.paycheck-mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.dashboard-stat-card strong {
  display: block;
  font-size: 1.28rem;
  color: var(--primary-dark);
  letter-spacing: -0.04em;
}

.dashboard-stat-card small {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.76rem;
}

.paycheck-mini-card {
  padding: 13px;
  box-shadow: var(--shadow-sm);
}

.paycheck-mini-card-top,
.saved-bill-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.paycheck-mini-card h4,
.saved-bill-card h4 {
  margin: 0 0 3px;
  color: var(--primary-dark);
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.paycheck-mini-card p,
.saved-bill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.paycheck-mini-grid,
.saved-bill-card-grid {
  display: grid;
  gap: 6px;
}

.paycheck-mini-grid {
  grid-template-columns: repeat(3, 1fr);
}

.saved-bill-card-grid {
  grid-template-columns: repeat(4, minmax(76px, 1fr));
}

.paycheck-mini-grid div,
.saved-bill-card-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 6px 7px;
  background: var(--surface-soft);
}

.saved-bill-card-grid div:nth-child(1) {
  background: var(--pink-bg);
  border-color: #ffcdd2;
}

.saved-bill-card-grid div:nth-child(2) {
  background: var(--yellow-bg);
  border-color: #fef08a;
}

.saved-bill-card-grid div:nth-child(3) {
  background: var(--blue-bg);
  border-color: #bbdefb;
}

.saved-bill-card-grid strong,
.paycheck-mini-grid strong {
  font-size: 0.82rem;
  color: var(--primary-dark);
}

.payoff-goal-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.payoff-goal-preview div {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fbff;
}

.payoff-goal-preview span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.payoff-goal-preview strong {
  color: var(--primary-dark);
  font-size: 1rem;
}

.payoff-goal-preview p,
.payoff-goal-preview small {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.payoff-goal-warning {
  display: block;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px;
  background: #fffbeb;
}

@media (max-width: 560px) {
  .payoff-goal-preview {
    grid-template-columns: 1fr;
  }
}

.bills-workspace-card {
  padding: 18px;
}

.bills-card-list {
  gap: 8px;
}

.saved-bill-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.saved-bill-card-top {
  margin: 0;
  display: block;
}

.saved-bill-card-actions {
  margin: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 5px;
}

.saved-bill-card-actions input {
  width: 76px;
  min-width: 76px;
  padding: 6px 7px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.saved-bill-card-actions button {
  width: auto;
  white-space: nowrap;
  min-height: 30px;
  padding: 6px 8px;
  font-size: 0.7rem;
  border-radius: 8px;
}

.mini-status-pill,
.paycheck-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.66rem;
  font-weight: 900;
  background: #e8f1ff;
  color: #17457a;
}

.paycheck-one {
  background: #dcfce7;
  color: #166534;
}

.paycheck-two {
  background: #dbeafe;
  color: #1d4e89;
}

.paycheck-three {
  background: #fef3c7;
  color: #92400e;
}

.paycheck-four {
  background: #fee2e2;
  color: #991b1b;
}

.paycheck-later {
  background: #eef2f7;
  color: #334155;
}

.recommended-pill {
  background: #dcfce7;
  color: #166534;
}

.stress-meter-top,
.mini-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  margin-bottom: 8px;
}

.stress-bar {
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.stress-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--green));
  border-radius: 999px;
}

.mini-progress-wrap {
  background: var(--surface-soft);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
}

.payment-input {
  max-width: 96px;
}

.table-wrap {
  overflow-x: auto;
}

.bills-workspace-card .table-wrap,
.bills-workspace-card .compact-table-wrap,
#savedBillsTable {
  display: none !important;
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  font-size: 0.82rem;
}

th {
  background: #f8fafc;
  color: #334155;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.balance {
  font-weight: 900;
  color: var(--primary-dark);
}

.monthly-payment {
  font-weight: 900;
  color: #a16207;
}

.dashboard-empty-state {
  padding: 15px;
  border-radius: 13px;
  border: 1px dashed #cbd5e1;
  background: var(--surface-soft);
  color: #475569;
}

.login-page,
.auth-page {
  min-height: calc(100vh - 112px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-card,
.auth-card,
form.login-form,
.form-card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.login-card input,
.auth-card input,
.login-card button,
.auth-card button,
form.login-form input,
form.login-form button {
  width: 100%;
  margin-top: 8px;
}

.login-card button,
.auth-card button,
form.login-form button {
  margin-top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 980px) {
  .compact-dashboard-grid,
  .paycheck-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .saved-bill-card {
    grid-template-columns: 1fr;
  }

  .saved-bill-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .saved-bill-card-actions input,
  .saved-bill-card-actions button {
    width: auto;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1120px);
  }

  .header {
    padding: 15px 16px;
  }

  .header h1 {
    font-size: 1.3rem;
  }

  .hero {
    padding: 26px 0;
  }

  .calculator-card {
    padding: 15px;
    border-radius: 15px;
  }

  .dashboard-section-title {
    flex-direction: column;
  }

  .compact-dashboard-grid,
  .paycheck-cards-grid,
  .saved-bill-card-grid,
  .paycheck-mini-grid {
    grid-template-columns: 1fr;
  }

  .bill-input,
  .enhanced-bill-input,
  .dashboard-actions,
  .saved-bill-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  input,
  select,
  textarea,
  button,
  .payment-input,
  .calculator-card input,
  .calculator-card select {
    width: 100%;
    max-width: none;
  }
}
/* Calculator fintech refinement */
.next-move-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.next-move-card .dashboard-section-title {
  margin-bottom: 0;
}

.next-move-card > p {
  margin: 0;
}

.next-step-btn {
  min-width: 220px;
  justify-self: end;
  background: linear-gradient(135deg, #145da0, #0f3f73);
  box-shadow: 0 8px 18px rgba(20, 93, 160, 0.18);
}

.bills-ledger-card table {
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 850px;
}

.bills-ledger-card th {
  background: #f3f6fb;
  border-bottom: 0;
  padding: 10px 12px;
}

.bills-ledger-card td {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 12px;
  font-weight: 700;
}

.bills-ledger-card td:first-child {
  border-left: 1px solid #e2e8f0;
  border-radius: 12px 0 0 12px;
}

.bills-ledger-card td:last-child {
  border-right: 1px solid #e2e8f0;
  border-radius: 0 12px 12px 0;
}

.bills-ledger-card td.balance {
  background: #ffebee;
  border-color: #ffcdd2;
  color: #102033;
}

.bills-ledger-card td.monthly-payment {
  background: #fff9c4;
  border-color: #fef08a;
  color: #7c4a03;
}

.bills-ledger-card td.due-date {
  background: #e3f2fd;
  border-color: #bbdefb;
  color: #102033;
}

.bills-ledger-card .delete-btn {
  padding: 6px 10px;
  min-height: 30px;
  font-size: 0.72rem;
  border-radius: 9px;
  background: #fff1f2;
  color: #991b1b;
}

.bills-ledger-card .paycheck-badge {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Make empty ledger less awkward */
.bills-ledger-card .table-wrap {
  margin-top: 8px;
}

/* Mobile CTA stack */
@media (max-width: 760px) {
  .next-move-card {
    grid-template-columns: 1fr;
  }

  .next-step-btn {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }
}
/* Save plan modal */
.save-choice-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 35, 71, 0.55);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.save-choice-modal.show {
  display: grid;
}

.save-choice-box {
  width: min(460px, 100%);
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 35, 71, 0.28);
  padding: 24px;
}

.save-choice-box h3 {
  margin: 0 0 10px;
  color: #0f2347;
  font-size: 1.35rem;
}

.save-choice-box p {
  color: #64748b;
  margin-bottom: 18px;
}

.calculator-entry-box {
  border-color: #b9d4ef;
  box-shadow: 0 28px 80px rgba(15, 35, 71, 0.32);
}

.calculator-entry-box h3 {
  margin-bottom: 12px;
}

.calculator-entry-box p {
  color: #425466;
  font-size: 1rem;
  line-height: 1.7;
}

.save-choice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.save-choice-actions button {
  flex: 1;
}
/* Unified bill formatting, calculator + dashboard */
.saved-bill-card,
.bills-ledger-card tbody tr {
  border-radius: 14px;
}

.saved-bill-card-grid div:nth-child(1),
.bills-ledger-card td.balance {
  background: #ffebee !important;
  border-color: #ffcdd2 !important;
  color: #102033 !important;
}

.saved-bill-card-grid div:nth-child(2),
.bills-ledger-card td.monthly-payment {
  background: #fff9c4 !important;
  border-color: #fef08a !important;
  color: #7c4a03 !important;
}

.saved-bill-card-grid div:nth-child(3),
.bills-ledger-card td.due-date {
  background: #e3f2fd !important;
  border-color: #bbdefb !important;
  color: #102033 !important;
}

.saved-bill-card-grid div:nth-child(4) {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #102033 !important;
}

.saved-bill-card-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.saved-bill-card-grid span {
  color: #5f7088;
}

.saved-bill-card-grid strong {
  color: #071b38;
  font-weight: 900;
}

.saved-bill-card {
  background: linear-gradient(135deg, #ffffff, #fbfdff);
  border: 1px solid #dbe5f1;
}

.saved-bill-card h4,
.bill-name-cell {
  color: #071b38;
  font-weight: 900;
}

.saved-bill-card p {
  color: #5f7088;
  font-weight: 600;
}

.saved-bill-card-actions input,
.bills-ledger-card input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.saved-bill-card-actions button,
.bills-ledger-card button {
  font-weight: 900;
}

.bills-ledger-card .delete-btn,
.saved-bill-card .delete-btn {
  background: #fff1f2 !important;
  color: #991b1b !important;
}

.bills-ledger-card .apply-payment-btn,
.saved-bill-card .apply-payment-btn {
  background: #145da0 !important;
  color: #ffffff !important;
}

.bills-ledger-card .mark-paid-btn,
.saved-bill-card .mark-paid-btn {
  background: #16a34a !important;
  color: #ffffff !important;
}

.bills-ledger-card .edit-bill-btn,
.saved-bill-card .edit-bill-btn {
  background: #e8eef7 !important;
  color: #17365d !important;
}

/* Dashboard v3 paycheck math + visual refinement */
.setup-card {
  background:
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.12), transparent 34%),
    linear-gradient(135deg, #ffffff, #f7fbff);
}

.setup-card .dashboard-section-title h3::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #145da0, #16a34a);
}

.setup-card .bill-input {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
}

.dashboard-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #145da0, #16a34a);
  opacity: 0.9;
}

.paycheck-plan-card .dashboard-section-title {
  align-items: center;
}

.paycheck-cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.paycheck-gauge-card {
  background:
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.10), transparent 38%),
    linear-gradient(135deg, #ffffff, #fbfdff);
  border: 1px solid #dbe5f1;
}

.paycheck-gauge-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 11px;
  align-items: center;
  margin: 10px 0;
}

.paycheck-gauge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle closest-side, #ffffff 68%, transparent 70%),
    conic-gradient(#145da0 calc(var(--gauge, 0) * 1%), #e2e8f0 0);
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.paycheck-gauge span {
  font-size: 0.96rem;
  font-weight: 900;
  color: #0f2347;
}

.paycheck-gauge-copy span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paycheck-gauge-copy strong {
  display: block;
  color: #0f2347;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.paycheck-gauge-copy small {
  display: block;
  color: #64748b;
  font-weight: 700;
}

.paycheck-mini-grid div:nth-child(3) strong {
  color: #166534;
}

.paycheck-mini-grid div:nth-child(3) strong:first-letter {
  color: inherit;
}

.bill-calendar-card {
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 95% 8%, rgba(34, 197, 94, 0.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.mobile-bill-view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: min(360px, 100%);
  margin: 0 0 12px;
  padding: 7px;
  border: 1px solid #d7e5f7;
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 35, 71, 0.08);
}

.mobile-bill-view-switch button {
  width: 100% !important;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #52647c;
  font-size: 0.82rem;
  font-weight: 900;
}

.mobile-bill-view-switch button.active {
  border-color: #bcd7f6;
  background: #145da0;
  color: #ffffff;
}

body[data-mobile-bill-view="list"] #billCalendarSection,
body[data-mobile-bill-view="calendar"] #billsListSection {
  display: none;
}

body[data-mobile-bill-view="calendar"] #billCalendarSection,
body[data-mobile-bill-view="list"] #billsListSection {
  display: block;
}

.bill-calendar-card .dashboard-section-title {
  align-items: center;
  gap: 12px;
  margin: -4px -4px 8px;
  padding: 14px 14px 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(239,247,255,0.76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
}

.bill-calendar-card .section-helper {
  max-width: 520px;
  margin: 6px 0 12px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.calendar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(191, 219, 254, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(15, 35, 71, 0.06);
}

.calendar-nav-btn {
  width: auto !important;
  max-width: none !important;
  min-width: 38px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  background: #eef6ff;
  color: #12345a;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
}

.bill-calendar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.bill-calendar-summary span {
  position: relative;
  display: grid;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.86);
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239,247,255,0.82));
  box-shadow: 0 10px 20px rgba(15, 35, 71, 0.055), inset 0 1px 0 rgba(255,255,255,0.95);
  color: #51627a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.bill-calendar-summary span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #22c55e, #145da0);
  opacity: 0.78;
}

.bill-calendar-summary strong {
  display: block;
  color: #12345a;
  font-size: 1.08rem;
  line-height: 1.05;
}

.bill-calendar-shell {
  border: 1px solid #d7e5f7;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.bill-calendar-month {
  padding: 13px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,251,255,0.92));
  color: #0f2347;
  font-size: 1.02rem;
  font-weight: 900;
}

.bill-calendar-weekdays,
.bill-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.bill-calendar-weekdays span {
  padding: 8px 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.bill-calendar-day {
  min-height: 112px;
  padding: 7px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.bill-calendar-day:nth-child(7n) {
  border-right: 0;
}

.bill-calendar-day.is-empty {
  background: #f8fafc;
}

.bill-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px #145da0;
}

.bill-calendar-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.bill-calendar-day-top span {
  color: #0f2347;
  font-size: 0.82rem;
  font-weight: 900;
}

.bill-calendar-day-top small {
  border-radius: 999px;
  padding: 2px 6px;
  background: #eef6ff;
  color: #145da0;
  font-size: 0.66rem;
  font-weight: 900;
}

.bill-calendar-items {
  display: grid;
  gap: 5px;
}

.bill-calendar-item {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 0;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 5px 6px;
  background: #f8fbff;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.bill-calendar-item.is-payday {
  border-color: #bbf7d0;
  background: #f0fdf4;
  cursor: default;
}

.bill-calendar-item.is-paid {
  opacity: 0.72;
}

.bill-calendar-item span {
  overflow: hidden;
  color: #102342;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-calendar-item strong {
  color: #145da0;
  font-size: 0.7rem;
  font-weight: 900;
}

.bill-calendar-item.is-payday strong {
  color: #166534;
}

.bill-calendar-more {
  width: 100% !important;
  min-height: 24px;
  border: 1px dashed #cbdcf0;
  border-radius: 7px;
  background: #ffffff;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.bill-calendar-print-items {
  display: none;
}

.calendar-bill-sheet.hidden {
  display: none;
}

.calendar-bill-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 35, 71, 0.42);
}

.calendar-bill-sheet-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  border: 1px solid #d7e5f7;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 35, 71, 0.24);
}

.calendar-bill-sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px !important;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: #eef6ff;
  color: #12345a;
  font-size: 1.25rem;
  line-height: 1;
}

.calendar-bill-sheet-header {
  padding: 18px 18px 8px;
}

.calendar-bill-sheet-header h3 {
  margin: 2px 42px 2px 0;
  color: #0f2347;
  font-size: 1.2rem;
}

.calendar-bill-sheet-header p {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

.calendar-bill-sheet-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 12px;
}

.calendar-bill-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 14px;
}

.calendar-bill-sheet-grid div,
.calendar-bill-sheet-field,
.calendar-bill-sheet-payment {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}

.calendar-bill-sheet-grid div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
}

.calendar-bill-sheet-grid span,
.calendar-bill-sheet-field label,
.calendar-bill-sheet-payment label {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-bill-sheet-grid strong {
  color: #102342;
  font-size: 0.9rem;
}

.calendar-bill-sheet-field,
.calendar-bill-sheet-payment {
  display: grid;
  gap: 7px;
  margin: 0 18px 10px;
  padding: 10px;
}

.calendar-bill-sheet-payment > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.calendar-bill-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 18px 18px;
}

.calendar-bill-sheet-actions button {
  flex: 1;
  min-width: 96px;
}

.calendar-day-sheet-list {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.calendar-day-sheet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100% !important;
  min-height: 52px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fbff;
  color: #102342;
  text-align: left;
}

.calendar-day-sheet-item.is-payday {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.calendar-day-sheet-item span {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day-sheet-item strong {
  display: block;
  color: #102342;
  font-size: 0.92rem;
}

.calendar-day-sheet-item b {
  color: #145da0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.budget-status-card {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.stress-meter {
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

#budgetStatusBarFill {
  transition: width 0.25s ease;
}

@media (max-width: 980px) {
  .paycheck-cards-grid {
    grid-template-columns: 1fr;
  }

  .paycheck-gauge-row {
    grid-template-columns: 76px 1fr;
  }

  .calendar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .calendar-actions .calendar-nav-btn {
    width: auto !important;
    flex: 0 0 auto;
  }

  .bill-calendar-shell {
    overflow-x: auto;
  }

  .bill-calendar-summary {
    grid-template-columns: 1fr;
  }

  .bill-calendar-weekdays,
  .bill-calendar-grid {
    min-width: 760px;
  }
}

@media (max-width: 700px) {
  .mobile-bill-view-switch {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
  }

  body[data-mobile-bill-view="calendar"] #billCalendarSection {
    margin-bottom: 16px;
  }

  body[data-mobile-bill-view="calendar"] .bill-calendar-card .dashboard-section-title {
    align-items: center;
  }

  .bill-calendar-card {
    padding: 12px;
  }

  .bill-calendar-card .dashboard-section-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .bill-calendar-card .dashboard-section-title .eyebrow,
  .bill-calendar-card .section-helper {
    display: none;
  }

  .bill-calendar-card .dashboard-section-title h3 {
    font-size: 1rem;
  }

  .calendar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
    padding: 5px;
    border: 1px solid #d7e5f7;
    border-radius: 12px;
    background: #f8fbff;
  }

  .calendar-actions .calendar-nav-btn {
    min-width: 34px;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 9px;
    background: #ffffff;
    font-size: 0.72rem;
  }

  .bill-calendar-summary {
    display: flex;
    gap: 0;
    margin: 6px 0 8px;
    border: 1px solid #d7e5f7;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fbff;
  }

  .bill-calendar-summary span {
    flex: 1;
    min-width: 0;
    border: 0;
    border-right: 1px solid #d7e5f7;
    border-radius: 0;
    padding: 6px 5px;
    background: transparent;
    font-size: 0.62rem;
    text-align: center;
  }

  .bill-calendar-summary span:last-child {
    border-right: 0;
  }

  .bill-calendar-summary strong {
    font-size: 0.86rem;
  }

  .bill-calendar-month {
    padding: 8px 10px;
    font-size: 0.92rem;
  }

  .bill-calendar-weekdays span {
    padding: 6px 4px;
    font-size: 0.62rem;
  }

  .bill-calendar-shell {
    overflow-x: visible;
  }

  .bill-calendar-weekdays,
  .bill-calendar-grid {
    min-width: 0;
  }

  .bill-calendar-day {
    min-height: 68px;
    padding: 4px;
  }

  .bill-calendar-day-top {
    margin-bottom: 3px;
  }

  .bill-calendar-day-top span {
    font-size: 0.72rem;
  }

  .bill-calendar-day-top small {
    padding: 1px 4px;
    font-size: 0.56rem;
  }

  .bill-calendar-items {
    gap: 3px;
  }

  .bill-calendar-item {
    padding: 3px 4px;
    border-radius: 6px;
  }

  .bill-calendar-item span {
    font-size: 0.58rem;
  }

  .bill-calendar-item strong {
    display: none;
  }

  .bill-calendar-more {
    font-size: 0.56rem;
    min-height: 20px;
    padding: 2px 3px;
  }

  .calendar-bill-sheet {
    align-items: end;
    padding: 0;
  }

  .calendar-bill-sheet-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }

  .calendar-bill-sheet-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 12px 12px;
  }

  .calendar-bill-sheet-header,
  .calendar-bill-sheet-badges,
  .calendar-bill-sheet-actions {
    padding-left: 12px;
    padding-right: 12px;
  }

  .calendar-bill-sheet-field,
  .calendar-bill-sheet-payment {
    margin-left: 12px;
    margin-right: 12px;
  }

  .calendar-bill-sheet-payment > div {
    grid-template-columns: 1fr;
  }

  .calendar-bill-sheet-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-day-sheet-list {
    padding: 0 12px 14px;
  }
}

@media print {
  body.print-calendar-only > *:not(main),
  body.print-calendar-only main > *:not(.container),
  body.print-calendar-only main > .container > *:not(#billCalendarSection) {
    display: none !important;
  }

  body.print-calendar-only main,
  body.print-calendar-only main > .container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.print-calendar-only #billCalendarSection {
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.print-calendar-only .calendar-actions,
  body.print-calendar-only .section-helper {
    display: none !important;
  }

  body.print-calendar-only .bill-calendar-weekdays,
  body.print-calendar-only .bill-calendar-grid {
    min-width: 0;
  }

  body.print-calendar-only .bill-calendar-day {
    min-height: 92px;
    break-inside: avoid;
  }
}


/* Visual polish for Next Best Move and Quick Reminder */
.upgraded-next-move-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.10), transparent 34%),
    radial-gradient(circle at bottom right, rgba(20, 93, 160, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}

.next-move-copy-panel,
.next-move-progress-panel {
  min-width: 0;
}

.next-move-eyebrow,
.reminder-eyebrow {
  background: #e8f1ff;
  color: #17457a;
  border-color: #dbeafe;
}

.next-move-highlight-box {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(15, 35, 71, 0.05);
}

.next-move-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.10);
}

.next-move-highlight-box h4 {
  margin: 0 0 6px;
  color: #071b38;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.next-move-highlight-box p {
  margin: 0;
  color: #526780;
  font-size: 0.95rem;
  line-height: 1.45;
}

.next-move-tip-strip {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #dbeafe;
  color: #17457a;
  font-size: 0.82rem;
  font-weight: 800;
}

.next-move-progress-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #dbe5f1;
}

.next-move-progress-panel .stress-bar {
  height: 11px;
}

.next-move-progress-panel p {
  margin-bottom: 0;
}

.upgraded-reminder-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  border-color: #bfdbfe;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(255, 255, 255, 0.92)),
    #ffffff;
  box-shadow: 0 10px 28px rgba(20, 93, 160, 0.11);
}

.reminder-icon-box {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #145da0, #16a34a);
  color: #ffffff;
  font-size: 1.55rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(20, 93, 160, 0.22);
}

.reminder-content .dashboard-section-title {
  margin-bottom: 6px;
}

.reminder-content p {
  margin: 0;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 650;
}

@media (max-width: 760px) {
  .upgraded-next-move-card {
    grid-template-columns: 1fr;
  }

  .next-move-highlight-box {
    grid-template-columns: 1fr;
  }

  .next-move-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .next-move-tip-strip {
    border-radius: 14px;
  }

  .upgraded-reminder-card {
    grid-template-columns: 1fr;
  }

  .reminder-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
}

/* Dashboard v4 premium polish for top cards and Budget Setup */
.dashboard-main-card {
  background:
    radial-gradient(circle at top left, rgba(20, 93, 160, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(22, 163, 74, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #cfe0f3;
  box-shadow: 0 14px 36px rgba(15, 35, 71, 0.10);
}

.dashboard-main-card .section-helper {
  max-width: 760px;
  font-size: 0.98rem;
}

.dashboard-main-card .dashboard-stat-card {
  min-height: 108px;
  padding: 16px 16px 15px 58px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.95), transparent 42%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #d4e3f5;
  box-shadow: 0 10px 24px rgba(15, 35, 71, 0.08);
}

.dashboard-main-card .dashboard-stat-card::before {
  width: 0;
}

.dashboard-main-card .dashboard-stat-card::after {
  content: "$";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #eef6ff);
  color: #145da0;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(20, 93, 160, 0.10);
}

.dashboard-main-card .dashboard-stat-card:nth-child(2)::after {
  content: "✓";
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  color: #1d4e89;
}

.dashboard-main-card .dashboard-stat-card:nth-child(3)::after {
  content: "↘";
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
}

.dashboard-main-card .dashboard-stat-card:nth-child(4)::after {
  content: "Σ";
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  color: #6d28d9;
}

.dashboard-main-card .dashboard-stat-card strong {
  font-size: 1.42rem;
}

.setup-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-color: #cfe0f3;
  background:
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(22, 163, 74, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff, #f6fbff 58%, #eef6ff);
  box-shadow: 0 14px 34px rgba(15, 35, 71, 0.10);
}

.setup-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.72), transparent 42%);
  pointer-events: none;
}

.setup-card > * {
  position: relative;
  z-index: 1;
}

.setup-card .dashboard-section-title {
  margin-bottom: 6px;
}

.setup-card .dashboard-section-title h3 {
  font-size: 1.35rem;
}

.setup-card .section-helper {
  font-size: 0.98rem;
  max-width: 680px;
}

.setup-card .bill-input {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(150px, 190px) minmax(170px, 210px);
  width: min(100%, 980px);
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cfe0f3;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.80), 0 10px 24px rgba(15,35,71,0.06);
  backdrop-filter: blur(6px);
}

.setup-card .bill-input input,
.setup-card .bill-input select {
  max-width: none;
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border-color: #bed0e6;
  box-shadow: 0 4px 10px rgba(15, 35, 71, 0.04);
}

.setup-card .dashboard-actions {
  margin-top: 14px;
}

.setup-card .dashboard-actions button {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(20, 93, 160, 0.14);
}

.setup-card .dashboard-actions .secondary-btn {
  box-shadow: none;
}

.setup-card .paycheck-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.setup-card .paycheck-info .paycheck-badge {
  padding: 7px 11px;
  font-size: 0.72rem;
  box-shadow: 0 4px 10px rgba(15, 35, 71, 0.05);
}

.budget-status-card {
  border-color: #cfe0f3;
  box-shadow: 0 12px 30px rgba(15, 35, 71, 0.08);
}

.budget-status-card .stress-meter {
  background:
    radial-gradient(circle at right, rgba(22, 163, 74, 0.08), transparent 36%),
    linear-gradient(135deg, #ffffff, #fbfdff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.75), 0 8px 18px rgba(15,35,71,0.05);
}

.debt-progress-card {
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.10), transparent 30%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #cfe0f3;
}

@media (max-width: 760px) {
  .dashboard-main-card .dashboard-stat-card {
    padding-left: 54px;
  }

  .setup-card {
    padding: 18px;
  }

  .setup-card .bill-input {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .setup-card .dashboard-actions button {
    width: 100%;
  }
}

/* Login / auth polish */
.login-page,
.auth-page {
  background:
    radial-gradient(circle at top left, rgba(20, 93, 160, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(22, 163, 74, 0.14), transparent 30%),
    linear-gradient(135deg, #eef6ff 0%, #f8fbff 48%, #edf7f1 100%);
}

.login-card,
.auth-card,
form.login-form,
.form-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(219, 229, 241, 0.95);
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,251,255,0.94));
  box-shadow: 0 24px 70px rgba(15, 35, 71, 0.18), 0 8px 20px rgba(20, 93, 160, 0.08);
}

.login-card::before,
.auth-card::before,
form.login-form::before,
.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, #145da0, #16a34a);
}

.login-card h2,
.auth-card h2,
form.login-form h2,
.form-card h2 {
  color: #071b38;
  letter-spacing: 0;
}

.login-card p,
.auth-card p,
form.login-form p,
.form-card p {
  color: #5f7088;
  font-weight: 600;
}

.login-card input,
.auth-card input,
form.login-form input,
.form-card input {
  background: #f8fbff;
  border-color: #d8e4f2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.login-card input:focus,
.auth-card input:focus,
form.login-form input:focus,
.form-card input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(20, 93, 160, 0.12);
}

.login-card button,
.auth-card button,
form.login-form button,
.form-card button {
  background: linear-gradient(135deg, #145da0, #0f3f73);
  box-shadow: 0 12px 24px rgba(20, 93, 160, 0.2);
}

.login-card .google-auth-btn,
.auth-card .google-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 16px 0 6px;
  color: #0f2347;
  background: #ffffff;
  border: 1px solid #d8e4f2;
  box-shadow: 0 8px 18px rgba(15, 35, 71, 0.08);
}

.login-card .google-auth-btn:hover,
.auth-card .google-auth-btn:hover {
  background: #f8fbff;
}

.login-card .google-auth-btn span,
.auth-card .google-auth-btn span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #145da0;
  background: #eef6ff;
  font-weight: 900;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: #6b7d94;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d8e4f2;
}

.auth-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d8e4f2;
}

.auth-note strong {
  display: block;
  color: #0f2347;
  font-size: 0.86rem;
  font-weight: 900;
}

.auth-note p {
  margin: 5px 0 0;
  color: #6b7d94;
  font-size: 0.84rem;
  line-height: 1.55;
}

.login-card a,
.auth-card a,
form.login-form a,
.form-card a {
  color: #145da0;
  font-weight: 900;
}

@media (max-width: 640px) {
  .auth-page {
    place-items: start center;
    padding: 18px 12px 34px;
  }

  .login-card,
  .auth-card,
  form.login-form,
  .form-card {
    padding: 19px 16px;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 35, 71, 0.14);
  }

  .login-card h2,
  .auth-card h2,
  form.login-form h2,
  .form-card h2 {
    font-size: 1.12rem;
    line-height: 1.2;
  }

  .login-card .section-helper,
  .auth-card .section-helper {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .login-card .google-auth-btn,
  .auth-card .google-auth-btn,
  .login-card button,
  .auth-card button {
    min-height: 42px;
  }

  .auth-divider {
    margin: 12px 0;
    font-size: 0.72rem;
  }

  .auth-note {
    margin-top: 14px;
  }
}


/* Homepage premium refresh */
.home-body {
  background:
    radial-gradient(circle at top left, rgba(20, 93, 160, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.14), transparent 28%),
    var(--bg);
}

.home-header {
  box-shadow: 0 10px 30px rgba(15, 35, 71, 0.18);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 44px;
  background:
    linear-gradient(135deg, rgba(15, 35, 71, 0.98), rgba(20, 93, 160, 0.94)),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.18), transparent 28%);
  color: #ffffff;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -42% -10%;
  height: 280px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-3deg);
  border-radius: 50%;
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.home-hero-copy {
  max-width: 720px;
}

.home-hero h1,
.home-hero h2 {
  margin: 14px 0 12px;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.home-hero p {
  max-width: 690px;
  color: #dbeafe;
  font-size: 1.04rem;
  margin: 0;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.home-hero-actions button,
.home-main-cta button,
.home-email-form button {
  background: linear-gradient(135deg, #22c55e, #145da0);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.22);
}

.secondary-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.secondary-home-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

.home-email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding: 10px;
  width: min(530px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.home-email-form input {
  flex: 1;
  min-width: 220px;
  border-color: rgba(255, 255, 255, 0.36);
}

.home-thank-you {
  margin-top: 12px !important;
  color: #bbf7d0 !important;
  font-weight: 900;
}

.home-preview-card,
.home-app-preview-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
  box-shadow: 0 24px 80px rgba(2, 8, 23, 0.32);
  color: var(--text);
}

.home-app-preview-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(215px, 0.72fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.home-app-preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 10%, rgba(217, 152, 47, 0.24), transparent 26%),
    radial-gradient(circle at 18% 90%, rgba(46, 111, 149, 0.16), transparent 34%);
  pointer-events: none;
  opacity: 0.72;
}

.phone-shell,
.app-waitlist-copy {
  position: relative;
}

.phone-shell {
  width: min(236px, 100%);
  margin: 8px auto 0;
  padding: 6px 8px 9px;
  border-radius: 32px;
  background: linear-gradient(155deg, #10213f 0%, #1c355d 56%, #10213f 100%);
  box-shadow:
    0 18px 30px rgba(8, 18, 38, 0.18),
    0 32px 46px rgba(8, 18, 38, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: none;
}

.phone-shell::before,
.phone-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.phone-shell::before {
  left: 18px;
  right: 18px;
  bottom: -16px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(7, 18, 35, 0.28) 0%, rgba(7, 18, 35, 0) 76%);
  filter: blur(8px);
  z-index: -1;
}

.phone-shell::after {
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(120deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 18%, rgba(255,255,255,0) 34%);
}

.phone-speaker {
  width: 10px;
  height: 10px;
  margin: 7px auto 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  display: grid;
  gap: 7px;
  min-height: 286px;
  padding: 10px;
  border-radius: 26px;
  border: 1px solid rgba(210, 220, 232, 0.9);
  background:
    linear-gradient(180deg, #f8fbff, #e9f2f7);
  overflow: hidden;
}

.phone-top-row,
.phone-money-card,
.phone-bill-row,
.phone-target-card {
  border: 1px solid #d8e4ec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 50, 79, 0.08);
}

.phone-top-row {
  padding: 10px 11px;
  background: linear-gradient(135deg, #16324f, #2e6f95);
  color: #ffffff;
}

.phone-top-row span,
.phone-money-card span,
.phone-target-card span {
  display: block;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.78;
}

.phone-top-row strong {
  display: block;
  margin-top: 4px;
  font-size: 1.34rem;
}

.phone-money-card {
  padding: 9px 11px;
}

.phone-money-blue {
  border-left: 4px solid #2e6f95;
}

.phone-money-green {
  border-left: 4px solid #18a664;
}

.phone-money-card strong,
.phone-target-card strong {
  display: block;
  margin-top: 4px;
  color: #16324f;
  font-size: 1rem;
}

.phone-radial-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.phone-radial {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid #d8e4ec;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 50, 79, 0.08);
}

.phone-radial::before {
  content: "";
  width: 34px;
  height: 34px;
  grid-area: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 52%, transparent 54%),
    conic-gradient(var(--radial-color) var(--radial-value), #e6eef5 0);
}

.phone-radial span,
.phone-radial small {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}

.phone-radial span {
  align-self: center;
  color: #16324f;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
}

.phone-radial small {
  align-self: end;
  margin-bottom: 4px;
  color: #5b6b7a;
  font-size: 0.46rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-radial-one {
  --radial-color: #18a664;
  --radial-value: 62%;
}

.phone-radial-two {
  --radial-color: #2e6f95;
  --radial-value: 48%;
}

.phone-radial-three {
  --radial-color: #d9982f;
  --radial-value: 31%;
}

.phone-check-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.phone-check-strip span {
  display: block;
  padding: 6px 5px;
  border-radius: 11px;
  border: 1px solid #bdd7f2;
  background: #e8f3ff;
  color: #17457a;
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.phone-check-strip span:nth-child(1) {
  border-color: #b8f3cc;
  background: #dcfce7;
  color: #166534;
}

.phone-check-strip span:nth-child(3) {
  border-color: #f4ce90;
  background: #fff4dd;
  color: #8a4a00;
}

.phone-check-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 0.48rem;
}

.phone-dashboard-bill {
  padding: 8px;
  border: 1px solid #cfe0f6;
  border-left: 4px solid #2e6f95;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 18px rgba(22, 50, 79, 0.08);
}

.phone-snowball-bill {
  border-left-color: #18a664;
  background: linear-gradient(135deg, #f5fff8, #ffffff);
}

.phone-bill-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 5px;
}

.phone-bill-heading strong {
  color: #0f2347;
  font-size: 0.82rem;
  line-height: 1.1;
}

.phone-bill-heading span {
  padding: 4px 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #17457a;
  font-size: 0.5rem;
  font-weight: 900;
  white-space: nowrap;
}

.phone-snowball-bill .phone-bill-heading span {
  background: #bbf7d0;
  color: #166534;
}

.phone-bill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.phone-bill-badges span {
  display: inline-flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 999px;
  font-size: 0.48rem;
  font-weight: 900;
  white-space: nowrap;
}

.phone-paycheck-badge {
  background: #dbeafe;
  color: #17457a;
  border: 1px solid #b7dbfb;
}

.phone-due-badge {
  background: #ffe8ec;
  color: #a11222;
  border: 1px solid #ffc4cf;
}

.phone-bill-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.phone-bill-metrics span {
  display: block;
  padding: 5px;
  border-radius: 9px;
  border: 1px solid #d8e4ec;
  color: #51647a;
  font-size: 0.48rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-bill-metrics b {
  display: block;
  margin-top: 2px;
  color: #0f2347;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

.phone-bill-metrics .metric-balance {
  background: #ffe8ec;
  border-color: #ffc4cf;
}

.phone-bill-metrics .metric-payment {
  background: #fff7c7;
  border-color: #f5df70;
}

.phone-bill-metrics .metric-due {
  background: #dff0ff;
  border-color: #b7dbfb;
}

.phone-bill-metrics .metric-payoff {
  background: #e8fff1;
  border-color: #b8efca;
}

.phone-bill-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #22313f;
}

.phone-bill-row strong {
  color: #2e6f95;
  white-space: nowrap;
}

.phone-target-card {
  padding: 9px 11px;
  background: linear-gradient(135deg, #fffaf0, #ffffff);
  border-color: rgba(217, 152, 47, 0.38);
}

.app-waitlist-copy {
  align-self: center;
  margin-top: 0;
  padding: 26px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.78));
  box-shadow: 0 24px 60px rgba(15, 35, 71, 0.14);
  backdrop-filter: blur(8px);
}

.app-waitlist-copy h2 {
  margin: 0 0 8px;
  color: #16324f;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.app-waitlist-copy p {
  margin: 0;
  color: #41576b;
}

.app-store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.app-store-badges > .store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 188px;
  min-height: 58px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: linear-gradient(180deg, #2c2c2c, #050505);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(22, 50, 79, 0.22);
}

.store-icon {
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  line-height: 1;
}

.play-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%234285f4' d='M66 38l270 218L66 474z'/%3E%3Cpath fill='%2334a853' d='M66 38l270 218 57-55z'/%3E%3Cpath fill='%23fbbc04' d='M336 256L66 474l327-163z'/%3E%3Cpath fill='%23ea4335' d='M393 201l62 55-62 55-57-55z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 29px 29px;
}

.play-icon::before,
.play-icon::after {
  content: none;
}
.apple-icon {
  color: #ffffff;
  font-size: 2.05rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
}

.store-badge span {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.store-badge small {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.store-badge strong {
  color: #ffffff;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.store-badge em {
  position: absolute;
  right: 8px;
  top: -10px;
  padding: 3px 8px;
  border: 1px solid rgba(217, 152, 47, 0.45);
  border-radius: 999px;
  background: #fff7e7;
  color: #6f4100;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.app-waitlist-form {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
  padding: 14px 0 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
  gap: 12px;
}
.app-waitlist-form input {
  min-width: 280px;
  background: #ffffff;
  min-height: 44px;
}

.app-waitlist-form button {
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.preview-card-top {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f2347, #145da0);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(20, 93, 160, 0.24);
}

.preview-card-top span,
.preview-status-card span,
.preview-note span {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: inherit;
  opacity: 0.78;
}

.preview-card-top strong {
  display: block;
  margin-top: 5px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.preview-status-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.preview-status-card div,
.preview-progress,
.preview-note {
  padding: 13px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.preview-status-card strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 1.08rem;
}

.preview-progress,
.preview-note {
  margin-top: 12px;
}

.preview-note {
  border-left: 5px solid var(--green);
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.preview-note strong {
  display: block;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.home-feature-section {
  padding: 28px 0 56px;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-feature-card,
.home-main-cta {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
}

.home-feature-card {
  padding: 20px;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #145da0, #22c55e);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(20, 93, 160, 0.18);
}

.home-feature-card h3,
.home-main-cta h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
  letter-spacing: -0.04em;
}

.home-feature-card p,
.home-main-cta p {
  margin: 0;
  color: var(--muted);
}

.home-main-cta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 22px;
}

.home-main-cta .eyebrow {
  background: #e8f1ff;
  color: #17457a;
  border-color: #cfe0f6;
  margin-bottom: 8px;
}

/* Dashboard badge clarity */
.paycheck-badge.paycheck-one,
.paycheck-badge.paycheck-two,
.paycheck-badge.paycheck-three {
  border: 1px solid rgba(15, 35, 71, 0.08);
}

@media (max-width: 860px) {
  .home-hero-inner,
  .home-feature-grid,
  .home-main-cta {
    grid-template-columns: 1fr;
  }

  .home-main-cta {
    align-items: stretch;
  }

  .home-main-cta button {
    width: 100%;
  }

  .home-preview-card {
    max-width: 560px;
  }

  .home-app-preview-card {
    max-width: 620px;
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1fr);
  }

  .phone-shell {
    max-width: 238px;
    transform: rotate(-2.4deg) translateY(6px);
  }

  .phone-photo-frame {
    max-width: 258px;
  }
}

@media (max-width: 560px) {
  .home-hero {
    padding: 42px 0 34px;
  }

  .home-hero-actions,
  .home-email-form {
    flex-direction: column;
    align-items: stretch;
  }

  .secondary-home-link,
  .home-email-form input,
  .home-email-form button {
    width: 100%;
  }

  .preview-status-card {
    grid-template-columns: 1fr;
  }

  .home-app-preview-card {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .app-waitlist-copy {
    align-self: stretch;
    padding: 0;
  }

  .phone-shell {
    max-width: 238px;
    order: 2;
    transform: none;
  }

  .app-waitlist-copy {
    order: 1;
  }

  .app-waitlist-form input {
    min-width: 0;
  }

  .app-waitlist-form {
    grid-column: auto;
  }
}





/* Header nav layout, Dashboard as right-side action */
.header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
}

.header h1 {
  margin: 0;
  white-space: nowrap;
}

.nav-menu {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.nav-menu a,
.nav-menu button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

.dashboard-nav-action,
.nav-menu a[href="my_bills_dashboard.html"] {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #145da0);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(20, 93, 160, 0.28);
  opacity: 1;
  text-decoration: none !important;
  font-weight: 900;
}

.dashboard-nav-action:hover,
.nav-menu a[href="my_bills_dashboard.html"]:hover {
  opacity: 0.94;
  text-decoration: none;
  transform: translateY(-1px);
}

.logout-btn {
  margin-left: auto;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(153, 27, 27, 0.24);
  text-decoration: none !important;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.logout-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

@media (max-width: 700px) {
  .header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header h1 {
    white-space: normal;
  }

  .nav-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .nav-menu a,
  .nav-menu button {
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  .dashboard-nav-action,
  .nav-menu a[href="my_bills_dashboard.html"],
  .logout-btn {
    grid-column: 1 / -1;
    margin-left: 0;
    justify-content: center;
  }
}


/* Sleek fintech logo treatment */
.header h1 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
  color: #ffffff;
}

.header h1::before {
  content: "";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, #dbeafe 55%, #bfdbfe 80%);
  color: #145da0;
  font-size: 1rem;
  font-weight: 950;
  box-shadow:
    0 10px 24px rgba(20, 93, 160, 0.18),
    inset 0 -3px 8px rgba(20, 93, 160, 0.12);
  border: 1px solid rgba(255,255,255,0.55);
}

.header h1::after {
  content: "";
  position: absolute;
  left: 43px;
  right: 0;
  bottom: -7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, rgba(255, 255, 255, 0));
  opacity: 0.72;
}

@media (max-width: 700px) {
  .header h1 {
    justify-content: center;
    font-size: 1.38rem;
  }

  .header h1::before {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .header h1::after {
    left: calc(50% - 55px);
    right: calc(50% - 105px);
  }
}


/* Protect dashboard from flashing before auth check */
body.dashboard-auth-loading {
  background: #0f2347;
}

body.dashboard-auth-loading .header,
body.dashboard-auth-loading main {
  visibility: hidden;
}

body.dashboard-auth-loading::before {
  content: "Checking secure dashboard access...";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.02em;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.22), transparent 34%),
    linear-gradient(135deg, #0f2347, #145da0);
  z-index: 99999;
}








/* AI Finance Coach, compact premium assistant */
.ai-coach-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-color: #d7e4f2;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 35, 71, 0.055);
}

.ai-coach-card::before {
  display: none;
}

.ai-coach-card > * {
  position: relative;
  z-index: 1;
}

.ai-coach-card .dashboard-section-title {
  margin-bottom: 8px;
}

.ai-coach-card .dashboard-section-title h3 {
  font-size: 1rem;
}

.ai-coach-eyebrow {
  background: #e8f1ff;
  color: #17457a;
  border-color: #cfe0f6;
}

.ai-coach-card .recommended-pill {
  padding: 4px 8px;
  background: #e9f7ef;
  color: #166534;
  box-shadow: none;
}

.ai-coach-card .section-helper {
  max-width: 880px;
  margin: 5px 0 0;
  font-size: 0.88rem;
  line-height: 1.38;
}

.ai-coach-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0;
}

.ai-prompt-btn {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(232,241,255,0.92));
  color: #17457a;
  border: 1px solid #cfe0f6;
  box-shadow: none;
  font-size: 0.74rem;
  font-weight: 850;
}

.ai-prompt-btn:hover {
  background: linear-gradient(135deg, #eef6ff, #dbeafe);
  opacity: 1;
  transform: translateY(-1px);
}

.ai-coach-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 6px;
  align-items: stretch;
  margin-top: 7px;
}

.ai-coach-input-row textarea {
  width: 100%;
  max-width: none;
  min-height: 34px;
  resize: vertical;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-color: #cfe0f6;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 6px 16px rgba(15,35,71,0.04);
  line-height: 1.25;
  font-size: 0.78rem;
  overflow: hidden;
}

.ai-coach-input-row button {
  min-width: 58px;
  border-radius: 8px;
  background: #1769aa;
  box-shadow: none;
  font-size: 0.76rem;
}

.ai-coach-input-row button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.ai-coach-response {
  margin-top: 0;
  padding: 7px;
  border: 1px solid #e1eaf5;
  border-radius: 8px;
  background: #fbfdff;
  color: #102033;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.28;
  box-shadow: none;
}

.ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 260px;
  overflow-y: auto;
}

.ai-chat-message {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.ai-chat-message.user {
  justify-content: flex-end;
}

.ai-chat-message.user .ai-chat-avatar {
  order: 2;
}

.ai-chat-message.user .ai-chat-bubble {
  order: 1;
  background: #2f7fbd;
  border-color: #2f7fbd;
  color: #ffffff;
}

.ai-chat-avatar {
  width: 22px;
  min-width: 22px;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

.ai-chat-bubble {
  max-width: min(76%, 520px);
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #102033;
  box-shadow: none;
}

.ai-chat-message.error .ai-chat-bubble {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.ai-chat-bubble p {
  margin: 0;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.32;
}

.ai-chat-bubble p + p {
  margin-top: 5px;
}

.ai-answer-lead {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eefdf5, #eef6ff);
  border: 1px solid #c8f2d8;
  color: #071b38;
}

.ai-answer-lead p {
  margin: 0;
  color: #071b38;
  font-size: 0.93rem;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.ai-answer-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #16a34a, #145da0);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.14);
}

.ai-answer-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.ai-answer-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 8px 9px;
  border: 1px solid #e0ebf7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15,35,71,0.03);
}

.ai-answer-row span {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #145da0, #16a34a);
}

.ai-answer-row p {
  margin: 0;
  color: #102033;
  font-size: 0.84rem;
  font-weight: 730;
  line-height: 1.3;
}

.ai-answer-note {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffffff, #f6fbff);
  border: 1px solid #dbeafe;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 730;
  line-height: 1.35;
}

.ai-coach-response strong {
  color: #071b38;
  font-weight: 600;
}

.ai-chat-bubble strong {
  font-weight: 600;
  color: inherit;
}

.ai-chat-message.user .ai-chat-bubble strong {
  font-weight: 600;
  color: #ffffff;
}

.ai-coach-response.ai-coach-error {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff1f2, #ffffff);
  color: #991b1b;
}

.ai-coach-disclaimer {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}

@media (max-width: 760px) {
  .ai-coach-card {
    padding: 13px;
  }

  .ai-coach-prompts,
  .ai-coach-input-row,
  .ai-answer-rows {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ai-prompt-btn,
  .ai-coach-input-row button {
    width: 100%;
  }

  .ai-coach-input-row {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .ai-coach-input-row button {
    width: auto;
  }

  .ai-coach-input-row textarea {
    min-height: 34px;
  }

  .ai-coach-response {
    padding: 9px;
    border-radius: 15px;
  }

  .ai-chat-message,
  .ai-chat-message.user {
    display: flex;
  }

  .ai-chat-message.user .ai-chat-avatar {
    order: 2;
  }

  .ai-chat-message.user .ai-chat-bubble {
    order: 1;
  }

  .ai-chat-avatar {
    width: 22px;
    min-width: 22px;
  }

  .ai-chat-bubble {
    max-width: 84%;
    padding: 6px 8px;
  }

  .ai-chat-bubble p {
    font-size: 0.76rem;
    line-height: 1.32;
    font-weight: 400;
  }

  .ai-answer-lead {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .ai-answer-check {
    width: 26px;
    height: 26px;
    border-radius: 9px;
  }

  .ai-answer-lead p {
    font-size: 0.88rem;
  }

  .ai-answer-row {
    padding: 8px;
  }

  .ai-answer-row p,
  .ai-answer-note {
    font-size: 0.82rem;
  }
}

/* Compact chat override: keeps the coach feeling like instant messages. */
.ai-coach-card .ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ai-coach-card .ai-chat-message,
.ai-coach-card .ai-chat-message.user {
  display: flex;
  align-items: flex-end;
}

.ai-coach-card .ai-chat-message.user {
  justify-content: flex-end;
}

.ai-coach-card .ai-chat-bubble {
  max-width: min(76%, 520px);
  border-radius: 8px;
}

.ai-coach-card .ai-coach-input-row textarea {
  min-height: 42px;
}

@media (min-width: 981px) {
  .ai-coach-card {
    padding: 18px;
  }

  .ai-coach-card .dashboard-section-title {
    margin-bottom: 12px;
  }

  .ai-coach-card .ai-chat-thread {
    min-height: 170px;
    max-height: 360px;
    padding: 12px;
    gap: 10px;
  }

  .ai-coach-card .ai-chat-bubble {
    max-width: min(68%, 650px);
    padding: 9px 12px;
    border-radius: 10px;
  }

  .ai-coach-card .ai-chat-bubble p {
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .ai-coach-card .ai-coach-input-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 10px;
    margin-top: 10px;
  }

  .ai-coach-card .ai-coach-input-row textarea {
    min-height: 58px;
    max-height: 180px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.35;
    padding: 10px 12px;
  }

  .ai-coach-card .ai-coach-input-row button {
    min-width: 82px;
    border-radius: 10px;
  }
}

@media (max-width: 760px) {
  .ai-coach-card .ai-chat-bubble {
    max-width: 86%;
  }

  .ai-coach-card .ai-coach-input-row {
    grid-template-columns: minmax(0, 1fr) 62px;
  }

  .ai-coach-card .ai-coach-input-row textarea {
    min-height: 34px;
  }
}


/* Paid bill verification card */
.paid-review-card {
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #cfe0f3;
}

.paid-review-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.paid-review-item {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) repeat(3, minmax(110px, 0.8fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #dbe5f1;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffffff, #fbfdff);
  box-shadow: 0 5px 14px rgba(15, 35, 71, 0.045);
}

.paid-review-item h4 {
  margin: 0 0 3px;
  color: #071b38;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.paid-review-item p {
  margin: 0;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.paid-review-meta {
  padding: 8px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.paid-review-meta span {
  display: block;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paid-review-meta strong {
  display: block;
  margin-top: 3px;
  color: #0f2347;
  font-size: 0.86rem;
}

.paid-review-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .paid-review-item {
    grid-template-columns: 1fr 1fr;
  }

  .paid-review-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .paid-review-item {
    grid-template-columns: 1fr;
  }

  .paid-review-meta {
    padding: 8px;
  }
}


.math-note {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 6px;
}



/* ===== DIRECT HEADER LOGO LOCK ===== */
/* Final header setup:
   The site title is NOT a link.
   Home stays in the nav only.
   Snowball is plain, no snowflake, no image dependency.
*/

.header {
  background: #0f2347 !important;
  color: #ffffff !important;
}

.header .site-title,
.header h1.site-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 1.55rem !important;
  font-weight: 950 !important;
  letter-spacing: -0.055em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  position: relative !important;
}

.header .site-title-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: inherit !important;
  text-decoration: none !important;
}

.header h1.site-title::before {
  content: none !important;
  display: none !important;
}

.header h1.site-title::after {
  content: "" !important;
  position: absolute !important;
  left: 46px !important;
  right: 0 !important;
  bottom: -8px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #22c55e, rgba(255, 255, 255, 0)) !important;
  opacity: 0.72 !important;
}

.header-snowball {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  display: inline-block !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 33% 24%, #ffffff 0 18%, #eef6ff 42%, #cbd5e1 72%, #94a3b8 100%) !important;
  box-shadow:
    inset -8px -10px 14px rgba(15, 35, 71, 0.14),
    inset 7px 7px 12px rgba(255, 255, 255, 0.95),
    0 10px 16px rgba(2, 8, 23, 0.30) !important;
  border: 1px solid rgba(255, 255, 255, 0.68) !important;
  transform: rotate(-10deg) !important;
}

.header a,
.header a:link,
.header a:visited,
.header a:hover,
.header a:active,
.header button {
  color: #ffffff !important;
  text-decoration: none !important;
}

.header .nav-menu a:hover {
  opacity: 1 !important;
}

@media (max-width: 700px) {
  .header .site-title,
  .header h1.site-title {
    justify-content: center !important;
    white-space: normal !important;
    font-size: 1.38rem !important;
  }

  .header-snowball {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .header h1.site-title::after {
    left: calc(50% - 55px) !important;
    right: calc(50% - 105px) !important;
  }
}
/* ===== BLOG ARTICLE POLISH ===== */

.blog-body {
  background: linear-gradient(
    180deg,
    #eef5fc 0%,
    #f7fbff 100%
  );
}

.blog-article-content {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f6faff 100%
  );
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 12px 30px rgba(15, 35, 71, 0.08);
  border: 1px solid rgba(20, 93, 160, 0.08);
}

.blog-article-content h1,
.blog-article-content h2,
.blog-article-content h3 {
  color: #0f2347;
  letter-spacing: -0.02em;
}

.blog-article-content p {
  color: #425466;
  line-height: 1.8;
  font-size: 1.03rem;
}

.blog-highlight-box {
  background: linear-gradient(
    135deg,
    #eef6ff,
    #f8fbff
  );
  border-left: 5px solid #145da0;
  border-radius: 18px;
  padding: 20px;
  margin: 28px 0;
}

.blog-tip-box {
  background: linear-gradient(
    135deg,
    #ecfdf3,
    #f8fffb
  );
  border-left: 5px solid #22c55e;
  border-radius: 18px;
  padding: 20px;
  margin: 28px 0;
}

.blog-warning-box {
  background: linear-gradient(
    135deg,
    #fff8e8,
    #fffdf7
  );
  border-left: 5px solid #f59e0b;
  border-radius: 18px;
  padding: 20px;
  margin: 28px 0;
}

.blog-article-content section {
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }

  .header h1,
  .site-title,
  .logo {
    font-size: 1.35rem;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .nav-menu {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}


/* ===== STICKY COMPACT HEADER FIX v4 =====
   Site-wide header polish. Desktop remains normal width.
   Mobile is compact, sticky, and less bloated.
*/
.header,
.home-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(15, 35, 71, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.18) !important;
}

.header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 12px 22px !important;
}

.header .site-title,
.header h1.site-title {
  font-size: 1.42rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.header-snowball {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

.header h1.site-title::after {
  bottom: -7px !important;
}

.header .nav-menu {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
}

.header .nav-menu a,
.header .nav-menu button {
  min-height: 32px !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  font-size: 0.84rem !important;
  line-height: 1 !important;
}

.header .dashboard-nav-action,
.header .nav-menu a[href="my_bills_dashboard.html"],
.header .nav-menu a[href="login.html"].dashboard-nav-action {
  margin-left: 6px !important;
  padding: 8px 14px !important;
  min-height: 34px !important;
}

@media (max-width: 700px) {
  .header {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 9px 12px 10px !important;
  }

  .header .site-title,
  .header h1.site-title {
    justify-content: center !important;
    font-size: 1.28rem !important;
    white-space: nowrap !important;
    letter-spacing: -0.045em !important;
  }

  .header-snowball {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .header h1.site-title::after {
    left: calc(50% - 62px) !important;
    right: calc(50% - 112px) !important;
    bottom: -6px !important;
    height: 2px !important;
  }

  .header .nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1px 0 2px !important;
    scrollbar-width: none !important;
  }

  .header .nav-menu::-webkit-scrollbar {
    display: none !important;
  }

  .header .nav-menu a,
  .header .nav-menu button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 30px !important;
    padding: 7px 9px !important;
    border-radius: 999px !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    background: rgba(255, 255, 255, 0.09) !important;
  }

  .header .dashboard-nav-action,
  .header .nav-menu a[href="my_bills_dashboard.html"],
  .header .nav-menu a[href="login.html"].dashboard-nav-action,
  .logout-btn {
    grid-column: auto !important;
    margin-left: 0 !important;
    padding: 7px 11px !important;
    min-height: 30px !important;
    background: linear-gradient(135deg, #22c55e, #145da0) !important;
    box-shadow: 0 7px 16px rgba(20, 93, 160, 0.22) !important;
  }

  .home-hero {
    padding-top: 34px !important;
  }
}

@media (max-width: 390px) {
  .header .nav-menu a,
  .header .nav-menu button {
    font-size: 0.72rem !important;
    padding: 7px 8px !important;
  }
}

/* ===== SITE-WIDE STICKY HEADER V5 ===== */
.header,
.home-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: rgba(15, 35, 71, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.18) !important;
}

.header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 12px 22px !important;
}

.header .site-title,
.header h1.site-title {
  font-size: 1.42rem !important;
  line-height: 1 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

.header-snowball {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}

.header h1.site-title::after {
  bottom: -7px !important;
}

.header .nav-menu {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
}

.header .nav-menu a,
.header .nav-menu button {
  min-height: 32px !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  font-size: 0.84rem !important;
  line-height: 1 !important;
}

.header .dashboard-nav-action,
.header .nav-menu a[href="my_bills_dashboard.html"],
.header .nav-menu a[href="login.html"].dashboard-nav-action {
  margin-left: 6px !important;
  padding: 8px 14px !important;
  min-height: 34px !important;
}

@media (max-width: 700px) {
  .header {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 9px 12px 10px !important;
  }

  .header .site-title,
  .header h1.site-title {
    justify-content: center !important;
    font-size: 1.28rem !important;
    white-space: nowrap !important;
    letter-spacing: -0.045em !important;
  }

  .header-snowball {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
  }

  .header h1.site-title::after {
    left: calc(50% - 62px) !important;
    right: calc(50% - 112px) !important;
    bottom: -6px !important;
    height: 2px !important;
  }

  .header .nav-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1px 0 2px !important;
    scrollbar-width: none !important;
  }

  .header .nav-menu::-webkit-scrollbar {
    display: none !important;
  }

  .header .nav-menu a,
  .header .nav-menu button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 30px !important;
    padding: 7px 9px !important;
    border-radius: 999px !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
    background: rgba(255, 255, 255, 0.09) !important;
  }

  .header .dashboard-nav-action,
  .header .nav-menu a[href="my_bills_dashboard.html"],
  .header .nav-menu a[href="login.html"].dashboard-nav-action,
  .logout-btn {
    grid-column: auto !important;
    margin-left: 0 !important;
    padding: 7px 11px !important;
    min-height: 30px !important;
    background: linear-gradient(135deg, #22c55e, #145da0) !important;
    box-shadow: 0 7px 16px rgba(20, 93, 160, 0.22) !important;
  }

  .home-hero,
  .hero,
  .blog-hub-hero {
    padding-top: 34px !important;
  }
}

@media (max-width: 390px) {
  .header .nav-menu a,
  .header .nav-menu button {
    font-size: 0.72rem !important;
    padding: 7px 8px !important;
  }
}


/* ===== Dashboard mobile bill-card compression + clean print summary v6 ===== */
.print-summary-card {
  background:
    radial-gradient(circle at top right, rgba(20, 93, 160, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  border-color: #cfe0f3;
}

.print-next-bill-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.print-next-bill-card h4 {
  margin: 8px 0 10px;
  color: #071b38;
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.print-next-bill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.print-next-bill-grid div {
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.print-next-bill-grid span {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.print-next-bill-grid strong {
  display: block;
  margin-top: 3px;
  color: #0f2347;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .bills-workspace-card {
    padding: 14px !important;
  }

  .bills-card-list {
    gap: 8px !important;
  }

  .saved-bill-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }

  .saved-bill-card-top h4 {
    font-size: 0.95rem !important;
    margin-bottom: 2px !important;
  }

  .saved-bill-card-top p {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
  }

  .saved-bill-card .paycheck-badge {
    margin-top: 5px !important;
    padding: 4px 8px !important;
    font-size: 0.66rem !important;
  }

  .saved-bill-card-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .saved-bill-card-grid div {
    padding: 7px 8px !important;
    border-radius: 11px !important;
    min-height: auto !important;
  }

  .saved-bill-card-grid span {
    font-size: 0.58rem !important;
    margin-bottom: 2px !important;
  }

  .saved-bill-card-grid strong {
    font-size: 0.78rem !important;
    line-height: 1.15 !important;
  }

  .saved-bill-card-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) repeat(2, auto) !important;
    gap: 6px !important;
    align-items: center !important;
    margin-top: 0 !important;
  }

  .saved-bill-card-actions input {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 0.78rem !important;
  }

  .saved-bill-card-actions button {
    width: auto !important;
    min-height: 32px !important;
    padding: 6px 9px !important;
    font-size: 0.72rem !important;
    border-radius: 9px !important;
    white-space: nowrap !important;
  }

  .saved-bill-card-actions .edit-bill-btn,
  .saved-bill-card-actions .delete-btn {
    grid-column: span 1 !important;
    font-size: 0.68rem !important;
    opacity: 0.92 !important;
  }

  .print-next-bill-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 390px) {
  .saved-bill-card-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .saved-bill-card-actions input {
    grid-column: 1 / -1 !important;
  }
}

@media print {
  @page {
    margin: 0.45in;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .header,
  .hero,
  .dashboard-main-card,
  .setup-card,
  .budget-status-card,
  .ai-coach-card,
  .paid-review-card,
  .add-bill-card,
  .debt-progress-card,
  .next-move-card,
  .dashboard-note-card,
  #legacyDashboardCompatibility,
  .print-summary-actions,
  .saved-bill-card-actions,
  .section-helper,
  button,
  input,
  textarea,
  select {
    display: none !important;
  }

  body.print-calendar-only .bill-calendar-item {
    display: grid !important;
    border: 1px solid #dbeafe !important;
    background: #f8fbff !important;
    color: #102342 !important;
  }

  body.print-calendar-only .bill-calendar-item.is-payday {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
  }

  body.print-calendar-only .bill-calendar-more {
    display: block !important;
  }

  body.print-calendar-only .bill-calendar-items {
    display: none !important;
  }

  body.print-calendar-only .bill-calendar-print-items {
    display: grid !important;
    gap: 3px !important;
    margin-top: 3px !important;
  }

  body.print-calendar-only .bill-calendar-print-item,
  body.print-calendar-only .bill-calendar-print-more {
    display: grid !important;
    gap: 1px !important;
    padding: 3px 4px !important;
    border: 1px solid #dbeafe !important;
    border-radius: 5px !important;
    background: #f8fbff !important;
    color: #102342 !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
  }

  body.print-calendar-only .bill-calendar-print-item.is-payday {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
  }

  body.print-calendar-only .bill-calendar-print-item span {
    overflow: hidden !important;
    color: #102342 !important;
    font-weight: 800 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.print-calendar-only .bill-calendar-print-item strong {
    color: #145da0 !important;
    font-weight: 900 !important;
  }

  .calculator-page,
  main,
  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-summary-card,
  .paycheck-plan-card,
  .bills-workspace-card {
    display: block !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    break-before: auto !important;
    break-after: auto !important;
    page-break-before: auto !important;
    page-break-after: auto !important;
    box-shadow: none !important;
    border: 1px solid #999 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin: 0 0 10px !important;
    background: #ffffff !important;
  }

  .print-summary-card .section-helper,
  .bills-workspace-card .section-helper,
  .paycheck-plan-card .section-helper {
    display: none !important;
  }

  .print-summary-card .dashboard-section-title,
  .paycheck-plan-card .dashboard-section-title,
  .bills-workspace-card .dashboard-section-title {
    margin-bottom: 8px !important;
  }

  .print-summary-card h3,
  .paycheck-plan-card h3,
  .bills-workspace-card h3 {
    color: #000000 !important;
    font-size: 15pt !important;
  }

  .print-next-bill-card {
    box-shadow: none !important;
    border: 1px solid #999 !important;
    padding: 10px !important;
    margin: 0 !important;
  }

  .print-next-bill-grid,
  .paycheck-cards-grid,
  .saved-bill-card-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .saved-bill-card {
    display: grid !important;
    grid-template-columns: 1fr 1.35fr !important;
    gap: 8px !important;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    border-radius: 8px !important;
    padding: 8px !important;
    margin-bottom: 6px !important;
    background: #ffffff !important;
  }

  .saved-bill-card-grid div,
  .paycheck-mini-grid div,
  .print-next-bill-grid div {
    background: #ffffff !important;
    border: 1px solid #bbb !important;
    color: #000000 !important;
    padding: 6px !important;
  }

  .saved-bill-card h4,
  .paycheck-mini-card h4,
  .print-next-bill-card h4,
  .saved-bill-card-grid strong,
  .paycheck-mini-grid strong,
  .print-next-bill-grid strong {
    color: #000000 !important;
  }

  .paycheck-gauge-card,
  .paycheck-mini-card {
    box-shadow: none !important;
    border: 1px solid #bbb !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .paycheck-gauge {
    box-shadow: none !important;
  }

  .mini-status-pill,
  .paycheck-badge,
  .eyebrow,
  .hero-kicker {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
  }
  /* Print flow fix: do not force each print section onto its own page. */
  .print-summary-card,
  .paycheck-plan-card,
  .bills-workspace-card,
  .paycheck-cards-grid,
  .bills-card-list {
    break-before: auto !important;
    break-after: auto !important;
    break-inside: auto !important;
    page-break-before: auto !important;
    page-break-after: auto !important;
    page-break-inside: auto !important;
    min-height: 0 !important;
  }

  .calculator-card {
    break-before: auto !important;
    break-after: auto !important;
    page-break-before: auto !important;
    page-break-after: auto !important;
  }

  .saved-bill-card,
  .paycheck-mini-card,
  .paycheck-gauge-card,
  .print-next-bill-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

}

/* ===== Current Paycheck Snapshot Bento Design v9 ===== */
.snapshot-bento-card {
  position: relative;
  overflow: hidden;
  padding: 24px !important;
  border: 1px solid #cfe0f6 !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 88% 14%, rgba(34, 197, 94, 0.12), transparent 30%),
    radial-gradient(circle at 8% 12%, rgba(20, 93, 160, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #eef7ff 100%) !important;
  box-shadow: 0 20px 48px rgba(15, 35, 71, 0.11) !important;
}

.snapshot-bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.82), transparent 48%);
  pointer-events: none;
}

.snapshot-bento-card > * {
  position: relative;
  z-index: 1;
}

.snapshot-bento-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.snapshot-bento-eyebrow {
  background: linear-gradient(135deg, #e8f1ff, #dcfce7) !important;
  color: #145da0 !important;
  border: 1px solid #c8ddf3 !important;
  box-shadow: 0 8px 18px rgba(20, 93, 160, 0.08) !important;
}

.snapshot-bento-header h3 {
  margin: 12px 0 8px !important;
  color: #071b38 !important;
  font-size: clamp(1.65rem, 3.2vw, 2.55rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.055em !important;
}

.snapshot-bento-header .section-helper {
  max-width: 980px !important;
  margin: 0 !important;
  color: #526780 !important;
  font-size: 1rem !important;
  font-weight: 650 !important;
  line-height: 1.55 !important;
}

.snapshot-bento-grid {
  display: grid !important;
  grid-template-columns: minmax(300px, 1.22fr) repeat(3, minmax(180px, 0.82fr));
  gap: 14px;
  align-items: stretch;
}

.snapshot-bento-card .dashboard-stat-card {
  min-height: 132px !important;
  padding: 18px 18px 18px 68px !important;
  border-radius: 22px !important;
  border: 1px solid #d9e6f5 !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,251,255,0.90)) !important;
  box-shadow:
    0 16px 30px rgba(15, 35, 71, 0.085),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

.snapshot-bento-card .dashboard-stat-card::before {
  display: none !important;
}

.snapshot-bento-card .dashboard-stat-card::after {
  position: absolute !important;
  left: 18px !important;
  top: 20px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 14px !important;
  box-shadow:
    0 10px 18px rgba(15, 35, 71, 0.10),
    inset 0 0 0 1px rgba(255,255,255,0.75) !important;
}

.snapshot-bento-card .dashboard-stat-card span {
  margin-bottom: 6px !important;
  color: #415a77 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.07em !important;
}

.snapshot-bento-card .dashboard-stat-card strong {
  color: #071b38 !important;
  font-size: clamp(1.55rem, 2.2vw, 2.05rem) !important;
  line-height: 1 !important;
  letter-spacing: -0.06em !important;
}

.snapshot-bento-card .dashboard-stat-card small {
  display: inline-flex !important;
  width: fit-content !important;
  margin-top: 10px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #e8f1ff !important;
  color: #325174 !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
}

.snapshot-hero-card {
  padding: 22px 24px !important;
  min-height: 150px !important;
  grid-row: span 1;
  background:
    radial-gradient(circle at 92% 16%, rgba(34, 197, 94, 0.22), transparent 26%),
    linear-gradient(135deg, #f2fff8 0%, #e8fff2 44%, #ffffff 100%) !important;
  border-color: #a7f3c5 !important;
  box-shadow:
    0 20px 40px rgba(22, 163, 74, 0.13),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

.snapshot-hero-card::after {
  content: "↘" !important;
  background: linear-gradient(135deg, #bbf7d0, #dcfce7) !important;
  color: #047857 !important;
}

.snapshot-hero-card span {
  color: #047857 !important;
}

.snapshot-hero-card strong {
  color: #047857 !important;
  font-size: clamp(2.05rem, 3.5vw, 3.15rem) !important;
}

.snapshot-hero-card small {
  background: #bbf7d0 !important;
  color: #065f46 !important;
}

.snapshot-paycheck-card::after {
  content: "$" !important;
  background: linear-gradient(135deg, #dbeafe, #eff6ff) !important;
  color: #145da0 !important;
}

.snapshot-bills-card::after {
  content: "✓" !important;
  background: linear-gradient(135deg, #dbeafe, #e8f1ff) !important;
  color: #1d4e89 !important;
}

.snapshot-debt-card {
  background:
    radial-gradient(circle at 95% 10%, rgba(124, 58, 237, 0.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(250,245,255,0.86)) !important;
}

.snapshot-debt-card::after {
  content: "Σ" !important;
  background: linear-gradient(135deg, #ede9fe, #f3e8ff) !important;
  color: #6d28d9 !important;
}

@media (max-width: 1100px) {
  .snapshot-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .snapshot-hero-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .snapshot-bento-card {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  .snapshot-bento-header {
    margin-bottom: 14px;
  }

  .snapshot-bento-header h3 {
    font-size: clamp(1.45rem, 8vw, 2rem) !important;
  }

  .snapshot-bento-header .section-helper {
    font-size: 0.92rem !important;
  }

  .snapshot-bento-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .snapshot-bento-card .dashboard-stat-card,
  .snapshot-hero-card {
    min-height: 112px !important;
    padding: 16px 16px 16px 62px !important;
    border-radius: 19px !important;
  }

  .snapshot-bento-card .dashboard-stat-card::after {
    left: 16px !important;
    top: 17px !important;
    width: 34px !important;
    height: 34px !important;
  }

  .snapshot-hero-card strong {
    font-size: 2.25rem !important;
  }
}

/* ===== Current Paycheck Snapshot Compact Bento v10 ===== */
.snapshot-bento-compact {
  padding: 18px !important;
  border-radius: 24px !important;
  border: 1px solid #cfe0f6 !important;
  background:
    radial-gradient(circle at 88% 10%, rgba(34, 197, 94, 0.10), transparent 28%),
    radial-gradient(circle at 4% 12%, rgba(20, 93, 160, 0.075), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 62%, #eef6ff 100%) !important;
  box-shadow: 0 14px 34px rgba(15, 35, 71, 0.09) !important;
}

.snapshot-bento-compact::before {
  background: linear-gradient(120deg, rgba(255,255,255,0.70), transparent 42%) !important;
}

.snapshot-bento-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.snapshot-bento-note {
  color: #526780;
  font-size: 0.82rem;
  font-weight: 800;
}

.snapshot-bento-compact .snapshot-bento-eyebrow {
  padding: 6px 12px !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.09em !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.snapshot-bento-hero-layout {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.45fr) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.snapshot-bento-right-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-width: 0;
}

.snapshot-next-bill-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.65fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 13px 15px;
  border: 1px solid #d9e6f5;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,251,255,0.92));
  box-shadow: 0 10px 22px rgba(15, 35, 71, 0.06), inset 0 1px 0 rgba(255,255,255,0.95);
}

.snapshot-next-label {
  display: block;
  color: #145da0;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.snapshot-next-bill-card h3 {
  margin: 0 !important;
  color: #071b38 !important;
  font-size: clamp(1.05rem, 1.8vw, 1.42rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.04em !important;
}

.snapshot-next-bill-card .section-helper {
  margin: 0 !important;
  color: #526780 !important;
  font-size: 0.88rem !important;
  font-weight: 650 !important;
  line-height: 1.42 !important;
}

.snapshot-side-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.snapshot-bento-compact .dashboard-stat-card {
  min-height: 108px !important;
  padding: 14px 14px 14px 58px !important;
  border-radius: 18px !important;
  border: 1px solid #d9e6f5 !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(248,251,255,0.90)) !important;
  box-shadow: 0 10px 22px rgba(15, 35, 71, 0.065), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.snapshot-bento-compact .dashboard-stat-card::before {
  display: none !important;
}

.snapshot-bento-compact .dashboard-stat-card::after {
  left: 14px !important;
  top: 15px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 13px !important;
  box-shadow: 0 8px 14px rgba(15, 35, 71, 0.09), inset 0 0 0 1px rgba(255,255,255,0.75) !important;
}

.snapshot-bento-compact .dashboard-stat-card span {
  margin-bottom: 5px !important;
  color: #415a77 !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.07em !important;
  overflow-wrap: anywhere !important;
}

.snapshot-bento-compact .dashboard-stat-card strong {
  display: block !important;
  max-width: 100% !important;
  color: #071b38 !important;
  font-size: clamp(0.98rem, 1.18vw, 1.32rem) !important;
  line-height: 1 !important;
  letter-spacing: -0.015em !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.snapshot-bento-compact .dashboard-stat-card small {
  display: inline-flex !important;
  width: fit-content !important;
  margin-top: 8px !important;
  padding: 4px 9px !important;
  border-radius: 999px !important;
  background: #e8f1ff !important;
  color: #325174 !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
}

.snapshot-bento-compact .snapshot-hero-card {
  min-height: 194px !important;
  padding: 21px 20px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(190px, 0.75fr);
  gap: 16px;
  align-items: center;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 92% 18%, rgba(34, 197, 94, 0.18), transparent 28%),
    linear-gradient(135deg, #f0fff7 0%, #e8fff2 42%, #ffffff 100%) !important;
  border-color: #a7f3c5 !important;
  box-shadow: 0 15px 30px rgba(22, 163, 74, 0.12), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

.snapshot-bento-compact .snapshot-hero-card::after {
  right: 18px !important;
  left: auto !important;
  top: 18px !important;
  width: 36px !important;
  height: 36px !important;
  content: "↘" !important;
  background: linear-gradient(135deg, #bbf7d0, #dcfce7) !important;
  color: #047857 !important;
}

.snapshot-bento-compact .snapshot-hero-card span {
  color: #047857 !important;
  font-size: 0.72rem !important;
}

.snapshot-bento-compact .snapshot-hero-card strong {
  color: #047857 !important;
  font-size: clamp(2.25rem, 4.1vw, 3.1rem) !important;
}

.snapshot-bento-compact .snapshot-hero-card small {
  background: #bbf7d0 !important;
  color: #065f46 !important;
}

.cash-checkin-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-self: stretch;
  margin-top: 0;
  padding: 11px;
  border: 1px solid rgba(4, 120, 87, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.cash-checkin-card span {
  display: block;
  margin: 0 0 2px;
  color: #047857 !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cash-checkin-card strong {
  display: block;
  color: #064e3b !important;
  font-size: 0.98rem !important;
  line-height: 1.05;
}

.cash-checkin-card small {
  display: inline-block;
  margin-top: 4px;
  padding: 0 !important;
  background: transparent !important;
  color: #4b7968 !important;
  font-size: 0.64rem !important;
  font-weight: 750 !important;
}

.cash-checkin-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.cash-checkin-actions input {
  min-height: 32px;
  max-width: none;
  border-color: #a7f3c5;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.78rem;
}

.cash-checkin-actions button {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 10px;
  background: #047857;
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  .snapshot-bento-hero-layout {
    grid-template-columns: 1fr !important;
  }

  .snapshot-bento-compact .snapshot-hero-card {
    min-height: 142px !important;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cash-checkin-card {
    padding: 9px;
  }

  .cash-checkin-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cash-checkin-actions input {
    max-width: none;
  }
}

@media (min-width: 560px) {
  .snapshot-bento-compact .snapshot-hero-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr) !important;
  }

  .cash-checkin-card {
    align-self: center;
  }
}

@media (max-width: 760px) {
  .snapshot-bento-topline {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .snapshot-next-bill-card,
  .snapshot-side-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-bento-compact {
    padding: 14px !important;
    border-radius: 21px !important;
  }

  .snapshot-bento-compact .dashboard-stat-card {
    min-height: 94px !important;
    padding: 13px 13px 13px 56px !important;
    border-radius: 16px !important;
  }

  .snapshot-bento-compact .snapshot-hero-card {
    min-height: 118px !important;
    padding: 16px !important;
  }

  .snapshot-bento-compact .snapshot-hero-card strong {
    font-size: 2.2rem !important;
  }
}


/* Estimated payoff column and payment-input math fix support */
.est-payoff-cell,
.est-payoff-card-cell {
  white-space: nowrap;
}

.est-payoff-pill,
.est-payoff-card-cell strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534 !important;
  border: 1px solid #bbf7d0;
  font-weight: 950;
  font-size: 0.74rem;
  line-height: 1;
}

.saved-bill-card-grid {
  grid-template-columns: repeat(5, minmax(70px, 1fr));
}

.saved-bill-card-grid .est-payoff-card-cell {
  background: #dcfce7 !important;
  border-color: #bbf7d0 !important;
}

.saved-bill-card-grid .est-payoff-card-cell span {
  color: #166534 !important;
}

@media (max-width: 640px) {
  .saved-bill-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* Urgent math visibility v5: keep Est Payoff compact and prevent card stretch. */
.est-payoff-card-cell strong,
.est-payoff-pill {
  white-space: nowrap !important;
}


/* ===== Dashboard mobile/tablet bill action button fix v10 ===== */
/* CSS-only. Keeps dashboard JS, math, badges, APR, and dropdown logic untouched. */
@media (max-width: 980px) {
  .bills-card-list .saved-bill-card .saved-bill-card-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .bills-card-list .saved-bill-card .saved-bill-card-actions .payment-input {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 38px !important;
  }

  .bills-card-list .saved-bill-card .saved-bill-card-actions button {
    flex: 1 1 calc(50% - 8px) !important;
    width: calc(50% - 8px) !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    font-size: 0.76rem !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
  }
}


/* ===== Calculator paycheck badge color fix ===== */
/* Keeps bill paycheck badges matched to the calculated paycheck colors. */
.bills-ledger-card .paycheck-badge.paycheck-one,
.paycheck-info .paycheck-badge.paycheck-one {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
}

.bills-ledger-card .paycheck-badge.paycheck-two,
.paycheck-info .paycheck-badge.paycheck-two {
  background: #dbeafe !important;
  color: #1d4e89 !important;
  border: 1px solid #bfdbfe !important;
}

.bills-ledger-card .paycheck-badge.paycheck-three,
.paycheck-info .paycheck-badge.paycheck-three {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.bills-ledger-card .paycheck-badge.paycheck-later,
.paycheck-info .paycheck-badge.paycheck-later {
  background: #eef2f7 !important;
  color: #334155 !important;
  border: 1px solid #d9e3ef !important;
}


/* ===== Calculator ledger bill-name polish + section order support ===== */
/* Adds a subtle color treatment to bill names without changing calculator math. */
.bills-ledger-card td:first-child,
.bills-ledger-card .bill-name-cell {
  background:
    linear-gradient(135deg, #eef6ff 0%, #ffffff 72%) !important;
  border-color: #dbeafe !important;
  color: #071b38 !important;
  font-weight: 950 !important;
}

.bills-ledger-card tbody tr td:first-child {
  position: relative;
}

.bills-ledger-card tbody tr td:first-child::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 22px;
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
  background: linear-gradient(180deg, #145da0, #22c55e);
}

.bills-ledger-card tbody tr:nth-child(2n) td:first-child::before {
  background: linear-gradient(180deg, #1d4e89, #60a5fa);
}

.bills-ledger-card tbody tr:nth-child(3n) td:first-child::before {
  background: linear-gradient(180deg, #92400e, #f59e0b);
}

.bills-ledger-card tbody tr:nth-child(4n) td:first-child::before {
  background: linear-gradient(180deg, #6d28d9, #a78bfa);
}

.bills-ledger-card tbody tr:nth-child(5n) td:first-child::before {
  background: linear-gradient(180deg, #991b1b, #fb7185);
}

/* If Paycheck Health is now last, keep spacing clean. */
.calculator-card:last-of-type {
  margin-bottom: 34px;
}

@media (max-width: 760px) {
  .bills-ledger-card tbody tr td:first-child::before {
    width: 6px;
    height: 18px;
    margin-right: 8px;
  }

  .dashboard-page .dashboard-help-link {
    width: fit-content;
    max-width: 100%;
  }

  .dashboard-page .dashboard-help-close {
    width: 34px;
    max-width: 34px;
  }
}

/* Remove confusing decorative arrow from the main available-cash snapshot card. */
.dashboard-page .snapshot-hero-card::after,
.dashboard-page .snapshot-bento-compact .snapshot-hero-card::after {
  display: none !important;
  content: none !important;
}

.dashboard-page .calendar-bill-sheet-close,
.dashboard-page .dashboard-help-close {
  font-size: 0 !important;
}

.dashboard-page .calendar-bill-sheet-close::before,
.dashboard-page .dashboard-help-close::before {
  content: "X";
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

@media (min-width: 981px) {
  .dashboard-page .snapshot-bento-hero-layout {
    grid-template-columns: minmax(520px, 0.95fr) minmax(0, 1.15fr) !important;
  }

  .dashboard-page .snapshot-bento-compact .snapshot-hero-card {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.82fr) !important;
    align-items: center !important;
  }
}

@media (max-width: 760px) {
  .dashboard-page .snapshot-bento-compact .snapshot-hero-card {
    grid-template-columns: 1fr !important;
  }

  .dashboard-page .cash-checkin-card {
    width: 100%;
  }

  .dashboard-page .snapshot-available-primary strong {
    font-size: clamp(2.1rem, 13vw, 3rem) !important;
  }
}

.dashboard-page .inline-help-link {
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
}

@media (max-width: 700px) {
  .header .nav-menu {
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow: visible !important;
    padding: 2px 0 0 !important;
  }

  .header .nav-menu a,
  .header .nav-menu button {
    min-height: 28px !important;
    padding: 6px 8px !important;
    font-size: 0.72rem !important;
  }
}

@media (max-width: 390px) {
  .header .nav-menu {
    gap: 4px !important;
  }

  .header .nav-menu a,
  .header .nav-menu button {
    padding: 6px 7px !important;
    font-size: 0.68rem !important;
  }
}

/* Dashboard action button polish. Visual only; keeps existing button sizing/layout. */
.dashboard-page .saved-bill-card-actions button,
.dashboard-page .bills-ledger-card button {
  border: 1px solid rgba(15, 42, 77, 0.08) !important;
  box-shadow: 0 6px 14px rgba(15, 42, 77, 0.08) !important;
  letter-spacing: 0 !important;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
}

.dashboard-page .saved-bill-card-actions button:hover,
.dashboard-page .bills-ledger-card button:hover {
  opacity: 1 !important;
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(15, 42, 77, 0.12) !important;
}

.dashboard-page .saved-bill-card-actions button:active,
.dashboard-page .bills-ledger-card button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 42, 77, 0.09) !important;
}

.dashboard-page .saved-bill-card .apply-payment-btn,
.dashboard-page .bills-ledger-card .apply-payment-btn {
  background: linear-gradient(180deg, #1d6fb8, #145da0) !important;
  border-color: #0f4f8c !important;
}

.dashboard-page .saved-bill-card .mark-paid-btn,
.dashboard-page .bills-ledger-card .mark-paid-btn {
  background: linear-gradient(180deg, #1fb85f, #159447) !important;
  border-color: #12823d !important;
}

.dashboard-page .saved-bill-card .secondary-btn,
.dashboard-page .saved-bill-card .edit-bill-btn,
.dashboard-page .bills-ledger-card .secondary-btn,
.dashboard-page .bills-ledger-card .edit-bill-btn {
  background: linear-gradient(180deg, #f3f7fc, #e5edf7) !important;
  border-color: #c9d8ea !important;
  color: #12335c !important;
}

.dashboard-page .saved-bill-card .delete-btn,
.dashboard-page .bills-ledger-card .delete-btn {
  background: linear-gradient(180deg, #fff7f7, #fdeaea) !important;
  border-color: #f7c7c7 !important;
  color: #9f1239 !important;
}

.dashboard-page .saved-bill-card-actions button:disabled,
.dashboard-page .bills-ledger-card button:disabled {
  opacity: 0.62 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.paid-off-debts-section {
  border: 1px solid #b9e5cc;
  border-radius: 14px;
  background: #f5fff9;
  padding: 0.75rem;
}

.paid-off-debts-section summary {
  cursor: pointer;
  font-weight: 800;
  color: #06224a;
}

.paid-off-debts-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.paid-off-debt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid #d8eadf;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.85rem;
}

.paid-off-debt-card h4 {
  margin: 0.35rem 0 0.15rem;
  color: #06224a;
}

.paid-off-debt-card p {
  margin: 0;
  color: #50627e;
  font-size: 0.9rem;
}

.paid-off-debt-stats {
  display: flex;
  gap: 0.5rem;
}

.paid-off-debt-stats span {
  min-width: 8rem;
  border: 1px solid #d9e5f3;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0.5rem 0.65rem;
}

.paid-off-debt-stats small {
  display: block;
  color: #5a6d89;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.paid-off-debt-stats strong {
  color: #06224a;
}

@media (max-width: 760px) {
  .paid-off-debt-card {
    grid-template-columns: 1fr;
  }

  .paid-off-debt-stats {
    flex-direction: column;
  }

  .paid-off-debt-stats span {
    min-width: 0;
  }
}

/* Dashboard snowball target marker. Visual only; uses existing target math. */
.dashboard-page .snowball-target-row {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.08), rgba(20, 93, 160, 0.04));
}

.dashboard-page .snowball-target-card {
  border-color: rgba(22, 163, 74, 0.45) !important;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(20, 93, 160, 0.04) 42%, #ffffff 78%) !important;
  box-shadow: 0 10px 26px rgba(15, 42, 77, 0.12) !important;
}

.dashboard-page .snowball-target-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  background: #ecfdf3;
  color: #0f6b35;
  font-size: 0.66rem;
  font-weight: 900;
}

.dashboard-page .snowball-target-dot {
  width: 10px;
  height: 10px;
  border: 2px solid #16a34a;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    3px -2px 0 -1px #ffffff,
    3px -2px 0 0 #145da0;
}

.dashboard-page .snowball-target-note {
  margin-top: 6px;
  color: #145da0;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
}

@media print {
  body.print-calendar-only .bill-calendar-print-items {
    display: grid !important;
    gap: 2px !important;
    margin-top: 3px !important;
  }

  body.print-calendar-only .bill-calendar-items {
    display: none !important;
  }

  body.print-calendar-only .bill-calendar-print-item {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 2px 3px !important;
    border: 1px solid #dbeafe !important;
    border-radius: 5px !important;
    background: #f8fbff !important;
    color: #102342 !important;
    font-size: 7px !important;
    line-height: 1.08 !important;
    text-align: left !important;
  }

  body.print-calendar-only .bill-calendar-print-item.is-payday {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
  }

  body.print-calendar-only .bill-calendar-print-item span,
  body.print-calendar-only .bill-calendar-print-item strong {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    color: #102342 !important;
    font-size: 7px !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.print-calendar-only .bill-calendar-print-item strong {
    color: #145da0 !important;
    font-weight: 900 !important;
  }
}

/* Premium UI shell, July 2026. Visual-only layer; no dashboard math or data logic lives here. */
body.dashboard-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(120, 181, 223, 0.22), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(22, 163, 74, 0.12), transparent 30%),
    linear-gradient(180deg, #edf6fb 0%, #f6fbff 48%, #eef5fb 100%);
}

body.dashboard-page .calculator-page {
  padding: 28px 0 64px;
  background: transparent;
}

body.dashboard-page .calculator-page > .container {
  position: relative;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid rgba(190, 208, 230, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.88), rgba(246,251,255,0.80)),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.08), transparent 34%);
  box-shadow: 0 24px 70px rgba(15, 35, 71, 0.12);
  backdrop-filter: blur(10px);
}

body.dashboard-page .calculator-page > .container::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

body.dashboard-page [data-dashboard-section] {
  scroll-margin-top: 18px;
}

body.dashboard-page .calculator-card {
  border-radius: 22px;
  border-color: rgba(190, 208, 230, 0.86);
  background:
    radial-gradient(circle at 96% 0%, rgba(120, 181, 223, 0.10), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 34px rgba(15, 35, 71, 0.085);
}

body.dashboard-page .calculator-card:hover {
  border-color: rgba(120, 181, 223, 0.92);
}

body.dashboard-page .dashboard-section-title {
  gap: 12px;
}

body.dashboard-page .dashboard-section-title h3 {
  letter-spacing: 0;
}

body.dashboard-page .section-helper {
  color: #465c73;
}

body.dashboard-page .dashboard-title-actions,
body.dashboard-page .dashboard-actions,
body.dashboard-page .smart-fund-actions,
body.dashboard-page .ai-coach-input-row,
body.dashboard-page .save-choice-actions {
  gap: 8px;
}

body.dashboard-page button,
body.dashboard-page .secondary-btn,
body.dashboard-page .text-btn,
body.dashboard-page .dashboard-help-link {
  border-radius: 12px;
}

body.dashboard-page input,
body.dashboard-page select,
body.dashboard-page textarea {
  border-radius: 12px;
}

body.dashboard-page .paycheck-plan-card,
body.dashboard-page .bills-workspace-card,
body.dashboard-page .debt-progress-card {
  position: relative;
}

body.dashboard-page .paycheck-plan-card::after,
body.dashboard-page .bills-workspace-card::after,
body.dashboard-page .debt-progress-card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #145da0, #16a34a);
  opacity: 0.82;
}

body.dashboard-page .smart-fund-card,
body.dashboard-page .ai-coach-card {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.11), transparent 32%),
    radial-gradient(circle at bottom right, rgba(20, 93, 160, 0.10), transparent 34%),
    linear-gradient(145deg, #ffffff, #f8fbff);
}

body.dashboard-page .mobile-bill-view-switch {
  border-radius: 999px;
}

body.dashboard-page .mobile-bill-view-switch button {
  border-radius: 999px;
}

.dashboard-section-customize-ready [data-dashboard-section],
body.dashboard-page [data-dashboard-section] {
  --section-visible: 1;
}

body.dashboard-page [data-dashboard-section].is-hidden-by-user {
  display: none !important;
}

/* Future blog ad slot: keep ads out until traffic justifies them. */

/* Usable Cash check-in text guard. Visual only; keeps cash check-in math/save logic untouched. */
body.dashboard-page .cash-checkin-card {
  min-width: 0 !important;
  overflow: hidden !important;
}

body.dashboard-page .cash-checkin-card strong {
  max-width: 100% !important;
  font-size: clamp(1.45rem, 7vw, 2.7rem) !important;
  line-height: 0.98 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body.dashboard-page .cash-checkin-actions {
  min-width: 0 !important;
}

body.dashboard-page .cash-checkin-actions input {
  min-width: 0 !important;
  width: 100% !important;
}

/* Final Add Bill polish overrides. Scoped to the dashboard add-bill card only. */
body.dashboard-page .add-bill-card {
  border-color: rgba(147, 197, 253, 0.95) !important;
  background:
    radial-gradient(circle at 93% 14%, rgba(34, 197, 94, 0.18), transparent 31%),
    radial-gradient(circle at 7% 0%, rgba(20, 93, 160, 0.16), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #eef7ff 100%) !important;
  box-shadow: 0 18px 42px rgba(15, 35, 71, 0.10), inset 0 1px 0 rgba(255,255,255,0.96) !important;
}

body.dashboard-page .add-bill-card .dashboard-section-title {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(191, 219, 254, 0.65);
}

body.dashboard-page .add-bill-card .section-helper {
  margin-top: 10px;
  padding: 9px 12px;
  border-left: 4px solid #16a34a;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.58);
}

body.dashboard-page .add-bill-card .enhanced-bill-input {
  display: grid !important;
  grid-template-columns: minmax(210px, 1.1fr) minmax(150px, 0.7fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) !important;
  align-items: stretch !important;
}

body.dashboard-page .add-bill-card .add-bill-payment-source {
  display: grid !important;
  grid-template-columns: auto minmax(170px, 1fr) minmax(230px, 1.45fr) !important;
}

/* Final Bills & Debts card polish. Visual only; no bill math or event logic touched. */
body.dashboard-page .bills-workspace-card {
  border-color: rgba(147, 197, 253, 0.88) !important;
  background:
    radial-gradient(circle at 100% 8%, rgba(34, 197, 94, 0.13), transparent 26%),
    linear-gradient(145deg, #ffffff, #f7fbff) !important;
  box-shadow: 0 18px 42px rgba(15, 35, 71, 0.09), inset 0 1px 0 rgba(255,255,255,0.96) !important;
}

body.dashboard-page .bills-workspace-card > .dashboard-section-title {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, auto) minmax(220px, 1fr);
  align-items: start;
}

body.dashboard-page .bills-workspace-card > .dashboard-section-title > h3 {
  justify-self: start;
}

body.dashboard-page .bills-workspace-card > .dashboard-section-title > .dashboard-title-actions {
  justify-self: end;
}

body.dashboard-page .bills-card-list {
  gap: 12px !important;
}

body.dashboard-page .payoff-method-control {
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 220px;
  color: #17345a;
  font-weight: 800;
  margin-inline: auto;
  grid-column: 2;
  justify-self: center;
}

body.dashboard-page .payoff-method-control > span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #526984;
}

body.dashboard-page .payoff-method-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(147, 197, 253, 0.85);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 10px 20px rgba(15, 35, 71, 0.07);
}

body.dashboard-page .payoff-method-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: #17446f;
  font-weight: 900;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

body.dashboard-page .payoff-method-toggle button.active {
  background: linear-gradient(135deg, #d9982f, #f2c56d);
  color: #08213d;
  box-shadow: 0 8px 18px rgba(217, 152, 47, 0.24);
}

body.dashboard-page .payoff-method-control small {
  max-width: 230px;
  color: #526984;
  font-size: 0.72rem;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 760px) {
  body.dashboard-page .bills-workspace-card > .dashboard-section-title {
    grid-template-columns: 1fr;
  }

  body.dashboard-page .bills-workspace-card > .dashboard-section-title > h3,
  body.dashboard-page .bills-workspace-card > .dashboard-section-title > .dashboard-title-actions,
  body.dashboard-page .bills-workspace-card > .dashboard-section-title > .payoff-method-control {
    justify-self: start;
  }

  body.dashboard-page .dashboard-title-actions {
    align-items: flex-start;
  }

  body.dashboard-page .payoff-method-control {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  body.dashboard-page .payoff-method-control small {
    text-align: left;
  }
}

body.dashboard-page .bills-card-list .saved-bill-card {
  position: relative !important;
  overflow: hidden !important;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.2fr) minmax(250px, 0.8fr) !important;
  border: 1px solid rgba(191, 219, 254, 0.92) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,251,255,0.92)) !important;
  box-shadow: 0 14px 30px rgba(15, 35, 71, 0.075), inset 0 1px 0 rgba(255,255,255,0.96) !important;
}

body.dashboard-page .bills-card-list .saved-bill-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #145da0, #16a34a);
  opacity: 0.82;
}

body.dashboard-page .bills-card-list .saved-bill-card.snowball-target-card {
  border-color: rgba(34, 197, 94, 0.70) !important;
  background:
    radial-gradient(circle at 95% 16%, rgba(34, 197, 94, 0.18), transparent 28%),
    linear-gradient(145deg, #ffffff, #f0fdf4) !important;
}

body.dashboard-page .bills-card-list .saved-bill-card.snowball-target-card::before {
  background: linear-gradient(180deg, #22c55e, #0f766e);
}

body.dashboard-page .bills-card-list .saved-bill-card.bill-paid-this-check {
  border-color: rgba(34, 197, 94, 0.58) !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-top h4 {
  color: #071b38 !important;
  font-size: 1.02rem !important;
  letter-spacing: -0.015em !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-top p {
  color: #526984 !important;
  font-weight: 750 !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-grid > div {
  min-width: 0 !important;
  white-space: normal !important;
  border-radius: 14px !important;
  padding: 9px 10px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 7px 14px rgba(15, 35, 71, 0.04) !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-grid {
  grid-template-columns: repeat(5, minmax(66px, 1fr)) !important;
  gap: 7px !important;
  min-width: 0 !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-grid span {
  letter-spacing: 0.055em !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-grid strong {
  font-size: 0.88rem !important;
  letter-spacing: -0.01em !important;
}

body.dashboard-page .bills-card-list .saved-bill-card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 8px !important;
  border: 1px solid rgba(215, 230, 246, 0.92);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.74);
}

body.dashboard-page .bills-card-list .saved-bill-card-actions .payment-input {
  flex: 0 1 96px !important;
  width: 96px !important;
  min-width: 78px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

@media (max-width: 980px) {
  body.dashboard-page .add-bill-card .enhanced-bill-input {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.dashboard-page .add-bill-card .add-bill-payment-source {
    grid-column: 1 / -1 !important;
  }

  body.dashboard-page .bills-card-list .saved-bill-card-actions {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
}

@media (max-width: 680px) {
  body.dashboard-page .add-bill-card .enhanced-bill-input,
  body.dashboard-page .add-bill-card .add-bill-payment-source {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body.dashboard-page .calculator-page {
    padding-top: 14px;
  }

  body.dashboard-page .calculator-page > .container {
    padding: 10px;
    border-radius: 20px;
  }

  body.dashboard-page .calculator-card {
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 35, 71, 0.075);
  }

  body.dashboard-page .dashboard-title-actions {
    width: 100%;
  }
}

body.dashboard-page .budget-setup-primary-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

body.dashboard-page .budget-setup-danger-zone {
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 247, 247, 0.96), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(127, 29, 29, 0.045);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 13px 14px;
}

body.dashboard-page .budget-setup-danger-zone div {
  display: grid;
  gap: 3px;
}

body.dashboard-page .budget-setup-danger-zone strong {
  color: #7f1d1d;
  font-size: 0.88rem;
}

body.dashboard-page .budget-setup-danger-zone span {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.35;
}

body.dashboard-page .danger-outline-btn {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
  white-space: nowrap;
}

body.dashboard-page .danger-outline-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #881337;
}

body.dashboard-page .paycheck-opportunity-badge {
  background: linear-gradient(145deg, #ecfdf5, #eff6ff) !important;
  border-color: #bbf7d0 !important;
  color: #065f46 !important;
}

@media (max-width: 680px) {
  body.dashboard-page .budget-setup-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  body.dashboard-page .budget-setup-danger-zone .danger-outline-btn {
    width: 100%;
  }
}

/* Calculator bill ledger readability repair.
   Visual only: keeps the calculator data, math, save flow, and dashboard import untouched. */
body:not(.dashboard-page) .bills-ledger-card {
  overflow: visible;
}

body:not(.dashboard-page) .bills-ledger-card .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 10px;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th,
body:not(.dashboard-page) .bills-ledger-card #billsTable td {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.25;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(1),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(1) {
  width: 44px;
  text-align: center;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(2),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(2) {
  width: 22%;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(3),
body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(4),
body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(5),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(3),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(4),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(5) {
  width: 14%;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(6),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(6) {
  width: 16%;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(7),
body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) {
  width: 96px;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) button {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 32px;
  padding: 6px 8px !important;
}

@media (max-width: 1100px) {
  body:not(.dashboard-page) .bills-ledger-card .table-wrap {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable,
  body:not(.dashboard-page) .bills-ledger-card #billsTable tbody {
    display: block;
    width: 100%;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable tr:first-child {
    display: none;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable tr {
    display: grid;
    grid-template-columns: 26px minmax(70px, 1.35fr) minmax(54px, 0.9fr) minmax(54px, 0.9fr) minmax(48px, 0.75fr) minmax(58px, 0.9fr) minmax(34px, auto);
    gap: 4px;
    width: 100%;
    margin: 0 0 12px;
    padding: 8px;
    border: 1px solid var(--line, #d8e4ec);
    border-radius: 12px;
    background:
      radial-gradient(circle at top right, rgba(46, 111, 149, 0.08), transparent 36%),
      linear-gradient(145deg, var(--card, #ffffff), var(--ice2, #f5f9fb));
    box-shadow: var(--shadow, 0 2px 12px rgba(22, 50, 79, 0.08));
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td {
    display: flex;
    width: auto !important;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 7px 6px;
    border: 1px solid var(--line, #d8e4ec) !important;
    border-radius: 9px !important;
    background: #ffffff !important;
    color: var(--navy, #16324f) !important;
    font-size: clamp(0.58rem, 1.85vw, 0.82rem);
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td::before {
    content: none !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(2) {
    justify-content: flex-start;
    text-align: left;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td.balance,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(3) {
    background: #ffebee !important;
    border-color: #ffcdd2 !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td.monthly-payment,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(4) {
    background: #fff9c4 !important;
    border-color: #fef08a !important;
    color: #7c4a03 !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td.due-date,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(5) {
    background: #e3f2fd !important;
    border-color: #bbdefb !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) {
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    padding-inline: 3px;
  }
}

@media (min-width: 1101px) {
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) .edit-btn,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) .delete-btn {
    min-width: 34px !important;
    width: 34px !important;
    padding: 6px !important;
  }
}

@media (max-width: 560px) {
  body:not(.dashboard-page) .bills-ledger-card #billsTable tr {
    grid-template-columns: 20px minmax(58px, 1fr) minmax(48px, 0.72fr) minmax(48px, 0.72fr) minmax(40px, 0.62fr) minmax(48px, 0.72fr) minmax(30px, auto);
    gap: 3px;
    padding: 6px;
    border-radius: 12px;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td {
    align-items: center;
    min-height: 34px;
    padding: 5px 4px;
    border-radius: 8px !important;
    font-size: clamp(0.53rem, 1.65vw, 0.72rem);
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(1) {
    align-items: center;
    padding: 4px 3px;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(2) {
    font-size: clamp(0.58rem, 1.8vw, 0.78rem);
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) {
    align-items: center;
    min-height: 34px;
    padding: 4px 3px;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) button {
    min-height: 26px;
    min-width: 26px;
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
  }
}

/* Live calculator/dashboard bill-row fixes.
   Visual only: keeps bill math, saves, dashboard import, and Firestore logic untouched. */
body:not(.dashboard-page) .calculator-card > ol.section-helper {
  margin: 0;
  padding: 14px 18px 14px 2.25rem;
  border-left: 3px solid var(--gold, #d9982f);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(233, 242, 247, 0.95), rgba(245, 249, 251, 0.55));
  list-style-position: outside;
}

body:not(.dashboard-page) .calculator-card > ol.section-helper li {
  padding-left: 0.2rem;
  margin: 0.25rem 0;
}

/* Match calculator health tiles to the bill ledger color language. */
body:not(.dashboard-page) .budget-health-card .calculator-total-debt-card {
  background: linear-gradient(135deg, #fff1f3 0%, #ffffff 74%) !important;
  border-color: #fecdd3 !important;
  box-shadow: inset 4px 0 0 #22a86b, 0 12px 26px rgba(22, 50, 79, 0.06) !important;
}

body:not(.dashboard-page) .budget-health-card .calculator-total-debt-card strong {
  color: #071b38 !important;
}

body:not(.dashboard-page) .budget-health-card .calculator-monthly-payments-card {
  background: linear-gradient(135deg, #fff8d7 0%, #ffffff 74%) !important;
  border-color: #fde68a !important;
  box-shadow: inset 4px 0 0 #22a86b, 0 12px 26px rgba(22, 50, 79, 0.06) !important;
}

body:not(.dashboard-page) .budget-health-card .calculator-monthly-payments-card strong {
  color: #7c4a00 !important;
}

body:not(.dashboard-page) .budget-health-card .calculator-safe-after-bills-card {
  background: linear-gradient(135deg, #e9fff2 0%, #ffffff 74%) !important;
  border-color: #bbf7d0 !important;
  box-shadow: inset 4px 0 0 #22a86b, 0 12px 26px rgba(22, 50, 79, 0.06) !important;
}

body:not(.dashboard-page) .budget-health-card .calculator-safe-after-bills-card strong {
  color: #007a4d !important;
}

@media (max-width: 1100px) {
  body:not(.dashboard-page) .bills-ledger-card .table-wrap {
    border: 1px solid var(--line, #d8e4ec) !important;
    border-radius: 12px !important;
    background: var(--card, #ffffff) !important;
    overflow: hidden !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable tbody {
    display: table-row-group !important;
    width: 100% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable tr,
  body:not(.dashboard-page) .bills-ledger-card #billsTable tr:first-child {
    display: table-row !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td {
    display: table-cell !important;
    min-width: 0 !important;
    padding: 7px 4px !important;
    border: 1px solid var(--line, #d8e4ec) !important;
    border-radius: 0 !important;
    color: var(--navy, #16324f) !important;
    font-size: clamp(0.5rem, 1.5vw, 0.76rem) !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td::before {
    content: none !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(1),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(1) {
    width: 7% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(2),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(2) {
    width: 22% !important;
    text-align: left !important;
    white-space: normal !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(3),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(3),
  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(4),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(4) {
    width: 16% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(5),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(5) {
    width: 13% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(6),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(6) {
    width: 14% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(7),
  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) {
    width: 12% !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable td:nth-child(7) button {
    min-width: 26px !important;
    min-height: 26px !important;
    padding: 4px 5px !important;
    font-size: clamp(0.52rem, 1.4vw, 0.7rem) !important;
  }
}

@media (max-width: 560px) {
  body:not(.dashboard-page) .bills-ledger-card #billsTable th,
  body:not(.dashboard-page) .bills-ledger-card #billsTable td {
    padding: 6px 3px !important;
    font-size: clamp(0.46rem, 1.35vw, 0.64rem) !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(4),
  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(6) {
    font-size: 0 !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(4)::after {
    content: "Pay";
    font-size: clamp(0.46rem, 1.35vw, 0.64rem) !important;
  }

  body:not(.dashboard-page) .bills-ledger-card #billsTable th:nth-child(6)::after {
    content: "Check";
    font-size: clamp(0.46rem, 1.35vw, 0.64rem) !important;
  }
}

/* Keep calendar bill details as a full-screen viewer above the dashboard. */
body.bill-detail-modal-open {
  overflow: hidden !important;
}

.bill-detail-modal,
.calendar-bill-sheet {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: block !important;
  min-height: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
  z-index: 99999 !important;
}

.bill-detail-modal.hidden,
.calendar-bill-sheet.hidden {
  display: none !important;
}

.bill-detail-modal-panel,
.calendar-bill-sheet-panel {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  left: 12px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: auto !important;
  margin: 0 !important;
  transform: none !important;
  border-radius: 18px !important;
}

@media (min-width: 720px) {
  .bill-detail-modal-panel,
  .calendar-bill-sheet-panel {
    top: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    left: 20px !important;
    width: auto !important;
    max-height: none !important;
    transform: none !important;
  }
}

/* Security reassurance note (login + dashboard add-bill) */
.security-reassurance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #cfe3d6;
  border-radius: 10px;
  background: #f2f9f4;
  color: #285a3c;
  font-size: 0.85rem;
  line-height: 1.5;
}
.security-reassurance .security-lock {
  flex: none;
  font-size: 0.95rem;
  line-height: 1.4;
}




/* ============================================================
   Canonical site footer sitemap (.syd-site-footer) — sitewide
   connectivity. Injected/generated on every page.
   ============================================================ */
.syd-site-footer{position:relative;overflow:hidden;background:radial-gradient(circle at 12% 0,rgba(46,111,149,.42),transparent 34%),radial-gradient(circle at 92% 18%,rgba(217,152,47,.2),transparent 30%),linear-gradient(135deg,#07172d,#102a52 58%,#16324f);color:#d8e4ec;margin-top:44px;padding:52px 20px 0;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;}
.syd-site-footer *{box-sizing:border-box;}
.syd-site-footer::before{content:"";position:absolute;inset:18px 20px auto;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);}
.syd-footer-inner{position:relative;width:min(1200px,100%);margin:0 auto;display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr 1fr;gap:26px;}
.syd-footer-brand .syd-footer-logo{font-weight:800;font-size:1.08rem;color:#fff;display:block;}
.syd-footer-brand p{margin:9px 0 15px;font-size:.9rem;line-height:1.55;color:#9fb2c9;max-width:34ch;}
.syd-footer-cta{display:inline-flex;align-items:center;min-height:42px;padding:10px 17px;border-radius:8px;background:#d9982f;color:#16324f;font-weight:800;text-decoration:none;font-size:.9rem;}
.syd-footer-cta:hover{background:#c8892a;}
.syd-footer-social{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}
.syd-footer-social a{display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(216,228,236,.24);border-radius:999px;background:rgba(255,255,255,.08);color:#fff;text-decoration:none;font-size:.82rem;font-weight:800;box-shadow:0 10px 24px rgba(0,0,0,.16);}
.syd-footer-social a:hover,.syd-footer-social a:focus-visible{transform:translateY(-1px);background:#d9982f;color:#16324f;border-color:#d9982f;text-decoration:none;outline:none;}
.syd-footer-book-card{display:grid;grid-template-columns:42px 1fr;align-items:center;gap:10px;width:min(245px,100%);margin-top:18px;padding:9px;border:1px solid rgba(216,228,236,.22);border-radius:12px;background:rgba(255,255,255,.08);box-shadow:0 14px 28px rgba(0,0,0,.18);text-decoration:none;color:#d8e4ec;transition:transform .18s ease,border-color .18s ease,background .18s ease;}
.syd-footer-book-card:hover,.syd-footer-book-card:focus-visible{transform:translateY(-1px);border-color:rgba(217,152,47,.72);background:rgba(255,255,255,.12);outline:none;text-decoration:none;}
.syd-footer-book-card img{width:42px;height:58px;object-fit:cover;border-radius:6px;box-shadow:0 8px 18px rgba(0,0,0,.28);}
.syd-footer-book-card strong{display:block;color:#fff;font-size:.82rem;line-height:1.2;}
.syd-footer-book-card em{display:block;margin-top:3px;color:#adc2d5;font-size:.72rem;line-height:1.25;font-style:normal;}
.syd-footer-col h3{margin:0 0 12px;font-size:.76rem;letter-spacing:.06em;text-transform:uppercase;color:#8fc5e4;}
.syd-footer-col a{display:block;padding:5px 0;color:#cdd8e6;text-decoration:none;font-size:.9rem;line-height:1.3;}
.syd-footer-col a:hover{color:#fff;text-decoration:underline;}
.syd-footer-bottom{position:relative;width:min(1200px,100%);margin:28px auto 0;padding:16px 0 24px;border-top:1px solid rgba(255,255,255,.14);display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:.8rem;color:#adc2d5;}
@media(max-width:900px){.syd-footer-inner{grid-template-columns:1fr 1fr;}}
@media(max-width:520px){.syd-footer-inner{grid-template-columns:1fr;gap:20px;}.syd-site-footer{padding-top:34px;}}
