/* CheQout visual refinement. Load after cheqout.css. */
:root {
  --cq-black: #151217;
  --cq-ground: #f6f4f2;
  --cq-surface-2: #faf8f7;
  --cq-border: #ded9dd;
  --cq-field-border: #c9c1c8;
  --cq-radius-surface: .5rem;
  --cq-radius-field: .35rem;
  --cq-radius-action: .45rem;
  --bs-body-font-weight: 400;
}

body { font-weight: 400; }
.cq-nav .nav-link { padding-block: 1rem !important; }

/* Brand-dark navigation; white page title. */
.band { background: #fff; color: var(--cq-ink); border-bottom: 1px solid var(--cq-border); }
.band .shell { padding-block: 1.5rem 1.7rem; }
.band .area {
  color: var(--cq-purple); font-size: .7rem; font-weight: 700;
  line-height: 1.4; letter-spacing: .13em; margin-bottom: .45rem;
}
.band h1 { color: var(--cq-ink); font-size: clamp(1.7rem, 1.35rem + 1.4vw, 2.3rem); letter-spacing: -.03em; }
.band p.lede { color: var(--cq-muted); font-size: .85rem; }
.band .band-note { color: var(--cq-muted); border-color: var(--cq-border); }

.section-head { margin: 1.7rem 0 .7rem; }
.section-head h2 { font-size: 1.13rem; }
.card { --bs-card-bg: #fff; --bs-card-spacer-x: 1.25rem; --bs-card-spacer-y: 1.25rem; }
.card-header { border-bottom-color: var(--cq-border); }
.btn { --bs-btn-font-weight: 600; --bs-btn-padding-x: 1rem; }
.btn-sm { --bs-btn-padding-x: .7rem; }
.form-control, .form-select { min-height: 2.4rem; }

.account-rail h2 { color: var(--cq-muted); letter-spacing: .12em; }
.account-rail a { border-left-width: 3px; padding: .45rem .75rem; }
.account-rail a[aria-current="page"] { background: var(--cq-lilac-tint); color: var(--cq-purple-active); }
.field-grid { gap: 1.15rem 1.5rem; }
.field-grid dt { font-size: .76rem; font-weight: 400; }
.field-grid dd { font-size: .98rem; font-weight: 600; overflow-wrap: anywhere; }

/* Account overview's existing money section supplies the dark brand moment. */
section[aria-labelledby="uiOwesTitle"] .card {
  --bs-card-bg: #2b1930;
  --bs-card-border-color: #2b1930;
  color: #fff;
  background: #2b1930;
  border-bottom: 3px solid var(--cq-gold);
}
section[aria-labelledby="uiOwesTitle"] .field-grid dt { color: var(--cq-lilac); }
section[aria-labelledby="uiOwesTitle"] .field-grid dd { color: #fff; font-size: 1.18rem; font-weight: 700; }
section[aria-labelledby="uiOwesTitle"] .field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
section[aria-labelledby="uiOwesTitle"] .owes-marker { margin-left: .12em; font-size: .7em; }
/* Match the card's four columns so each numbered note begins below its amount. */
section[aria-labelledby="uiOwesTitle"] .owes-context {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem;
  margin: .4rem 0 0; padding-inline: 1.25rem; color: var(--cq-muted);
  font-size: .78rem; font-weight: 400;
}
section[aria-labelledby="uiOwesTitle"] .owes-context-date { grid-column: 1; }
section[aria-labelledby="uiOwesTitle"] .owes-context-interest { grid-column: 3 / 5; }
section[aria-labelledby="uiOwesTitle"] .owes-context-item:empty { display: none; }

.search-form {
  margin: 0; padding: 1.25rem;
  background: #fff; border: 1px solid var(--cq-border);
  border-top: 3px solid var(--cq-purple); border-radius: var(--cq-radius-surface);
}
.table { --bs-table-striped-bg: #faf8f7; --bs-table-border-color: #ebe7e9; }
.table > thead th {
  color: var(--cq-muted); background: #fcfbfa !important;
  border-bottom: 1px solid var(--cq-border);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
}
.table > tbody td, .table > tbody th { padding-block: .7rem; }
.card-link-cell { font-weight: 700; }

@media (max-width: 767.98px) {
  section[aria-labelledby="uiOwesTitle"] .field-grid,
  section[aria-labelledby="uiOwesTitle"] .owes-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section[aria-labelledby="uiOwesTitle"] .owes-context-interest { grid-column: 2; }
  .band .shell { padding-block: 1.2rem 1.4rem; }
  .search-form { padding: .8rem; }
  .account-rail {
    position: static; display: flex; align-items: center; gap: .8rem;
    overflow-x: auto; white-space: nowrap; margin-top: 1rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--cq-border);
  }
  .account-rail h2 { flex: none; margin: 0; }
  .account-rail ul { display: flex; flex: none; gap: .2rem; }
  .account-rail a { border-left: 0; border-bottom: 2px solid transparent; }
  .account-rail a[aria-current="page"] { border-bottom-color: var(--cq-purple); }
}

@media (max-width: 479.98px) {
  section[aria-labelledby="uiOwesTitle"] .field-grid,
  section[aria-labelledby="uiOwesTitle"] .owes-context { grid-template-columns: minmax(0, 1fr); }
  section[aria-labelledby="uiOwesTitle"] .owes-context-interest { grid-column: 1; }
}
