/* =========================================================
   IMPERIAL EAGLES — Member & Admin portal
   ========================================================= */
:root {
  --bg: #0b0907;
  --bg-2: #100c08;
  --card: #15110c;
  --card-2: #1b150e;
  --line: rgba(233, 196, 106, .16);
  --line-2: rgba(233, 196, 106, .3);
  --gold-50: #fff3c4;
  --gold-100: #f6e2a0;
  --gold-300: #e9c46a;
  --gold-500: #c9972e;
  --gold-700: #8a5a12;
  --text: #ece4d2;
  --muted: #9d927d;
  --green: #4fbf87;
  --green-bg: rgba(79, 191, 135, .12);
  --red: #e0635a;
  --red-bg: rgba(224, 99, 90, .12);
  --amber: #e6a53a;
  --amber-bg: rgba(230, 165, 58, .13);
  --gold-btn: linear-gradient(180deg, #f6dd8f 0%, #d9ab45 45%, #a8761d 100%);
  --ff-head: 'Cinzel', Georgia, serif;
  --ff-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(201,151,46,.12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text); font: 400 15px/1.55 var(--ff-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-300); text-decoration: none; }
a:hover { color: var(--gold-100); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pad { padding: 14px 20px; margin: 0; }
.eyebrow { margin: 0 0 6px; font: 600 .7rem/1 var(--ff-head); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .82rem/1 var(--ff-ui); letter-spacing: .04em; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
  white-space: nowrap; text-decoration: none;
}
.btn-sm { height: 38px; padding: 0 14px; font-size: .78rem; }
.btn-xs { height: 30px; padding: 0 11px; font-size: .74rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold-btn); color: #1c1305; border-color: #f2d786; box-shadow: 0 8px 24px -12px rgba(233,196,106,.7); }
.btn-gold:hover { color: #1c1305; transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(233,196,106,.85); }
.btn-ghost { background: rgba(233,196,106,.05); color: var(--gold-100); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(233,196,106,.12); border-color: var(--gold-300); color: var(--gold-50); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: rgba(224,99,90,.4); }
.btn-danger:hover { background: var(--red); color: #fff; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--gold-100); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.link { font-size: .82rem; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: .8rem; font-weight: 600; color: var(--gold-100); letter-spacing: .02em; }
.form label small, legend small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background: rgba(0,0,0,.35); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 10px;
  font: 400 .92rem var(--ff-ui);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold-300); }
input[type="file"] { padding: 10px; height: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-300); box-shadow: 0 0 0 3px rgba(233,196,106,.18); background: rgba(0,0,0,.5); }
input:disabled { opacity: .6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold-300) 50%), linear-gradient(135deg, var(--gold-300) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type="month"]::-webkit-calendar-picker-indicator, input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(3) hue-rotate(5deg); cursor: pointer; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 0; display: grid; gap: 14px; }
legend { padding: 0 8px; font: 600 .72rem/1 var(--ff-head); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-500); }
.grid-form fieldset { grid-template-columns: 1fr 1fr; }
.grid-form .span-2 { grid-column: span 2; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 92px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(233,196,106,.08); color: var(--gold-100); font: 600 .72rem var(--ff-ui); cursor: pointer; }
.pw-toggle:hover { background: rgba(233,196,106,.18); }
.inline-form { display: inline; }
.inline-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-edit input { flex: 1 1 200px; height: 36px; }

