/* ArdentFlow customer portal. Light surfaces only: white and off-white; lime for the one primary
   action on a screen; the steel-blue gradient on the header band and status badges; grey text.
   No dark fills anywhere. System fonts (decision: brand fonts not supplied). */

:root {
  --surface: #ffffff;
  --page: #faf8f4;
  --text: #4b5563;
  --text-strong: #374151;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --eyebrow: #c7c4bf;
  --lime: #caff4d;
  --lime-press: #b8f02e;
  --on-lime: #1f2937;
  --steel-1: #c0dbe6;
  --steel-2: #a2bfcd;
  --steel-3: #7695a9;
  --steel: linear-gradient(90deg, var(--steel-1), var(--steel-2) 55%, var(--steel-3));
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fffbeb;
  --warn-border: #fcd34d;
  --radius-lg: 20px;
  --radius: 12px;
  --focus: 0 0 0 3px #ffffff, 0 0 0 5px var(--steel-3);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--text-strong); text-decoration-color: var(--steel-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--steel-3); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

h1, h2, h3 { color: var(--text-strong); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); font-weight: 650; }
h2 { font-size: 1.25rem; font-weight: 620; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }

/* --- header ------------------------------------------------------------------------- */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; }
.top::before { content: ''; display: block; height: 6px; background: var(--steel); }
.top-inner { max-width: 68rem; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text-strong); text-decoration: none; letter-spacing: -0.01em; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-email { color: var(--text-2); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.who form { margin: 0; }

.nav { max-width: 68rem; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 12px 12px; color: var(--text-2); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 520; }
.nav a:hover { color: var(--text-strong); }
.nav a[aria-current='page'] { color: var(--text-strong); border-bottom-color: var(--steel-3); }

.banner { background: var(--steel); color: var(--on-lime); text-align: center; padding: 8px 16px; font-weight: 600; font-size: .92rem; }

/* --- main --------------------------------------------------------------------------- */
.main { flex: 1; width: 100%; max-width: 68rem; margin: 0 auto; padding: 32px 20px 56px; }
.foot { text-align: center; color: var(--text-3); font-size: .875rem; padding: 24px 16px 32px; }
.foot a { color: var(--text-2); }

/* Section eyebrow: transparent pill, thin grey outline, letterspaced caps (brand rule). */
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border: 1px solid var(--eyebrow); border-radius: 999px; background: transparent; color: var(--text-2); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.card.narrow { max-width: 30rem; margin: 24px auto; }
.card + .card { margin-top: 20px; }
.section { margin-top: 36px; }
.section:first-child { margin-top: 0; }

.stack { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.notice { background: var(--page); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; color: var(--text-strong); }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-border); }
.notice.error { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }

.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* --- forms and buttons -------------------------------------------------------------- */
label { font-weight: 560; color: var(--text-strong); font-size: .95rem; }
input[type='text'], input[type='email'], input[type='date'], input[type='number'], input:not([type]), select, textarea {
  font: inherit; color: var(--text-strong); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 11px 14px; width: 100%; min-height: 46px;
}
textarea { min-height: 96px; resize: vertical; }
form { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-strong); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--steel-3); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-press); border-color: var(--lime-press); }
.btn-provider { justify-content: center; width: 100%; }
.btn-danger { color: var(--danger); border-color: #fecdca; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
button.link { background: none; border: 0; padding: 4px; color: var(--text-2); font: inherit; font-size: .9rem; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
button.link:hover { color: var(--text-strong); }
button[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }

/* --- badges ------------------------------------------------------------------------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.7; border: 1px solid var(--border); color: var(--text-strong); background: var(--surface); white-space: nowrap; }
.badge-active { background: var(--steel); border-color: transparent; color: var(--on-lime); }
.badge-warn { background: var(--warn-bg); border-color: var(--warn-border); }
.badge-bad { background: var(--danger-bg); border-color: #fecdca; color: var(--danger); }
.badge-placeholder { border-style: dashed; border-color: var(--steel-3); color: var(--text-2); }

/* --- tables (stack into rows on phones) --------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-2); font-weight: 600; font-size: .82rem; background: var(--page); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .main { padding: 20px 16px 40px; }
  .card { padding: 20px; border-radius: var(--radius); }
  .top-inner { padding: 12px 16px; }
  .who-email { display: none; }
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  table.stack-sm td { border: 0; padding: 4px 16px; }
  table.stack-sm td[data-label]::before { content: attr(data-label); display: block; color: var(--text-3); font-size: .78rem; font-weight: 600; }
  table.stack-sm td.num { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
