:root {
  color-scheme: light;
  --red: #df262f;
  --red-dark: #bd1d26;
  --ink: #151618;
  --ink-soft: #24262a;
  --text: #202124;
  --muted: #777b83;
  --line: #e7e8ea;
  --surface: #ffffff;
  --canvas: #f3f4f6;
  --green: #18854b;
  --amber: #a76e13;
  font-family: "DM Sans", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.eyebrow { margin: 0 0 7px; color: #96999f; font-size: 10px; font-weight: 800; letter-spacing: 1.55px; }
.brand-logo { display: block; width: 112px; height: 62px; object-fit: contain; object-position: left center; background: #08090c; border-radius: 3px; }
.button { min-height: 44px; border: 0; border-radius: 9px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 750; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--red); box-shadow: 0 5px 13px #df262f26; }
.button.primary:hover:not(:disabled) { background: var(--red-dark); }
.button.secondary { color: #33353a; background: #ececee; }
.button.secondary:hover:not(:disabled) { background: #e0e1e3; }
.button.subtle { color: #47494e; background: #f2f3f4; border: 1px solid #e9eaec; }
.button.subtle:hover:not(:disabled) { color: var(--red-dark); background: #fff0f1; border-color: #f4cbcd; }
.button.danger { color: #fff; background: #c52129; }
.button.danger-quiet { color: #bd242b; background: #fff0f0; border: 1px solid #f5d7d8; }
.button.success-quiet { color: #187643; background: #eaf7ef; border: 1px solid #d5eddd; }
.button.small { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.button.full { width: 100%; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 9px; display: inline-grid; place-items: center; background: transparent; color: #72757b; font-size: 23px; line-height: 1; }
.icon-button:hover { background: #f0f1f2; }
.text-button { border: 0; background: transparent; color: var(--red-dark); font-weight: 750; }
label { display: grid; gap: 7px; color: #50535a; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; min-width: 0; min-height: 45px; border: 1px solid #dfe0e3; border-radius: 9px; padding: 11px 13px; outline: none; color: var(--text); background: #fff; }
textarea { min-height: 82px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px #df262f19; }
.alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #cde9d6; border-radius: 9px; color: #1c7040; background: #edf8f1; font-size: 12px; line-height: 1.55; }
.alert.error { border-color: #f0cdcf; color: #a51e26; background: #fff1f1; }
.red-text { color: #b21f27; }

/* Login and password setup */
.auth-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(ellipse at 78% 8%, #303135 0, transparent 42%), linear-gradient(145deg, #111214, #1b1c1f 64%, #101113); }
.auth-card { width: min(450px, 100%); padding: 38px; border: 1px solid #ffffff20; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px #0006; }
.auth-card .brand-logo { width: 166px; height: 92px; margin-bottom: 25px; }
.auth-card h1 { margin: 0; color: var(--ink); font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 34px; font-weight: 650; letter-spacing: -.3px; }
.auth-card > .muted { margin: 9px 0 21px; }
.auth-card form { display: grid; gap: 17px; margin-top: 18px; }
.auth-card .text-button { justify-self: start; margin-top: 12px; padding: 5px 0; }
.loading-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: #666a70; }
.spinner { width: 22px; height: 22px; border: 2px solid #ddd; border-top-color: var(--red); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Administrator panel */
.admin-layout { min-height: 100vh; }
.sidebar { position: fixed; z-index: 8; inset: 0 auto 0 0; width: 264px; padding: 23px 16px 18px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, #17181b, #111214 82%); box-shadow: 8px 0 30px #1213160b; }
.sidebar-brand { min-height: 94px; padding: 0 5px 18px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-brand .brand-logo { width: 128px; height: 71px; }
.sidebar-close { display: none; color: #fff; }
.sidebar-caption { margin: 7px 10px 11px; color: #7e8187; font-size: 9px; font-weight: 800; letter-spacing: 1.45px; }
.side-nav { display: grid; gap: 5px; }
.nav-link { width: 100%; min-height: 47px; padding: 0 12px; border: 0; border-radius: 9px; display: flex; align-items: center; gap: 11px; color: #b8b9bd; background: transparent; text-align: left; font-size: 13px; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: #fff; background: #292a2e; }
.nav-link.active .nav-symbol { color: #ff4149; }
.nav-symbol { width: 21px; color: #9b9da3; text-align: center; font-size: 16px; }
.nav-count { margin-left: auto; color: #96999f; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.admin-account { min-width: 0; padding: 15px 4px; border-top: 1px solid #343539; display: flex; align-items: center; gap: 10px; }
.admin-account > span:last-child { min-width: 0; }
.admin-account b, .admin-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-account b { color: #eee; font-size: 11px; }
.admin-account small { max-width: 185px; margin-top: 4px; color: #92949a; font-size: 10px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #3c3e42; font-size: 13px; font-weight: 800; }
.logout-button { width: 100%; justify-content: flex-start; color: #c3c4c7; background: transparent; }
.logout-button:hover { color: #fff; background: #292a2e; }
.workspace { min-height: 100vh; margin-left: 264px; }
.topbar { position: sticky; z-index: 4; top: 0; height: 64px; padding: 0 34px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 13px; color: #686b71; background: #fff; font-size: 12px; }
.crumb-home { color: #777a80; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.crumb-separator { margin: 0 9px; color: #c2c3c6; }
.refresh-button { margin-left: auto; font-size: 23px; }
.menu-open { display: none; }
.mobile-scrim { display: none; }
.dashboard { width: min(1400px, 100%); margin: 0 auto; padding: 30px 34px 56px; }
.page-title { margin: 0 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-title h1 { margin: 0; color: var(--ink); font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 34px; font-weight: 650; letter-spacing: -.35px; }
.page-title .muted { margin-top: 5px; }
.panel { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 16px #20212405; }
.panel-heading { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading h2 { margin: 0; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 19px; font-weight: 600; }
.stat-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card { min-height: 125px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: flex-start; gap: 13px; color: var(--text); background: #fff; text-align: left; box-shadow: 0 4px 16px #20212405; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 9px 24px #20212410; }
.stat-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center; color: #6d7076; background: #f0f1f2; font-size: 20px; font-weight: 800; }
.stat-card.green .stat-icon { color: var(--green); background: #e8f6ed; }
.stat-card.red .stat-icon { color: var(--red-dark); background: #fff0f0; }
.stat-card.amber .stat-icon { color: var(--amber); background: #fff5e5; }
.stat-card small, .stat-card b, .stat-card em { display: block; }
.stat-card small { color: #787b82; font-size: 11px; }
.stat-card b { margin-top: 3px; font-size: 26px; }
.stat-card em { margin-top: 7px; color: #a1a3a8; font-size: 10px; font-style: normal; }
.text-button { padding: 8px; font-size: 12px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table thead { background: #f8f8f9; }
.data-table th { padding: 12px 16px; color: #8e9197; font-size: 9px; font-weight: 800; letter-spacing: .9px; }
.data-table td { padding: 13px 16px; border-top: 1px solid #eff0f1; color: #56595f; font-size: 11px; }
.data-table td b, .data-table td small { display: block; }
.data-table td b { color: #292a2d; font-size: 11px; }
.data-table td small { margin-top: 4px; color: #92949a; font-size: 9px; }
.quick-actions { margin-top: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.quick-action { min-height: 83px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 32px 1fr; align-content: center; align-items: center; text-align: left; color: var(--text); background: #fff; }
.quick-action:hover { border-color: #edb8bb; box-shadow: 0 5px 15px #20212408; }
.quick-action > span { grid-row: span 2; color: var(--red); font-size: 23px; font-weight: 800; }
.quick-action b { font-size: 13px; }
.quick-action small { margin-top: 4px; color: #8c8f95; font-size: 10px; }
.filters-panel { margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 12px; background: #fff; }
.search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; color: #999ca1; }
.search-field > span { padding-left: 2px; font-size: 21px; }
.search-field input { min-height: 42px; padding: 9px 2px; border: 0; box-shadow: none; }
.filter-field { width: 210px; display: flex; align-items: center; gap: 10px; }
.filter-field span { color: #92959a; font-size: 11px; }
.filter-field select { min-height: 42px; padding: 8px 10px; font-size: 11px; }
.member-list { display: grid; gap: 10px; }
.member-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #fff; box-shadow: 0 3px 12px #20212404; }
.member-card-main { min-width: 245px; display: flex; align-items: flex-start; gap: 12px; }
.member-avatar { width: 39px; height: 39px; flex: 0 0 39px; border-radius: 12px; display: grid; place-items: center; color: #a91f27; background: #fff0f0; font-size: 17px; font-weight: 800; }
.member-ident { min-width: 0; }
.member-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.member-name-line h2 { margin: 0; color: #222327; font-size: 14px; font-weight: 750; }
.member-ident > p { margin: 4px 0 7px; overflow-wrap: anywhere; color: #8b8e94; font-size: 10px; }
.member-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #666a70; font-size: 10px; }
.member-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.member-actions .button { min-height: 35px; padding: 7px 10px; font-size: 10px; }
.badge { min-height: 21px; padding: 4px 7px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { color: #187c43; background: #eaf7ef; }
.badge.red { color: #b9222a; background: #fff0f0; }
.badge.gray { color: #6e7278; background: #eff0f2; }
.badge.amber { color: #94610e; background: #fff5e5; }
.empty-state { padding: 44px 20px; border: 1px dashed #dfe0e2; border-radius: 12px; text-align: center; background: #fff; }
.empty-state > span { width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 13px; display: grid; place-items: center; color: #a6a8ad; background: #f2f3f4; font-size: 21px; }
.empty-state h2 { margin: 0 0 5px; color: #292a2d; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 19px; font-weight: 600; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.scanner-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 14px; align-items: start; }
.scanner-panel, .verification-panel { padding: 20px; }
.scanner-panel .muted { margin-bottom: 14px; font-size: 12px; }
.live-dot { color: var(--green); font-size: 11px; }
.qr-reader { max-width: 440px; margin: 12px auto; overflow: hidden; border-radius: 10px; }
.qr-reader video { border-radius: 10px; }
.scanner-message { min-height: 24px; margin-top: 11px; color: #74777d; font-size: 11px; text-align: center; }
.verification-empty { min-height: 245px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #96999f; text-align: center; }
.verification-empty > span { font-size: 34px; }
.verification-empty b { color: #5f6268; font-size: 13px; }
.verification-empty small { color: #96999f; font-size: 10px; }
.verification-result { min-height: 230px; padding: 20px 13px; border-radius: 11px; text-align: center; }
.verification-result > span { width: 37px; height: 37px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff; background: currentColor; font-size: 21px; }
.verification-result.green-result { color: #197843; background: #eaf7ef; }
.verification-result.red-result { color: #b42129; background: #fff0f0; }
.verification-result h2 { margin: 12px 0 5px; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 20px; }
.verification-result p { margin: 5px 0; font-size: 11px; }
.verified-person { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #00000012; display: flex; align-items: center; gap: 10px; text-align: left; }
.verified-person > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #8b1a20; background: #ffffffb8; font-weight: 800; }
.verified-person b, .verified-person small { display: block; }
.verified-person b { color: #242529; font-size: 13px; }
.verified-person small { margin-top: 3px; color: #696c72; font-size: 10px; }
.activity-list { padding: 5px 22px; }
.activity-item { padding: 17px 0; border-bottom: 1px solid #eff0f1; display: flex; gap: 12px; }
.activity-item:last-child { border-bottom: 0; }
.activity-mark { width: 33px; height: 33px; flex: 0 0 33px; border-radius: 11px; display: grid; place-items: center; color: #187c43; background: #eaf7ef; font-weight: 800; }
.activity-mark.red-mark { color: #b9222a; background: #fff0f0; }
.activity-copy { min-width: 0; flex: 1; }
.activity-copy > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.activity-copy > div b { color: #292a2d; font-size: 12px; }
.activity-copy > div span { color: #73767c; font-size: 11px; }
.activity-copy p { min-height: 13px; margin: 4px 0; color: #74777d; font-size: 10px; }
.activity-copy small { color: #a0a2a7; font-size: 9px; }
.activity-warning { border-color: #f0ddbd; background: #fffaf0; }
.activity-warning > span { color: #94610e; background: #fff0d1; }

/* Member view */
.member-page { min-height: 100vh; background: var(--canvas); }
.member-header { height: 70px; padding: 0 max(18px, calc((100% - 660px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--ink); }
.member-header .brand-logo { width: 82px; height: 46px; }
.member-main { width: min(660px, 100%); margin: 0 auto; padding: 26px 16px 38px; }
.member-intro { padding: 5px 3px 18px; }
.member-intro h1 { margin: 0; color: #18191c; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 31px; font-weight: 650; }
.member-intro .muted { margin-top: 4px; }
.status-card { margin-bottom: 13px; padding: 19px 20px; border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #fff; box-shadow: 0 9px 22px #11121412; }
.status-card.green { background: linear-gradient(120deg, #167c43, #20a45a); }
.status-card.red { background: linear-gradient(120deg, #b51e27, #e33a41); }
.status-card.gray { background: linear-gradient(120deg, #5c6066, #858990); }
.status-card .eyebrow { color: #ffffffb7; }
.status-card h2 { margin: 3px 0 5px; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 21px; }
.status-card p:last-child { margin: 0; color: #ffffffd8; font-size: 11px; }
.status-symbol { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid #ffffff50; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; }
.credential-card, .contact-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 18px #20212406; }
.credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.credential-heading .eyebrow { margin-bottom: 4px; }
.credential-heading h2 { margin: 0; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 20px; font-weight: 600; }
.member-number { padding: 7px 9px; border-radius: 8px; color: #5d6066; background: #f0f1f2; font-size: 9px; font-weight: 800; white-space: nowrap; }
.qr-display { width: 228px; height: 228px; margin: 17px auto 3px; border: 1px solid #ececee; border-radius: 12px; display: grid; place-items: center; background: #fff; }
.qr-display img, .qr-display canvas { max-width: 210px; max-height: 210px; }
.centered { margin: 8px 0 14px; text-align: center; font-size: 11px; }
.password-change { margin-top: 9px; }
.contact-card { margin-top: 13px; }
.contact-card h2 { margin: 0; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 17px; }
.contact-card p:not(.eyebrow) { margin: 8px 0 0; color: #666a70; font-size: 11px; overflow-wrap: anywhere; }
.member-foot { margin: 19px 0 0; color: #a0a2a7; font-size: 9px; letter-spacing: 1.2px; text-align: center; text-transform: uppercase; }

/* Dialogs */
#modal { position: relative; z-index: 20; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; padding: 18px; display: grid; place-items: center; background: #1112149c; backdrop-filter: blur(3px); }
.modal { width: min(650px, 100%); max-height: min(91vh, 850px); overflow: auto; padding: 23px; border: 1px solid #ffffffa8; border-radius: 16px; background: #fff; box-shadow: 0 25px 80px #0005; }
.modal-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h2 { margin: 0; color: #191a1d; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 24px; font-weight: 600; }
.modal-help { margin: 0 0 16px; color: #777b83; font-size: 12px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.auto-number { min-height: 65px; padding: 10px 13px; border: 1px solid #e7e8ea; border-radius: 9px; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: #f7f7f8; }
.auto-number span { color: #777b83; font-size: 10px; font-weight: 700; }
.auto-number b { color: #242529; font-size: 12px; }
.modal-footer { position: sticky; bottom: -23px; margin: 21px -23px -23px; padding: 15px 23px; border-top: 1px solid #ececee; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; background: #fff; }
.form-status { margin-top: 15px; padding: 11px; border-radius: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; background: #f7f7f8; }
.form-status small { color: #777b83; font-size: 10px; }
.confirm-name { margin: 15px 0 7px; color: #242529; font-size: 14px; font-weight: 800; }
.modal .muted { font-size: 12px; }
.detail-grid { padding: 10px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.detail-grid > div { min-width: 0; padding: 10px; border-radius: 9px; background: #f7f7f8; }
.detail-grid > div > span:first-child { display: block; margin-bottom: 5px; color: #888b91; font-size: 9px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.detail-grid b { display: block; overflow-wrap: anywhere; color: #303237; font-size: 11px; }
.detail-credential { margin: 9px auto 15px; display: grid; justify-items: center; gap: 5px; color: #777b83; font-size: 10px; }
.detail-credential #detailQr { min-width: 160px; min-height: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; background: #fff; }
.detail-history { padding-top: 12px; border-top: 1px solid #ececee; }
.detail-history h3 { margin: 0 0 8px; font-family: "Oswald", "Arial Narrow", Arial, sans-serif; font-size: 16px; }
.detail-history > div { padding: 8px 0; border-bottom: 1px solid #f0f0f1; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 11px; }
.detail-history > div small { grid-column: 1 / -1; color: #92949a; font-size: 9px; }
.success-panel { padding: 18px; border-radius: 11px; display: flex; align-items: center; gap: 13px; color: #1b7040; background: #edf8f1; }
.success-panel > span { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #218952; font-size: 19px; font-weight: 800; }
.success-panel p { margin: 0; font-size: 12px; line-height: 1.55; }

@media (max-width: 1100px) {
  .sidebar { width: 235px; }
  .workspace { margin-left: 235px; }
  .dashboard { padding: 25px 22px 42px; }
  .member-card { align-items: flex-start; flex-direction: column; }
  .member-actions { justify-content: flex-start; padding-left: 51px; }
  .scanner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 275px; transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar:not(.mobile-hidden) { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .workspace { margin-left: 0; }
  .topbar { height: 57px; padding: 0 13px; }
  .menu-open { display: inline-grid; }
  .mobile-scrim:not(.hidden) { position: fixed; z-index: 7; inset: 0; display: block; border: 0; background: #0008; }
  .dashboard { padding: 22px 14px 35px; }
  .page-title { align-items: flex-start; margin-bottom: 18px; }
  .page-title h1 { font-size: 30px; }
  .page-title .muted { max-width: 280px; font-size: 11px; }
  .page-title > .button { min-height: 40px; padding: 9px 11px; font-size: 11px; white-space: nowrap; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { min-height: 112px; padding: 13px 11px; gap: 9px; }
  .stat-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; font-size: 17px; }
  .stat-card small { font-size: 9px; }
  .stat-card b { font-size: 22px; }
  .stat-card em { font-size: 9px; }
  .panel-heading { padding: 15px; }
  .data-table th, .data-table td { padding: 11px 12px; }
  .quick-actions { gap: 9px; }
  .quick-action { min-height: 76px; padding: 11px; grid-template-columns: 25px 1fr; }
  .quick-action b { font-size: 11px; }
  .quick-action small { font-size: 9px; }
  .filters-panel { align-items: stretch; flex-direction: column; gap: 7px; }
  .filter-field { width: 100%; justify-content: space-between; }
  .filter-field select { width: 70%; }
  .member-card { padding: 13px; }
  .member-card-main { min-width: 0; width: 100%; }
  .member-name-line h2 { font-size: 13px; }
  .member-actions { width: 100%; padding-left: 0; justify-content: flex-start; }
  .member-actions .button { flex: 1 1 auto; min-height: 40px; }
  .auth-card { padding: 28px 23px; }
  .auth-card h1 { font-size: 31px; }
  .auth-card .brand-logo { margin-bottom: 25px; }
  .member-header { height: 62px; padding: 0 15px; }
  .member-header .brand-logo { width: 74px; height: 41px; }
  .member-main { padding: 21px 13px 30px; }
  .member-intro h1 { font-size: 28px; }
  .status-card { padding: 16px; }
  .status-card h2 { font-size: 19px; }
  .credential-card, .contact-card { padding: 15px; }
  .qr-display { width: 218px; height: 218px; }
  .qr-display canvas, .qr-display img { max-width: 200px; max-height: 200px; }
  .modal-backdrop { padding: 9px; }
  .modal { padding: 18px; max-height: 94vh; border-radius: 14px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid .wide { grid-column: auto; }
  .modal-footer { bottom: -18px; margin: 17px -18px -18px; padding: 12px 18px; }
  .modal-footer .button { flex: 1 1 auto; }
}
@media (max-width: 430px) {
  .brand-logo { width: 94px; height: 52px; }
  .page-title { gap: 7px; }
  .page-title > .button { padding: 8px 9px; font-size: 10px; }
  .stat-grid { gap: 7px; }
  .stat-card { min-height: 104px; }
  .stat-icon { display: none; }
  .member-number { padding: 6px; font-size: 8px; }
  .member-actions .button { font-size: 9px; padding: 7px; }
  .quick-action { grid-template-columns: 21px 1fr; }
}
@media print {
  body { background: #fff; }
}