/* ---------- Alerts / badges ---------- */
.alert { padding: 13px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid; font-size: .9rem; animation: drop .5s var(--ease); }
.alert-success { background: var(--green-bg); border-color: rgba(79,191,135,.35); color: #b9ecd1; }
.alert-error { background: var(--red-bg); border-color: rgba(224,99,90,.35); color: #f5c2bd; }
.alert-warning { background: var(--amber-bg); border-color: rgba(230,165,58,.35); color: #f6dcae; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; font: 600 .72rem/1 var(--ff-ui); letter-spacing: .06em; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.badge-active { color: var(--green); background: var(--green-bg); border-color: rgba(79,191,135,.35); }
.badge-active i { animation: pulse 2s infinite; }
.badge-suspended { color: var(--amber); background: var(--amber-bg); border-color: rgba(230,165,58,.35); }
.badge-terminated { color: var(--red); background: var(--red-bg); border-color: rgba(224,99,90,.35); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .03em; }
.pill-paid { background: var(--green-bg); color: var(--green); }
.pill-unpaid { background: var(--red-bg); color: var(--red); }
.pill-muted { background: rgba(233,196,106,.1); color: var(--gold-100); }

/* ---------- Avatars ---------- */
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
.avatar.sm { width: 36px; height: 36px; }
.avatar.xl { width: 104px; height: 104px; border: 2px solid var(--gold-300); box-shadow: 0 0 0 5px rgba(233,196,106,.1); }
.avatar-initials { display: inline-grid; place-items: center; background: linear-gradient(160deg, #3a2a12, #1a130a); color: var(--gold-100); font: 700 .85rem var(--ff-head); letter-spacing: .05em; }
.avatar.xl.avatar-initials { font-size: 2rem; }

/* ---------- Auth pages ---------- */
.auth-page { display: grid; place-items: center; padding: 70px 18px 40px; position: relative; overflow-x: hidden; }
.auth-page::before { content: ""; position: fixed; inset: 0; background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(201,151,46,.18), transparent 70%), radial-gradient(ellipse 80% 60% at 50% 120%, rgba(107,23,23,.4), transparent 70%); pointer-events: none; }
.embers { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth-back { position: fixed; top: 20px; left: 22px; font-size: .82rem; color: var(--muted); z-index: 2; }
.auth-back:hover { color: var(--gold-100); }
.auth-card {
  position: relative; width: min(430px, 100%);
  padding: 40px 34px 30px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(27,21,14,.92), rgba(15,11,7,.94));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px -30px #000, inset 0 1px 0 rgba(255,240,200,.06);
  backdrop-filter: blur(10px);
  animation: rise .9s var(--ease);
  text-align: left;
}
.auth-card::before { content: ""; position: absolute; inset: 8px; border-radius: 14px; border: 1px solid rgba(233,196,106,.08); pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.auth-logo { width: 120px; height: 120px; object-fit: contain; margin: -100px auto 10px; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.7)) drop-shadow(0 0 22px rgba(233,196,106,.35)); animation: spinIn 1.2s var(--ease); }
@keyframes spinIn { from { transform: rotateY(90deg) scale(.7); opacity: 0; } }
.auth-card h1 { text-align: center; font: 700 1.55rem/1.2 var(--ff-head); letter-spacing: .08em; background: linear-gradient(180deg, #fff3c4, #e9c46a 50%, #a8761d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { text-align: center; color: var(--muted); margin: 6px 0 24px; font-size: .9rem; }
.auth-foot { text-align: center; color: var(--muted); font-size: .8rem; margin: 22px 0 0; }
.auth-card .eyebrow { text-align: center; }

/* verify page */
.verify-card { text-align: center; }
.verify-result { display: grid; justify-items: center; gap: 10px; margin: 10px 0 20px; }
.verify-result h1 { font-size: 1.35rem; }
.verify-result p { color: var(--muted); margin: 0; }
.verify-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; animation: pop .6s var(--ease); }
.verify-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.verify-result.valid .verify-icon { background: var(--green-bg); color: var(--green); box-shadow: 0 0 0 8px rgba(79,191,135,.08); }
.verify-result.invalid .verify-icon { background: var(--red-bg); color: var(--red); box-shadow: 0 0 0 8px rgba(224,99,90,.08); }
.verify-result.valid h1 { background: none; color: var(--green); -webkit-text-fill-color: var(--green); }
.verify-result.invalid h1 { background: none; color: var(--red); -webkit-text-fill-color: var(--red); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.1); } }
.verify-person { display: grid; justify-items: center; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line); }
.verify-person h2 { font: 700 1.25rem var(--ff-head); color: var(--gold-50); letter-spacing: .04em; }
.verify-person .id-position { margin: 0 0 4px; }

/* ---------- App shell (admin) ---------- */
.app.admin { display: block; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #120e09, #0a0806);
  border-right: 1px solid var(--line);
  transition: transform .4s var(--ease);
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; color: var(--gold-100); }
.side-brand img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(233,196,106,.3)); }
.side-brand b { display: block; font: 700 .74rem/1.25 var(--ff-head); letter-spacing: .12em; text-transform: uppercase; }
.side-brand small { display: block; color: var(--gold-500); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; margin-top: 3px; }
.side-nav { display: grid; align-content: start; gap: 4px; padding: 10px 12px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: .9rem; position: relative; transition: background .2s, color .2s; }
.side-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover { color: var(--gold-100); background: rgba(233,196,106,.06); }
.side-nav a.active { color: var(--gold-50); background: linear-gradient(90deg, rgba(233,196,106,.16), rgba(233,196,106,.03)); }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-300); box-shadow: 0 0 12px var(--gold-300); }
.side-foot { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; }
.side-user b { display: block; font-size: .85rem; }
.side-user small { color: var(--muted); font-size: .74rem; }
.main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 16px clamp(18px, 3vw, 36px); background: rgba(11,9,7,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font: 700 1.2rem/1.2 var(--ff-head); letter-spacing: .06em; color: var(--gold-50); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-link { font-size: .8rem; color: var(--muted); }
.menu-btn { display: none; }
.sidebar-scrim { display: none; }
.content { padding: clamp(18px, 3vw, 34px); width: 100%; max-width: 1320px; }
.back-link { display: inline-block; margin-bottom: 14px; font-size: .85rem; color: var(--muted); }

/* ---------- Member shell ---------- */
.member-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px clamp(14px, 3vw, 36px); background: rgba(11,9,7,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.member-top .side-brand { padding: 12px 0; }
.member-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.member-nav a { padding: 9px 14px; border-radius: 9px; color: var(--muted); font-size: .86rem; font-weight: 500; }
.member-nav a:hover { color: var(--gold-100); background: rgba(233,196,106,.06); }
.member-nav a.active { color: var(--gold-50); background: rgba(233,196,106,.12); }
.member-content { margin: 0 auto; max-width: 1180px; }
.portal-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 16px 40px; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px); margin-bottom: 20px;
  box-shadow: 0 20px 50px -30px rgba(0,0,0,.9);
  animation: fadeUp .6s var(--ease) both;
}
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 560px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.card-title { font: 600 .82rem/1.3 var(--ff-head); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); margin: 0 0 16px; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; margin: 0; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.dash-grid > .card:nth-child(2), .stack > .card:nth-child(2) { animation-delay: .08s; }

