/* =========================================================
   FTNS Alumni Association — Stylesheet
   Navy + warm gold, Fraunces (display) + Inter (text)
   ========================================================= */
:root {
  --navy-950: #0b1c2b;
  --navy-900: #10273a;
  --navy-800: #163550;
  --navy-700: #1e4466;
  --navy-600: #2a5a84;
  --gold-500: #d4a35c;
  --gold-400: #e0b778;
  --gold-100: #f7ecdb;
  --ink: #142233;
  --muted: #5c6b7a;
  --line: #e3e8ee;
  --bg: #f6f7f9;
  --card: #ffffff;
  --green: #1f8a5b;
  --green-bg: #e6f5ee;
  --amber: #a86a12;
  --amber-bg: #fdf3e2;
  --red: #c0392b;
  --red-bg: #fbeceb;
  --blue-bg: #e8f0f9;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 39, 58, .06), 0 1px 3px rgba(16, 39, 58, .05);
  --shadow: 0 10px 30px -12px rgba(16, 39, 58, .22);
  --shadow-lg: 0 30px 60px -20px rgba(11, 28, 43, .35);
  --font-display: 'Fraunces', Georgia, serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15.5px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--navy-900); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.15em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .78em 1.4em; border-radius: 10px; font-weight: 600; font-size: .95rem; font-family: inherit; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s, color .2s; line-height: 1.2; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { padding: .55em 1em; font-size: .87rem; border-radius: 8px; }
