:root {
  --bg: #f5f7fb;
  --panel: #fff;
  --ink: #101828;
  --text: #344054;
  --muted: #667085;
  --line: #dfe5ee;
  --soft: #eef3f8;
  --nav: #111827;
  --teal: #0c9b8e;
  --blue: #2563eb;
  --saffron: #d99016;
  --red: #d94b3d;
  --green: #138a5b;
  --shadow: 0 18px 45px rgba(16, 24, 40, .08);
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.modal-loading { cursor: progress; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(12,155,142,.09), transparent 34%),
    linear-gradient(315deg, rgba(37,99,235,.1), transparent 38%),
    #f6f8fc;
}
.login-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-card h1 { margin: 22px 0 6px; font-size: 30px; line-height: 1.05; }
.login-card p { margin: 0 0 20px; line-height: 1.6; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand span, .muted { color: var(--muted); }
.login-card .brand strong { color: var(--ink); }

.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label {
  color: #536078;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.field input, .field select, .field textarea, .search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  font-size: 14px;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search:focus {
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.field input:-webkit-autofill,
.field textarea:-webkit-autofill,
.field select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--ink);
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  font-size: 14px;
}
.btn:hover { border-color: #c8d2e0; background: #f8fafc; }
.btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 12px 26px rgba(37,99,235,.18); }
.btn.primary:hover { background: #1d4ed8; }
.btn.danger { border-color: rgba(217,75,61,.25); color: var(--red); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 12px; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}
.sidebar {
  height: 100vh;
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px;
  background: var(--nav);
  color: #d8e0ec;
  overflow-y: auto;
  z-index: 12;
}
.sidebar .brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar .brand span { display: block; color: #9aa7bb; font-size: 12px; margin-top: 2px; }

.nav {
  display: grid;
  align-content: start;
  gap: 6px;
}
.nav a {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  font-weight: 780;
  font-size: 14px;
}
.nav a.active, .nav a:hover {
  background: rgba(255,255,255,.09);
  color: #fff;
}
.nav a.active {
  box-shadow: inset 3px 0 0 var(--teal);
}
.nav svg {
  width: 19px;
  height: 19px;
  color: #dbe4ef;
  stroke-width: 2;
}
.nav a.active svg,
.nav a:hover svg { color: #fff; }
.nav small {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: rgba(12,155,142,.2);
  color: #a9f7df;
  font-size: 11px;
  font-weight: 900;
}
.workspace {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
}
.workspace strong { display: block; color: #fff; font-size: 13px; }
.workspace p { margin: 7px 0 12px; color: #b8c4d6; font-size: 12px; line-height: 1.45; }
.workspace-btn {
  width: 100%;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.workspace-btn:hover { background: #0faaa0; color: #fff; }

.main { min-width: 0; }
.topbar {
  min-height: 72px;
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(280px, 560px) minmax(420px, 500px) 52px minmax(270px, 340px);
  gap: 12px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.top-search {
  position: relative;
  display: grid;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #667085;
  font-size: 18px;
  pointer-events: none;
}
.search {
  height: 52px;
  padding-left: 42px;
  border-radius: 9px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.context-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}
.notify-btn {
  position: relative;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #475467;
  font-size: 22px;
}
.notify-btn span {
  position: absolute;
  right: 14px;
  top: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}
.profile {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
}
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 12px;
  font-weight: 900;
}
.profile strong { display: block; font-size: 13px; }
.profile .muted { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.content { padding: 30px 28px 60px; }
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
.page-head h1 { margin: 0 0 6px; font-size: 36px; line-height: 1.1; letter-spacing: 0; }
.page-head p { margin: 0; color: #536078; }
.actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.dash-hero {
  min-height: 214px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid rgba(17,24,39,.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(12,155,142,.94), rgba(17,24,39,.96) 52%, rgba(37,99,235,.9)),
    #111827;
  color: #fff;
  box-shadow: 0 24px 60px rgba(17,24,39,.2);
  overflow: hidden;
  position: relative;
}
.dash-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.dash-hero > * { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 11px;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
  color: #c8fff2;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.dash-hero h1 {
  max-width: 720px;
  margin: 16px 0 10px;
  font-size: 46px;
  line-height: 1;
  letter-spacing: 0;
}
.dash-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.hero-actions .btn {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.1);
  color: #fff;
}
.hero-actions .btn.primary {
  border-color: #fff;
  background: #fff;
  color: #111827;
}
.premium-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.premium-kpi {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.premium-kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}
.premium-kpi.primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.premium-kpi.primary small,
.premium-kpi.primary span { color: rgba(255,255,255,.72); }
.premium-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.premium-kpi strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.05;
}
.premium-kpi small { color: var(--muted); font-weight: 750; }
.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .75fr);
  gap: 18px;
  align-items: start;
}
.pipeline-panel .panel-body { background: linear-gradient(180deg, #fff, #f8fafc); }
.insight-rail { display: grid; gap: 18px; }
.action-panel { margin-bottom: 0; }
.dash-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.source-list { display: grid; gap: 16px; }
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.meta-row span { color: var(--muted); font-size: 13px; font-weight: 750; }
.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f7;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi, .panel, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 18px;
}
.kpi::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(12,155,142,.09);
}
.kpi span {
  position: relative;
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.kpi strong {
  position: relative;
  display: block;
  margin-top: 10px;
  font-size: 29px;
  line-height: 1;
}

.panel {
  overflow: hidden;
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0 0 4px; font-size: 18px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 18px 20px; }
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  gap: 18px;
  align-items: start;
}
.timeline {
  min-height: 320px;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.stage {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 12px;
}
.journey-stage { justify-content: flex-start; }
.stage-cards {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.stage small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.stage-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 900;
}
.stage-title strong {
  min-width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: #e5fbf7;
  color: #08766d;
}
.stage-fill {
  margin-top: 18px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(37,99,235,.9), rgba(12,155,142,.9));
}
.mini-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(16,24,40,.04);
}
.mini-card:hover {
  border-color: #c8d2e0;
  box-shadow: 0 14px 28px rgba(16,24,40,.08);
}
.person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.person strong,
.person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person small { color: var(--muted); }
.mini-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.queue { display: grid; gap: 10px; }
.queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.reminder-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 14px;
}
.task-item {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 78px;
}
.task-item.done strong,
.task-item.done small {
  color: #98a2b3;
  text-decoration: line-through;
}
.task-check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #bdd0e8;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.task-item.done .task-check {
  border-color: var(--teal);
  background: var(--teal);
}
.invoice-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 78px;
}
.smart-panel .panel-body {
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.queue-item:hover {
  border-color: #c8d2e0;
  box-shadow: 0 12px 28px rgba(16,24,40,.07);
}
.queue-item strong, .queue-item small { display: block; }
.queue-item small { margin-top: 3px; color: var(--muted); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  padding: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { line-height: 1.55; }
.panel-body .cards { margin: 0; }
.actions.left { justify-content: flex-start; }
.inline-form { display: inline-flex; margin: 0; }
.metric-row { margin-bottom: 18px; }
.crm-table td { height: 74px; }
.fake-select {
  min-width: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border: 0;
  border-radius: 99px;
  background: #eef4ff;
  color: #174ea6;
  font-size: 13px;
  font-weight: 850;
}
.fake-select::after { content: none; }
.catalog-cards,
.portal-grid,
.message-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.catalog-card,
.portal-card,
.message-card {
  min-height: 176px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 35px rgba(16,24,40,.05);
}
.catalog-card .meta-row,
.portal-card .meta-row,
.message-card .meta-row {
  align-items: flex-start;
}
.catalog-card h3,
.portal-card h3,
.message-card h3 {
  color: #536078;
  font-size: 17px;
}
.portal-card p,
.catalog-card p,
.message-card p {
  margin: 12px 0;
  color: #536078;
}
.portal-card .actions,
.catalog-card .actions,
.message-card .actions {
  margin-top: 14px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15,23,42,.42);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(980px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15,23,42,.26);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
}
.modal-head h2 {
  margin: 0 0 4px;
  font-size: 25px;
}
.modal-head p {
  margin: 0;
  color: var(--muted);
}
.modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}
.modal form {
  padding: 24px;
}

.table-wrap { overflow: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}
.data-table th {
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.data-table tr:hover td { background: #fbfdff; }

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 99px;
  background: #eef4ff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.tag.green { background: #e8f7ef; color: var(--green); }
.tag.red { background: #fff0ee; color: var(--red); }
.tag.amber { background: #fff6e6; color: #a05b00; }
.tag.teal { background: #e5fbf7; color: #08766d; }

.flash, .error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 750;
}
.flash { border: 1px solid #b7e4ce; background: #effaf4; color: #0c6a46; }
.error { border: 1px solid #ffd0cb; background: #fff3f1; color: var(--red); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field.full { grid-column: 1 / -1; }
.empty { padding: 24px 12px; color: var(--muted); text-align: center; font-size: 13px; }
code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

@media print {
  .sidebar, .topbar, .page-head .actions, .no-print { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  .panel, .kpi, .card { box-shadow: none; }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar .brand div:last-child, .nav span, .workspace { display: none; }
  .sidebar .brand { justify-content: center; }
  .nav a { grid-template-columns: 1fr; place-items: center; }
  .topbar { grid-template-columns: 1fr 1fr; }
  .notify-btn { display: none; }
  .profile { grid-column: span 2; }
  .kpis, .cards, .premium-kpis, .catalog-cards, .portal-grid, .message-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid, .grid-main, .dash-layout, .dash-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { height: auto; min-height: 0; position: static; padding: 12px; }
  .sidebar .brand { justify-content: flex-start; border-bottom: 0; padding-bottom: 0; }
  .sidebar .brand div:last-child { display: block; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .nav span { display: inline; }
  .nav a { grid-template-columns: 24px 1fr auto; min-width: max-content; }
  .topbar { position: static; grid-template-columns: 1fr; padding: 14px; }
  .context-form { grid-template-columns: 1fr; }
  .profile { grid-column: auto; }
  .content { padding: 18px; }
  .page-head { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .dash-hero { grid-template-columns: 1fr; padding: 22px; }
  .dash-hero h1 { font-size: 34px; }
  .hero-actions { justify-content: flex-start; }
  .kpis, .cards, .form-grid, .premium-kpis, .catalog-cards, .portal-grid, .message-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 12px; place-items: start center; }
  .modal { max-height: calc(100vh - 24px); }
}

/* MHR CRM update: branch/business-scoped applicants, inline document fields and payment modal */
.payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.payment-summary > div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
}
.payment-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.payment-summary strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
}
.payment-summary .due-box {
  grid-column: 1 / -1;
  background: rgba(217,75,61,.06);
  border-color: rgba(217,75,61,.22);
}
.payment-summary .due-box strong { font-size: 22px; color: var(--red); }
.field input[readonly] { background: #f8fafc; color: var(--muted); }
@media (max-width: 640px) { .payment-summary { grid-template-columns: 1fr; } }
