/* eSF9-SF10 — EduDash-style theme (teal primary, light surfaces, soft cards) */
:root {
  --primary: #25A194;
  --primary-hover: #1C7F73;
  --primary-50: #E6F7F5;
  --primary-100: rgba(37, 161, 148, .14);
  --bg: #EEF2F6;
  --surface: #fff;
  --heading: #111827;
  --text: #4B5563;
  --muted: #6C757D;
  --neutral-50: #F5F6FA;
  --neutral-100: #F3F4F6;
  --neutral-200: #EBECEF;
  --neutral-300: #D1D5DB;
  --border: #EBECEF;
  --success: #16A34A;
  --success-50: #DCFCE7;
  --warning: #EA7A0B;
  --warning-50: #FFF1E3;
  --danger: #EF4444;
  --danger-50: #FEE2E2;
  --info: #144BD6;
  --info-50: #E7EEFC;
  --purple: #A020F0;
  --purple-50: #F5E3FF;
  --orange: #FF7A2F;
  --radius: 8px;
  --shadow: 0 4px 30px rgba(46, 45, 116, .05);
  --sidebar-w: 275px;
  --bs-primary: var(--primary);
  --bs-primary-rgb: 37, 161, 148;
  --bs-body-font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-border-radius: var(--radius);
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-hover);
}

