@import url('https://fonts.googleapis.com/css2?family=Nunito:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700;6..12,800&display=swap');

:root {
  --navy: #061c35;
  --ink: #112944;
  --limestone: #f5f0e7;
  --paper: #fffdf9;
  --copper: #16737c;
  --primary-action: #a11f2b;
  --copper-dark: #783f1c;
  --brass: #d4a84a;
  --red: #a11f2b;
  --success: #237a57;
  --warning: #9a6516;
  --border: #d8d2c8;
  --muted: #5f6e7f;
  --sidebar-width: 184px;
  --z-sticky: 120;
  --z-dropdown: 220;
  --z-backdrop: 520;
  --z-dialog: 620;
  --z-toast: 920;
  --font-display: "Nunito", Arial, sans-serif;
  --font-body: "Nunito", Arial, sans-serif;
  color-scheme: light;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  scrollbar-color: #8d99a5 #e9e4dc;
  scrollbar-width: thin;
}

* { box-sizing: border-box; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #e9e4dc; }
*::-webkit-scrollbar-thumb { background: #8d99a5; border: 2px solid #e9e4dc; border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: #667584; }

html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--paper); color: var(--ink); }
body.has-dialog { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 10px 14px; background: var(--paper); color: var(--navy); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
/* Accessibility utility intentionally wins over component layout declarations. */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: var(--z-sticky); height: 100vh; display: flex; flex-direction: column; background: var(--navy); color: white; overflow-y: auto; scrollbar-color: #557089 transparent; }
.brand-lockup { min-height: 198px; padding: 28px 24px 20px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.brand-lockup img { width: 76px; height: 76px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-lockup p { margin: 16px 0 0; color: #b9c6d1; font-size: 9px; line-height: 1.75; text-transform: uppercase; letter-spacing: .22em; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; gap: 14px; border: 0; padding: 0 22px; background: transparent; color: #bdc9d4; text-align: left; font-size: 13px; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.nav-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: transparent; }
.nav-item:hover { background: #0d2a48; color: white; }
.nav-item.is-active { background: #153652; color: white; font-weight: 600; }
.nav-item.is-active::before { background: var(--copper); }
.nav-item i { width: 20px; font-size: 20px; text-align: center; }
.sidebar-signature { margin-top: auto; padding: 30px 28px 34px; color: #9db0c0; }
.sidebar-signature span { display: block; width: 42px; height: 2px; margin-bottom: 16px; background: var(--brass); }
.sidebar-signature p { margin: 0; font-family: var(--font-display); font-size: 12px; line-height: 1.75; letter-spacing: .18em; text-transform: uppercase; }

.main-shell { min-width: 0; }
.topbar { position: relative; z-index: var(--z-sticky); min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 32px; border-bottom: 1px solid var(--border); background: rgba(255, 253, 249, .98); }
.programme-controls { display: flex; gap: 16px; }
.programme-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.programme-controls select { min-width: 300px; height: 38px; border: 1px solid #ccd2d7; border-radius: 5px; padding: 0 36px 0 12px; background: var(--paper); color: var(--ink); font-size: 13px; }
.programme-controls label:last-child select { min-width: 142px; }
.topbar-meta { display: flex; align-items: center; gap: 24px; }
.topbar-meta > p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--ink); font-size: 12px; white-space: nowrap; }
.topbar-meta > p i { font-size: 18px; }
.user-menu-wrap { position: relative; }
.user-menu-trigger { min-height: 48px; display: flex; align-items: center; gap: 10px; border: 0; border-left: 1px solid var(--border); padding: 4px 0 4px 22px; background: transparent; color: var(--ink); text-align: left; }
.user-menu-trigger .avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-weight: 700; font-size: 12px; }
.user-menu-trigger strong, .user-menu-trigger small { display: block; }
.user-menu-trigger strong { font-size: 12px; }
.user-menu-trigger small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-menu-trigger > i { margin-left: 4px; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-dropdown); min-width: 226px; padding: 7px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); box-shadow: 0 14px 40px rgba(6, 28, 53, .16); }
.user-menu a { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 12px; }
.user-menu a:hover { background: var(--limestone); }
.mobile-menu-button { display: none; }

#main-content { min-width: 0; }
.welcome-band { min-height: 124px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 24px 34px 20px; }
.welcome-band h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 3vw, 48px); line-height: 1.05; color: var(--navy); }
.welcome-band > div > p { margin: 8px 0 0; color: #66788a; font-size: 15px; }
.welcome-meta { display: flex; align-items: stretch; gap: 28px; }
.welcome-band .welcome-meta p { max-width: 190px; margin: 0; padding-left: 24px; border-left: 1px solid var(--border); color: var(--ink); font-family: var(--font-display); font-size: 11px; line-height: 1.55; letter-spacing: .18em; text-transform: uppercase; }
.programme-summary { border-bottom: 1px solid var(--border); background: var(--paper); }
.programme-heading { padding: 18px 34px 15px; }
.programme-heading > span, .dialog-eyebrow { color: #557089; font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.programme-heading h2 { margin: 4px 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 27px; color: var(--navy); }
.programme-facts { display: flex; flex-wrap: wrap; gap: 9px 0; }
.programme-facts span { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-left: 1px solid var(--border); font-size: 12px; }
.programme-facts span:first-child { padding-left: 0; border-left: 0; }
.programme-facts i { color: var(--navy); font-size: 19px; }
.metrics-row { min-height: 100px; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(250px, 1.35fr); align-items: stretch; border-top: 1px solid #e4dfd7; padding: 0 34px; }
.metric { display: grid; grid-template-columns: 38px auto; grid-template-rows: auto auto; align-content: center; column-gap: 11px; padding: 14px 18px; border-left: 1px solid var(--border); }
.metric:first-child { padding-left: 0; border-left: 0; }
.metric i { grid-row: 1 / span 2; align-self: center; color: var(--navy); font-size: 28px; }
.metric:nth-child(2) i { color: var(--success); }
.metric:nth-child(3) i { color: var(--copper); }
.metric strong { font-family: var(--font-display); font-size: 34px; line-height: 1; font-weight: 400; color: var(--navy); }
.metric > span { margin-top: 3px; color: #53677a; font-size: 11px; line-height: 1.35; }
.metric small { display: block; margin-top: 2px; font-size: 9px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; padding: 0 14px; font-weight: 600; font-size: 12px; text-decoration: none; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--primary-action); color: white; }
.button-primary:hover { background: var(--copper-dark); }
.button-outline { border-color: #b9c3cc; background: transparent; color: var(--ink); }
.button-outline:hover { border-color: var(--ink); background: var(--limestone); }
.button-ghost { background: transparent; color: var(--ink); }
.button-ghost:hover { background: rgba(17, 41, 68, .07); }
.open-session-button { align-self: center; justify-self: stretch; min-height: 48px; margin-left: 18px; font-size: 12px; }

.attendance-section { padding: 18px 34px 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--navy); }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: #0b4f7d; font-size: 12px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.table-frame { overflow: auto; border-top: 1px solid var(--border); scrollbar-gutter: stable; }
table { width: 100%; min-width: 910px; border-collapse: collapse; font-size: 11px; }
th, td { min-height: 44px; padding: 10px 12px; border-bottom: 1px solid #ded9d1; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; background: var(--paper); color: #5a6b7b; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
tbody tr:hover { background: #faf7f1; }
.participant-name { color: var(--navy); font-weight: 700; }
.status { display: inline-flex; align-items: center; gap: 7px; min-height: 25px; padding: 0 10px; border-radius: 999px; white-space: nowrap; font-size: 10px; }
.status > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-present { background: #e3f1e9; color: var(--success); }
.status-pending { background: #f6ead2; color: var(--warning); }

.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font-size: 19px; }
.icon-button:hover { background: rgba(17, 41, 68, .08); }
.topbar .mobile-menu-button { display: none; }

.dialog-layer { position: fixed; inset: 0; z-index: var(--z-backdrop); animation: veil-in 180ms ease-out both; }
.dialog-backdrop { position: absolute; inset: 0; background: rgba(6, 20, 34, .46); backdrop-filter: blur(3px); }
.dialog { position: absolute; top: 50%; left: 50%; z-index: var(--z-dialog); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; transform: translate(-50%, -50%); border: 1px solid #e7e0d7; border-radius: 12px; padding: 28px; background: #fff; box-shadow: 0 28px 70px rgba(6, 28, 53, .22); animation: modal-in 220ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes veil-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%,-47%) scale(.98) } to { opacity: 1; transform: translate(-50%,-50%) scale(1) } }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.dialog h2 { margin: 7px 50px 6px 0; color: var(--navy); font-family: var(--font-display); font-size: 30px; font-weight: 400; }
.dialog > p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.session-options { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.session-options label { display: block; }
.session-options input { position: absolute; opacity: 0; pointer-events: none; }
.session-options label > span { min-height: 68px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 12px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; cursor: pointer; }
.session-options label > span i { grid-row: 1 / span 2; align-self: center; color: var(--copper); font-size: 24px; }
.session-options strong { font-size: 13px; }
.session-options small { color: var(--muted); font-size: 11px; }
.session-options input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.session-options input:checked + span { border-color: var(--copper); background: #fbf3ea; box-shadow: inset 4px 0 0 var(--copper); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dialog .form-status { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--red); background: #f8e6e8; color: #781722; font-size: 12px; }
.toast-viewport { position: fixed; top: 18px; right: 18px; z-index: var(--z-toast); width: min(360px, calc(100vw - 36px)); display: grid; gap: 9px; }
.toast { min-height: 58px; display: grid; grid-template-columns: 26px 1fr 32px; align-items: center; gap: 10px; border: 1px solid #cdd8d2; border-left: 4px solid var(--success); border-radius: 7px; padding: 9px 8px 9px 12px; background: var(--paper); color: var(--ink); box-shadow: 0 12px 35px rgba(6, 28, 53, .18); }
.toast i { color: var(--success); font-size: 21px; }
.toast p { margin: 0; font-size: 12px; line-height: 1.35; }
.toast button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); font-size: 18px; }

/* Participant portal */
.participant-simple-body { min-height: 100vh; background: var(--limestone); }
.simple-participant-shell { width: min(620px, 100%); min-height: 100vh; display: flex; flex-direction: column; margin: 0 auto; background: var(--paper); box-shadow: 0 0 55px rgba(6, 28, 53, .09); }
.simple-participant-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.simple-brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.simple-brand img { width: 42px; height: 42px; object-fit: contain; }
.simple-participant-profile { display: flex; align-items: center; gap: 9px; }
.simple-participant-profile .avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-size: 10px; font-weight: 700; }
.simple-participant-profile strong, .simple-participant-profile small { display: block; }
.simple-participant-profile strong { max-width: 145px; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.simple-participant-profile small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.simple-participant-profile .icon-button { width: 36px; height: 36px; font-size: 18px; text-decoration: none; }
.simple-participant-main { width: 100%; max-width: 500px; margin: auto; padding: 52px 24px; }
.simple-date { color: var(--copper); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.simple-participant-main > h1 { margin: 10px 0 7px; color: var(--navy); font-family: var(--font-display); font-size: 40px; font-weight: 400; line-height: 1.05; }
.simple-participant-main > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.simple-check-card { margin-top: 28px; border: 1px solid var(--border); border-top: 4px solid var(--navy); border-radius: 7px; padding: 22px; background: white; }
.simple-check-heading { display: flex; align-items: center; gap: 14px; }
.simple-check-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f8eee5; color: var(--copper); font-size: 24px; }
.simple-check-heading span { color: var(--success); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.simple-check-heading h2 { margin: 3px 0 1px; color: var(--navy); font-family: var(--font-display); font-size: 25px; font-weight: 400; }
.simple-check-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.simple-scan-button { width: 100%; min-height: 64px; margin-top: 22px; font-size: 16px; }
.simple-scan-button:disabled { background: #aeb7bf; color: #f7f7f7; }
.simple-complete-state { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 64px; margin-top: 22px; border: 1px solid #b9dfcf; border-radius: 7px; background: #eff9f3; color: #176b46; font-size: 14px; font-weight: 800; }
.simple-complete-state i { font-size: 22px; }
.schedule-builder { grid-column: 1 / -1; padding: 14px; border: 1px solid var(--border); border-left: 3px solid var(--copper); background: #fffdf9; }
.schedule-builder + .schedule-builder { margin-top: -4px; border-left-color: #16737c; }
.schedule-builder-heading span { display: block; color: var(--copper); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.schedule-builder-heading h3 { margin: 3px 0; color: var(--navy); font-size: 16px; }
.schedule-builder-heading p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.schedule-builder-grid, .schedule-time-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schedule-time-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.attendance-windows { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.weekday-picker { margin: 12px 0 0; padding: 0; border: 0; }
.weekday-picker legend { margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 800; }
.weekday-picker > div { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-picker label { position: relative; display: inline-flex; }
.weekday-picker input { position: absolute; opacity: 0; }
.weekday-picker span { display: inline-flex; min-width: 38px; min-height: 32px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.weekday-picker input:checked + span { border-color: var(--navy); background: var(--navy); color: white; }
.weekday-picker input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.weekday-picker small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.schedule-mode-picker { margin: 0 0 12px; padding: 0; border: 0; }
.schedule-mode-picker legend { margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 800; }
.schedule-mode-picker > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.schedule-mode-picker label { position: relative; display: block; }
.schedule-mode-picker input { position: absolute; opacity: 0; }
.schedule-mode-picker span { display: grid; grid-template-columns: 18px 1fr; column-gap: 7px; align-items: center; min-height: 50px; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; }
.schedule-mode-picker i { grid-row: span 2; color: var(--copper); font-size: 18px; }
.schedule-mode-picker small { color: var(--muted); font-size: 9px; font-weight: 600; }
.schedule-mode-picker input:checked + span { border-color: var(--copper); background: #fff7f7; box-shadow: inset 3px 0 0 var(--copper); }
.schedule-mode-picker input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.schedule-recurring-fields[hidden], .schedule-custom-fields[hidden] { display: none; }
.custom-date-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.custom-date-entry .button { min-height: 36px; white-space: nowrap; }
.custom-date-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.custom-date-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; border: 1px solid #ead7d9; border-radius: 999px; padding: 0 5px 0 9px; background: #fff7f7; color: #8f2730; font-size: 10px; font-weight: 800; }
.custom-date-chip button { display: grid; width: 22px; height: 22px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #8f2730; }
.custom-date-chip button:hover { background: #f1dfe1; }
.schedule-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schedule-summary span { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--border); color: var(--ink); font-size: 12px; }
.schedule-summary strong { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

/* Light, editorial operations dashboard — aligned to the approved reference. */
:root { --navy:#172033; --ink:#172033; --limestone:#f6f8fb; --paper:#fff; --copper:#c82b35; --primary-action:#c82b35; --red:#c82b35; --border:#e7ebf0; --muted:#778397; --sidebar-width:230px; --font-display:"Nunito",Arial,sans-serif; --font-body:"Nunito",Arial,sans-serif; }
body { background:#f7f9fb; }
.app-shell { grid-template-columns:var(--sidebar-width) minmax(0,1fr); background:#f7f9fb; }
.sidebar { background:#fff; border-right:1px solid var(--border); color:#536176; }
.brand-lockup { min-height:74px; padding:15px 22px; border-bottom:1px solid var(--border); }
.brand-lockup img { width:47px; height:40px; object-fit:contain; }
.brand-lockup p { color:#6e798a; font-size:8px; letter-spacing:.04em; }
.primary-nav { padding:20px 12px; gap:8px; }
.nav-item { min-height:46px; border-radius:7px; padding:0 15px; color:#556176; font-size:13px; font-weight:700; }
.nav-item i { width:24px; color:#47566b; font-size:21px; }
.nav-item:hover { background:#f8f1f2; color:var(--red); }
.nav-item.is-active { border-left:4px solid var(--red); border-radius:0 7px 7px 0; background:#fbebed; color:var(--red); }
.nav-item.is-active i { color:var(--red); }
.sidebar-signature { border-top:0; color:#a4acb8; }
.sidebar-signature span { background:var(--red); }
.main-shell { background:#f7f9fb; }
.topbar { min-height:74px; padding:0 26px; border-bottom:1px solid var(--border); background:#fff; box-shadow:0 2px 9px rgba(30,45,67,.025); }
.admin-topbar { display:grid; grid-template-columns:minmax(260px,390px) minmax(0,1fr) auto; }
.global-search { display:flex; align-items:center; gap:10px; height:40px; padding:0 14px; border:1px solid var(--border); border-radius:8px; background:#fafbfd; color:#7a8798; }
.global-search input { width:100%; border:0; outline:0; background:transparent; color:var(--ink); font-size:12px; }
.admin-context { padding-left:22px; grid-template-columns:auto minmax(0,1fr) auto; }
.admin-context span { color:#9aa4b2; }.admin-context strong { color:#344054; }.admin-context small { color:var(--red); }
.topbar-meta { gap:20px; }.topbar-meta p { color:#566276; font-size:11px; }.topbar-meta p i { color:var(--red); }
.user-menu-trigger { border-left:1px solid var(--border); padding-left:18px; }.avatar { background:#eef1f4; color:#384152; }
.admin-page-main { padding:28px; background:#f7f9fb; }.admin-page-heading { margin-bottom:22px; }.admin-page-heading span,.panel-heading span { color:var(--red); }.admin-page-heading h1 { color:#172033; font-size:30px; font-weight:800; }.admin-page-heading p { color:#8a96a8; }
.admin-panel,.admin-toolbar,.dashboard-card { border:1px solid var(--border); border-radius:9px; background:#fff; box-shadow:0 2px 7px rgba(30,45,67,.025); }.panel-heading { min-height:64px; padding:14px 18px; }.panel-heading h2 { color:#1d2939; font-size:17px; font-weight:800; }.button { min-height:36px; border-radius:7px; font-size:11px; font-weight:800; }.button-primary { background:var(--red); border-color:var(--red); }.button-primary:hover { background:#aa202b; border-color:#aa202b; }.button-outline { border-color:#dce2e8; color:#344054; background:#fff; }
.compact-table th { background:#fafbfd; color:#758195; font-size:10px; }.compact-table td { color:#526075; }.compact-table tbody tr:hover { background:#fff8f8; }
.admin-form input,.admin-form select,.admin-toolbar select,.admin-form textarea { border-color:#dfe5eb; border-radius:7px; }
.page-alert { border-radius:8px; }.admin-toolbar { min-height:58px; padding:9px 14px; }

/* Dashboard composition. */
body[data-page="admin-dashboard"] main { padding:28px; background:#f7f9fb; }
body[data-page="admin-dashboard"] .topbar { display:grid; grid-template-columns:minmax(260px,390px) 1fr auto; }
body[data-page="admin-dashboard"] .programme-controls { display:none; }
body[data-page="admin-dashboard"] .dashboard-search { margin-right:auto; width:min(390px,100%); }
.welcome-band { margin:0 0 20px; padding:0; border:0; background:transparent; }.welcome-band h1 { color:#172033; font-size:31px; font-weight:800; }.welcome-band p { color:#8a96a8; }
.programme-summary { border:0; padding:0; background:transparent; }.programme-heading { display:none; }.metrics-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }.metric { min-height:112px; display:grid; grid-template-columns:58px 1fr; grid-template-rows:auto auto; align-items:center; padding:18px; border:1px solid var(--border); border-radius:9px; background:#fff; box-shadow:0 2px 7px rgba(30,45,67,.025); }.metric i { grid-row:span 2; width:48px; height:48px; display:grid; place-items:center; border-radius:50%; background:#fff0f1; color:var(--red); font-size:25px; }.metric:nth-child(2) i { background:#edf9f1; color:#20a05a; }.metric:nth-child(3) i { background:#fff5e9; color:#e78a23; }.metric:nth-child(4) i { background:#eef4ff; color:#4879cc; }.metric strong { order:2; color:#172033; font-size:28px; font-weight:800; }.metric span { order:1; color:#687588; font-size:11px; font-weight:700; }.metric small { display:block; margin-top:5px; color:#21a35b; font-size:10px; }.open-session-button { display:none; }
.dashboard-visual-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(235px,.72fr); gap:14px; margin-top:14px; }.dashboard-card { min-width:0; min-height:282px; padding:16px; }.dashboard-card-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:10px; }.dashboard-card-head h2 { margin:0; color:#172033; font-size:15px; font-weight:800; }.dashboard-card-head span { padding:6px 8px; border:1px solid var(--border); border-radius:6px; color:#687588; font-size:9px; }.chart-card canvas { width:100% !important; height:218px !important; }.rate-chart-wrap { position:relative; width:175px; height:175px; margin:3px auto 8px; }.rate-chart-wrap canvas { width:175px !important; height:175px !important; }.rate-chart-wrap strong { position:absolute; inset:0; display:grid; place-content:center; color:#172033; font-size:27px; text-align:center; }.rate-chart-wrap small { display:block; margin-top:3px; color:#7c8797; font-size:10px; font-weight:600; }.rate-key { display:grid; gap:7px; }.rate-key span { display:flex; align-items:center; gap:7px; color:#667387; font-size:10px; }.rate-key i { width:9px; height:9px; border-radius:50%; background:var(--red); }.rate-key span:nth-child(2) i { background:#dfe4e9; }.rate-key b { margin-left:auto; color:#344054; }
.attendance-section { margin-top:14px; border:1px solid var(--border); border-radius:9px; padding:16px; background:#fff; box-shadow:0 2px 7px rgba(30,45,67,.025); }.section-heading h2 { color:#172033; font-size:16px; font-weight:800; }.section-heading p,.text-link { color:var(--red); }.table-frame { border:1px solid var(--border); border-radius:7px; }
@media(max-width:1100px){.metrics-row{grid-template-columns:repeat(2,1fr)}.dashboard-visual-grid{grid-template-columns:1fr 1fr}.rate-card{grid-column:span 2}.admin-topbar{grid-template-columns:minmax(220px,340px) minmax(0,1fr) auto}.admin-context{display:none}}@media(max-width:760px){.app-shell{grid-template-columns:1fr}.sidebar{width:230px}.admin-topbar{grid-template-columns:auto 1fr auto;padding:0 14px}.global-search{margin-left:10px}.global-search input{min-width:0}.topbar-meta p{display:none}.admin-page-main,body[data-page="admin-dashboard"] main{padding:18px}.metrics-row,.dashboard-visual-grid{grid-template-columns:1fr}.rate-card{grid-column:auto}.schedule-time-grid{grid-template-columns:repeat(2,1fr)}}
.simple-record { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--border); }
.simple-record span { color: var(--muted); font-size: 10px; }
.simple-record strong { display: block; margin-top: 4px; color: var(--ink); font-size: 12px; }
.simple-participant-main .simple-help { display: flex; align-items: center; gap: 8px; margin-top: 17px; font-size: 10px; }
.simple-help i { color: var(--success); font-size: 18px; }
.simple-participant-footer { display: flex; justify-content: space-between; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.participant-body { min-height: 100vh; background: var(--limestone); }
.participant-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(370px, 470px); background: var(--navy); }
.participant-image { position: relative; min-height: 100vh; overflow: hidden; }
.participant-image img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.participant-image::after { content: ""; position: absolute; inset: 0; background: rgba(6, 28, 53, .26); }
.participant-image-copy { position: absolute; z-index: 1; left: 8%; bottom: 10%; max-width: 550px; color: white; }
.participant-image-copy img { width: 74px; height: 74px; margin-bottom: 32px; object-fit: contain; filter: brightness(0) invert(1); opacity: 1; }
.participant-image-copy h1 { max-width: 520px; margin: 0; font-family: var(--font-display); font-size: clamp(42px, 5vw, 72px); font-weight: 400; line-height: 1.03; }
.participant-image-copy p { max-width: 480px; margin: 16px 0 0; color: #e1e9ef; font-size: 15px; }
.participant-panel { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 32px; background: var(--paper); }
.participant-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.participant-top .brand-mini { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-mini img { width: 38px; height: 38px; object-fit: contain; }
.participant-user { display: flex; align-items: center; gap: 9px; }
.participant-user span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font-size: 11px; font-weight: 700; }
.participant-user span:last-child { font-size: 11px; font-weight: 700; }
.participant-main { margin: auto 0; padding: 46px 0; }
.participant-main .eyebrow { color: var(--copper); font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.participant-main h2 { margin: 10px 0 8px; font-family: var(--font-display); color: var(--navy); font-size: 38px; font-weight: 400; line-height: 1.08; }
.participant-main > p { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.programme-card { margin-bottom: 22px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; }
.programme-card h3 { margin: 0 0 12px; color: var(--navy); font-size: 15px; }
.programme-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.programme-card dt { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.programme-card dd { margin: 3px 0 0; font-size: 11px; font-weight: 600; }
.attendance-action { width: 100%; min-height: 62px; font-size: 15px; }
.attendance-record { margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--border); }
.attendance-record h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.attendance-record-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; color: var(--muted); font-size: 11px; }
.attendance-record-row strong { color: var(--ink); }
.participant-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.scanner-frame { aspect-ratio: 1 / 1; display: grid; place-items: center; margin: 18px auto; overflow: hidden; border: 1px solid #506b82; border-radius: 7px; background: var(--navy); color: white; }
.scanner-frame i { font-size: 58px; color: var(--brass); }
.scanner-frame p { margin: 8px 0 0; color: #b8c8d5; font-size: 11px; }
/* Camera library inline sizing must not override the reserved scanner frame. */
.scanner-frame video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner-frame-admin #reader, .scanner-frame-admin #reader > div:first-child { width: 100% !important; height: 100% !important; }
.scanner-frame-admin #reader__scan_region { width: 100% !important; height: 100% !important; min-height: 0 !important; }
.scanner-frame-admin #reader video { width: 100% !important; height: 100% !important; aspect-ratio: 1 / 1; object-fit: cover !important; }
.scanner-frame-admin #reader__dashboard { display: none !important; }
.scanner-frame-admin #reader__status_span { display: none !important; }
.native-qr-frame { position: relative; width: min(100%, 360px); aspect-ratio: 1 / 1; background: #071c31; }
.native-qr-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.native-qr-frame #scanner-status { position: absolute; z-index: 3; right: 12px; bottom: 10px; left: 12px; margin: 0; padding: 7px 9px; background: rgba(6,28,53,.72); color: white; font-size: 10px; text-align: center; }
.qr-corner { position: absolute; z-index: 2; width: 28px; height: 28px; border-color: #72d7d7; border-style: solid; pointer-events: none; }
.qr-corner-tl { top: 9%; left: 9%; border-width: 3px 0 0 3px; }.qr-corner-tr { top: 9%; right: 9%; border-width: 3px 3px 0 0; }.qr-corner-bl { bottom: 9%; left: 9%; border-width: 0 0 3px 3px; }.qr-corner-br { right: 9%; bottom: 9%; border-width: 0 3px 3px 0; }

/* Shared admin workspaces */
.admin-topbar { position: sticky; top: 0; }
.admin-context { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 8px; }
.admin-context span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-context strong { max-width: 440px; overflow: hidden; color: var(--navy); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-context small { color: var(--copper); font-size: 10px; font-weight: 700; }
.admin-page-main { min-height: calc(100vh - 78px); padding: 32px 34px 48px; background: #f8f5ef; }
.admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.admin-page-heading span, .panel-heading span { color: var(--copper); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.admin-page-heading h1 { margin: 5px 0 0; color: var(--navy); font-family: var(--font-display); font-size: 40px; font-weight: 400; line-height: 1; }
.admin-page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.admin-layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); gap: 20px; align-items: start; }
.admin-layout-single { grid-template-columns: minmax(0, 1fr); }
.admin-panel { min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); }
.panel-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-heading h2 { margin: 4px 0 0; color: var(--navy); font-family: var(--font-display); font-size: 23px; font-weight: 400; }
.compact-table td strong, .compact-table td small { display: block; }
.compact-table { min-width: 760px; }
.compact-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.side-form-panel { position: sticky; top: 102px; }
.admin-form { display: grid; gap: 8px; padding: 14px; }
.admin-form label, .admin-toolbar label { display: grid; gap: 4px; color: var(--ink); font-size: 10px; font-weight: 700; }
.admin-form input, .admin-form select, .admin-toolbar select { width: 100%; height: 36px; border: 1px solid #bdc6ce; border-radius: 5px; padding: 0 9px; background: white; color: var(--ink); font-size: 12px; }
.admin-form textarea { width: 100%; min-height: 76px; border: 1px solid #bdc6ce; border-radius: 5px; padding: 8px 9px; background: white; color: var(--ink); font-size: 12px; line-height: 1.5; resize: none; }
.dialog .admin-panel { border:0; border-radius:0; box-shadow:none; }
.dialog .panel-heading { min-height:56px; padding:8px 0 12px; }
.dialog .panel-heading h2 { font-size:26px; }
.admin-form input:focus, .admin-form select:focus, .admin-toolbar select:focus { border-color: var(--copper); outline: 3px solid rgba(212, 168, 74, .32); }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 240px; }
.credential-qr { width: 76px; min-height: 76px; padding: 2px; background: #fff; }
.table-actions form { margin: 0; }
.button-danger { border-color: var(--red); background: var(--red); color: white; }
.button-danger:hover { background: #7b1520; }
.page-alert { min-height: 48px; display: flex; align-items: center; gap: 10px; margin: -6px 0 20px; border: 1px solid #bfd8ca; border-left: 4px solid var(--success); border-radius: 6px; padding: 10px 14px; background: #edf7f1; color: #155b40; font-size: 12px; }
.page-alert-error { border-color: #e4bec3; border-left-color: var(--red); background: #f9ecee; color: #781722; }
.admin-toolbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 7px; padding: 10px 16px; background: var(--paper); }
.admin-toolbar form { width: min(430px, 100%); }
.admin-toolbar .attendance-filters { width: min(900px, 100%); display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 12px; }
.admin-toolbar .attendance-filters label { grid-template-columns: 1fr; gap: 5px; }
.admin-toolbar label { grid-template-columns: 74px minmax(0, 1fr); align-items: center; }
.admin-toolbar span { color: var(--muted); font-size: 11px; }
.attendance-control-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; margin-bottom: 20px; }
.checkpoint-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 18px 8px; }
.checkpoint-actions + .form-note { padding: 0 20px 20px; }
.qr-panel { text-align: center; }
.qr-code { width: 230px; min-height: 230px; display: grid; place-items: center; margin: 20px auto 12px; padding: 10px; border: 1px solid var(--border); background: white; }
.qr-code img, .qr-code canvas { max-width: 100%; height: auto !important; }
.qr-panel > p { margin: 0 0 20px; color: var(--muted); font-size: 10px; }
.empty-state { min-height: 245px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 30px; color: var(--muted); }
.empty-state i { color: #9aa7b2; font-size: 48px; }
.empty-state p { max-width: 240px; margin: 0; font-size: 11px; line-height: 1.55; }
.report-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--border); }
.report-metrics div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 86px; padding: 18px 22px; background: var(--paper); }
.report-metrics span { color: var(--muted); font-size: 11px; }
.report-metrics strong { color: var(--navy); font-family: var(--font-display); font-size: 34px; font-weight: 400; }
.settings-column { max-width: 760px; display: grid; gap: 20px; }
.settings-form { max-width: 560px; }
.security-note { display: flex; align-items: flex-start; gap: 14px; padding: 20px; }
.security-note > i { color: var(--success); font-size: 28px; }
.security-note h2 { margin: 0; color: var(--navy); font-size: 14px; }
.security-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border-color: #e7c4c8; border-left: 4px solid var(--red); background: linear-gradient(90deg, #fffafa 0%, var(--paper) 62%); }
.danger-zone > div { min-width: 0; }
.danger-zone span { display: block; margin-bottom: 5px; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.danger-zone h2 { margin: 0; color: #66121b; font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.danger-zone p { max-width: 570px; margin: 7px 0 0; color: #76565a; font-size: 11px; line-height: 1.65; }
.danger-zone .button { flex: 0 0 auto; }
.import-hero { overflow: hidden; padding: 28px; border-color: #cbd7d5; background: linear-gradient(135deg, #fffdf9 0%, #f1f6f4 100%); }
.import-hero .panel-heading { align-items: flex-start; }
.import-hero .panel-heading h2 { max-width: 420px; font-size: 30px; }
.import-hero > p { max-width: 610px; margin: 10px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.import-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--navy); font-size: 11px; font-weight: 700; }
.import-steps span { display: inline-flex; align-items: center; gap: 7px; }
.import-steps b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--copper); color: white; font-size: 10px; }
.import-steps i { color: var(--copper); }
.import-upload-form { max-width: 560px; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.import-upload-form label { margin: 0; }
.import-map-panel { padding: 26px; }
.import-map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.import-map-grid label { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: #fffefa; }
.import-map-grid small { display: block; margin: 3px 0 7px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.import-map-grid select { background: var(--paper); }
@media (max-width: 680px) { .danger-zone, .import-upload-form { display: grid; grid-template-columns: 1fr; } .danger-zone .button { width: 100%; } .import-steps { flex-wrap: wrap; } .import-map-grid { grid-template-columns: 1fr; } }
.error-page, .scan-result-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--limestone); }
.error-page main, .scan-result-page main { width: min(440px, 100%); text-align: center; }
.error-page img, .scan-result-page img { width: 64px; margin: 0 auto 28px; }
.error-page main > span { color: var(--copper); font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.error-page h1, .scan-result-page h1 { margin: 8px 0; color: var(--navy); font-family: var(--font-display); font-size: 38px; font-weight: 400; }
.error-page p, .scan-result-page p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.scan-result-page main > i { display: block; margin-bottom: 14px; color: var(--success); font-size: 58px; }

/* Administrator QR checkpoint: a focused operational surface, not a generic error screen. */
.admin-scan-page { min-height: 100vh; background: #edf1f2; color: var(--ink); }
.admin-scan-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 42px; }
.admin-scan-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.scan-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); font-size: 13px; font-weight: 800; letter-spacing: .02em; text-decoration: none; }
.scan-brand img { width: 36px; height: 36px; object-fit: contain; }
.scan-live-status { display: inline-flex; align-items: center; gap: 8px; color: #276747; font-size: 12px; font-weight: 800; }
.scan-live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px #dceee4; }
.scan-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-top: 18px; padding: 34px 38px; overflow: hidden; background: var(--navy); color: var(--paper); border-bottom: 4px solid var(--red); }
.scan-hero > div { max-width: 530px; }
.eyebrow { margin: 0 0 8px; color: var(--copper); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.scan-hero .eyebrow { color: #7fd0d3; }
.scan-hero h1 { margin: 0; color: white; font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; }
.scan-hero > div > p:last-child { max-width: 470px; margin: 14px 0 0; color: #c9d5df; font-size: 14px; line-height: 1.6; }
.scan-session-details { display: grid; min-width: 250px; margin: 0; border-left: 1px solid rgba(255,255,255,.27); }
.scan-session-details div { padding: 8px 0 8px 20px; }
.scan-session-details dt { color: #92a7ba; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.scan-session-details dd { margin: 3px 0 0; color: white; font-size: 12px; font-weight: 700; }
.scan-feedback { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 18px; border: 1px solid; background: var(--paper); }
.scan-feedback p { margin: 0; font-size: 13px; font-weight: 700; }
.scan-feedback-success { border-color: #b8d9c7; color: #1f6848; }
.scan-feedback-error { border-color: #edc6cb; color: #8d2130; }
.scan-feedback-mark { display: grid; width: 24px; height: 24px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: currentColor; color: white; font-size: 14px; font-weight: 900; }
.scan-workspace { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(290px, .86fr); margin-top: 22px; background: var(--paper); border: 1px solid var(--border); }
.scan-camera-panel { padding: 30px; border-right: 1px solid var(--border); }
.scan-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.scan-panel-heading > div:last-child { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.scan-panel-heading h2, .scan-manual-panel h2 { margin: 0; color: var(--navy); font-family: var(--font-display); font-size: 23px; font-weight: 800; letter-spacing: -.025em; }
.scan-ready { flex: 0 0 auto; margin-top: 3px; padding: 6px 9px; background: #e9f3f2; color: #16737c; font-size: 10px; font-weight: 800; }
.scan-sound-button { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.scanner-frame-admin { position: relative; width: min(100%, 440px); aspect-ratio: 1 / 1; margin: 0 auto; border: 0; border-radius: 0; background: #071c31; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.scanner-frame-admin::before { content: ''; position: absolute; z-index: 3; inset: 9%; border: 2px solid #78d7d8; pointer-events: none; box-shadow: 0 0 0 999px rgba(4,18,33,.28); }
.scanner-frame-admin > div { position: relative; z-index: 1; }
.scan-help { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.scan-manual-panel { display: flex; flex-direction: column; padding: 30px; background: #faf8f3; }
.scan-manual-panel .eyebrow { margin-bottom: 9px; }
.manual-intro { margin: 10px 0 25px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.scan-manual-panel label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 11px; font-weight: 800; }
.scan-manual-panel input:not([type=hidden]) { width: 100%; height: 46px; border: 1px solid #b9c1c7; border-radius: 4px; padding: 0 13px; background: white; color: var(--navy); font-weight: 800; letter-spacing: .05em; }
.scan-manual-panel input[aria-invalid=true] { border-color: var(--red); }
.field-hint { margin: 8px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.scan-submit { width: 100%; min-height: 46px; }
.scan-security-note { display: grid; gap: 4px; margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.scan-security-note strong { color: var(--navy); font-size: 11px; }
.table-action-hint { align-self: center; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) {
  .admin-scan-shell { width: min(100% - 24px, 560px); padding-top: 12px; }
  .scan-hero { display: block; padding: 27px 23px; }
  .scan-session-details { grid-template-columns: 1fr 1fr; min-width: 0; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.27); border-left: 0; }
  .scan-session-details div { padding: 12px 10px 0 0; }
  .scan-session-details div:last-child { grid-column: 1 / -1; }
  .scan-workspace { grid-template-columns: 1fr; }
  .scan-camera-panel { padding: 22px; border-right: 0; border-bottom: 1px solid var(--border); }
  .scan-manual-panel { padding: 24px 22px; min-height: 360px; }
  .scan-panel-heading { display: block; }
  .scan-ready { display: inline-block; margin-top: 11px; }
}

/* Login */
.login-body { min-height: 100dvh; overflow: hidden; display: grid; place-items: center; padding: clamp(16px, 3.5vh, 34px); background: #e9eeef; }
.login-shell { width: min(1080px, 100%); height: min(640px, calc(100dvh - 32px)); display: grid; grid-template-columns: 1.12fr .88fr; overflow: hidden; border: 1px solid rgba(6, 28, 53, .1); border-radius: 10px; background: var(--paper); box-shadow: 0 28px 70px rgba(6, 28, 53, .16); }
.login-visual { position: relative; overflow: hidden; background: var(--navy); }
.login-visual img { width: 100%; height: 100%; object-fit: cover; opacity: .68; transform: scale(1.02); }
.login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 28, 53, .1), rgba(6, 28, 53, .92)); }
.login-visual-copy { position: absolute; z-index: 1; inset: auto 44px 38px; color: white; }
.login-kicker { margin: 0 0 13px; color: #7fd0d3 !important; font-size: 10px !important; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.login-visual-copy h1 { margin: 0; max-width: 500px; font-family: var(--font-display); font-size: clamp(32px, 4.1vw, 48px); font-weight: 800; letter-spacing: -.045em; line-height: 1.03; }
.login-visual-copy > p:not(.login-kicker) { max-width: 410px; margin: 15px 0 0; color: #d5e0e7; font-size: 13px; line-height: 1.6; }
.login-visual-note { display: inline-flex; align-items: center; gap: 8px; margin-top: 27px; color: #c4d5df; font-size: 11px; font-weight: 700; }
.login-visual-note span { width: 22px; height: 1px; background: #7fd0d3; }
.login-panel { display: grid; place-items: center; padding: clamp(22px, 4.5vw, 52px); background: var(--paper); }
.login-panel-inner { width: min(100%, 350px); }
.login-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(22px, 5vh, 44px); color: var(--navy); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.login-brand { width: 43px; height: 43px; object-fit: contain; }
.login-panel .eyebrow { color: var(--copper); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.login-panel h2 { margin: 8px 0 7px; font-family: var(--font-display); font-size: clamp(30px, 3.5vw, 38px); font-weight: 800; letter-spacing: -.045em; color: var(--navy); }
.login-panel-inner > p { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; }
.form-field label { color: var(--ink); font-size: 11px; font-weight: 700; }
.form-field input { width: 100%; height: 46px; border: 1px solid #bdc6ce; border-radius: 6px; padding: 0 13px; background: white; color: var(--ink); }
.form-field input[aria-invalid="true"] { border-color: var(--red); }
.field-error { min-height: 16px; color: var(--red); font-size: 10px; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; top: 2px; right: 2px; }
.login-submit { width: 100%; min-height: 46px; margin-top: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--muted); font-size: 10px; }
.login-links a { color: #0b4f7d; font-weight: 800; }
.login-links span { display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 1100px) {
  .programme-controls label:first-child select { min-width: 230px; }
  .topbar-meta > p { display: none; }
  .welcome-meta { display: none; }
  .metrics-row { grid-template-columns: repeat(4, 1fr); padding-bottom: 18px; }
  .open-session-button { grid-column: 1 / -1; margin: 2px 0 0; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 760; width: min(310px, 86vw); transform: translateX(-102%); transition: transform 220ms ease-out; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-nav-backdrop { position: fixed; inset: 0; z-index: 740; background: rgba(6, 20, 34, .55); }
  .topbar .mobile-menu-button { display: inline-grid; flex: 0 0 auto; }
  .topbar { padding: 10px 18px; }
  .programme-controls { flex: 1; }
  .programme-controls label { flex: 1; }
  .programme-controls select, .programme-controls label:first-child select, .programme-controls label:last-child select { width: 100%; min-width: 0; }
  .user-menu-trigger { padding-left: 14px; }
  .user-menu-trigger > span:nth-child(2), .user-menu-trigger > i { display: none; }
  .welcome-band, .programme-heading, .attendance-section { padding-left: 22px; padding-right: 22px; }
  .metrics-row { padding-left: 22px; padding-right: 22px; }
  .participant-shell { grid-template-columns: 1fr; }
  .participant-image { min-height: 340px; }
  .participant-panel { min-height: auto; }
  .admin-page-main { padding: 26px 22px 40px; }
  .admin-layout-grid, .attendance-control-grid { grid-template-columns: 1fr; }
  .side-form-panel { position: static; }
  .admin-context { flex: 1; }
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .programme-controls { order: 3; width: 100%; }
  .programme-controls label:first-child { flex: 1.7; }
  .welcome-band { min-height: 112px; }
  .welcome-band h1 { font-size: 32px; }
  .welcome-band > div > p { font-size: 12px; }
  .programme-hero { height: 180px; }
  .programme-hero blockquote { right: 22px; bottom: 18px; font-size: 15px; }
  .programme-heading h2 { font-size: 23px; }
  .programme-facts { display: grid; grid-template-columns: 1fr 1fr; }
  .programme-facts span { padding: 0; border: 0; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-left: 0; }
  .section-heading { align-items: flex-start; }
  .section-heading .text-link { white-space: nowrap; }
  .dialog { padding: 24px 20px; }
  .participant-image { display: none; }
  .participant-panel { min-height: 100vh; padding: 24px 20px; }
  .login-body { padding: 0; background: var(--paper); }
  .login-shell { width: 100%; height: 100dvh; display: block; border: 0; border-radius: 0; box-shadow: none; }
  .login-visual { display: none; }
  .login-panel { min-height: 100dvh; padding: 28px 24px; }
  .login-brand-row { margin-bottom: clamp(24px, 6vh, 46px); }
  .simple-participant-shell { box-shadow: none; }
  .simple-participant-header { min-height: 74px; padding: 12px 18px; }
  .simple-brand span { display: none; }
  .simple-participant-profile strong { max-width: 108px; }
  .simple-participant-main { padding: 40px 20px; }
  .simple-participant-main > h1 { font-size: 34px; }
  .simple-check-card { padding: 18px; }
  .simple-participant-footer { padding: 16px 20px; }
  .admin-page-main { padding: 22px 16px 34px; }
  .admin-page-heading h1 { font-size: 34px; }
  .admin-context span, .admin-context small { display: none; }
  .admin-context strong { max-width: 180px; }
  .topbar-meta { margin-left: auto; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-toolbar form { width: 100%; }
  .schedule-mode-picker > div, .custom-date-entry { grid-template-columns: 1fr; }
  .custom-date-entry .button { width: 100%; }
  .form-two, .report-metrics { grid-template-columns: 1fr; }
  .report-metrics div { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  /* User motion preference must override every component transition and animation. */
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  .status { border: 1px solid currentColor; }
}

/* Turkish-red flat operations system: the final shared admin layer. */
:root { --turkish-red:#d6222a; --turkish-red-deep:#b91620; --turkish-red-soft:#fff1f2; --canvas:#f7f8fa; --ink:#182234; --paper:#fff; --border:#e5e9ef; --muted:#738096; --navy:#182234; --red:var(--turkish-red); --primary-action:var(--turkish-red); --copper:var(--turkish-red); --limestone:var(--canvas); --sidebar-width:248px; }
body, .main-shell, .admin-page-main { background:var(--canvas); }
.app-shell { background:var(--canvas); }
.sidebar { background:#fff; border-right:1px solid var(--border); color:var(--ink); }
.brand-lockup { min-height:92px; display:flex; flex-direction:row; align-items:center; gap:11px; padding:20px 22px; border-bottom:1px solid var(--border); color:var(--ink); text-decoration:none; }
.brand-lockup img { width:43px; height:43px; filter:none; }
.brand-lockup span { display:grid; gap:1px; }
.brand-lockup strong { color:var(--turkish-red); font-size:21px; font-weight:900; letter-spacing:.04em; line-height:1; }
.brand-lockup small { color:#657186; font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.primary-nav { gap:3px; padding:16px 12px; }
.nav-item { min-height:43px; gap:12px; border-radius:6px; padding:0 12px; color:#667287; font-size:12px; font-weight:800; }
.nav-item i { width:20px; color:#7b8799; font-size:19px; }
.nav-item::before { display:none; }
.nav-item:hover { background:#faf0f1; color:var(--turkish-red); }
.nav-item.is-active { border-left:3px solid var(--turkish-red); border-radius:0 6px 6px 0; background:var(--turkish-red-soft); color:var(--turkish-red); }
.nav-item.is-active i { color:var(--turkish-red); }
.sidebar-signature { display:none; }
.admin-topbar { position:sticky; top:0; z-index:var(--z-sticky); display:grid; grid-template-columns:minmax(150px,1fr) minmax(220px,400px) auto; min-height:68px; gap:18px; padding:0 28px; border-bottom:1px solid var(--border); background:#fff; box-shadow:none; }
.topbar-page { display:grid; align-content:center; gap:2px; min-width:0; }
.topbar-page span { color:#929cac; font-size:9px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.topbar-page strong { overflow:hidden; color:var(--ink); font-size:15px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.global-search { height:36px; border-color:var(--border); border-radius:6px; background:#fafbfc; }
.global-search:focus-within { border-color:#ecb5b8; box-shadow:0 0 0 3px rgba(214,34,42,.08); }
.admin-context { display:none; }
.admin-context span { color:#9ba5b3; font-size:8px; font-weight:900; }
.admin-context strong { color:#3a4658; font-size:11px; font-weight:800; }
.admin-context small { color:var(--turkish-red); font-size:10px; }
.topbar-meta { gap:14px; }
.topbar-meta > p { color:#7a8596; font-size:10px; }
.topbar-meta > p i { color:var(--turkish-red); }
.user-menu-trigger { min-height:44px; border-left:1px solid var(--border); padding-left:14px; }
.user-menu-trigger .avatar { width:32px; height:32px; background:var(--turkish-red); color:#fff; font-size:10px; }
.admin-page-main { min-height:calc(100vh - 68px); padding:26px 28px 44px; background:var(--canvas); }
.admin-page-heading { margin-bottom:18px; }
.admin-page-heading span, .panel-heading span { color:var(--turkish-red); font-size:9px; font-weight:900; letter-spacing:.14em; }
.admin-page-heading h1 { color:var(--ink); font-family:var(--font-body); font-size:29px; font-weight:900; letter-spacing:-.035em; }
.admin-page-heading p { margin-top:5px; color:var(--muted); font-size:12px; }
.admin-panel, .admin-toolbar, .dashboard-card { border:1px solid var(--border); border-radius:7px; background:#fff; box-shadow:none; }
.admin-layout-grid { gap:16px; }
.panel-heading { min-height:58px; padding:12px 16px; border-bottom:1px solid var(--border); }
.panel-heading h2 { color:var(--ink); font-family:var(--font-body); font-size:16px; font-weight:900; letter-spacing:-.02em; }
.button { min-height:34px; border-radius:5px; padding:0 11px; font-size:11px; font-weight:900; box-shadow:none; }
.button-primary { border-color:var(--turkish-red); background:var(--turkish-red); }
.button-primary:hover { border-color:var(--turkish-red-deep); background:var(--turkish-red-deep); }
.button-outline { border-color:#dfe5eb; background:#fff; color:#526074; }
.button-outline:hover { border-color:#c8d0da; background:#f8fafb; color:var(--ink); }
.button-danger { border-color:var(--turkish-red); background:var(--turkish-red); }
.button-icon { width:32px; min-width:32px; height:32px; min-height:32px; padding:0; border-radius:5px; }
.button-icon i { font-size:16px; }
.button-icon.button-outline:hover { border-color:#efb4b8; background:var(--turkish-red-soft); color:var(--turkish-red); }
.button-icon.button-danger { background:var(--turkish-red-soft); border-color:#f2c7ca; color:var(--turkish-red); }
.button-icon.button-danger:hover { background:var(--turkish-red); color:#fff; }
.table-frame { border:0; border-radius:0; background:#fff; }
.compact-table { min-width:720px; }
.compact-table th { height:38px; border-bottom:1px solid var(--border); padding:0 14px; background:#fafbfd; color:#8a95a5; font-size:9px; font-weight:900; letter-spacing:.11em; }
.compact-table td { min-height:0; height:52px; padding:9px 14px; border-bottom:1px solid #eef1f4; color:#59667a; font-size:11px; }
.compact-table td strong { color:#273448; font-size:11px; font-weight:900; }
.compact-table tbody tr:last-child td { border-bottom:0; }
.compact-table tbody tr:hover { background:#fff8f8; }
.table-actions { min-width:0; flex-wrap:nowrap; gap:5px; }
.table-actions .button:not(.button-icon) { white-space:nowrap; }
.status { min-height:23px; padding:0 8px; font-size:9px; font-weight:800; }
.admin-toolbar { min-height:54px; margin-bottom:16px; padding:8px 12px; }
.admin-toolbar .attendance-filters { gap:8px; }
.admin-toolbar select, .admin-form input, .admin-form select { height:34px; border-color:#dfe5eb; border-radius:5px; }
.attendance-control-grid { grid-template-columns:minmax(0,1.25fr) 320px; gap:16px; margin-bottom:16px; }
.attendance-control-grid { align-items:start; }
.attendance-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 16px; }
.attendance-metric { min-width:0; min-height:86px; display:flex; align-items:center; gap:11px; padding:13px 15px; border:1px solid var(--border); border-radius:7px; background:#fff; }
.attendance-metric > i { width:37px; height:37px; flex:0 0 37px; display:grid; place-items:center; border-radius:50%; font-size:19px; }
.attendance-metric > div { min-width:0; display:grid; gap:1px; }
.attendance-metric span { color:#687588; font-size:10px; font-weight:800; }
.attendance-metric strong { color:#172033; font-family:var(--font-body); font-size:25px; font-weight:900; line-height:1.05; font-variant-numeric:tabular-nums; }
.attendance-metric small { overflow:hidden; color:#8691a0; font-size:9px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.attendance-metric-total > i { background:#edf2f7; color:#44566c; }
.attendance-metric-checkin > i { background:#edf9f1; color:#20a05a; }
.attendance-metric-checkout > i { background:#fff0f1; color:var(--turkish-red); }
.attendance-metric-live > i { background:#fff5e9; color:#e78a23; }
.attendance-control-grid > .admin-panel:first-child { overflow:hidden; }
.attendance-control-grid > .admin-panel:first-child .form-note { margin:0; padding:13px 16px 15px; border-top:1px solid var(--border); background:#fcfcfd; }
.schedule-summary { gap:0; grid-template-columns:1fr 1fr; }
.schedule-summary span { min-height:76px; align-content:center; border:0; border-right:1px solid var(--border); padding:14px 16px; background:#fff; }
.schedule-summary span:last-child { border-right:0; }
.qr-panel { position:relative; overflow:hidden; }
.qr-panel::before { content:''; position:absolute; top:0; left:0; width:100%; height:3px; background:var(--turkish-red); }
.qr-code { width:184px; min-height:184px; margin:14px auto 8px; padding:9px; border-color:#edf0f4; }
.qr-panel > p { padding:0 16px; }
.qr-panel .button { margin:0 0 12px; }

/* Reusable mobile attendance pass — deliberately compact and phone-first. */
.mobile-pass-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 92% 4%, #fdecee 0, transparent 29%), #f4f7fa; color: var(--ink); font-family: Nunito, Arial, sans-serif; }
.mobile-pass-shell { width: min(100%, 440px); }
.mobile-pass-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 18px; color: var(--navy); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.mobile-pass-brand img { width: 34px; height: 34px; object-fit: contain; }
.mobile-pass-card { position: relative; overflow: hidden; min-height: 410px; padding: 42px 30px 30px; border: 1px solid #e6ebf0; border-radius: 12px; background: #fff; box-shadow: 0 18px 52px rgba(23, 32, 51, .12); text-align: center; }
.mobile-pass-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--turkish-red); }
.mobile-pass-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; font-size: 35px; }
.mobile-pass-icon.is-primary { background: #fff0f1; color: var(--turkish-red); }.mobile-pass-icon.is-success { background: #eaf7f0; color: var(--success); }.mobile-pass-icon.is-error { background: #fff0ef; color: var(--turkish-red); }.mobile-pass-icon.is-neutral { background: #eef2f7; color: var(--navy); }
.mobile-pass-kicker { margin: 0 0 8px; color: var(--turkish-red); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }.mobile-pass-card h1 { margin: 0; color: var(--navy); font-size: 28px; line-height: 1.1; }.mobile-pass-message { margin: 15px auto 0; max-width: 330px; color: #607084; font-size: 14px; line-height: 1.55; }.mobile-pass-message strong { color: var(--navy); }
.mobile-pass-details { margin: 25px 0 0; border-top: 1px solid #e8edf2; text-align: left; }.mobile-pass-details > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid #e8edf2; }.mobile-pass-details dt { color: #7b8798; font-size: 11px; font-weight: 800; }.mobile-pass-details dd { margin: 0; color: var(--navy); font-size: 11px; font-weight: 900; text-align: right; }.mobile-pass-action { width: 100%; min-height: 48px; margin-top: 26px; justify-content: center; gap: 8px; }.mobile-pass-auto-note { margin: 15px 0 0; color: #758195; font-size: 11px; font-weight: 700; }.mobile-pass-shell > footer { margin-top: 16px; color: #7d8999; font-size: 10px; font-weight: 700; text-align: center; }
.mobile-pass-admin-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: #fff0f1; color: var(--turkish-red); font-size: 22px; }
.mobile-pass-ready { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 16px 14px; border:1px solid #cfe9d9; border-radius:7px; padding:13px 14px; background:#f4fbf6; }
.mobile-pass-ready > div { display:flex; align-items:center; gap:10px; min-width:0; }.mobile-pass-ready > div > i { color:#208a4c; font-size:23px; }.mobile-pass-ready strong,.mobile-pass-ready span { display:block; }.mobile-pass-ready strong { color:#1e6140; font-size:12px; font-weight:900; }.mobile-pass-ready span { margin-top:2px; color:#5b7a68; font-size:10px; font-weight:700; }.mobile-pass-ready .button { flex:0 0 auto; }
@media (max-width: 520px) { .mobile-pass-page { padding: 16px; align-items: start; }.mobile-pass-shell { padding-top: 12px; }.mobile-pass-card { min-height: 390px; padding: 34px 22px 24px; }.mobile-pass-card h1 { font-size: 25px; } }
.report-metrics { gap:12px; overflow:visible; border:0; border-radius:0; background:transparent; }
.report-metrics div { min-height:82px; border:1px solid var(--border); border-radius:7px; padding:14px 16px; background:#fff; }
.report-metrics strong { color:var(--turkish-red); font-family:var(--font-body); font-size:28px; font-weight:900; }
.side-form-panel { top:86px; }
.form-note { color:#7c8798; }
.page-alert { border-radius:6px; box-shadow:none; }
@media (max-width:1100px) { .admin-topbar { grid-template-columns:minmax(140px,1fr) minmax(220px,340px) auto; } }
@media (max-width:760px) { .admin-topbar { grid-template-columns:auto minmax(0,1fr) auto; min-height:62px; gap:9px; padding:0 14px; } .topbar-page { display:none; } .global-search { margin-left:0; } .topbar-meta > p { display:none; } .admin-page-main { padding:18px 14px 34px; } .compact-table { min-width:640px; } .table-actions { gap:4px; } .attendance-control-grid { grid-template-columns:1fr; } .attendance-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .attendance-metric { min-height:78px; padding:11px; gap:9px; } .attendance-metric > i { width:33px; height:33px; flex-basis:33px; font-size:17px; } .attendance-metric strong { font-size:22px; } .mobile-pass-ready { align-items:stretch; flex-direction:column; margin:0 12px 12px; } .mobile-pass-ready .button { width:100%; } }

/* Compact dashboard composition. */
body[data-page="admin-dashboard"] main { padding:20px 28px 36px; background:var(--canvas); }
body[data-page="admin-dashboard"] .topbar { min-height:68px; padding:0 28px; }
body[data-page="admin-dashboard"] .brand-lockup { min-height:92px; }
body[data-page="admin-dashboard"] .welcome-band { min-height:72px; margin:0 0 12px; padding:0; }
body[data-page="admin-dashboard"] .welcome-band > div > span { color:var(--turkish-red); font-size:9px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
body[data-page="admin-dashboard"] .welcome-band h1 { margin:3px 0 2px; color:var(--ink); font-size:25px; font-weight:900; letter-spacing:-.035em; }
body[data-page="admin-dashboard"] .welcome-band > div > p { margin:0; color:var(--muted); font-size:11px; }
body[data-page="admin-dashboard"] .welcome-action { flex:0 0 auto; }
body[data-page="admin-dashboard"] .programme-summary { padding:0; border:0; background:transparent; }
body[data-page="admin-dashboard"] .metrics-row { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:0; }
body[data-page="admin-dashboard"] .metric { min-height:82px; grid-template-columns:38px 1fr; gap:8px; padding:13px; border:1px solid var(--border); border-radius:7px; background:#fff; }
body[data-page="admin-dashboard"] .metric i { width:36px; height:36px; font-size:19px; }
body[data-page="admin-dashboard"] .metric strong { font-size:25px; }
body[data-page="admin-dashboard"] .metric span { font-size:10px; }
body[data-page="admin-dashboard"] .dashboard-visual-grid { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) 240px; gap:12px; margin-top:12px; }
body[data-page="admin-dashboard"] .dashboard-card { min-height:238px; padding:14px; }
body[data-page="admin-dashboard"] .chart-card canvas { height:180px !important; }
body[data-page="admin-dashboard"] .attendance-section { margin-top:12px; border-radius:7px; padding:0; background:#fff; }
body[data-page="admin-dashboard"] .section-heading { min-height:58px; align-items:center; margin:0; padding:0 16px; border-bottom:1px solid var(--border); }
body[data-page="admin-dashboard"] .section-heading h2 { font-size:15px; font-weight:900; }
body[data-page="admin-dashboard"] .section-heading p { font-size:10px; }
body[data-page="admin-dashboard"] .attendance-section .table-frame { border:0; }

/* Print centre is an actionable workspace instead of a generic two-column table. */
.print-centre-layout { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:16px; align-items:start; }
.print-panel-intro { display:flex; align-items:center; gap:11px; padding:12px 16px; border-bottom:1px solid var(--border); background:#fcfcfd; }
.print-panel-intro i { display:grid; width:31px; height:31px; place-items:center; border-radius:6px; background:var(--turkish-red-soft); color:var(--turkish-red); font-size:18px; }
.print-panel-intro p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.print-count { color:#8b95a5 !important; font-size:10px !important; letter-spacing:0 !important; text-transform:none !important; }
.window-line { display:inline-flex; align-items:center; gap:5px; color:#3f4d61; font-weight:800; }.window-line i,.print-poster-panel td small i { margin-right:5px; color:var(--turkish-red); }.print-poster-panel td small { display:block; margin-top:4px; }
.print-materials-card { border:1px solid var(--border); border-top:3px solid var(--turkish-red); border-radius:7px; padding:20px; background:#fff; }
.print-material-icon { display:grid; width:42px; height:42px; place-items:center; margin-bottom:20px; border-radius:7px; background:var(--turkish-red-soft); color:var(--turkish-red); font-size:23px; }
.print-materials-card > span { display:block; color:var(--turkish-red); font-size:9px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.print-materials-card h2 { margin:5px 0 8px; color:var(--ink); font-size:19px; font-weight:900; letter-spacing:-.03em; }
.print-materials-card p { margin:0 0 18px; color:var(--muted); font-size:11px; line-height:1.6; }
.print-materials-card .button { width:100%; margin-top:7px; }

/* Layer and scrollbar contract. */
html, body, .sidebar, .dialog, .table-frame { scrollbar-color:#c1c9d4 #f1f3f6; scrollbar-width:thin; }
*::-webkit-scrollbar { width:9px; height:9px; }
*::-webkit-scrollbar-track { background:#f1f3f6; }
*::-webkit-scrollbar-thumb { border:2px solid #f1f3f6; border-radius:999px; background:#bcc5d0; }
*::-webkit-scrollbar-thumb:hover { background:#929eae; }
.dialog-layer { z-index:var(--z-backdrop); animation:dialog-veil-in 180ms ease-out both; }
.dialog-backdrop { background:rgba(24,34,52,.38); backdrop-filter:blur(8px) saturate(.9); -webkit-backdrop-filter:blur(8px) saturate(.9); }
.dialog { z-index:var(--z-dialog); width:min(600px,calc(100vw - 28px)); max-height:min(720px,calc(100vh - 28px)); overflow:auto; border:1px solid rgba(255,255,255,.76); border-radius:10px; padding:24px; background:rgba(255,255,255,.98); box-shadow:0 24px 70px rgba(24,34,52,.22); animation:dialog-surface-in 200ms cubic-bezier(.22,.9,.3,1) both; }
.dialog::before { content:''; position:absolute; top:0; right:24px; left:24px; height:3px; border-radius:0 0 3px 3px; background:var(--turkish-red); }
.dialog .panel-heading { min-height:52px; padding:3px 36px 12px 0; border-bottom:1px solid var(--border); }
.dialog .panel-heading h2 { color:var(--ink); font-family:var(--font-body); font-size:21px; font-weight:900; }
.dialog-close { top:13px; right:13px; width:32px; height:32px; border-color:var(--border); border-radius:6px; background:#fff; color:#657186; }
.dialog-close:hover { background:var(--turkish-red-soft); color:var(--turkish-red); }
.dialog .admin-form { padding:16px 0 0; }
@keyframes dialog-veil-in { from { opacity:0 } to { opacity:1 } }
@keyframes dialog-surface-in { from { opacity:0; transform:translate(-50%,-47%) scale(.975) } to { opacity:1; transform:translate(-50%,-50%) scale(1) } }
@media (max-width:900px) { .print-centre-layout { grid-template-columns:1fr; } .print-materials-card { position:static; } }
@media (max-width:760px) { body[data-page="admin-dashboard"] main { padding:14px 12px 30px; } body[data-page="admin-dashboard"] .welcome-band { min-height:70px; } body[data-page="admin-dashboard"] .welcome-action { display:none; } body[data-page="admin-dashboard"] .metrics-row, body[data-page="admin-dashboard"] .dashboard-visual-grid { grid-template-columns:1fr; } .dialog { padding:20px 16px; } }

/* Print centre: fixed visual rhythm, no overflowing operational table. */
.print-centre-shell { display:grid; gap:16px; max-width:1480px; }
.print-centre-intro { min-height:120px; display:flex; align-items:center; justify-content:space-between; gap:24px; border:1px solid var(--border); border-radius:8px; padding:22px 24px; background:#fff; }
.print-centre-intro > div:first-child { min-width:0; }
.print-centre-intro span, .print-participant-strip > div:nth-child(2) > span { display:block; color:var(--turkish-red); font-size:9px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.print-centre-intro h2 { margin:5px 0; color:var(--ink); font-size:23px; font-weight:900; letter-spacing:-.035em; }
.print-centre-intro p { max-width:620px; margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.print-intro-stat { width:116px; min-height:74px; display:grid; place-content:center; flex:0 0 auto; border-left:1px solid var(--border); padding-left:24px; text-align:center; }
.print-intro-stat strong { color:var(--turkish-red); font-size:30px; font-weight:900; line-height:1; }.print-intro-stat small { margin-top:5px; color:#7c8797; font-size:9px; font-weight:800; text-transform:uppercase; }
.print-day-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
.print-day-card { min-height:250px; display:flex; flex-direction:column; border:1px solid var(--border); border-radius:8px; padding:15px; background:#fff; transition:border-color 160ms ease, transform 160ms ease; }
.print-day-card:hover { border-color:#efb8bc; transform:translateY(-2px); }
.print-day-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.print-day-number { display:inline-flex; align-items:center; min-height:24px; border-radius:4px; padding:0 7px; background:var(--turkish-red-soft); color:var(--turkish-red); font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.print-day-card h3 { min-height:35px; margin:0; overflow:hidden; color:#273448; font-size:13px; font-weight:900; line-height:1.3; }
.print-group-name { min-height:16px; margin:3px 0 13px; overflow:hidden; color:#8490a0; font-size:10px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.print-date { display:flex; align-items:center; gap:7px; border-top:1px solid #eff1f4; border-bottom:1px solid #eff1f4; padding:9px 0; color:#536176; font-size:10px; font-weight:800; }
.print-date i { color:var(--turkish-red); font-size:14px; }
.print-window-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px 0; }
.print-window-grid > div { min-width:0; }.print-window-grid span { display:flex; align-items:center; gap:4px; color:#8a95a5; font-size:8px; font-weight:900; letter-spacing:.03em; text-transform:uppercase; }.print-window-grid span i { color:var(--turkish-red); font-size:11px; }.print-window-grid strong { display:block; margin-top:4px; overflow:hidden; color:#3a4658; font-size:9px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
.print-card-link { display:flex; align-items:center; gap:5px; margin-top:auto; color:var(--turkish-red); font-size:10px; font-weight:900; text-decoration:none; }.print-card-link:hover { text-decoration:underline; text-underline-offset:3px; }
.print-empty { grid-column:1/-1; min-height:220px; border:1px solid var(--border); border-radius:8px; background:#fff; }
.print-participant-strip { display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:16px; border:1px solid var(--border); border-radius:8px; padding:16px 18px; background:#fff; }
.print-material-icon { width:42px; height:42px; margin:0; }.print-participant-strip h2 { margin:4px 0 3px; color:var(--ink); font-size:15px; font-weight:900; }.print-participant-strip p { margin:0; color:var(--muted); font-size:10px; }.print-strip-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
@media (max-width:740px) { .print-centre-intro { align-items:flex-start; padding:18px; }.print-intro-stat { width:auto; min-height:0; border:0; padding:0; }.print-day-grid { grid-template-columns:1fr; }.print-participant-strip { grid-template-columns:42px 1fr; }.print-strip-actions { grid-column:1/-1; justify-content:stretch; }.print-strip-actions .button { flex:1; } }

.inline-form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }.inline-form label { display:grid; gap:5px; color:#536175; font-size:12px; font-weight:800; }.inline-form select { min-height:38px; }
