:root {
  --primary: #e31837;
  --secondary: #8a1538;
  --ink: #18181b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --success: #087f5b;
  --warning: #b45309;
  --danger: #c92a2a;
  --shadow: 0 24px 70px rgba(24, 24, 27, .14);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f4f4f5;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f4f4f5; }
body { margin: 0; min-height: 100vh; background: #f4f4f5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; color: var(--primary); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 6vw, 4.3rem); line-height: .98; letter-spacing: -.045em; }
h2 { letter-spacing: -.03em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.button {
  appearance: none; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px;
  font-weight: 750; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); border-color: #c7c9ce; box-shadow: 0 8px 25px rgba(24,24,27,.08); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button.dark { border-color: #18181b; background: #18181b; color: #fff; }
.button.danger { border-color: #fee2e2; background: #fff1f2; color: var(--danger); }
.button.large { min-height: 52px; padding-inline: 26px; }
.button.small { padding: 7px 11px; font-size: .82rem; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.15rem; }

input, select, textarea {
  width: 100%; border: 1px solid #d9dadd; border-radius: 14px; background: #fff; color: var(--ink);
  padding: 13px 14px; outline: none; transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(227,24,55,.11); }
textarea { min-height: 100px; resize: vertical; }
label { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; color: #3f3f46; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack-form { display: grid; gap: 16px; }
.notice { padding: 13px 15px; border-radius: 14px; margin: 14px 0; font-weight: 650; }
.notice.success { color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; }
.notice.error { color: #991b1b; background: #fff1f2; border: 1px solid #fecdd3; }
.notice.warning { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.spinner { width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Setup */
.setup-page { display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 80% 0%, rgba(227,24,55,.18), transparent 36%), #f4f4f5; }
.setup-card { width: min(760px, 100%); background: #fff; border: 1px solid #fff; border-radius: 28px; box-shadow: var(--shadow); padding: clamp(24px, 5vw, 48px); }
.setup-card h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin-bottom: 14px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); font-weight: 900; margin-bottom: 22px; }

/* Public microsite */
.microsite-page {
  --primary: #e31837; --secondary: #8a1538;
  background: #0e0e10; color: #fff; overflow-x: hidden;
}
.microsite-shell { min-height: 100vh; position: relative; isolation: isolate; }
.microsite-shell::before, .microsite-shell::after { content: ""; position: fixed; border-radius: 50%; filter: blur(80px); opacity: .48; z-index: -1; pointer-events: none; }
.microsite-shell::before { width: 460px; height: 460px; background: var(--primary); top: -220px; right: -170px; }
.microsite-shell::after { width: 380px; height: 380px; background: var(--secondary); bottom: -220px; left: -180px; }
.public-topbar { width: min(1120px, calc(100% - 34px)); margin: 0 auto; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.event-logo { max-width: 150px; max-height: 52px; object-fit: contain; object-position: left; }
.text-logo { font-size: 1.05rem; font-weight: 900; letter-spacing: -.02em; }
.public-main { width: min(1120px, calc(100% - 34px)); margin: 0 auto; padding: 42px 0 80px; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .65fr); gap: clamp(28px, 6vw, 90px); align-items: center; min-height: calc(100vh - 150px); }
.login-copy h1 { max-width: 760px; margin-bottom: 24px; }
.login-copy p { max-width: 620px; color: rgba(255,255,255,.66); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.65; }
.event-meta-line { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.meta-pill { border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); padding: 10px 14px; border-radius: 999px; color: rgba(255,255,255,.82); backdrop-filter: blur(15px); }
.login-card { border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.09); backdrop-filter: blur(24px); border-radius: 28px; padding: 28px; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.login-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.login-card p { color: rgba(255,255,255,.62); }
.login-card input { min-height: 58px; border-color: rgba(255,255,255,.17); background: rgba(255,255,255,.1); color: #fff; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
.login-card input::placeholder { color: rgba(255,255,255,.4); text-transform: none; letter-spacing: 0; }
.login-card .button { width: 100%; margin-top: 12px; }
.login-error { min-height: 20px; color: #fecdd3; font-weight: 700; margin: 12px 0 0; }

.pass-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(340px, .5fr); gap: clamp(25px, 6vw, 70px); align-items: start; }
.pass-intro { padding-top: 34px; }
.pass-intro h1 { margin-bottom: 16px; }
.pass-intro > p { color: rgba(255,255,255,.66); max-width: 620px; line-height: 1.7; }
.pass-event-card { margin-top: 38px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 24px; display: grid; gap: 18px; }
.event-detail { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.event-detail span:first-child { color: rgba(255,255,255,.48); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.event-detail span:last-child { color: #fff; font-weight: 650; line-height: 1.55; }
.pass-card { position: sticky; top: 24px; color: var(--ink); background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 35px 100px rgba(0,0,0,.34); }
.pass-card-head { padding: 26px 26px 20px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; position: relative; overflow: hidden; }
.pass-card-head::after { content:""; position:absolute; width:220px; height:220px; border:35px solid rgba(255,255,255,.09); border-radius:50%; right:-105px; top:-120px; }
.pass-label { position: relative; z-index: 1; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 850; opacity: .82; }
.pass-card-head h2 { position: relative; z-index: 1; font-size: clamp(1.65rem, 5vw, 2.25rem); margin: 8px 0 4px; line-height: 1.08; }
.pass-code { position: relative; z-index: 1; opacity: .78; font-weight: 700; }
.pass-body { padding: 24px 26px 28px; }
.qr-wrap { width: min(280px, 100%); aspect-ratio: 1; margin: 0 auto 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22px; padding: 14px; background: #fff; }
.qr-wrap canvas { width: 100% !important; height: 100% !important; image-rendering: pixelated; }
.pass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pass-field { background: var(--surface-soft); border-radius: 15px; padding: 13px 14px; min-height: 76px; }
.pass-field.wide { grid-column: 1 / -1; }
.pass-field .label { display: block; font-size: .69rem; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); font-weight: 850; margin-bottom: 5px; }
.pass-field strong { display: block; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.logout-link { border: 0; background: transparent; color: rgba(255,255,255,.7); font-weight: 750; padding: 10px 0; }
.agenda-block { margin-top: 36px; }
.agenda-block details { border-top: 1px solid rgba(255,255,255,.15); }
.agenda-block summary { list-style: none; cursor: pointer; padding: 22px 0; font-weight: 800; display: flex; justify-content: space-between; }
.agenda-block summary::-webkit-details-marker { display: none; }
.agenda-list { display: grid; gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; overflow: hidden; margin-bottom: 20px; }
.agenda-row { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 15px 17px; background: rgba(16,16,18,.88); }
.agenda-time { color: #fda4af; font-weight: 800; }

/* Login common */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 80% 0%, rgba(227,24,55,.16), transparent 34%), #f4f4f5; }
.auth-card { width: min(440px, 100%); background: #fff; padding: 34px; border-radius: 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 2.2rem; margin-bottom: 10px; }
.auth-card .brand-mark { margin-bottom: 25px; }

/* Check-in */
.checkin-page { background: #101012; color: #fff; min-height: 100vh; }
.checkin-app { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.checkin-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 3vw, 34px); border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(16,16,18,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.checkin-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.checkin-brand .brand-mark { width: 40px; height: 40px; border-radius: 13px; margin: 0; flex: 0 0 auto; }
.checkin-brand strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkin-brand span { display: block; font-size: .77rem; color: rgba(255,255,255,.55); }
.status-cluster { display: flex; align-items: center; gap: 9px; }
.connection-status { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .76rem; font-weight: 800; }
.connection-status.online { color: #6ee7b7; }
.connection-status.offline { color: #fcd34d; }
.checkin-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.scanner-column { padding: clamp(16px, 3vw, 32px); min-width: 0; }
.checkin-tabs { display: inline-flex; padding: 4px; background: rgba(255,255,255,.08); border-radius: 999px; margin-bottom: 20px; }
.checkin-tab { border: 0; background: transparent; color: rgba(255,255,255,.58); border-radius: 999px; padding: 9px 18px; font-weight: 800; }
.checkin-tab.active { background: #fff; color: #18181b; }
.scanner-stage { width: 100%; max-width: 800px; margin: 0 auto; position: relative; border-radius: 28px; overflow: hidden; background: #050506; min-height: min(68vh, 720px); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); }
#qr-reader { width: 100%; }
#qr-reader video { width: 100% !important; height: min(68vh, 720px) !important; object-fit: cover !important; }
#qr-reader__scan_region { min-height: min(68vh, 720px); }
#qr-reader img { display: none; }
.scanner-frame { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: min(58vw, 360px); aspect-ratio: 1; pointer-events: none; border: 3px solid rgba(255,255,255,.9); border-radius: 25px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scanner-hint { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(0,0,0,.58); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 9px 15px; white-space: nowrap; font-size: .82rem; font-weight: 700; }
.start-camera { position: absolute; z-index: 4; }
.manual-panel { width: min(800px, 100%); margin: 0 auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: clamp(20px, 4vw, 34px); }
.manual-panel h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.manual-panel input { min-height: 56px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.14); color: #fff; }
.manual-results { display: grid; gap: 10px; margin-top: 18px; }
.search-result { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 17px; padding: 15px; }
.search-result strong { display: block; font-size: 1.04rem; }
.search-result span { color: rgba(255,255,255,.58); font-size: .86rem; }
.checkin-sidebar { border-left: 1px solid rgba(255,255,255,.1); background: #171719; padding: 24px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 16px; }
.stat-card:first-child { grid-column: 1 / -1; }
.stat-card span { display: block; color: rgba(255,255,255,.5); font-size: .73rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.stat-card strong { display: block; font-size: 2rem; margin-top: 5px; }
.counter-box { margin-top: 22px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: grid; gap: 12px; }
.counter-box input { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.offline-queue { border-radius: 16px; padding: 12px; color: #fde68a; background: rgba(180,83,9,.16); border: 1px solid rgba(245,158,11,.25); font-size: .84rem; }

.result-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.64); backdrop-filter: blur(12px); padding: 18px; }
.result-card { width: min(600px, 100%); border-radius: 30px; padding: clamp(26px, 5vw, 48px); text-align: center; color: #fff; box-shadow: 0 40px 110px rgba(0,0,0,.42); animation: resultIn .22s ease both; }
.result-card.success { background: linear-gradient(135deg, #047857, #065f46); }
.result-card.warning { background: linear-gradient(135deg, #b45309, #92400e); }
.result-card.error { background: linear-gradient(135deg, #dc2626, #991b1b); }
.result-card.offline { background: linear-gradient(135deg, #4f46e5, #3730a3); }
.result-icon { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: rgba(255,255,255,.16); font-size: 2.2rem; }
.result-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 900; opacity: .78; }
.result-card h2 { font-size: clamp(2rem, 7vw, 3.4rem); margin: 10px 0 14px; line-height: 1; }
.result-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.result-meta span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 9px 13px; font-weight: 800; }
@keyframes resultIn { from { opacity: 0; transform: scale(.94) translateY(8px); } }

/* Admin */
.admin-page { background: #f4f4f5; min-height: 100vh; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 235px minmax(0, 1fr); }
.admin-sidebar { background: #18181b; color: #fff; padding: 24px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.admin-logo { display: flex; gap: 11px; align-items: center; padding: 0 8px 24px; }
.admin-logo .brand-mark { width: 40px; height: 40px; border-radius: 13px; margin: 0; }
.admin-logo strong { display: block; }
.admin-logo span { color: rgba(255,255,255,.47); font-size: .74rem; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav button { border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.6); padding: 11px 13px; text-align: left; font-weight: 750; }
.admin-nav button.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 8px 0; }
.admin-user strong, .admin-user span { display: block; }
.admin-user span { color: rgba(255,255,255,.45); font-size: .78rem; margin-top: 3px; }
.admin-user button { margin-top: 12px; background: transparent; border: 0; padding: 0; color: rgba(255,255,255,.65); font-weight: 750; }
.admin-main { min-width: 0; padding: clamp(18px, 3vw, 38px); }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.admin-header h1 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 6px; }
.admin-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.dashboard-card { background: #fff; border: 1px solid #ebebed; border-radius: 19px; padding: 18px; }
.dashboard-card span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.dashboard-card strong { display: block; font-size: 2rem; margin-top: 6px; }
.panel { background: #fff; border: 1px solid #e7e7ea; border-radius: 22px; overflow: hidden; }
.panel-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.filter-row { display: flex; gap: 10px; align-items: center; flex: 1; }
.filter-row input { max-width: 330px; }
.filter-row select { max-width: 180px; }
.table-scroll { overflow: auto; max-height: calc(100vh - 330px); }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; font-size: .86rem; }
.admin-table th { position: sticky; top: 0; z-index: 2; background: #f8f8f9; border-bottom: 1px solid var(--line); color: #71717a; text-align: left; padding: 12px 13px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-table td { border-bottom: 1px solid #efeff1; padding: 10px 13px; vertical-align: middle; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table td.editable { outline: none; min-width: 105px; }
.admin-table td.editable:focus { background: #fff7f8; box-shadow: inset 0 0 0 2px rgba(227,24,55,.25); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: .75rem; font-weight: 800; }
.status-badge.checked { color: #047857; background: #ecfdf5; }
.status-badge.pending { color: #6b7280; background: #f4f4f5; }
.save-indicator { font-size: .78rem; color: var(--muted); min-width: 95px; }
.save-indicator.saving { color: var(--warning); }
.save-indicator.saved { color: var(--success); }
.save-indicator.error { color: var(--danger); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.admin-section { display: none; }
.admin-section.active { display: block; }
.settings-card { max-width: 920px; background: #fff; border: 1px solid #e7e7ea; border-radius: 22px; padding: clamp(20px, 4vw, 34px); }
.agenda-editor { display: grid; gap: 9px; }
.agenda-edit-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; align-items: center; }
.fields-editor { display: grid; gap: 9px; }
.field-edit-row { display: grid; grid-template-columns: 1fr 1fr repeat(3, 110px) auto; gap: 8px; align-items: center; padding: 10px; background: #f8f8f9; border-radius: 14px; }
.toggle-label { display: flex; align-items: center; gap: 7px; font-size: .77rem; font-weight: 750; }
.toggle-label input { width: auto; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.48); backdrop-filter: blur(6px); }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: #fff; border-radius: 25px; box-shadow: var(--shadow); }
.modal-head { position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--line); padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 22px; }
.modal-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 15px 22px; display: flex; justify-content: flex-end; gap: 9px; }
.import-drop { border: 2px dashed #d5d6da; border-radius: 18px; padding: 30px; text-align: center; background: #fafafa; }
.import-drop input { margin-top: 12px; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 400px; padding: 13px 15px; border-radius: 14px; background: #18181b; color: #fff; box-shadow: 0 16px 50px rgba(0,0,0,.2); animation: toastIn .2s ease both; }
.toast.success { background: #047857; }
.toast.error { background: #b91c1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 980px) {
  .login-layout, .pass-layout { grid-template-columns: 1fr; }
  .login-layout { min-height: auto; padding-top: 30px; }
  .pass-card { position: static; max-width: 520px; }
  .checkin-workspace { grid-template-columns: 1fr; }
  .checkin-sidebar { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card:first-child { grid-column: auto; }
  .admin-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 10px; }
  .admin-logo > div:last-child, .admin-nav span, .admin-user strong, .admin-user span, .admin-user button { display: none; }
  .admin-logo { justify-content: center; padding-inline: 0; }
  .admin-nav button { text-align: center; padding-inline: 4px; font-size: 1.1rem; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .field-edit-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .public-topbar { min-height: 68px; }
  .public-main { padding-top: 22px; }
  .login-card { padding: 22px; }
  .pass-intro { padding-top: 10px; }
  .event-detail { grid-template-columns: 88px 1fr; }
  .checkin-topbar { align-items: flex-start; }
  .status-cluster .button { display: none; }
  .scanner-stage { min-height: 58vh; border-radius: 20px; }
  #qr-reader video, #qr-reader__scan_region { height: 58vh !important; min-height: 58vh; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:first-child { grid-column: 1 / -1; }
  .search-result { grid-template-columns: 1fr; }
  .admin-shell { display: block; }
  .admin-sidebar { position: sticky; z-index: 30; width: 100%; height: auto; top: 0; flex-direction: row; align-items: center; padding: 8px 10px; }
  .admin-logo { padding: 0; margin-right: 8px; }
  .admin-logo .brand-mark { width: 36px; height: 36px; }
  .admin-nav { display: flex; flex: 1; }
  .admin-nav button { flex: 1; font-size: .78rem; }
  .admin-user { display: none; }
  .admin-main { padding: 16px 12px; }
  .admin-header { display: block; }
  .admin-actions { justify-content: flex-start; margin-top: 14px; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .panel-head, .filter-row { align-items: stretch; flex-direction: column; }
  .filter-row input, .filter-row select { max-width: none; }
  .table-scroll { max-height: 62vh; }
  .agenda-edit-row { grid-template-columns: 105px 1fr auto; }
  .field-edit-row { grid-template-columns: 1fr; }
}


/* v6 admin attendance controls */
.admin-table td .button + .button { margin-left: 0; }
.admin-row-actions { flex-wrap: nowrap; }
@media (max-width: 900px) {
  .admin-row-actions { flex-wrap: wrap; min-width: 120px; }
}
