/* Wonder Water PayLink - deep navy, ocean blue and electric cyan over an
   icy canvas. All assets are local; no remote fonts or scripts
   (CSP style-src 'self'). Roboto is self-hosted under OFL-1.1
   (see static/fonts/OFL.txt). */

@font-face {
  font-family: "Roboto";
  src: url("fonts/Roboto-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #03143B;
  --navy-2: #061D4D;
  --ocean: #0069A8;
  --ocean-deep: #045E93;
  --cyan: #08CEDB;
  --cyan-bright: #24E6E8;
  --canvas: #EAF8FC;
  --canvas-ring: rgba(8, 206, 219, 0.10);
  --card: #fdfeff;
  --card-border: #bcd9e8;
  --ink: #0a2440;
  --ink-deep: #03143B;
  --muted: #4e6a85;
  --amber: #b45309;
  --amber-bg: #fdf3df;
  --coral: #c2452e;
  --coral-bg: #fbeae5;
  --green-bg: #e2f5ee;
  --gray-bg: #eaf3f8;
  --focus: #08CEDB;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(3, 20, 59, 0.06), 0 10px 30px rgba(0, 105, 168, 0.10);
  --font-body: "Roboto", Arial, sans-serif;
  --font-display: "Roboto", Arial, sans-serif;
  --content-width: 1440px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(1100px 540px at 85% -12%, rgba(36, 230, 232, 0.20), transparent 62%),
    radial-gradient(760px 460px at -8% 26%, rgba(0, 105, 168, 0.10), transparent 62%),
    radial-gradient(640px 640px at 50% 120%, rgba(0, 105, 168, 0.07), transparent 65%),
    linear-gradient(180deg, #f3fbfe 0%, var(--canvas) 100%);
  background-attachment: fixed;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* faint concentric water rings over the admin canvas gradient, behind
   the app chrome; customer pages keep their own dramatic backdrop */
body:not(.customer-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 92% 8%, transparent 118px, var(--canvas-ring) 119px, transparent 121px, transparent 178px, var(--canvas-ring) 179px, transparent 181px),
    radial-gradient(circle at 4% 78%, transparent 88px, var(--canvas-ring) 89px, transparent 91px, transparent 142px, rgba(0, 105, 168, 0.07) 143px, transparent 145px);
}
.masthead, .page, .footer { position: relative; z-index: 1; }

/* ---------- environment banner (APP_ENV=test only) ---------- */

.env-banner {
  /* sticky in normal flow: pins to the viewport top while scrolling and
     stays above the app chrome (z-index 1) without overlaying content */
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(90deg, #8c0018 0%, #c8102e 45%, #a0001f 100%);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  padding: 0.5rem 1rem;
  border-bottom: 3px solid #ffd43b;
  box-shadow: 0 2px 10px rgba(140, 0, 24, 0.45);
}

/* ---------- staging palette (body.test-environment only) ---------- */

body.test-environment {
  /* warm peach/rose canvas replaces the icy blue, unmistakably staging */
  --staging-canvas: #fdeee2;
  --staging-ring: rgba(178, 58, 42, 0.12);
  background-color: var(--staging-canvas);
  background-image:
    radial-gradient(1100px 540px at 85% -12%, rgba(210, 92, 60, 0.20), transparent 62%),
    radial-gradient(760px 460px at -8% 26%, rgba(178, 58, 42, 0.12), transparent 62%),
    radial-gradient(640px 640px at 50% 120%, rgba(178, 58, 42, 0.08), transparent 65%),
    linear-gradient(180deg, #fff7ef 0%, var(--staging-canvas) 100%);
  --canvas-ring: var(--staging-ring);
}

body.customer-body.test-environment {
  /* burgundy/terracotta replaces the dark ocean checkout backdrop */
  --staging-burgundy: #4a0e1e;
  --staging-terracotta: #8f3a24;
  background-color: var(--staging-burgundy);
  background-image:
    radial-gradient(1100px 640px at 50% -18%, rgba(216, 106, 74, 0.30), transparent 60%),
    radial-gradient(880px 560px at 92% 112%, rgba(178, 58, 42, 0.28), transparent 55%),
    radial-gradient(780px 520px at 6% 92%, rgba(61, 12, 24, 0.60), transparent 62%),
    radial-gradient(circle at 88% 22%, transparent 128px, rgba(216, 106, 74, 0.14) 129px, transparent 131px, transparent 196px, rgba(216, 106, 74, 0.08) 197px, transparent 199px),
    radial-gradient(circle at 10% 70%, transparent 92px, rgba(216, 106, 74, 0.12) 93px, transparent 95px),
    linear-gradient(165deg, var(--staging-burgundy) 0%, #5c1526 45%, var(--staging-terracotta) 125%);
}

.display { font-family: var(--font-display); font-weight: 700; color: var(--ink-deep); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; }
.text-error { color: var(--coral); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- masthead ---------- */

.masthead {
  color: #f2fbfe;
  border-bottom: 3px solid var(--cyan);
  background-color: var(--navy);
  background-image:
    radial-gradient(520px 200px at 78% -60%, rgba(36, 230, 232, 0.22), transparent 66%),
    radial-gradient(circle at 96% 60%, transparent 34px, rgba(36, 230, 232, 0.16) 35px, transparent 37px, transparent 58px, rgba(36, 230, 232, 0.10) 59px, transparent 61px),
    linear-gradient(115deg, var(--navy) 0%, var(--navy-2) 48%, var(--ocean) 135%);
}
.masthead-inner {
  max-width: var(--content-width); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo { display: block; width: 129px; height: 24px; }
.brand-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--cyan-bright); letter-spacing: 0.01em;
}
.masthead-tag { font-size: 13px; color: #a9d7e8; letter-spacing: 0.05em; text-transform: uppercase; }
.masthead-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.masthead-nav a {
  color: #d3ecf5; text-decoration: none; font-size: 15px;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.masthead-nav a:hover { color: #fff; }
.masthead-nav a[aria-current="page"] { border-bottom-color: var(--cyan-bright); color: #fff; }
.logout-form { margin: 0; }
.link-button {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: #d3ecf5; font: inherit; font-size: 15px;
  border-bottom: 2px solid transparent;
}
.link-button:hover { color: #fff; }

/* ---------- layout ---------- */

.page { flex: 1; width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 28px 20px 48px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-head h1 { margin: 0 0 2px; font-size: 30px; }
.page-head p { margin: 0; }

.auth-layout { display: flex; justify-content: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 520px; padding: 32px; }

.footer {
  text-align: center; padding: 18px 16px 28px;
  font-size: 13px; color: var(--muted);
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card-title {
  margin: 0 0 14px; font-size: 14px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.form-card { max-width: 900px; }
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field textarea, .field select,
.filter-bar input, .filter-bar select {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff;
  border: 1px solid #aacfdd; border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus,
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--ocean); }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.field-error { margin: 6px 0 0; font-size: 13px; color: var(--coral); font-weight: 600; }
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

.amount-row { display: flex; align-items: center; gap: 10px; }
.amount-row input { max-width: 200px; }
.amount-currency { font-weight: 700; color: var(--ink-deep); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; padding: 10px 18px; font: inherit; font-size: 15px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--ink-deep); background: #fff;
  border: 1px solid #aacfdd; border-radius: var(--radius-sm);
  transition: background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--gray-bg); border-color: #7fb8d2; }
.btn-primary {
  background: linear-gradient(135deg, var(--ocean) 0%, #0583c0 100%);
  border-color: var(--ocean-deep);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean) 100%); border-color: var(--navy); }
.btn-quiet { background: transparent; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-small { padding: 5px 12px; font-size: 13px; }
.btn-caution { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.btn-caution:hover { background: #faecd0; }
.btn-approve {
  background: linear-gradient(135deg, var(--ocean) 0%, #0583c0 100%);
  border-color: var(--ocean-deep); color: #fff;
}
.btn-approve:hover { background: linear-gradient(135deg, var(--ocean-deep) 0%, var(--ocean) 100%); border-color: var(--navy); }
.btn-decline { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-decline:hover { background: #a93a26; border-color: #a93a26; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- flashes ---------- */

.flashes { margin-bottom: 18px; }
.flash {
  margin: 0 0 8px; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; border: 1px solid transparent;
}
.flash-success { background: var(--green-bg); border-color: #b3e2d4; color: #14532d; }
.flash-error { background: var(--coral-bg); border-color: #f0c8bc; color: #8a2f1d; }
.flash-warning { background: var(--amber-bg); border-color: #eed9ab; color: #7a5307; }
.flash-info { background: #e4f3fa; border-color: #bcdcec; color: var(--ink-deep); }

/* ---------- filters / table ---------- */

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
}
.filter-bar input[type="search"] { flex: 1 1 240px; max-width: 520px; }

/* ---------- finPower lookup + loading states ---------- */

.account-lookup-row {
  display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
}
.account-lookup-row input { flex: 1 1 220px; }
.account-lookup-row .btn { flex-shrink: 0; }
.lookup-status { min-height: 18px; margin: 6px 0 0; font-size: 13px; }
.lookup-status:empty { margin: 0; min-height: 0; }
.lookup-status-success { color: #14532d; }
.lookup-status-error { color: var(--coral); }

.is-loading { position: relative; }
.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.5em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: paylink-spin 0.8s linear infinite;
}
@keyframes paylink-spin { to { transform: rotate(360deg); } }

/* subtle reveal only; disabled under prefers-reduced-motion below */
@keyframes ww-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.card, .checkout-card { animation: ww-rise 0.35s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .is-loading::before { animation: none; }
  .card, .checkout-card { animation: none; }
}
.filter-bar select { width: auto; min-width: 150px; }

.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e3f0f7; }
.table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); background: #f0f9fd; white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f2fafd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ref-link { color: var(--ocean); font-weight: 700; text-decoration: none; }
.ref-link:hover { text-decoration: underline; }

.pagination { display: flex; align-items: center; gap: 14px; margin-top: 16px; }

/* ---------- pills ---------- */

.pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: capitalize; background: var(--gray-bg); color: var(--ink);
}
.pill-pending { background: var(--amber-bg); color: var(--amber); }
.pill-paid { background: var(--green-bg); color: #14532d; }
.pill-declined, .pill-cancelled { background: var(--coral-bg); color: var(--coral); }
.pill-expired, .pill-link_failed { background: var(--gray-bg); color: var(--muted); }
.pill-creating { background: #e0f6f9; color: var(--ocean-deep); }
.pill-type { background: var(--gray-bg); color: var(--ink-deep); text-transform: none; }
.pill-active, .pill-setup_pending { background: var(--green-bg); color: #14532d; }
.pill-unknown, .pill-provisioning, .pill-created, .pill-due, .pill-paymentinprogress { background: var(--amber-bg); color: var(--amber); }
.pill-unpaid { background: var(--coral-bg); color: var(--coral); }
.pill-finished, .pill-cancelled, .pill-setup_failed, .pill-disabled { background: var(--gray-bg); color: var(--muted); }

/* ---------- subscriptions ---------- */

.subscription-fields {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  background: var(--gray-bg);
}

.compact-table { margin-top: 14px; font-size: 13px; }

.subscription-terms {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--gray-bg);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-deep);
}
.subscription-terms ul { margin: 8px 0 0; padding-left: 20px; text-align: left}
.subscription-terms li { padding: 3px 0; }

.consent-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.45;
  margin: 14px 0;
}
.consent-check input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; }

/* ---------- detail ---------- */

.def-list { margin: 0; }
.def-list > div {
  display: grid; grid-template-columns: 170px 1fr; gap: 8px;
  padding: 9px 0; border-bottom: 1px solid #e3f0f7;
}
.def-list > div:last-child { border-bottom: 0; }
.def-list dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.def-list dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.amount-big { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.audit-list { margin: 0; padding-left: 20px; }
.audit-list li { padding: 6px 0; font-size: 14px; }
.audit-time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 10px; }
.audit-type { font-weight: 600; text-transform: capitalize; }
.audit-details { color: var(--muted); margin-left: 8px; font-size: 13px; overflow-wrap: anywhere; }
.audit-actions { display: inline-flex; margin-left: 10px; vertical-align: middle; }

.gateway-dialog {
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow), 0 24px 60px rgba(3, 20, 59, 0.32);
}
.gateway-dialog::backdrop { background: rgba(3, 20, 59, 0.55); }
.gateway-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  background: var(--card);
}
.gateway-dialog-title { margin: 0; font-size: 17px; color: var(--ink-deep); }
.gateway-dialog-meta { padding: 14px 20px 0; }
.gateway-summary {
  width: calc(100% - 40px);
  margin: 14px 20px 0;
  border-collapse: collapse;
  font-size: 13px;
}
.gateway-summary th, .gateway-summary td {
  padding: 7px 12px;
  text-align: left;
  border-bottom: 1px solid #e3f0f7;
}
.gateway-summary tr:last-child th, .gateway-summary tr:last-child td { border-bottom: 0; }
.gateway-summary th { color: var(--muted); font-weight: 600; width: 40%; }
.gateway-summary td { overflow-wrap: anywhere; }
.gateway-json-title {
  margin: 16px 20px 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.gateway-json {
  margin: 0 20px;
  padding: 14px 16px;
  max-height: 320px;
  overflow: auto;
  background: var(--ink-deep);
  color: #c9eef5;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gateway-dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 18px;
}

/* ---------- customer checkout (payment_base) ---------- */

.customer-body {
  color: #eaf8fc;
  background-color: var(--navy);
  background-image:
    radial-gradient(1100px 640px at 50% -18%, rgba(36, 230, 232, 0.34), transparent 60%),
    radial-gradient(880px 560px at 92% 112%, rgba(8, 206, 219, 0.18), transparent 55%),
    radial-gradient(780px 520px at 6% 92%, rgba(0, 105, 168, 0.55), transparent 62%),
    radial-gradient(circle at 88% 22%, transparent 128px, rgba(36, 230, 232, 0.12) 129px, transparent 131px, transparent 196px, rgba(36, 230, 232, 0.07) 197px, transparent 199px),
    radial-gradient(circle at 10% 70%, transparent 92px, rgba(36, 230, 232, 0.10) 93px, transparent 95px),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-2) 42%, var(--ocean) 125%);
}
.customer-page {
  flex: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.checkout-card {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(188, 217, 232, 0.9);
  border-radius: 23px;
  box-shadow: 0 1px 2px rgba(3, 20, 59, 0.08), 0 24px 60px rgba(3, 20, 59, 0.45);
  padding: 0 30px 30px;
  text-align: center;
  overflow: hidden;
}
.checkout-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 -30px 22px;
  padding: 18px 24px;
  border-bottom: 2px solid var(--cyan);
  background-color: var(--navy);
  background-image:
    radial-gradient(420px 140px at 70% -40%, rgba(36, 230, 232, 0.25), transparent 65%),
    linear-gradient(120deg, var(--navy) 0%, #0a3670 60%, var(--ocean) 130%);
}
.checkout-logo { display: block; width: 123px; height: 23px; }
.checkout-product {
  font-weight: 700;
  font-size: 15px;
  color: var(--cyan-bright);
  letter-spacing: 0.02em;
}
.checkout-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.checkout-amount {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--ink-deep);
}
.checkout-heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-deep);
}
.checkout-meta {
  margin: 0 0 16px;
  padding: 12px 0;
  border-top: 1px solid #dbeef6;
  border-bottom: 1px solid #dbeef6;
}
.checkout-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 14px;
}
.checkout-meta dt { color: var(--muted); font-weight: 600; }
.checkout-meta dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.checkout-message {
  margin: 0 0 16px;
  padding: 13px 15px;
  text-align: left;
  background: #f2fafd;
  border: 1px solid #d3e9f4;
  border-radius: 10px;
  font-size: 15px;
  color: #173c57;
}
.checkout-verification {
  margin: 0 0 16px;
  padding: 11px 14px;
  text-align: left;
  background: #ecf6fb;
  border: 1px solid #b9dcee;
  border-left: 3px solid var(--ocean);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #173c57;
}
.checkout-status { margin: 14px 0 18px; }
.checkout-security { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.result-note { font-size: 15px; margin: 12px 0 0; color: #173c57; }
.result-ok { color: #14532d; font-weight: 600; }
.result-bad { color: var(--coral); font-weight: 600; }

/* ---------- mock gateway ---------- */

.mock-card { border: 2px dashed var(--amber); }
.mock-banner {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--amber-bg);
  color: #7a5307;
  border: 1px solid #eed9ab;
  border-radius: var(--radius-sm);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.mock-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 0; }

/* ---------- dashboard + reports ---------- */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-card.metric-alert { border-color: var(--coral); background: var(--coral-bg); }
.metric-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-deep);
  font-variant-numeric: tabular-nums;
}
.metric-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.dash-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.dash-columns .card { margin: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--card-border);
}
.btn-microsoft {
  background: var(--navy-2);
  border-color: var(--navy-2);
  color: #fff;
  text-decoration: none;
}
.btn-microsoft:hover { background: var(--navy); border-color: var(--cyan); color: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  .page { padding: 20px 14px 40px; }
  .auth-card { padding: 22px; }
  .field-grid { grid-template-columns: 1fr; }
  .def-list > div { grid-template-columns: 1fr; gap: 2px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input[type="search"], .filter-bar select { max-width: none; width: 100%; }
  .gateway-dialog-head { padding: 12px 14px; }
  .gateway-dialog-meta { padding: 12px 14px 0; }
  .gateway-summary { width: calc(100% - 28px); margin: 12px 14px 0; }
  .gateway-json-title { margin: 14px 14px 6px; }
  .gateway-json { margin: 0 14px; }
  .gateway-dialog-actions { padding: 12px 14px; }
  .dash-columns { grid-template-columns: 1fr; }
  .account-lookup-row { flex-direction: column; align-items: stretch; }
  .account-lookup-row .btn { width: 100%; }
}

@media (max-width: 480px) {
  .customer-page { padding: 16px; }
  .checkout-card { padding: 0 22px 22px; }
  .checkout-identity { margin: 0 -22px 18px; }
  .checkout-amount { font-size: 30px; }
  .mock-actions .btn { width: 100%; }
}