.welcome-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: clamp(20px, 3vw, 30px); margin-bottom: 20px; border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(233,196,106,.2), transparent 55%),
    linear-gradient(120deg, #241a0e, #120d08 60%);
  position: relative; overflow: hidden; animation: fadeUp .6s var(--ease) both;
}
.welcome-banner::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(233,196,106,.15); box-shadow: 0 0 0 30px rgba(233,196,106,.03), 0 0 0 60px rgba(233,196,106,.02); pointer-events: none; }
.welcome-banner h2 { font: 700 clamp(1.4rem, 3vw, 2rem)/1.2 var(--ff-head); letter-spacing: .04em; color: var(--gold-50); }
.welcome-banner p.muted { margin: 6px 0 0; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.dash-grid.wide-left { grid-template-columns: 1.5fr 1fr; }
.dash-grid > .card, .stack > .card { margin-bottom: 0; }
.dash-grid + .dash-grid, .dash-grid + .card, .card + .dash-grid { margin-top: 20px; }
.stack { display: grid; gap: 20px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat {
  position: relative; display: grid; gap: 4px; padding: 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  color: var(--text); overflow: hidden; transition: transform .3s var(--ease), border-color .3s;
  animation: fadeUp .6s var(--ease) both;
}
.stat:nth-child(2) { animation-delay: .06s; } .stat:nth-child(3) { animation-delay: .12s; } .stat:nth-child(4) { animation-delay: .18s; }
a.stat:hover { transform: translateY(-3px); border-color: var(--line-2); color: var(--text); }
.stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold-300); opacity: .7; }
.stat-green::before { background: var(--green); } .stat-red::before { background: var(--red); }
.stat small { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat b { font: 700 2.1rem/1.1 var(--ff-head); color: var(--gold-50); }
.stat b.sm { font-size: 1.35rem; padding: 6px 0 4px; }
.stat span { font-size: .8rem; color: var(--muted); }
.meter { display: block; height: 6px; border-radius: 6px; background: rgba(233,196,106,.1); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 6px; background: var(--gold-btn); animation: grow 1.2s var(--ease) both .3s; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }

/* bars */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; height: 220px; align-items: end; padding-top: 24px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 6px; }
.bar i { align-self: end; display: block; width: 100%; max-width: 54px; margin: 0 auto; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, rgba(233,196,106,.55), rgba(138,90,18,.35)); animation: rise-bar 1s var(--ease) both; transform-origin: bottom; }
.bar.current i { background: var(--gold-btn); box-shadow: 0 0 24px rgba(233,196,106,.35); }
.bar small { color: var(--muted); font-size: .75rem; font-weight: 600; }
.bar-val { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.bar.current .bar-val { color: var(--gold-100); }
@keyframes rise-bar { from { transform: scaleY(0); } }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1.3fr) 2fr 34px; gap: 12px; align-items: center; font-size: .86rem; }
.hbars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars li > i { height: 8px; border-radius: 8px; background: rgba(233,196,106,.08); overflow: hidden; }
.hbars li > i > i { display: block; height: 100%; background: var(--gold-btn); border-radius: 8px; animation: grow 1.1s var(--ease) both; transform-origin: left; }
.hbars b { text-align: right; color: var(--gold-100); }

