:root {
    --blue-900: #064c75;
    --blue-700: #087fbd;
    --blue-600: #0797d5;
    --blue-100: #e7f5fc;
    --red: #ef171f;
    --yellow: #ffdf17;
    --ink: #202733;
    --muted: #687386;
    --line: #dde4ec;
    --surface: #ffffff;
    --canvas: #f3f7fa;
    --success: #17875b;
    --danger: #c73737;
    --warning: #a56800;
    --shadow: 0 10px 30px rgba(23, 54, 78, .08);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: 258px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 15% 85%, rgba(255,223,23,.18), transparent 27%),
        linear-gradient(168deg, #075e8d 0%, #073f63 66%, #052f4c 100%);
    box-shadow: 12px 0 30px rgba(4, 53, 82, .12);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 15px 20px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 3px;
}
.brand span { min-width: 0; }
.brand strong { display: block; letter-spacing: .8px; font-size: 16px; }
.brand small { display: block; color: rgba(255,255,255,.7); font-size: 11px; }
.main-nav { flex: 1; padding: 21px 14px; }
.nav-heading { margin: 0 12px 10px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 800; letter-spacing: 1.35px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 5px 0;
    padding: 11px 12px;
    color: rgba(255,255,255,.78);
    font-weight: 650;
    text-decoration: none;
    border-radius: 11px;
    transition: .18s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.nav-link.active { color: #073f63; background: #fff; box-shadow: 0 8px 18px rgba(1,34,54,.22); }
.nav-icon {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    border-radius: 8px;
    color: currentColor;
    background: rgba(255,255,255,.11);
}
.nav-link.active .nav-icon { color: #fff; background: var(--blue-700); }
.sidebar-footer { padding: 17px 22px 22px; color: rgba(255,255,255,.7); border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer small { font-size: 10px; }
.academy-mini { color: #fff; font-size: 12px; font-weight: 700; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,223,23,.12); }
.sidebar-overlay { display: none; }
.main-area { min-height: 100vh; margin-left: 258px; display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 11px 32px;
    background: rgba(255,255,255,.93);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 13px; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -.3px; }
.eyebrow { margin: 0 0 2px; color: var(--blue-700); font-size: 9px; font-weight: 850; letter-spacing: 1.4px; }
.icon-button { border: 0; background: transparent; cursor: pointer; }
.menu-button { display: none; width: 38px; height: 38px; font-size: 20px; border-radius: 9px; }
.menu-button:hover { background: var(--blue-100); }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; color: white; font-weight: 850; text-decoration: none; border-radius: 11px; background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 10px; }
.logout-link { margin-left: 4px; padding: 7px 10px; color: var(--muted); font-size: 11px; font-weight: 750; text-decoration: none; border-radius: 8px; }
.logout-link:hover { color: var(--danger); background: #fff0f0; }
.content { width: 100%; max-width: 1500px; flex: 1; margin: 0 auto; padding: 27px 32px 40px; }
.app-footer { display: flex; justify-content: space-between; gap: 18px; padding: 16px 32px; color: #8390a0; font-size: 10px; border-top: 1px solid var(--line); background: white; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; }
.page-heading h2 { margin: 0 0 3px; font-size: 19px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    color: var(--ink);
    font-weight: 750;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(18,55,82,.1); }
.btn-primary { color: white; border-color: var(--blue-700); background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); }
.btn-danger { color: white; border-color: #a92228; background: linear-gradient(135deg, #df3b42, #a92228); box-shadow: 0 7px 16px rgba(169,34,40,.18); }
.btn-danger:hover { box-shadow: 0 9px 20px rgba(169,34,40,.28); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-quiet { color: var(--blue-900); background: var(--blue-100); border-color: transparent; }
.btn-small { min-height: 31px; padding: 5px 10px; font-size: 10px; border-radius: 8px; }
.btn-icon { font-size: 16px; font-weight: 400; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 114px; padding: 18px; background: var(--surface); border: 1px solid #e5ebf1; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; right: -25px; bottom: -28px; border-radius: 50%; background: var(--accent-soft); }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: var(--accent); font-size: 18px; font-weight: 900; border-radius: 14px; background: var(--accent-soft); }
.stat-copy small { display: block; color: var(--muted); font-weight: 650; font-size: 11px; }
.stat-copy strong { display: block; margin: 2px 0; font-size: 25px; letter-spacing: -.8px; }
.stat-copy span { color: #8490a0; font-size: 9px; }
.stat-blue { --accent: #087fbd; --accent-soft: #e6f5fc; }
.stat-yellow { --accent: #a56b00; --accent-soft: #fff7d4; }
.stat-red { --accent: #d5383d; --accent-soft: #fff0f0; }
.stat-green { --accent: #17875b; --accent-soft: #e8f7f1; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; }
.users-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; align-items: start; gap: 18px; }
.users-layout > .card { min-width: 0; }
.user-role-count { padding: 5px 8px; color: var(--blue-900); border-radius: 7px; background: var(--blue-100); white-space: nowrap; }
.user-role-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.user-role-tabs button { min-height: 36px; padding: 7px 10px; color: #5c6f7d; border: 1px solid transparent; border-radius: 8px; background: transparent; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.user-role-tabs button:hover { color: var(--blue-900); background: var(--blue-100); }
.user-role-tabs button.active { color: white; border-color: var(--blue-700); background: linear-gradient(135deg,var(--blue-600),var(--blue-900)); box-shadow: 0 5px 12px rgba(7,91,155,.18); }
.card { background: var(--surface); border: 1px solid #e3eaf0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid #edf1f5; }
.card-header h2, .card-header h3 { margin: 0; font-size: 14px; }
.card-header p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.card-body { padding: 18px; }
.card-link { color: var(--blue-700); font-size: 10px; font-weight: 800; text-decoration: none; }
.quick-actions { display: grid; gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 13px; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; transition: .16s; }
.quick-action:hover { border-color: #93cde9; background: #f7fcff; transform: translateX(2px); }
.quick-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-size: 18px; border-radius: 11px; background: var(--blue-700); }
.quick-action:nth-child(2) .quick-icon { color: #6d4a00; background: var(--yellow); }
.quick-action:nth-child(3) .quick-icon { background: var(--red); }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { font-size: 11px; }
.quick-action small { color: var(--muted); font-size: 9px; }
.welcome-banner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 20px 23px; color: white; border-radius: var(--radius); background: linear-gradient(112deg, var(--blue-900), var(--blue-600)); box-shadow: 0 14px 30px rgba(3,93,143,.18); }
.welcome-banner::after { content: ""; position: absolute; width: 190px; height: 190px; right: -70px; top: -90px; border: 28px solid rgba(255,223,23,.14); border-radius: 50%; }
.welcome-banner h2 { margin: 0 0 3px; font-size: 18px; }
.welcome-banner p { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; }
.welcome-mark { position: relative; z-index: 1; color: var(--blue-900); font-weight: 900; padding: 8px 11px; border-radius: 10px; background: var(--yellow); }

.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.search-form { display: flex; gap: 8px; width: min(470px, 100%); }
.search-form input { min-width: 0; flex: 1; }
.record-count { color: var(--muted); font-size: 10px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 12px; color: #788597; font-size: 9px; font-weight: 850; letter-spacing: .65px; text-align: left; white-space: nowrap; background: #f7f9fb; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px; font-size: 11px; vertical-align: middle; border-bottom: 1px solid #edf1f4; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfe; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.person-photo { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; color: var(--blue-900); font-weight: 850; border-radius: 10px; background: var(--blue-100); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-cell strong, .person-cell small { display: block; }
.person-cell strong { font-size: 11px; }
.person-cell small { color: var(--muted); font-size: 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; font-size: 9px; font-weight: 800; border-radius: 999px; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-active, .badge-completed { color: var(--success); background: #e8f7f1; }
.badge-inactive, .badge-withdrawn { color: #7b8490; background: #eef1f4; }
.badge-paid { color: var(--success); background: #e8f7f1; }
.badge-void { color: var(--danger); background: #fff0f0; }
.badge-admin { color: #7b4f00; background: #fff5ca; }
.badge-teacher { color: var(--blue-700); background: var(--blue-100); }
.badge-student { color: #68520b; background: #fff3c4; }
.badge-info { color: var(--blue-700); background: var(--blue-100); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; padding: 3px 7px; color: var(--blue-900); font-size: 8px; font-weight: 750; border-radius: 999px; background: var(--blue-100); }
.action-cell { display: flex; gap: 6px; justify-content: flex-end; }
.empty-state { padding: 45px 20px; text-align: center; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; color: var(--blue-700); font-size: 23px; font-weight: 900; border-radius: 16px; background: var(--blue-100); }
.empty-state h3 { margin: 0 0 4px; font-size: 14px; }
.empty-state p { margin: 0 auto 15px; max-width: 380px; color: var(--muted); font-size: 11px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; align-items: start; }
.form-layout.single { grid-template-columns: 1fr; }
.form-card { margin-bottom: 17px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-number { width: 27px; height: 27px; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 850; border-radius: 8px; background: var(--blue-700); }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.field { grid-column: span 6; }
.field.third { grid-column: span 4; }
.field.quarter { grid-column: span 3; }
.field.full { grid-column: 1 / -1; }
.field label { display: flex; justify-content: space-between; margin-bottom: 5px; color: #3b4655; font-size: 10px; font-weight: 800; }
.field label small { color: #9aa3ae; font-weight: 500; }
.required { color: var(--red); }
.input, .select, .textarea, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="tel"], select, textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    color: var(--ink);
    outline: none;
    border: 1px solid #d6dee7;
    border-radius: 9px;
    background: white;
    transition: .15s ease;
}
textarea, .textarea { min-height: 83px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(7,151,213,.11); }
input:disabled, select:disabled, textarea:disabled, input[readonly] { color: #6f7986; background: #f3f5f7; cursor: not-allowed; }
.field-hint { display: block; margin-top: 4px; color: #8a95a3; font-size: 9px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; }
.input-prefix input { padding-left: 29px; }
.error-summary { margin-bottom: 16px; padding: 13px 15px; color: #962b2f; border: 1px solid #f0c2c4; border-radius: 11px; background: #fff3f3; }
.error-summary strong { font-size: 11px; }
.error-summary ul { margin: 6px 0 0; padding-left: 18px; font-size: 10px; }
.form-actions { position: sticky; bottom: 0; z-index: 8; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 0 3px; background: linear-gradient(transparent, var(--canvas) 28%); }
.form-actions [data-delete-student] { margin-right: auto; }
.delete-student-dialog { width: min(570px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; color: var(--ink); border: 0; border-radius: 18px; background: white; box-shadow: 0 28px 80px rgba(5,29,47,.3); }
.delete-student-dialog::backdrop { background: rgba(5,24,38,.62); backdrop-filter: blur(3px); }
.delete-dialog-content { padding: 24px; }
.delete-dialog-header { display: flex; align-items: flex-start; gap: 13px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.delete-dialog-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-size: 20px; font-weight: 900; border-radius: 11px; background: var(--danger); }
.delete-dialog-header h2 { margin: 0 0 4px; font-size: 19px; }
.delete-dialog-header p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.delete-dialog-options { display: grid; gap: 10px; margin: 18px 0 13px; }
.delete-option { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; gap: 11px; padding: 14px; border: 1px solid #d8e2e9; border-radius: 12px; background: #fbfcfd; cursor: pointer; transition: .15s ease; }
.delete-option:hover { border-color: #e3a6a9; background: #fff8f8; }
.delete-option:has(input:checked) { border-color: #d65a60; background: #fff1f1; box-shadow: 0 0 0 3px rgba(199,55,55,.08); }
.delete-option input { width: 18px; height: 18px; accent-color: var(--danger); }
.delete-option strong, .delete-option small { display: block; }
.delete-option strong { font-size: 12px; }
.delete-option small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.delete-option-critical { border-color: #efc5c7; }
.delete-option-critical strong { color: #a92228; }
.delete-dialog-warning { margin: 0; padding: 11px 12px; color: #7d4a0b; font-size: 10px; line-height: 1.45; border-radius: 9px; background: #fff8e5; }
.delete-dialog-error { margin: 10px 0 0; padding: 10px 12px; color: #962b2f; font-size: 10px; border-radius: 9px; background: #fff0f0; }
.delete-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.side-card { position: sticky; top: 98px; }
.photo-uploader { text-align: center; }
.photo-preview { width: 132px; height: 150px; display: grid; place-items: center; overflow: hidden; margin: 0 auto 13px; color: #7790a1; font-size: 28px; font-weight: 850; border: 2px dashed #b9d1df; border-radius: 16px; background: #f4f9fc; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-uploader input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-uploader label.btn { cursor: pointer; }
.photo-uploader p { margin: 8px 0 0; color: var(--muted); font-size: 8px; }
.teacher-photo-save { width: 100%; margin-top: 15px; }
.identity-card { margin-top: 14px; padding: 12px; text-align: left; border-radius: 11px; background: var(--blue-100); }
.identity-card span { display: block; color: var(--blue-900); font-size: 9px; font-weight: 700; }
.identity-card strong { display: block; margin-top: 2px; font-size: 12px; word-break: break-all; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card label { min-height: 88px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: white; }
.choice-card label strong { font-size: 11px; }
.choice-card label small { color: var(--muted); font-size: 9px; }
.choice-card input:checked + label { border-color: var(--blue-600); background: var(--blue-100); box-shadow: 0 0 0 2px rgba(7,151,213,.1); }
.choice-card input:disabled + label { cursor: default; opacity: .78; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.check-item { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.check-item input { width: 17px; height: 17px; accent-color: var(--blue-700); }
.group-count { min-width: 30px; display: inline-grid; place-items: center; padding: 5px 9px; color: var(--blue-900); font-weight: 900; border-radius: 999px; background: var(--blue-100); }
.group-info-message { color: #496273; border-color: #c9dce7; background: #f2f8fb; }
.group-student-toolbar { display: flex; justify-content: flex-end; gap: 16px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.group-student-toolbar .link-button { color: var(--blue-700); font-size: 9px; font-weight: 850; }
.group-student-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 18px; }
.group-student-option { display: grid; grid-template-columns: 19px 37px minmax(0,1fr); align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; transition: .15s ease; }
.group-student-option:hover { border-color: #91c9e7; background: #f8fcff; }
.group-student-option:has(input:checked) { border-color: var(--blue-600); background: var(--blue-100); box-shadow: 0 0 0 2px rgba(7,151,213,.08); }
.group-student-option input { width: 17px; height: 17px; accent-color: var(--blue-700); }
.group-student-option strong, .group-student-option small { display: block; }
.group-student-option strong { font-size: 10px; }
.group-student-option small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.group-export-note { display: flex; align-items: center; gap: 13px; margin-top: 16px; padding: 15px 17px; color: #145b3d; border: 1px solid #b9dfce; border-radius: 13px; background: #eefaf5; }
.group-export-note > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-size: 9px; font-weight: 900; border-radius: 10px; background: #1d6f42; }
.group-export-note strong { display: block; font-size: 11px; }
.group-export-note p { margin: 2px 0 0; font-size: 9px; line-height: 1.45; }
.dependent-panel { margin-top: 15px; padding: 15px; border: 1px solid #ecd98a; border-radius: 12px; background: #fffbed; }
.dependent-panel[hidden] { display: none; }

.account-summary { display: flex; align-items: center; gap: 13px; margin: 0 0 16px; padding: 15px 17px; border: 1px solid; border-radius: 13px; }
.account-summary-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-size: 17px; font-weight: 900; border-radius: 50%; }
.account-summary-copy { min-width: 0; flex: 1; }
.account-summary small, .account-summary strong { display: block; }
.account-summary small { margin-bottom: 2px; font-size: 8px; font-weight: 900; letter-spacing: .9px; }
.account-summary strong { font-size: 15px; }
.account-summary p { margin: 3px 0 0; font-size: 9px; line-height: 1.45; }
.account-solvent { color: #126443; border-color: #a8ddc7; background: #ecfaf4; }
.account-solvent .account-summary-icon { background: var(--success); }
.account-overdue { color: #8e3438; border-color: #edbec1; background: #fff2f2; }
.account-overdue .account-summary-icon { background: var(--danger); }
.account-neutral { color: #496273; border-color: #c9dce7; background: #f2f8fb; }
.account-neutral .account-summary-icon { background: var(--blue-700); }
.account-months { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.account-months span { margin-right: 2px; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.account-months b { padding: 4px 7px; color: #873238; font-size: 8px; border: 1px solid #ebc2c4; border-radius: 999px; background: white; }
.account-compact { margin: 12px 0 0; padding: 11px 12px; }
.account-compact .account-summary-icon { width: 29px; height: 29px; font-size: 13px; }
.account-compact strong { font-size: 12px; }
.account-compact p { font-size: 8px; }
.account-summary > .btn { margin-left: auto; white-space: nowrap; }
.student-picker { position: relative; z-index: 3; }
.student-search-results { position: absolute; z-index: 15; top: calc(100% - 4px); right: 0; left: 0; max-height: 330px; overflow-y: auto; border: 1px solid #b9cfdd; border-radius: 11px; background: white; box-shadow: 0 16px 35px rgba(14,53,77,.17); }
.student-search-results[hidden] { display: none; }
.student-search-result { width: 100%; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; color: inherit; text-align: left; border: 0; border-bottom: 1px solid #e5edf2; background: white; cursor: pointer; }
.student-search-result:last-child { border-bottom: 0; }
.student-search-result:hover, .student-search-result:focus { outline: 0; background: #eef8fd; }
.student-search-result .person-photo { width: 38px; height: 38px; }
.student-search-result span:nth-child(2) { min-width: 0; }
.student-search-result strong, .student-search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-search-result strong { font-size: 10px; }
.student-search-result small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.student-search-result b { color: var(--blue-700); font-size: 8px; text-transform: uppercase; }
.student-search-message, .student-selection-loading { padding: 15px; color: var(--muted); font-size: 9px; text-align: center; }
.student-search-error { color: var(--danger); }
.student-selection { padding: 13px; border: 1px solid #d2e0e9; border-radius: 12px; background: #f8fbfd; }
.selected-student-main { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.selected-student-main .person-photo { width: 45px; height: 45px; }
.selected-student-main span:nth-child(2) { min-width: 0; }
.selected-student-main small, .selected-student-main strong, .selected-student-main p { display: block; }
.selected-student-main small { color: var(--blue-700); font-size: 7px; font-weight: 900; letter-spacing: .7px; }
.selected-student-main strong { margin-top: 2px; font-size: 12px; }
.selected-student-main p { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.student-selection-empty { display: flex; align-items: center; gap: 11px; color: #617584; }
.student-selection-empty > span { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; border-radius: 50%; background: #e7f1f7; }
.student-selection-empty strong { font-size: 10px; }
.student-selection-empty p { margin: 3px 0 0; font-size: 8px; }
.monthly-period-panel { margin-top: 14px; padding: 13px; border: 1px solid #b9d9e9; border-radius: 11px; background: #f0f9fe; }
.monthly-period-panel[hidden] { display: none; }
.monthly-period-panel .field { max-width: 390px; }

.student-profile-hero { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 20px; color: white; border-radius: 16px; background: linear-gradient(125deg, var(--blue-900), var(--blue-700)); box-shadow: var(--shadow); }
.student-profile-photo { width: 82px; height: 92px; display: grid; place-items: center; overflow: hidden; color: var(--blue-900); font-size: 25px; font-weight: 900; border: 4px solid rgba(255,255,255,.85); border-radius: 13px; background: white; }
.student-profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.student-profile-title { min-width: 0; }
.student-profile-title > small, .student-profile-contact small { display: block; color: rgba(255,255,255,.68); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.student-profile-title h2 { margin: 3px 0; color: white; font-size: 23px; line-height: 1.1; }
.student-profile-title p { margin: 0 0 9px; color: rgba(255,255,255,.78); font-size: 9px; }
.student-profile-title > div { display: flex; flex-wrap: wrap; gap: 6px; }
.student-profile-title .badge { color: white; background: rgba(255,255,255,.14); }
.student-profile-contact { min-width: 210px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.09); }
.student-profile-contact strong, .student-profile-contact span { display: block; }
.student-profile-contact strong { margin-top: 4px; font-size: 13px; }
.student-profile-contact span { margin-top: 2px; color: rgba(255,255,255,.74); font-size: 9px; overflow-wrap: anywhere; }
.student-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.student-detail-card { margin: 0; }
.student-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 18px; }
.student-fact { min-width: 0; padding-bottom: 8px; border-bottom: 1px solid #e0e8ed; }
.student-fact-wide { grid-column: 1 / -1; }
.student-fact small, .student-fact strong { display: block; }
.student-fact small { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .4px; text-transform: uppercase; }
.student-fact strong { margin-top: 3px; font-size: 10px; overflow-wrap: anywhere; }
.student-detail-empty { grid-column: 1 / -1; padding: 17px; color: var(--muted); font-size: 9px; text-align: center; border: 1px dashed #cfdae2; border-radius: 10px; background: #f8fafb; }
.student-notes { min-height: 82px; margin: 0; padding: 13px; color: #455966; font-size: 10px; line-height: 1.6; white-space: pre-wrap; border-radius: 10px; background: #f5f8fa; }
.student-history-card { margin-bottom: 16px; }
.student-history-empty { padding: 30px 18px; color: var(--muted); font-size: 9px; text-align: center; }

.alert { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 12px 14px; font-size: 11px; border: 1px solid; border-radius: 11px; animation: slideDown .25s ease; }
.alert > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-weight: 900; border-radius: 7px; }
.alert p { flex: 1; margin: 0; }
.alert button { color: inherit; border: 0; font-size: 18px; background: transparent; cursor: pointer; }
.alert-success { color: #136947; border-color: #b8e3d1; background: #edfaf5; }
.alert-success > span { background: var(--success); }
.alert-error { color: #983337; border-color: #f0c5c7; background: #fff4f4; }
.alert-error > span { background: var(--danger); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 25px;
    overflow-x: hidden;
    background: #eef5f8;
}
.login-shell {
    width: min(980px, 100%);
    min-height: 600px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(8,57,86,.18);
}
.login-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #fff;
    text-align: center;
    background: linear-gradient(145deg, var(--blue-900), var(--blue-600));
}
.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 35px solid rgba(255,255,255,.07);
}
.login-brand::before { width: 270px; height: 270px; top: -170px; left: -120px; }
.login-brand::after { width: 190px; height: 190px; right: -115px; bottom: -90px; border-color: rgba(255,223,23,.16); }
.login-logo {
    position: relative;
    z-index: 1;
    width: 220px;
    height: 245px;
    object-fit: contain;
    padding: 8px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(2,42,66,.22);
}
.login-brand h1 {
    position: relative;
    z-index: 1;
    margin: 21px 0 3px;
    color: #fff;
    font-size: 24px;
    letter-spacing: .06em;
}
.login-brand p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255,255,255,.76);
    font-size: 11px;
}
.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 5vw, 55px);
    background: #fff;
}
.login-panel-inner { width: 100%; max-width: 400px; margin: auto; }
.login-access-mark {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    background: #d9ebff;
    box-shadow: 0 13px 30px rgba(8,127,189,.22);
}
.login-access-mark img { width: 100%; height: 100%; object-fit: contain; }
.login-heading { margin-top: 20px; }
.login-heading .login-kicker { margin: 0 0 8px; color: var(--blue-700); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.login-heading h2 { margin: 0; color: #102533; font-size: clamp(27px, 3vw, 38px); line-height: 1.08; letter-spacing: -.035em; }
.login-form { margin-top: 24px; }
.admin-login-methods { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: -3px 0 16px; padding: 4px; border-radius: 11px; background: #edf3f6; }
.admin-login-methods[hidden] { display: none; }
.admin-login-methods button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 10px; color: #5b6f7c; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; }
.admin-login-methods button span { width: 19px; height: 19px; display: grid; place-items: center; color: #547083; font-size: 9px; border-radius: 6px; background: rgba(255,255,255,.72); }
.admin-login-methods button.active { color: var(--blue-900); background: white; box-shadow: 0 3px 10px rgba(18,61,86,.12); }
.admin-login-methods button.active span { color: white; background: var(--blue-700); }
.forgot-password-link { display: block; margin: 7px 0 0 auto; padding: 2px 0; color: var(--blue-700); border: 0; background: transparent; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.forgot-password-link:hover { color: var(--blue-900); text-decoration: underline; }
.forgot-password-link:disabled { opacity: .6; cursor: wait; }
.login-panel .field { margin-bottom: 16px; }
.login-panel .field label { margin-bottom: 8px; color: #172e3e; font-size: 12px; letter-spacing: .02em; }
.login-panel input[type="text"],
.login-panel input[type="email"],
.login-panel input[type="password"],
.login-panel select { min-height: 50px; padding: 12px 14px; border-color: #ccd9e2; border-radius: 11px; background: rgba(255,255,255,.92); }
.login-panel input::placeholder { color: #a6b1ba; }
.login-panel input:focus { border-color: var(--blue-600); background: #fff; box-shadow: 0 0 0 4px rgba(7,151,213,.1); }
.login-panel .btn { width: 100%; margin-top: 5px; }
.login-submit { min-height: 51px; display: flex; align-items: center; justify-content: space-between; padding: 10px 13px 10px 19px; border: 0; border-radius: 12px; background: linear-gradient(100deg, #075b9b, #0a92e6); box-shadow: 0 12px 25px rgba(8,127,189,.24); }
.login-submit span { margin: auto; }
.login-submit b { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; font-size: 15px; border-radius: 9px; background: rgba(255,255,255,.16); }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(8,127,189,.29); }
.login-submit:disabled { transform: none; opacity: .7; }
.compact-heading { text-align: center; }
.login-step-copy { margin: 10px 0 0; color: #617484; font-size: 11px; line-height: 1.55; }
.login-step-copy strong { color: #123b56; }
.login-panel .security-code-input { font-size: 24px; font-weight: 900; letter-spacing: .28em; text-align: center; }
.login-back-button { width: 100%; margin-top: 13px; padding: 8px; color: #37647f; border: 0; background: transparent; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.login-back-button:hover { color: #075b9b; }
.code-expiry { margin: 14px 0 0; color: #788995; font-size: 9px; line-height: 1.45; text-align: center; }
.setup-form { margin-top: 22px; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 12px; }
.login-panel .setup-grid .field { grid-column: auto; }
.login-panel .setup-grid .field.full { grid-column: 1 / -1; }
.login-alert { margin-bottom: 18px; padding: 10px 12px; color: #99363a; font-size: 10px; border-radius: 9px; background: #fff1f1; }
.cloudflare-note { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 12px; border: 1px solid #cfe4ef; border-radius: 11px; background: #edf8ff; }
.cloudflare-note > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; font-size: 11px; font-weight: 900; border-radius: 50%; background: var(--success); }
.cloudflare-note strong { color: #16415c; font-size: 9px; }
@keyframes loginReveal { from { opacity: 0; transform: translateY(9px); } }
.login-logo, .login-panel-inner { animation: loginReveal .45s ease both; }

.receipt-body { min-height: 100vh; margin: 0; padding: 20px; color: #202020; background: #e7eaed; font-family: Georgia, "Times New Roman", serif; }
.receipt-toolbar { width: min(8.5in, 100%); display: flex; justify-content: space-between; align-items: center; margin: 0 auto 14px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.receipt-toolbar p { margin: 0; color: #586371; font-size: 11px; }
.receipt-actions { display: flex; gap: 8px; }
.receipt-sheet { page: receipt; position: relative; width: 8.5in; height: 5.5in; max-width: 100%; margin: 0 auto; padding: .22in; background: white; box-shadow: 0 15px 45px rgba(24,31,36,.2); }
.receipt-sheet.receipt-void::after { content: "ANULADO"; position: absolute; z-index: 3; inset: 42% 10% auto; color: rgba(200,25,31,.22); font: 900 58px/1 Arial,sans-serif; letter-spacing: 12px; text-align: center; transform: rotate(-13deg); }
.receipt-border { height: 100%; display: flex; flex-direction: column; padding: .14in .18in; border: 2px solid #252525; }
.receipt-header { display: grid; grid-template-columns: 1.15in 1fr 1.55in; align-items: start; gap: .12in; min-height: 1.42in; }
.receipt-logo { width: .92in; height: 1.14in; object-fit: contain; filter: grayscale(100%); }
.receipt-academy { text-align: center; }
.receipt-academy h1 { margin: 0; font-size: 18px; line-height: 1.02; }
.receipt-academy h2 { margin: 2px 0; font-size: 16px; }
.receipt-academy p { margin: 0; font-size: 12px; line-height: 1.25; }
.receipt-number { padding-top: .72in; font-size: 13px; white-space: nowrap; }
.receipt-number strong { display: inline-block; min-width: .64in; padding: 0 4px 2px; color: #133f77; text-align: center; border-bottom: 1px solid #222; }
.receipt-line { display: flex; align-items: flex-end; gap: 7px; margin: 7px 0 0; font-size: 13px; }
.receipt-line > span:first-child { flex: 0 0 auto; font-weight: bold; }
.receipt-line-value { min-height: 23px; flex: 1; padding: 0 7px 2px; color: #133f77; font-size: 14px; font-style: italic; border-bottom: 1px solid #222; }
.receipt-amount-number { flex: 0 0 auto; min-width: 1.18in; text-align: right; font-style: normal; }
.receipt-concepts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 16px; margin: 10px 0 7px; }
.receipt-concept { display: flex; align-items: center; gap: 7px; min-height: 30px; font-size: 11px; line-height: 1.08; }
.receipt-box { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; color: #133f77; font-family: Arial, sans-serif; font-size: 18px; font-weight: bold; border: 2px solid #222; }
.receipt-motto { margin: auto 0 6px; text-align: center; font-size: 12px; font-weight: bold; }
.receipt-bottom { display: grid; grid-template-columns: 1fr 2.7in; align-items: end; gap: 20px; font-size: 11px; }
.receipt-date-line { display: inline-block; min-width: 2.6in; padding-bottom: 2px; color: #133f77; text-align: center; font-size: 13px; font-style: italic; border-bottom: 1px solid #222; }
.receipt-signature { padding-top: 19px; text-align: center; border-top: 1px solid #222; }

.registration-flow-note { display: flex; align-items: center; gap: 9px; margin: -5px 0 18px; padding: 12px 16px; color: #496072; font-size: 10px; border: 1px solid #cfe4ef; border-radius: 12px; background: #f2faff; }
.registration-flow-note span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; color: white; font-weight: 850; border-radius: 50%; background: var(--blue-700); }
.registration-flow-note strong { white-space: nowrap; }
.registration-flow-note i { height: 1px; flex: 1; background: #b8d8e8; }
.registration-academic-fields { margin-top: 18px; }
.identity-card p { color: #557082; text-align: left; line-height: 1.45; }

.registration-sheet-body { min-height: 100vh; margin: 0; padding: 20px; color: #17232d; background: #e7eaed; }
.registration-toolbar { width: min(8.5in, 100%); display: flex; justify-content: space-between; align-items: center; margin: 0 auto 14px; }
.registration-toolbar p { margin: 0; color: #586371; font-size: 11px; }
.registration-page { page: registration; width: min(8.5in, 100%); min-height: 11in; margin: 0 auto; padding: .42in .48in; background: white; box-shadow: 0 15px 45px rgba(24,31,36,.2); }
.registration-header { display: grid; grid-template-columns: .88in 1fr 1.65in; align-items: center; gap: .17in; padding-bottom: .16in; border-bottom: 3px solid var(--blue-700); }
.registration-header img { width: .78in; height: .9in; object-fit: contain; }
.registration-header p { margin: 0; color: var(--blue-900); font-size: 10px; font-weight: 850; letter-spacing: 1.2px; }
.registration-header h1 { margin: 1px 0 2px; color: var(--red); font-size: 24px; line-height: 1; }
.registration-header div > span { color: #5b6875; font-size: 9px; }
.registration-header aside { padding: 10px; text-align: right; border-radius: 9px; background: var(--blue-100); }
.registration-header aside small, .registration-header aside strong, .registration-header aside span { display: block; }
.registration-header aside small { color: var(--blue-900); font-size: 7px; font-weight: 850; letter-spacing: .7px; }
.registration-header aside strong { margin: 2px 0; color: var(--blue-900); font-size: 16px; }
.registration-header aside span { color: #536575; font-size: 9px; }
.registration-student { display: grid; grid-template-columns: .95in 1fr; align-items: center; gap: .2in; margin-top: .2in; padding: .17in; border: 1px solid #d6e0e8; border-radius: 12px; background: #f9fbfc; }
.registration-photo { width: .82in; height: .95in; display: grid; place-items: center; overflow: hidden; color: var(--blue-900); font-size: 23px; font-weight: 900; border-radius: 9px; background: var(--blue-100); }
.registration-photo img { width: 100%; height: 100%; object-fit: cover; }
.registration-student small { color: var(--blue-700); font-size: 8px; font-weight: 850; letter-spacing: 1px; }
.registration-student h2 { margin: 0 0 8px; font-size: 19px; line-height: 1.1; }
.registration-block { margin-top: .17in; }
.registration-block h3 { margin: 0 0 7px; padding: 5px 8px; color: white; font-size: 10px; letter-spacing: .5px; border-radius: 5px; background: var(--blue-900); }
.registration-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px 16px; }
.registration-data-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.registration-data-grid p { min-width: 0; margin: 0; padding-bottom: 4px; border-bottom: 1px solid #d9e0e6; }
.registration-data-grid b, .registration-data-grid span { display: block; }
.registration-data-grid b { color: #71808d; font-size: 7px; text-transform: uppercase; letter-spacing: .45px; }
.registration-data-grid span { margin-top: 1px; font-size: 9px; font-weight: 650; overflow-wrap: anywhere; }
.registration-notes p { min-height: 28px; margin: 0 0 5px; padding: 6px 8px; font-size: 8px; border: 1px solid #dce3e8; border-radius: 6px; }
.registration-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: .7in; margin: .4in .45in 0; }
.registration-signatures div { text-align: center; }
.registration-signatures span { display: block; height: .3in; border-bottom: 1px solid #333; }
.registration-signatures b { display: block; padding-top: 5px; font-size: 8px; }
.registration-footnote { margin: .18in 0 0; color: #74808a; font-size: 7px; text-align: center; }

@page receipt { size: 8.5in 5.5in; margin: 0; }
@page registration { size: letter portrait; margin: 0; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .form-layout { grid-template-columns: minmax(0,1fr) 220px; }
}
@media (max-width: 900px) {
    .login-body { align-items: start; }
    .login-shell { width: min(640px, 100%); min-height: auto; grid-template-columns: 1fr; }
    .login-brand { min-height: 280px; padding: 32px; }
    .login-logo { width: 165px; height: 185px; border-radius: 20px; }
    .login-brand h1 { margin-top: 16px; font-size: 21px; }
    .login-panel { padding: 42px 54px; }
    .login-panel-inner { max-width: 520px; }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; position: fixed; z-index: 25; inset: 0; background: rgba(7,25,38,.5); }
    .main-area { margin-left: 0; }
    .menu-button { display: grid; place-items: center; }
    .content { padding: 22px 18px 32px; }
    .topbar { padding: 10px 18px; }
    .dashboard-grid, .form-layout, .users-layout { grid-template-columns: 1fr; }
    .student-detail-grid { grid-template-columns: 1fr; }
    .student-profile-hero { grid-template-columns: 82px minmax(0,1fr); }
    .student-profile-contact { grid-column: 1 / -1; min-width: 0; }
    .side-card { position: static; order: -1; }
    .photo-uploader { display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: center; text-align: left; }
    .photo-preview { width: 100px; height: 112px; margin: 0; grid-row: span 3; }
    .login-shell { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .topbar h1 { font-size: 17px; }
    .eyebrow, .user-copy { display: none; }
    .logout-link { padding: 7px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 95px; }
    .page-heading, .table-toolbar { align-items: stretch; flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .field, .field.third, .field.quarter { grid-column: 1 / -1; }
    .choice-grid, .checkbox-grid, .group-student-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .form-actions [data-delete-student] { margin-right: 0; }
    .delete-dialog-content { padding: 18px; }
    .delete-dialog-actions { flex-direction: column-reverse; }
    .delete-dialog-actions .btn { width: 100%; }
    .account-summary { align-items: flex-start; flex-wrap: wrap; }
    .account-summary-copy { width: calc(100% - 50px); }
    .account-summary > .btn { width: 100%; margin-left: 0; }
    .selected-student-main { grid-template-columns: 42px minmax(0,1fr); }
    .selected-student-main > .btn { grid-column: 1 / -1; width: 100%; }
    .student-search-result { grid-template-columns: 36px minmax(0,1fr); }
    .student-search-result > b { display: none; }
    .student-profile-hero { grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding: 15px; }
    .student-profile-photo { width: 64px; height: 72px; }
    .student-profile-title h2 { font-size: 18px; }
    .student-facts { grid-template-columns: 1fr; }
    .student-fact-wide { grid-column: auto; }
    .app-footer { flex-direction: column; text-align: center; }
    .welcome-mark { display: none; }
    .login-body { padding: 0; background: white; }
    .login-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .login-brand { min-height: 225px; padding: 26px 20px; }
    .login-logo { width: 132px; height: 148px; border-radius: 17px; }
    .login-brand h1 { margin-top: 12px; font-size: 18px; }
    .login-brand p { font-size: 9px; }
    .login-panel { padding: 34px 24px 30px; }
    .login-access-mark { width: 72px; height: 72px; border-width: 4px; }
    .login-heading h2 { font-size: 28px; }
    .setup-grid { grid-template-columns: 1fr; }
    .login-panel .setup-grid .field,
    .login-panel .setup-grid .field.full { grid-column: 1; }
    .receipt-body { padding: 10px; overflow-x: auto; }
    .receipt-toolbar, .receipt-sheet { min-width: 8.5in; }
    .registration-flow-note { align-items: flex-start; flex-wrap: wrap; }
    .registration-flow-note i { display: none; }
    .registration-sheet-body { padding: 10px; overflow-x: auto; }
    .registration-toolbar, .registration-page { min-width: 8.5in; }
}

@media (max-width: 380px) {
    .login-brand { min-height: 205px; }
    .login-panel { padding-inline: 18px; }
}

@media print {
    .receipt-body { width: 8.5in; height: 5.5in; padding: 0; background: #fff; }
    .receipt-toolbar { display: none !important; }
    .receipt-sheet { width: 8.5in; height: 5.5in; margin: 0; padding: .2in; max-width: none; box-shadow: none; }
    .registration-sheet-body { width: 8.5in; min-height: 11in; padding: 0; background: #fff; }
    .registration-toolbar, .registration-sheet-body > .alert { display: none !important; }
    .registration-page { width: 8.5in; min-height: 11in; margin: 0; padding: .42in .48in; max-width: none; box-shadow: none; }
}
