/* ============================================================
   Brave Hearts Kingsport — Member Portal mockup stylesheet
   MOCKUP ONLY. Visual design carried over from the live site:
     navy #102b4e · rust #b54a34 · cream #fbf8f3
     Georgia serif headings · Inter body
   Self-contained: no external dependencies.
   ============================================================ */

:root {
  --navy: #102b4e;
  --navy-2: #1b416a;
  --rust: #b54a34;
  --rust-2: #9c3d2b;
  --cream: #fbf8f3;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #5f6b7a;
  --line: #d8dee7;
  --success: #216e49;
  --success-bg: rgba(33, 110, 73, .1);
  --warn: #a86b1d;
  --warn-bg: #fbf1df;
  --danger: #a0352c;
  --danger-bg: #fbeceb;
  --info-bg: #eef3f9;
  --shadow: 0 18px 50px rgba(16, 43, 78, .12);
  --shadow-sm: 0 6px 18px rgba(16, 43, 78, .08);
  --radius: 22px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: var(--navy-2); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.wrap { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); line-height: 1.08; margin: 10px 0 14px; }
h3 { font-size: 1.2rem; }
.lead { font-size: 1.13rem; color: #4b5869; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--rust); font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Top navigation (auth pages) ---------- */
.topbar { border-bottom: 1px solid rgba(16, 43, 78, .10); background: rgba(251, 248, 243, .94); }
.topbar-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; color: var(--navy); }
.brand-mark { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: Georgia, serif; font-size: 1.25rem; }
.brand-text { line-height: 1.05; }
.brand-text small { display: block; font-size: .68rem; color: var(--muted); font-weight: 700; margin-top: 3px; letter-spacing: .08em; text-transform: uppercase; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; text-decoration: none; cursor: pointer; font-size: .95rem; }
.button.primary { background: var(--rust); color: #fff; }
.button.primary:hover { background: var(--rust-2); }
.button.secondary { background: transparent; border-color: rgba(16,43,78,.28); color: var(--navy); }
.button.secondary:hover { border-color: var(--navy); }
.button.navy { background: var(--navy); color: #fff; }
.button.navy:hover { background: var(--navy-2); }
.button.small { min-height: 38px; padding: 7px 14px; font-size: .85rem; }
.button.block { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-card { background: #fff; padding: clamp(22px, 4vw, 36px); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid rgba(16,43,78,.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field.full { grid-column: 1 / -1; }
label { display: block; font-size: .9rem; font-weight: 800; color: var(--navy); margin-bottom: 7px; }
input, select, textarea { width: 100%; border: 1px solid #bdc7d3; border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-height: 48px; padding: 11px 13px; outline: none; }
textarea { min-height: 104px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(27,65,106,.12); }
.hint { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 0; }
.consent input { width: 18px; height: 18px; min-height: 0; margin-top: 4px; flex: 0 0 auto; }
.consent label { color: #465365; font-weight: 600; margin: 0; }
.consent strong { color: var(--navy); }

/* field with a sensitive-data marker */
.field .pii { display: inline-block; margin-left: 8px; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.field .phi { color: var(--danger); background: var(--danger-bg); }

/* ---------- Auth layout ---------- */
.auth-wrap { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 40px 18px; }
.auth-card { background: #fff; width: min(460px, 100%); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid rgba(16,43,78,.08); padding: 34px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; background: var(--info-bg); padding: 5px; border-radius: 999px; }
.auth-tab { flex: 1; text-align: center; padding: 9px; border-radius: 999px; font-weight: 800; font-size: .9rem; color: var(--navy); text-decoration: none; cursor: pointer; }
.auth-tab.active { background: var(--navy); color: #fff; }
.mfa-inputs { display: flex; gap: 10px; justify-content: space-between; margin: 8px 0; }
.mfa-inputs input { text-align: center; font-size: 1.6rem; font-weight: 800; letter-spacing: .05em; padding: 8px; }
.mfa-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--info-bg); color: #3d4a5b; font-size: .9rem; margin-bottom: 20px; }
.qr-box { width: 148px; height: 148px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center; color: var(--muted); font-size: .8rem; text-align: center; background:
  repeating-linear-gradient(45deg,#f3f6fa,#f3f6fa 6px,#e7edf5 6px,#e7edf5 12px); }
.pw-meter { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.pw-meter > span { display: block; height: 100%; width: 0; background: var(--rust); transition: width .2s, background .2s; }

/* ---------- Portal shell ---------- */
.portal { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #eaf0f7; padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { color: #fff; margin-bottom: 18px; }
.sidebar .brand small { color: #9db4cf; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px; color: #cddaeb; text-decoration: none; font-weight: 700; font-size: .93rem; }
.side-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-link.active { background: var(--rust); color: #fff; }
.side-ico { width: 20px; text-align: center; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; font-size: .82rem; color: #9db4cf; }
.main { padding: 26px clamp(18px, 3vw, 40px) 60px; overflow: auto; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.main-head h1 { font-size: 2rem; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: .78rem; }
.badge.mfa { background: var(--success-bg); color: var(--success); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--rust); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ---------- Stat / info cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { margin-top: 0; }
.stat { font-family: Georgia, serif; font-size: 2.3rem; color: var(--navy); line-height: 1; }
.stat-label { color: var(--muted); font-weight: 700; font-size: .85rem; margin-top: 6px; }
.trend { font-size: .8rem; font-weight: 800; margin-top: 8px; }
.trend.up { color: var(--success); }
.trend.flat { color: var(--muted); }

/* ---------- Steps / progress ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); cursor: pointer; }
.step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--info-bg); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.step.done .n { background: var(--success); color: #fff; }
.step.active { border-color: var(--rust); }
.step.active .n { background: var(--rust); color: #fff; }
.step .t { font-weight: 800; font-size: .88rem; color: var(--navy); margin-top: 8px; }
.step .s { font-size: .78rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data-table th { background: #f6f8fb; color: var(--navy); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fafbfd; }
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-weight: 800; font-size: .76rem; }
.pill.waitlist { background: var(--info-bg); color: var(--navy-2); }
.pill.review { background: var(--warn-bg); color: var(--warn); }
.pill.offered { background: var(--success-bg); color: var(--success); }
.pill.pending { background: var(--warn-bg); color: var(--warn); }
.pill.declined { background: var(--danger-bg); color: var(--danger); }

/* ---------- Upload ---------- */
.upload { border: 2px dashed #bcc7d4; border-radius: var(--radius); padding: 30px; text-align: center; background: #fbfcfe; }
.upload.drag { border-color: var(--rust); background: #fdf3f0; }
.upload .ico { font-size: 2rem; }
.doc-list { display: grid; gap: 10px; margin-top: 18px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc-ico { width: 36px; height: 36px; border-radius: 9px; background: var(--info-bg); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: .72rem; }
.doc-meta { flex: 1; }
.doc-meta strong { display: block; color: var(--navy); font-size: .93rem; }
.doc-meta span { color: var(--muted); font-size: .8rem; }
.link-chip { font-size: .72rem; font-weight: 800; color: var(--navy-2); background: var(--info-bg); border-radius: 999px; padding: 2px 9px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: .92rem; margin-bottom: 18px; }
.alert.info { background: var(--info-bg); color: #33455c; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert span:first-child { font-size: 1.1rem; line-height: 1; }

/* ---------- Security note block ---------- */
.secnote { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #f3f6fa; border: 1px solid var(--line); color: #3d4a5b; font-size: .85rem; margin-top: 18px; }
.secnote .lock { color: var(--success); font-size: 1.1rem; }

.mock-flag { background: repeating-linear-gradient(45deg,#fff7e6,#fff7e6 12px,#fdeecb 12px,#fdeecb 24px); border:1px solid #e7cf9a; color:#7a5a15; font-size:.8rem; font-weight:800; text-align:center; padding:7px; letter-spacing:.03em; }

/* ---------- Expanded application form elements ---------- */
/* radio / checkbox option groups */
.optset { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 4px; }
.opt { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: #465365; font-size: .92rem; }
.opt input { width: 17px; height: 17px; min-height: 0; margin: 0; flex: 0 0 auto; }
.checkset { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 18px; margin-top: 6px; }
.checkset.one { grid-template-columns: 1fr; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0; }
fieldset legend { font-weight: 800; color: var(--navy); font-size: .9rem; padding: 0 6px; }

/* section intro helper */
.section-note { color: var(--muted); font-size: .9rem; margin: 4px 0 16px; }

/* grid helper for support-level matrix (ADLs) */
.grid-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid-table th, .grid-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9rem; }
.grid-table thead th { background: #f6f8fb; color: var(--navy); font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .area { font-weight: 800; color: var(--navy); white-space: nowrap; }
.grid-table .levels { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.grid-table input[type="text"] { min-height: 38px; }

/* risk-history rows (behavioral & safety) */
.risk-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.risk-row:last-child { border-bottom: 0; }
.risk-row .label { font-weight: 700; color: var(--navy); font-size: .92rem; }

/* signature blocks */
.sign-grid { display: grid; grid-template-columns: 1fr 180px; gap: 16px 20px; margin-top: 14px; }
.sign-line { border-bottom: 1.5px solid var(--navy); min-height: 44px; display: flex; align-items: flex-end; padding-bottom: 4px; color: var(--muted); font-size: .82rem; }
.sign-cap { font-size: .78rem; color: var(--muted); font-weight: 700; margin-top: 4px; }

@media (max-width: 680px) {
  .checkset { grid-template-columns: 1fr; }
  .sign-grid { grid-template-columns: 1fr; }
  .grid-table, .grid-table thead, .grid-table tbody, .grid-table th, .grid-table td, .grid-table tr { display: block; }
  .grid-table thead { display: none; }
  .grid-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .grid-table td { border: 0; padding: 4px 12px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: auto; }
  .side-foot { display: none; }
}
@media (max-width: 760px) {
  .cols-2 { grid-template-columns: 1fr !important; }
}
@media (max-width: 580px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