/* people list */
.people { list-style: none; margin: 0; padding: 0; display: grid; }
.people a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: var(--text); }
.people a:hover { background: rgba(233,196,106,.05); color: var(--text); }
.people a > span:not(.avatar):not(.badge) { flex: 1; min-width: 0; }
.people b { display: block; font-size: .9rem; font-weight: 600; }
.people small { color: var(--muted); font-size: .78rem; }
.people li + li { border-top: 1px solid rgba(233,196,106,.06); }

/* ---------- Tables ---------- */
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { height: 38px; width: auto; min-width: 150px; font-size: .85rem; }
.filters input[type="search"] { min-width: 240px; }
.filters select { background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px; }
.toolbar-actions { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-500); padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(233,196,106,.07); vertical-align: middle; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(233,196,106,.04); }
.table.small td, .table.small th { padding: 9px 10px; font-size: .8rem; }
.card:not(.flush) .table th { background: transparent; }
.table .check { width: 44px; }
.row-paid td { opacity: .78; }
.person { display: flex; align-items: center; gap: 12px; color: var(--text); }
.person b { display: block; font-weight: 600; }
.person small { color: var(--muted); font-size: .78rem; }
.person:hover b { color: var(--gold-100); }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: .84rem; flex-wrap: wrap; gap: 10px; }
.pager { display: flex; gap: 14px; align-items: center; }
.bulk-bar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--line); background: rgba(233,196,106,.04); }
.bulk-bar > b { align-self: center; font: 600 .74rem var(--ff-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300); margin-right: 6px; }
.bulk-bar label { display: grid; gap: 5px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.bulk-bar input, .bulk-bar select { height: 38px; width: 150px; font-size: .85rem; }

/* ---------- Member dashboard ---------- */
.id-card-wrap { overflow: hidden; }
.id-card {
  position: relative; border-radius: 16px; padding: 20px; overflow: hidden;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255,243,196,.25), transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(107,23,23,.5), transparent 60%),
    linear-gradient(135deg, #2b1f0e, #120c06 55%, #2a1508);
  border: 1px solid rgba(233,196,106,.55);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.25), inset 0 0 0 7px rgba(233,196,106,.25), 0 30px 60px -30px #000;
  transition: transform .5s var(--ease);
  transform-style: preserve-3d;
}
.id-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,240,200,.14) 45%, transparent 60%); transform: translateX(-100%); animation: cardShine 7s ease-in-out infinite 1s; pointer-events: none; }
@keyframes cardShine { 0%, 60% { transform: translateX(-100%); } 90%, 100% { transform: translateX(100%); } }
.id-card-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(233,196,106,.25); }
.id-card-top img { width: 46px; height: 46px; object-fit: contain; }
.id-card-top b { display: block; font: 700 .8rem/1.3 var(--ff-head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-100); }
.id-card-top small { font: italic .78rem Georgia, serif; color: var(--gold-500); }
.id-card-top > div { flex: 1; }
.id-status { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; }
.id-status-active { background: var(--green-bg); color: var(--green); border: 1px solid rgba(79,191,135,.4); }
.id-status-suspended { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(230,165,58,.4); }
.id-status-terminated { background: var(--red-bg); color: var(--red); border: 1px solid rgba(224,99,90,.4); }
.id-card-body { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding-top: 16px; }
.id-avatar { width: 92px; height: 112px; border-radius: 10px; object-fit: cover; border: 2px solid rgba(233,196,106,.6); display: grid; place-items: center; }
.id-avatar.avatar-initials { font-size: 1.8rem; }
.id-info h4 { font: 700 1.15rem/1.2 var(--ff-head); color: var(--gold-50); letter-spacing: .03em; }
.id-position { margin: 3px 0 10px; color: var(--gold-300); font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.id-info dl { display: grid; grid-template-columns: auto auto; gap: 8px 16px; margin: 0; justify-content: start; }
.id-info dd.mono { white-space: nowrap; }
.id-info dt { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.id-info dd { margin: 0; font-size: .82rem; font-weight: 600; }
.id-qr { display: grid; justify-items: center; gap: 6px; }
.id-qr canvas { width: 128px; height: 128px; border-radius: 10px; background: #fff; padding: 6px; box-shadow: 0 0 0 1px rgba(233,196,106,.5); }
.id-qr small { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.dues-status { position: relative; overflow: hidden; }
.dues-big { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; margin-bottom: 18px; }
.dues-big b { display: block; font: 700 1.9rem/1.1 var(--ff-head); letter-spacing: .04em; }
.dues-big small { color: var(--muted); }
.dues-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; animation: pop .7s var(--ease); }
.dues-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.is-paid .dues-big { background: var(--green-bg); border: 1px solid rgba(79,191,135,.3); }
.is-paid .dues-big b, .is-paid .dues-icon { color: var(--green); }
.is-paid .dues-icon { background: rgba(79,191,135,.15); }
.is-unpaid .dues-big { background: var(--red-bg); border: 1px solid rgba(224,99,90,.3); }
.is-unpaid .dues-big b, .is-unpaid .dues-icon { color: var(--red); }
.is-unpaid .dues-icon { background: rgba(224,99,90,.15); }
.dues-big.neutral { background: rgba(233,196,106,.06); border-color: var(--line); }
.dues-big.neutral b, .dues-big.neutral .dues-icon { color: var(--gold-100); }
.dues-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dues-meta > div { padding: 12px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.dues-meta small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dues-meta b { font: 700 1.1rem var(--ff-head); color: var(--gold-50); }

.legend { display: flex; align-items: center; gap: 6px 12px; font-size: .76rem; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -6px; }
.lg.paid { background: var(--green); } .lg.unpaid { background: var(--red); } .lg.na { background: #4a4234; }
.month-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.month-grid.compact { grid-template-columns: repeat(6, 1fr); margin-bottom: 16px; }
.month-grid li { display: grid; justify-items: center; gap: 2px; padding: 12px 4px; border-radius: 10px; border: 1px solid; text-align: center; animation: fadeUp .5s var(--ease) both; }
.month-grid li:nth-child(n) { animation-delay: calc(var(--i, 0) * 40ms); }
.month-grid small { font-size: .62rem; color: var(--muted); }
.month-grid b { font: 700 .95rem var(--ff-head); letter-spacing: .05em; }
.month-grid span, .month-grid .link-btn { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.month-grid .paid { background: var(--green-bg); border-color: rgba(79,191,135,.3); color: var(--green); }
.month-grid .unpaid { background: var(--red-bg); border-color: rgba(224,99,90,.3); color: var(--red); }
.month-grid .na { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.06); color: #6c6352; }
.month-grid .current { box-shadow: 0 0 0 2px var(--gold-300); }
.month-grid .link-btn:hover { text-decoration: line-through; }

.info-list { margin: 0 0 12px; display: grid; }
.info-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(233,196,106,.07); align-items: center; }
.info-list dt { font-size: .76rem; color: var(--muted); font-weight: 500; }
.info-list dd { margin: 0; font-weight: 500; word-break: break-word; }
.info-list dd small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.info-list.compact { text-align: left; }
.info-list.compact > div { grid-template-columns: 120px 1fr; }

/* admin member page */
.member-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.member-hero-info h2 { font: 700 1.6rem/1.2 var(--ff-head); color: var(--gold-50); letter-spacing: .03em; }
.member-hero-info p { margin: 6px 0 10px; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.member-hero-qr { display: grid; justify-items: center; gap: 10px; }
.member-hero-qr canvas { width: 130px; height: 130px; background: #fff; border-radius: 10px; padding: 6px; }
.qr-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.danger-zone { border-color: rgba(224,99,90,.3); }
.danger-zone .card-title { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: 30px 0 60px rgba(0,0,0,.6); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; display: block; }
  .sidebar.open + .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar-link { display: none; }
  .member-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .member-hero .chips { justify-content: center; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.6rem; }
  .grid-form fieldset { grid-template-columns: 1fr; }
  .grid-form .span-2 { grid-column: auto; }
  .month-grid { grid-template-columns: repeat(4, 1fr); }
  .month-grid.compact { grid-template-columns: repeat(4, 1fr); }
  .id-card-body { grid-template-columns: auto 1fr; }
  .id-qr { grid-column: 1 / -1; }
  .id-qr canvas { width: 150px; height: 150px; }
  .info-list > div { grid-template-columns: 1fr; gap: 2px; }
  .filters input[type="search"] { min-width: 0; flex: 1 1 100%; }
  .filters select, .filters input { flex: 1 1 auto; }
  .dues-meta { grid-template-columns: 1fr 1fr 1fr; }
  .dues-meta b { font-size: .95rem; }
  .member-nav a { padding: 8px 10px; font-size: .8rem; }
  .bars { gap: 8px; }
  .bar-val { font-size: .58rem; }
  .row-2 { grid-template-columns: 1fr; }
}

/* ---------- Print: membership card only ---------- */
@media print {
  body { background: #fff !important; }
  .member-top, .portal-foot, .welcome-banner, .alert, .card:not(.id-card-wrap), .dash-grid > :not(.id-card-wrap), .card-actions, .card-head { display: none !important; }
  .dash-grid { display: block; }
  .id-card-wrap { border: 0; box-shadow: none; background: none; padding: 0; animation: none; }
  .id-card { width: 3.6in; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .id-card::after { display: none; }
}

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