:root {
    --ink: #18212f;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --canvas: #f5f7fb;
    --brand: #8b1118;
    --brand-dark: #5d080d;
    --brand-soft: #f8ebec;
    --accent: #bd1f26;
    --success: #087a4b;
    --success-bg: #e9f9f1;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --warning: #9a6700;
    --warning-bg: #fff8db;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(16, 24, 40, .07);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    flex: 0 0 auto;
    border-bottom: 1px solid rgba(228, 231, 236, .9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
}
.topbar-inner { display: flex; width: min(1440px, 100%); min-height: 66px; align-items: center; gap: 16px; margin: 0 auto; padding: 9px max(14px, env(safe-area-inset-left)); }
.brand { display: flex; min-width: 0; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.brand-logo { display: block; width: clamp(130px, 38vw, 190px); height: auto; }
.brand-product { padding-left: 10px; border-left: 2px solid #d6d6da; color: var(--brand); font-size: .72rem; letter-spacing: .025em; line-height: 1.05; white-space: nowrap; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: white; background: var(--brand); }
.desktop-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.new-session-action { display: none; }
.user-menu { position: relative; }
.user-menu summary { display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 3px; border-radius: 13px; list-style: none; cursor: pointer; user-select: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: #f7f7f8; }
.user-avatar { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border: 1px solid #edc9cc; border-radius: 12px; color: var(--brand); background: var(--brand-soft); font-size: .88rem; font-weight: 850; }
.user-avatar.large { flex-basis: 42px; height: 42px; border-radius: 13px; }
.user-identity { display: none; min-width: 0; }
.user-identity strong, .user-menu-heading strong { display: block; max-width: 150px; overflow: hidden; color: var(--ink); font-size: .82rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small, .user-menu-heading small { display: block; margin-top: 2px; color: var(--muted); font-size: .68rem; }
.menu-chevron { display: none; width: 16px; height: 16px; color: var(--muted); fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform .2s ease; }
.user-menu[open] .menu-chevron { transform: rotate(180deg); }
.user-menu-panel { position: absolute; z-index: 50; top: calc(100% + 10px); right: 0; width: min(270px, calc(100vw - 28px)); padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 18px 50px rgba(16, 24, 40, .16); }
.user-menu-panel::before { position: absolute; top: -5px; right: 18px; width: 9px; height: 9px; content: ""; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: white; transform: rotate(45deg); }
.user-menu-heading { display: flex; align-items: center; gap: 10px; padding: 7px 7px 12px; border-bottom: 1px solid var(--line); }
.logout-button { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 10px; margin-top: 7px; padding: 9px 10px; border: 0; border-radius: 10px; color: var(--danger); background: transparent; font-weight: 750; cursor: pointer; }
.logout-button:hover { background: var(--danger-bg); }
.logout-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }

.page { width: min(1180px, 100%); flex: 1 0 auto; margin: 0 auto; padding: 22px 16px 92px; }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-heading h1 { margin: 0; font-size: clamp(1.55rem, 5vw, 2.1rem); line-height: 1.15; }
.page-heading p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 5px !important; color: var(--brand) !important; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    padding: 6px max(5px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -8px 28px rgba(16, 24, 40, .07);
    backdrop-filter: blur(12px);
}
.mobile-nav a { position: relative; display: flex; min-width: 0; min-height: 54px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 2px; border-radius: 11px; color: var(--muted); font-size: .66rem; font-weight: 750; }
.mobile-nav a > svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.mobile-nav a.active { color: var(--brand); background: var(--brand-soft); }
.mobile-nav a.active::after { position: absolute; top: 2px; width: 18px; height: 2px; content: ""; border-radius: 999px; background: var(--brand); }
.mobile-nav .mobile-create { overflow: visible; color: var(--brand); background: transparent; }
.mobile-nav .mobile-create.active { background: transparent; }
.mobile-nav .mobile-create-icon { display: grid; width: 44px; height: 44px; margin-top: -25px; place-items: center; border: 4px solid white; border-radius: 15px; color: white; background: var(--brand); box-shadow: 0 8px 18px rgba(139, 17, 24, .25); }
.mobile-nav .mobile-create-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.mobile-nav .mobile-create > span:last-child { margin-top: 1px; }

.grid { display: grid; gap: 16px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 1.2rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.stat { padding: 18px; border-radius: var(--radius); color: white; background: linear-gradient(135deg, var(--accent), var(--brand-dark)); box-shadow: var(--shadow); }
.stat:nth-child(2) { background: linear-gradient(135deg, #73747c, #4b4d55); }
.stat:nth-child(3) { background: linear-gradient(135deg, #a71820, #720b11); }
.stat-number { display: block; margin-top: 4px; font-size: 2rem; font-weight: 800; line-height: 1; }

.dashboard-page { width: min(1240px, 100%); }
.dashboard-heading { align-items: center; }
.dashboard-heading .eyebrow { margin-bottom: 7px !important; }
.dashboard-heading h1 { font-size: clamp(1.65rem, 5vw, 2.35rem); }
.dashboard-primary-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dashboard-metric { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; box-shadow: 0 7px 22px rgba(16, 24, 40, .045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.dashboard-metric:hover { color: var(--ink); border-color: #edc9cc; box-shadow: 0 12px 30px rgba(73, 19, 22, .09); transform: translateY(-2px); }
.dashboard-metric-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.dashboard-metric-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.dashboard-metric-icon.classes { color: #475467; background: #f2f4f7; }
.dashboard-metric-icon.live { color: var(--success); background: var(--success-bg); }
.dashboard-metric-icon.today { color: #9a6700; background: var(--warning-bg); }
.dashboard-live-dot { width: 13px; height: 13px; border: 3px solid currentColor; border-radius: 50%; box-shadow: 0 0 0 5px rgba(8, 122, 75, .12); }
.dashboard-metric-copy { display: flex; min-width: 0; flex-direction: column; }
.dashboard-metric-copy small { color: var(--muted); font-size: .7rem; font-weight: 750; }
.dashboard-metric-copy strong { margin: 2px 0; font-size: clamp(1.35rem, 4vw, 1.8rem); line-height: 1; }
.dashboard-metric-copy > span { overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-metric-arrow { display: none; color: #98a2b3; font-weight: 800; }
.dashboard-main-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.dashboard-schedule-card, .dashboard-actions-card, .dashboard-recent-card { padding: 0; overflow: hidden; }
.dashboard-card-head { align-items: flex-start; margin: 0; padding: 18px; border-bottom: 1px solid var(--line); }
.dashboard-card-head .eyebrow { margin-bottom: 4px !important; font-size: .66rem; }
.dashboard-card-head h2 { margin: 0; font-size: 1.08rem; }
.dashboard-card-head p:not(.eyebrow) { margin: 4px 0 0; color: var(--muted); font-size: .76rem; }
.dashboard-rate { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; }
.dashboard-rate strong { color: var(--brand); font-size: 1.35rem; line-height: 1; }
.dashboard-rate span { margin-top: 3px; color: var(--muted); font-size: .65rem; font-weight: 700; }
.dashboard-progress { height: 5px; border-radius: 0; }
.dashboard-session-list { display: grid; }
.dashboard-session-row { display: grid; grid-template-areas: "time main badge" "time count arrow"; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.dashboard-session-row:last-child { border-bottom: 0; }
.dashboard-session-row:hover { color: var(--ink); background: #fffafa; }
.dashboard-session-time { display: flex; grid-area: time; width: 46px; height: 48px; flex-direction: column; align-items: center; justify-content: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.dashboard-session-time strong { font-size: .86rem; line-height: 1; }
.dashboard-session-time small { margin-top: 4px; font-size: .58rem; font-weight: 850; }
.dashboard-session-main { display: flex; min-width: 0; grid-area: main; flex-direction: column; }
.dashboard-session-main strong, .dashboard-session-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-session-main strong { font-size: .84rem; }
.dashboard-session-main small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.dashboard-session-count { display: inline-flex; grid-area: count; align-items: baseline; gap: 4px; color: var(--ink); }
.dashboard-session-count strong { font-size: .76rem; }
.dashboard-session-count small { color: var(--muted); font-size: .65rem; }
.dashboard-session-row > .badge { grid-area: badge; justify-self: end; }
.dashboard-row-arrow { grid-area: arrow; color: #98a2b3; font-size: 1rem; }
.dashboard-empty { display: flex; min-height: 248px; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; color: var(--muted); text-align: center; }
.dashboard-empty-icon { display: grid; width: 52px; height: 52px; margin-bottom: 12px; place-items: center; border-radius: 15px; color: var(--brand); background: var(--brand-soft); }
.dashboard-empty-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.dashboard-empty strong { color: var(--ink); }
.dashboard-empty > span:not(.dashboard-empty-icon) { margin: 4px 0 14px; font-size: .8rem; }
.dashboard-action-list { display: grid; padding: 7px; }
.dashboard-action-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 63px; padding: 9px 10px; border-radius: 12px; color: var(--ink); }
.dashboard-action-list a:hover { color: var(--ink); background: var(--brand-soft); }
.dashboard-action-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--brand); background: white; }
.dashboard-action-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.dashboard-action-list a > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.dashboard-action-list strong, .dashboard-action-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-list strong { font-size: .8rem; }
.dashboard-action-list small { color: var(--muted); font-size: .68rem; }
.dashboard-action-list a > span:last-child { color: #98a2b3; }
.dashboard-recent-grid { display: grid; }
.dashboard-recent-grid > a { display: grid; min-width: 0; grid-template-columns: 43px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.dashboard-recent-grid > a:last-child { border-bottom: 0; }
.dashboard-recent-grid > a:hover { color: var(--ink); background: #fffafa; }
.dashboard-recent-date { display: flex; width: 42px; height: 45px; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.dashboard-recent-date strong { font-size: 1rem; line-height: 1; }
.dashboard-recent-date small { margin-top: 3px; font-size: .58rem; font-weight: 850; }
.dashboard-recent-main { display: flex; min-width: 0; flex-direction: column; }
.dashboard-recent-main strong, .dashboard-recent-main small, .dashboard-recent-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-recent-main strong { font-size: .82rem; }
.dashboard-recent-main small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.dashboard-recent-main > span { margin-top: 3px; color: var(--muted); font-size: .66rem; }

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: white;
    background: var(--brand);
    font-weight: 750;
    cursor: pointer;
}
.button:hover { color: white; background: var(--brand-dark); }
.button.secondary { border-color: var(--line); color: var(--ink); background: white; }
.button.secondary:hover { background: #f9fafb; }
.button.danger { background: var(--danger); }
.button.success { background: var(--success); }
.button.small { min-height: 38px; padding: 7px 11px; font-size: .88rem; }
.button.block { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form { display: inline; }

label { display: block; margin-bottom: 6px; color: #344054; font-size: .9rem; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    color: var(--ink);
    background: white;
    outline: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139, 17, 24, .14); }
.field { margin-bottom: 15px; }
.field-row { display: grid; gap: 14px; }
.help { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.required { color: var(--brand); font-size: .72rem; font-weight: 750; }
.optional { color: var(--muted); font-size: .72rem; font-weight: 650; }
.checkbox { display: flex; min-height: 44px; align-items: center; gap: 9px; }
.checkbox input { width: 20px; min-height: 20px; }

.alert { margin-bottom: 16px; padding: 13px 15px; border-radius: 12px; font-weight: 600; }
.alert.success { color: var(--success); background: var(--success-bg); }
.alert.error { color: var(--danger); background: var(--danger-bg); }
.alert.warning { color: var(--warning); background: var(--warning-bg); }
.alert ul { margin: 5px 0 0; padding-left: 20px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; color: #344054; background: #f2f4f7; font-size: .78rem; font-weight: 800; text-transform: capitalize; }
.badge.open, .badge.present, .badge.sent { color: var(--success); background: var(--success-bg); }
.badge.closed, .badge.failed { color: var(--danger); background: var(--danger-bg); }
.badge.scheduled, .badge.not_configured { color: var(--warning); background: var(--warning-bg); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #f9fafb; font-size: .78rem; letter-spacing: .03em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.text-small { font-size: .86rem; }
.empty { padding: 32px 18px; color: var(--muted); text-align: center; }
.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-main { min-width: 0; }
.list-main strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.list-main span { color: var(--muted); font-size: .86rem; }
.search-row { display: flex; gap: 8px; margin-bottom: 16px; }
.search-row input { flex: 1; }
details.form-drawer > summary { list-style: none; }
details.form-drawer > summary::-webkit-details-marker { display: none; }
details.form-drawer[open] > summary { margin-bottom: 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; padding: 0; list-style: none; }
.pagination li a { display: grid; min-width: 38px; min-height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; }

.students-page { width: min(1240px, 100%); }
.students-heading { margin-bottom: 18px; }
.heading-actions { align-items: center; }
.student-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.student-stat { display: flex; min-width: 0; flex-direction: column; padding: 15px; border: 1px solid #dfe3ea; border-radius: 15px; background: white; box-shadow: 0 6px 20px rgba(16, 24, 40, .04); }
.student-stat.active { border-color: #bee8d3; background: #f4fcf7; }
.student-stat.inactive { border-color: #ead5d6; background: #fffafb; }
.student-stat-label { color: var(--muted); font-size: .75rem; font-weight: 750; }
.student-stat strong { margin: 4px 0 2px; color: var(--ink); font-size: clamp(1.4rem, 4vw, 1.8rem); line-height: 1; }
.student-stat > span:last-child { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.student-tools-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.student-drawer { padding: 0; overflow: hidden; box-shadow: none; }
.student-drawer > summary { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; list-style: none; cursor: pointer; }
.student-drawer > summary::-webkit-details-marker { display: none; }
.student-drawer > summary:hover { background: #fcfcfd; }
.student-drawer > summary strong { display: block; color: var(--ink); }
.student-drawer > summary small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.drawer-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #ebc7ca; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: 1.3rem; font-weight: 500; transition: transform .2s ease; }
.student-drawer[open] .drawer-icon { transform: rotate(45deg); }
.student-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.student-form, .student-import-form { padding: 18px; }
.student-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; }
.student-form-actions p { margin: 0; color: var(--muted); font-size: .8rem; }
.student-form-actions a { font-size: .85rem; font-weight: 750; }
.student-import-form input[type="file"] { min-height: 48px; padding: 9px; font-size: .87rem; }
.student-import-form code { padding: 2px 4px; border-radius: 4px; color: #5d080d; background: var(--brand-soft); font-size: .78rem; }
.student-directory-card { padding: 0; overflow: hidden; }
.student-directory-head { align-items: flex-start; margin: 0; padding: 18px 18px 14px; }
.student-directory-head h2 { margin-bottom: 3px; }
.student-directory-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.directory-count { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #f2f4f7; font-size: .73rem; font-weight: 750; }
.student-filter-form { display: grid; gap: 10px; padding: 0 18px 18px; border-bottom: 1px solid var(--line); }
.student-search { min-width: 0; }
.student-filter-select { display: grid; gap: 6px; }
.student-filter-select label { margin: 0; font-size: .8rem; }
.student-filter-select select { min-height: 42px; }
.student-filter-form .button { min-height: 42px; }
.filter-reset { display: grid; min-height: 40px; place-items: center; color: var(--muted); font-size: .84rem; font-weight: 750; }
.filter-reset:hover { color: var(--brand); }
.student-records { display: grid; }
.student-record { display: grid; grid-template-areas: "avatar main" "avatar enrollment" "avatar actions"; grid-template-columns: 42px minmax(0, 1fr); gap: 9px 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.student-record:last-child { border-bottom: 0; }
.student-record:hover { background: #fcfcfd; }
.student-record.is-inactive { background: #fffdfd; }
.student-avatar { display: grid; grid-area: avatar; width: 42px; height: 42px; place-items: center; border: 1px solid #edc9cc; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: .9rem; font-weight: 850; }
.student-record-main { grid-area: main; min-width: 0; }
.student-name-row { display: flex; min-width: 0; align-items: center; gap: 7px; }
.student-name-row > strong { min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.student-number { display: block; margin-top: 2px; color: var(--brand); font-size: .78rem; font-weight: 780; }
.student-contact { display: grid; gap: 2px; margin-top: 6px; }
.student-contact a, .student-contact span { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.student-contact a:hover { color: var(--brand); text-decoration: underline; }
.student-enrollment { display: inline-flex; grid-area: enrollment; width: max-content; max-width: 100%; align-items: baseline; gap: 5px; padding: 4px 8px; border-radius: 8px; color: var(--muted); background: #f7f8fa; font-size: .76rem; white-space: nowrap; }
.student-enrollment strong { color: var(--ink); font-size: 1rem; }
.student-record-actions { display: flex; grid-area: actions; flex-wrap: wrap; gap: 7px; }
.student-record-actions form { margin: 0; }
.student-status-action { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 9px; color: var(--muted); background: #f2f4f7; font-size: .78rem; font-weight: 750; cursor: pointer; }
.student-status-action:hover { color: var(--danger); background: var(--danger-bg); }
.student-empty { display: grid; gap: 5px; min-height: 210px; place-content: center; }
.student-empty span, .empty span { display: block; margin-top: 5px; font-size: .86rem; }
.student-detail-grid { display: grid; gap: 16px; }
.student-edit-card, .student-enrollment-card { min-width: 0; }
.student-active-toggle { align-items: flex-start; padding: 12px; border: 1px solid #dfe3ea; border-radius: 12px; background: #fcfcfd; }
.student-active-toggle small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.student-edit-actions { margin-top: 18px; }
.student-enrollment-card { display: flex; flex-direction: column; }
.enrollment-list { display: grid; gap: 8px; margin-bottom: 16px; }
.enrollment-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.enrollment-item:hover { border-color: #edc9cc; background: #fffafa; }
.enrollment-item > span:first-child { min-width: 0; }
.enrollment-item strong, .enrollment-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enrollment-item strong { color: var(--ink); font-size: .84rem; }
.enrollment-item small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.student-enrollment-card > .button { margin-top: auto; }

.classes-page { width: min(1240px, 100%); }
.classes-heading { margin-bottom: 18px; }
.class-stats, .class-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.class-stat, .class-summary article { display: flex; min-width: 0; flex-direction: column; padding: 15px; border: 1px solid #dfe3ea; border-radius: 15px; background: white; box-shadow: 0 6px 20px rgba(16, 24, 40, .04); }
.class-stat.active { border-color: #bee8d3; background: #f4fcf7; }
.class-stat > span, .class-summary article > span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.class-stat strong, .class-summary article > strong { margin: 4px 0 2px; color: var(--ink); font-size: clamp(1.3rem, 4vw, 1.75rem); line-height: 1.1; }
.class-stat small, .class-summary article small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.class-drawer, .class-settings { padding: 0; overflow: hidden; margin-bottom: 16px; box-shadow: none; }
.class-drawer > summary, .class-settings > summary { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; list-style: none; cursor: pointer; }
.class-drawer > summary::-webkit-details-marker, .class-settings > summary::-webkit-details-marker { display: none; }
.class-drawer > summary:hover, .class-settings > summary:hover { background: #fcfcfd; }
.class-drawer > summary strong, .class-settings > summary strong { display: block; color: var(--ink); }
.class-drawer > summary small, .class-settings > summary small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.class-drawer[open] > summary, .class-settings[open] > summary { border-bottom: 1px solid var(--line); }
.class-drawer[open] .drawer-icon, .class-settings[open] .drawer-icon { transform: rotate(45deg); }
.class-drawer-body { padding: 18px; }
.class-form { padding: 18px; }
.class-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; }
.class-form-actions p { margin: 0; color: var(--muted); font-size: .8rem; }
.class-directory-card { padding: 0; overflow: hidden; }
.class-directory-head { align-items: flex-start; margin: 0; padding: 18px 18px 14px; }
.class-directory-head h2 { margin-bottom: 3px; }
.class-directory-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.class-filter-form { display: grid; gap: 10px; padding: 0 18px 18px; border-bottom: 1px solid var(--line); }
.class-search, .class-filter-select { min-width: 0; }
.class-filter-select { display: grid; gap: 6px; }
.class-filter-select label { margin: 0; font-size: .8rem; }
.class-filter-select select, .class-filter-form .button { min-height: 42px; }
.class-records { display: grid; }
.class-record { display: grid; grid-template-areas: "code main" "code metrics" "code actions"; grid-template-columns: 76px minmax(0, 1fr); gap: 9px 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.class-record:last-child { border-bottom: 0; }
.class-record:hover { background: #fcfcfd; }
.class-record.is-inactive { background: #fffdfd; }
.class-course-code { display: grid; grid-area: code; width: 76px; min-height: 42px; align-self: start; place-items: center; padding: 6px; border: 1px solid #edc9cc; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: .65rem; font-weight: 850; line-height: 1.15; overflow-wrap: normal; text-align: center; word-break: normal; }
.class-record-main { grid-area: main; min-width: 0; }
.class-name-row { display: flex; min-width: 0; align-items: center; gap: 7px; }
.class-name-row > strong { min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.class-course-name, .class-term { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.class-course-name { margin-top: 3px; }
.class-term { margin-top: 2px; color: var(--brand); font-weight: 700; }
.class-metrics { display: inline-flex; grid-area: metrics; width: max-content; max-width: 100%; gap: 6px; padding: 4px 8px; border-radius: 8px; color: var(--muted); background: #f7f8fa; font-size: .76rem; white-space: nowrap; }
.class-metrics span + span::before { margin-right: 6px; content: "·"; color: #c4c8d0; }
.class-metrics strong { color: var(--ink); font-size: .95rem; }
.class-record-actions { display: flex; grid-area: actions; flex-wrap: wrap; gap: 7px; }
.class-record-actions form { margin: 0; }
.class-status-action { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 9px; color: var(--muted); background: #f2f4f7; font-size: .78rem; font-weight: 750; cursor: pointer; }
.class-status-action:hover { color: var(--danger); background: var(--danger-bg); }
.class-empty { display: grid; gap: 5px; min-height: 210px; place-content: center; }
.class-detail-page { width: min(1240px, 100%); }
.class-detail-heading { margin-bottom: 18px; }
.class-workspace-grid { display: grid; gap: 16px; }
.roster-card, .class-side-stack { min-width: 0; }
.roster-list { display: grid; }
.roster-item { display: grid; grid-template-areas: "avatar main action"; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.roster-item:last-child { border-bottom: 0; }
.roster-item .student-avatar { grid-area: avatar; width: 38px; height: 38px; border-radius: 11px; }
.roster-main { grid-area: main; min-width: 0; }
.roster-main strong, .roster-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-main strong { color: var(--ink); font-size: .87rem; }
.roster-main small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.roster-remove { min-height: 36px; padding: 7px 8px; border: 0; border-radius: 9px; color: var(--danger); background: var(--danger-bg); font-size: .76rem; font-weight: 750; cursor: pointer; }
.roster-item form { grid-area: action; margin: 0; }
.roster-remove:hover { background: #ffdfdc; }
.class-side-stack { display: grid; gap: 16px; align-content: start; }
.enroll-card .empty, .recent-class-sessions .empty { min-height: 126px; }
.class-active-toggle { align-items: flex-start; padding: 12px; border: 1px solid #dfe3ea; border-radius: 12px; background: #fcfcfd; }
.class-active-toggle small { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.class-settings { margin: 0; }
.class-settings-actions { margin-top: 17px; }
.recent-class-sessions { min-width: 0; }
.recent-session-list { display: grid; gap: 7px; }
.recent-session-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.recent-session-list a:hover { border-color: #edc9cc; background: #fffafa; }
.recent-session-list a > span:first-child { min-width: 0; }
.recent-session-list strong, .recent-session-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-session-list strong { color: var(--ink); font-size: .83rem; }
.recent-session-list small { margin-top: 3px; color: var(--muted); font-size: .74rem; }

.sessions-page, .session-detail-page { width: min(1240px, 100%); }
.sessions-heading, .session-detail-heading { margin-bottom: 18px; }
.session-stats, .session-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.session-stats article, .session-detail-stats article { display: flex; min-width: 0; flex-direction: column; padding: 15px; border: 1px solid #dfe3ea; border-radius: 15px; background: white; box-shadow: 0 6px 20px rgba(16, 24, 40, .04); }
.session-stats article.open { border-color: #bee8d3; background: #f4fcf7; }
.session-stats span, .session-detail-stats span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.session-stats strong, .session-detail-stats strong { margin: 4px 0 2px; color: var(--ink); font-size: clamp(1.3rem, 4vw, 1.75rem); line-height: 1.1; }
.session-stats small, .session-detail-stats small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.session-directory-card { padding: 0; overflow: hidden; }
.session-directory-head { align-items: flex-start; margin: 0; padding: 18px 18px 14px; }
.session-directory-head h2 { margin-bottom: 3px; }
.session-directory-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.session-filter-form { display: grid; gap: 10px; padding: 0 18px 18px; border-bottom: 1px solid var(--line); }
.session-search, .session-filter-select { min-width: 0; }
.session-filter-select { display: grid; gap: 6px; }
.session-filter-select label { margin: 0; font-size: .8rem; }
.session-filter-select select, .session-filter-form .button { min-height: 42px; }
.session-records { display: grid; }
.session-record { display: grid; grid-template-areas: "date main" "date attendance" "date action"; grid-template-columns: 48px minmax(0, 1fr); gap: 9px 11px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.session-record:last-child { border-bottom: 0; }
.session-record:hover { background: #fcfcfd; }
.session-date { display: flex; grid-area: date; min-height: 48px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #edc9cc; border-radius: 13px; color: var(--brand); background: var(--brand-soft); }
.session-date strong { font-size: 1.1rem; line-height: 1; }
.session-date small { margin-top: 3px; font-size: .62rem; font-weight: 850; letter-spacing: .06em; }
.session-record-main { display: grid; grid-area: main; min-width: 0; }
.session-title-row { display: flex; min-width: 0; align-items: center; gap: 7px; }
.session-title-row > strong { min-width: 0; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.session-class, .session-time { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.session-class { margin-top: 3px; }
.session-time { margin-top: 2px; }
.session-attendance { display: inline-grid; grid-area: attendance; grid-template-columns: auto auto; width: max-content; max-width: 100%; column-gap: 4px; padding: 5px 8px; border-radius: 9px; background: #f7f8fa; }
.session-attendance > strong { grid-row: span 2; align-self: center; color: var(--ink); font-size: 1rem; }
.session-attendance strong small { color: var(--muted); font-size: .72rem; font-weight: 650; }
.session-attendance > span:not(.session-mini-progress) { color: var(--muted); font-size: .7rem; }
.session-mini-progress { grid-column: 2; width: 54px; height: 4px; overflow: hidden; border-radius: 999px; background: #e1e4ea; }
.session-mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.session-record-action { display: inline-flex; grid-area: action; width: max-content; align-items: center; gap: 5px; color: var(--brand); font-size: .78rem; font-weight: 800; }
.session-empty { display: grid; gap: 5px; min-height: 210px; place-content: center; }
.session-create-page { width: min(1050px, 100%); }
.session-create-grid { display: grid; gap: 16px; }
.session-create-card, .session-create-guide { min-width: 0; }
.session-form { padding: 2px; }
.session-policy { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; padding: 13px; border-radius: 12px; color: #624b00; background: #fff8db; }
.session-policy > span { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 50%; color: white; background: var(--warning); font-size: .72rem; font-weight: 900; }
.session-policy p { margin: 0; font-size: .84rem; }
.session-create-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.session-create-actions a { font-size: .85rem; font-weight: 750; }
.session-create-guide { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-content: start; gap: 8px 12px; }
.guide-number { display: grid; width: 30px; height: 30px; grid-row: span 2; place-items: center; border: 1px solid #edc9cc; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: .84rem; font-weight: 850; }
.session-create-guide h2 { margin: 2px 0 0; font-size: .95rem; }
.session-create-guide p { margin: 0 0 12px; color: var(--muted); font-size: .82rem; }
.session-control-card { display: grid; gap: 20px; }
.session-qr-panel { display: grid; place-items: center; color: var(--ink); text-align: center; }
.qr-frame { width: min(100%, 310px); padding: 12px; border: 1px solid #ead5d6; border-radius: 18px; background: #fffafa; }
.qr-frame img { display: block; width: 100%; height: auto; border-radius: 9px; image-rendering: crisp-edges; }
.session-qr-panel > strong { margin-top: 12px; }
.session-qr-panel > span { margin-top: 2px; color: var(--muted); font-size: .8rem; }
.session-control-main { min-width: 0; }
.session-window { display: grid; gap: 8px; }
.session-window > div { padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.session-window span, .session-attendance-summary > div:first-child > span { display: block; color: var(--muted); font-size: .74rem; }
.session-window strong { display: block; margin-top: 3px; color: var(--ink); font-size: .9rem; }
.session-attendance-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 10px; }
.session-attendance-summary > div:first-child > strong { display: inline-block; margin: 2px 4px 0 0; color: var(--ink); font-size: 2rem; line-height: 1; }
.session-attendance-summary > div:first-child > small { color: var(--muted); font-size: .8rem; }
.session-attendance-summary #total-count { display: inline; color: inherit; font-size: inherit; }
.attendance-percent { min-width: 72px; padding: 9px; border-radius: 12px; color: var(--brand); background: var(--brand-soft); text-align: center; }
.attendance-percent strong { display: block; font-size: 1.15rem; line-height: 1; }
.attendance-percent span { margin-top: 3px; font-size: .67rem; font-weight: 750; }
.session-progress { height: 11px; }
.session-control-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.session-control-actions form { margin: 0; }
.session-roster-card { padding: 0; overflow: hidden; }
.session-roster-head { align-items: flex-start; margin: 0; padding: 18px 18px 14px; }
.session-roster-head h2 { margin-bottom: 3px; }
.session-roster-head p { margin: 0; color: var(--muted); font-size: .83rem; }
.session-roster-records { display: grid; }
.session-roster-record { display: grid; grid-template-areas: "avatar main" "avatar status" "link link" "actions actions"; grid-template-columns: 42px minmax(0, 1fr); gap: 8px 11px; padding: 15px 18px; border-top: 1px solid var(--line); }
.session-roster-record .student-avatar { grid-area: avatar; }
.session-roster-main { display: grid; grid-area: main; min-width: 0; }
.session-roster-main strong, .session-roster-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-roster-main strong { color: var(--ink); font-size: .88rem; }
.session-roster-main small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.session-roster-status { display: flex; grid-area: status; flex-wrap: wrap; align-items: center; gap: 6px; }
.session-roster-status small { color: var(--muted); font-size: .72rem; }
.session-link-tools { display: grid; grid-area: link; gap: 4px; min-width: 0; }
.session-link-tools small { color: var(--muted); font-size: .72rem; }
.session-link-tools .copy-input { min-width: 0; }
.session-roster-actions { display: flex; grid-area: actions; flex-wrap: wrap; gap: 7px; }
.session-roster-actions form { margin: 0; }
.session-resend { min-height: 38px; padding: 7px 9px; border: 0; border-radius: 9px; color: var(--muted); background: #f2f4f7; font-size: .78rem; font-weight: 750; cursor: pointer; }
.session-resend:hover { color: var(--brand); background: var(--brand-soft); }
.roster-delivery { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.delivery-pill { display: inline-flex; width: max-content; max-width: 100%; align-items: center; padding: 3px 7px; border-radius: 999px; color: #667085; background: #f2f4f7; font-size: .63rem; font-weight: 800; line-height: 1.35; }
.delivery-pill.sent { color: #087a4b; background: var(--success-bg); }
.delivery-pill.partial { color: #9a6700; background: var(--warning-bg); }
.delivery-pill.failed, .delivery-pill.error { color: var(--danger); background: var(--danger-bg); }
.delivery-pill.not-configured { color: #9a6700; background: var(--warning-bg); }
.delivery-pill.pending { color: #667085; background: #f2f4f7; }
.student-picker-card, .notification-center { margin-bottom: 16px; padding: 0; overflow: hidden; }
.student-picker-card { background: white; }
.student-picker-summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 17px 18px; cursor: pointer; list-style: none; }
.student-picker-summary::-webkit-details-marker { display: none; }
.student-picker-summary-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: white; background: var(--brand); font-size: 1.35rem; font-weight: 700; box-shadow: 0 7px 16px rgba(139, 17, 24, .17); }
.student-picker-summary > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.student-picker-summary strong { color: var(--ink); font-size: .96rem; }
.student-picker-summary small { color: var(--muted); font-size: .76rem; }
.student-picker-card[open] .student-picker-summary { border-bottom: 1px solid var(--line); }
.student-picker-content { padding: 18px; }
.student-picker-content form, .class-enroll-form, .class-import-form { margin: 0; }
.student-picker-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.picker-search { min-width: 190px; flex: 1; }
.picker-search input { min-height: 42px; margin: 0; }
.picker-select-all { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 750; cursor: pointer; }
.picker-select-all input, .student-option > input { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--brand); }
.student-option-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 310px; overflow-y: auto; padding: 2px; }
.student-option-list.compact { grid-template-columns: 1fr; max-height: 270px; }
.student-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fcfcfd; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.student-option:hover, .student-option:has(input:checked) { border-color: #dcaeb2; background: var(--brand-soft); }
.student-option > span:last-child { display: grid; min-width: 0; gap: 2px; }
.student-option strong, .student-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-option strong { color: var(--ink); font-size: .8rem; }
.student-option small { color: var(--muted); font-size: .69rem; }
.student-option-check { display: none; }
.student-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.student-picker-footer > span { color: var(--muted); font-size: .76rem; }
.student-picker-footer > span strong { color: var(--ink); }
.picker-empty { display: grid; min-height: 130px; place-content: center; justify-items: center; gap: 4px; color: var(--muted); text-align: center; }
.picker-empty strong { color: var(--ink); font-size: .88rem; }
.picker-empty span { max-width: 440px; font-size: .75rem; }
.picker-empty .button { margin-top: 9px; }
.class-import-drawer { margin-top: 15px; border-top: 1px solid var(--line); }
.class-import-drawer > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0 0; cursor: pointer; list-style: none; }
.class-import-drawer > summary::-webkit-details-marker { display: none; }
.class-import-drawer > summary > span:first-child { display: grid; gap: 2px; }
.class-import-drawer > summary strong { font-size: .83rem; }
.class-import-drawer > summary small { color: var(--muted); font-size: .7rem; }
.class-import-form { display: grid; gap: 12px; padding-top: 14px; }
.class-import-form input[type="file"] { min-height: 46px; padding: 8px; font-size: .8rem; }
.class-import-form .field small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.class-import-form code { color: var(--brand); background: var(--brand-soft); }
.class-import-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.notification-head { align-items: flex-start; margin: 0; padding: 18px; border-bottom: 1px solid var(--line); }
.notification-head h2 { margin: 0 0 3px; font-size: 1.08rem; }
.notification-head p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .8rem; }
.notification-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-bottom: 1px solid var(--line); background: var(--line); }
.notification-overview article { display: flex; min-width: 0; flex-direction: column; padding: 15px 18px; background: white; }
.notification-overview span { color: var(--muted); font-size: .69rem; font-weight: 750; }
.notification-overview strong { margin: 3px 0; color: var(--ink); font-size: 1.45rem; line-height: 1; }
.notification-overview small { overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-overview .email strong, .notification-overview .sms strong { color: var(--success); }
.notification-overview .failed strong { color: var(--danger); }
.notification-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); background: #fcfcfd; }
.notification-toolbar > div:first-child { display: grid; min-width: min(100%, 280px); gap: 2px; }
.notification-toolbar strong { font-size: .88rem; }
.notification-toolbar span { color: var(--muted); font-size: .74rem; }
.notification-progress { margin: 18px; padding: 15px; border: 1px solid #edc9cc; border-radius: 13px; background: #fffafa; }
.notification-progress.complete { border-color: #bee8d3; background: #f4fcf7; }
.notification-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.notification-progress strong { font-size: .84rem; }
.notification-progress span { color: var(--muted); font-size: .72rem; }
.notification-progress .progress-track { height: 8px; }
.notification-progress p { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.notification-log-section { min-width: 0; }
.notification-log-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; cursor: pointer; list-style: none; }
.notification-log-heading::-webkit-details-marker { display: none; }
.notification-log-heading h3 { margin: 0; font-size: .95rem; }
.notification-log-heading p { margin: 2px 0 0; color: var(--muted); font-size: .72rem; }
.notification-log-summary-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.notification-log-section[open] .notification-log-heading { border-bottom: 1px solid var(--line); }
.notification-log-section[open] .drawer-icon, .student-picker-card[open] .drawer-icon, .class-import-drawer[open] .drawer-icon { transform: rotate(45deg); }
.notification-log-empty { display: grid; min-height: 110px; place-content: center; padding: 20px; color: var(--muted); text-align: center; }
.notification-log-empty strong { color: var(--ink); font-size: .86rem; }
.notification-log-empty span { margin-top: 3px; font-size: .72rem; }
.notification-log-list { display: grid; max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line); }
.notification-log-list article { display: grid; grid-template-areas: "avatar person status" "message message time"; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 7px 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.notification-log-list article:last-child { border-bottom: 0; }
.notification-log-avatar { display: grid; grid-area: avatar; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--brand); background: var(--brand-soft); font-size: .78rem; font-weight: 900; }
.notification-log-person { display: grid; grid-area: person; min-width: 0; gap: 1px; }
.notification-log-person strong, .notification-log-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-log-person strong { font-size: .78rem; }
.notification-log-person small { color: var(--muted); font-size: .67rem; }
.notification-log-list .delivery-pill { grid-area: status; justify-self: end; }
.notification-log-message { grid-area: message; overflow: hidden; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-log-list time { grid-area: time; color: var(--muted); font-size: .64rem; white-space: nowrap; }

.auth-shell { display: grid; flex: 1 0 auto; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, #f8e5e7, transparent 34%), var(--canvas); }
.auth-card { width: min(440px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.auth-brand img { display: block; width: min(220px, 70%); height: auto; }
.auth-brand strong { color: var(--brand); font-size: 1rem; text-align: right; }
.auth-card h1 { margin: 0 0 6px; font-size: 1.65rem; }
.auth-card > p { margin-top: 0; color: var(--muted); }

.login-card { display: grid; grid-template-columns: minmax(0, 1fr); width: min(940px, 100%); min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid rgba(139, 17, 24, .1); border-radius: 24px; background: white; box-shadow: 0 24px 70px rgba(73, 19, 22, .12); }
.login-intro { position: relative; display: flex; min-height: 250px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 30px; color: white; background: linear-gradient(145deg, #a6161f 0%, var(--brand) 45%, var(--brand-dark) 100%); }
.login-intro::before, .login-intro::after { position: absolute; content: ""; border: 1px solid rgba(255, 255, 255, .14); border-radius: 50%; }
.login-intro::before { width: 280px; height: 280px; right: -120px; top: -110px; }
.login-intro::after { width: 190px; height: 190px; right: 40px; bottom: -125px; }
.login-logo { position: relative; z-index: 1; width: min(250px, 82%); padding: 11px 13px; border-radius: 12px; background: white; box-shadow: 0 8px 24px rgba(64, 0, 5, .16); }
.login-logo img { display: block; width: 100%; height: auto; }
.login-message { position: relative; z-index: 1; max-width: 360px; }
.login-kicker { display: inline-block; margin-bottom: 10px; font-size: .75rem; font-weight: 800; letter-spacing: .11em; opacity: .82; text-transform: uppercase; }
.login-message h2 { margin: 0 0 10px; font-size: clamp(1.75rem, 4vw, 2.35rem); line-height: 1.1; }
.login-message p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .93rem; }
.login-product { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin-top: 24px; font-size: .88rem; font-weight: 750; }
.login-product::before { width: 8px; height: 8px; content: ""; border: 3px solid rgba(255, 255, 255, .45); border-radius: 50%; background: white; }
.login-form-panel { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(28px, 6vw, 54px); }
.login-form-panel form { min-width: 0; }
.login-form-panel .eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.login-form-panel h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 4vw, 2.2rem); line-height: 1.15; }
.login-form-panel .login-subtitle { margin: 0 0 26px; color: var(--muted); }
.login-form-panel .field { margin-bottom: 17px; }
.login-form-panel label { color: var(--ink); }
.login-form-panel input { min-height: 50px; padding-inline: 14px; border-color: #d6dae1; background: #fcfcfd; }
.login-form-panel input:hover { border-color: #aeb4bf; }
.login-form-panel .button { min-height: 50px; margin-top: 5px; border-radius: 12px; box-shadow: 0 8px 20px rgba(139, 17, 24, .18); }
.login-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 17px 0 0; color: var(--muted); font-size: .78rem; }
.login-security::before { content: "\2713"; display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-bg); font-size: .68rem; font-weight: 900; }

.session-hero { display: grid; gap: 16px; }
.qr-panel { display: grid; place-items: center; padding: 18px; border-radius: 16px; background: white; }
.qr-panel img { display: block; width: min(100%, 520px); height: auto; image-rendering: crisp-edges; }
.session-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); }
.progress-track { width: 100%; height: 10px; overflow: hidden; border-radius: 999px; background: #eaecf0; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--success); transition: width .3s ease; }
.copy-input { display: flex; gap: 6px; min-width: 280px; }
.copy-input input { min-height: 38px; padding: 7px 9px; font-size: .78rem; }

.public-page { flex: 1 0 auto; overflow-x: hidden; padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); background: #f7eeee; }
.public-card { width: min(560px, calc(100vw - 32px)); max-width: 100%; margin: 0 auto; overflow: hidden; border-radius: 22px; background: white; box-shadow: 0 18px 50px rgba(73, 19, 22, .13); }
.public-head { padding: 20px 22px 22px; color: white; background: linear-gradient(135deg, var(--accent), var(--brand-dark)); }
.public-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 17px; padding: 9px 11px; border-radius: 11px; color: var(--brand); background: white; }
.public-brand img { display: block; width: min(190px, 68%); height: auto; }
.public-brand strong { font-size: .9rem; white-space: nowrap; }
.public-head h1 { margin: 5px 0; font-size: 1.55rem; }
.public-head p { margin: 0; opacity: .85; }
.public-body { min-width: 0; overflow: hidden; padding: 20px; }
.identity { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding: 13px; border-radius: 13px; background: var(--brand-soft); }
.avatar { display: grid; flex: 0 0 44px; height: 44px; place-items: center; border-radius: 50%; color: white; background: var(--brand); font-weight: 800; }
.scanner-shell { position: relative; overflow: hidden; border: 2px solid #d0d5dd; border-radius: 16px; background: #101828; }
#qr-reader { width: 100%; max-width: 100%; border: 0 !important; }
#qr-reader * { max-width: 100%; }
#qr-reader video { display: block; width: 100% !important; min-height: 250px; height: auto !important; max-height: 480px !important; object-fit: cover; }
#qr-reader canvas { max-width: 100% !important; }
.scanner-guide { position: absolute; z-index: 2; inset: 5%; border: 2px solid rgba(255, 255, 255, .82); border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 999px rgba(16, 24, 40, .08), inset 0 0 18px rgba(255, 255, 255, .08); }
.scanner-guide::before, .scanner-guide::after { position: absolute; width: 42px; height: 42px; content: ""; border-color: white; }
.scanner-guide::before { left: -3px; top: -3px; border-left: 4px solid; border-top: 4px solid; border-radius: 16px 0 0; }
.scanner-guide::after { right: -3px; bottom: -3px; border-right: 4px solid; border-bottom: 4px solid; border-radius: 0 0 16px; }
.scan-status { margin-top: 14px; padding: 14px; border-radius: 12px; color: #344054; background: #f2f4f7; text-align: center; }
.scan-status.success { color: var(--success); background: var(--success-bg); }
.scan-status.error { color: var(--danger); background: var(--danger-bg); }
.success-icon { display: grid; width: 72px; height: 72px; margin: 10px auto 16px; place-items: center; border-radius: 50%; color: white; background: var(--success); font-size: 2rem; font-weight: 900; }
.center { text-align: center; }

.student-attendance-page { display: flex; align-items: center; }
.student-attendance-card { width: min(660px, calc(100vw - 32px)); margin-block: auto; }
.student-attendance-head { position: relative; padding-bottom: 25px; }
.public-eyebrow { margin: 0 0 7px; color: inherit; font-size: .69rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.student-attendance-head .session-date { margin-top: 10px; font-size: .82rem; }
.student-identity > span:last-child { display: grid; min-width: 0; gap: 2px; }
.student-identity small { color: var(--muted); font-size: .71rem; font-weight: 700; }
.student-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-identity .text-small { display: block; }
.scan-intro { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.scan-intro h2 { margin: 0 0 6px; font-size: 1.25rem; }
.scan-intro .muted { margin: 0; }
.scan-intro .public-eyebrow { color: var(--brand); }
.session-state { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; color: #475467; background: #f2f4f7; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.session-state.open { color: #167044; background: var(--success-bg); }
.session-state.waiting { color: #9b5a00; background: #fff5dc; }
.session-state.closed { color: var(--danger); background: var(--danger-bg); }
.scan-steps { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.scan-steps li { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid #eceef2; border-radius: 11px; background: #fcfcfd; }
.scan-steps li > span { display: grid; flex: 0 0 26px; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: .74rem; font-weight: 850; }
.scan-steps li div { display: grid; gap: 1px; }
.scan-steps strong { font-size: .82rem; }
.scan-steps small { color: var(--muted); font-size: .72rem; }
.scanner-unavailable { margin-bottom: 14px; padding: 13px; border: 1px solid #f5c9cb; border-radius: 12px; color: #9d1f25; background: #fff3f3; font-size: .85rem; line-height: 1.45; }
.scanner-camera-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfd; }
.scanner-camera-control label { margin: 0; color: var(--ink); font-size: .76rem; font-weight: 800; }
.scanner-camera-control select { min-width: 0; min-height: 42px; margin: 0; padding-block: 7px; background-color: white; font-size: .8rem; }
.scanner-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.scanner-actions .button { min-height: 40px; }
.scanner-help { margin: 12px 4px 0; color: var(--muted); font-size: .76rem; line-height: 1.55; text-align: center; }
.scanner-help strong { color: var(--ink); }
.attendance-complete { padding: 10px 0 2px; }
.success-text { color: var(--success); }

.site-footer { flex: 0 0 auto; margin-top: auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); background: white; text-align: center; }
.site-footer p { display: inline; margin: 0; font-size: .75rem; }
.site-footer p + p::before { margin: 0 7px; content: "\2022"; color: #c4c8d0; }
.site-footer a { color: var(--brand); font-weight: 800; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 2px; }
.site-footer.with-nav { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

@media (min-width: 720px) {
    .page { padding: 30px 24px 92px; }
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-filter-form { grid-template-columns: minmax(210px, 1.5fr) minmax(145px, .7fr) minmax(145px, .7fr) auto auto; align-items: end; }
    .student-filter-select { display: block; }
    .student-filter-select label { display: block; margin-bottom: 6px; }
    .student-record { grid-template-areas: "avatar main enrollment actions"; grid-template-columns: 42px minmax(0, 1fr) minmax(92px, auto) auto; align-items: center; }
    .student-contact { display: flex; flex-wrap: wrap; gap: 3px 14px; }
    .student-contact a + a::before, .student-contact a + span::before { margin-right: 14px; content: "·"; color: #c4c8d0; }
    .student-enrollment { justify-content: flex-end; }
    .student-record-actions { justify-content: flex-end; }
    .student-detail-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); align-items: start; }
    .class-filter-form { grid-template-columns: minmax(210px, 1.4fr) minmax(130px, .6fr) minmax(140px, .65fr) minmax(145px, .7fr) auto auto; align-items: end; }
    .class-filter-select { display: block; }
    .class-filter-select label { display: block; margin-bottom: 6px; }
    .class-record { grid-template-areas: "code main metrics actions"; grid-template-columns: 76px minmax(0, 1fr) minmax(150px, auto) auto; align-items: center; }
    .class-metrics { justify-content: flex-end; }
    .class-record-actions { justify-content: flex-end; }
    .class-workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); align-items: start; }
    .session-filter-form { grid-template-columns: minmax(210px, 1.35fr) minmax(125px, .55fr) minmax(130px, .6fr) minmax(145px, .65fr) auto auto; align-items: end; }
    .session-filter-select { display: block; }
    .session-filter-select label { display: block; margin-bottom: 6px; }
    .session-record { grid-template-areas: "date main attendance action"; grid-template-columns: 48px minmax(0, 1fr) minmax(120px, auto) auto; align-items: center; }
    .session-attendance { justify-self: end; }
    .session-record-action { justify-self: end; }
    .session-create-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: start; }
    .session-control-card { grid-template-columns: minmax(260px, .75fr) minmax(320px, 1.25fr); align-items: center; }
    .session-window { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .session-roster-record { grid-template-areas: "avatar main status link actions"; grid-template-columns: 42px minmax(170px, 1fr) minmax(115px, auto) minmax(250px, 1.3fr) auto; align-items: center; }
    .session-roster-actions { justify-content: flex-end; }
    .notification-overview { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .notification-log-list article { grid-template-areas: "avatar person status message time"; grid-template-columns: 38px minmax(170px, .8fr) auto minmax(180px, 1fr) auto; gap: 12px; }
    .login-card { grid-template-columns: minmax(300px, .9fr) minmax(390px, 1.1fr); }
    .login-intro { min-height: 540px; padding: 38px; }
    .session-hero { grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr); align-items: center; }
    .dashboard-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
    .dashboard-metric { grid-template-columns: auto minmax(0, 1fr) auto; padding: 17px; }
    .dashboard-metric-arrow { display: inline; }
    .dashboard-session-row { grid-template-areas: "time main count badge arrow"; grid-template-columns: 50px minmax(0, 1fr) auto auto auto; gap: 12px; }
    .dashboard-recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-recent-grid > a:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
    .dashboard-recent-grid > a:nth-child(odd) { border-right: 1px solid var(--line); }
}

@media (min-width: 920px) {
    .dashboard-main-grid { grid-template-columns: minmax(0, 1.6fr) minmax(290px, .7fr); align-items: start; }
}

@media (min-width: 1180px) {
    .topbar-inner { min-height: 72px; gap: 20px; padding: 10px 24px; }
    .brand-logo { width: clamp(155px, 14vw, 185px); }
    .brand-product { font-size: .78rem; }
    .desktop-nav { display: flex; align-items: center; gap: 3px; margin-left: auto; }
    .desktop-nav a { position: relative; display: flex; min-height: 42px; align-items: center; gap: 7px; padding: 9px 11px; border-radius: 11px; color: var(--muted); font-size: .79rem; font-weight: 750; }
    .desktop-nav a:hover { color: var(--ink); background: #f7f7f8; }
    .desktop-nav a.active { color: var(--brand); background: var(--brand-soft); }
    .desktop-nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
    .new-session-action { display: flex; min-height: 42px; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 11px; color: white; background: var(--brand); font-size: .8rem; font-weight: 800; box-shadow: 0 7px 17px rgba(139, 17, 24, .16); }
    .new-session-action:hover { color: white; background: var(--brand-dark); }
    .new-session-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
    .user-menu summary { padding: 3px 7px 3px 3px; }
    .user-identity, .menu-chevron { display: block; }
    .mobile-nav { display: none; }
    .page { padding-bottom: 50px; }
    .site-footer.with-nav { padding-bottom: 10px; }
}

@media (max-width: 560px) {
    .auth-shell { padding: 14px; }
    .login-card { border-radius: 19px; }
    .login-intro { display: block; min-height: 0; padding: 18px 20px 16px; }
    .login-logo { width: 205px; padding: 8px 10px; }
    .login-message { display: none; }
    .login-product { margin-top: 13px; }
    .login-form-panel { padding: 26px 22px 28px; }
    .login-form-panel .login-subtitle { margin-bottom: 22px; }
    .site-footer { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
    .site-footer p { display: block; font-size: .68rem; line-height: 1.45; }
    .site-footer p + p::before { display: none; }
    .student-attendance-page { padding-inline: 12px; }
    .student-attendance-card { width: min(560px, calc(100vw - 24px)); border-radius: 18px; }
    .public-head, .public-body { padding-inline: 16px; }
    .public-brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; justify-content: initial; }
    .public-brand img { width: min(172px, 100%); }
    .public-brand strong { font-size: .76rem; }
    .scan-intro { gap: 10px; }
    .session-state { max-width: 132px; white-space: normal; text-align: center; line-height: 1.25; }
    .scanner-panel { margin-inline: -5px; }
    .scanner-camera-control { grid-template-columns: 1fr; gap: 5px; padding: 9px; }
    #qr-reader video { min-height: 260px; }
    .notification-head { gap: 12px; }
    .notification-toolbar .actions, .notification-toolbar .button { width: 100%; }
    .student-picker-summary { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 15px; }
    .student-picker-summary-icon { width: 38px; height: 38px; }
    .student-picker-summary .directory-count { display: none; }
    .student-picker-content { padding: 15px; }
    .student-picker-toolbar { align-items: stretch; flex-direction: column; }
    .picker-select-all { min-height: 36px; }
    .student-option-list { grid-template-columns: 1fr; }
    .student-picker-footer { align-items: stretch; flex-direction: column; }
    .student-picker-footer .button { width: 100%; }
    .notification-toolbar .actions { display: grid; grid-template-columns: 1fr; }
    .notification-progress > div:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
    .dashboard-heading .dashboard-primary-action { width: 100%; }
    .dashboard-metric { padding: 12px; }
    .dashboard-metric-icon { width: 36px; height: 36px; }
    .dashboard-card-head { padding: 16px; }
    .dashboard-session-row, .dashboard-recent-grid > a { padding-inline: 15px; }
}

@media (max-width: 420px) {
    .students-heading .heading-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .students-heading .heading-actions > a, .students-heading .heading-actions > button { width: 100%; padding-inline: 8px; }
    .students-heading .heading-actions > button { grid-column: 1 / -1; }
    .classes-heading .heading-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
    .classes-heading .heading-actions > a, .classes-heading .heading-actions > button { width: 100%; }
}

@media print {
    .topbar, .mobile-nav, .no-print, .alert { display: none !important; }
    .page { width: 100%; padding: 0; }
    .card { border: 0; box-shadow: none; }
    .session-hero { display: block; }
    .qr-panel img { width: 75vh; max-width: 760px; margin: auto; }
}