body { background: var(--bg); color: var(--text); font-size: .9rem; }
h1, h2, h3, h4, h5, h6, .font-heading { font-family: 'Inter', sans-serif; color: var(--heading); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
.text-muted { color: var(--muted) !important; }
.text-body { color: var(--heading) !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.small-xs { font-size: .75rem; }
.label-xs { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fw-medium { font-weight: 500; }

/* ---------- Buttons & forms ---------- */
.btn { font-size: .85rem; font-weight: 500; border-radius: var(--radius); padding: .5rem 1rem; }
.btn-sm { font-size: .8rem; padding: .35rem .75rem; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover); --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover); --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary); --bs-btn-focus-shadow-rgb: 37, 161, 148; }
.btn-outline-secondary { --bs-btn-color: var(--heading); --bs-btn-border-color: var(--neutral-300); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--primary-50); --bs-btn-hover-color: var(--primary); --bs-btn-hover-border-color: var(--primary); --bs-btn-active-bg: var(--primary-50); --bs-btn-active-color: var(--primary); --bs-btn-active-border-color: var(--primary); --bs-btn-disabled-color: var(--muted); --bs-btn-disabled-border-color: var(--neutral-200); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--heading); }
.btn-ghost:hover { background: var(--primary-50); color: var(--primary); }
.btn-ghost:disabled { opacity: .4; }
.form-control, .form-select, .input-group-text { font-size: .85rem; border-color: var(--neutral-300); border-radius: var(--radius); color: var(--heading); }
.form-control, .form-select { padding: .55rem .85rem; }
.form-control-sm, .form-select-sm { padding: .4rem .7rem; font-size: .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem var(--primary-100); }
.form-label { font-size: .82rem; font-weight: 600; color: var(--heading); margin-bottom: .4rem; }
.form-control::placeholder { color: #9CA3AF; }
.modal-content { border: 0; border-radius: 12px; box-shadow: 0 20px 60px rgba(17, 24, 39, .18); }
.modal-header, .modal-footer { border-color: var(--border); padding: 1rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.dropdown-menu { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; }
.dropdown-item { border-radius: 6px; padding: .45rem .75rem; font-size: .85rem; }
.dropdown-item:hover { background: var(--neutral-100); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1040; display: flex; flex-direction: column;
  background: #fff; border-right: 1px solid var(--border); transition: transform .25s ease;
}
.sidebar .brand { height: 72px; border-bottom: 1px solid var(--border); }
.sidebar .brand-logo { font-size: 1.55rem; font-weight: 700; color: var(--heading); letter-spacing: -.02em; line-height: 1; }
.sidebar .brand-logo span { color: var(--primary); }
.sidebar .brand-icon { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: conic-gradient(from 200deg, var(--orange), #F59E0B, var(--primary), var(--orange)); color: #fff; display: grid; place-items: center; font-size: 1.15rem; }
.sidebar-profile { margin: 12px 16px 4px; background: var(--neutral-50); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; border: 0; width: calc(100% - 32px); text-align: left; }
.sidebar-profile:hover { background: var(--neutral-100); }
.sidebar-profile .who { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-profile .who b { display: block; font-weight: 500; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile .who small { color: var(--muted); font-size: .8rem; }
.sidebar nav { overflow-y: auto; flex: 1; padding: 12px 16px 16px; }
.sidebar .nav-group { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #9CA3AF; padding: 14px 12px 6px; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius);
  color: var(--text); font-size: .9rem; font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; color: var(--muted); }
.sidebar .nav-link:hover { background: var(--primary-50); color: var(--primary); }
.sidebar .nav-link:hover i { color: var(--primary); }
.sidebar .nav-link.active { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 161, 148, .25); }
.sidebar .nav-link.active i { color: #fff; }
.sidebar .foot { border-top: 1px solid var(--border); font-size: .75rem; color: var(--muted); }
.sidebar-backdrop { position: fixed; inset: 0; background: rgb(17 24 39 / .5); z-index: 1035; display: none; }
.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin .25s ease; }

/* Collapsed sidebar (desktop) */
body.sidebar-collapsed { --sidebar-w: 88px; }
body.sidebar-collapsed .sidebar .brand-logo, body.sidebar-collapsed .sidebar .nav-link span, body.sidebar-collapsed .sidebar .nav-group,
body.sidebar-collapsed .sidebar-profile .who, body.sidebar-collapsed .sidebar-profile .bi-chevron-right, body.sidebar-collapsed .sidebar .foot div { display: none; }
body.sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: 12px; }
body.sidebar-collapsed .sidebar-profile { justify-content: center; }
body.sidebar-collapsed .sidebar .brand { justify-content: center !important; }
body.sidebar-collapsed .sidebar .collapse-btn i { transform: rotate(180deg); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1030; height: 72px; background: #fff; box-shadow: 0 1px 0 var(--border); }
.topbar .search { max-width: 24rem; margin-right: auto; }
.topbar .search .form-control { padding-left: 2.6rem; height: 42px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--neutral-200); color: var(--heading); display: inline-grid; place-items: center; font-size: 1.1rem; border: 0; position: relative; text-decoration: none; }
.icon-btn:hover { background: var(--primary-50); color: var(--primary); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--neutral-200); }
.sy-pill { background: var(--primary-50); color: var(--primary); border-radius: 999px; padding: .45rem .9rem; font-size: .8rem; font-weight: 600; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #56C7B9); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 600; flex-shrink: 0; }
main.content { padding: 24px; flex: 1; }
.app-footer { background: #fff; padding: 18px 24px; text-align: center; font-size: .85rem; color: var(--muted); }
@media (max-width: 1199.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .15); }
  .sidebar.open + .sidebar-backdrop { display: block; }
  .main-wrap { margin-left: 0; }
  body.sidebar-collapsed { --sidebar-w: 275px; }
}
@media (max-width: 575.98px) { main.content { padding: 16px; } }

/* ---------- Page header ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; font-weight: 600; margin: 0; }
.page-header p { margin: .4rem 0 0; color: var(--text); font-size: .95rem; }
.page-header .crumb { color: var(--heading); font-weight: 500; }

/* ---------- Cards ---------- */
.card-esf { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-esf > .card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-esf > .card-head h2 { font-size: 1.05rem; font-weight: 600; margin: 0; color: var(--heading); }
.card-esf > .card-head p { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; }
.card-esf > .card-body { padding: 20px; }
.card-esf > .card-body.flush { padding: 0; }

/* Stat cards: tinted gradient + round colored icon, like the template */
.stat-card { padding: 20px; height: 100%; position: relative; overflow: hidden; }
.stat-card .stat-top { display: flex; align-items: center; gap: 12px; }
.stat-card .stat-label { color: var(--heading); font-weight: 500; font-size: .95rem; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--heading); margin-top: 16px; }
.stat-card .stat-hint { font-size: .8rem; color: var(--heading); margin-top: 10px; }
.stat-card .stat-hint .up { color: var(--primary); font-weight: 600; margin-right: .35rem; }
.stat-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: #fff; flex-shrink: 0; }
.stat-primary { background: linear-gradient(115deg, #fff 35%, rgba(37, 161, 148, .13)); }
.stat-primary .stat-icon { background: var(--primary); }
.stat-warning { background: linear-gradient(115deg, #fff 35%, rgba(255, 122, 47, .13)); }
.stat-warning .stat-icon { background: var(--orange); }
.stat-info { background: linear-gradient(115deg, #fff 35%, rgba(45, 91, 227, .13)); }
.stat-info .stat-icon { background: #2D5BE3; }
.stat-purple { background: linear-gradient(115deg, #fff 35%, rgba(160, 32, 240, .12)); }
.stat-purple .stat-icon { background: var(--purple); }
.stat-success { background: linear-gradient(115deg, #fff 35%, rgba(22, 178, 70, .13)); }
.stat-success .stat-icon { background: #16B246; }
.stat-danger { background: linear-gradient(115deg, #fff 35%, rgba(239, 68, 68, .12)); }
.stat-danger .stat-icon { background: var(--danger); }
.stat-sky { background: linear-gradient(115deg, #fff 35%, rgba(4, 180, 255, .13)); }
.stat-sky .stat-icon { background: #04B4FF; }
.tone-bg-primary { background: var(--primary-50); color: var(--primary); }
.tone-bg-success { background: var(--success-50); color: var(--success); }
.tone-bg-warning { background: var(--warning-50); color: var(--warning); }
.tone-bg-info { background: var(--info-50); color: var(--info); }
.tone-bg-danger { background: var(--danger-50); color: var(--danger); }
.mini-stat { border: 1px solid var(--border); background: var(--neutral-50); border-radius: var(--radius); padding: .65rem .9rem; }

/* Segmented bar + legend (template "Student Attendance") */
.seg-bar { display: flex; gap: 6px; height: 44px; }
.seg-bar span { border-radius: 4px; min-width: 6px; }
.legend-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; color: var(--heading); font-size: .92rem; }
.legend-row .sw { width: 11px; height: 11px; border-radius: 2px; display: inline-block; margin-right: 10px; }
.legend-row b { font-weight: 600; }

/* Feed lists (template "Notice Board" / "Leave Requests") */
.feed { list-style: none; margin: 0; padding: 8px 20px; }
.feed li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .feed-title { color: var(--heading); font-weight: 500; }
.feed .feed-meta { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.feed-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 1rem; }
.event { border-left: 3px solid var(--primary); padding: 2px 0 2px 12px; margin-bottom: 16px; }

/* ---------- Tables ---------- */
.table-esf { margin: 0; font-size: .85rem; --bs-table-bg: transparent; }
.table-esf thead th { background: var(--neutral-50); color: var(--heading); font-size: .8rem; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; padding: .85rem 1rem; }
.table-esf td { padding: .8rem 1rem; vertical-align: middle; border-color: var(--border); color: var(--text); }
.table-esf td .fw-medium, .table-esf td.fw-medium, .table-esf td.fw-semibold { color: var(--heading); }
.table-esf tbody tr:hover { background: #FAFBFC; }
.table-esf tbody tr.table-active { --bs-table-bg-state: var(--primary-50); }
.empty-state { text-align: center; padding: 2.75rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--primary); opacity: .6; }

/* ---------- Badges ---------- */
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; border: 0; padding: .25rem .7rem; font-size: .72rem; font-weight: 500; white-space: nowrap; }
.tone-success { background: var(--success-50); color: var(--success); }
.tone-warning { background: var(--warning-50); color: var(--warning); }
.tone-info { background: var(--info-50); color: var(--info); }
.tone-danger { background: var(--danger-50); color: var(--danger); }
.tone-neutral { background: var(--neutral-200); color: var(--text); }
.tone-primary { background: var(--primary-50); color: var(--primary); }

/* ---------- Progress, chips, lists ---------- */
.progress { height: .55rem; background: var(--neutral-200); border-radius: 999px; }
.progress-bar.bg-esf-primary { background: var(--primary); }
.progress-bar.bg-esf-success { background: #16B246; }
.progress-bar.bg-esf-accent { background: var(--orange); }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: var(--neutral-50); border-radius: 999px; padding: .3rem .7rem; font-size: .75rem; color: var(--text); font-weight: 500; }
.chip b { color: var(--primary); }
.code-chip { font-family: ui-monospace, Menlo, monospace; font-size: .75rem; border: 1px solid var(--border); background: var(--neutral-50); border-radius: 4px; padding: .1rem .4rem; color: var(--heading); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; align-items: center; gap: .55rem; font-size: .88rem; padding: .3rem 0; color: var(--heading); }
.check-list .bi-check-circle-fill { color: var(--primary); }
.check-list .bi-exclamation-triangle-fill { color: var(--danger); }
.check-list li.fail { color: var(--danger); }
.select-list { list-style: none; padding: 8px; margin: 0; max-height: 36rem; overflow-y: auto; }
.select-list a { display: block; border: 1px solid transparent; border-radius: var(--radius); padding: .6rem .8rem; color: inherit; text-decoration: none; margin-bottom: 2px; }
.select-list a:hover { background: var(--neutral-50); }
.select-list a.active { border-color: var(--primary); background: var(--primary-50); }
.alert-soft { border-radius: var(--radius); border: 1px solid; padding: .7rem .9rem; font-size: .82rem; }
.alert-soft.danger { border-color: #FCA5A5; background: #FEF2F2; color: #B91C1C; }
.alert-soft.warning { border-color: #FBD38D; background: #FFFAF0; color: #B45309; }
.alert-soft.info { border-color: var(--border); background: var(--neutral-50); color: var(--text); }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: .5rem; flex-wrap: wrap; }
.stepper .step { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); }
.stepper .dot { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--neutral-300); display: grid; place-items: center; font-size: .75rem; font-weight: 600; background: #fff; }
.stepper .step.done .dot { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.stepper .step.current .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .step.current { color: var(--heading); font-weight: 600; }
.stepper .sep { width: 1.75rem; height: 1px; background: var(--neutral-300); align-self: center; }

/* ---------- Dropzone ---------- */
.dropzone { border: 2px dashed var(--neutral-300); border-radius: 12px; padding: 1.75rem; text-align: center; background: var(--neutral-50); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone i { font-size: 1.8rem; color: var(--primary); }
.dropzone .fw-semibold { color: var(--heading); }
.dropzone input[type=file] { display: none; }

/* ---------- Grade grid ---------- */
.grade-input { width: 4.4rem; text-align: center; padding: .3rem .35rem; font-size: .85rem; }
.grade-input.missing { border-color: var(--orange); background: var(--warning-50); }
.grade-input.invalid { border-color: var(--danger); background: #FEF2F2; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--neutral-200); }
.timeline li { position: relative; margin-bottom: .85rem; }
.timeline li::before { content: ''; position: absolute; left: -1.72rem; top: .6rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--primary); }

/* ---------- Tabs ---------- */
.nav-tabs-esf { border-bottom: 1px solid var(--neutral-300); gap: .25rem; }
.nav-tabs-esf .nav-link { color: var(--muted); font-size: .88rem; font-weight: 500; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .7rem 1rem; }
.nav-tabs-esf .nav-link:hover { color: var(--primary); }
.nav-tabs-esf .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }

/* ---------- Auth ---------- */
.auth-split { min-height: 100vh; display: flex; background: #fff; }
.auth-art { flex: 1 1 50%; background: linear-gradient(150deg, var(--primary-50), #fff 60%, #FFF1E3); display: flex; flex-direction: column; justify-content: center; padding: 3rem; position: relative; overflow: hidden; }
.auth-art .art-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 1rem 1.25rem; max-width: 20rem; }
.auth-form { flex: 1 1 50%; display: grid; place-items: center; padding: 2rem 1.5rem; }
.auth-card { width: 100%; max-width: 27rem; }
.auth-icon { width: 3rem; height: 3rem; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.35rem; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--bg); }
@media (max-width: 991.98px) { .auth-art { display: none; } }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: 24rem; }
.toast-esf { background: #fff; border-radius: 10px; border-left: 4px solid var(--primary); box-shadow: 0 10px 30px rgba(17, 24, 39, .15); padding: .8rem 1rem; font-size: .85rem; animation: toast-in .2s ease; }
.toast-esf.error { border-left-color: var(--danger); }
.toast-esf .title { font-weight: 600; color: var(--heading); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Printable documents ---------- */
.doc-sheet { background: #fff; color: #000; max-width: 52rem; margin: 0 auto; padding: 2rem; font-size: 11px; line-height: 1.5; box-shadow: var(--shadow); border-radius: var(--radius); }
.doc-sheet table { width: 100%; border-collapse: collapse; }
.doc-sheet td, .doc-sheet th { border: 1px solid #555; padding: 3px 6px; }
.doc-sheet th { background: #eee; }

@media print {
  .sidebar, .topbar, .app-footer, .no-print, .toast-stack, .page-header .actions { display: none !important; }
  .main-wrap { margin: 0 !important; }
  main.content { padding: 0 !important; }
  body { background: #fff; }
  .card-esf { box-shadow: none; }
  .doc-sheet { box-shadow: none; max-width: none; padding: 0; }
}

/* ---------- eClass Record grid (DO 15, s. 2026) ---------- */
.ecr-wrap { max-height: 70vh; }
.ecr { font-size: .8rem; }
.ecr thead th { position: sticky; top: 0; z-index: 2; padding: .5rem .45rem; font-size: .72rem; border-right: 1px solid var(--border); }
.ecr thead tr:nth-child(2) th { top: 34px; }
.ecr thead tr:nth-child(3) th { top: 66px; }
.ecr td { padding: .35rem .45rem; border-right: 1px solid var(--border); }
.ecr .grp-ww { background: #FFF1E3 !important; color: #B45309 !important; }
.ecr .grp-pt { background: var(--primary-50) !important; color: var(--primary-hover) !important; }
.ecr .grp-ex { background: var(--info-50) !important; color: var(--info) !important; }
.ecr .grp-tg { background: #F5E3FF !important; color: #7E22CE !important; }
.ecr .hps-row th { background: #FAFBFC !important; color: var(--muted); font-weight: 600; }
.ecr .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 13rem; box-shadow: 1px 0 0 var(--border); }
.ecr thead .sticky-col { z-index: 3; background: var(--neutral-50); }
.ecr .sex-row td { background: var(--neutral-50); padding: .35rem .6rem; }
.ecr .calc { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ecr .item-link { color: inherit; text-decoration: underline dotted; }
.score-input { width: 3.9rem; text-align: center; padding: .25rem .2rem; font-size: .82rem; margin: 0 auto; }
.score-input.missing { border-color: #FBD38D; background: #FFFAF0; }
.score-input.invalid { border-color: var(--danger); background: #FEF2F2; }

/* ---------- SF2 attendance grid ---------- */
.sf2-grid { font-size: .8rem; }
.sf2-grid th, .sf2-grid td { border-right: 1px solid var(--border); padding: .35rem .3rem; }
.sf2-grid th.today { background: var(--primary-50) !important; }
.sf2-grid .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 12rem; box-shadow: 1px 0 0 var(--border); }
.sf2-grid thead .sticky-col { background: var(--neutral-50); z-index: 2; }
.sf2-grid .sex-row td { background: var(--neutral-50); }
.sf2-grid tfoot td { background: #FAFBFC; }
.att-cell { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: #fff; font-size: .8rem; font-weight: 700; line-height: 1; display: inline-grid; place-items: center; padding: 0; }
.att-cell:not([disabled]):hover { outline: 2px solid var(--primary-100); }
.att-cell[disabled] { cursor: default; opacity: .55; }
.att-p { color: var(--primary); background: var(--primary-50); border-color: transparent; }
.att-a { color: var(--danger); background: #FEE2E2; border-color: transparent; }
.att-l { color: var(--warning); background: var(--warning-50); border-color: transparent; }
.att-n { color: #9CA3AF; }

/* ---------- QR ID cards ---------- */
.id-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.id-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--border); break-inside: avoid; }
.id-top { background: var(--primary); color: #fff; font-weight: 600; font-size: .8rem; padding: 8px 12px; }
.id-body { display: flex; gap: 14px; padding: 12px; align-items: center; }
.id-body .qr { width: 112px; height: 112px; flex-shrink: 0; }
.id-name { font-weight: 700; color: var(--heading); line-height: 1.2; }
.id-foot { font-size: .7rem; color: var(--muted); padding: 6px 12px; border-top: 1px dashed var(--border); }
@media print { .id-cards { grid-template-columns: repeat(2, 1fr); } .id-card { box-shadow: none; } .id-top { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Kiosk ---------- */
.kiosk-body { background: linear-gradient(160deg, var(--primary-50), var(--bg) 40%); min-height: 100vh; }
.kiosk-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; background: #fff; box-shadow: 0 1px 0 var(--border); }
.kiosk-clock { font-size: 2rem; font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1; }
.kiosk-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 24px 28px; }
@media (max-width: 991.98px) { .kiosk-main { grid-template-columns: 1fr; } }
.kiosk-cam { overflow: hidden; }
#reader { min-height: 360px; background: #0f172a; }
#reader video { width: 100% !important; object-fit: cover; }
.kiosk-result { border-radius: 16px; padding: 28px; text-align: center; color: #fff; min-height: 250px; display: flex; flex-direction: column; justify-content: center; transition: background .2s; }
.kiosk-result.idle { background: #fff; color: var(--heading); box-shadow: var(--shadow); }
.kiosk-result.idle .kr-icon { color: var(--primary); }
.kiosk-result.ok { background: var(--primary); }
.kiosk-result.late { background: var(--orange); }
.kiosk-result.dup { background: #2D5BE3; }
.kiosk-result.error { background: var(--danger); }
.kr-icon { font-size: 3.5rem; line-height: 1; margin-bottom: 10px; }
.kr-title { font-size: 1.9rem; font-weight: 800; }
.kr-sub { opacity: .9; margin-top: 4px; }
.kr-msg { margin-top: 12px; font-size: 1.15rem; font-weight: 600; }

/* ---------- Logo upload previews ---------- */
.logo-preview { width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: #fff; border: 1px solid var(--border); }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview.empty { border-style: dashed; color: var(--muted); font-size: 1.6rem; background: var(--neutral-50); }