.btn-lg { padding: 1em 1.8em; font-size: 1rem; }
.btn-gold { background: var(--gold-500); color: var(--navy-950); box-shadow: 0 6px 16px -6px rgba(212, 163, 92, .7); }
.btn-gold:hover { background: var(--gold-400); color: var(--navy-950); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--navy-800); background: #fff; }
.btn-outline:hover { border-color: var(--navy-600); color: var(--navy-900); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #18774d; color: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: #f0c9c4; }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-block { width: 100%; }
.btn-icon { padding: .5em; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--navy-900); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(140deg, var(--gold-400), var(--gold-500)); color: var(--navy-950); display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.22rem; letter-spacing: .02em; font-weight: 600; }
.brand-text small { font-size: .72rem; color: rgba(255, 255, 255, .62); letter-spacing: .06em; margin-top: 2px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a { color: rgba(255, 255, 255, .78); padding: 8px 14px; border-radius: 8px; font-weight: 500; font-size: .94rem; display: inline-flex; align-items: center; gap: 4px; }
.main-nav > a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.main-nav > a.is-active { color: #fff; }
.main-nav > a.is-active::after { content: ''; display: block; position: absolute; }
.main-nav > a.is-active { box-shadow: inset 0 -2px 0 var(--gold-500); border-radius: 0; }
.lock-dot .icon { width: 12px; height: 12px; opacity: .6; }
.nav-actions { display: flex; gap: 8px; margin-left: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle.dark { color: var(--navy-900); }

/* ---------- Alerts ---------- */
.flash-stack { margin-top: 18px; }
.alert { position: relative; padding: 13px 44px 13px 16px; border-radius: 10px; margin-bottom: 12px; font-size: .94rem; border: 1px solid; }
.alert-success { background: var(--green-bg); color: #155c3d; border-color: #c4e8d6; }
.alert-error { background: var(--red-bg); color: #8e2a20; border-color: #f2cdc8; }
.alert-warning { background: var(--amber-bg); color: #7d4f0d; border-color: #f2dcb6; }
.alert-info { background: var(--blue-bg); color: var(--navy-800); border-color: #cddcee; }
.alert-close { position: absolute; right: 10px; top: 8px; background: none; border: 0; font-size: 1.3rem; color: inherit; opacity: .55; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 500px at 0% 0%, var(--navy-700) 0%, transparent 60%), var(--navy-900); color: #fff; padding: 64px 0 90px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(212, 163, 92, .5), transparent); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--gold-500); }
.hero h1 { font-family: var(--font-display); color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -.01em; margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--gold-400); font-weight: 500; }
.hero-text { font-size: 1.1rem; color: rgba(255, 255, 255, .78); max-width: 470px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.2; background: var(--navy-800); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-empty { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; color: rgba(255, 255, 255, .55); background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px), var(--navy-800); padding: 30px; }
.hero-photo-empty .icon { width: 46px; height: 46px; margin: 0 auto 10px; color: var(--gold-500); }
.hero-badge { position: absolute; left: -26px; bottom: 34px; background: #fff; color: var(--ink); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); }
.hero-badge .avatars { display: flex; }
.hero-badge .avatars > * { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px; object-fit: cover; font-size: .7rem; }
.hero-badge .avatars > *:first-child { margin-left: 0; }
.hero-badge strong { display: block; font-size: 1.05rem; color: var(--navy-900); }
.hero-badge small { color: var(--muted); font-size: .78rem; }
.hero-caption { position: absolute; right: 16px; top: 16px; background: rgba(11, 28, 43, .72); backdrop-filter: blur(6px); color: #fff; font-size: .78rem; padding: 6px 12px; border-radius: 99px; }

/* ---------- Stats strip ---------- */
.stats-strip { margin-top: -48px; position: relative; z-index: 2; }
.stats-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 20px; text-align: center; position: relative; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.1rem; color: var(--navy-900); font-weight: 600; line-height: 1.1; }
.stat span { font-size: .82rem; color: var(--gold-500); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-white { background: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; margin: 0; }
.section-head p { color: var(--muted); margin: 8px 0 0; max-width: 560px; }
.link-arrow { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; color: var(--navy-700); }
.link-arrow:hover { gap: 10px; }
.link-arrow .icon { transition: transform .2s; }

/* ---------- Secretary feature ---------- */
.secretary { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.secretary-photo { position: relative; }
.secretary-photo img, .secretary-photo .avatar-fallback { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.secretary-photo .avatar-fallback { display: grid; place-items: center; font-size: 5rem; }
.secretary-photo::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--gold-500); border-radius: var(--radius-lg); z-index: -1; }
.secretary blockquote { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.45; color: var(--navy-900); margin: 0 0 26px; font-weight: 500; position: relative; padding-top: 34px; }
.secretary blockquote::before { content: '“'; position: absolute; top: -26px; left: -6px; font-size: 5rem; color: var(--gold-500); line-height: 1; }
.secretary .who strong { display: block; font-size: 1.15rem; color: var(--navy-900); }
.secretary .who span { color: var(--gold-500); font-weight: 600; font-size: .9rem; }
.secretary .who small { display: block; color: var(--muted); margin-top: 2px; }
.secretary .contact-row { display: flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; font-size: .9rem; }
.secretary .contact-row a, .secretary .contact-row span { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }

/* ---------- Committee ---------- */
.committee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.person-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; text-align: center; }
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.person-card .pc-photo { aspect-ratio: 1 / 1.05; overflow: hidden; background: var(--navy-800); }
.person-card .pc-photo img, .person-card .pc-photo .avatar-fallback { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.person-card:hover .pc-photo img { transform: scale(1.04); }
.person-card .pc-photo .avatar-fallback { display: grid; place-items: center; font-size: 3rem; border-radius: 0; }
.person-card .pc-body { padding: 16px 14px 18px; }
.person-card h3 { font-size: 1.02rem; margin: 0 0 2px; }
.person-card .role { color: var(--gold-500); font-weight: 600; font-size: .84rem; }
.person-card small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 200px; gap: 16px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-800); grid-column: span 4; cursor: zoom-in; border: 0; padding: 0; }
.gallery-grid.featured .gallery-item:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.gallery-grid.featured .gallery-item:nth-child(2) { grid-column: span 5; }
.gallery-grid.featured .gallery-item:nth-child(3) { grid-column: span 5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 18px 14px; background: linear-gradient(transparent, rgba(11, 28, 43, .85)); color: #fff; text-align: left; font-size: .92rem; font-weight: 600; }
.gallery-item figcaption small { display: block; font-weight: 400; color: var(--gold-400); font-size: .78rem; }
.lightbox { position: fixed; inset: 0; background: rgba(6, 15, 24, .92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 84vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox p { color: #fff; text-align: center; margin-top: 14px; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer; }

/* ---------- Members preview / CTA ---------- */
.members-cta { background: linear-gradient(130deg, var(--navy-900), var(--navy-700)); border-radius: var(--radius-lg); padding: 48px; color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; overflow: hidden; position: relative; }
.members-cta h2 { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.members-cta p { color: rgba(255, 255, 255, .75); }
.avatar-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: relative; }
.avatar-wall > * { aspect-ratio: 1; width: 100%; border-radius: 14px; object-fit: cover; filter: blur(1.5px) saturate(.9); opacity: .85; }
.avatar-wall .avatar-fallback { display: grid; place-items: center; font-size: 1.3rem; border-radius: 14px; }
.avatar-wall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 39, 58, .1), rgba(16, 39, 58, .4)); border-radius: 14px; }
.lock-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(212, 163, 92, .16); color: var(--gold-400); padding: 6px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; margin-bottom: 14px; }

/* ---------- Events ---------- */
.event-list { display: grid; gap: 18px; }
.event-card { display: grid; grid-template-columns: 88px 200px 1fr auto; gap: 22px; align-items: center; background: #fff; border-radius: var(--radius); padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.event-card:hover { box-shadow: var(--shadow); }
.event-date { text-align: center; background: var(--gold-100); border-radius: 12px; padding: 12px 6px; }
.event-date strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--navy-900); }
.event-date span { font-size: .78rem; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .08em; }
.event-thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--navy-800); }
.event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.event-meta { display: flex; gap: 16px; color: var(--muted); font-size: .86rem; flex-wrap: wrap; margin-bottom: 6px; }
.event-meta span { display: inline-flex; gap: 6px; align-items: center; }
.event-card p { color: var(--muted); margin: 0; font-size: .92rem; }
.event-card.past { opacity: .72; }
.event-card.past .event-date { background: #eef1f4; }

/* ---------- Page header (inner pages) ---------- */
.page-hero { background: var(--navy-900); color: #fff; padding: 56px 0 60px; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(212, 163, 92, .07); }
.page-hero h1 { color: #fff; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; margin-bottom: 8px; }
.page-hero p { color: rgba(255, 255, 255, .72); margin: 0; max-width: 620px; }
.crumbs { font-size: .82rem; color: rgba(255, 255, 255, .55); margin-bottom: 12px; }
.crumbs a { color: var(--gold-400); }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px; border: 1px solid var(--line); }
.form-section { border: 0; padding: 0; margin: 0 0 30px; }
.form-section legend { font-weight: 700; color: var(--navy-900); font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 0; }
.form-section legend span { font-family: var(--font-display); color: var(--gold-500); font-size: .95rem; background: var(--gold-100); border-radius: 7px; padding: 1px 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label, .label-strong { font-size: .87rem; font-weight: 600; color: var(--navy-900); }
.req { color: var(--red); }
.opt { font-weight: 400; color: var(--muted); font-size: .76rem; margin-left: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: .95rem; color: var(--ink); background: #fbfcfd; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-600); background: #fff; box-shadow: 0 0 0 4px rgba(42, 90, 132, .12); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); background: #fffafa; }
.hint { color: var(--muted); font-size: .8rem; margin: 0; }
.error { color: var(--red); font-size: .8rem; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: center; font-size: .93rem; margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--navy-700); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; }
.pw-meter { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 2px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.photo-field { display: flex; gap: 22px; align-items: center; padding: 20px; background: var(--bg); border-radius: var(--radius); border: 1.5px dashed #cfd8e2; margin-bottom: 30px; }
.photo-field.has-error { border-color: var(--red); }
.photo-preview { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: #fff; flex-shrink: 0; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.photo-preview img, .photo-preview .photo-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.photo-preview .avatar-fallback { width: 100%; height: 100%; font-size: 2rem; }
.photo-empty .icon { width: 40px; height: 40px; color: #b6c2cf; }
.photo-field .hint { margin: 2px 0 10px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.form-actions p { margin: 0; color: var(--muted); font-size: .88rem; }

/* Apply page layout */
.apply-layout { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; margin-top: -40px; position: relative; z-index: 2; padding-bottom: 80px; }
.apply-aside { background: var(--navy-800); color: #fff; border-radius: var(--radius-lg); padding: 30px; position: sticky; top: 100px; box-shadow: var(--shadow); }
.apply-aside h3 { color: #fff; font-family: var(--font-display); font-weight: 600; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 22px 46px; color: rgba(255, 255, 255, .75); font-size: .92rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: rgba(212, 163, 92, .18); color: var(--gold-400); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.steps li::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: rgba(255, 255, 255, .1); }
.steps li:last-child::after { display: none; }
.steps strong { color: #fff; display: block; }

/* Auth (login) */
.auth-wrap { min-height: calc(100vh - 74px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy-900); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; inset: 0; background: var(--auth-img) center / cover no-repeat; opacity: .22; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { color: #fff; font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; }
.auth-side p { color: rgba(255, 255, 255, .75); max-width: 420px; }
.auth-form { display: grid; place-items: center; padding: 50px 24px; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; }
.auth-box .sub { color: var(--muted); margin-bottom: 28px; }
.auth-box .field { margin-bottom: 16px; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.auth-foot a { font-weight: 600; }

/* ---------- Directory ---------- */
.filter-bar { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; margin-bottom: 26px; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input input { padding-left: 40px; }
.result-count { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.member-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; color: inherit; }
.member-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.member-card .mc-cover { height: 64px; background: linear-gradient(120deg, var(--navy-800), var(--navy-600)); }
.member-card .mc-avatar { width: 92px; height: 92px; border-radius: 50%; border: 4px solid #fff; margin: -46px auto 0; object-fit: cover; box-shadow: var(--shadow-sm); font-size: 1.6rem; }
.member-card .mc-body { padding: 12px 18px 20px; text-align: center; flex: 1; }
.member-card h3 { font-size: 1.05rem; margin: 4px 0 2px; }
.member-card .mc-role { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.member-card .mc-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tag { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: .76rem; color: var(--navy-800); font-weight: 500; }
.tag-gold { background: var(--gold-100); border-color: #f0dcbc; color: var(--amber); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: #fff; border-radius: var(--radius); border: 1px dashed #cfd8e2; }
.empty .icon { width: 42px; height: 42px; color: #b6c2cf; margin: 0 auto 10px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .9rem; padding: 0 10px; }
.pagination .current { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* Member profile view */
.profile-head { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-top: -60px; position: relative; z-index: 2; }
.profile-cover { height: 120px; background: linear-gradient(120deg, var(--navy-800), var(--navy-600) 60%, var(--gold-500)); }
.profile-main { display: flex; gap: 26px; padding: 0 34px 30px; align-items: flex-end; flex-wrap: wrap; }
.profile-main .avatar-xl { width: 150px; height: 150px; border-radius: 50%; border: 6px solid #fff; margin-top: -75px; object-fit: cover; box-shadow: var(--shadow); font-size: 3rem; }
.profile-main h1 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 2rem; }
.profile-main .lead { color: var(--muted); margin: 0; }
.profile-main .actions { margin-left: auto; display: flex; gap: 8px; }
.profile-body { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin: 24px 0 80px; }
.info-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 26px; box-shadow: var(--shadow-sm); }
.info-card h3 { font-size: 1rem; margin-bottom: 16px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.info-list li:last-child { border-bottom: 0; }
.info-list .icon { color: var(--gold-500); margin-top: 3px; }
.info-list small { display: block; color: var(--muted); font-size: .78rem; }
.info-list strong { font-weight: 600; font-size: .95rem; word-break: break-word; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.dl-grid dt { color: var(--muted); font-size: .8rem; }
.dl-grid dd { margin: 2px 0 0; font-weight: 600; }

/* ---------- Panel / dashboard ---------- */
.panel-body { background: #f2f4f7; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; background: var(--navy-950); color: #fff; display: flex; flex-direction: column; z-index: 60; padding: 20px 14px; transition: transform .3s; }
.sidebar .brand { padding: 4px 8px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; }
.side-nav { flex: 1; overflow-y: auto; }
.side-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .38); padding: 16px 12px 8px; font-weight: 700; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: rgba(255, 255, 255, .72); font-size: .92rem; font-weight: 500; margin-bottom: 2px; width: 100%; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.is-active { background: linear-gradient(90deg, rgba(212, 163, 92, .2), rgba(212, 163, 92, .04)); color: #fff; box-shadow: inset 3px 0 0 var(--gold-500); }
.side-nav a.is-active .icon { color: var(--gold-400); }
.side-nav .count { margin-left: auto; background: var(--gold-500); color: var(--navy-950); font-style: normal; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.panel-main { margin-left: 264px; min-height: 100vh; }
.topbar { height: 72px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 30px; position: sticky; top: 0; z-index: 40; }
.topbar-title { font-size: 1.25rem; margin: 0; flex: 1; font-family: var(--font-display); font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.topbar-user strong { display: block; font-size: .9rem; }
.topbar-user small { color: var(--muted); font-size: .78rem; }
.panel-content { padding: 30px; max-width: 1280px; }
.sidebar-backdrop { display: none; }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: .82rem; }
.avatar-md { width: 52px; height: 52px; font-size: 1rem; }
.avatar-fallback { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); color: var(--gold-400); font-weight: 700; font-family: var(--font-display); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; gap: 16px; align-items: center; }
.kpi-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-bg); color: var(--navy-700); flex-shrink: 0; }
.kpi-icon .icon { width: 22px; height: 22px; }
.kpi-icon.gold { background: var(--gold-100); color: var(--amber); }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-icon.red { background: var(--red-bg); color: var(--red); }
.kpi strong { display: block; font-size: 1.6rem; font-family: var(--font-display); line-height: 1.1; color: var(--navy-900); }
.kpi span { color: var(--muted); font-size: .85rem; }

.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 1.05rem; margin: 0; }
.card-body { padding: 22px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.two-col > * { min-width: 0; }   /* wide tables scroll inside their card instead of widening the page on phones */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fbfcfd; }
.person-cell { display: flex; gap: 12px; align-items: center; }
.person-cell strong { display: block; font-size: .92rem; }
.person-cell small { color: var(--muted); font-size: .8rem; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table .row-actions { flex-wrap: nowrap; }
.row-actions form { margin: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.badge-approved { background: var(--green-bg); color: var(--green); }
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-rejected { background: var(--red-bg); color: var(--red); }
.badge-suspended { background: #eceff3; color: #56626e; }
.badge-admin { background: var(--navy-800); color: #fff; }

.tabs { display: flex; gap: 4px; background: #fff; padding: 5px; border-radius: 11px; border: 1px solid var(--line); width: fit-content; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.tabs a.is-active { background: var(--navy-800); color: #fff; }
.tabs a em { font-style: normal; opacity: .7; margin-left: 4px; font-weight: 500; }

/* Application review cards */
.app-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; margin-bottom: 16px; }
.app-card .app-photo img, .app-card .app-photo .avatar-fallback { width: 110px; height: 110px; border-radius: 14px; object-fit: cover; font-size: 2rem; cursor: zoom-in; }
.app-card h3 { margin: 0 0 2px; font-size: 1.12rem; }
.app-card .meta { color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.app-card .dl-grid { grid-template-columns: repeat(3, 1fr); font-size: .9rem; }
.app-actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.reject-form { display: none; margin-top: 8px; }
.reject-form.open { display: block; }
.reject-form textarea { min-height: 70px; font-size: .88rem; margin-bottom: 6px; }

/* Status hero for member dashboard */
.status-banner { border-radius: var(--radius-lg); padding: 28px 30px; display: flex; gap: 22px; align-items: center; margin-bottom: 26px; }
.status-banner.pending { background: linear-gradient(120deg, #fff6e6, #fdebd0); border: 1px solid #f2dcb6; }
.status-banner.approved { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #fff; }
.status-banner.approved h2 { color: #fff; }
.status-banner.approved p { color: rgba(255, 255, 255, .75); }
.status-banner.rejected, .status-banner.suspended { background: var(--red-bg); border: 1px solid #f2cdc8; }
.status-banner h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; font-size: 1.5rem; }
.status-banner p { margin: 0; }
.status-banner .avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .5); font-size: 1.8rem; flex-shrink: 0; }
.status-banner .btns { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.completeness { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.completeness i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--green)); border-radius: 99px; }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.thumb-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); }
.thumb-card .thumb { aspect-ratio: 16 / 10; background: var(--navy-800); position: relative; }
.thumb-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-card .thumb .badge { position: absolute; top: 10px; left: 10px; }
.thumb-card .thumb-body { padding: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.thumb-card strong { font-size: .92rem; display: block; }
.thumb-card small { color: var(--muted); }

.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-right { text-align: right; }
.inline-form { display: inline; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .68); padding: 64px 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-about { margin-top: 18px; max-width: 340px; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255, 255, 255, .68); }
.site-footer a:hover { color: var(--gold-400); }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list .icon { color: var(--gold-500); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px; display: flex; justify-content: space-between; font-size: .84rem; flex-wrap: wrap; gap: 10px; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .profile-body { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .search-input { grid-column: 1 / -1; }
  .event-card { grid-template-columns: 80px 1fr auto; }
  .event-thumb { display: none; }
  .app-card { grid-template-columns: 90px 1fr; }
  .app-card .app-photo img, .app-card .app-photo .avatar-fallback { width: 90px; height: 90px; }
  .app-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .app-card .dl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 74px; left: 0; right: 0; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: 12px 20px 22px; gap: 2px; display: none; box-shadow: var(--shadow-lg); }
  .main-nav.open { display: flex; }
  .main-nav > a.is-active { box-shadow: inset 3px 0 0 var(--gold-500); }
  .nav-actions { margin: 12px 0 0; }
  .nav-actions .btn { flex: 1; }
  .hero-grid, .secretary, .members-cta, .apply-layout, .auth-wrap { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 80px; }
  .hero-badge { left: 12px; bottom: 12px; padding: 10px 14px; }
  .secretary { gap: 40px; }
  .secretary-photo { max-width: 340px; }
  .apply-aside { position: static; }
  .auth-side { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(6, 15, 24, .5); z-index: 55; }
  .panel-main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar-user div { display: none; }
  .panel-content { padding: 20px 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery-item, .gallery-grid.featured .gallery-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery-grid.featured .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  .stats-card { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .grid-2, .grid-3, .dl-grid, .app-card .dl-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
  .photo-field { flex-direction: column; text-align: center; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .members-cta { padding: 30px 22px; }
  .event-card { grid-template-columns: 64px 1fr; }
  .event-card > .btn { grid-column: 1 / -1; }
  .profile-main { padding: 0 20px 24px; flex-direction: column; align-items: flex-start; }
  .profile-main .actions { margin-left: 0; }
  .status-banner { flex-direction: column; align-items: flex-start; }
  .status-banner .btns { margin-left: 0; }
  .filter-bar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .app-card { grid-template-columns: 1fr; }
  .table .hide-sm { display: none; }
}

/* ---------- Donation page ---------- */
.donate-hero { padding-bottom: 70px; }
.donate-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end; }
.purpose-list { list-style: none; margin: 0; padding: 22px 24px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); position: relative; z-index: 1; }
.purpose-list li { display: flex; gap: 10px; align-items: center; padding: 7px 0; color: rgba(255, 255, 255, .88); font-size: .95rem; }
.purpose-list .icon { color: var(--gold-400); }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 22px; }
.pay-card { --brand: var(--navy-700); --brand-soft: var(--blue-bg); background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.pay-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.pay-card header { display: flex; gap: 14px; align-items: center; padding: 20px 22px; background: var(--brand); color: #fff; }
.pay-card header h3 { color: #fff; margin: 0; font-size: 1.2rem; }
.pay-card header small { color: rgba(255, 255, 255, .78); font-size: .82rem; }
.pay-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.pay-icon .icon { width: 24px; height: 24px; }
.wallet-bkash { --brand: #e2136e; --brand-soft: #fde7f1; }
.wallet-nagad { --brand: #ee5a24; --brand-soft: #fdece4; }
.wallet-rocket { --brand: #8c3494; --brand-soft: #f4e8f5; }
.wallet-upay { --brand: #1b4f9c; --brand-soft: #e6eef9; }
.pay-card.bank { --brand: linear-gradient(120deg, var(--navy-900), var(--navy-700)); }
.pay-body { padding: 18px 22px 22px; }
.pay-qr-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-qr-row small { color: var(--muted); font-size: .84rem; }
.pay-qr-row strong { display: block; color: var(--navy-900); font-size: .92rem; }
.pay-qr { width: 104px; height: 104px; flex-shrink: 0; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); padding: 6px; background: #fff; cursor: zoom-in; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.pay-row:last-of-type { border-bottom: 0; }
.pay-row > span { color: var(--muted); font-size: .84rem; flex-shrink: 0; }
.copy-btn { position: relative; display: inline-flex; min-width: 0; justify-content: flex-end; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 6px; margin-right: -6px; border-radius: 7px; font: inherit; color: var(--ink); cursor: pointer; text-align: right; }
.copy-btn:hover { background: var(--bg); }
.copy-btn strong { font-weight: 600; overflow-wrap: anywhere; word-break: normal; }
.copy-btn .icon { color: var(--muted); width: 15px; height: 15px; }
.copy-btn em { position: absolute; right: 0; top: -26px; background: var(--navy-900); color: #fff; font-style: normal; font-size: .72rem; padding: 3px 8px; border-radius: 6px; opacity: 0; transform: translateY(4px); transition: .2s; pointer-events: none; }
.copy-btn.copied em { opacity: 1; transform: none; }
.pay-row-big { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; border: 0; margin: 4px 0 6px; }
.pay-row-big strong { font-family: var(--font-display); font-size: 1.3rem; white-space: nowrap; letter-spacing: .03em; color: var(--navy-900); }
.pay-card.bank .pay-row-big { background: var(--blue-bg); }
.pay-note { margin: 12px 0 0; font-size: .87rem; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.donate-steps { margin-top: 64px; background: var(--gold-100); border: 1px solid #f0dcbc; border-radius: var(--radius-lg); padding: 34px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 34px; align-items: center; }
.donate-steps h2 { font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
.donate-steps .ds-head p { color: #6b5636; margin: 0; }
.donate-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: d; }
.donate-steps li { counter-increment: d; background: #fff; border-radius: 14px; padding: 18px; font-size: .88rem; color: var(--muted); box-shadow: var(--shadow-sm); }
.donate-steps li::before { content: counter(d); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-800); color: #fff; font-weight: 700; font-size: .82rem; margin-bottom: 10px; }
.donate-steps li strong { display: block; color: var(--navy-900); font-size: .95rem; margin-bottom: 2px; }
.donate-steps li a { font-weight: 600; word-break: break-word; }
.donate-band { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 34px; display: flex; align-items: center; gap: 24px; box-shadow: var(--shadow-sm); }
.donate-band .db-icon { width: 60px; height: 60px; border-radius: 16px; background: var(--gold-100); color: var(--amber); display: grid; place-items: center; flex-shrink: 0; }
.donate-band .db-icon .icon { width: 28px; height: 28px; }
.donate-band h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 0 0 4px; }
.donate-band p { margin: 0; color: var(--muted); }
.donate-band .btn { margin-left: auto; }
.wallet-chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wallet-chips span { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: #fff; background: var(--brand); }
/* Admin segmented control */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 11px; border: 1px solid var(--line); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border-radius: 8px; font-weight: 600; font-size: .88rem; color: var(--muted); transition: .2s; }
.seg input:checked + span { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--gold-400); }
[data-pay-form].is-mobile [data-bank-only], [data-pay-form].is-bank [data-mobile-only] { display: none; }
@media (max-width: 920px) {
  .donate-hero-grid, .donate-steps { grid-template-columns: 1fr; }
  .donate-band { flex-direction: column; align-items: flex-start; }
  .donate-band .btn { margin-left: 0; }
}
@media (max-width: 640px) {
  .pay-grid { grid-template-columns: 1fr; }
  .donate-steps { padding: 22px; }
  .donate-steps ol { grid-template-columns: 1fr; }
  .pay-row-big strong { font-size: 1.15rem; }
}
.wallet-bank { --brand: var(--navy-700); }
input.is-readonly { background: var(--bg); color: var(--muted); cursor: not-allowed; border-style: dashed; }

/* ---------- Application done / password pages ---------- */
.done-card { text-align: center; padding: 48px 40px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--green-bg); color: var(--green); }
.done-icon .icon { width: 30px; height: 30px; }
.done-icon.warn { background: var(--amber-bg); color: var(--amber); }
.form-card > .done-icon:first-child { margin-left: 0; }
.form-card.done-card > .done-icon { margin-left: auto; }
.done-card h1, .auth-title { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; margin-bottom: 8px; }
.done-card .lead { color: var(--muted); margin-bottom: 26px; }
.done-steps { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; counter-reset: ds; display: grid; gap: 12px; }
.done-steps li { counter-increment: ds; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; background: var(--bg); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: .92rem; }
.done-steps li::before { content: counter(ds); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.done-steps li strong { color: var(--navy-900); font-size: .98rem; }
.done-steps li b { color: var(--navy-900); word-break: break-all; }
.done-steps li:first-child::before { background: var(--gold-500); color: var(--navy-950); }
.alert { word-break: break-word; }
@media (max-width: 640px) { .done-card { padding: 32px 20px; } }

/* ---------- Credit line ---------- */
.footer-bottom .credit { color: rgba(255, 255, 255, .55); }
.footer-bottom .credit a { color: var(--gold-400); font-weight: 600; }
.footer-bottom .credit a:hover { color: #fff; }
.panel-credit { text-align: center; font-size: .8rem; color: var(--muted); margin: 32px 0 0; }
.panel-credit a { color: var(--navy-700); font-weight: 600; }
@media (max-width: 640px) { .footer-bottom { flex-direction: column; align-items: center; text-align: center; } }

/* =========================================================
   v4 — Accounts, payment gateway, roles, email, dev
   ========================================================= */
.pos { color: var(--green); }
.neg { color: var(--red); }
.sub-head { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin: 8px 0 16px; }
.mb-0 { margin-bottom: 0 !important; }
.count-pill { font-style: normal; background: var(--gold-500); color: var(--navy-950); font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.small-link { font-size: .8rem; display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.small-link .icon { width: 14px; height: 14px; }
.two-col.even { grid-template-columns: 1fr 1fr; }

/* Donate online form */
.donate-online { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 34px; max-width: 860px; margin: 0 auto; }
.do-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.do-head h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 2px; }
.do-head p { margin: 0; color: var(--muted); }
.db-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--gold-100); color: var(--amber); display: grid; place-items: center; flex-shrink: 0; }
.db-icon .icon { width: 26px; height: 26px; }
.amount-chips, .src-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: #fbfcfd; font-weight: 600; font-size: .95rem; transition: .15s; }
.chip:hover span { border-color: var(--navy-600); }
.chip input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; box-shadow: 0 6px 14px -8px rgba(16, 39, 58, .6); }
.chip input:focus-visible + span { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.amount-chips .chip span { font-family: var(--font-display); font-size: 1.08rem; min-width: 96px; justify-content: center; }
.custom-amount { display: none; align-items: center; gap: 8px; margin-top: 12px; max-width: 280px; }
.custom-amount.show { display: flex; }
.custom-amount span { font-family: var(--font-display); font-size: 1.4rem; color: var(--navy-800); }
.custom-amount input { font-size: 1.15rem; font-weight: 600; }
.do-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 22px; }
.do-foot p { margin: 0; font-size: .86rem; display: flex; gap: 6px; align-items: center; }
.sub-head + .pay-grid { margin-bottom: 8px; }

/* Payment gateway */
.gateway-wrap { padding: 48px 0 80px; background: linear-gradient(180deg, var(--navy-900) 0 240px, var(--bg) 240px); }
.gateway { display: grid; grid-template-columns: 340px 1fr; background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; max-width: 1040px; margin: 0 auto; }
.gw-summary { background: linear-gradient(165deg, var(--navy-800), var(--navy-950)); color: #fff; padding: 32px 28px; display: flex; flex-direction: column; gap: 24px; }
.gw-brand { display: flex; gap: 12px; align-items: center; }
.gw-brand strong { display: block; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; }
.gw-brand small { color: var(--gold-400); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.gw-amount { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 20px; }
.gw-amount small { color: rgba(255, 255, 255, .65); font-size: .82rem; display: block; }
.gw-amount strong { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; line-height: 1.15; }
.gw-dl { margin: 0; display: grid; gap: 10px; }
.gw-dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.gw-dl dt { color: rgba(255, 255, 255, .6); }
.gw-dl dd { margin: 0; text-align: right; font-weight: 600; }
.gw-dl code { color: var(--gold-400); }
.gw-steps { list-style: none; counter-reset: g; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .88rem; color: rgba(255, 255, 255, .78); }
.gw-steps li { counter-increment: g; display: flex; gap: 10px; align-items: flex-start; }
.gw-steps li::before { content: counter(g); width: 22px; height: 22px; border-radius: 50%; background: rgba(212, 163, 92, .2); color: var(--gold-400); font-weight: 700; font-size: .75rem; display: grid; place-items: center; flex-shrink: 0; }
.gw-steps strong { color: #fff; }
.gw-cancel { color: rgba(255, 255, 255, .6); font-size: .86rem; margin-top: auto; }
.gw-cancel:hover { color: #fff; }
.gw-main { padding: 34px 38px; }
.gw-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 26px 0 14px; }
.gw-title:first-of-type { margin-top: 0; }
.gw-title span { width: 26px; height: 26px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-size: .8rem; }
.gw-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gw-method { --brand: var(--navy-700); cursor: pointer; }
.gw-method input { position: absolute; opacity: 0; }
.gw-method > span { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--line); border-radius: 14px; font-weight: 700; transition: .15s; position: relative; }
.gw-method > span small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.gw-method i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-bottom: 8px; }
.gw-method i .icon { width: 18px; height: 18px; }
.gw-method:hover > span { border-color: var(--brand); }
.gw-method input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.gw-method input:checked + span::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.gw-method input:focus-visible + span { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.gw-method.wallet-bank { --brand: var(--navy-700); }
.gw-detail { box-shadow: none; }
.gw-detail:hover { transform: none; box-shadow: none; }
.gw-detail .pay-body { padding: 18px 20px; }
.gw-howto { margin: 0 0 12px; font-size: .9rem; color: var(--ink); background: var(--brand-soft, var(--blue-bg)); border-radius: 10px; padding: 10px 12px; }
.gw-upload { display: flex; gap: 16px; align-items: center; padding: 16px; border: 1.5px dashed #cfd8e2; border-radius: 14px; background: var(--bg); margin: 18px 0 22px; }
.gw-upload .hint { margin: 2px 0 8px; }
.gw-upload.has-error { border-color: var(--red); }
.gw-fine { font-size: .8rem; text-align: center; margin: 12px 0 0; display: flex; justify-content: center; gap: 6px; align-items: center; }
.gw-state { text-align: center; padding: 30px 10px; }
.gw-state .done-icon { margin: 0 auto 16px; }
.gw-state h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; }
.gw-state .lead { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.gw-dl-box { background: var(--bg); border-radius: 14px; padding: 16px 18px; max-width: 460px; margin: 0 auto 18px; text-align: left; }
.gw-dl-box dt { color: var(--muted); }
.gw-dl-box code { color: var(--navy-800); }
.gw-methods.has-error .gw-method > span { border-color: #f0c9c4; }

/* Fee card */
.fee-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 24px; border-radius: var(--radius-lg); margin-bottom: 24px; border: 1px solid; }
.fee-card.fee-unpaid { background: linear-gradient(120deg, #fff8ec, #fdecd2); border-color: #f2dcb6; }
.fee-card.fee-pending { background: var(--blue-bg); border-color: #cddcee; }
.fee-card.fee-paid { background: var(--green-bg); border-color: #c4e8d6; }
.fee-main { display: flex; gap: 16px; align-items: center; }
.fee-icon { width: 54px; height: 54px; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.fee-icon .icon { width: 26px; height: 26px; }
.fee-unpaid .fee-icon { color: var(--amber); }
.fee-pending .fee-icon { color: var(--navy-600); }
.fee-paid .fee-icon { color: var(--green); }
.fee-main small { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.fee-main strong { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.2; color: var(--navy-900); }
.fee-main p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }

/* Accounts overview */
.acc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.acc-hero { display: grid; grid-template-columns: 1.1fr 1.6fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow); }
.acc-balance { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 28px; }
.acc-balance small { color: var(--gold-400); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.acc-balance strong { display: block; font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1.15; margin: 6px 0; }
.acc-balance span { color: rgba(255, 255, 255, .65); font-size: .84rem; }
.acc-kpis { background: #fff; display: grid; grid-template-columns: repeat(3, 1fr); }
.acc-kpis > div { padding: 28px 22px; border-left: 1px solid var(--line); }
.acc-kpis small { color: var(--muted); font-size: .8rem; display: block; margin-bottom: 6px; }
.acc-kpis strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.acc-strip { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; color: inherit; box-shadow: var(--shadow-sm); }
.acc-strip:hover { color: inherit; box-shadow: var(--shadow); }
.acc-strip small { color: var(--muted); font-size: .78rem; display: block; }
.acc-strip strong { font-family: var(--font-display); font-size: 1.25rem; }
.acc-strip .link-arrow { margin-left: auto; }
.acc-mini small { color: var(--muted); font-size: .8rem; }
.acc-mini strong { display: block; font-family: var(--font-display); font-size: 2rem; margin: 2px 0 8px; }
.bar-row { display: block; margin-bottom: 14px; color: inherit; }
a.bar-row:hover .bar-label span { color: var(--navy-600); text-decoration: underline; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; margin-bottom: 6px; }
.bar-label em { font-style: normal; color: var(--muted); font-size: .75rem; background: var(--bg); border-radius: 99px; padding: 0 7px; margin-left: 4px; }
.bar-label small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.bar { height: 9px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.bar-in { background: linear-gradient(90deg, var(--green), #35b37d); }
.bar-ex { background: linear-gradient(90deg, var(--gold-500), #e28a52); }
.link-card { display: block; color: inherit; }
.link-card .card-body { display: flex; gap: 14px; align-items: center; }
.link-card .icon { width: 28px; height: 28px; color: var(--gold-500); }
.link-card small { display: block; color: var(--muted); }
.link-card:hover { color: inherit; box-shadow: var(--shadow); }

/* Ledger */
.ledger-filters { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; align-items: center; }
.ledger-filters .search-input { flex: 1 1 240px; }
.ledger-filters select, .ledger-filters input[type=date] { width: auto; flex: 0 1 auto; padding: 9px 10px; font-size: .88rem; }
.ledger-sum { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 12px 22px; background: #fafbfc; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ledger-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Payment review */
.pay-review { display: grid; grid-template-columns: 140px 1fr 190px; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 16px; }
.pr-shot img { width: 140px; height: 180px; object-fit: cover; border-radius: 12px; cursor: zoom-in; border: 1px solid var(--line); }
.pr-noshot { width: 140px; height: 180px; border-radius: 12px; background: var(--bg); border: 1.5px dashed #cfd8e2; display: grid; place-content: center; justify-items: center; gap: 6px; color: #9aa7b5; font-size: .8rem; }
.pr-noshot .icon { width: 28px; height: 28px; }
.pr-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pr-top h3 { margin: 8px 0 2px; font-size: 1.12rem; }
.pr-top .meta { color: var(--muted); font-size: .85rem; }
.pr-amount { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--navy-900); text-align: right; white-space: nowrap; line-height: 1.1; }
.pr-amount small { display: block; font-family: var(--font); font-size: .75rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
.pr-dl { margin-top: 16px; grid-template-columns: repeat(4, 1fr); background: var(--bg); padding: 14px; border-radius: 12px; font-size: .9rem; }
code.txn { background: var(--gold-100); color: var(--navy-900); padding: 2px 8px; border-radius: 6px; font-weight: 700; letter-spacing: .03em; }
.pr-actions { display: flex; flex-direction: column; gap: 8px; }
.pr-amount-input { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .8rem; color: var(--muted); }
.pr-amount-input input { padding: 8px 10px; font-weight: 700; }

/* Roles / permissions */
.perm-table th.perm-col, .perm-table td.perm-col { text-align: center; width: 120px; }
.perm-table th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: .72rem; }
.perm-table input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--navy-700); cursor: pointer; }
.perm-table input[disabled] { accent-color: var(--gold-500); opacity: .7; cursor: not-allowed; }
.perm-group td { background: var(--navy-900) !important; color: #fff; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; padding: 9px 16px; }
.perm-key { font-size: .72rem; color: var(--muted); background: none; }
.perm-toggle-all { display: block; margin: 4px auto 0; background: none; border: 0; color: var(--navy-600); font-size: .7rem; cursor: pointer; text-transform: none; letter-spacing: 0; text-decoration: underline; }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.role-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; position: relative; box-shadow: var(--shadow-sm); border-top: 4px solid var(--navy-600); }
.role-card.role-master { border-top-color: var(--gold-500); }
.role-card.role-committee { border-top-color: var(--green); }
.role-card strong { font-size: 1rem; }
.role-card span { position: absolute; right: 18px; top: 14px; font-family: var(--font-display); font-size: 1.6rem; color: var(--navy-900); }
.role-card p { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.inline-role select { padding: 7px 10px; font-size: .86rem; width: auto; }
.badge-admin { background: var(--navy-800); color: #fff; }

/* Switches */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd8e2; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.dev-switch { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dev-switch p { margin: 2px 0 8px; color: var(--muted); font-size: .9rem; }
.dev-switch textarea { min-height: 60px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tool { display: grid; grid-template-columns: 48px 1fr; gap: 6px 14px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); margin: 0; }
.tool p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.tool .btn { grid-column: 2; justify-self: start; margin-top: 8px; }
.table tr.is-selected td { background: var(--gold-100) !important; }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.placeholders small { color: var(--muted); margin-right: 4px; }
.placeholders .tag { cursor: pointer; font-family: ui-monospace, monospace; font-size: .74rem; }
.placeholders .tag:hover { background: var(--gold-100); }
.act-payment, .act-income { background: var(--green-bg); border-color: #c4e8d6; color: var(--green); }
.act-expense { background: var(--red-bg); border-color: #f2cdc8; color: var(--red); }
.act-staff, .act-roles, .act-dev { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* Dashboard */
.welcome-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.welcome-row h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 2px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.kpi-feature { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); border: 0; color: #fff; }
.kpi-feature strong { color: #fff; }
.kpi-feature span { color: rgba(255, 255, 255, .7); }
.kpi-feature:hover { color: #fff; }
.mini-event { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.mini-event .event-date { min-width: 56px; padding: 8px 4px; }
.mini-event .event-date strong { font-size: 1.3rem; }
.seg-link { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.seg-link.is-on { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-sm); }
.tips { padding-left: 18px; margin: 8px 0 0; color: var(--muted); }
.tips li { margin-bottom: 6px; }

/* Receipt (printable) */
.receipt-body { background: #e9edf2; padding: 30px 16px; }
.receipt-actions { max-width: 720px; margin: 0 auto 16px; display: flex; justify-content: space-between; }
.receipt { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 44px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.receipt header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--navy-900); padding-bottom: 22px; margin-bottom: 26px; }
.receipt .brand { color: var(--navy-900); }
.receipt .brand-text small { color: var(--muted); }
.receipt-no { text-align: right; }
.receipt-no small { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); font-weight: 700; }
.receipt-no strong { font-family: var(--font-display); font-size: 1.5rem; }
.receipt-paid { position: absolute; right: 40px; top: 150px; transform: rotate(-12deg); border: 3px solid var(--green); color: var(--green); font-weight: 800; letter-spacing: .2em; padding: 6px 18px; border-radius: 10px; font-size: 1.3rem; opacity: .75; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table th { text-align: left; color: var(--muted); font-weight: 500; width: 200px; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.receipt-table td { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.receipt-total th, .receipt-total td { border-bottom: 0; padding-top: 20px; font-size: 1.1rem; color: var(--navy-900); }
.receipt-total td { font-family: var(--font-display); font-size: 1.8rem; }
.receipt footer { margin-top: 30px; font-size: .9rem; }
.receipt footer .muted { font-size: .76rem; word-break: break-all; }
@media print {
  .no-print { display: none !important; }
  .receipt-body { background: #fff; padding: 0; }
  .receipt { box-shadow: none; border-radius: 0; padding: 20px; }
}

@media (max-width: 1080px) {
  .dash-grid, .two-col.even { grid-template-columns: 1fr; }
  .pay-review { grid-template-columns: 110px 1fr; }
  .pr-shot img, .pr-noshot { width: 110px; height: 140px; }
  .pr-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .pr-actions form { flex: 1; min-width: 200px; }
  .pr-dl { grid-template-columns: 1fr 1fr; }
  .acc-hero { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .gateway { grid-template-columns: 1fr; border-radius: 18px; }
  .gw-summary { padding: 24px; }
  .gw-steps, .gw-cancel { display: none; }
  .gw-main { padding: 24px 20px; }
  .role-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .donate-online { padding: 22px 18px; }
  .amount-chips .chip span { min-width: 0; padding: 10px 14px; }
  .acc-kpis { grid-template-columns: 1fr; }
  .acc-kpis > div { border-left: 0; border-top: 1px solid var(--line); padding: 16px 22px; }
  .acc-balance strong { font-size: 2.1rem; }
  .pay-review { grid-template-columns: 1fr; }
  .pr-shot img, .pr-noshot { width: 100%; height: 180px; }
  .pr-top { flex-direction: column; }
  .pr-amount { text-align: left; }
  .receipt { padding: 24px; }
  .receipt-table th { width: 120px; }
  .receipt-paid { top: 110px; right: 16px; font-size: 1rem; }
  .fee-card { flex-direction: column; align-items: stretch; }
  .fee-card .btn { width: 100%; }
  .gw-upload { flex-direction: column; align-items: flex-start; }
}
.gw-method.wallet-bkash { --brand: #e2136e; }
.gw-method.wallet-nagad { --brand: #ee5a24; }
.gw-method.wallet-rocket { --brand: #8c3494; }
.gw-method.wallet-upay { --brand: #1b4f9c; }
.gw-detail.wallet-bkash { --brand-soft: #fde7f1; }
.gw-detail.wallet-nagad { --brand-soft: #fdece4; }
.link-check { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.link-check span { font-size: .84rem; color: var(--muted); font-weight: 600; }
.link-check code { font-size: .88rem; color: var(--navy-900); word-break: break-all; background: #fff; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Event registration ---------- */
.ev-reg { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ev-fee { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--navy-900); }
.ev-reg small { color: var(--muted); font-size: .78rem; }
.ev-reg small.ev-few { color: var(--amber); font-weight: 700; }
.reg-box { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; background: var(--bg); }
.reg-toggle { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.reg-toggle strong { display: block; color: var(--navy-900); }
.reg-toggle small { color: var(--muted); font-size: .84rem; }
.reg-fields { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #cfd8e2; }
.reg-box.is-off .reg-fields { display: none; }
.batch-fees { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bf-head strong { color: var(--navy-900); }
.bf-head small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.bf-rows { display: grid; gap: 8px; margin: 12px 0 10px; }
.bf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, .8fr) auto; gap: 8px; align-items: center; }
.bf-row input { width: 100%; min-width: 0; }
.bf-fee { position: relative; }
.bf-fee span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.bf-fee input { padding-left: 30px; }
.batch-table td, .batch-table th { white-space: nowrap; }
.reg-cell { display: block; color: inherit; line-height: 1.3; }
.reg-cell strong { font-family: var(--font-display); font-size: 1.1rem; }
.reg-cell small { color: var(--muted); }
.reg-cell span { display: block; font-size: .8rem; color: var(--muted); }
.reg-cell em { font-style: normal; color: var(--amber); font-weight: 700; }
.reg-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.reg-hero h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; }
.table tr.is-checked td { background: var(--green-bg); }
.reg-gateway .gw-summary { gap: 18px; }
.reg-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.reg-title { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1.2; margin: 0; }
.reg-desc { color: rgba(255, 255, 255, .7); font-size: .88rem; margin: 0; }
.reg-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; padding: 18px 20px; border-radius: 14px; background: var(--gold-100); border: 1px solid #f0dcbc; }
.reg-total small { display: block; color: var(--amber); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; }
.reg-total strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--navy-900); line-height: 1.15; }
.reg-total span { display: block; color: var(--muted); font-size: .84rem; }
.reg-total-main { flex: 1 1 260px; min-width: 0; }
.reg-breakdown { list-style: none; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px dashed #e6cfa6; display: grid; gap: 4px; max-width: 420px; }
.reg-breakdown li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--navy-900); }
.reg-breakdown li span { display: inline; color: var(--muted); font-size: .9rem; }
.reg-breakdown li b { font-weight: 600; white-space: nowrap; }
.extra-fees { margin-top: 12px; }
.fee-lines { margin: 4px 0 0; padding: 0; list-style: none; font-size: .84rem; color: var(--muted); }

/* Ticket */
.ticket-section { padding-top: 48px; }
.ticket { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.ticket header { display: flex; gap: 14px; align-items: center; background: linear-gradient(130deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 24px 26px; }
.ticket header small { color: var(--gold-400); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.ticket header h1 { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 2px 0 0; }
.ticket-body { padding: 22px 26px 10px; position: relative; }
.ticket-status { margin-bottom: 14px; }
.ticket-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 0; }
.ticket-dl .wide { grid-column: 1 / -1; }
.ticket-dl dt { color: var(--muted); font-size: .8rem; }
.ticket-dl dd { margin: 2px 0 0; font-weight: 600; }
.ticket-stub { margin-top: 18px; border-top: 2px dashed var(--line); padding: 20px 26px 24px; text-align: center; position: relative; }
.ticket-stub::before, .ticket-stub::after { content: ''; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket-stub::before { left: -14px; }
.ticket-stub::after { right: -14px; }
.ticket-stub small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; }
.ticket-stub strong { display: block; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 1.8rem; letter-spacing: .12em; color: var(--navy-900); margin: 6px 0; }
.ticket-stub span { color: var(--muted); font-size: .84rem; }
.ticket-confirmed .ticket-stub strong { color: var(--green); }
.ticket-cancelled, .ticket-rejected { opacity: .8; }
.ticket-cancelled .ticket-stub strong { text-decoration: line-through; color: var(--muted); }
@media print { .site-header, .site-footer, .alert { display: none !important; } .ticket { box-shadow: none; } }
@media (max-width: 1080px) { .ev-reg { align-items: flex-start; text-align: left; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }
@media (max-width: 640px) { .ticket-dl { grid-template-columns: 1fr 1fr; } .reg-total { flex-direction: column; align-items: stretch; } .reg-total .btn { width: 100%; } .ticket-stub strong { font-size: 1.4rem; } }
.reg-fields .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.reg-fields input, .reg-fields select { min-width: 0; }
@media (min-width: 1081px) { .two-col .reg-fields .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Mailbox ---------- */
.mbx { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.mbx-side { position: sticky; top: 90px; display: grid; gap: 14px; }
.mbx-folders { display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.mbx-folders a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: var(--ink); font-weight: 500; font-size: .92rem; }
.mbx-folders a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-folders a .icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
.mbx-folders a:hover { background: var(--bg); }
.mbx-folders a.is-active { background: var(--navy-900); color: #fff; }
.mbx-folders a.is-active .icon { color: var(--gold-400); }
.mbx-folders em { font-style: normal; font-size: .74rem; font-weight: 700; background: var(--gold-500); color: var(--navy-950); border-radius: 99px; padding: 1px 8px; }
.mbx-account { font-size: .8rem; color: var(--muted); margin: 0; padding: 0 6px; word-break: break-all; }
.mbx-account .icon { width: 14px; height: 14px; vertical-align: -2px; }
.mbx-main { min-width: 0; }
.mbx-listcard, .mbx-view { padding: 0; overflow: hidden; }
.mbx-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mbx-title h2 { margin: 0; font-size: 1.15rem; }
.mbx-title small { font-size: .8rem; }
.mbx-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mbx-search .search-input { min-width: 220px; }
.btn.is-on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.mbx-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 18px; background: var(--gold-100); border-bottom: 1px solid #f0dcbc; }
.mbx-bulk[hidden] { display: none; }
.mbx-bulk select, .mbx-move select { padding: 6px 10px; font-size: .85rem; border-radius: 8px; width: auto; }
.mbx-rows { list-style: none; margin: 0; padding: 0; }
.mbx-rows li { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.mbx-rows li.is-unread { background: #fff; }
.mbx-rows li.is-selected { background: var(--blue-bg); }
.mbx-rows li:hover { box-shadow: inset 3px 0 0 var(--gold-500); }
.mbx-rows input[type=checkbox] { width: 16px; height: 16px; flex: none; }
.mbx-star { color: #cfd6de; font-size: .95rem; flex: none; width: 14px; }
.mbx-star.on { color: var(--gold-500); }
.mbx-row { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; color: var(--muted); }
.mbx-who, .mbx-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-who { color: var(--ink); }
.is-unread .mbx-who, .is-unread .mbx-subj { font-weight: 700; color: var(--navy-900); }
.mbx-meta { display: flex; gap: 8px; align-items: center; font-size: .8rem; white-space: nowrap; }
.mbx-meta .icon { width: 15px; height: 15px; }
.is-unread .mbx-meta time { color: var(--navy-900); font-weight: 700; }
.mbx-replied { color: var(--green); }
.mbx-none, .mbx-empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.mbx-none .icon { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; }
.mbx-empty h2 { margin: 14px 0 6px; }
.mbx-empty .done-icon { margin: 0 auto; }
.mbx-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px; font-size: .85rem; }
.mbx-head { padding: 20px 22px 6px; }
.mbx-head h2 { font-size: 1.35rem; margin: 0 0 16px; overflow-wrap: anywhere; }
.mbx-from { display: flex; gap: 12px; align-items: flex-start; }
.mbx-from > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mbx-from time { font-size: .82rem; white-space: nowrap; }
.mbx-rcpt { font-size: .84rem; }
.avatar-letter { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--navy-800); color: var(--gold-400); display: grid; place-items: center; font-weight: 700; }
.mbx-images { margin: 12px 22px 0; padding: 10px 14px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); font-size: .87rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mbx-images .icon { width: 16px; height: 16px; }
.mbx-images a { font-weight: 700; }
.mbx-frame { display: block; width: calc(100% - 44px); margin: 14px 22px 0; height: 62vh; min-height: 380px; border: 1px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
.mbx-text { padding: 14px 22px 4px; font-size: .95rem; line-height: 1.65; overflow-wrap: anywhere; }
.mbx-text .mail-quote { color: var(--muted); }
.mbx-alt { padding: 8px 22px 0; margin: 0; font-size: .82rem; }
.mbx-files { padding: 18px 22px 22px; }
.mbx-files > strong { display: flex; gap: 6px; align-items: center; font-size: .9rem; margin-bottom: 10px; }
.mbx-files > strong .icon { width: 16px; height: 16px; }
.mbx-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mbx-file { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--bg); min-width: 0; }
.mbx-file:hover { border-color: var(--gold-500); }
.mbx-file img, .mbx-ext { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; }
.mbx-ext { display: grid; place-items: center; background: var(--navy-800); color: #fff; font-size: .7rem; font-weight: 700; }
.mbx-file > span:last-child { min-width: 0; display: grid; }
.mbx-file b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-file small { color: var(--muted); font-size: .76rem; display: flex; gap: 4px; align-items: center; }
.mbx-file small .icon { width: 12px; height: 12px; }
.mbx-view .mbx-toolbar .row-actions { flex-wrap: wrap; }
.mbx-compose .card-body { display: grid; gap: 0; }
.mbx-field { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 4px 10px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.mbx-field[hidden] { display: none; }
.mbx-field label { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0; }
.mbx-field input { border: 0; background: transparent; padding: 8px 4px; box-shadow: none; width: 100%; }
.mbx-field input:focus { outline: none; box-shadow: none; background: var(--bg); }
.mbx-field .error { grid-column: 2; }
.mbx-input { display: flex; align-items: center; gap: 6px; }
.mbx-ccb { white-space: nowrap; }
.mbx-fromline { padding: 8px 4px; font-size: .92rem; overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; padding: 2px 4px; color: var(--navy-600); font-weight: 600; cursor: pointer; font-size: .85rem; }
.link-btn:hover { text-decoration: underline; }
.mbx-body { min-height: 300px; font-size: .95rem; line-height: 1.6; }
.mbx-attach { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.mbx-presets { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: .85rem; }
.mbx-sub { font-size: 1rem; margin: 24px 0 10px; padding-top: 18px; border-top: 1px dashed var(--line); }
.mbx-access { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.mbx-access li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mbx-access li > div { min-width: 0; display: grid; }
.mbx-access small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-access select { width: auto; flex: none; }
@media (max-width: 920px) {
  .mbx { grid-template-columns: minmax(0, 1fr); }
  .mbx-side { position: static; }
  .mbx-folders { display: flex; overflow-x: auto; }
  .mbx-folders a { flex: none; }
  .mbx-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .mbx-who { grid-column: 1; }
  .mbx-meta { grid-column: 2; grid-row: 1; }
  .mbx-subj { grid-column: 1 / -1; }
  .mbx-frame { width: calc(100% - 24px); margin: 12px 12px 0; }
  .mbx-head, .mbx-text, .mbx-files { padding-left: 14px; padding-right: 14px; }
  .mbx-search .search-input { min-width: 0; flex: 1; }
}
