/* Backstage Cigars — Members' Portal
   Palette and type follow backstagecigars.com: deep tobacco brown, white,
   Bebas Neue display type over Roboto. Brass accent for actions. */

:root {
  --bg: #160b06;
  --bg-2: #1d0f08;
  --surface: #23140b;
  --surface-2: #2c1a0e;
  --line: rgba(255, 244, 230, 0.12);
  --line-strong: rgba(255, 244, 230, 0.24);
  --text: #f6efe4;
  --muted: #b9a68f;
  --accent: #c9a36a;
  --accent-2: #e2c28f;
  --accent-ink: #1a0d06;
  --success: #86c294;
  --warning: #e3b55b;
  --danger: #e57d6f;
  --info: #8fb4d9;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-display: 'Bebas Neue', Georgia, sans-serif;
  --font-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }

h1, h2, h3, h4, .h2, .h3, .h4 {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.04em;
  line-height: 1.05; margin: 0 0 0.5em; color: #fff;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2, .h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3, .h3 { font-size: 1.6rem; }
h4, .h4 { font-size: 1.2rem; letter-spacing: 0.08em; }
p { margin: 0 0 1em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.narrow { max-width: 520px; margin-inline: auto; padding-inline: 16px; }
.narrow-wide { max-width: 880px; margin-inline: auto; padding-inline: 16px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.prewrap { white-space: pre-wrap; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.8rem; font-weight: 500;
}
.eyebrow a { color: var(--accent); }
.lede { font-size: 1.15rem; color: #e7dccd; font-weight: 300; }
.accent { color: var(--accent); }
.overdue-text { color: var(--danger); }
.soon-text { color: var(--warning); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.6em; border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  font: 500 0.82rem/1.1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { background: #fff; border-color: #fff; color: var(--accent-ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(229, 125, 111, 0.5); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--accent-ink); }
.btn-sm { padding: 0.6em 1em; font-size: 0.72rem; }
.btn-lg { padding: 1em 2.2em; font-size: 0.92rem; }
.btn-block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link-button:hover { color: #fff; text-decoration: underline; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.button-row.center { justify-content: center; }

/* Forms ------------------------------------------------------------------ */
label { display: block; font-size: 0.85rem; color: var(--muted); letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=datetime-local], input[type=number], input[type=url], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.75em 0.9em;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--radius); font: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { resize: vertical; min-height: 5.5rem; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; }
.hint { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.78rem; }
.field-error { color: var(--danger); font-size: 0.82rem; margin: 0.35rem 0 0; }
.stack > * + * { margin-top: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
legend { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: 0.06em; color: #fff; margin-bottom: 1rem; padding: 0; }
fieldset > label, fieldset > .grid-2, fieldset > .grid-3 { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--text); font-size: 0.92rem; margin-bottom: 0.9rem; cursor: pointer; }
.check input { margin-top: 0.25rem; accent-color: var(--accent); width: 1.1rem; height: 1.1rem; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card { padding: clamp(1.5rem, 4vw, 2.75rem); }
.form-actions {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.form-actions p { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.inline-form select, .inline-form input { width: auto; margin-top: 0; padding: 0.5em 0.7em; font-size: 0.88rem; }
.inline-form input[type=text] { flex: 1 1 120px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Cards, flashes, badges ------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.5rem;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head > * { margin: 0; }
.flash-stack { margin: 1rem 0; }
.flash { padding: 0.85rem 1rem; border: 1px solid; border-radius: var(--radius); margin-bottom: 0.75rem; font-size: 0.95rem; }
.flash-success { background: rgba(134, 194, 148, 0.1); border-color: rgba(134, 194, 148, 0.45); color: #cdebd3; }
.flash-error { background: rgba(229, 125, 111, 0.1); border-color: rgba(229, 125, 111, 0.5); color: #f5cbc4; }
.flash-info { background: rgba(143, 180, 217, 0.08); border-color: rgba(143, 180, 217, 0.4); color: #d3e3f2; }
.flash-warning { background: rgba(227, 181, 91, 0.1); border-color: rgba(227, 181, 91, 0.45); color: #f0dcb0; }
.badge {
  display: inline-block; padding: 0.2em 0.65em; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  color: var(--muted); white-space: nowrap; vertical-align: middle;
}
.badge-active, .badge-paid, .badge-approved, .badge-converted, .badge-completed, .badge-admin, .badge-sent, .badge-available, .badge-checked_in { color: var(--success); border-color: rgba(134, 194, 148, 0.5); }
.badge-assigned { color: var(--info); border-color: rgba(143, 180, 217, 0.5); }
.badge-pending_payment, .badge-open, .badge-pending, .badge-awaiting_payment, .badge-applied, .badge-applicant, .badge-grace, .badge-pending_signature { color: var(--warning); border-color: rgba(227, 181, 91, 0.5); }
.badge-interview_scheduled, .badge-interviewed, .badge-staff, .badge-confirmed { color: var(--info); border-color: rgba(143, 180, 217, 0.5); }
.badge-suspended, .badge-declined, .badge-denied, .badge-cancelled, .badge-void, .badge-overdue, .badge-failed, .badge-lapsed, .badge-closed, .badge-lost, .badge-no_show { color: var(--danger); border-color: rgba(229, 125, 111, 0.5); }
.badge-lg { font-size: 0.85rem; padding: 0.35em 0.9em; }
.qr-box { display: inline-block; width: 100%; max-width: 240px; padding: 14px; background: #fff; border-radius: var(--radius-lg); }
.qr-box svg { display: block; width: 100%; height: auto; }

/* Public header & footer ------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22, 11, 6, 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.brand img { width: 150px; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) { color: var(--text); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; }
.site-nav a.active { color: var(--accent); }
@media (max-width: 640px) {
  .brand img { width: 112px; }
  .site-nav { gap: 0.9rem; }
  .site-nav .hide-sm { display: none; }
}
.site-footer { background: #0f0704; border-top: 1px solid var(--line); padding-top: 3rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: var(--accent); margin-bottom: 0.75rem; }
.site-footer p { margin: 0 0 0.4rem; }
.site-footer a { color: var(--text); }
.footer-logo { margin-bottom: 1rem; }
.footer-base { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-block: 1.25rem; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* Landing / login -------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 8vw, 6.5rem); border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0; background-size: cover; background-position: center 35%; opacity: 0.4; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(22, 11, 6, 0.97) 0%, rgba(22, 11, 6, 0.78) 50%, rgba(22, 11, 6, 0.55) 100%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }
.hero-points li { position: relative; padding-left: 1.6rem; color: #e7dccd; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.9rem; height: 1px; background: var(--accent); }
.auth-card { background: rgba(35, 20, 11, 0.94); box-shadow: var(--shadow); width: 100%; max-width: 440px; justify-self: end; margin: 0; }
.auth-card h2, .auth-card h1 { margin-bottom: 1.25rem; }
.section.narrow .auth-card { margin-inline: auto; }
.auth-links { margin: 1rem 0 0; font-size: 0.9rem; text-align: center; }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .auth-card { justify-self: stretch; max-width: none; }
}

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.page-banner { position: relative; padding-block: clamp(3rem, 8vw, 5rem); background-size: cover; background-position: center 40%; border-bottom: 1px solid var(--line); }
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 11, 6, 0.72), rgba(22, 11, 6, 0.94)); }
.page-banner .container { position: relative; }
.page-banner .lede { max-width: 640px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.plan-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem;
  color: var(--text);
}
.plan-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tier, var(--accent)); }
.tier-green { --tier: #7fa872; }
.tier-platinum, .tier-corporate-platinum { --tier: #d9dde2; }
.plan-card h3 { font-size: 2.4rem; margin: 0; color: var(--tier, #fff); }
.plan-tagline { color: var(--muted); margin: 0.2rem 0 0; }
.plan-fees { margin: 0; padding-block: 0.75rem; border-block: 1px solid var(--line); }
.plan-fees div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; }
.plan-fees dt { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.plan-fees dd { margin: 0; font-weight: 500; color: #fff; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.benefits li { position: relative; padding-left: 1.5rem; }
.benefits li::before { content: "✦"; position: absolute; left: 0; top: 0.15em; font-size: 0.8rem; color: var(--tier, var(--accent)); }
.plan-desc { color: var(--muted); font-size: 0.93rem; margin: 0; }
.plan-select { cursor: pointer; }
.plan-select input { position: absolute; top: 1.4rem; right: 1.4rem; width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
.plan-select:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); }
.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--accent); min-width: 2.6rem; }
.steps h3 { margin: 0 0 0.25rem; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.tier-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.tier-option { position: relative; margin: 0; cursor: pointer; }
.tier-option input { position: absolute; opacity: 0; }
.tier-option-body {
  display: flex; flex-direction: column; gap: 0.25rem; height: 100%; padding: 1rem 1.1rem;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius); font-size: 0.82rem; color: var(--muted);
}
.tier-option-body strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.05em; color: #fff; }
.tier-option input:checked + .tier-option-body { border-color: var(--accent); background: rgba(201, 163, 106, 0.08); box-shadow: inset 0 0 0 1px var(--accent); }
.tier-option input:focus-visible + .tier-option-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.35rem; }
.checklist .ok { color: var(--success); }
.checklist .fail { color: var(--danger); }

/* App shell (members & staff) -------------------------------------------- */
.app-header { position: sticky; top: 0; z-index: 20; background: #0f0704; border-bottom: 1px solid var(--line); }
.app-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.app-header .brand { display: flex; align-items: center; gap: 0.75rem; }
.app-header .brand img { width: 110px; }
.brand-tag { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(201, 163, 106, 0.5); padding: 0.2em 0.55em; border-radius: 3px; }
.user-menu { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; }
.user-menu form { margin: 0; }
.user-name { color: var(--text); }
.app-nav { background: var(--bg-2); border-top: 1px solid var(--line); }
.app-nav-inner { display: flex; flex-wrap: wrap; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.app-nav-inner::-webkit-scrollbar { display: none; }
.app-nav a {
  padding: 0.85rem 0.9rem; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.app-nav a:hover { color: #fff; text-decoration: none; }
.app-nav a.active { color: #fff; border-bottom-color: var(--accent); }
.count {
  display: inline-block; min-width: 1.4em; padding: 0 0.4em; margin-left: 0.25em; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 0.7rem; line-height: 1.5; letter-spacing: 0; text-align: center;
}
.app-main { padding-block: 1.5rem 4rem; }
.app-footer { border-top: 1px solid var(--line); padding-block: 1.25rem; color: var(--muted); font-size: 0.8rem; }
.app-footer a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.75rem; }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin: 0; }
.page-head .eyebrow { margin-bottom: 0.3rem; }

/* Member dashboard ------------------------------------------------------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.member-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  aspect-ratio: 1.7 / 1; max-width: 100%; margin-bottom: 1.5rem; padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 0%, #3a2413 0%, #1d0f08 55%, #120804 100%);
  border: 1px solid rgba(201, 163, 106, 0.35); box-shadow: var(--shadow);
}
.member-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 9px); }
.member-card.tier-green { border-color: rgba(127, 168, 114, 0.55); background: radial-gradient(120% 140% at 0% 0%, #2d3a22 0%, #1a130a 55%, #120804 100%); }
.member-card.tier-platinum, .member-card.tier-corporate-platinum { border-color: rgba(217, 221, 226, 0.5); background: radial-gradient(120% 140% at 0% 0%, #4a4038 0%, #221812 55%, #120804 100%); }
.member-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.member-card-top img { width: 120px; }
.member-card-tier { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 0.14em; line-height: 1; color: var(--tier, var(--accent)); }
.member-card-name { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: 0.08em; color: #fff; margin: 0 0 0.6rem; }
.member-card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.member-card-meta strong { display: block; color: #fff; font-size: 0.95rem; letter-spacing: 0.06em; font-weight: 500; }
.renewal-panel .big-date { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: #fff; margin: 0.2rem 0 0.4rem; }
.countdown { color: var(--muted); }
.countdown.soon { color: var(--warning); }
.countdown.overdue { color: var(--danger); }
.banner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; border: 1px solid rgba(201, 163, 106, 0.45); border-radius: var(--radius-lg);
  background: rgba(201, 163, 106, 0.08);
}
.banner h2, .banner h3 { margin: 0 0 0.25rem; }
.banner p { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.5rem; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.85rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-rows > li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.list-rows > li:last-child { border-bottom: 0; }
.list-rows .sub, td .sub { display: block; color: var(--muted); font-size: 0.8rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0.55rem 0 0.55rem 1.2rem; border-left: 1px solid var(--line); font-size: 0.92rem; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 1rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline time { display: block; color: var(--muted); font-size: 0.78rem; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 1.5rem 0; padding: 0; }
.progress li { padding-top: 1rem; border-top: 3px solid var(--line-strong); color: var(--muted); font-size: 0.85rem; }
.progress li strong { display: block; color: var(--text); font-size: 0.95rem; font-weight: 500; }
.progress li.done, .progress li.current { border-top-color: var(--accent); }
.progress li.current strong { color: var(--accent-2); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .member-card { aspect-ratio: auto; } .progress { grid-template-columns: 1fr; } }

/* Invoice ---------------------------------------------------------------- */
.invoice-doc { max-width: 780px; }
.invoice-head { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.invoice-head .right { text-align: right; }
.invoice-brand { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.08em; color: #fff; margin: 0; }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 780px; }
.pay-option { border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 1.4rem; background: var(--surface); }
.pay-option h3 { font-size: 1.5rem; }
.secure-note { font-size: 0.78rem; color: var(--muted); margin: 0.6rem 0 0; }
@media (max-width: 700px) { .pay-options { grid-template-columns: 1fr; } .invoice-head .right { text-align: left; } }

/* Tables & admin --------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.card .table-wrap { background: transparent; border-radius: var(--radius); margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--bg-2); color: var(--muted); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tfoot th, tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.row-link { color: var(--text); font-weight: 500; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; color: var(--text); }
a.stat:hover { border-color: var(--accent); text-decoration: none; color: var(--text); }
.stat-label { display: block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stat-value { display: block; font-family: var(--font-display); font-size: 2.4rem; line-height: 1.1; letter-spacing: 0.03em; color: #fff; }
.stat.alert .stat-value { color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.admin-grid .span-2 { grid-column: 1 / -1; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.tabs a { padding: 0.6rem 1rem; margin-bottom: -1px; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.tabs a:hover { color: #fff; text-decoration: none; }
.tabs a.active { color: #fff; border-bottom-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1.25rem; }
.filters label { flex: 1 1 180px; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; color: var(--muted); font-size: 0.9rem; }
.action-box + .action-box { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.action-box h3 { font-size: 1.35rem; }
details.inline-details > summary { cursor: pointer; color: var(--accent-2); font-size: 0.85rem; list-style: none; white-space: nowrap; }
details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details[open] > summary { margin-bottom: 0.6rem; }
.actions-cell { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.upgrade-request { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; background: var(--bg-2); }
.upgrade-request .grid-2 { align-items: start; }
.secret-state { font-size: 0.82rem; color: var(--success); margin: 0.3rem 0 0; }
.error-page h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.prose { line-height: 1.7; }
.prose h2 { font-size: 2rem; margin: 0 0 1rem; }
.prose h3 { font-size: 1.45rem; margin: 2rem 0 0.75rem; }
.prose h4 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.prose h2:first-child, .prose h3:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.footer-base a, .app-footer a.legal { color: var(--muted); margin-left: 1rem; }
.signature-box { position: relative; height: 200px; margin-top: 1rem; background: #f4ecdf; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.signature-box canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.signature-hint { position: absolute; left: 1.25rem; bottom: 1rem; color: #8a7a66; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; pointer-events: none; }
.signature-actions { justify-content: space-between; margin-top: 0.5rem; }
.signature-img { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 4px; padding: 0.5rem; margin: 1rem 0; }
.break-all { word-break: break-all; }
@media (max-width: 960px) { .detail-grid, .admin-grid { grid-template-columns: 1fr; } }

@media print {
  .app-header, .app-footer, .no-print, .flash-stack { display: none !important; }
  body { background: #fff; color: #000; }
  .card { background: #fff; border: 0; padding: 0; }
  h1, h2, h3, .invoice-brand, th, td, .muted { color: #000 !important; }
  th { background: #fff; }
}
