﻿:root {
    --font-main: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    --orange: #F97316;
    --orange-dark: #EA580C;
    --orange-light: #FDBA74;
    --orange-soft: #FFF7ED;
    --orange-line: #FED7AA;
    --blue: #168CF9;
    --blue-dark: #0B63B6;
    --blue-soft: #EFF6FF;
    --green: #16A34A;
    --green-soft: #ECFDF5;
    --yellow: #F59E0B;
    --yellow-soft: #FFFBEB;
    --red: #DC2626;
    --red-soft: #FEF2F2;
    --ink: #0F172A;
    --text: #334155;
    --muted: #64748B;
    --line: #E5E7EB;
    --bg: #F8FAFC;
    --card: #FFFFFF;
    --sidebar: #111827;
    --sidebar-soft: #1F2937;
    --shadow: 0 24px 70px rgba(15, 23, 42, .10);
}

/* STEP46AA - clean DevExpress-aligned extracurricular workspace */
.old-core-contract-card{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:22px;align-items:center;margin:18px 0}.old-core-contract-card h2{margin:4px 0 6px}.old-core-contract-card p{margin:0;color:#64748b}.legacy-trait-chips{display:flex;flex-wrap:wrap;gap:6px;max-width:330px}.legacy-trait-chips span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:32px;border-radius:10px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-weight:800;font-size:12px}.core-table{min-width:1250px}.core-table.core-table-shs{min-width:1650px}.core-table .legacy-trait-head{min-width:72px;text-align:center}.core-table .rating-select{min-width:64px;text-align:center}@media(max-width:900px){.old-core-contract-card{grid-template-columns:1fr}.legacy-trait-chips{max-width:none}}
.core-table .core-group-header th{text-align:center;font-size:11px;line-height:1.25;padding:10px 6px;white-space:normal}.core-table .core-code-header th{text-align:center;padding:8px 6px}.core-group-honesty{background:#dbeafe!important;color:#1e3a8a!important}.core-group-diligence{background:#ffedd5!important;color:#9a3412!important}.core-group-learning{background:#f3e8ff!important;color:#6b21a8!important}.core-group-nationalism,.core-group-shs{background:#dcfce7!important;color:#166534!important}.core-group-shs{border-left:2px solid #86efac!important}.core-rating-legend{display:grid;gap:8px}.core-rating-item{display:grid;grid-template-columns:48px 1fr;align-items:center;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}.core-rating-item strong{display:flex;min-height:42px;align-items:center;justify-content:center;color:#b91c1c;font-size:14px}.core-rating-item span{padding:11px 12px;color:#1e3a8a;font-weight:700}.core-rating-ao,.core-rating-ro{background:#fff7d6}.core-rating-so,.core-rating-no{background:#edf8e8}.core-guide-groups{display:grid;gap:12px;margin-top:14px}.core-guide-group{border:1px solid #dbeafe;border-radius:14px;overflow:hidden;background:#fff}.core-guide-group h4{margin:0;padding:12px 14px;background:#eff6ff;color:#1e3a8a;font-size:13px}.core-guide-group:nth-child(2){border-color:#fed7aa}.core-guide-group:nth-child(2) h4{background:#fff7ed;color:#9a3412}.core-guide-group:nth-child(3){border-color:#e9d5ff}.core-guide-group:nth-child(3) h4{background:#faf5ff;color:#6b21a8}.core-guide-group:nth-child(4),.core-guide-group.senior-high{border-color:#bbf7d0}.core-guide-group:nth-child(4) h4,.core-guide-group.senior-high h4{background:#f0fdf4;color:#166534}.core-guide-row{display:grid;grid-template-columns:48px 1fr;gap:10px;padding:11px 14px;border-top:1px solid #e2e8f0;align-items:start}.core-guide-row strong{color:#991b1b}.core-guide-row p{margin:0;color:#334155;line-height:1.45}
.extra-pro-page code{padding:2px 6px;border-radius:6px;background:#f7ecec;color:#7f1d1d;font-size:11px}.field-with-button{display:flex;gap:8px}.field-with-button .form-control{flex:1}.ui-modal{position:fixed;inset:0;z-index:1400;display:none;align-items:center;justify-content:center;padding:20px}.ui-modal.open{display:flex}.ui-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(3px)}.ui-modal-panel{position:relative;width:min(520px,100%);border:1px solid #eadcdd;border-radius:22px;background:#fff;box-shadow:0 28px 90px rgba(15,23,42,.28);overflow:hidden}.ui-modal-panel header{display:flex;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid #eee5e6;background:linear-gradient(135deg,#fff,#fff7f2)}.ui-modal-panel h2{margin:3px 0 4px}.ui-modal-panel p{margin:0;color:#64748b}.modal-form{display:grid;gap:15px;padding:22px 24px}.modal-form label span,.member-filter-grid label span,.import-member-form label span{display:block;margin:0 0 6px;color:#475569;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.modal-form footer{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.modal-open{overflow:hidden}
.extra-member-toolbar{display:flex;align-items:end;justify-content:space-between;gap:18px}.member-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(135px,1fr)) minmax(220px,1.5fr);gap:12px;flex:1}.import-member-form{display:flex;align-items:end;gap:8px}.candidate-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:470px;overflow:auto;padding:3px}.candidate-row{display:grid;grid-template-columns:auto 38px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#fff;cursor:pointer}.candidate-row:hover{border-color:#d4a3a6;background:#fffafa}.candidate-row input{width:18px;height:18px}.candidate-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#fef2f2;color:#991b1b;font-weight:900}.candidate-row strong,.candidate-row small{display:block}.candidate-row small{color:#64748b}.candidate-row em,.candidate-row b{font-size:11px;font-style:normal;color:#475569}.sticky-selection-bar{display:flex;justify-content:flex-end;align-items:center;gap:15px;margin-top:14px;padding-top:14px;border-top:1px solid #e2e8f0}.old-extra-grid{max-height:620px}.extra-component-table{min-width:1680px}.extra-component-table th:not(:nth-child(2)):not(:nth-child(3)),.extra-component-table td:not(:nth-child(2)):not(:nth-child(3)){text-align:center}.extra-component-table .sticky-name-col{position:sticky;left:88px;z-index:3;min-width:230px;background:#fff}.extra-component-table thead .sticky-name-col{z-index:5;background:#f8fafc}.component-score{width:68px;min-width:68px;text-align:center;padding:8px}.computed-score{display:inline-flex;min-width:62px;justify-content:center;padding:8px;border-radius:10px;background:#eff6ff;color:#1e3a8a;font-weight:900}.letter-chip{display:inline-flex;min-width:38px;justify-content:center;padding:6px 9px;border-radius:999px;background:#fff7ed;color:#9a3412;font-weight:900}.unsubmit-card{display:flex;align-items:center;justify-content:space-between;gap:20px;border-color:#fed7aa;background:#fffaf5}.unsubmit-card h2,.unsubmit-card p{margin:0}.level-coverage-bars{display:grid;gap:12px}.level-coverage-bars article{display:grid;grid-template-columns:minmax(180px,1fr) 3fr 52px;align-items:center;gap:14px}.level-coverage-bars article strong,.level-coverage-bars article span{display:block}.level-coverage-bars article span{font-size:11px;color:#64748b}.progress-track{height:10px;border-radius:999px;background:#e2e8f0;overflow:hidden}.progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#b91c1c,#f97316)}.level-coverage-bars em{text-align:right;font-style:normal;font-weight:900}.extra-summary-detail th,.extra-summary-detail td{text-align:center}.extra-summary-detail th:nth-child(3),.extra-summary-detail td:nth-child(3){text-align:left}
@media(max-width:1100px){.extra-member-toolbar{display:block}.member-filter-grid{grid-template-columns:repeat(2,1fr)}.import-member-form{margin-top:12px}.candidate-list{grid-template-columns:1fr}}@media(max-width:700px){.field-with-button{display:grid}.member-filter-grid{grid-template-columns:1fr}.candidate-row{grid-template-columns:auto 34px 1fr}.candidate-row em,.candidate-row b{grid-column:3}.level-coverage-bars article{grid-template-columns:1fr 48px}.level-coverage-bars .progress-track{grid-column:1/-1}.unsubmit-card{align-items:flex-start;flex-direction:column}}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font-family: var(--font-main); }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); letter-spacing: -0.025em; }
.muted { color: var(--muted); }

/* OLLC STANDARD LOGIN STYLE */
.login-body { min-height: 100vh; background: #f3f4f6; }
.login-page-approved,
.login-page-simple {
    min-height: 100vh;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}
.login-left { display: none; }
.login-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
}
.login-card-approved,
.login-card-simple {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    padding: 42px 42px 34px;
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(15,23,42,.08);
    text-align: center;
}
.login-card-approved::before,
.login-card-simple::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 5px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(90deg, #f97316 0%, #f97316 55%, #3b82f6 100%);
}
.login-card-logo {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    margin: 0 auto 20px;
    background: #fff;
    border: 1px solid #edf2f7;
    object-fit: contain;
    display: block;
    box-shadow: 0 10px 25px rgba(15,23,42,.05);
    padding: 0;
}
.login-card-approved h2 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
}
.login-card-approved .welcome-text {
    margin: 10px auto 28px;
    max-width: 370px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.65;
}
.login-form-approved { display: flex; flex-direction: column; gap: 18px; text-align: left; }
.login-form-approved .field-group { margin: 0; }
.field-group label,
.setup-form label,
.filter-field label {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 9px;
}
.form-control,
.filter-field select,
.filter-field input,
.setup-form textarea,
.setup-form input,
.setup-form select {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid #d9e1ec;
    background: #fff;
    color: #0f172a;
    font-size: 15px;
    outline: none;
    transition: .18s ease;
}
textarea.form-control,
.setup-form textarea { height: auto; min-height: 108px; padding-top: 14px; resize: vertical; }
.form-control:focus,
.filter-field select:focus,
.filter-field input:focus,
.setup-form textarea:focus,
.setup-form input:focus,
.setup-form select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249,115,22,.10);
}
.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}
.remember-label { display: inline-flex; align-items: center; gap: 10px; }
.remember-label input { width: 18px; height: 18px; accent-color: var(--orange); }
.forgot-link { color: var(--orange); font-weight: 800; }
.btn-signin {
    margin-top: 2px;
    height: 60px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #f97316 65%, #ea580c);
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(249,115,22,.20);
}
.btn-signin:hover { transform: translateY(-1px); }
.login-access-note {
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
.login-access-note strong { color: #f97316; }
.alert { padding: 11px 13px; border-radius: 13px; font-size: 13px; margin: 0 0 16px; }
.alert-danger { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }

/* ROLE SELECTION - OLLC CARD STYLE */
.role-page-approved {
    min-height: 100vh;
    padding: 28px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.role-shell-approved { width: min(980px, 96vw); }
.role-header-card,
.role-tile-approved {
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 26px;
    box-shadow: 0 18px 50px rgba(15,23,42,.08);
}
.role-header-card { padding: 34px; text-align: center; }
.role-header-card img { width: 86px; height: 86px; object-fit: contain; }
.role-header-card h1 { margin: 16px 0 8px; font-size: 30px; font-weight: 850; }
.role-header-card p { margin: 0; color: var(--muted); }
.role-grid-approved { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 18px; }
.role-form { margin: 0; }
.role-tile-approved { width: 100%; min-height: 138px; text-align: left; padding: 20px; cursor: pointer; transition: .16s ease; }
.role-tile-approved:hover { transform: translateY(-2px); border-color: var(--orange-line); box-shadow: 0 18px 44px rgba(249,115,22,.13); }
.role-badge { width: 52px; height: 52px; border-radius: 17px; background: var(--orange-soft); color: var(--orange-dark); display: grid; place-items: center; font-weight: 900; margin-bottom: 14px; }
.role-tile-approved strong { display: block; font-size: 18px; }
.role-tile-approved small { display: block; color: var(--muted); margin-top: 6px; }
.plain { display: inline-flex; margin-top: 18px; color: var(--orange-dark); font-weight: 900; }

/* OLLC STANDARD APP SHELL */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    background: linear-gradient(180deg,#111827,#1f2937);
    color: #cbd5e1;
    padding: 24px;
    z-index: 30;
    overflow: auto;
}
.brand-box,
.brand-wrap { display: flex; align-items: center; gap: 13px; }
.brand-box { margin-bottom: 24px; }
.brand-box img,
.login-brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: #FFFFFF;
    padding: 5px;
    object-fit: contain;
    box-shadow: 0 16px 34px rgba(249,115,22,.20);
}
.brand-box strong,
.brand-title { color: #fff; font-size: 16px; line-height: 1.15; letter-spacing: .02em; display: block; max-width: 180px; }
.brand-city,
.brand-subtitle { display: block; margin-top: 4px; color: #CBD5E1; font-size: 12px; }
.brand-system { display: block; margin-top: 4px; color: #FDBA74; font-size: 12px; font-weight: 800; }
.nav-menu { display: grid; gap: 8px; margin-top: 24px; padding-bottom: 18px; }
.nav-section,
.side-group {
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.025);
    border-radius: 18px;
    overflow: hidden;
}
.nav-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: 11px;
    text-align: left;
}
.nav-section-toggle:hover { color: #fff; background: rgba(249,115,22,.08); }
.nav-section-title { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.nav-section-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--orange); box-shadow: 0 0 0 5px rgba(249,115,22,.12); flex: 0 0 auto; }
.nav-section-chevron { width: 18px; height: 18px; flex: 0 0 auto; transition: transform .18s ease; }
.nav-section-chevron svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-section.open .nav-section-chevron { transform: rotate(180deg); }
.nav-section-body { display: none; gap: 6px; padding: 0 8px 10px; }
.nav-section.open .nav-section-body { display: grid; }
.nav-item,
.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 10px;
    border-radius: 15px;
    color: #cbd5e1;
    font-weight: 750;
}
.nav-item:hover,
.nav-item.active,
.side-nav a:hover,
.side-nav a.active { background: rgba(249,115,22,.14); color: #FFFFFF; }
.nav-item.active,
.side-nav a.active { box-shadow: inset 3px 0 0 var(--orange); }
.nav-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 11px;
    background: rgba(249,115,22,.12);
    color: var(--orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon,
.side-nav a:hover .nav-icon,
.side-nav a.active .nav-icon { background: var(--orange); color: #fff; }
.sidebar-note,
.sidebar-footer-card {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.09);
    font-size: 13px;
    line-height: 1.5;
}
.sidebar-note strong,
.sidebar-footer-card strong { color: #FFFFFF; display: block; margin-bottom: 4px; }
.sidebar-footer-card span { display: block; color: #CBD5E1; }
.sidebar-footer-card a { color: #FDBA74; font-weight: 900; }
.content-area,
.main-area {
    margin-left: 290px;
    width: calc(100% - 290px);
    padding: 24px;
}
.layout-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }
.layout-overlay.show { display: block; }
.page-body { padding: 22px 0; }

/* TOPBAR / PAGE HEADER */
.topbar,
.page-header {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .06);
    margin-bottom: 22px;
}
.page-kicker,
.page-eyebrow {
    color: var(--orange-dark);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .11em;
}
.topbar h1,
.page-header h1 { margin: 2px 0 0; font-size: 24px; font-weight: 800; line-height: 1.12; }
.page-header p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.mobile-menu { display: none; border: 0; background: var(--orange); color: #fff; width: 42px; height: 42px; border-radius: 14px; }
.mobile-menu svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.user-chip,
.student-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 8px 12px;
    min-width: 230px;
}
.chip-avatar,
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--orange-soft);
    color: var(--orange-dark);
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: 0 0 auto;
}
.user-chip small,
.student-chip-text span { display: block; color: var(--muted); }
.chip-caret { margin-left: auto; color: #94a3b8; }
.student-menu { position: relative; }
.student-menu-toggle { cursor: pointer; justify-content: flex-start; }
.student-menu-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 250px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15,23,42,.16);
    z-index: 60;
}
.student-menu.open .student-menu-panel { display: grid; gap: 4px; }
.student-menu-panel a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; color: #334155; font-weight: 850; font-size: 13px; }
.student-menu-panel a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.student-menu-panel svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* COMMON MODULE CARDS */
.btn {
    border: 0;
    border-radius: 14px;
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; box-shadow: 0 12px 24px rgba(249,115,22,.25); }
.btn-secondary,
.btn-outline,
.btn-blue { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn-blue { color: var(--blue-dark); border-color: #bfdbfe; background: var(--blue-soft); }
.btn.full { width: 100%; }
.hero-panel,
.hero-card {
    background: linear-gradient(135deg, var(--sidebar), var(--sidebar-soft) 58%, var(--orange-dark));
    color: #FFFFFF;
    border-radius: 30px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}
.hero-panel h2,
.hero-card h2 { font-size: 32px; font-weight: 800; margin: 6px 0; color: #FFFFFF; }
.hero-panel p,
.hero-card p { color: rgba(255,255,255,.82); line-height: 1.6; margin: 0; }
.welcome-label { color: var(--orange-line); font-size: 12px; text-transform: uppercase; font-weight: 900; letter-spacing: .12em; }
.hero-badge { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 999px; padding: 10px 14px; font-weight: 900; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stats-grid.five { grid-template-columns: repeat(5, 1fr); }
.stats-grid.six { grid-template-columns: repeat(6, 1fr); }
.stat-card,
.panel-card,
.filter-card,
.preview-table-card,
.grade-sheet-panel,
.step-card,
.info-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 14px 42px rgba(15,23,42,.06);
}
.stat-card { padding: 18px; display: flex; align-items: center; gap: 14px; min-height: 104px; }
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 750; }
.stat-card strong { display: block; color: var(--ink); font-size: 25px; margin-top: 2px; }
.stat-card small { color: var(--muted); }
.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--orange-soft);
    color: var(--orange-dark);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}
.panel-card,
.filter-card,
.preview-table-card,
.grade-sheet-panel,
.info-box { padding: 22px; }
.panel-card h2,
.panel-card h3,
.filter-card h3 { margin: 0 0 8px; }
.panel-sub { margin: 0 0 16px; color: var(--muted); line-height: 1.55; }
.panel-title-row,
.grade-title-row,
.action-bar,
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr); gap: 18px; }
.grid-two { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); gap: 18px; }
.wide-card { min-width: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    transition: .18s ease;
    min-height: 88px;
}
.quick-action:hover { border-color: var(--orange-line); background: var(--orange-soft); transform: translateY(-1px); }
.quick-action .stat-icon { width: 44px; height: 44px; border-radius: 15px; }
.quick-action strong { display: block; color: var(--ink); }
.quick-action small { color: var(--muted); }
.chev { margin-left: auto; color: var(--orange-dark); font-weight: 900; }
.view-all { color: var(--orange-dark); font-weight: 900; }

/* TABLES */
.data-table,
.report-table,
.grade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.data-table th,
.report-table th,
.grade-table th {
    background: #F8FAFC;
    color: #475569;
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid var(--line);
    padding: 12px;
}
.data-table td,
.report-table td,
.grade-table td { border-bottom: 1px solid #F1F5F9; padding: 12px; vertical-align: middle; }
.data-table tr:last-child td,
.report-table tr:last-child td,
.grade-table tr:last-child td { border-bottom: 0; }
.data-table small { color: var(--muted); }
.permission-table th,
.permission-table td { text-align: center; }
.permission-table th:first-child,
.permission-table td:first-child { text-align: left; }
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}
.status-pill.green,.green { background: var(--green-soft); color: #047857; }
.status-pill.blue,.blue { background: var(--blue-soft); color: var(--blue-dark); }
.status-pill.amber,.amber { background: var(--yellow-soft); color: #B45309; }
.status-pill.red,.red { background: var(--red-soft); color: #B91C1C; }
.status-pill.gray,.gray { background: #F1F5F9; color: #475569; }
.status-pill.purple,.purple { background: #F5F3FF; color: #6D28D9; }

/* FILTERS / FORMS */
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; }
.filter-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.small-select { max-width: 260px; height: 46px; border-radius: 14px; }
.setup-form { display: grid; gap: 12px; }
.check-row { display: flex !important; gap: 8px; align-items: center; }
.check-row input { width: auto; height: auto; }
.mini-icon { width: 28px; height: 28px; border-radius: 10px; background: var(--orange-soft); color: var(--orange-dark); display: inline-flex; vertical-align: middle; margin-right: 8px; position: relative; overflow: hidden; }

/* UPLOAD / PROCESS */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.drop-zone { border: 2px dashed var(--orange-line); border-radius: 24px; padding: 34px; text-align: center; background: var(--orange-soft); }
.upload-mark { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 24px; background: #fff; color: var(--orange-dark); position: relative; box-shadow: 0 12px 30px rgba(249,115,22,.12); }
.upload-steps { display: grid; gap: 12px; }
.step-card { padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.step-no { width: 30px; height: 30px; border-radius: 12px; background: var(--orange-soft); color: var(--orange-dark); display: grid; place-items: center; font-weight: 900; }
.file-name { font-weight: 900; color: var(--ink); }

/* REPORT PREVIEW */
.report-preview {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 14px 42px rgba(15,23,42,.06);
    overflow-x: auto;
}
.report-header { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.report-header img { width: 70px; height: 70px; object-fit: contain; }
.report-header h2 { margin: 0; font-size: 18px; letter-spacing: .02em; }
.report-header p { margin: 3px 0; color: var(--muted); }
.report-title { margin-top: 8px; font-weight: 900; color: var(--ink); }
.report-line { height: 1px; background: var(--line); margin: 16px 0; }
.report-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; font-size: 13px; line-height: 1.6; }
.report-table { min-width: 980px; font-size: 12px; }
.report-table th,
.report-table td { text-align: center; padding: 8px; }
.report-table .name { text-align: left; font-weight: 800; }
.signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; text-align: center; font-weight: 800; }
.signature-grid div { border-top: 1px solid var(--ink); padding-top: 8px; }

/* CSS ICONS - no emoji / no webfont */
.nav-icon:before,.nav-icon:after,
.stat-icon:before,.stat-icon:after,
.mini-icon:before,.mini-icon:after,
.upload-mark:before,.upload-mark:after { content:""; position:absolute; display:block; box-sizing:border-box; }
.nav-icon:before,.nav-icon:after { --c: currentColor; }
.stat-icon:before,.stat-icon:after,.mini-icon:before,.mini-icon:after,.upload-mark:before,.upload-mark:after { --c: currentColor; }
.icon-dashboard:before { width: 7px; height: 7px; background: var(--c); left: 8px; top: 8px; border-radius: 2px; box-shadow: 10px 0 0 var(--c), 0 10px 0 var(--c), 10px 10px 0 var(--c); }
.stat-icon.icon-dashboard:before { left: 19px; top: 19px; width: 9px; height: 9px; box-shadow: 13px 0 0 var(--c), 0 13px 0 var(--c), 13px 13px 0 var(--c); }
.mini-icon.icon-dashboard:before { left: 7px; top: 7px; width: 5px; height: 5px; box-shadow: 9px 0 0 var(--c), 0 9px 0 var(--c), 9px 9px 0 var(--c); }
.icon-users:before,.icon-userrole:before,.icon-role:before { width: 12px; height: 12px; border: 2px solid var(--c); border-radius: 50%; left: 10px; top: 7px; }
.icon-users:after,.icon-userrole:after,.icon-role:after { width: 22px; height: 12px; border: 2px solid var(--c); border-radius: 14px 14px 5px 5px; left: 5px; top: 21px; }
.stat-icon.icon-users:before,.stat-icon.icon-userrole:before,.stat-icon.icon-role:before { width: 16px; height: 16px; left: 21px; top: 14px; }
.stat-icon.icon-users:after,.stat-icon.icon-userrole:after,.stat-icon.icon-role:after { width: 34px; height: 17px; left: 12px; top: 37px; }
.mini-icon.icon-users:before,.mini-icon.icon-userrole:before,.mini-icon.icon-role:before { width: 9px; height: 9px; left: 9px; top: 5px; }
.mini-icon.icon-users:after,.mini-icon.icon-userrole:after,.mini-icon.icon-role:after { width: 18px; height: 9px; left: 5px; top: 17px; }
.icon-grade:before,.icon-shield:after { width: 18px; height: 10px; border-left: 4px solid var(--c); border-bottom: 4px solid var(--c); left: 7px; top: 11px; transform: rotate(-45deg); }
.stat-icon.icon-grade:before,.stat-icon.icon-shield:after { width: 28px; height: 16px; left: 15px; top: 21px; border-left-width: 5px; border-bottom-width: 5px; }
.mini-icon.icon-grade:before,.mini-icon.icon-shield:after { width: 14px; height: 8px; left: 6px; top: 9px; border-left-width: 3px; border-bottom-width: 3px; }
.icon-report:before,.icon-module:before,.icon-clipboard:before { width: 18px; height: 23px; border: 2px solid var(--c); border-radius: 4px; left: 7px; top: 5px; }
.icon-report:after,.icon-clipboard:after { width: 10px; height: 2px; background: var(--c); left: 11px; top: 12px; box-shadow: 0 6px 0 var(--c), 0 12px 0 var(--c); }
.stat-icon.icon-report:before,.stat-icon.icon-module:before,.stat-icon.icon-clipboard:before { width: 28px; height: 34px; left: 15px; top: 12px; border-width: 3px; }
.stat-icon.icon-report:after,.stat-icon.icon-clipboard:after { width: 18px; height: 3px; left: 20px; top: 22px; box-shadow: 0 9px 0 var(--c), 0 18px 0 var(--c); }
.mini-icon.icon-report:before,.mini-icon.icon-module:before,.mini-icon.icon-clipboard:before { width: 15px; height: 18px; left: 7px; top: 5px; }
.mini-icon.icon-report:after,.mini-icon.icon-clipboard:after { width: 9px; height: 2px; left: 10px; top: 10px; box-shadow: 0 5px 0 var(--c), 0 10px 0 var(--c); }
.icon-module:before { width: 9px; height: 9px; box-shadow: 11px 0 0 -2px #fff, 11px 0 0 0 var(--c), 0 11px 0 -2px #fff, 0 11px 0 0 var(--c), 11px 11px 0 -2px #fff, 11px 11px 0 0 var(--c); }
.nav-icon.icon-module:before { box-shadow: 11px 0 0 -2px rgba(249,115,22,.12),11px 0 0 0 var(--c),0 11px 0 -2px rgba(249,115,22,.12),0 11px 0 0 var(--c),11px 11px 0 -2px rgba(249,115,22,.12),11px 11px 0 0 var(--c); }
.icon-upload:before,.upload-mark:before { width: 4px; height: 20px; background: var(--c); left: 14px; top: 8px; border-radius: 3px; }
.icon-upload:after,.upload-mark:after { width: 14px; height: 14px; border-left: 4px solid var(--c); border-top: 4px solid var(--c); left: 9px; top: 8px; transform: rotate(45deg); }
.stat-icon.icon-upload:before { height: 30px; left: 27px; top: 17px; }
.stat-icon.icon-upload:after { width: 22px; height: 22px; left: 18px; top: 17px; border-left-width: 5px; border-top-width: 5px; }
.mini-icon.icon-upload:before { height: 17px; left: 13px; top: 7px; width: 3px; }
.mini-icon.icon-upload:after { width: 12px; height: 12px; left: 8px; top: 7px; border-left-width: 3px; border-top-width: 3px; }
.upload-mark:before { left: 36px; top: 22px; height: 28px; }
.upload-mark:after { left: 29px; top: 22px; width: 18px; height: 18px; }
.icon-shield:before { width: 20px; height: 24px; border: 2px solid var(--c); left: 6px; top: 4px; border-radius: 12px 12px 15px 15px; }
.stat-icon.icon-shield:before { width: 31px; height: 39px; left: 14px; top: 9px; border-width: 3px; }
.mini-icon.icon-shield:before { width: 16px; height: 19px; left: 6px; top: 5px; }
.icon-permission:before { width: 20px; height: 15px; border: 2px solid var(--c); border-radius: 4px; left: 6px; top: 16px; }
.icon-permission:after { width: 14px; height: 13px; border: 3px solid var(--c); border-bottom: 0; border-radius: 12px 12px 0 0; left: 9px; top: 5px; }
.stat-icon.icon-permission:before { width: 30px; height: 23px; left: 14px; top: 30px; border-width: 3px; }
.stat-icon.icon-permission:after { width: 21px; height: 20px; left: 19px; top: 11px; border-width: 4px; border-bottom: 0; }
.mini-icon.icon-permission:before { width: 16px; height: 12px; left: 6px; top: 14px; }
.mini-icon.icon-permission:after { width: 11px; height: 10px; left: 9px; top: 6px; }
.icon-calendar:before { width: 22px; height: 21px; border: 2px solid var(--c); border-radius: 4px; left: 5px; top: 7px; }
.icon-calendar:after { width: 22px; height: 5px; background: var(--c); left: 5px; top: 12px; box-shadow: 5px 9px 0 -1px var(--c), 14px 9px 0 -1px var(--c); }
.stat-icon.icon-calendar:before { width: 36px; height: 32px; left: 11px; top: 16px; border-width: 3px; }
.stat-icon.icon-calendar:after { width: 36px; height: 7px; left: 11px; top: 23px; box-shadow: 8px 14px 0 -2px var(--c), 22px 14px 0 -2px var(--c); }
.mini-icon.icon-calendar:before { width: 18px; height: 16px; left: 5px; top: 7px; }
.mini-icon.icon-calendar:after { width: 18px; height: 4px; left: 5px; top: 11px; }

@media (max-width: 1280px) {
    .stats-grid,
    .stats-grid.five,
    .stats-grid.six { grid-template-columns: repeat(2, 1fr); }
    .quick-grid.three,
    .quick-grid.four,
    .quick-grid.five,
    .report-category-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid,
    .upload-grid,
    .grid-two { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
    .sidebar { transform: translateX(-100%); transition: .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .content-area,
    .main-area { margin-left: 0; width: 100%; }
    .mobile-menu { display: inline-grid; place-items: center; }
}
@media (max-width: 760px) {
    .login-page-approved { padding: 14px; align-items: flex-start; }
    .login-card-approved { max-width: 100%; padding: 34px 22px 28px; border-radius: 24px; margin-top: 10px; }
    .login-card-logo { width: 82px; height: 82px; }
    .login-card-approved h2 { font-size: 24px; }
    .form-control,
    .btn-signin { height: 56px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .user-chip { min-width: 100%; }
    .stats-grid,
    .stats-grid.five,
    .stats-grid.six,
    .quick-grid,
    .quick-grid.three,
    .quick-grid.four,
    .quick-grid.five,
    .filter-grid,
    .filter-grid.five,
    .report-category-grid,
    .report-meta,
    .signature-grid { grid-template-columns: 1fr; }
    .hero-panel { align-items: flex-start; flex-direction: column; }
}
.layout-mobile-menu { margin-bottom: 12px; }
@media (min-width: 1051px) { .layout-mobile-menu { display: none !important; } }

/* NSDGA FULL GRADING PROCESS */
.table-scroll { width: 100%; overflow-x: auto; }
.empty-cell { text-align: center; color: var(--muted); padding: 26px !important; }
.actions-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini-link { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid var(--orange-line); background: var(--orange-soft); color: var(--orange-dark); border-radius: 10px; font-weight: 900; font-size: 12px; }
.mini-link:hover { background: var(--orange); color: #fff; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 2px; }
.mini-input { height: 34px; min-width: 150px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; outline: none; }
.mini-button { height: 34px; border: 0; border-radius: 10px; padding: 0 12px; background: var(--sidebar-soft); color: #fff; font-weight: 900; cursor: pointer; }
.mini-button.primary { background: var(--orange); }
.wide-score-scroll { max-height: 72vh; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.wide-score-table { min-width: 2600px; }
.wide-score-table th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.wide-score-table thead tr:nth-child(2) th { top: 43px; }
.wide-score-table thead tr:nth-child(3) th { top: 86px; }
.student-name-col { min-width: 240px; position: sticky; left: 0; background: #fff; z-index: 1; }
thead .student-name-col { background: #f8fafc; z-index: 3; }
.score-input { width: 72px; height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; text-align: center; }
.score-meta-input { width: 70px; height: 32px; border: 1px solid var(--orange-line); border-radius: 10px; padding: 0 8px; text-align: center; background: #fff7ed; font-weight: 800; }
.score-date-input { display: block; width: 118px; height: 30px; border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; margin-bottom: 4px; font-size: 11px; }
.score-desc-input { display: block; width: 118px; height: 30px; border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; font-size: 11px; }
button[disabled], .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* NSDGA GRADING UX ENHANCEMENTS */
.sidebar-account-card { display: grid; gap: 12px; }
.sidebar-account-top { display: flex; align-items: center; gap: 11px; }
.sidebar-avatar { width: 42px; height: 42px; border-radius: 15px; background: #fff7ed; color: #ea580c; display: grid; place-items: center; font-weight: 900; }
.sidebar-account-card span { display: block; color: #cbd5e1; font-size: 12px; }
.sidebar-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-action { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 13px; background: rgba(255,255,255,.07); color: #e5e7eb; font-size: 12px; font-weight: 900; }
.sidebar-action:hover { background: rgba(249,115,22,.20); color: #fff; }
.sidebar-action.logout { background: rgba(249,115,22,.16); color: #fed7aa; }
.sidebar-action .mini-icon { margin: 0; width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.08); }

.student-menu-toggle { border: 0; background: #fff; }
.student-menu-panel .mini-icon { margin-right: 0; }
.encoding-filter-grid { grid-template-columns: repeat(6, minmax(140px, 1fr)) 160px; }
.compact-filter .filter-field input,
.compact-filter .filter-field select { height: 48px; border-radius: 15px; }
.compact-stats .stat-card { min-height: 94px; }
.friendly-encoding-panel { padding: 0; overflow: hidden; }
.sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
}
.encoding-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.toolbar-title { display: grid; gap: 4px; }
.toolbar-title strong { color: var(--ink); font-size: 17px; }
.toolbar-title small { color: var(--muted); font-weight: 700; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.encoding-info-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 20px 0; }
.hint-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.submission-checklist { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; padding: 14px 20px 16px; }
.check-item { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 14px; background: #f8fafc; color: #64748b; font-weight: 850; font-size: 12px; border: 1px solid #e5e7eb; }
.check-item span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-block; position: relative; }
.check-item.ok { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.check-item.ok span { border-color: #16a34a; background: #16a34a; }
.check-item.ok span:after { content: ""; position: absolute; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; left: 3px; top: 4px; transform: rotate(-45deg); }
.check-item.bad { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.friendly-score-scroll { margin: 0 20px 20px; max-height: calc(100vh - 330px); border-radius: 20px; }
.friendly-grade-table { min-width: 1520px; }
.friendly-grade-table th { text-align: center; }
.friendly-grade-table td { text-align: center; }
.friendly-grade-table .student-name-col { text-align: left; min-width: 265px; }
.sticky-col { position: sticky; background: #fff; z-index: 4; }
thead .sticky-col { background: #f8fafc; z-index: 8; }
.row-no-col { left: 0; min-width: 54px; }
.student-no-col { left: 54px; min-width: 116px; }
.student-name-col { left: 170px; }
.friendly-grade-table .score-input { width: 82px; height: 38px; font-weight: 800; }
.score-input.invalid-score { border-color: #dc2626; background: #fef2f2; color: #b91c1c; box-shadow: 0 0 0 3px rgba(220,38,38,.08); }
.score-input.missing-score { border-color: #f59e0b; background: #fffbeb; }
.hps-input { width: 76px; }
.report-suite-block { margin-top: 18px; }
.printable-report { margin-bottom: 30px; }
.no-print { }

/* Additional polished CSS icons */
.icon-print:before { width: 20px; height: 15px; border: 2px solid var(--c); border-radius: 4px; left: 6px; top: 11px; }
.icon-print:after { width: 14px; height: 10px; border: 2px solid var(--c); background: #fff; left: 9px; top: 4px; box-shadow: 0 18px 0 -2px #fff, 0 18px 0 0 var(--c); }
.stat-icon.icon-print:before { width: 32px; height: 22px; left: 13px; top: 22px; border-width: 3px; }
.stat-icon.icon-print:after { width: 22px; height: 15px; left: 18px; top: 12px; border-width: 3px; }
.icon-download:before { width: 4px; height: 20px; background: var(--c); left: 14px; top: 5px; border-radius: 3px; }
.icon-download:after { width: 14px; height: 14px; border-right: 4px solid var(--c); border-bottom: 4px solid var(--c); left: 9px; top: 11px; transform: rotate(45deg); box-shadow: 8px 8px 0 -6px var(--c); }
.icon-logout:before { width: 16px; height: 20px; border: 2px solid var(--c); border-right: 0; border-radius: 4px 0 0 4px; left: 5px; top: 6px; }
.icon-logout:after { width: 14px; height: 2px; background: var(--c); left: 15px; top: 15px; box-shadow: 7px 0 0 var(--c); }
.icon-save:before { width: 20px; height: 20px; border: 2px solid var(--c); border-radius: 4px; left: 6px; top: 6px; }
.icon-save:after { width: 10px; height: 6px; border: 2px solid var(--c); left: 11px; top: 18px; }
.icon-check:before { width: 18px; height: 10px; border-left: 4px solid var(--c); border-bottom: 4px solid var(--c); left: 7px; top: 10px; transform: rotate(-45deg); }
.icon-warning:before { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 22px solid var(--c); left: 4px; top: 5px; }
.icon-warning:after { width: 3px; height: 9px; background: #fff; left: 14px; top: 14px; box-shadow: 0 11px 0 #fff; }
.icon-eye:before { width: 24px; height: 15px; border: 2px solid var(--c); border-radius: 18px / 12px; left: 4px; top: 9px; }
.icon-eye:after { width: 8px; height: 8px; background: var(--c); border-radius: 50%; left: 12px; top: 13px; }
.icon-back:before { width: 16px; height: 16px; border-left: 4px solid var(--c); border-bottom: 4px solid var(--c); left: 9px; top: 8px; transform: rotate(45deg); }
.icon-back:after { width: 17px; height: 4px; background: var(--c); left: 10px; top: 15px; border-radius: 3px; }
.icon-refresh:before { width: 20px; height: 20px; border: 3px solid var(--c); border-right-color: transparent; border-radius: 50%; left: 6px; top: 6px; }
.icon-refresh:after { width: 8px; height: 8px; border-top: 3px solid var(--c); border-right: 3px solid var(--c); left: 20px; top: 5px; transform: rotate(20deg); }
.icon-chart:before { width: 4px; height: 15px; background: var(--c); left: 8px; top: 13px; box-shadow: 7px -6px 0 var(--c), 14px -11px 0 var(--c); }
.icon-chart:after { width: 22px; height: 2px; background: var(--c); left: 5px; top: 28px; }

@media print {
    .sidebar, .page-header.no-print, .layout-mobile-menu, .layout-overlay { display: none !important; }
    .main-area { margin-left: 0 !important; width: 100% !important; padding: 0 !important; }
    body { background: #fff !important; }
    .report-preview { box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }
}
@media (max-width: 1450px) {
    .encoding-filter-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
    .submission-checklist { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .submission-checklist { grid-template-columns: 1fr; }
    .sidebar-account-actions { grid-template-columns: 1fr; }
}

/* SVG ICON STANDARD - aligned with OLLC portal inline SVG style */
.nav-icon,
.stat-icon,
.mini-icon,
.guide-icon,
.empty-icon,
.class-avatar-icon,
.svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--orange);
}
.nav-icon::before, .nav-icon::after,
.stat-icon::before, .stat-icon::after,
.mini-icon::before, .mini-icon::after,
.guide-icon::before, .guide-icon::after,
.empty-icon::before, .empty-icon::after,
.class-avatar-icon::before, .class-avatar-icon::after { display: none !important; }
.nav-icon svg,
.stat-icon svg,
.mini-icon svg,
.guide-icon svg,
.empty-icon svg,
.class-avatar-icon svg,
.svg-icon svg,
.student-menu-panel svg,
.nav-section-chevron svg,
.mobile-menu svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #e5e7eb;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    box-shadow: 0 10px 22px rgba(249,115,22,.28);
}
.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: var(--orange-soft);
    border: 1px solid #ffedd5;
    color: var(--orange-dark);
}
.stat-icon svg { width: 30px; height: 30px; stroke-width: 2.1; }
.mini-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: currentColor;
}
.mini-icon svg { width: 18px; height: 18px; }
.btn .mini-icon { margin-right: 8px; }
.sidebar-action .mini-icon { background: rgba(255,255,255,.08); color: #e5e7eb; margin-right: 8px; }
.student-menu-panel .mini-icon { color: var(--orange); margin-right: 10px; }
.guide-icon {
    width: 46px;
    height: 46px;
    border-radius: 17px;
    background: var(--orange-soft);
    border: 1px solid #ffedd5;
}
.empty-icon {
    width: 74px;
    height: 74px;
    border-radius: 26px;
    background: var(--orange-soft);
    border: 1px solid #ffedd5;
    color: var(--orange-dark);
    margin-bottom: 16px;
}
.empty-icon svg { width: 36px; height: 36px; }

/* Cleaner encoding workspace */
.simple-page-header { margin-bottom: 18px; }
.encoding-class-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 28px;
    margin-bottom: 18px;
    border-radius: 28px;
    background: linear-gradient(135deg, #111827 0%, #2c2430 48%, #e64600 100%);
    color: #fff;
    box-shadow: 0 18px 45px rgba(15,23,42,.12);
}
.encoding-class-card h2,
.encoding-class-card p { color: #fff; margin: 0; }
.encoding-class-card h2 { font-size: 32px; line-height: 1.1; margin: 6px 0 8px; }
.encoding-class-card p { color: rgba(255,255,255,.84); font-size: 16px; }
.encoding-class-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.class-avatar {
    width: 82px;
    height: 82px;
    border-radius: 28px;
    background: rgba(255,255,255,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.18);
}
.class-avatar-icon { color: #fff; }
.class-avatar-icon svg { width: 42px; height: 42px; }
.encoding-class-status { display: flex; align-items: center; gap: 12px; }
.encoding-class-status .btn { background: #fff; }
.encoding-selector-card { padding: 22px; }
.component-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.component-toolbar-title h3 { margin: 0 0 6px; font-size: 20px; }
.component-toolbar-title p { margin: 0; color: var(--muted); }
.component-control-grid { display: grid; grid-template-columns: 180px minmax(260px, 1fr) auto; gap: 14px; align-items: end; min-width: 620px; }
.component-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.component-guide {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
}
.component-guide strong { display: block; color: var(--ink); }
.component-guide small { color: var(--muted); }
.component-guide.active {
    border-color: var(--orange-line);
    background: linear-gradient(135deg, #fff 0%, var(--orange-soft) 100%);
    box-shadow: 0 14px 26px rgba(249,115,22,.10);
}
.empty-state-card {
    min-height: 260px;
    border: 1px dashed #fed7aa;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px;
    margin-top: 18px;
}
.empty-state-card h3 { margin: 0 0 8px; font-size: 24px; }
.empty-state-card p { margin: 0 0 20px; color: var(--muted); max-width: 460px; }
.friendly-encoding-panel {
    margin-top: 18px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.clean-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    top: 0;
    z-index: 14;
}
.clean-toolbar .toolbar-title strong { font-size: 18px; color: var(--ink); display: block; }
.clean-toolbar .toolbar-title small { color: var(--muted); }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.encoding-workspace {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 0;
    min-height: 580px;
}
.encoding-side-panel {
    background: #fbfdff;
    border-right: 1px solid var(--line);
    padding: 20px;
}
.side-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 14px;
}
.side-box h4 { margin: 0 0 14px; color: var(--ink); font-size: 16px; }
.side-box.soft-note { display: flex; gap: 10px; align-items: flex-start; background: var(--orange-soft); border-color: #ffedd5; }
.side-box.soft-note p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.submission-checklist.vertical { display: grid; gap: 10px; }
.submission-checklist.vertical .check-item { margin: 0; }
.encoding-main-panel { padding: 20px; min-width: 0; }
.score-setup-card,
.grade-table-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    padding: 18px;
    margin-bottom: 18px;
}
.compact-row { align-items: center; margin-bottom: 14px; }
.score-setup-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 14px;
}
.score-setup-grid.single { grid-template-columns: minmax(220px, 360px); }
.score-setup-item {
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
}
.score-setup-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.score-setup-heading strong { color: var(--ink); }
.score-setup-heading span { font-size: 11px; font-weight: 800; color: var(--orange-dark); text-transform: uppercase; letter-spacing: .08em; }
.score-setup-item label { display: block; font-size: 11px; font-weight: 800; color: var(--muted); margin: 9px 0 5px; text-transform: uppercase; letter-spacing: .06em; }
.score-setup-item input,
.clean-grade-table .score-input {
    width: 100%;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #d9e1ec;
    padding: 0 11px;
    outline: none;
    background: #fff;
}
.score-setup-item input:focus,
.clean-grade-table .score-input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.12); }
.clean-grade-table th { white-space: nowrap; }
.clean-grade-table th,
.clean-grade-table td { padding: 13px 12px; }
.clean-grade-table .score-input { text-align: center; font-weight: 800; }
.clean-grade-table .student-name-col { min-width: 260px; }
.clean-grade-table .student-no-col { min-width: 120px; }
.clean-grade-table .row-no-col { min-width: 56px; text-align: center; }
.clean-grade-table .final { font-weight: 900; color: var(--ink); text-align: center; }
.invalid-score { border-color: var(--red) !important; background: var(--red-soft) !important; }
.missing-score { border-color: var(--yellow) !important; background: var(--yellow-soft) !important; }
.clean-admin-table td:first-child { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1180px) {
    .component-toolbar { align-items: stretch; flex-direction: column; }
    .component-control-grid { min-width: 0; grid-template-columns: 1fr 1fr; }
    .component-control-grid .btn { grid-column: 1 / -1; }
    .encoding-workspace { grid-template-columns: 1fr; }
    .encoding-side-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .score-setup-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
}
@media (max-width: 760px) {
    .encoding-class-card { flex-direction: column; align-items: flex-start; }
    .encoding-class-status { width: 100%; justify-content: space-between; }
    .component-control-grid,
    .component-guide-grid,
    .score-setup-grid { grid-template-columns: 1fr; }
    .clean-toolbar { align-items: flex-start; flex-direction: column; }
    .toolbar-actions .btn { width: 100%; justify-content: center; }
}

/* VB6-classic inspired grade encoding layout */
.compact-page-header {
    align-items: flex-start;
}
.classic-class-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 54%, #f8fafc 100%);
    border: 1px solid #fed7aa;
    border-radius: 22px;
    padding: 18px 20px;
    margin: 0 0 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.classic-class-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 260px;
}
.classic-class-title strong {
    display: block;
    font-size: 20px;
    color: #111827;
    line-height: 1.1;
}
.classic-class-title span:not(.classic-class-icon) {
    color: #64748b;
    font-size: 13px;
}
.classic-class-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ea580c;
    background: #ffedd5;
    border: 1px solid #fed7aa;
    flex: 0 0 auto;
}
.classic-class-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.classic-class-meta > span:not(.status-pill) {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 112px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.8);
    border: 1px solid #e5e7eb;
    color: #111827;
    font-weight: 700;
    font-size: 13px;
}
.classic-class-meta b {
    color: #94a3b8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 800;
}
.classic-step-card,
.classic-encoding-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
    margin-bottom: 18px;
    overflow: hidden;
}
.classic-selector-form {
    padding: 18px;
}
.classic-step-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.classic-step-head h3,
.classic-toolbar-left strong {
    margin: 0;
    color: #111827;
}
.classic-step-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}
.classic-selector-row {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.classic-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #64748b;
    font-weight: 800;
}
.classic-field select,
.classic-field input {
    width: 100%;
    min-height: 43px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    padding: 0 12px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
}
.classic-component-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.classic-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}
.classic-tab span {
    font-weight: 800;
    flex: 1;
}
.classic-tab b {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
}
.classic-tab.active {
    border-color: #fdba74;
    background: #fff7ed;
    color: #ea580c;
}
.classic-empty {
    margin-top: 18px;
}
.classic-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    border-bottom: 1px solid #fed7aa;
}
.classic-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}
.classic-toolbar-left small {
    display: block;
    color: #64748b;
    margin-top: 2px;
}
.classic-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    background: #ea580c;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: 0 10px 18px rgba(234, 88, 12, .25);
}
.classic-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.classic-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.classic-status-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}
.classic-status-item span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #cbd5e1;
}
.classic-status-item.ok {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.classic-status-item.ok span {
    background: #22c55e;
}
.classic-status-item.bad {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
}
.classic-status-item.bad span {
    background: #ef4444;
}
.classic-status-total {
    margin-left: auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-size: 12px;
    font-weight: 900;
}
.classic-sheet-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #475569;
    font-size: 13px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.classic-grid-wrap {
    max-width: 100%;
    overflow: auto;
    border-top: 0;
    background: #fff;
    max-height: calc(100vh - 280px);
    min-height: 420px;
}
.classic-grade-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.classic-grade-grid th,
.classic-grade-grid td {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 7px;
    background: #fff;
    vertical-align: middle;
}
.classic-grade-grid thead th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #fff7ed;
    color: #7c2d12;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}
.classic-grade-grid thead .classic-meta-row:nth-child(2) th { top: 34px; }
.classic-grade-grid thead .classic-meta-row:nth-child(3) th { top: 78px; }
.classic-grade-grid thead .classic-meta-row:nth-child(4) th { top: 122px; }
.classic-grade-grid thead .classic-label-row th { top: 166px; }
.classic-grade-grid thead th.sticky-col {
    z-index: 18;
}
.classic-grade-grid tbody tr:hover td {
    background: #ffffbf;
}
.classic-grade-grid tbody tr:hover .sticky-col {
    background: #fffbeb;
}
.classic-grade-grid .sticky-col {
    position: sticky;
    z-index: 7;
    background: #ffffff;
}
.classic-row-col {
    left: 0;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    text-align: center;
    color: #64748b;
    font-weight: 800;
}
.classic-no-col {
    left: 46px;
    width: 118px;
    min-width: 118px;
    max-width: 118px;
    font-weight: 800;
    color: #475569;
}
.classic-name-col {
    left: 164px;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    color: #111827;
}
.classic-grade-grid thead .classic-row-col,
.classic-grade-grid thead .classic-no-col,
.classic-grade-grid thead .classic-name-col {
    background: #ea580c;
    color: #fff;
    border-color: rgba(255,255,255,.18);
}
.classic-grade-grid .score-col {
    width: 110px;
    min-width: 110px;
    text-align: center;
}
.classic-grade-grid .result-col {
    width: 92px;
    min-width: 92px;
    text-align: center;
    font-weight: 900;
    background: #f8fafc;
}
.classic-grade-grid input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    min-height: 34px;
    padding: 5px 7px;
    font-size: 12px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    outline: none;
}
.classic-grade-grid input:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, .12);
}
.classic-grade-grid .classic-hps {
    background: #fff;
    text-align: center;
}
.classic-grade-grid .classic-date {
    min-width: 98px;
    padding-left: 5px;
    padding-right: 5px;
}
.classic-grade-grid .classic-desc {
    min-width: 98px;
}
.classic-grade-grid .classic-score {
    text-align: center;
    font-size: 14px;
    min-height: 38px;
}
.classic-grade-grid input.missing-score {
    border-color: #f59e0b !important;
    background: #fffbeb !important;
}
.classic-grade-grid input.invalid-score {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b;
}
.classic-grade-grid input[readonly] {
    background: #f1f5f9;
    color: #64748b;
}
@media (max-width: 1100px) {
    .classic-class-strip,
    .classic-toolbar,
    .classic-step-head {
        flex-direction: column;
        align-items: stretch;
    }
    .classic-selector-row {
        grid-template-columns: 1fr;
    }
    .classic-component-tabs {
        grid-template-columns: 1fr;
    }
    .classic-status-total {
        margin-left: 0;
    }
}

/* Encoding UI refinement: no internal scrolls, softer colors, one-item-at-a-time VB6 flow */
.soft-class-strip {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}
.soft-class-strip .classic-class-icon {
    background: #f8fafc;
    color: #f97316;
    border-color: #e2e8f0;
}
.compact-step-card { overflow: visible; }
.compact-selector-form { padding: 14px 16px; }
.compact-selector-row {
    grid-template-columns: minmax(140px, 180px) minmax(260px, 1fr) auto auto;
    gap: 10px;
}
.btn-load .mini-icon svg { stroke-width: 2.1; }
.no-scroll-encoding { overflow: visible; }
.calm-toolbar {
    position: relative;
    top: auto;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
}
.calm-mode-badge {
    background: #111827;
    color: #fff;
    box-shadow: none;
    min-width: 54px;
}
.calm-status-row {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
}
.item-navigation-card {
    margin: 14px 16px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.item-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}
.item-nav-head strong {
    display: block;
    color: #111827;
    font-size: 15px;
}
.item-nav-head span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}
.keyboard-hint {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.item-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.item-pill {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: all .18s ease;
}
.item-pill:hover {
    border-color: #fdba74;
    color: #c2410c;
}
.item-pill.active {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
    box-shadow: 0 8px 18px rgba(234, 88, 12, .08);
}
.item-panel {
    display: none;
    margin: 0 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}
.item-panel.active { display: block; }
.item-panel-head {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: 16px;
    align-items: end;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}
.item-panel-head h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
}
.item-panel-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
}
.item-setup-grid {
    display: grid;
    grid-template-columns: minmax(110px, 140px) minmax(150px, 180px) minmax(220px, 1fr);
    gap: 10px;
}
.item-setup-grid label {
    display: grid;
    gap: 5px;
}
.item-setup-grid span {
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 900;
    color: #64748b;
}
.item-setup-grid input {
    width: 100%;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 10px;
    font-weight: 800;
    color: #0f172a;
    background: #fff;
    outline: none;
}
.item-setup-grid input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .14);
}
.single-item-grade-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
}
.single-item-grade-grid th,
.single-item-grade-grid td {
    border-bottom: 1px solid #e2e8f0;
    padding: 9px 10px;
    vertical-align: middle;
    background: #ffffff;
}
.single-item-grade-grid thead th {
    background: #f8fafc;
    color: #334155;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900;
}
.single-item-grade-grid .no-col {
    width: 52px;
    text-align: center;
    color: #64748b;
    font-weight: 900;
}
.single-item-grade-grid .student-no-col {
    width: 130px;
    color: #334155;
    font-weight: 800;
}
.single-item-grade-grid .score-entry-col {
    width: 150px;
    text-align: center;
}
.single-item-grade-grid .computed-col,
.single-item-grade-grid .letter-col {
    width: 92px;
    text-align: center;
    font-weight: 900;
    color: #334155;
}
.single-item-grade-grid .student-name-cell strong {
    color: #0f172a;
}
.single-item-grade-grid .classic-score {
    width: 100%;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    outline: none;
    background: #fff;
}
.single-item-grade-grid .classic-score:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
    background: #eff6ff;
}
.single-item-grade-grid .classic-score.missing-score,
.item-setup-grid input.missing-score {
    border-color: #f59e0b !important;
    background: #fffbeb !important;
}
.single-item-grade-grid .classic-score.invalid-score,
.item-setup-grid input.invalid-score {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b;
}
.single-item-grade-grid tbody tr:not(.gender-row):hover td {
    background: #f8fafc;
}
.gender-row td {
    padding: 8px 12px;
    background: #eef2ff !important;
    color: #1e3a8a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    border-top: 1px solid #dbeafe;
}
.gender-row.female td {
    background: #fff1f2 !important;
    color: #9f1239;
    border-top-color: #ffe4e6;
}
.gender-row.other td {
    background: #f1f5f9 !important;
    color: #475569;
    border-top-color: #e2e8f0;
}
.hidden-row-fields { display: none; }
.no-scroll-encoding .btn-primary[disabled],
.no-scroll-encoding .btn-primary:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.no-scroll-encoding .classic-toolbar-actions .btn-primary {
    background: #f97316;
    border-color: #f97316;
}
.no-scroll-encoding .classic-toolbar-actions .btn-primary:not(:disabled):hover {
    background: #ea580c;
}
@media (max-width: 1200px) {
    .compact-selector-row { grid-template-columns: 1fr 1fr; }
    .item-panel-head { grid-template-columns: 1fr; }
    .item-setup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
    .compact-selector-row,
    .item-setup-grid { grid-template-columns: 1fr; }
    .item-nav-head { flex-direction: column; align-items: flex-start; }
    .single-item-grade-grid { table-layout: auto; }
    .single-item-grade-grid .computed-col,
    .single-item-grade-grid .letter-col { display: none; }
}

/* Final encoding polish: clearer quarter links, correct component display, compact score entry near learner name */
.actions-cell .quarter-link {
    min-width: 92px;
    justify-content: center;
    border-color: #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}
.actions-cell .quarter-link:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}
.compact-entry-grid {
    width: auto;
    min-width: 760px;
    max-width: 900px;
    table-layout: fixed;
}
.compact-entry-grid .no-col { width: 52px; }
.compact-entry-grid .student-no-col { width: 125px; }
.compact-entry-grid .student-name-col,
.compact-entry-grid .student-name-cell { width: 330px; max-width: 330px; }
.compact-entry-grid .student-name-cell strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.compact-entry-grid .score-entry-col { width: 135px; text-align: left; }
.compact-entry-grid .computed-col { width: 90px; }
.compact-entry-grid .letter-col { width: 80px; }
.compact-entry-grid .classic-score {
    width: 112px;
    margin-left: 0;
}
.item-panel.active {
    overflow-x: visible;
}
.compact-item-panel-head {
    grid-template-columns: minmax(160px, 220px) minmax(420px, 740px);
    justify-content: start;
}
.btn-load .mini-icon,
#submitBtn .mini-icon {
    background: rgba(255,255,255,.72);
    color: currentColor;
}
.btn-primary #submitBtn .mini-icon,
#submitBtn .mini-icon {
    color: #fff;
    background: rgba(255,255,255,.18);
}
.btn-load .mini-icon svg,
#submitBtn .mini-icon svg { stroke-width: 2.25; }
@media (max-width: 980px) {
    .compact-entry-grid { min-width: 0; width: 100%; max-width: none; table-layout: auto; }
    .compact-entry-grid .student-name-col,
    .compact-entry-grid .student-name-cell { width: auto; max-width: none; }
    .compact-item-panel-head { grid-template-columns: 1fr; }
}

/* Dynamic DepEd / Grading Policy setup */
.policy-hero-card{display:flex;align-items:center;justify-content:space-between;gap:22px;background:linear-gradient(135deg,#fff,#fff7f2);}
.policy-hero-main{display:flex;align-items:center;gap:18px;}
.policy-hero-icon{width:62px;height:62px;border-radius:20px;background:#fff3ea;color:#f45a12;display:flex;align-items:center;justify-content:center;border:1px solid #ffd9c3;}
.policy-hero-grid{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:10px;min-width:520px;}
.policy-hero-grid div{background:#fff;border:1px solid #e7edf5;border-radius:18px;padding:14px 16px;}
.policy-hero-grid span{display:block;color:#65748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;}
.policy-hero-grid strong{display:block;color:#0f172a;margin-top:4px;}
.policy-form-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px;}
.policy-form-grid label,.policy-inline-form label,.setup-mini-card label{display:flex;flex-direction:column;gap:6px;font-weight:800;color:#52657f;font-size:12px;text-transform:uppercase;letter-spacing:.04em;}
.policy-form-grid .span-all{grid-column:1/-1;}
.policy-form-grid .form-actions{display:flex;align-items:center;justify-content:flex-end;}
.form-control{border:1px solid #d7e0eb;border-radius:13px;padding:12px 13px;background:#fff;color:#10213a;font-weight:700;outline:none;}
.form-control:focus{border-color:#ff7b2c;box-shadow:0 0 0 4px rgba(255,123,44,.12);}
.section-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px;}
.section-title-row h2{margin:0;color:#0f172a;font-size:22px;}
.policy-inline-form{display:grid;grid-template-columns:repeat(8,minmax(110px,1fr));gap:12px;margin-top:18px;align-items:end;}
.setup-card-grid{display:grid;gap:16px;}
.setup-card-grid.three{grid-template-columns:repeat(3,minmax(220px,1fr));}
.setup-mini-card{border:1px solid #e1e8f1;border-radius:20px;background:#fff;padding:18px;display:grid;gap:12px;box-shadow:0 12px 30px rgba(15,23,42,.04);}
.setup-mini-card>strong{font-size:18px;color:#0f172a;}
.transmutation-list{display:flex;flex-wrap:wrap;gap:8px;}
.transmutation-list span{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;}
.clean-table-wrap{border:1px solid #e1e8f1;border-radius:18px;overflow:hidden;}
.compact-data-table{width:100%;border-collapse:collapse;background:#fff;}
.compact-data-table th{background:#f7f9fc;color:#58697f;text-transform:uppercase;font-size:12px;letter-spacing:.06em;text-align:left;padding:13px 14px;border-bottom:1px solid #e1e8f1;}
.compact-data-table td{padding:14px;border-bottom:1px solid #edf2f7;color:#10213a;}
.policy-report-summary{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:16px;margin-bottom:18px;}
.deped-grading-sheet .report-header small{display:block;margin-top:5px;color:#52657f;font-weight:700;}
.report-meta.four{grid-template-columns:repeat(4,1fr);}
.deped-sheet-table{font-size:11px;}
.deped-sheet-table th,.deped-sheet-table td{padding:6px 5px;}
.report-gender-row td{background:#eef4ff!important;color:#163b7a;font-weight:900;text-align:left!important;}
.report-policy-note{margin-top:16px;border:1px solid #fed7aa;background:#fff7ed;color:#7c2d12;border-radius:12px;padding:12px 14px;font-size:12px;line-height:1.5;}
.signature-grid span{display:block;color:#64748b;font-size:11px;font-weight:700;margin-top:4px;}
.alert{padding:14px 16px;border-radius:15px;margin:12px 0;font-weight:800;}
.alert.success{background:#ecfdf5;color:#047857;border:1px solid #bbf7d0;}
.alert.danger{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca;}
@media(max-width:1100px){.policy-hero-card{display:block}.policy-hero-grid{grid-template-columns:repeat(2,1fr);min-width:0;margin-top:16px}.policy-form-grid{grid-template-columns:1fr}.policy-inline-form{grid-template-columns:1fr 1fr}.setup-card-grid.three,.policy-report-summary{grid-template-columns:1fr}}
@media print{.policy-report-summary{display:none}.deped-sheet-table{font-size:9.5px}.report-meta.four{grid-template-columns:repeat(2,1fr)}}

/* Long bond Teacher Grading Sheet report polish */
.long-bond-report { max-width: none; width: 100%; padding: 18px 22px; }
.report-header.compact { gap: 10px; margin-bottom: 8px; }
.report-header.compact img { width: 54px; height: 54px; }
.report-header.compact h2 { font-size: 16px; line-height: 1.1; }
.report-header.compact p { font-size: 12px; margin: 1px 0; }
.report-header.compact .report-title { margin-top: 4px; font-size: 15px; }
.report-header.compact small { font-size: 10px; }
.longbond-meta { display: grid; grid-template-columns: 1.1fr 1.1fr 1fr 1fr; gap: 8px; border-top: 1px solid #dfe7f0; border-bottom: 1px solid #dfe7f0; padding: 8px 0; margin: 6px 0 10px; font-size: 10.5px; line-height: 1.35; }
.long-bond-sheet { min-width: 0 !important; width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 9.2px; }
.long-bond-sheet th,
.long-bond-sheet td { padding: 4px 3px; line-height: 1.15; border-bottom: 1px solid #e7edf5; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.long-bond-sheet th { background: #f4f7fb; color: #1e314f; font-weight: 900; text-transform: uppercase; letter-spacing: .025em; }
.long-bond-sheet .num { width: 28px; }
.long-bond-sheet .sid { width: 58px; }
.long-bond-sheet .name { width: 190px; text-align: left; font-weight: 900; }
.long-bond-sheet .desc { width: 70px; }
.long-bond-sheet .remarks { width: 58px; }
.long-bond-sheet .report-gender-row td,
.report-gender-row td { background: #eef4ff !important; color: #163b7a; font-weight: 900; text-align: left !important; padding: 4px 6px; }
.longbond-footer-note { margin-top: 8px; padding-top: 6px; border-top: 1px solid #dfe7f0; font-size: 9.5px; color: #34445e; }
.compact-signatures { margin-top: 18px; font-size: 10px; }
.compact-signatures div { padding-top: 8px; }

@media print {
    @page { size: 13in 8.5in; margin: .22in .18in .18in .18in; }
    html, body { width: 13in; min-height: 8.5in; margin: 0 !important; padding: 0 !important; background: #fff !important; }
    a[href]:after { content: none !important; }
    .app-sidebar, .app-topbar, .page-header, .policy-report-summary, .no-print { display: none !important; }
    .app-main, .content-wrap, .page-content { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; overflow: visible !important; }
    .report-preview, .printable-report, .long-bond-report { box-shadow: none !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
    .report-header.compact { margin-bottom: 5px !important; }
    .report-header.compact img { width: 42px !important; height: 42px !important; }
    .report-header.compact h2 { font-size: 13.5px !important; }
    .report-header.compact p { font-size: 9.5px !important; }
    .report-header.compact .report-title { font-size: 12px !important; margin-top: 2px !important; }
    .report-header.compact small { font-size: 8.5px !important; }
    .longbond-meta { font-size: 8.5px !important; padding: 4px 0 !important; margin: 4px 0 5px !important; line-height: 1.18 !important; }
    .long-bond-sheet { font-size: 6.75px !important; page-break-inside: auto !important; }
    .long-bond-sheet th, .long-bond-sheet td { padding: 2px 2px !important; line-height: 1.05 !important; }
    .long-bond-sheet .name { width: 150px !important; }
    .long-bond-sheet .sid { width: 48px !important; }
    .long-bond-sheet .num { width: 22px !important; }
    .long-bond-sheet .desc { width: 54px !important; }
    .long-bond-sheet .remarks { width: 42px !important; }
    .report-gender-row td { padding: 2px 4px !important; }
    .longbond-footer-note { font-size: 7.6px !important; margin-top: 4px !important; padding-top: 3px !important; }
    .compact-signatures { margin-top: 11px !important; font-size: 8px !important; }
    .compact-signatures div { padding-top: 5px !important; }
    .report-policy-note { display: none !important; }
}

/* Excel upload grading module */
.excel-actions-cell{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.excel-class-card{display:flex;align-items:center;justify-content:space-between;gap:18px;}
.class-summary-left{display:flex;align-items:center;gap:14px;}
.class-summary-left .class-icon{width:54px;height:54px;border-radius:18px;background:#fff4e8;border:1px solid #fed7aa;display:flex;align-items:center;justify-content:center;color:#f97316;}
.class-summary-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.excel-workflow-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px;}
.excel-feature-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px;}
.excel-feature-list>div{display:flex;align-items:center;gap:12px;border:1px solid #e2e8f0;border-radius:18px;padding:14px;background:#fff;}
.excel-feature-list strong{display:block;color:#111827;}
.excel-feature-list span{display:block;color:#64748b;font-size:12px;}
.excel-upload-form{display:grid;gap:14px;margin-top:14px;}
.excel-file-picker{min-height:170px;border:1.5px dashed #fdba74;border-radius:20px;background:#fffaf5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;cursor:pointer;text-align:center;padding:18px;}
.excel-file-picker input{max-width:320px;}
.full-width{width:100%;}
.validation-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0;}
.validation-summary-grid>div{border:1px solid #e2e8f0;border-radius:14px;padding:12px;background:#fff;}
.validation-summary-grid span{display:block;color:#64748b;font-size:12px;}
.validation-summary-grid strong{font-size:22px;color:#111827;}
.alert-box{padding:12px 14px;border-radius:14px;border:1px solid #dbeafe;background:#eff6ff;color:#1e40af;margin-top:12px;}
.alert-box.danger{border-color:#fecaca;background:#fff1f2;color:#991b1b;}
.compact-table td,.compact-table th{font-size:12px;padding:9px 10px;}
.form-actions.right{display:flex;justify-content:flex-end;margin-top:14px;}
@media(max-width:1100px){.excel-workflow-grid{grid-template-columns:1fr}.excel-class-card{align-items:flex-start;flex-direction:column}.validation-summary-grid{grid-template-columns:1fr 1fr}}


/* 2026-06 Excel upload permission/icon polish */
.excel-feature-list.compact-icons {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.excel-feature-list.compact-icons > div {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff;
}
.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    flex: 0 0 auto;
}
.feature-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feature-copy strong {
    display: block;
    color: #0f172a;
    line-height: 1.15;
}
.feature-copy span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 3px;
}
.excel-file-picker .empty-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--orange);
    background: #fff7ed;
    border-color: #fed7aa;
}
.excel-file-picker .empty-icon svg {
    width: 28px;
    height: 28px;
}
.class-summary-left .class-icon .stat-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: transparent;
    border: 0;
}
.class-summary-left .class-icon .stat-icon svg {
    width: 24px;
    height: 24px;
}
@media(max-width: 900px) {
    .excel-feature-list.compact-icons { grid-template-columns: 1fr; }
}

/* 2026-06-26 final icon polish: keep SVG icons visible on orange buttons */
.btn-primary .mini-icon,
.btn-load .mini-icon,
button.btn-primary .mini-icon,
a.btn-primary .mini-icon,
.class-summary-actions .btn-primary .mini-icon,
.excel-upload-form .btn-primary .mini-icon,
#submitBtn .mini-icon {
    background: rgba(255,255,255,.94) !important;
    color: var(--orange-dark) !important;
    border: 1px solid rgba(255,255,255,.68) !important;
}
.btn-primary .mini-icon svg,
.btn-load .mini-icon svg,
button.btn-primary .mini-icon svg,
a.btn-primary .mini-icon svg,
.class-summary-actions .btn-primary .mini-icon svg,
.excel-upload-form .btn-primary .mini-icon svg,
#submitBtn .mini-icon svg {
    stroke: currentColor !important;
}
.btn-outline .mini-icon,
.btn-light .mini-icon,
button.btn-outline .mini-icon,
a.btn-outline .mini-icon {
    background: #fff7ed !important;
    color: var(--orange-dark) !important;
    border: 1px solid #fed7aa !important;
}
.feature-icon,
.empty-icon,
.stat-icon {
    color: var(--orange-dark) !important;
}
.feature-icon svg,
.empty-icon svg,
.stat-icon svg,
.mini-icon svg {
    stroke: currentColor !important;
}
.class-summary-actions {
    gap: 10px;
    flex-wrap: wrap;
}

/* 2026-06-26 review/submission + avatar/icon alignment polish */
.sidebar-account-card .sidebar-avatar,
.chip-avatar,
.avatar,
.user-avatar,
.default-avatar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    overflow: hidden !important;
}
.sidebar-account-card .sidebar-avatar {
    flex: 0 0 42px;
    font-size: 13px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 1px solid #ffedd5;
    box-shadow: 0 10px 24px rgba(249,115,22,.12);
}
.feature-icon,
.empty-icon,
.stat-icon,
.mini-icon,
.nav-icon,
.class-avatar-icon,
.guide-icon,
.class-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    overflow: hidden !important;
}
.feature-icon svg,
.empty-icon svg,
.stat-icon svg,
.mini-icon svg,
.nav-icon svg,
.class-avatar-icon svg,
.guide-icon svg {
    display: block !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}
.btn .mini-icon {
    margin-left: 0 !important;
    margin-right: 8px !important;
}
.sidebar-action .mini-icon {
    margin-left: 0 !important;
    margin-right: 6px !important;
}
.btn-primary .mini-icon,
.btn-load .mini-icon,
button.btn-primary .mini-icon,
a.btn-primary .mini-icon,
#submitBtn .mini-icon {
    color: var(--orange-dark) !important;
    background: #ffffff !important;
}
.alert-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}
.alert-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.status-pill.orange {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.review-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.compact-stat { min-height: 104px; }
.review-table small { color: var(--muted); font-weight: 700; }
.review-actions-cell {
    min-width: 390px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.reason-cell {
    max-width: 230px;
    color: #64748b;
    font-size: 12px;
}
.return-form { gap: 6px; }
.reason-input { min-width: 170px; }
.mini-button.ghost {
    background: #fff;
    color: #334155;
    border: 1px solid #dbe4ef;
}
.mini-button.ghost:hover { border-color: #ffb77a; color: #c2410c; }
@media(max-width: 980px) {
    .review-dashboard-grid { grid-template-columns: 1fr; }
    .review-actions-cell { min-width: 280px; }
}

/* Edit request workflow */
.lock-alert-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.request-form-card .class-summary-left {
    margin-bottom: 18px;
}
.clean-form {
    display: grid;
    gap: 16px;
}
.clean-form .form-field {
    display: grid;
    gap: 8px;
}
.clean-form .form-field span {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.clean-form textarea,
.decision-form input[type="text"] {
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    padding: 13px 15px;
    font: inherit;
    color: #0f172a;
    background: #fff;
    outline: none;
}
.clean-form textarea:focus,
.decision-form input[type="text"]:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249,115,22,.12);
}
.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.decision-cell {
    min-width: 280px;
}
.decision-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 4px 0;
}
.decision-form input[type="text"] {
    min-width: 180px;
    padding: 9px 10px;
    border-radius: 10px;
}
.mini-button.danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}
.edit-request-table td {
    vertical-align: top;
}
.panel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 2026-06-26 PROJECT RULE: No white icon chips on orange/action buttons.
   Keep icons centered and avoid the pale/white circle shown inside action buttons. */
.btn-primary .mini-icon,
.btn-load .mini-icon,
.btn-orange .mini-icon,
.btn-submit .mini-icon,
button.btn-primary .mini-icon,
a.btn-primary .mini-icon,
button.btn-load .mini-icon,
a.btn-load .mini-icon,
#submitBtn .mini-icon,
.request-edit-button .mini-icon,
.edit-request-btn .mini-icon,
.class-summary-actions .btn-primary .mini-icon,
.excel-upload-form .btn-primary .mini-icon,
.page-header-actions .btn-primary .mini-icon,
.action-toolbar .btn-primary .mini-icon {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    overflow: visible !important;
}
.btn-primary .mini-icon svg,
.btn-load .mini-icon svg,
.btn-orange .mini-icon svg,
.btn-submit .mini-icon svg,
button.btn-primary .mini-icon svg,
a.btn-primary .mini-icon svg,
button.btn-load .mini-icon svg,
a.btn-load .mini-icon svg,
#submitBtn .mini-icon svg,
.request-edit-button .mini-icon svg,
.edit-request-btn .mini-icon svg,
.class-summary-actions .btn-primary .mini-icon svg,
.excel-upload-form .btn-primary .mini-icon svg,
.page-header-actions .btn-primary .mini-icon svg,
.action-toolbar .btn-primary .mini-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    margin: 0 !important;
}
/* Neutral buttons may keep a soft cream icon container, but never a blank/white one. */
.btn-outline .mini-icon,
.btn-light .mini-icon,
a.btn-outline .mini-icon,
button.btn-outline .mini-icon,
a.btn-light .mini-icon,
button.btn-light .mini-icon {
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
    color: var(--orange-dark) !important;
    box-shadow: none !important;
}

/* 2026-06-26 FIX: mini-button primary uses no white icon chip, same rule as orange buttons */
.mini-button.primary .mini-icon,
a.mini-button.primary .mini-icon,
button.mini-button.primary .mini-icon,
.request-edit-button .mini-icon,
.edit-request-btn .mini-icon {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #ffffff !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-right: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    overflow: visible !important;
}
.mini-button.primary .mini-icon svg,
a.mini-button.primary .mini-icon svg,
button.mini-button.primary .mini-icon svg,
.request-edit-button .mini-icon svg,
.edit-request-btn .mini-icon svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
    margin: 0 !important;
}

/* Reports Center dynamic curriculum/report catalog */
.compact-hero { min-height: 116px; }
.curriculum-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.curriculum-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.curriculum-chip strong {
    color: #ea580c;
    font-weight: 800;
}
.curriculum-chip small {
    color: #64748b;
    font-size: 11px;
}
.report-card-link em {
    display: inline-flex;
    margin-top: 4px;
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}
.btn-standard,
.btn,
button.btn,
a.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    line-height: 1;
}
.btn-primary .mini-icon,
button.btn-primary .mini-icon,
a.btn-primary .mini-icon,
.btn-orange .mini-icon,
.action-primary .mini-icon {
    background: transparent !important;
    color: currentColor !important;
    width: 18px;
    height: 18px;
    min-width: 18px;
}
.btn-primary .mini-icon svg,
button.btn-primary .mini-icon svg,
a.btn-primary .mini-icon svg,
.btn-orange .mini-icon svg,
.action-primary .mini-icon svg {
    stroke: currentColor !important;
}

/* Smart Reports Center */
.reports-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
}
.report-filter-help {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #dbe7f4;
    border-radius: 14px;
    background: #f8fbff;
    color: #516173;
    font-size: 13px;
}
.compact-subject-panel .curriculum-chip-wrap.compact {
    max-height: 138px;
    overflow: auto;
}
.smart-report-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.smart-report-card .report-param-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}
.report-note-card { margin-top: 18px; }
.report-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.report-note-grid > div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}
.small-note {
    margin-top: 8px;
    color: rgba(255,255,255,.82);
    font-size: 13px;
}
@media (max-width: 1100px) {
    .reports-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-note-grid { grid-template-columns: 1fr; }
}

/* Reports Center dynamic preview cleanup */
.dynamic-report-preview .report-empty-state {
    margin: 18px 0;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.dynamic-report-preview .report-empty-state.success {
    background: #fffaf3;
    border-color: #fed7aa;
}
.dynamic-report-preview .report-empty-state h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #0f172a;
}
.dynamic-report-preview .report-empty-state p {
    margin: 0 0 4px;
    color: #475569;
}
.report-definition-table th,
.report-definition-table td {
    font-size: 12px;
    padding: 8px 10px;
}
.dynamic-report-meta {
    align-items: flex-start;
}

/* Adviser Core Values / Attendance module */
.compact-hero.neutral-hero {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%);
    border: 1px solid #fed7aa;
}
.compact-stats .stat-card { min-height: 88px; }
.panel-title-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.panel-title-row h2 { margin:0; font-size:18px; color:#172033; }
.panel-title-row p { margin:4px 0 0; color:#64748b; }
.inline-filter { display:flex; align-items:center; gap:8px; }
.slim-select { min-width:150px; height:38px; }
.soft-panel { background:#fffaf5; border-color:#fed7aa; }
.core-values-guide-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px; }
.guide-chip { display:flex; flex-direction:column; gap:3px; padding:12px 14px; border:1px solid #fed7aa; border-radius:14px; background:#fff; }
.guide-chip strong { color:#ea580c; font-size:13px; }
.guide-chip span { font-weight:700; color:#1f2937; }
.guide-chip small { color:#64748b; line-height:1.35; }
.encoding-status-strip { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:12px 0 18px; padding:12px 14px; background:#fff; border:1px solid #e5e7eb; border-radius:16px; box-shadow:0 8px 24px rgba(15,23,42,.04); }
.warning-text { color:#b45309; font-weight:700; }
.clean-action-bar { background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:12px 14px; margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; gap:12px; position:sticky; top:10px; z-index:5; box-shadow:0 10px 28px rgba(15,23,42,.08); }
.clean-action-bar > div:first-child { display:flex; flex-direction:column; gap:2px; }
.clean-action-bar > div:first-child span { color:#64748b; font-size:13px; }
.clean-table-wrap { border:1px solid #e5e7eb; border-radius:16px; overflow:auto; background:#fff; }
.no-horizontal-scroll { overflow-x:hidden; }
.clean-table { width:100%; border-collapse:separate; border-spacing:0; }
.clean-table th { background:#f8fafc; color:#334155; font-size:12px; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid #e5e7eb; padding:10px; text-align:left; white-space:nowrap; }
.clean-table td { border-bottom:1px solid #eef2f7; padding:9px 10px; vertical-align:middle; }
.clean-table tr:last-child td { border-bottom:0; }
.compact-input-table th, .compact-input-table td { padding:7px 8px; }
.mini-col { width:46px; text-align:center !important; }
.name-col { min-width:260px; }
.name-cell { font-weight:700; color:#0f172a; }
.gender-break td { background:#fff7ed; color:#9a3412; font-weight:800; text-transform:uppercase; letter-spacing:.04em; font-size:12px; }
.rating-select { width:72px; min-width:72px; text-align:center; font-weight:700; height:34px; padding:4px 8px; }
.score-input { width:84px; height:34px; text-align:center; font-weight:700; }
.present-cell { background:#f8fafc !important; color:#475569; }
.month-tabs { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:10px; }
.month-tab { border:1px solid #e5e7eb; background:#fff; border-radius:14px; padding:11px 12px; cursor:pointer; display:flex; flex-direction:column; gap:2px; align-items:flex-start; color:#334155; min-height:62px; }
.month-tab strong { font-size:14px; color:#1f2937; }
.month-tab span { font-size:12px; color:#64748b; }
.month-tab.active { border-color:#fb923c; background:#fff7ed; box-shadow:0 8px 20px rgba(249,115,22,.12); }
.month-panel { display:none; }
.month-panel.active { display:block; }
.attendance-table .score-input { width:96px; }
.action-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.table-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.status-pill.draft { background:#f1f5f9; color:#475569; }
.status-pill.submitted { background:#e0f2fe; color:#0369a1; }
.status-pill.posted { background:#dcfce7; color:#166534; }
.status-pill.returned-for-correction { background:#fee2e2; color:#991b1b; }
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:180px; gap:8px; color:#64748b; text-align:center; }
.empty-icon svg { width:42px; height:42px; stroke:#f97316; }
@media (max-width: 900px) {
    .panel-title-row, .clean-action-bar { align-items:flex-start; flex-direction:column; }
    .inline-filter { width:100%; }
    .inline-filter .form-control { width:100%; }
}

/* 2026-06-29 Adviser UI + global button standardization */
.btn,
a.btn,
button.btn,
.btn-standard,
.btn-sm,
.mini-button,
.sidebar-action,
.role-signout {
    min-height: 46px !important;
    height: 46px;
    padding: 0 18px !important;
    border-radius: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap;
}
.btn-sm { min-height: 40px !important; height: 40px; padding: 0 14px !important; border-radius: 13px !important; }
.btn .mini-icon,
a.btn .mini-icon,
button.btn .mini-icon,
.sidebar-action .mini-icon,
.role-signout .mini-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.btn .mini-icon svg,
a.btn .mini-icon svg,
button.btn .mini-icon svg,
.sidebar-action .mini-icon svg,
.role-signout .mini-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    margin: 0 !important;
}
.btn-primary .mini-icon,
.btn-orange .mini-icon,
.btn-submit .mini-icon,
.btn-load .mini-icon,
button.btn-primary .mini-icon,
a.btn-primary .mini-icon {
    background: transparent !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.btn-primary .mini-icon svg,
.btn-orange .mini-icon svg,
.btn-submit .mini-icon svg,
.btn-load .mini-icon svg,
button.btn-primary .mini-icon svg,
a.btn-primary .mini-icon svg { stroke: currentColor !important; }
.btn-outline .mini-icon,
.btn-light .mini-icon,
.btn-blue .mini-icon {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: currentColor !important;
}

.adviser-hero {
    min-height: 116px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 26px;
    box-shadow: 0 18px 50px rgba(15,23,42,.06);
    margin-bottom: 18px;
}
.adviser-hero-icon {
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 19px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
    display: grid;
    place-items: center;
}
.adviser-hero-icon svg { width: 31px; height: 31px; stroke: currentColor; fill: none; }
.adviser-hero h1 { margin: 3px 0 5px; font-size: 28px; line-height: 1.05; }
.adviser-hero p { margin: 0; color: #64748b; }
.adviser-hero-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adviser-status-card,
.adviser-filter-card,
.adviser-sheet-card {
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(15,23,42,.045);
    margin-bottom: 16px;
}
.adviser-status-card {
    min-height: 54px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #334155;
}
.adviser-status-card .separator { width: 1px; height: 22px; background: #e2e8f0; margin: 0 4px; }
.lock-note { margin-left: auto; color: #2563eb; font-weight: 800; }
.adviser-filter-card { padding: 16px; }
.adviser-filter-form { display: flex; align-items: end; gap: 14px; }
.adviser-filter-form label { max-width: 260px; width: 100%; }
.adviser-filter-form label span { display: block; margin-bottom: 8px; color: #64748b; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.adviser-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.guide-card {
    background: #fff;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    padding: 13px 14px;
}
.guide-card span { display: inline-flex; color: #ea580c; font-size: 11px; font-weight: 900; margin-bottom: 5px; }
.guide-card strong { display: block; color: #0f172a; font-size: 14px; }
.guide-card p { margin: 6px 0 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.adviser-sheet-card { overflow: hidden; }
.adviser-sheet-head {
    min-height: 78px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff, #f8fafc);
}
.adviser-sheet-head h2 { margin: 0 0 4px; font-size: 18px; }
.adviser-sheet-head p { margin: 0; color: #64748b; }
.adviser-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adviser-table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.adviser-table th { height: 42px; background: #f8fafc; color: #334155; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.adviser-table td { height: 50px; vertical-align: middle; }
.adviser-table .name-col { min-width: 270px; }
.adviser-table .name-cell { font-weight: 850; color: #0f172a; }
.rating-select {
    height: 38px !important;
    min-height: 38px !important;
    max-width: 90px;
    padding: 0 12px !important;
    border-radius: 13px !important;
    text-align: center;
    font-weight: 850;
}
.score-input {
    height: 38px !important;
    min-height: 38px !important;
    max-width: 100px;
    border-radius: 13px !important;
    text-align: center;
    font-weight: 850;
}
.remarks-input {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 13px !important;
}
.gender-break td {
    height: 34px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12px;
}
.month-tabs.refined-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.month-tab {
    min-height: 64px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}
.month-tab strong { display: block; font-size: 13px; }
.month-tab span { display: block; margin-top: 3px; color: #64748b; font-size: 11px; }
.month-tab.active { border-color: #fb923c; background: #fff7ed; box-shadow: inset 0 0 0 1px #fed7aa; }
.month-panel { display: none; }
.month-panel.active { display: block; }
.month-panel-head { padding: 14px 20px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.month-panel-head h3 { margin: 0 0 4px; font-size: 17px; }
.month-panel-head p { margin: 0; color: #64748b; }
.adviser-action-list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 360px; }
.adviser-stats.four { grid-template-columns: repeat(4, 1fr); }

/* Modern role selection */
.role-page-modern {
    min-height: 100vh;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #fff7ed 0, #f8fafc 34%, #eef2f7 100%);
}
.role-shell-modern { width: min(1040px, 96vw); }
.role-hero-modern {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: #fff;
    border: 1px solid #d9e1ec;
    border-radius: 28px;
    box-shadow: 0 20px 58px rgba(15,23,42,.08);
    margin-bottom: 18px;
}
.role-hero-modern img { width: 84px; height: 84px; object-fit: contain; }
.role-hero-modern h1 { margin: 3px 0 6px; font-size: 32px; }
.role-hero-modern p { margin: 0; color: #64748b; }
.role-grid-modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.role-tile-modern {
    width: 100%;
    min-height: 124px;
    border: 1px solid #d9e1ec;
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 16px 42px rgba(15,23,42,.06);
    transition: .18s ease;
}
.role-tile-modern:hover { transform: translateY(-2px); border-color: #fed7aa; box-shadow: 0 20px 50px rgba(249,115,22,.14); }
.role-tile-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 19px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
    display: grid;
    place-items: center;
}
.role-tile-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; }
.role-tile-copy { flex: 1; min-width: 0; }
.role-tile-copy strong { display: block; color: #0f172a; font-size: 19px; }
.role-tile-copy small { display: block; color: #64748b; margin-top: 5px; }
.role-arrow { width: 32px; height: 32px; display: grid; place-items: center; transform: rotate(180deg); color: #94a3b8; }
.role-arrow svg { width: 18px; height: 18px; stroke: currentColor; }
.role-signout { margin-top: 16px; color: #ea580c; background: transparent; justify-content: flex-start !important; padding-left: 4px !important; }
@media (max-width: 900px) {
    .adviser-hero, .adviser-sheet-head, .role-hero-modern { flex-direction: column; align-items: flex-start; }
    .adviser-hero-actions, .adviser-actions { width: 100%; }
    .adviser-hero-actions .btn, .adviser-actions .btn { flex: 1; }
    .adviser-stats.four { grid-template-columns: repeat(2, 1fr); }
}


/* 2026-06-29 Dashboard, switch-role, and sidebar account polish */
.sidebar-account-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 14px !important;
}
.sidebar-account-top { min-width: 0; align-items: center; }
.sidebar-account-top > div { min-width: 0; flex: 1; }
.sidebar-account-top strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.25;
    margin-bottom: 2px !important;
}
.sidebar-account-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    gap: 8px !important;
}
.sidebar-account-actions .sidebar-action {
    width: 100%;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    border-radius: 13px !important;
    overflow: hidden;
}
.sidebar-account-actions .sidebar-action .mini-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    background: transparent !important;
}
.sidebar-action.logout { color: #fed7aa !important; }

.dashboard-topline .page-subtitle { margin: 4px 0 0; color: #64748b; }
.dashboard-hero-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 30px;
    background: radial-gradient(circle at 86% 25%, rgba(249,115,22,.32), transparent 26%), linear-gradient(135deg,#0f172a,#1f2937 62%,#ea580c);
    color: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.14);
    overflow: hidden;
}
.dashboard-hero-copy h2 { margin: 6px 0 8px; font-size: clamp(25px, 3vw, 36px); color:#fff; letter-spacing: -.03em; }
.dashboard-hero-copy p { margin: 0; color: rgba(255,255,255,.78); }
.hero-mini-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-mini-metrics span { display: inline-flex; gap: 6px; align-items: center; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.88); font-weight: 750; }
.hero-mini-metrics strong { color:#fff; }
.dashboard-donut-card { width: 170px; min-width: 170px; display: grid; justify-items: center; gap: 8px; color: rgba(255,255,255,.82); text-align: center; }
.dashboard-donut {
    --posted: 0; --submitted: 0; --draft: 0;
    width: 112px; height: 112px; border-radius: 50%;
    background: conic-gradient(#22c55e 0 calc(var(--posted)*1%), #3b82f6 calc(var(--posted)*1%) calc((var(--posted) + var(--submitted))*1%), #f97316 calc((var(--posted) + var(--submitted))*1%) 100%);
    display: grid; place-items: center;
    box-shadow: inset 0 0 0 12px rgba(255,255,255,.14), 0 18px 44px rgba(0,0,0,.2);
}
.dashboard-donut span { width: 70px; height: 70px; border-radius: 50%; background: rgba(15,23,42,.82); display: grid; place-items: center; font-size: 20px; font-weight: 900; color:#fff; }
.dashboard-grid-v2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.dashboard-main-panel, .dashboard-side-panel { padding: 22px; }
.dashboard-stat-row { margin-bottom: 18px; }
.dashboard-table small { display: block; color:#64748b; margin-top: 3px; }
.quick-stack { display: grid; gap: 12px; margin-top: 14px; }
.progress-pill { display: inline-flex; align-items: center; height: 34px; border-radius: 999px; padding: 0 12px; background: #ecfdf5; color:#15803d; font-weight:900; }
.dashboard-progress { height: 12px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 14px 0 16px; }
.dashboard-progress span { display: block; height: 100%; background: linear-gradient(90deg,#22c55e,#f97316); border-radius: inherit; }
.status-bars { display: grid; gap: 14px; margin: 8px 0 18px; }
.status-bars div { display: grid; grid-template-columns: 110px 54px minmax(0,1fr); gap: 12px; align-items: center; }
.status-bars span { font-weight: 900; color:#334155; }
.status-bars strong { text-align: right; color:#0f172a; }
.status-bars em { height: 12px; border-radius: 999px; background:#e2e8f0; overflow:hidden; }
.status-bars i { display:block; height:100%; min-width: 6px; background: linear-gradient(90deg,#f97316,#fb923c); border-radius: inherit; }
.empty-cell { text-align: center; color:#64748b; padding: 24px !important; }
.table-link { color:#ea580c; font-weight:900; }
.status-pill.green { background:#dcfce7; color:#15803d; }
.status-pill.blue { background:#dbeafe; color:#1d4ed8; }
.status-pill.red { background:#fee2e2; color:#b91c1c; }
.status-pill.amber { background:#ffedd5; color:#c2410c; }

.role-access-page {
    min-height: 100vh;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#f8fafc 0%,#eef2f7 58%,#fff7ed 100%);
    position: relative;
    overflow: hidden;
}
.role-bg-orb { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(12px); opacity: .45; pointer-events:none; }
.role-bg-orb.one { right: -120px; top: -120px; background: radial-gradient(circle,#fed7aa,transparent 65%); }
.role-bg-orb.two { left: -150px; bottom: -150px; background: radial-gradient(circle,#dbeafe,transparent 65%); }
.role-access-shell { width: min(1080px, 96vw); position: relative; z-index: 1; }
.role-access-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
    padding: 28px 30px;
    border-radius: 30px;
    background: rgba(255,255,255,.86);
    border: 1px solid #d9e1ec;
    box-shadow: 0 24px 70px rgba(15,23,42,.10);
    backdrop-filter: blur(8px);
}
.role-logo-wrap { width: 88px; height: 88px; border-radius: 28px; display:grid; place-items:center; background:#fff; box-shadow: 0 18px 40px rgba(249,115,22,.14); }
.role-logo-wrap img { width: 70px; height: 70px; object-fit: contain; }
.role-hero-copy span { color:#ea580c; font-weight:900; letter-spacing:.12em; text-transform:uppercase; font-size:12px; }
.role-hero-copy h1 { margin: 5px 0 6px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.04em; }
.role-hero-copy p { margin: 0; color:#64748b; font-size: 15px; }
.role-access-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 18px; }
.role-access-card {
    width:100%; min-height: 136px;
    border: 1px solid #d9e1ec;
    border-radius: 28px;
    background: #fff;
    padding: 22px;
    display:flex;
    align-items:center;
    gap:18px;
    text-align:left;
    cursor:pointer;
    box-shadow: 0 18px 52px rgba(15,23,42,.07);
    transition:.18s ease;
}
.role-access-card:hover { transform: translateY(-3px); border-color:#fdba74; box-shadow: 0 24px 64px rgba(249,115,22,.16); }
.role-card-icon { width:64px; height:64px; min-width:64px; border-radius:22px; display:grid; place-items:center; background:#fff7ed; border:1px solid #fed7aa; color:#ea580c; }
.role-card-icon svg { width:31px; height:31px; stroke:currentColor; fill:none; }
.role-card-main { flex:1; min-width:0; }
.role-card-main strong { display:block; font-size:22px; color:#0f172a; }
.role-card-main small { display:block; margin-top:6px; color:#64748b; line-height:1.35; }
.role-card-arrow { color:#ea580c; transform: rotate(180deg); }
.role-card-arrow svg { width:22px; height:22px; stroke:currentColor; fill:none; }
.role-access-footer { margin-top: 18px; display:flex; justify-content:flex-start; }
.role-signout-clean { display:inline-flex; align-items:center; gap:8px; color:#ea580c; font-weight:900; padding: 9px 4px; }
.role-signout-clean .mini-icon { width:18px !important; height:18px !important; background:transparent !important; }
@media (max-width: 1000px) { .dashboard-grid-v2 { grid-template-columns: 1fr; } .dashboard-donut-card { display:none; } }
@media (max-width: 700px) { .role-access-hero { grid-template-columns:1fr; } .role-access-page { padding:18px; } .hero-mini-metrics { display:grid; } }


/* 2026-06-29 account dropdown and change password polish */
.topbar,
.page-header,
.elevated-header {
    position: relative;
    z-index: 1200;
    overflow: visible !important;
}
.student-menu { position: relative; z-index: 1250; }
.student-menu.open { z-index: 9999; }
.student-menu-panel {
    z-index: 10000 !important;
    width: 270px;
    overflow: visible;
}
.main-area, .app-shell { overflow: visible; }
.hero-panel, .hero-card, .dashboard-hero-v2, .reports-hero, .smart-reports-hero {
    position: relative;
    z-index: 1;
}
.sidebar-account-card { overflow: hidden; }
.sidebar-account-top { width: 100%; }
.sidebar-account-top strong {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word;
}
.sidebar-account-actions {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
}
.sidebar-account-actions .sidebar-action.wide {
    grid-column: 1 / -1;
}
.sidebar-account-actions .sidebar-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    text-align: center;
}
.security-page-grid {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(360px, 1.25fr);
    gap: 18px;
    align-items: start;
}
.security-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.security-card h2 { margin: 0 0 8px; font-size: 20px; }
.security-card p { margin: 0; color: #64748b; line-height: 1.55; }
.security-card-icon {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
    flex: 0 0 auto;
}
.security-card-icon svg { width: 30px; height: 30px; stroke: currentColor; fill: none; }
.password-form-card { padding: 24px; }
.clean-form { display: grid; gap: 10px; }
.clean-form label { font-size: 12px; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: .06em; }
.form-input {
    width: 100%;
    height: 52px;
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    padding: 0 15px;
    color: #0f172a;
    font-weight: 750;
    outline: none;
    background: #fff;
}
.form-input:focus { border-color: #fb923c; box-shadow: 0 0 0 4px rgba(249,115,22,.12); }
.field-error { display:block; color:#b91c1c; font-size:12px; font-weight:800; min-height:16px; }
.form-error { background:#fef2f2; border:1px solid #fecaca; border-radius:14px; padding:10px 12px; }
.form-actions-right { display:flex; justify-content:flex-end; gap:10px; margin-top:10px; flex-wrap:wrap; }
@media (max-width: 860px) { .security-page-grid { grid-template-columns: 1fr; } }

/* Improved role selection layout */
.role-access-page { align-items: stretch; padding: 36px 22px; }
.role-access-shell { max-width: 1180px; margin: auto; }
.role-access-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 92% 12%, rgba(249,115,22,.13), transparent 28%), #fff;
}
.role-access-hero:after {
    content:"";
    position:absolute;
    inset:auto 24px 20px auto;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    background: rgba(255,237,213,.58);
    filter: blur(4px);
    z-index:0;
}
.role-access-hero > * { position: relative; z-index: 1; }
.role-access-grid { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; }
.role-access-card { min-height: 155px; padding: 24px 26px; border-radius: 30px; }
.role-card-main strong { font-size: 24px; }
.role-card-main small { font-size: 13px; }
.role-card-arrow { width: 38px; height: 38px; border-radius: 14px; display:grid; place-items:center; background:#fff7ed; border:1px solid #fed7aa; }
.role-signout-clean { margin-left: 4px; }

/* Preschool Grades Posting - recreated module */
.preschool-page .preschool-hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, .18);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, .13), transparent 34%),
        linear-gradient(135deg, #fff 0%, #fff7ed 100%);
}
.preschool-hero-copy h1 { letter-spacing: -.02em; }
.preschool-hero-badge {
    min-width: 170px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(249, 115, 22, .18);
    background: rgba(255,255,255,.78);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.preschool-hero-badge .hero-badge-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #ffedd5;
    color: #c2410c;
}
.preschool-hero-badge .hero-badge-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.preschool-hero-badge span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.preschool-hero-badge strong { color: var(--ink); font-size: 30px; line-height: 1; }
.preschool-filter-panel { padding: 18px; }
.preschool-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.preschool-filter-grid.wide { grid-template-columns: minmax(135px, .9fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(220px, 1.35fr) auto; }
.preschool-filter-grid label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.preschool-stats .stat-card { min-height: 92px; }
.preschool-class-table th, .preschool-class-table td { vertical-align: middle; }
.preschool-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
}
.preschool-summary-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.preschool-guide-card .section-title-row { align-items: flex-start; }
.rating-guide-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}
.rating-guide-chip strong {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.development-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.development-area-card {
    display: block;
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: var(--ink);
    transition: .16s ease;
}
.development-area-card:hover { border-color: #fdba74; transform: translateY(-1px); box-shadow: 0 12px 22px rgba(15,23,42,.08); }
.development-area-card.active { border-color: #f97316; background: linear-gradient(135deg, #fff7ed, #fff); box-shadow: 0 12px 26px rgba(249,115,22,.12); }
.development-area-card strong { display: block; font-size: 14px; line-height: 1.25; }
.development-area-card span { display: block; margin-top: 6px; color: #64748b; font-size: 12px; font-weight: 700; }
.development-area-card small { display: block; margin-top: 8px; color: #94a3b8; font-size: 11px; }
.development-area-card.disabled-card { pointer-events: none; background: #f8fafc; }
.competency-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 9px;
    margin: 0 0 16px;
}
.competency-legend > div {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.competency-legend strong {
    flex: 0 0 auto;
    min-width: 36px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
}
.competency-legend span { color: #475569; font-size: 12px; line-height: 1.35; }
.preschool-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: auto;
    max-height: 68vh;
    background: #fff;
}
.preschool-rating-table {
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}
.preschool-rating-table th,
.preschool-rating-table td {
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #edf2f7;
    padding: 8px 9px;
    font-size: 12px;
}
.preschool-rating-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff7ed;
    color: #7c2d12;
    vertical-align: top;
    white-space: normal;
}
.preschool-rating-table .num-col { width: 52px; text-align: center; }
.preschool-rating-table .studno-col { width: 118px; white-space: nowrap; }
.preschool-rating-table .learner-col { min-width: 260px; }
.preschool-rating-table .sex-col { width: 82px; text-align: center; }
.preschool-rating-table .competency-header { min-width: 98px; max-width: 140px; text-align: center; }
.preschool-rating-table .competency-header span { display: block; font-size: 12px; font-weight: 900; }
.preschool-rating-table .competency-header small {
    display: -webkit-box;
    margin-top: 4px;
    color: #9a3412;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.preschool-rating-table .learner-name {
    font-weight: 800;
    color: #0f172a;
    white-space: normal;
    line-height: 1.25;
}
.preschool-rating-table .rating-cell { text-align: center; }
.preschool-rating-table .rating-input {
    width: 58px;
    min-width: 58px;
    height: 36px;
    margin: 0 auto;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 12px;
    border-color: #cbd5e1;
}
.preschool-rating-table .rating-input:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.preschool-rating-table .group-row td {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.preschool-return-card h3 { margin-top: 0; }
@media (max-width: 1180px) {
    .preschool-filter-grid,
    .preschool-filter-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .preschool-filter-grid .btn { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .preschool-hero-card { flex-direction: column; align-items: stretch; }
    .preschool-hero-badge { min-width: 0; width: 100%; }
    .preschool-filter-grid,
    .preschool-filter-grid.wide { grid-template-columns: 1fr; }
    .preschool-summary-card { align-items: flex-start; flex-direction: column; }
    .rating-guide-chip { flex-wrap: wrap; border-radius: 16px; white-space: normal; }
}
@media print {
    .preschool-page .preschool-filter-panel,
    .preschool-page .action-row,
    .preschool-page .development-area-grid,
    .preschool-page .competency-legend,
    .preschool-page .preschool-return-card,
    .preschool-page .btn { display: none !important; }
    .preschool-page .content-card,
    .preschool-page .page-top-card,
    .preschool-page .class-summary-card { box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
    .preschool-table-wrap { max-height: none !important; overflow: visible !important; }
    .preschool-rating-table { min-width: 0 !important; width: 100% !important; }
    .preschool-rating-table th,
    .preschool-rating-table td { font-size: 9px !important; padding: 4px !important; }
    .preschool-rating-table .rating-input { border: none !important; height: auto !important; width: 32px !important; min-width: 32px !important; padding: 0 !important; background: transparent !important; }
}

/* 2026-06-29 Pre-School module separation and encoding redesign */
.redesigned-preschool {
    gap: 18px;
}
.preschool-workspace-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, .18);
    background:
        radial-gradient(circle at 88% 12%, rgba(249, 115, 22, .14), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #fffaf5 100%);
}
.workspace-title-block {
    display: flex;
    align-items: center;
    gap: 16px;
}
.workspace-icon-chip {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
    box-shadow: 0 10px 24px rgba(249, 115, 22, .13);
    flex: 0 0 auto;
}
.workspace-icon-chip svg,
.workspace-icon-chip .svg-icon svg {
    width: 23px;
    height: 23px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
}
.workspace-icon-chip.soft {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: #fff7ed;
    box-shadow: none;
}
.workspace-icon-chip.large {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    margin-bottom: 12px;
}
.preschool-control-card {
    padding: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.preschool-control-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.preschool-control-head h2,
.preschool-sheet-bar h2,
.preschool-sheet-actions h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.02em;
}
.preschool-control-head p,
.preschool-sheet-bar p,
.preschool-sheet-actions p {
    margin: 5px 0 0;
    color: #64748b;
}
.redesigned-filter-grid {
    padding: 14px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.redesigned-filter-grid .form-control {
    background: #fff;
}
.preschool-empty-state {
    text-align: center;
    padding: 42px 24px;
}
.preschool-sheet-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(249, 115, 22, .18);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
    box-shadow: 0 16px 36px rgba(15, 23, 42, .06);
}
.sheet-context-main {
    display: flex;
    align-items: center;
    gap: 13px;
}
.rating-code-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    border: 1px solid #fed7aa;
    color: #7c2d12;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.rating-code-strip strong {
    min-width: 30px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #c2410c;
}
.preschool-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.preschool-info-card {
    padding: 16px 18px;
}
.preschool-info-card span,
.preschool-info-card small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}
.preschool-info-card strong {
    display: block;
    margin: 6px 0;
    color: #0f172a;
    font-size: 15px;
}
.preschool-sheet-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.preschool-sheet-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.competency-map-card {
    margin: 14px 18px 0;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #f8fafc;
}
.competency-map-card summary {
    cursor: pointer;
    padding: 13px 16px;
    color: #334155;
    font-weight: 850;
}
.competency-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 0 14px 14px;
}
.competency-map-grid > div {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.competency-map-grid strong {
    flex: 0 0 auto;
    min-width: 38px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
}
.competency-map-grid span {
    color: #475569;
    font-size: 12px;
    line-height: 1.35;
}
.redesigned-table-wrap {
    margin: 18px;
    max-height: 70vh;
    border-radius: 18px;
}
.redesigned-rating-table {
    min-width: 1080px;
}
.redesigned-rating-table thead th {
    background: #fff7ed;
    color: #7c2d12;
    border-bottom: 1px solid #fed7aa;
}
.redesigned-rating-table tbody tr:hover td {
    background: #fffaf5;
}
.redesigned-rating-table .learner-col {
    position: sticky;
    left: 170px;
    z-index: 1;
    background: #fff;
    box-shadow: 8px 0 14px rgba(15, 23, 42, .03);
}
.redesigned-rating-table thead .learner-col {
    z-index: 4;
    background: #fff7ed;
}
.redesigned-rating-table .studno-col {
    position: sticky;
    left: 52px;
    z-index: 1;
    background: #fff;
}
.redesigned-rating-table thead .studno-col {
    z-index: 4;
    background: #fff7ed;
}
.preschool-rating-table .rating-select {
    width: 76px;
    min-width: 76px;
    height: 38px;
    margin: 0 auto;
    text-align: center;
    text-align-last: center;
    font-weight: 900;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    padding: 0 8px;
}
.preschool-rating-table .rating-select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,.12);
    outline: none;
}
.preschool-rating-table .rating-select:disabled {
    background: #f1f5f9;
    color: #475569;
}
.redesigned-rating-table .group-row td {
    background: #e2e8f0;
    color: #334155;
}
@media (max-width: 1180px) {
    .preschool-info-grid { grid-template-columns: 1fr; }
    .preschool-sheet-bar,
    .preschool-sheet-actions,
    .preschool-control-head { flex-direction: column; align-items: stretch; }
    .rating-code-strip { align-self: flex-start; }
}
@media (max-width: 720px) {
    .workspace-title-block { align-items: flex-start; }
    .preschool-sheet-actions .action-row { width: 100%; }
    .preschool-sheet-actions .btn { flex: 1 1 auto; }
    .rating-code-strip { flex-wrap: wrap; border-radius: 16px; }
}
@media print {
    .redesigned-preschool .preschool-control-card,
    .redesigned-preschool .action-row,
    .redesigned-preschool .competency-map-card,
    .redesigned-preschool .preschool-return-card,
    .redesigned-preschool .btn { display: none !important; }
    .redesigned-table-wrap { margin: 0 !important; max-height: none !important; overflow: visible !important; }
    .preschool-rating-table .rating-select { border: 0 !important; appearance: none; -webkit-appearance: none; background: transparent !important; }
}


/* 2026-06-29 header cleanup, role-isolated preschool menu, and improved teacher encoding table */
.preschool-header-shell {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
}
.preschool-header-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}
.preschool-header-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 220px;
}
.preschool-header-actions {
    gap: 10px;
    flex-wrap: wrap;
}
.workspace-icon-chip.large-chip {
    width: 64px;
    height: 64px;
    border-radius: 22px;
}
.preschool-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.preschool-meta-pills span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    border: 1px solid #fde0c7;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}
.preschool-header-stat {
    min-width: 210px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255,255,255,.88);
    border: 1px solid #fed7aa;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}
.preschool-header-stat span,
.preschool-header-stat small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}
.preschool-header-stat strong {
    display: block;
    margin: 8px 0 6px;
    color: #0f172a;
    font-size: 32px;
    line-height: 1;
}
.preschool-meta-block { margin-top: 2px; }
.table-helper-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px 0;
}
.table-helper-bar span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}
.teacher-encoding-table .col-num { width: 54px; }
.teacher-encoding-table .col-studno { width: 128px; }
.teacher-encoding-table .col-learner { width: 330px; }
.teacher-encoding-table .col-sex { width: 84px; }
.teacher-encoding-table .col-rating { width: 96px; }
.teacher-encoding-table thead th {
    padding: 12px 10px;
    border-right: 1px solid #f2dcc7;
}
.teacher-encoding-table tbody td {
    padding: 10px 10px;
    background: #fff;
}
.teacher-encoding-table tbody tr:nth-child(even) td {
    background: #fcfcfd;
}
.teacher-encoding-table .num-col,
.teacher-encoding-table .studno-col,
.teacher-encoding-table .learner-col,
.teacher-encoding-table .sex-col {
    position: sticky;
    background: inherit;
}
.teacher-encoding-table .num-col {
    left: 0;
    z-index: 2;
    text-align: center;
    font-weight: 800;
}
.teacher-encoding-table .studno-col {
    left: 54px;
    z-index: 2;
}
.teacher-encoding-table .learner-col {
    left: 182px;
    z-index: 2;
    box-shadow: 10px 0 14px rgba(15, 23, 42, .05);
}
.teacher-encoding-table .sex-col {
    left: 512px;
    z-index: 2;
    text-align: center;
    box-shadow: 10px 0 14px rgba(15, 23, 42, .03);
}
.teacher-encoding-table thead .num-col,
.teacher-encoding-table thead .studno-col,
.teacher-encoding-table thead .learner-col,
.teacher-encoding-table thead .sex-col {
    z-index: 5;
    background: #fff7ed;
}
.teacher-encoding-table .learner-name {
    font-size: 13px;
    letter-spacing: -.01em;
}
.teacher-encoding-table .competency-header {
    min-width: 96px;
    max-width: 96px;
}
.teacher-encoding-table .competency-header small {
    margin-top: 6px;
    min-height: 36px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.teacher-encoding-table .rating-cell {
    background: #fff;
}
.teacher-encoding-table .rating-select {
    width: 72px;
    min-width: 72px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
}
.teacher-encoding-table .learner-row:hover td {
    background: #fffaf5 !important;
}
.teacher-encoding-table .empty-cell {
    position: static;
    text-align: center;
    background: #fff;
}
@media (max-width: 1100px) {
    .preschool-header-shell,
    .preschool-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .preschool-header-side {
        min-width: 0;
        justify-content: flex-start;
    }
}
@media print {
    .preschool-header-side,
    .table-helper-bar { display: none !important; }
}


/* 2026-06-29 Patch: preschool compile fix companion + stable encoding grid
   The earlier sticky-column attempt could overlap Sex/C1 columns in Chrome. This grid uses
   stable fixed widths and no sticky offsets so the teacher encoding sheet stays aligned. */
.preschool-sheet-card .table-helper-bar {
    padding: 14px 18px 0;
}
.preschool-sheet-card .redesigned-table-wrap {
    margin: 16px 18px 20px;
    border: 1px solid #dbe5f0;
    border-radius: 18px;
    background: #fff;
    overflow: auto;
    max-height: 66vh;
}
.teacher-encoding-table {
    width: auto !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
.teacher-encoding-table .col-num { width: 54px !important; }
.teacher-encoding-table .col-studno { width: 132px !important; }
.teacher-encoding-table .col-learner { width: 330px !important; }
.teacher-encoding-table .col-rating { width: 104px !important; }
.teacher-encoding-table .num-col,
.teacher-encoding-table .studno-col,
.teacher-encoding-table .learner-col,
.teacher-encoding-table .sex-col,
.redesigned-rating-table.teacher-encoding-table .studno-col,
.redesigned-rating-table.teacher-encoding-table .learner-col {
    position: static !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
}
.teacher-encoding-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #fff7ed !important;
    border-bottom: 1px solid #fed7aa !important;
    border-right: 1px solid #f3dfcb !important;
    color: #7c2d12 !important;
    padding: 12px 10px !important;
    vertical-align: middle !important;
}
.teacher-encoding-table thead .num-col,
.teacher-encoding-table thead .studno-col,
.teacher-encoding-table thead .learner-col {
    text-align: left !important;
}
.teacher-encoding-table thead .num-col { text-align:center !important; }
.teacher-encoding-table .competency-header {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    text-align: center !important;
}
.teacher-encoding-table .competency-header span {
    display: block !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
}
.teacher-encoding-table .competency-header small {
    display: -webkit-box !important;
    min-height: 34px !important;
    margin-top: 5px !important;
    color: #9a3412 !important;
    font-size: 9.5px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    overflow: hidden !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}
.teacher-encoding-table tbody td {
    border-bottom: 1px solid #e8eef5 !important;
    border-right: 1px solid #eef3f8 !important;
    background: #fff !important;
    padding: 10px 10px !important;
    vertical-align: middle !important;
}
.teacher-encoding-table tbody tr:nth-child(even) td { background: #fbfdff !important; }
.teacher-encoding-table tbody tr:hover td { background: #fffaf5 !important; }
.teacher-encoding-table .num-col {
    text-align: center !important;
    color: #475569 !important;
    font-weight: 900 !important;
}
.teacher-encoding-table .studno-col {
    color: #334155 !important;
    white-space: nowrap !important;
}
.teacher-encoding-table .learner-col,
.teacher-encoding-table .learner-name {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
}
.teacher-encoding-table .rating-cell {
    text-align: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.teacher-encoding-table .rating-select {
    display: inline-block !important;
    width: 72px !important;
    min-width: 72px !important;
    height: 36px !important;
    padding: 0 8px !important;
    border-radius: 12px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #fff !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-align: center !important;
    text-align-last: center !important;
}
.teacher-encoding-table .rating-select:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 3px rgba(249,115,22,.14) !important;
    outline: none !important;
}
@media print {
    .teacher-encoding-table thead th { position: static !important; }
    .preschool-sheet-card .redesigned-table-wrap { max-height: none !important; overflow: visible !important; }
}

/* 2026-06-29 Reports from scratch: report-first, cascading filters, generated default formats */
.reports-scratch-page { gap: 18px; }
.reports-scratch-hero {
    display:flex;justify-content:space-between;align-items:stretch;gap:18px;
    padding:26px;border-radius:28px;border:1px solid rgba(249,115,22,.18);
    background:radial-gradient(circle at 88% 12%, rgba(249,115,22,.14), transparent 32%),linear-gradient(135deg,#fff,#fff7ed);
    box-shadow:0 18px 45px rgba(15,23,42,.06);
}
.reports-scratch-hero h1{margin:4px 0 8px;font-size:34px;letter-spacing:-.04em;color:#0f172a}.reports-scratch-hero p{margin:0;color:#64748b}
.report-scope-pills{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.report-scope-pills span{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:999px;background:#fff;border:1px solid #fed7aa;color:#9a3412;font-size:12px;font-weight:850}
.reports-scratch-help{min-width:230px;padding:18px 20px;border-radius:22px;background:#fff;border:1px solid #fed7aa;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 30px rgba(15,23,42,.06)}
.reports-scratch-help strong{font-size:18px;color:#0f172a}.reports-scratch-help span{margin-top:6px;color:#64748b;font-size:13px;font-weight:700}.report-selector-card{padding:20px;border:1px solid #e2e8f0}
.report-filter-form{display:block}.scratch-report-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;align-items:end}.report-field label{display:block;margin-bottom:7px;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.report-field small{display:block;margin-top:6px;color:#94a3b8;font-weight:700}.wide-field{grid-column:span 2}.report-learning-preview{margin-top:16px;padding:15px 16px;border-radius:20px;background:#f8fafc;border:1px solid #e2e8f0;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.report-learning-preview strong{display:block;color:#0f172a}.report-learning-preview span{display:block;color:#64748b;font-size:13px;margin-top:3px}.learning-chip-row{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end;max-width:720px}.learning-chip-row span{padding:7px 10px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:12px;font-weight:800}.report-action-row{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.report-card-grid-from-scratch{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:15px}.report-group-card h3{margin:0 0 13px;color:#0f172a}.scratch-report-cards{display:grid;gap:9px}.scratch-report-card{display:grid;grid-template-columns:auto 1fr;column-gap:10px;row-gap:2px;align-items:center;padding:12px;border-radius:17px;text-decoration:none;border:1px solid #e2e8f0;background:#fff;color:#0f172a;transition:.15s}.scratch-report-card:hover,.scratch-report-card.active{border-color:#fb923c;background:#fff7ed;box-shadow:0 12px 24px rgba(249,115,22,.12);transform:translateY(-1px)}.scratch-report-icon{grid-row:span 2;width:38px;height:38px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:#ffedd5;color:#c2410c}.scratch-report-icon svg{width:20px;height:20px;stroke:currentColor;fill:none}.scratch-report-card strong{font-size:13px}.scratch-report-card small{color:#64748b;font-size:11px;font-weight:800}
.generated-report-format{overflow:auto}.generated-report-meta{grid-template-columns:repeat(4,minmax(170px,1fr))}.generated-report-message{margin:12px 0;padding:12px 14px;border-radius:16px;font-weight:800;border:1px solid #e2e8f0;background:#f8fafc;color:#475569}.generated-report-message.success{background:#ecfdf5;border-color:#bbf7d0;color:#166534}.generated-report-message.warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.generated-table th,.generated-table td{font-size:11px;padding:7px 8px}.generated-table .name{text-align:left;font-weight:800;color:#0f172a}.summary-generated-table th,.preschool-generated-table th{white-space:normal}.report-card-student-box{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;margin-bottom:12px}.reserved-report-sections{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.reserved-report-sections>div{border:1px solid #cbd5e1;border-radius:14px;padding:12px}.reserved-report-sections strong{display:block;color:#0f172a}.reserved-report-sections p{margin:5px 0 0;color:#64748b}.report-notes-box{margin-top:12px;padding:12px 14px;border-radius:14px;border:1px dashed #cbd5e1;background:#f8fafc;color:#475569;font-size:12px;font-weight:700}.certificate-page{page-break-after:always;background:#fff;padding:28px}.certificate-border{min-height:660px;border:8px double #f97316;border-radius:18px;padding:44px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}.certificate-logo{width:96px;height:96px;object-fit:contain}.certificate-border h2{margin:10px 0 2px;color:#0f172a;font-size:26px}.certificate-border p{color:#475569}.certificate-title{margin-top:30px;font-size:35px;font-weight:900;color:#c2410c;text-transform:uppercase;letter-spacing:.06em}.certificate-subtitle{margin-top:20px;color:#64748b;font-weight:700}.certificate-name{margin:16px 0;font-size:46px;font-weight:900;color:#0f172a;font-family:Georgia,serif;border-bottom:2px solid #0f172a;padding:0 44px 8px}.certificate-body{max-width:760px;font-size:17px;line-height:1.7}.certificate-date{margin-top:12px;font-weight:800;color:#334155}.certificate-signatures{display:grid;grid-template-columns:repeat(3,1fr);gap:70px;width:100%;margin-top:58px}.certificate-signatures div{border-top:1px solid #0f172a;padding-top:8px;font-weight:900}.certificate-signatures span{display:block;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin-top:3px}
@media(max-width:900px){.reports-scratch-hero,.report-learning-preview{flex-direction:column}.scratch-report-grid{grid-template-columns:1fr}.wide-field{grid-column:auto}.generated-report-meta{grid-template-columns:1fr}.reserved-report-sections{grid-template-columns:1fr}}
@media print{.reports-scratch-page .no-print,.page-header.no-print{display:none!important}.main-content{padding:0!important}.report-preview,.certificate-page{box-shadow:none!important;border:0!important;margin:0!important}.certificate-page{min-height:100vh}.generated-table th,.generated-table td{font-size:9px;padding:4px}.generated-report-message.warning{display:none}.report-notes-box{display:none}}

/* 2026-06-29 Reports format correction: distinct printable layouts per report type */
.refined-report-format {
    overflow: visible !important;
    padding: 26px 30px !important;
    background: #fff !important;
}
.generated-format-header {
    justify-content: center;
    text-align: center;
}
.generated-format-header img {
    width: 56px !important;
    height: 56px !important;
}
.refined-report-meta {
    padding: 12px 0 !important;
    margin: 0 0 14px !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}
.refined-report-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
}
.refined-report-table th {
    background: #f4f7fb !important;
    color: #1e314f !important;
    font-size: 10.5px !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    border-bottom: 1px solid #d7e0eb !important;
    padding: 8px 7px !important;
    text-align: center !important;
}
.refined-report-table td {
    font-size: 11px !important;
    padding: 7px 7px !important;
    border-bottom: 1px solid #e8eef5 !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.refined-report-table td.name,
.refined-report-table .name {
    text-align: left !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}
.summary-sheet-format .summary-generated-table th,
.summary-sheet-format .summary-generated-table td {
    font-size: 10px !important;
    padding: 6px 5px !important;
}
.monitoring-generated-table .name,
.core-values-generated-table .name,
.attendance-generated-table .name {
    min-width: 230px;
}
.refined-student-box {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    background: #fff !important;
    padding: 8px 0 !important;
    margin-bottom: 10px !important;
}
.refined-reserved-sections > div {
    border-radius: 0 !important;
    min-height: 96px;
    background: #fff !important;
}
.rating-legend-print {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #d7e0eb;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
}
.generated-signatures {
    margin-top: 26px !important;
}
.generated-signatures div {
    min-height: 42px;
}
@media print {
    @page { size: 13in 8.5in; margin: .25in .22in; }
    .refined-report-format {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    .generated-format-header img { width: 42px !important; height: 42px !important; }
    .generated-format-header h2 { font-size: 13.5px !important; }
    .generated-format-header p { font-size: 9.5px !important; }
    .generated-format-header .report-title { font-size: 12px !important; }
    .generated-format-header small { font-size: 8.5px !important; }
    .refined-report-meta { font-size: 8.5px !important; line-height: 1.2 !important; padding: 4px 0 !important; margin-bottom: 6px !important; }
    .refined-report-table th { font-size: 7.2px !important; padding: 3px 3px !important; line-height: 1.05 !important; }
    .refined-report-table td { font-size: 7.4px !important; padding: 3px 3px !important; line-height: 1.05 !important; }
    .summary-sheet-format .summary-generated-table th,
    .summary-sheet-format .summary-generated-table td { font-size: 6.9px !important; padding: 2.5px 2px !important; }
    .generated-signatures { margin-top: 12px !important; font-size: 8px !important; }
    .generated-signatures div { padding-top: 5px !important; min-height: 28px !important; }
    .reserved-report-sections { gap: 8px !important; margin-top: 8px !important; }
    .reserved-report-sections > div { min-height: 58px !important; padding: 7px !important; font-size: 8px !important; }
    .rating-legend-print { font-size: 8px !important; padding: 5px 6px !important; }
}

/* 2026-06 Reports role/access and printable format refinements */
.report-card-page-block{break-after:page;page-break-after:always;margin-bottom:28px;padding-bottom:18px;border-bottom:1px dashed #cbd5e1;}
.report-card-page-block:last-child{break-after:auto;page-break-after:auto;border-bottom:0;}
.monitoring-generated-table th,.monitoring-generated-table td{font-size:11px;vertical-align:top;}
.monitoring-generated-table .name{font-weight:800;color:#0f172a;}
@media print{.report-card-page-block{break-after:page;page-break-after:always;border-bottom:0;margin-bottom:0;}.report-card-page-block:last-child{break-after:auto;page-break-after:auto;}}

/* 2026-06-30 NSDGA report design refresh based on old PDF samples, enhanced for web printing */
:root {
    --nsdga-maroon: #6f145f;
    --nsdga-purple: #7b1fa2;
    --nsdga-gold: #f4b400;
    --nsdga-amber: #f59e0b;
    --nsdga-ink: #111827;
    --nsdga-grid: #aeb8c6;
    --nsdga-soft-grid: #c7d2e1;
}
.sample-report-header {
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 18px;
    margin: 0 auto 24px;
    max-width: 760px;
    text-align: center;
}
.sample-report-header img { width: 92px; height: 92px; object-fit: contain; }
.sample-report-header h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; color: var(--nsdga-ink); font-size: 28px; font-weight: 700; }
.sample-report-header h3 { margin: 7px 0 8px; color: var(--nsdga-maroon); font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.sample-report-header p { margin: 3px 0; color: #334155; font-weight: 700; }
.summary-meta-sample { margin: 22px 0 14px; width: 380px; display: grid; gap: 8px; font-size: 13px; }
.summary-meta-sample div { display: grid; grid-template-columns: 88px 14px 1fr; align-items: baseline; }
.summary-meta-sample strong { color: #111827; letter-spacing: .04em; }
.summary-meta-sample b { color: #0f172a; }
.sample-report-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; color: #111827; }
.sample-report-table th, .sample-report-table td { border: 1px solid var(--nsdga-grid); padding: 6px 7px; font-size: 12px; line-height: 1.16; vertical-align: middle; text-align: center; }
.sample-report-table th { background: #f8fafc; font-weight: 900; color: #111827; text-transform: uppercase; letter-spacing: .02em; }
.sample-report-table .name { text-align: left; font-weight: 850; color: #0f172a; white-space: normal; overflow: visible; word-break: normal; overflow-wrap: break-word; }
.sample-report-table .group-row td, .sample-report-table .group-row { background: #fff7ed !important; color: #7c2d12; font-weight: 900; text-align: left; text-transform: uppercase; }
.summary-sample-table col.sum-no { width: 38px; }
.summary-sample-table col.sum-name { width: 230px; }
.summary-sample-table col.sum-subject { width: 86px; }
.summary-sample-table col.sum-average { width: 92px; }
.summary-sample-table col.sum-remarks { width: 96px; }
.summary-sample-table th { white-space: normal; }
.enhanced-report-signatures, .sample-signatures { margin-top: 52px !important; gap: 28px !important; }
.enhanced-report-signatures div, .sample-signatures div { min-height: 44px !important; border-top: 1px solid #334155 !important; padding-top: 7px !important; text-align: center; font-weight: 900; }
.enhanced-report-signatures span, .sample-signatures span { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #334155; }
.print-footer-line { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 6px; border-top: 1px solid #e2e8f0; color: #334155; font-size: 11px; font-weight: 750; }
.page-number:after { content: counter(page); }
.nsdga-report-card-page { max-width: 8.5in; min-height: 11in; margin: 0 auto 28px; padding: .28in; background: #fff; color: #111827; }
.reportcard-header-sample { display: grid; grid-template-columns: 105px 1fr; gap: 16px; align-items: center; text-align: center; margin-bottom: 16px; }
.reportcard-header-sample img { width: 98px; height: 98px; object-fit: contain; }
.reportcard-header-sample h2 { margin: 0 0 4px; font-family: Georgia, 'Times New Roman', serif; font-size: 26px; color: #111827; }
.reportcard-header-sample h3 { margin: 16px 0 5px; font-size: 15px; color: #111827; }
.reportcard-header-sample p { margin: 2px 0; font-size: 12px; font-weight: 700; color: #334155; }
.reportcard-student-box-sample { display: grid; grid-template-columns: 1fr 1fr; border: 1.2px solid #111827; margin: 0 0 0; }
.reportcard-student-box-sample div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #c7d2e1; }
.reportcard-student-box-sample div:nth-child(odd) { border-right: 1px solid #c7d2e1; }
.reportcard-student-box-sample div:nth-last-child(-n+2) { border-bottom: 0; }
.reportcard-student-box-sample span { color: #334155; font-weight: 800; }
.reportcard-student-box-sample strong { color: #111827; }
.report-card-sample-table { border-left: 1.2px solid #111827; border-right: 1.2px solid #111827; border-bottom: 1.2px solid #111827; }
.report-card-sample-table th, .report-card-sample-table td { font-size: 12px; padding: 7px 8px; border-color: #9aa6b7; }
.report-card-sample-table .area-col { width: 240px; }
.report-card-sample-table .component-area-row td:first-child { padding-left: 20px; color: #475569; font-style: italic; }
.general-average-row td { font-weight: 900; background: #fffaf0; }
.parent-note-sample { margin: 22px auto 22px; max-width: 620px; text-align: center; color: #334155; }
.parent-note-sample h4 { margin: 0 0 8px; color: #111827; font-size: 12px; letter-spacing: .04em; }
.parent-note-sample p { font-size: 12px; line-height: 1.55; font-style: italic; }
.transfer-sample { text-align: center; margin: 26px 0 52px; font-size: 12px; font-weight: 700; }
.transfer-sample span { display: inline-block; min-width: 190px; border-bottom: 1px solid #111827; padding: 0 18px 2px; }
.reportcard-signatures { grid-template-columns: repeat(2, minmax(180px, 1fr)) !important; max-width: 660px; margin-left: auto; margin-right: auto; }
.nsdga-certificate-sample { min-height: 7.5in; padding: .28in; background: #fff; }
.certificate-frame-enhanced { position: relative; min-height: 6.9in; border: 3px solid var(--nsdga-maroon); padding: .45in .55in; text-align: center; overflow: hidden; background: radial-gradient(circle at center, rgba(111,20,95,.07), transparent 34%), #fff; }
.cert-corner { position:absolute; width: 180px; height: 180px; transform: rotate(38deg); background: linear-gradient(90deg, var(--nsdga-gold), var(--nsdga-purple)); opacity: .9; }
.cert-corner-left { left: -112px; bottom: -80px; }
.cert-corner-right { right: -112px; top: -80px; }
.certificate-frame-enhanced .certificate-logo { width: 82px; height: 82px; object-fit: contain; }
.certificate-frame-enhanced h2 { margin: 5px 0 2px; font-family: Georgia, 'Times New Roman', serif; font-size: 28px; color: #111827; }
.certificate-frame-enhanced p { margin: 2px 0; color: #334155; }
.cert-quarter { margin-top: 16px; color: #111827; font-size: 18px; text-transform: uppercase; font-weight: 800; }
.certificate-frame-enhanced .certificate-title { color: var(--nsdga-maroon); font-size: 38px; font-weight: 900; text-transform: uppercase; margin: 8px 0; }
.certificate-frame-enhanced .certificate-name { font-family: Georgia, 'Times New Roman', serif; font-size: 34px; color: var(--nsdga-purple); font-weight: 900; margin: 12px 0; }
.certificate-frame-enhanced .certificate-body { max-width: 720px; margin: 0 auto; font-size: 16px; line-height: 1.55; }
.enhanced-signatures { grid-template-columns: repeat(2, minmax(190px, 1fr)); max-width: 620px; margin: 70px auto 0; }
.enhanced-signatures div { border-top: 1px solid #111827; padding-top: 6px; font-weight: 900; }
.enhanced-signatures span { display:block; font-size: 11px; text-transform: uppercase; color: #334155; }
/* Teacher grading sheet readable print override */
.compact-grading-sheet { table-layout: fixed !important; width: 100% !important; border-collapse: collapse !important; }
.compact-grading-sheet col.col-no { width: 24px !important; }
.compact-grading-sheet col.col-studentno { width: 58px !important; }
.compact-grading-sheet col.col-name { width: 210px !important; }
.compact-grading-sheet col.col-score { width: 31px !important; }
.compact-grading-sheet col.col-total { width: 36px !important; }
.compact-grading-sheet col.col-ws { width: 35px !important; }
.compact-grading-sheet col.col-qa { width: 35px !important; }
.compact-grading-sheet col.col-grade { width: 44px !important; }
.compact-grading-sheet col.col-remarks { width: 54px !important; }
.compact-grading-sheet th, .compact-grading-sheet td { border: .8px solid var(--nsdga-soft-grid) !important; font-size: 8px; padding: 2.6px 1.8px; line-height: 1.08; text-align: center; color: #0f172a; }
.compact-grading-sheet .name { text-align:left !important; font-weight: 900; white-space: normal; overflow-wrap: break-word; }
.compact-grading-sheet .component-row th { background:#f3f6fa !important; font-weight:900; }
.compact-grading-sheet .label-row th { background:#f8fafc !important; font-weight:900; }
.compact-grading-sheet .items-row th { background:#fff !important; color:#334155 !important; font-weight:900; }
.teacher-signatures.single-row-signatures { margin-top: 42px !important; }
.teacher-signatures.single-row-signatures div { min-height: 42px !important; }
/* Homeroom Guidance Encoding */
.homeroom-guidance-layout { display:flex; justify-content:space-between; gap:16px; align-items:stretch; margin: 14px 0 18px; }
.homeroom-guidance-guide { flex:1; display:grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap:10px; padding:15px; border:1px solid #e2e8f0; border-radius:20px; background:#fff; }
.homeroom-guidance-guide h3 { grid-column:1/-1; margin:0 0 2px; color:#111827; }
.homeroom-guidance-guide div { display:flex; gap:9px; align-items:flex-start; padding:9px 10px; border-radius:14px; background:#fff7ed; border:1px solid #fed7aa; }
.homeroom-guidance-guide strong { width:26px; height:26px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:#7b1fa2; color:#fff; }
.homeroom-guidance-guide span { font-size:12px; color:#475569; font-weight:750; line-height:1.2; }
.homeroom-main-actions { align-items:center; }
.homeroom-group-label { margin:20px 0 10px; padding:10px 14px; border-radius:14px; background:#1f2937; color:#fff; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.homeroom-learner-card { margin-bottom:16px; border:1px solid #dbe4ee; border-radius:22px; overflow:hidden; background:#fff; box-shadow:0 12px 28px rgba(15,23,42,.05); }
.homeroom-learner-head { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; background:linear-gradient(90deg,#fff7ed,#fff); border-bottom:1px solid #fed7aa; }
.homeroom-learner-head div { display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:center; }
.homeroom-learner-head span { grid-row:span 2; width:34px; height:34px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; background:#f97316; color:#fff; font-weight:900; }
.homeroom-learner-head strong { color:#111827; font-size:15px; }
.homeroom-learner-head small { color:#64748b; font-weight:800; }
.homeroom-learner-head em { color:#7c2d12; font-style:normal; font-weight:900; }
.homeroom-competency-table th, .homeroom-competency-table td { vertical-align:middle; }
.homeroom-competency-table .competency-col { width:46%; }
.homeroom-competency-table .remarks-col { width:22%; }
.homeroom-competency-table .competency-text { text-align:left; font-weight:800; color:#111827; line-height:1.3; }
.homeroom-rating-radio { display:inline-flex; align-items:center; justify-content:center; }
.homeroom-rating-radio input { position:absolute; opacity:0; pointer-events:none; }
.homeroom-rating-radio span { width:34px; height:34px; border-radius:12px; border:1px solid #cbd5e1; display:inline-flex; align-items:center; justify-content:center; font-weight:900; background:#fff; color:#334155; cursor:pointer; }
.homeroom-rating-radio input:checked + span { background:#7b1fa2; color:#fff; border-color:#7b1fa2; box-shadow:0 0 0 3px rgba(123,31,162,.14); }
.homeroom-competency-table .remarks-input { min-width:180px; }
@media print {
    @page { size: 13in 8.5in; margin: .25in .22in; }
    .page-header.no-print, .toolbar-actions, .no-print, .policy-report-summary, .report-notes-box, .generated-report-message { display:none !important; }
    .printable-report, .report-preview { box-shadow:none !important; border:0 !important; border-radius:0 !important; margin:0 !important; padding:0 !important; width:100% !important; max-width:none !important; }
    .sample-report-header { margin-bottom: 16px !important; grid-template-columns:76px 1fr !important; gap:12px !important; }
    .sample-report-header img { width:72px !important; height:72px !important; }
    .sample-report-header h2 { font-size:22px !important; }
    .sample-report-header h3 { font-size:16px !important; margin:4px 0 !important; }
    .sample-report-header p { font-size:10px !important; }
    .summary-meta-sample { margin: 10px 0 9px !important; font-size:10px !important; gap:4px !important; }
    .sample-report-table th, .sample-report-table td { font-size:8px !important; padding:3.5px 3px !important; line-height:1.08 !important; border:.7px solid var(--nsdga-grid) !important; }
    .summary-sample-table col.sum-name { width: 210px !important; }
    .summary-sample-table col.sum-subject { width: 74px !important; }
    .summary-sample-table col.sum-average { width: 86px !important; }
    .summary-sample-table col.sum-remarks { width: 88px !important; }
    .enhanced-report-signatures, .sample-signatures { margin-top: 42px !important; }
    .print-footer-line { font-size:8px !important; margin-top:8px !important; }
    .nsdga-report-card-page { width: 8in !important; max-width:8in !important; min-height:10.45in !important; margin:0 auto !important; padding:0 !important; page-break-after:always; }
    .reportcard-header-sample { grid-template-columns:82px 1fr !important; gap:10px !important; margin-bottom:10px !important; }
    .reportcard-header-sample img { width:76px !important; height:76px !important; }
    .reportcard-header-sample h2 { font-size:18px !important; }
    .reportcard-header-sample h3 { margin:8px 0 3px !important; font-size:11px !important; }
    .reportcard-header-sample p { font-size:9px !important; }
    .reportcard-student-box-sample div { padding:5px 7px !important; grid-template-columns:80px 1fr !important; font-size:8.5px !important; }
    .report-card-sample-table th, .report-card-sample-table td { font-size:8.5px !important; padding:4px 5px !important; }
    .parent-note-sample { margin:12px auto !important; }
    .parent-note-sample p { font-size:8px !important; }
    .transfer-sample { margin:18px 0 36px !important; font-size:8.5px !important; }
    .reportcard-signatures { margin-top: 20px !important; }
    .certificate-frame-enhanced { min-height:7in !important; }
    .compact-grading-sheet th, .compact-grading-sheet td { font-size:8px !important; padding:2.6px 1.8px !important; line-height:1.08 !important; }
    .compact-grading-sheet .component-row th { font-size:7.9px !important; }
    .compact-grading-sheet .label-row th { font-size:7.6px !important; }
    .compact-grading-sheet .items-row th { font-size:7.1px !important; }
    .compact-grading-sheet tbody td.name { font-size:7.9px !important; }
    .teacher-signatures.single-row-signatures { margin-top:42px !important; }
}
@media (max-width: 1100px) {
    .homeroom-guidance-layout { flex-direction:column; }
    .homeroom-guidance-guide { grid-template-columns:1fr; }
}
@media print {
    .deped-grading-sheet { page: teacher-grading; }
    .nsdga-summary-sample { page: summary-sheet; }
    .nsdga-report-card-page { page: report-card; }
    .nsdga-certificate-sample { page: certificate-page; }
    @page teacher-grading { size: 13in 8.5in; margin: .25in .22in; }
    @page summary-sheet { size: 8.5in 13in; margin: .28in .22in; }
    @page report-card { size: 8.5in 11in; margin: .25in; }
    @page certificate-page { size: 11in 8.5in; margin: .2in; }
}

/* 2026-06-30 Preschool report card exact landscape PDF structure */
.preschool-card-landscape {
    width: 11in !important;
    min-height: 8.5in !important;
    max-width: 11in !important;
    margin: 18px auto !important;
    padding: .28in .34in !important;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #d7dce5 !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.08) !important;
    font-family: Calibri, Arial, sans-serif !important;
    page-break-after: always !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.preschool-card-landscape * { box-sizing: border-box !important; }
.psr-header { text-align: center; line-height: 1.05; margin-bottom: 6px; }
.psr-header h2 { font-family: Calibri, Arial, sans-serif !important; font-size: 20px; font-weight: 800; margin: 0; letter-spacing: .01em; text-transform: uppercase; }
.psr-header p { font-size: 11px; margin: 2px 0; }
.psr-header h3 { font-size: 13px; margin: 7px 0 0; font-weight: 800; text-transform: uppercase; }
.psr-header div div { font-size: 15px; font-weight: 600; }
.psr-info-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; margin-bottom: 5px; }
.psr-info { display: grid; grid-template-columns: 54px 1fr; column-gap: 8px; row-gap: 2px; font-size: 12px; }
.psr-info div { display: contents; }
.psr-info span { font-weight: 700; }
.psr-info strong { font-weight: 500; }
.psr-motto { align-self: end; text-align: center; font-family: "Times New Roman", serif; font-size: 14px; font-weight: 600; }
.psr-front-grid { display: grid; grid-template-columns: 285px 1fr; grid-auto-rows: auto; column-gap: 34px; row-gap: 6px; align-items: start; }
.psr-attendance-block h4, .psr-parent-signature h4 { font-size: 12px; margin: 0 0 5px; font-weight: 800; text-align: left; }
.psr-attendance-table { border-collapse: collapse; width: 100%; font-size: 10.5px; table-layout: fixed; }
.psr-attendance-table th, .psr-attendance-table td { border: none; padding: 1px 4px; text-align: center; line-height: 1.05; }
.psr-attendance-table th:first-child, .psr-attendance-table td:first-child { text-align: left; width: 94px; }
.psr-parent-signature { font-size: 13px; }
.psr-parent-signature div { margin: 12px 0; white-space: nowrap; }
.psr-parent-signature span { display: inline-block; border-bottom: 1px solid #000; width: 260px; height: 13px; }
.psr-front-competencies { grid-column: 1 / span 2; margin-top: 2px; }
.psr-kinder-front-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px 20px; align-items: start; }
.kinder-parent { grid-column: 1; }
.kinder-front-areas { grid-column: 1 / span 2; }
.kinder-scale { grid-column: 1 / span 2; }
.psr-competency-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; margin-bottom: 3px; }
.psr-competency-table th, .psr-competency-table td { border: 0 !important; padding: 1px 4px; line-height: 1.05; vertical-align: top; color: #000 !important; }
.psr-competency-table thead th { font-weight: 800; text-align: left; padding-top: 4px; }
.psr-competency-table thead th:not(:first-child) { text-align: center; width: 31px; }
.psr-competency-table tbody td:not(:first-child) { text-align: center; width: 31px; font-weight: 700; }
.psr-competency-table tbody td:first-child { width: auto; }
.psr-scale { font-size: 10.5px; line-height: 1.15; margin-top: 4px; }
.psr-scale p { margin: 2px 0; }
.psr-lrn { position: absolute; right: .35in; bottom: .22in; font-size: 11px; }
.preschool-card-front { position: relative; }
.psr-student-back-name { font-size: 14px; margin: 0 0 3px; font-weight: 700; }
.psr-back-columns { column-count: 2; column-gap: 26px; }
.psr-back-columns .psr-competency-table { break-inside: avoid; page-break-inside: avoid; margin-bottom: 4px; }
.psr-back-scale { column-span: all; margin-top: 5px; }
.preschool-n1 .psr-back-columns, .preschool-n2 .psr-back-columns { column-count: 2; }
.preschool-k .psr-back-columns { column-count: 2; }
.preschool-n1 .psr-competency-table, .preschool-n2 .psr-competency-table { font-size: 10.6px; }
.preschool-k .psr-competency-table { font-size: 10.2px; }

@media print {
    @page { size: 11in 8.5in; margin: 0; }
    .preschool-card-landscape {
        width: 11in !important;
        height: 8.5in !important;
        min-height: 8.5in !important;
        max-height: 8.5in !important;
        margin: 0 !important;
        padding: .28in .34in !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        page-break-after: always !important;
        break-after: page !important;
    }
    .preschool-card-landscape:last-child { page-break-after: auto !important; }
    .psr-header h2 { font-size: 20px !important; }
    .psr-header p { font-size: 11px !important; }
    .psr-header h3 { font-size: 13px !important; }
    .psr-info { font-size: 12px !important; }
    .psr-motto { font-size: 14px !important; }
    .psr-attendance-table { font-size: 10.5px !important; }
    .psr-competency-table { font-size: 10.4px !important; }
    .preschool-k .psr-competency-table { font-size: 10px !important; }
    .psr-scale { font-size: 10.5px !important; }
}

/* 2026-06-30 Preschool report card folded PDF exact layout pass
   The preschool cards are printed in landscape and folded at the center, so each side is a two-panel sheet. */
.preschool-fold-sheet {
    width: 11in !important;
    height: 8.5in !important;
    max-width: 11in !important;
    min-height: 8.5in !important;
    margin: 18px auto !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
    display: grid !important;
    grid-template-columns: 5.5in 5.5in !important;
    position: relative !important;
    overflow: hidden !important;
    page-break-after: always !important;
    box-sizing: border-box !important;
}
.preschool-fold-sheet * { box-sizing: border-box !important; color: #000 !important; }
.psr-fold-line {
    position: absolute;
    left: 5.5in;
    top: 0;
    width: 0;
    height: 8.5in;
    border-left: 1px dotted #000;
    z-index: 5;
}
.psr-panel {
    width: 5.5in !important;
    height: 8.5in !important;
    overflow: hidden !important;
    position: relative !important;
    background: #fff !important;
}
.psr-panel-left { padding: .08in .08in .08in .08in !important; }
.psr-panel-right { padding: .34in .08in .08in .08in !important; }
.psr-pdf-back .psr-panel-left { padding: .50in .48in .26in .52in !important; }
.psr-pdf-back.preschool-n2 .psr-panel-left { padding: .10in .07in .22in .05in !important; }
.psr-pdf-back.preschool-kinder .psr-panel-left { padding: .58in .06in .18in .08in !important; }
.psr-small-name { font-size: 6.8px; line-height: 1; margin: 0 0 .10in 0; }
.psr-scale-block { font-family: "Times New Roman", Times, serif !important; font-size: 12.3px; line-height: 1.16; }
.psr-scale-block h1 { font-family: Arial, Helvetica, sans-serif !important; text-align: center; font-size: 23px; line-height: 1.05; margin: .18in 0 .08in; font-weight: 800; }
.psr-scale-block p { margin: 0 0 .14in; }
.psr-scale-n2 { font-size: 12px; }
.psr-scale-n2 h1 { margin-top: .12in; }
.psr-exact-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 11.8px !important;
    line-height: 1.16 !important;
    margin: 0 !important;
}
.psr-exact-table th,
.psr-exact-table td {
    border: 1px solid #000 !important;
    padding: 3px 5px !important;
    vertical-align: top !important;
    line-height: 1.16 !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.psr-exact-table th { text-align: left !important; font-weight: 800 !important; }
.psr-exact-table th:not(:first-child),
.psr-exact-table td:not(:first-child) { width: .58in !important; text-align: center !important; }
.psr-exact-table tr { page-break-inside: avoid; break-inside: avoid; }
.preschool-n1 .psr-front-right .psr-exact-table,
.preschool-n2 .psr-front-right .psr-exact-table { font-size: 12px !important; }
.preschool-n1 .psr-front-left .psr-table-math { margin-top: .68in !important; }
.preschool-n2 .psr-front-left .psr-exact-table { margin-top: .05in !important; font-size: 11px !important; }
.preschool-n2 .psr-front-left .psr-exact-table + .psr-exact-table { margin-top: 0 !important; }
.preschool-n2 .psr-front-right .psr-exact-table { font-size: 10.45px !important; }
.preschool-n2 .psr-gross-table { font-size: 11px !important; margin-bottom: .16in !important; }
.preschool-kinder .psr-exact-table { font-size: 10.7px !important; line-height: 1.12 !important; }
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td { padding: 2.2px 4px !important; }
.preschool-kinder .psr-front-right .psr-exact-table { font-size: 10.55px !important; }
.preschool-kinder .psr-k-physical { font-size: 9.8px !important; margin-top: .08in !important; }
.psr-att-title { text-align: center; font-family: "Times New Roman", Times, serif !important; font-size: 17px; margin: 0 0 .12in; font-weight: 800; }
.psr-attendance-exact {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    font-family: "Times New Roman", Times, serif !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
}
.psr-attendance-exact th,
.psr-attendance-exact td {
    border: 1px solid #000 !important;
    padding: 7px 5px !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.psr-attendance-exact th { font-weight: 800 !important; }
.psr-parent-exact { margin-top: .44in; font-family: "Times New Roman", Times, serif !important; font-size: 15px; }
.psr-parent-exact h3 { text-align: center; margin: 0 0 .30in; font-size: 16px; font-weight: 800; }
.psr-parent-exact div { margin: .14in 0; display: flex; align-items: flex-end; gap: .08in; white-space: nowrap; }
.psr-parent-exact span { flex: 1 1 auto; border-bottom: 1px solid #000; height: .14in; min-width: 2.2in; }
.psr-k-parent { margin-top: .42in; padding: 0 .35in; }
.psr-left-motto { position: absolute; bottom: .22in; left: .70in; right: .70in; text-align: center; font-family: "Times New Roman", Times, serif !important; font-style: italic; font-size: 13px; letter-spacing: .20em; }
.psr-cover-right { text-align: center; font-family: "Times New Roman", Times, serif !important; padding-top: .45in !important; }
.psr-cover-logo { width: .95in; height: .95in; object-fit: contain; margin-top: .05in; }
.psr-cover-right h2 { font-size: 13px; margin: .16in 0 .02in; font-weight: 800; text-transform: uppercase; }
.psr-cover-right h3 { font-size: 12.5px; margin: 0 0 .02in; font-weight: 800; }
.psr-cover-right h4 { font-size: 13px; margin: 0; font-weight: 800; }
.psr-cover-title { font-size: 33px; font-style: italic; letter-spacing: .17em; margin: .70in 0 .22in; }
.psr-cover-level { font-size: 31px; font-style: italic; letter-spacing: .16em; margin-bottom: .70in; }
.psr-cover-info { width: 4.5in; margin: 0 auto; text-align: left; font-size: 14px; }
.psr-cover-info div { display: grid; grid-template-columns: .58in 1fr; align-items: end; margin: .06in 0; }
.psr-cover-info span { border-bottom: 2px solid #000; padding-left: .05in; min-height: .18in; }
.psr-motto-exact { position: absolute; left: .75in; right: .75in; bottom: .43in; text-align: center; font-style: italic; letter-spacing: .22em; font-size: 12.8px; }
.psr-shapes { position: absolute; left: .18in; right: .18in; height: .42in; display: flex; justify-content: space-around; opacity: .32; pointer-events: none; }
.psr-shapes-top { top: .08in; }
.psr-shapes-bottom { bottom: .06in; }
.psr-shapes i { width: .42in; height: .34in; display: block; background: #facc15; border-radius: 50%; }
.psr-shapes i:nth-child(1), .psr-shapes i:nth-child(7) { background: #fecaca; clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.psr-shapes i:nth-child(2) { background: #fde68a; }
.psr-shapes i:nth-child(3) { background: #fef3c7; border-radius: 7px; }
.psr-shapes i:nth-child(4) { background: #dcfce7; clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }
.psr-shapes i:nth-child(5) { background: #bae6fd; }
.psr-shapes i:nth-child(6) { background: #dbeafe; border-radius: 4px; }
.psr-k-cover-right { padding: .22in .11in .10in .18in !important; text-align: left; }
.psr-k-cover-right h2,
.psr-k-cover-right h3,
.psr-k-cover-right h4 { text-align: center; }
.psr-k-logo { position: absolute; top: .40in; left: .35in; width: .88in; height: .88in; }
.psr-k-title { text-align: center; margin: .36in 0 .16in !important; }
.psr-k-cover-info { font-family: "Times New Roman", Times, serif !important; font-size: 17px; margin: 0 .25in .10in .45in; }
.psr-k-cover-info div { display: grid; grid-template-columns: .64in 1fr; align-items: end; margin: .04in 0; }
.psr-k-cover-info div:nth-child(2) { grid-template-columns: .64in .75in .85in 1fr; }
.psr-k-cover-info span { border-bottom: 2px solid #000; padding-left: .05in; min-height: .18in; }
.psr-k-cover-info b { font-weight: 400; padding-left: .10in; }
.psr-k-scale { font-size: 11.2px; line-height: 1.15; margin: .10in .12in .06in; }
.psr-k-scale p { margin: .02in 0; }

@media print {
    @page { size: 11in 8.5in; margin: 0; }
    .preschool-fold-sheet {
        width: 11in !important;
        height: 8.5in !important;
        min-height: 8.5in !important;
        max-height: 8.5in !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        page-break-after: always !important;
        break-after: page !important;
    }
    .preschool-fold-sheet:last-child { page-break-after: auto !important; }
}


/* 2026-06-30 Pre-School report card tri-term clean-fit correction
   Keeps the folded two-panel landscape structure while preventing tables from being clipped. */
.preschool-fold-sheet {
    background: #fff !important;
    overflow: hidden !important;
}
.psr-panel {
    overflow: hidden !important;
}
.psr-exact-table {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.2px !important;
    line-height: 1.02 !important;
    margin: 0 0 .035in 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    width: 100% !important;
}
.psr-exact-table th,
.psr-exact-table td {
    border: .75px solid #111 !important;
    padding: 1.15px 2.4px !important;
    line-height: 1.02 !important;
    vertical-align: top !important;
    overflow: hidden !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}
.psr-exact-table th {
    background: #f7f3eb !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
    letter-spacing: .01em !important;
}
.psr-exact-table th:first-child,
.psr-exact-table td:first-child {
    width: auto !important;
    text-align: left !important;
}
.psr-exact-table th:not(:first-child),
.psr-exact-table td:not(:first-child) {
    width: .38in !important;
    text-align: center !important;
    font-weight: 700 !important;
}
.psr-front-left,
.psr-front-right,
.psr-cover-left,
.psr-cover-right {
    overflow: hidden !important;
}
.preschool-n1 .psr-exact-table,
.preschool-n2 .psr-exact-table,
.preschool-kinder .psr-exact-table {
    font-size: 8.15px !important;
}
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td {
    padding: 1px 2.2px !important;
}
.preschool-n2 .psr-front-right .psr-exact-table,
.preschool-kinder .psr-front-right .psr-exact-table {
    font-size: 7.9px !important;
}
.psr-attendance-exact {
    font-size: 10.2px !important;
    border-collapse: collapse !important;
}
.psr-attendance-exact th,
.psr-attendance-exact td {
    border: .75px solid #111 !important;
    padding: 3.2px 4px !important;
}
.psr-parent-exact { margin-top: .22in !important; font-size: 12px !important; }
.psr-parent-exact h3 { font-size: 13px !important; margin-bottom: .13in !important; }
.psr-parent-exact div { margin: .10in 0 !important; }
.psr-scale-block { font-size: 9.7px !important; line-height: 1.08 !important; }
.psr-scale-block h1 { font-size: 18px !important; margin: .08in 0 .05in !important; }
.psr-scale-block p { margin: 0 0 .055in !important; }
.psr-cover-right h2 { color: #2d1b0e !important; }
.psr-cover-title, .psr-cover-level { color: #7c2d12 !important; }
@media print {
    @page { size: 11in 8.5in; margin: 0; }
    .preschool-fold-sheet {
        width: 11in !important;
        height: 8.5in !important;
        min-height: 8.5in !important;
        max-height: 8.5in !important;
        overflow: hidden !important;
    }
    .psr-panel { height: 8.5in !important; overflow: hidden !important; }
    .psr-exact-table { font-size: 7.75px !important; line-height: 1 !important; }
    .psr-exact-table th, .psr-exact-table td { padding: .9px 2px !important; line-height: 1 !important; }
}

/* 2026-06-30 Pre-School Summary Sheet + report card page-fill cleanup */
.preschool-summary-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border: 1px solid #111827;
    padding: 6px 8px;
    margin: 8px 0 10px;
    font-size: 10px;
    background: #fff;
}
.preschool-summary-meta div {
    display: grid;
    grid-template-columns: 78px 8px 1fr;
    align-items: center;
}
.preschool-summary-sheet-table {
    table-layout: fixed !important;
    border-collapse: collapse !important;
    width: 100% !important;
}
.preschool-summary-sheet-table col.pssum-no { width: 32px; }
.preschool-summary-sheet-table col.pssum-name { width: 210px; }
.preschool-summary-sheet-table col.pssum-area { width: 210px; }
.preschool-summary-sheet-table col.pssum-term { width: 68px; }
.preschool-summary-sheet-table col.pssum-remarks { width: 90px; }
.preschool-summary-sheet-table th,
.preschool-summary-sheet-table td {
    border: 1px solid #64748b !important;
    padding: 5px 6px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    vertical-align: middle !important;
}
.preschool-summary-sheet-table th {
    background: #f7f3eb !important;
    color: #7c2d12 !important;
    text-transform: uppercase;
    font-weight: 900;
}
.preschool-summary-sheet-table td:nth-child(4),
.preschool-summary-sheet-table td:nth-child(5),
.preschool-summary-sheet-table td:nth-child(6) {
    text-align: center;
    font-weight: 900;
}
.preschool-summary-sheet-table .name,
.preschool-summary-sheet-table .area-name { text-align: left !important; }
.preschool-summary-legend {
    border: 1px dashed #cbd5e1;
    background: #fffdfa;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 10px;
}

.preschool-fold-sheet {
    font-family: Arial, Helvetica, sans-serif !important;
    color: #000 !important;
}
.preschool-fold-sheet .psr-panel-left,
.preschool-fold-sheet .psr-panel-right,
.preschool-fold-sheet .psr-cover-left,
.preschool-fold-sheet .psr-cover-right,
.preschool-fold-sheet .psr-front-left,
.preschool-fold-sheet .psr-front-right {
    overflow: hidden !important;
}
.psr-exact-table {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.85px !important;
    line-height: 1.08 !important;
    margin: 0 0 .045in 0 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    width: 100% !important;
}
.psr-exact-table th,
.psr-exact-table td {
    border: .75px solid #111 !important;
    padding: 1.6px 2.6px !important;
    line-height: 1.08 !important;
    vertical-align: top !important;
    overflow: hidden !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}
.psr-exact-table th {
    background: #fff8ed !important;
    color: #7c2d12 !important;
    font-size: 8.85px !important;
    font-weight: 900 !important;
    letter-spacing: .01em !important;
}
.psr-exact-table td:first-child,
.psr-exact-table th:first-child { text-align: left !important; }
.psr-exact-table td:not(:first-child),
.psr-exact-table th:not(:first-child) {
    width: .38in !important;
    min-width: .38in !important;
    max-width: .38in !important;
    text-align: center !important;
    font-weight: 800 !important;
}
.preschool-n1 .psr-exact-table,
.preschool-n2 .psr-exact-table { font-size: 8.9px !important; }
.preschool-kinder .psr-exact-table { font-size: 8.25px !important; }
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td { padding: 1.2px 2.2px !important; line-height: 1.04 !important; }
.preschool-n2 .psr-front-right .psr-exact-table,
.preschool-kinder .psr-front-right .psr-exact-table { font-size: 8.2px !important; }
.psr-scale-block {
    font-size: 9.9px !important;
    line-height: 1.08 !important;
}
.psr-scale-block h1 { font-size: 18px !important; margin: .06in 0 .04in !important; }
.psr-scale-block p { margin: 0 0 .05in !important; }
.psr-cover-right h2,
.psr-cover-right h3,
.psr-cover-right h4 { color: #2d1b0e !important; }
.psr-cover-title,
.psr-cover-level { color: #7c2d12 !important; }
.psr-attendance-exact th,
.psr-attendance-exact td { border: .75px solid #111 !important; }
.psr-parent-exact { margin-top: .18in !important; }
.psr-parent-exact div { margin: .08in 0 !important; }

@media print {
    .preschool-summary-meta { font-size: 8.5px !important; padding: 4px 6px !important; margin: 5px 0 7px !important; }
    .preschool-summary-sheet-table th,
    .preschool-summary-sheet-table td { font-size: 8.2px !important; padding: 3px 4px !important; }
    .preschool-summary-sheet-table col.pssum-name { width: 180px !important; }
    .preschool-summary-sheet-table col.pssum-area { width: 185px !important; }
    .preschool-summary-sheet-table col.pssum-term { width: 54px !important; }
    .preschool-fold-sheet {
        width: 11in !important;
        height: 8.5in !important;
        max-height: 8.5in !important;
        overflow: hidden !important;
    }
    .psr-exact-table { font-size: 8.25px !important; line-height: 1.045 !important; }
    .psr-exact-table th,
    .psr-exact-table td { padding: 1.15px 2px !important; line-height: 1.045 !important; }
    .preschool-kinder .psr-exact-table { font-size: 7.75px !important; }
    .preschool-kinder .psr-exact-table th,
    .preschool-kinder .psr-exact-table td { padding: .9px 1.8px !important; }
}

/* 2026-06-30 report-card corrections: preschool summary routing, preschool fit, and regular report-card back page */
.reportcard-back-page-sample {
    max-width: 8.5in;
    min-height: 11in;
    padding: .32in .38in;
    background: #fff;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
}
.rc-back-title {
    text-align: center;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .02em;
}
.rc-back-info-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #9aa6b7;
    padding: 8px 10px;
    gap: 7px 18px;
    margin-bottom: 12px;
    font-size: 11px;
}
.rc-back-info-box div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.rc-back-info-box span { font-weight: 800; color: #334155; }
.rc-back-info-box strong { font-weight: 900; }
.rc-homeroom-table,
.rc-attendance-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.rc-homeroom-table th,
.rc-homeroom-table td,
.rc-attendance-table th,
.rc-attendance-table td {
    border: 1px solid #9aa6b7;
    padding: 4px 5px;
    font-size: 10px;
    line-height: 1.12;
    vertical-align: top;
    color: #000;
}
.rc-homeroom-table th {
    background: #f8fafc;
    font-weight: 900;
    text-transform: uppercase;
}
.rc-homeroom-table th:first-child { width: auto; }
.rc-homeroom-table th:not(:first-child) { width: 42px; text-align: center; }
.rc-homeroom-table td:not(:first-child) { text-align: center; }
.rc-homeroom-table .competency-text { text-align: left !important; }
.rc-homeroom-table .term-row td {
    background: #fff7ed;
    color: #7c2d12;
    font-weight: 900;
    text-align: left !important;
}
.rc-back-lower {
    display: grid;
    grid-template-columns: 1.05fr 1.55fr 1fr;
    gap: 12px;
    margin-top: 12px;
    align-items: start;
}
.rc-legend,
.rc-transfer-cancel {
    font-size: 10px;
    line-height: 1.35;
}
.rc-back-lower h4 { margin: 0 0 6px; font-size: 11px; font-weight: 900; }
.rc-attendance-table th,
.rc-attendance-table td { padding: 4px 3px; font-size: 9px; text-align: center; }
.rc-attendance-table td:first-child { text-align: left; width: 82px; font-weight: 800; }

/* Preschool summary must look like a developmental summary, never a subject sheet. */
.preschool-summary-sheet-table th,
.preschool-summary-sheet-table td {
    border: 1px solid #334155 !important;
    color: #000 !important;
}
.preschool-summary-sheet-table th { background: #fff7ed !important; }

/* Preschool folded report-card fit: uniform font sizes, fewer unused gaps, wrapped labels. */
.preschool-fold-sheet {
    width: 11in !important;
    min-height: 8.5in !important;
    height: 8.5in !important;
    padding: 0 !important;
    background: #fff !important;
}
.preschool-fold-sheet .psr-panel {
    height: 8.5in !important;
    overflow: hidden !important;
    display: block !important;
}
.psr-scale-block {
    font-size: 8.7px !important;
    line-height: 1.05 !important;
    margin-bottom: .035in !important;
}
.psr-scale-block h1 {
    font-size: 17px !important;
    line-height: 1.05 !important;
    margin: .035in 0 .035in !important;
}
.psr-scale-block p { margin: 0 0 .035in !important; }
.psr-exact-table {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 8.55px !important;
    line-height: 1.04 !important;
    margin: 0 0 .025in 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    width: 100% !important;
}
.psr-exact-table th,
.psr-exact-table td {
    font-size: 8.55px !important;
    line-height: 1.04 !important;
    padding: 1.25px 2.2px !important;
    border: .75px solid #111 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    vertical-align: top !important;
}
.psr-exact-table th {
    background: #fff7ed !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
}
.psr-exact-table td:first-child,
.psr-exact-table th:first-child { text-align: left !important; }
.psr-exact-table th:not(:first-child),
.psr-exact-table td:not(:first-child) {
    width: .34in !important;
    min-width: .34in !important;
    max-width: .34in !important;
    text-align: center !important;
    font-weight: 800 !important;
}
.preschool-kinder .psr-exact-table,
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td { font-size: 7.75px !important; padding: .95px 1.8px !important; }
.preschool-n2 .psr-front-right .psr-exact-table,
.preschool-kinder .psr-front-right .psr-exact-table { font-size: 7.9px !important; }
.psr-attendance-exact th,
.psr-attendance-exact td { border: .75px solid #111 !important; padding: 2.6px 3px !important; font-size: 9.2px !important; }
.psr-parent-exact { margin-top: .12in !important; font-size: 11px !important; }
.psr-parent-exact h3 { margin-bottom: .10in !important; font-size: 12px !important; }
.psr-parent-exact div { margin: .07in 0 !important; }
.psr-small-name { font-size: 6.4px !important; margin-bottom: .035in !important; }

@media print {
    .print-footer-line { display: none !important; }
    .nsdga-report-card-page { box-shadow: none !important; border: 0 !important; border-radius: 0 !important; margin: 0 auto !important; }
    .reportcard-back-page-sample { page-break-before: always !important; break-before: page !important; }
    .rc-homeroom-table th,
    .rc-homeroom-table td { font-size: 9px !important; padding: 3px 4px !important; }
    .rc-back-info-box { font-size: 9.5px !important; padding: 6px 8px !important; }
    .rc-back-lower { gap: 8px !important; }
    .preschool-fold-sheet { width: 11in !important; height: 8.5in !important; max-height: 8.5in !important; overflow: hidden !important; }
}

/* 2026-06-30 Preschool report card page-fill correction
   Standardizes all preschool competency tables and stretches each panel so the folded pages do not leave large blank areas. */
.preschool-fold-sheet .psr-panel,
.preschool-fold-sheet .psr-panel-left,
.preschool-fold-sheet .psr-panel-right,
.preschool-fold-sheet .psr-front-left,
.preschool-fold-sheet .psr-front-right,
.preschool-fold-sheet .psr-cover-left,
.preschool-fold-sheet .psr-cover-right {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.preschool-fold-sheet .psr-small-name,
.preschool-fold-sheet .psr-scale-block,
.preschool-fold-sheet .psr-parent-exact,
.preschool-fold-sheet .psr-att-title,
.preschool-fold-sheet .psr-attendance-exact,
.preschool-fold-sheet .psr-motto-exact,
.preschool-fold-sheet .psr-cover-logo,
.preschool-fold-sheet .psr-cover-right h2,
.preschool-fold-sheet .psr-cover-right h3,
.preschool-fold-sheet .psr-cover-right h4,
.preschool-fold-sheet .psr-cover-title,
.preschool-fold-sheet .psr-cover-level,
.preschool-fold-sheet .psr-cover-info,
.preschool-fold-sheet .psr-k-cover-info,
.preschool-fold-sheet .psr-k-scale {
    flex: 0 0 auto !important;
}
.preschool-fold-sheet .psr-exact-table {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 .045in 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.15px !important;
    line-height: 1.14 !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    width: 100% !important;
}
.preschool-fold-sheet .psr-exact-table th,
.preschool-fold-sheet .psr-exact-table td {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.15px !important;
    line-height: 1.14 !important;
    padding: 2.6px 3.2px !important;
    border: .8px solid #111 !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    overflow: hidden !important;
}
.preschool-fold-sheet .psr-exact-table th {
    background: #fff7ed !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}
.preschool-fold-sheet .psr-exact-table th:not(:first-child),
.preschool-fold-sheet .psr-exact-table td:not(:first-child) {
    width: .34in !important;
    min-width: .34in !important;
    max-width: .34in !important;
    text-align: center !important;
    font-weight: 800 !important;
}
.preschool-fold-sheet .psr-exact-table td:first-child,
.preschool-fold-sheet .psr-exact-table th:first-child {
    text-align: left !important;
}
.preschool-fold-sheet .psr-exact-table tbody tr {
    height: auto !important;
}
.preschool-fold-sheet .psr-exact-table + .psr-exact-table {
    margin-top: .055in !important;
}
/* Front/back pages with several short tables: distribute space instead of leaving a large blank lower half. */
.preschool-pdf-front .psr-front-left > .psr-exact-table,
.preschool-pdf-front .psr-front-right > .psr-exact-table,
.preschool-pdf-back .psr-cover-left > .psr-exact-table,
.preschool-pdf-back .psr-cover-right > .psr-exact-table {
    flex-grow: 1.15 !important;
}
.preschool-pdf-front .psr-front-left > .psr-scale-block + .psr-exact-table,
.preschool-pdf-front .psr-front-left > .psr-small-name + .psr-scale-block + .psr-exact-table {
    flex-grow: 1.7 !important;
}
/* Keep long Kinder / Nursery 2 tables readable without clipping. */
.preschool-kinder .psr-exact-table,
.preschool-n2 .psr-exact-table,
.preschool-n1 .psr-exact-table {
    font-size: 9.15px !important;
}
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td,
.preschool-n2 .psr-exact-table th,
.preschool-n2 .psr-exact-table td,
.preschool-n1 .psr-exact-table th,
.preschool-n1 .psr-exact-table td {
    font-size: 9.15px !important;
}
.preschool-fold-sheet .psr-scale-block {
    font-size: 10.6px !important;
    line-height: 1.14 !important;
}
.preschool-fold-sheet .psr-scale-block h1 {
    font-size: 20px !important;
    margin: .055in 0 .045in !important;
}
.preschool-fold-sheet .psr-scale-block p {
    margin: 0 0 .045in !important;
}

@media print {
    .preschool-fold-sheet .psr-exact-table,
    .preschool-fold-sheet .psr-exact-table th,
    .preschool-fold-sheet .psr-exact-table td,
    .preschool-kinder .psr-exact-table,
    .preschool-kinder .psr-exact-table th,
    .preschool-kinder .psr-exact-table td,
    .preschool-n2 .psr-exact-table,
    .preschool-n2 .psr-exact-table th,
    .preschool-n2 .psr-exact-table td,
    .preschool-n1 .psr-exact-table,
    .preschool-n1 .psr-exact-table th,
    .preschool-n1 .psr-exact-table td {
        font-size: 8.95px !important;
        line-height: 1.11 !important;
        padding: 2.25px 2.8px !important;
    }
    .preschool-fold-sheet .psr-exact-table th:not(:first-child),
    .preschool-fold-sheet .psr-exact-table td:not(:first-child) {
        width: .33in !important;
        min-width: .33in !important;
        max-width: .33in !important;
    }
    .preschool-fold-sheet .psr-scale-block {
        font-size: 10.3px !important;
        line-height: 1.12 !important;
    }
}

/* 2026-06-30 Pre-School report card even-row correction
   Removes uneven table stretching and uses one standard row rhythm per level. */
.preschool-fold-sheet .psr-panel,
.preschool-fold-sheet .psr-panel-left,
.preschool-fold-sheet .psr-panel-right,
.preschool-fold-sheet .psr-front-left,
.preschool-fold-sheet .psr-front-right,
.preschool-fold-sheet .psr-cover-left,
.preschool-fold-sheet .psr-cover-right {
    display: block !important;
    overflow: hidden !important;
}
.preschool-fold-sheet .psr-exact-table,
.preschool-pdf-front .psr-front-left > .psr-exact-table,
.preschool-pdf-front .psr-front-right > .psr-exact-table,
.preschool-pdf-back .psr-cover-left > .psr-exact-table,
.preschool-pdf-back .psr-cover-right > .psr-exact-table,
.preschool-pdf-front .psr-front-left > .psr-scale-block + .psr-exact-table,
.preschool-pdf-front .psr-front-left > .psr-small-name + .psr-scale-block + .psr-exact-table {
    display: table !important;
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 .055in 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9px !important;
    line-height: 1.12 !important;
}
.preschool-fold-sheet .psr-exact-table th,
.preschool-fold-sheet .psr-exact-table td,
.preschool-kinder .psr-exact-table th,
.preschool-kinder .psr-exact-table td,
.preschool-n2 .psr-exact-table th,
.preschool-n2 .psr-exact-table td,
.preschool-n1 .psr-exact-table th,
.preschool-n1 .psr-exact-table td {
    font-size: 9px !important;
    line-height: 1.12 !important;
    padding: 2.2px 2.8px !important;
    vertical-align: middle !important;
    border: .8px solid #111 !important;
    overflow: hidden !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}
.preschool-fold-sheet .psr-exact-table th {
    height: .18in !important;
    background: #fff7ed !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
}
.preschool-fold-sheet .psr-exact-table tbody tr,
.preschool-n1 .psr-exact-table tbody tr,
.preschool-n2 .psr-exact-table tbody tr,
.preschool-kinder .psr-exact-table tbody tr {
    height: .205in !important;
    min-height: .205in !important;
    max-height: .205in !important;
}
.preschool-fold-sheet .psr-exact-table td:first-child,
.preschool-fold-sheet .psr-exact-table th:first-child {
    text-align: left !important;
}
.preschool-fold-sheet .psr-exact-table td:not(:first-child),
.preschool-fold-sheet .psr-exact-table th:not(:first-child) {
    width: .34in !important;
    min-width: .34in !important;
    max-width: .34in !important;
    text-align: center !important;
    font-weight: 800 !important;
}
.preschool-fold-sheet .psr-scale-block {
    font-size: 10.2px !important;
    line-height: 1.12 !important;
    margin-bottom: .08in !important;
}
.preschool-fold-sheet .psr-scale-block h1 {
    font-size: 20px !important;
    margin: .04in 0 .04in !important;
}
.preschool-fold-sheet .psr-scale-block p {
    margin: 0 0 .045in !important;
}

@media print {
    .preschool-fold-sheet .psr-exact-table,
    .preschool-pdf-front .psr-front-left > .psr-exact-table,
    .preschool-pdf-front .psr-front-right > .psr-exact-table,
    .preschool-pdf-back .psr-cover-left > .psr-exact-table,
    .preschool-pdf-back .psr-cover-right > .psr-exact-table {
        display: table !important;
        flex: none !important;
        height: auto !important;
        margin-bottom: .05in !important;
        font-size: 8.85px !important;
        line-height: 1.1 !important;
    }
    .preschool-fold-sheet .psr-exact-table th,
    .preschool-fold-sheet .psr-exact-table td,
    .preschool-kinder .psr-exact-table th,
    .preschool-kinder .psr-exact-table td,
    .preschool-n2 .psr-exact-table th,
    .preschool-n2 .psr-exact-table td,
    .preschool-n1 .psr-exact-table th,
    .preschool-n1 .psr-exact-table td {
        font-size: 8.85px !important;
        line-height: 1.1 !important;
        padding: 2px 2.5px !important;
    }
    .preschool-fold-sheet .psr-exact-table th {
        height: .17in !important;
    }
    .preschool-fold-sheet .psr-exact-table tbody tr,
    .preschool-n1 .psr-exact-table tbody tr,
    .preschool-n2 .psr-exact-table tbody tr,
    .preschool-kinder .psr-exact-table tbody tr {
        height: .195in !important;
        min-height: .195in !important;
        max-height: .195in !important;
    }
}


/* 2026-06-30 Nursery 2 cut-off correction
   Nursery 2 has the longest competency set, so it needs a slightly tighter but still even row rhythm.
   This keeps rows even and prevents the bottom rows from being clipped by the fixed landscape panel. */
.preschool-n2 .psr-exact-table,
.preschool-n2 .psr-exact-table th,
.preschool-n2 .psr-exact-table td {
    font-size: 8.45px !important;
    line-height: 1.05 !important;
    padding: 1.55px 2.2px !important;
}
.preschool-n2 .psr-exact-table th {
    height: .155in !important;
}
.preschool-n2 .psr-exact-table tbody tr {
    height: .168in !important;
    min-height: .168in !important;
    max-height: .168in !important;
}
.preschool-n2 .psr-front-right .psr-exact-table th,
.preschool-n2 .psr-front-right .psr-exact-table td {
    font-size: 8.25px !important;
    line-height: 1.03 !important;
    padding: 1.35px 2px !important;
}
.preschool-n2 .psr-front-right .psr-exact-table tbody tr {
    height: .158in !important;
    min-height: .158in !important;
    max-height: .158in !important;
}
.preschool-n2 .psr-gross-table th,
.preschool-n2 .psr-gross-table td {
    font-size: 8.35px !important;
    line-height: 1.04 !important;
    padding: 1.45px 2.1px !important;
}
.preschool-n2 .psr-gross-table tbody tr {
    height: .162in !important;
    min-height: .162in !important;
    max-height: .162in !important;
}
.psr-pdf-back.preschool-n2 .psr-panel-left {
    padding-bottom: .10in !important;
}
@media print {
    .preschool-n2 .psr-exact-table,
    .preschool-n2 .psr-exact-table th,
    .preschool-n2 .psr-exact-table td {
        font-size: 8.25px !important;
        line-height: 1.03 !important;
        padding: 1.35px 2px !important;
    }
    .preschool-n2 .psr-exact-table tbody tr {
        height: .158in !important;
        min-height: .158in !important;
        max-height: .158in !important;
    }
    .preschool-n2 .psr-front-right .psr-exact-table tbody tr {
        height: .150in !important;
        min-height: .150in !important;
        max-height: .150in !important;
    }
}

/* 2026-06-30 Regular Report Card back page cleanup (GS/JHS/SHS)
   Matches the old report-card back structure more closely: compact portrait page,
   readable homeroom table, clean lower legend/attendance/transfer sections. */
.reportcard-back-page-sample {
    width: 6.5in !important;
    max-width: 6.5in !important;
    min-height: 11in !important;
    padding: .22in .25in !important;
    margin: 0 auto 24px !important;
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-back-title {
    margin: 0 0 .12in !important;
    font-size: 13.2px !important;
    line-height: 1.08 !important;
    letter-spacing: .01em !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-info-box {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 12px !important;
    padding: 6px 8px !important;
    margin: 0 0 .11in !important;
    border: 1px solid #8c98aa !important;
    font-size: 9.3px !important;
    line-height: 1.12 !important;
}
.reportcard-back-page-sample .rc-back-info-box div {
    display: grid !important;
    grid-template-columns: 108px 1fr !important;
    gap: 6px !important;
    min-height: 15px !important;
}
.reportcard-back-page-sample .rc-back-info-box span,
.reportcard-back-page-sample .rc-back-info-box strong {
    color: #000 !important;
}
.reportcard-back-page-sample .rc-homeroom-table,
.reportcard-back-page-sample .rc-attendance-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-homeroom-table th,
.reportcard-back-page-sample .rc-homeroom-table td {
    border: .85px solid #8c98aa !important;
    padding: 2.2px 3px !important;
    font-size: 8.25px !important;
    line-height: 1.12 !important;
    color: #000 !important;
    vertical-align: middle !important;
    background: #fff !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.reportcard-back-page-sample .rc-homeroom-table th {
    font-weight: 900 !important;
    text-transform: uppercase !important;
    background: #f7f8fb !important;
}
.reportcard-back-page-sample .rc-homeroom-table th:first-child { width: auto !important; }
.reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: 28px !important; text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table th:last-child { width: 58px !important; }
.reportcard-back-page-sample .rc-homeroom-table td:not(:first-child) { text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table .competency-text {
    text-align: left !important;
    font-weight: 500 !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-row td {
    background: #fdf6ed !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
    text-align: left !important;
    padding: 2.6px 4px !important;
}
.reportcard-back-page-sample .rc-back-lower {
    display: grid !important;
    grid-template-columns: 1.03fr 1.58fr 1.02fr !important;
    gap: 10px !important;
    margin-top: .13in !important;
    align-items: start !important;
}
.reportcard-back-page-sample .rc-legend,
.reportcard-back-page-sample .rc-transfer-cancel {
    font-size: 8.4px !important;
    line-height: 1.25 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-lower h4 {
    margin: 0 0 4px !important;
    font-size: 9.2px !important;
    line-height: 1.12 !important;
    font-weight: 900 !important;
    text-align: left !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-lower > div:nth-child(2) h4 { text-align: center !important; }
.reportcard-back-page-sample .rc-attendance-table th,
.reportcard-back-page-sample .rc-attendance-table td {
    border: .85px solid #8c98aa !important;
    padding: 2.2px 2px !important;
    font-size: 7.45px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    color: #000 !important;
    background: #fff !important;
    vertical-align: middle !important;
}
.reportcard-back-page-sample .rc-attendance-table td:first-child,
.reportcard-back-page-sample .rc-attendance-table th:first-child {
    width: 58px !important;
    text-align: left !important;
    font-weight: 900 !important;
}
.reportcard-back-page-sample .rc-transfer-cancel p {
    margin: 9px 0 0 !important;
}

@media print {
    @page { size: 6.5in 11in; margin: 0; }
    .reportcard-back-page-sample {
        width: 6.5in !important;
        height: 11in !important;
        min-height: 11in !important;
        max-height: 11in !important;
        padding: .22in .25in !important;
        margin: 0 !important;
        overflow: hidden !important;
        page-break-before: always !important;
        break-before: page !important;
    }
    .reportcard-back-page-sample .rc-back-title { font-size: 13px !important; }
    .reportcard-back-page-sample .rc-homeroom-table th,
    .reportcard-back-page-sample .rc-homeroom-table td { font-size: 8.1px !important; padding: 2px 3px !important; }
    .reportcard-back-page-sample .rc-back-info-box { font-size: 9.2px !important; }
    .reportcard-back-page-sample .rc-back-lower { margin-top: .12in !important; }
}

/* 2026-06-30 report-card back part exact PDF-style layout for Grade School, JHS, and SHS */
.reportcard-back-page-sample {
    width: 6.5in !important;
    max-width: 6.5in !important;
    min-height: 11in !important;
    height: auto !important;
    padding: .22in .34in .22in .34in !important;
    margin: 0 auto 22px !important;
    background: #fff !important;
    color: #000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-back-title {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 15.2px !important;
    font-weight: 900 !important;
    text-align: center !important;
    margin: 0 0 .12in !important;
    letter-spacing: 0 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-info-box { display: none !important; }
.reportcard-back-page-sample .rc-back-info-lines {
    display: grid !important;
    grid-template-columns: 1.34fr .86fr !important;
    column-gap: .18in !important;
    margin: 0 0 .055in !important;
    font-size: 10.6px !important;
    line-height: 1.18 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-info-col div {
    display: grid !important;
    grid-template-columns: 1.25in 1fr !important;
    gap: .07in !important;
    align-items: end !important;
    min-height: .17in !important;
    margin-bottom: .015in !important;
}
.reportcard-back-page-sample .rc-info-col:last-child div { grid-template-columns: .64in 1fr !important; }
.reportcard-back-page-sample .rc-info-col em {
    font-style: italic !important;
    font-weight: 400 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-info-col span {
    display: block !important;
    min-height: .16in !important;
    border-bottom: 1.2px solid #000 !important;
    padding-left: .04in !important;
    font-style: italic !important;
    font-weight: 500 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-homeroom-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1.15px solid #000 !important;
    margin: 0 !important;
}
.reportcard-back-page-sample .rc-homeroom-table th,
.reportcard-back-page-sample .rc-homeroom-table td {
    border: 1.05px solid #000 !important;
    padding: 2.15px 3px !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    font-size: 8.55px !important;
    line-height: 1.12 !important;
    color: #000 !important;
    background: #fff !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.reportcard-back-page-sample .rc-homeroom-table thead th {
    font-weight: 900 !important;
    text-transform: none !important;
    text-align: center !important;
}
.reportcard-back-page-sample .rc-homeroom-table th:first-child { width: auto !important; }
.reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: .24in !important; text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table th:last-child { width: .50in !important; }
.reportcard-back-page-sample .rc-homeroom-table td:not(:first-child) { text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table .competency-text {
    text-align: left !important;
    font-style: italic !important;
    font-weight: 400 !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-row td,
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td {
    background: #bfbfbf !important;
    color: #000 !important;
    font-style: italic !important;
    font-weight: 900 !important;
    text-align: left !important;
    padding: 2.6px 4px !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td { font-size: 8.05px !important; }
.reportcard-back-page-sample .rc-back-lower { display: none !important; }
.reportcard-back-page-sample .rc-legend-pdf {
    display: grid !important;
    grid-template-columns: 1fr 1.35fr 1.35fr !important;
    row-gap: .035in !important;
    column-gap: .18in !important;
    width: 4.0in !important;
    margin: .035in auto .12in !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    font-size: 8.7px !important;
    line-height: 1.15 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-legend-pdf div:first-child {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-bottom: .015in !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf {
    width: 5.35in !important;
    margin: 0 auto .12in !important;
    text-align: center !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf h4,
.reportcard-back-page-sample .rc-transfer-cancel-pdf h4 {
    margin: 0 0 .075in !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-attendance-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    border: 1.1px solid #000 !important;
}
.reportcard-back-page-sample .rc-attendance-table th,
.reportcard-back-page-sample .rc-attendance-table td {
    border: 1.05px solid #000 !important;
    padding: 3.2px 2.4px !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    font-size: 10.2px !important;
    line-height: 1.05 !important;
    color: #000 !important;
    background: #fff !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.reportcard-back-page-sample .rc-attendance-table th:first-child,
.reportcard-back-page-sample .rc-attendance-table td:first-child {
    width: .96in !important;
    font-weight: 400 !important;
    text-align: left !important;
}
.reportcard-back-page-sample .rc-transfer-cancel-pdf {
    margin-top: .05in !important;
    text-align: center !important;
    color: #000 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-transfer-lines {
    display: grid !important;
    grid-template-columns: 1.25in 1.35in .55in 1.55in !important;
    justify-content: center !important;
    align-items: end !important;
    column-gap: .18in !important;
    margin-top: .11in !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
}
.reportcard-back-page-sample .rc-transfer-lines span { text-align: left !important; }
.reportcard-back-page-sample .rc-transfer-lines b,
.reportcard-back-page-sample .rc-transfer-extra-line {
    display: block !important;
    border-bottom: 1.35px solid #000 !important;
    height: .16in !important;
}
.reportcard-back-page-sample .rc-transfer-extra-line {
    width: 1.55in !important;
    margin: .27in .42in 0 auto !important;
}
@media print {
    @page { size: 6.5in 11in; margin: 0; }
    .reportcard-back-page-sample {
        width: 6.5in !important;
        height: 11in !important;
        max-height: 11in !important;
        padding: .22in .34in .22in .34in !important;
        margin: 0 !important;
        overflow: hidden !important;
        page-break-before: always !important;
        break-before: page !important;
    }
    .reportcard-back-page-sample .rc-back-title { font-size: 15px !important; }
    .reportcard-back-page-sample .rc-homeroom-table th,
    .reportcard-back-page-sample .rc-homeroom-table td { font-size: 8.35px !important; padding: 1.9px 2.8px !important; }
    .reportcard-back-page-sample .rc-attendance-table th,
    .reportcard-back-page-sample .rc-attendance-table td { font-size: 10px !important; padding: 3px 2px !important; }
}

/* 2026-06-30 FINAL: regular Report Card back page organized exactly like the uploaded PDF sample + speed-safe print layout */
.reportcard-back-page-sample {
    width: 6.5in !important;
    max-width: 6.5in !important;
    min-height: 11in !important;
    padding: .28in .34in .20in !important;
    margin: 0 auto 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-back-title {
    margin: 0 0 .12in !important;
    text-align: center !important;
    font-family: "Times New Roman", Times, serif !important;
    font-size: 15.5px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-info-lines,
.reportcard-back-page-sample .rc-back-info-box { display: none !important; }
.reportcard-back-page-sample .rc-back-info-pdf {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin: 0 0 .055in !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-back-info-pdf td {
    border: 0 !important;
    padding: 0 .05in .025in 0 !important;
    font-size: 10.8px !important;
    line-height: 1.08 !important;
    vertical-align: bottom !important;
    background: transparent !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-label {
    width: 1.20in !important;
    font-style: italic !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-label-small { width: .62in !important; padding-left: .12in !important; }
.reportcard-back-page-sample .rc-back-info-pdf .rc-line-value {
    border-bottom: 1.15px solid #000 !important;
    font-style: italic !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    padding-left: .035in !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-section-value { width: 1.35in !important; }
.reportcard-back-page-sample .rc-homeroom-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1.15px solid #000 !important;
    margin: 0 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-homeroom-table th,
.reportcard-back-page-sample .rc-homeroom-table td {
    border: 1px solid #000 !important;
    padding: 2.05px 3px !important;
    font-size: 8.45px !important;
    line-height: 1.08 !important;
    color: #000 !important;
    background: #fff !important;
    vertical-align: middle !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.reportcard-back-page-sample .rc-homeroom-table thead th {
    text-transform: none !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-align: center !important;
    padding: 3px 2px !important;
}
.reportcard-back-page-sample .rc-homeroom-table th:first-child { width: auto !important; }
.reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: .25in !important; text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table th:last-child { width: .58in !important; font-size: 8px !important; }
.reportcard-back-page-sample .rc-homeroom-table td:not(:first-child) { text-align: center !important; }
.reportcard-back-page-sample .rc-homeroom-table .competency-text {
    text-align: left !important;
    font-style: italic !important;
    font-weight: 400 !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-row td,
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td {
    background: #bfbfbf !important;
    color: #000 !important;
    font-style: italic !important;
    font-weight: 900 !important;
    text-align: left !important;
    padding: 2.4px 4px !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td { font-size: 8.05px !important; }
.reportcard-back-page-sample .rc-legend-pdf {
    display: grid !important;
    grid-template-columns: 1fr 1.40fr 1.40fr !important;
    width: 4.20in !important;
    margin: .025in auto .14in !important;
    column-gap: .22in !important;
    row-gap: .035in !important;
    font-size: 8.9px !important;
    line-height: 1.18 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
    color: #000 !important;
}
.reportcard-back-page-sample .rc-legend-pdf div:first-child {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-bottom: .005in !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf {
    width: 5.25in !important;
    margin: 0 auto .075in !important;
    text-align: center !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf h4,
.reportcard-back-page-sample .rc-transfer-cancel-pdf h4 {
    margin: 0 0 .075in !important;
    font-size: 11.7px !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    text-align: center !important;
    color: #000 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-attendance-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border: 1.1px solid #000 !important;
}
.reportcard-back-page-sample .rc-attendance-table th,
.reportcard-back-page-sample .rc-attendance-table td {
    border: 1px solid #000 !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #000 !important;
    background: #fff !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-attendance-table th:first-child,
.reportcard-back-page-sample .rc-attendance-table td:first-child {
    width: .94in !important;
    text-align: left !important;
    font-weight: 400 !important;
}
.reportcard-back-page-sample .rc-transfer-cancel-pdf {
    margin-top: .05in !important;
    text-align: center !important;
    color: #000 !important;
    font-family: Calibri, Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-transfer-lines {
    display: grid !important;
    grid-template-columns: 1.35in 1.28in .55in 1.55in !important;
    align-items: end !important;
    justify-content: center !important;
    column-gap: .18in !important;
    margin-top: .12in !important;
    font-size: 10.8px !important;
    line-height: 1.05 !important;
}
.reportcard-back-page-sample .rc-transfer-lines span { text-align: left !important; }
.reportcard-back-page-sample .rc-transfer-lines b,
.reportcard-back-page-sample .rc-transfer-extra-line {
    display: block !important;
    border-bottom: 1.25px solid #000 !important;
    height: .16in !important;
}
.reportcard-back-page-sample .rc-transfer-extra-line {
    width: 1.55in !important;
    margin: .27in .34in 0 auto !important;
}
@media print {
    @page { size: 6.5in 11in; margin: 0; }
    .reportcard-back-page-sample {
        width: 6.5in !important;
        height: 11in !important;
        max-height: 11in !important;
        padding: .28in .34in .20in !important;
        margin: 0 !important;
        overflow: hidden !important;
        page-break-before: always !important;
        break-before: page !important;
    }
}


/* 2026-06-30 Report Card Back Part - design alignment with front report card */
.reportcard-back-page-sample {
    background: #fff !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    border: 1px solid #d7dde8 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.reportcard-back-page-sample .rc-back-title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
    letter-spacing: .01em !important;
    color: #111827 !important;
    margin: 0 0 10px !important;
    text-align: center !important;
    font-weight: 900 !important;
}
.reportcard-back-page-sample .rc-back-info-pdf {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin: 0 0 10px !important;
    border: 1px solid #9aa7bd !important;
    background: #fff !important;
}
.reportcard-back-page-sample .rc-back-info-pdf td {
    border: 1px solid #c8d1df !important;
    padding: 5px 9px !important;
    font-size: 11px !important;
    line-height: 1.18 !important;
    vertical-align: middle !important;
    background: #fff !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-label,
.reportcard-back-page-sample .rc-back-info-pdf .rc-label-small {
    width: 1.45in !important;
    font-style: normal !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    color: #334155 !important;
    padding-left: 9px !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-line-value,
.reportcard-back-page-sample .rc-back-info-pdf .rc-section-value {
    border-bottom: 1px solid #c8d1df !important;
    font-style: normal !important;
    font-weight: 900 !important;
    white-space: normal !important;
    overflow: visible !important;
    padding-left: 10px !important;
    color: #111827 !important;
}
.reportcard-back-page-sample .rc-homeroom-table {
    border: 1px solid #8998ad !important;
    table-layout: fixed !important;
    width: 100% !important;
    margin: 0 !important;
}
.reportcard-back-page-sample .rc-homeroom-table th,
.reportcard-back-page-sample .rc-homeroom-table td {
    border: 1px solid #9aa7bd !important;
    padding: 3.6px 5px !important;
    font-size: 9.4px !important;
    line-height: 1.18 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #111827 !important;
    background: #fff !important;
}
.reportcard-back-page-sample .rc-homeroom-table thead th {
    background: #f3f6fa !important;
    color: #111827 !important;
    font-size: 10.3px !important;
    text-transform: uppercase !important;
    font-weight: 900 !important;
}
.reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: .31in !important; }
.reportcard-back-page-sample .rc-homeroom-table th:last-child { width: .75in !important; font-size: 9px !important; }
.reportcard-back-page-sample .rc-homeroom-table .competency-text {
    font-style: normal !important;
    font-weight: 500 !important;
    text-align: left !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-row td,
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td {
    background: #fff8ef !important;
    color: #8a2f00 !important;
    font-style: normal !important;
    font-weight: 900 !important;
    padding: 4px 6px !important;
}
.reportcard-back-page-sample .rc-homeroom-table .term-note-row td {
    color: #334155 !important;
    font-size: 9px !important;
    background: #fffdf8 !important;
}
.reportcard-back-page-sample .rc-legend-pdf {
    width: 4.8in !important;
    margin: 7px auto 12px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: .34in !important;
    row-gap: 4px !important;
    font-size: 9.6px !important;
    line-height: 1.18 !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-legend-pdf div:first-child {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    font-weight: 900 !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf {
    width: 5.45in !important;
    margin: 0 auto 8px !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf h4,
.reportcard-back-page-sample .rc-transfer-cancel-pdf h4 {
    font-size: 12px !important;
    color: #111827 !important;
    margin: 0 0 6px !important;
    font-weight: 900 !important;
    text-align: center !important;
    font-family: Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-attendance-table {
    border: 1px solid #8998ad !important;
    table-layout: fixed !important;
}
.reportcard-back-page-sample .rc-attendance-table th,
.reportcard-back-page-sample .rc-attendance-table td {
    border: 1px solid #9aa7bd !important;
    font-size: 9.7px !important;
    padding: 4px 2px !important;
    color: #111827 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}
.reportcard-back-page-sample .rc-attendance-table th:first-child,
.reportcard-back-page-sample .rc-attendance-table td:first-child {
    width: 1.12in !important;
    font-weight: 700 !important;
}
.reportcard-back-page-sample .rc-transfer-cancel-pdf {
    margin-top: 6px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    color: #111827 !important;
}
.reportcard-back-page-sample .rc-transfer-lines {
    display: grid !important;
    grid-template-columns: 1.55in 1.45in .55in 1.55in !important;
    column-gap: .18in !important;
    justify-content: center !important;
    align-items: end !important;
    font-size: 10.5px !important;
}
.reportcard-back-page-sample .rc-transfer-lines b,
.reportcard-back-page-sample .rc-transfer-extra-line {
    border-bottom: 1.25px solid #111827 !important;
}
@media print {
    .reportcard-back-page-sample {
        width: 6.5in !important;
        height: 11in !important;
        padding: .30in .34in .22in !important;
        border: 0 !important;
        margin: 0 !important;
        page-break-before: always !important;
        break-before: page !important;
        overflow: hidden !important;
    }
    .reportcard-back-page-sample .rc-back-title { font-size: 16px !important; margin-bottom: .09in !important; }
    .reportcard-back-page-sample .rc-back-info-pdf td { font-size: 10px !important; padding: 4px 7px !important; }
    .reportcard-back-page-sample .rc-homeroom-table th,
    .reportcard-back-page-sample .rc-homeroom-table td { font-size: 8.55px !important; padding: 2.4px 4px !important; }
    .reportcard-back-page-sample .rc-homeroom-table thead th { font-size: 9.1px !important; }
    .reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: .26in !important; }
    .reportcard-back-page-sample .rc-homeroom-table th:last-child { width: .62in !important; font-size: 8px !important; }
    .reportcard-back-page-sample .rc-legend-pdf { font-size: 8.9px !important; margin-top: .055in !important; margin-bottom: .10in !important; }
    .reportcard-back-page-sample .rc-attendance-block-pdf { width: 5.35in !important; }
    .reportcard-back-page-sample .rc-attendance-table th,
    .reportcard-back-page-sample .rc-attendance-table td { font-size: 9.15px !important; padding: 3px 2px !important; }
}

/* 2026-06-30 FINAL SIZE MATCH: Report Card back page must use the same portrait paper size as front page. */
.nsdga-report-card-page.reportcard-back-page-sample,
.reportcard-back-page-sample {
    width: 8.5in !important;
    max-width: 8.5in !important;
    min-height: 11in !important;
    padding: .38in .50in .32in !important;
    margin: 0 auto 28px !important;
    box-sizing: border-box !important;
}
.reportcard-back-page-sample .rc-back-title {
    font-size: 19px !important;
    line-height: 1.05 !important;
    margin-bottom: .14in !important;
}
.reportcard-back-page-sample .rc-back-info-pdf {
    width: 100% !important;
    margin-bottom: .10in !important;
}
.reportcard-back-page-sample .rc-back-info-pdf td {
    font-size: 11.3px !important;
    padding: 3px 8px !important;
    line-height: 1.15 !important;
}
.reportcard-back-page-sample .rc-back-info-pdf .rc-label,
.reportcard-back-page-sample .rc-back-info-pdf .rc-label-small {
    width: 1.35in !important;
    white-space: nowrap !important;
}
.reportcard-back-page-sample .rc-homeroom-table th,
.reportcard-back-page-sample .rc-homeroom-table td {
    font-size: 9.2px !important;
    padding: 2.8px 4px !important;
    line-height: 1.12 !important;
}
.reportcard-back-page-sample .rc-homeroom-table thead th {
    font-size: 10px !important;
}
.reportcard-back-page-sample .rc-homeroom-table th:not(:first-child) { width: .34in !important; }
.reportcard-back-page-sample .rc-homeroom-table th:last-child { width: .78in !important; font-size: 8.9px !important; }
.reportcard-back-page-sample .rc-legend-pdf {
    width: 5.45in !important;
    font-size: 10px !important;
    margin-top: .07in !important;
    margin-bottom: .16in !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf {
    width: 6.15in !important;
    margin-bottom: .09in !important;
}
.reportcard-back-page-sample .rc-attendance-block-pdf h4,
.reportcard-back-page-sample .rc-transfer-cancel-pdf h4 {
    font-size: 12.6px !important;
    margin-bottom: .08in !important;
}
.reportcard-back-page-sample .rc-attendance-table th,
.reportcard-back-page-sample .rc-attendance-table td {
    font-size: 10.4px !important;
    padding: 3.4px 2px !important;
}
.reportcard-back-page-sample .rc-attendance-table th:first-child,
.reportcard-back-page-sample .rc-attendance-table td:first-child {
    width: 1.12in !important;
}
.reportcard-back-page-sample .rc-transfer-lines {
    grid-template-columns: 1.6in 1.55in .70in 1.75in !important;
    font-size: 11.2px !important;
}
.reportcard-back-page-sample .rc-transfer-extra-line {
    width: 1.75in !important;
    margin-right: .65in !important;
}
@media print {
    @page { size: 8.5in 11in; margin: 0; }
    .nsdga-report-card-page.reportcard-back-page-sample,
    .reportcard-back-page-sample {
        width: 8.5in !important;
        height: 11in !important;
        max-width: 8.5in !important;
        max-height: 11in !important;
        padding: .38in .50in .32in !important;
        margin: 0 !important;
        overflow: hidden !important;
        page-break-before: always !important;
        break-before: page !important;
        box-sizing: border-box !important;
    }
}


/* 2026-06-30 Summary Sheet header and Report Card page-edge cleanup */
.summary-sample-table col.sum-studentno { width: 82px; }
.summary-sample-table th,
.summary-sample-table td {
    vertical-align: middle !important;
}
.summary-sample-table th:nth-child(2),
.summary-sample-table td:nth-child(2) {
    text-align: center !important;
    white-space: nowrap !important;
}
.summary-sample-table th:nth-child(3),
.summary-sample-table td:nth-child(3) {
    text-align: left !important;
}
.summary-sample-table th {
    line-height: 1.05 !important;
}

/* Same screen page shape for report card front and back. */
.report-preview.nsdga-report-card-page,
.report-preview.nsdga-report-card-page.reportcard-back-page-sample,
.nsdga-report-card-page,
.reportcard-back-page-sample {
    border: 1px solid #d9e2ef !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08) !important;
    overflow: hidden !important;
    background: #fff !important;
}
.report-preview.nsdga-report-card-page.reportcard-back-page-sample {
    margin-top: 28px !important;
}

@media print {
    .summary-sample-table col.sum-no { width: 34px !important; }
    .summary-sample-table col.sum-studentno { width: 60px !important; }
    .summary-sample-table col.sum-name { width: 185px !important; }
    .summary-sample-table col.sum-subject { width: 68px !important; }
    .summary-sample-table col.sum-average { width: 78px !important; }
    .summary-sample-table col.sum-remarks { width: 78px !important; }
    .summary-sample-table th,
    .summary-sample-table td { font-size: 7.6px !important; padding: 3px 2.5px !important; }
    .report-preview.nsdga-report-card-page,
    .report-preview.nsdga-report-card-page.reportcard-back-page-sample,
    .nsdga-report-card-page,
    .reportcard-back-page-sample {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
    }
}

/* 2026-06-30 Summary Sheet header readability: Student No. spacing and MAPEH grouped header */
.summary-sample-table {
    table-layout: fixed !important;
    width: 100% !important;
}
.summary-sample-table th {
    white-space: normal !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.04 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
.summary-sample-table .summary-main-header th,
.summary-sample-table .summary-sub-header th {
    padding: 4px 3px !important;
    font-size: 8.8px !important;
}
.summary-sample-table .summary-subject-header span {
    display: inline-block !important;
    max-width: 100% !important;
}
.summary-sample-table .summary-mapeh-group {
    background: #fff7ed !important;
    color: #7c2d12 !important;
    font-weight: 900 !important;
    border-bottom: 1px solid #9fb0c7 !important;
    letter-spacing: .06em !important;
}
.summary-sample-table .summary-mapeh-child {
    background: #fffaf0 !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    font-size: 7.6px !important;
}
.summary-sample-table th:nth-child(2),
.summary-sample-table td:nth-child(2) {
    white-space: nowrap !important;
    text-align: center !important;
}
.summary-sample-table th:nth-child(3),
.summary-sample-table td:nth-child(3) {
    text-align: left !important;
}
.summary-sample-table col.sum-no { width: 36px !important; }
.summary-sample-table col.sum-studentno { width: 72px !important; }
.summary-sample-table col.sum-name { width: 220px !important; }
.summary-sample-table col.sum-subject { width: 78px !important; }
.summary-sample-table col.sum-average { width: 86px !important; }
.summary-sample-table col.sum-remarks { width: 86px !important; }

@media print {
    .summary-sample-table col.sum-no { width: 31px !important; }
    .summary-sample-table col.sum-studentno { width: 61px !important; }
    .summary-sample-table col.sum-name { width: 175px !important; }
    .summary-sample-table col.sum-subject { width: 58px !important; }
    .summary-sample-table col.sum-average { width: 70px !important; }
    .summary-sample-table col.sum-remarks { width: 70px !important; }
    .summary-sample-table .summary-main-header th,
    .summary-sample-table .summary-sub-header th {
        font-size: 6.9px !important;
        padding: 2.5px 1.5px !important;
        line-height: 1.0 !important;
    }
    .summary-sample-table .summary-mapeh-child { font-size: 6.2px !important; }
    .summary-sample-table td { font-size: 7.1px !important; padding: 2.6px 2px !important; }
}

/* 2026-06-30 Grades Monitoring workflow screen */
.monitoring-stat-row {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}
.monitoring-filter-form .filter-grid.monitoring-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr)) minmax(140px, auto);
    gap: 12px;
    align-items: end;
}
.monitoring-filter-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: 900;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.monitoring-table th,
.monitoring-table td {
    white-space: normal;
    vertical-align: middle;
}
.monitoring-table td:nth-child(4),
.monitoring-table td:nth-child(5) {
    min-width: 160px;
}
.monitoring-table td:nth-child(11) {
    min-width: 220px;
}
.numeric-cell { text-align: center; }
@media (max-width: 1300px) {
    .monitoring-stat-row { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .monitoring-filter-form .filter-grid.monitoring-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

/* 2026-06-30 NSDGA upload/encode submission workflow fix */
.inline-action-form {
    display: inline-flex;
    margin: 0;
}
.inline-action-form.grow {
    flex: 1 1 180px;
}
.workflow-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px 14px;
    margin-top: -2px;
}
.workflow-actions-copy {
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}
.workflow-actions-copy strong {
    display: block;
    color: #111827;
    font-size: 14px;
    margin-bottom: 2px;
}
.workflow-actions-copy span {
    display: block;
}
.workflow-actions-inline,
.excel-post-upload-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.excel-post-upload-actions {
    margin-top: 12px;
}
.workflow-help-text {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}
.class-summary-actions .inline-action-form .btn,
.workflow-actions-inline .inline-action-form .btn,
.excel-post-upload-actions .inline-action-form .btn {
    white-space: nowrap;
}
@media(max-width:900px) {
    .workflow-actions-row {
        align-items: stretch;
        flex-direction: column;
    }
    .workflow-actions-inline,
    .excel-post-upload-actions {
        width: 100%;
    }
    .workflow-actions-inline .inline-action-form,
    .excel-post-upload-actions .inline-action-form {
        flex: 1 1 160px;
    }
    .workflow-actions-inline .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Quarter-specific teacher dashboard status buttons */
.quarter-status-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 620px;
}
.quarter-status-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #f8fafc;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
    white-space: nowrap;
}
.quarter-status-link strong {
    font-size: 12px;
    line-height: 1;
}
.quarter-status-link span {
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    padding: 5px 8px;
    background: #e2e8f0;
    color: #334155;
}
.quarter-status-link.blue {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.quarter-status-link.blue span {
    background: #dbeafe;
    color: #1d4ed8;
}
.quarter-status-link.green {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.quarter-status-link.green span {
    background: #dcfce7;
    color: #15803d;
}
.quarter-status-link.orange {
    border-color: #fed7aa;
    background: #fff7ed;
}
.quarter-status-link.orange span {
    background: #ffedd5;
    color: #c2410c;
}
.quarter-status-link.gray span {
    background: #e2e8f0;
    color: #475569;
}
.quarter-status-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}
@media (max-width: 1100px) {
    .quarter-status-cell { min-width: 520px; }
    .quarter-status-link { padding: 8px 10px; }
}

/* Right-side drawers for grading workflow */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .34);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    z-index: 1800;
}
.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}
body.drawer-open {
    overflow: hidden;
}
.right-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(520px, calc(100vw - 24px));
    background: #fff;
    box-shadow: -24px 0 70px rgba(15, 23, 42, .22);
    border-left: 1px solid #e2e8f0;
    transform: translateX(105%);
    transition: transform .22s ease;
    z-index: 1810;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.right-drawer.open {
    transform: translateX(0);
}
.compact-drawer {
    width: min(460px, calc(100vw - 24px));
}
.right-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}
.right-drawer-head h3 {
    margin: 4px 0 6px;
    font-size: 22px;
    line-height: 1.15;
    color: #0f172a;
}
.right-drawer-head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}
.drawer-kicker {
    display: block;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 900;
    color: #f97316;
}
.drawer-close {
    width: 42px;
    height: 42px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}
.drawer-close:hover {
    background: #ffedd5;
}
.drawer-body {
    padding: 22px 24px 28px;
    overflow: auto;
}
.drawer-status-hero {
    border-radius: 22px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
    margin-bottom: 16px;
}
.drawer-status-hero span,
.drawer-status-hero small {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}
.drawer-status-hero strong {
    display: block;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.1;
    margin: 4px 0 6px;
}
.drawer-status-hero.blue {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.drawer-status-hero.blue strong { color: #1d4ed8; }
.drawer-status-hero.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.drawer-status-hero.green strong { color: #15803d; }
.drawer-status-hero.orange {
    background: #fff7ed;
    border-color: #fed7aa;
}
.drawer-status-hero.orange strong { color: #c2410c; }
.drawer-status-hero.red {
    background: #fef2f2;
    border-color: #fecaca;
}
.drawer-status-hero.red strong { color: #b91c1c; }
.drawer-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.drawer-info-grid > div {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    padding: 13px 14px;
}
.drawer-info-grid span {
    display: block;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900;
    margin-bottom: 4px;
}
.drawer-info-grid strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}
.drawer-section-block {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
}
.drawer-section-block h4 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 15px;
}
.drawer-section-block p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}
.drawer-section-block.warning {
    border-color: #fed7aa;
    background: #fff7ed;
}
.drawer-section-block.danger {
    border-color: #fecaca;
    background: #fef2f2;
}
.drawer-check-list {
    display: grid;
    gap: 10px;
}
.drawer-check-list > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}
.drawer-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.drawer-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}
.drawer-form-actions .inline-action-form {
    width: 100%;
}
.drawer-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.45;
    font-size: 13px;
}
.drawer-note.warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.drawer-error-list {
    margin: 0;
    padding-left: 18px;
    color: #991b1b;
    line-height: 1.45;
    font-size: 13px;
}
.drawer-error-list li + li {
    margin-top: 5px;
}
.learner-drawer-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.learner-drawer-link:hover strong {
    color: #ea580c;
    text-decoration: underline;
}
.quarter-status-link {
    cursor: pointer;
    font-family: inherit;
}
button.quarter-status-link {
    border-width: 1px;
}
@media(max-width: 720px) {
    .right-drawer {
        width: calc(100vw - 10px);
    }
    .right-drawer-head,
    .drawer-body {
        padding-left: 18px;
        padding-right: 18px;
    }
    .drawer-info-grid,
    .drawer-form-actions {
        grid-template-columns: 1fr;
    }
}

/* Audit trail / activity timeline */
.activity-timeline{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.activity-item{border:1px solid #e6edf7;border-radius:16px;padding:10px 12px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.activity-item strong{display:block;font-size:13px;color:#0f172a;margin-bottom:3px}
.activity-item span{display:block;font-size:12px;color:#64748b;margin-bottom:4px}
.activity-item small{display:block;font-size:12px;line-height:1.35;color:#475569}
.compact-activity-list .activity-item{padding:9px 10px;border-radius:14px}
.inline-note{margin:8px 0 0!important}
.filter-grid.five{grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1100px){.filter-grid.five{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.filter-grid.five,.filter-grid.two{grid-template-columns:1fr}}

/* Audit Trail Monitoring redesign */
.audit-page-header { margin-bottom: 18px; }
.audit-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.audit-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 112px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 24px;
    box-shadow: 0 14px 42px rgba(15,23,42,.055);
}
.audit-stat-icon,
.audit-panel-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.audit-stat-card small {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 4px;
}
.audit-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -.04em;
}
.audit-stat-card p { margin: 7px 0 0; color: #64748b; font-size: 13px; }
.audit-search-panel,
.audit-results-card { padding: 26px; }
.audit-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.audit-panel-title { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.audit-panel-title h3 { margin: 2px 0 5px; font-size: 20px; letter-spacing: -.03em; }
.audit-panel-title p { margin: 0; color: #64748b; line-height: 1.55; }
.audit-panel-title .audit-panel-icon { width: 50px; height: 50px; border-radius: 17px; }
.plain-icon { width: 22px; height: 22px; display: inline-flex; }
.plain-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.audit-reference-sample {
    min-width: 360px;
    padding: 13px 15px;
    border: 1px dashed #fed7aa;
    border-radius: 18px;
    background: #fff7ed;
}
.audit-reference-sample span {
    display: block;
    margin-bottom: 5px;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.audit-reference-sample code {
    color: #0f172a;
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
}
.audit-filter-form { margin: 0; }
.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.audit-field { display: grid; gap: 8px; margin: 0; }
.audit-field span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .065em;
}
.audit-field input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #d9e1ec;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    outline: none;
    transition: .16s ease;
}
.audit-field input::placeholder { color: #94a3b8; }
.audit-field input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249,115,22,.10);
}
.audit-wide { grid-column: span 2; }
.audit-full { grid-column: 1 / -1; }
.audit-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}
.audit-filter-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #64748b; }
.audit-filter-note small { color: #64748b; }
.audit-form-actions { display: flex; align-items: center; gap: 10px; }
.audit-results-card { margin-top: 0; }
.audit-results-card .result-head { margin-bottom: 14px; }
.audit-table-wrap {
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    overflow: auto;
    background: #fff;
}
.audit-table { min-width: 1040px; }
.audit-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    letter-spacing: .08em;
    padding: 14px 14px;
}
.audit-table td { padding: 14px; vertical-align: top; }
.audit-date-cell strong { color: #0f172a; font-size: 13px; white-space: nowrap; }
.audit-user-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.audit-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    font-size: 13px;
    font-weight: 950;
    flex: 0 0 auto;
}
.audit-module-pill {
    display: inline-flex;
    max-width: 220px;
    padding: 7px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}
.audit-ref-cell code,
.audit-reference-text {
    display: inline-block;
    max-width: 290px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}
.monitoring-table .mini-button { white-space: nowrap; }
.audit-remarks-cell {
    min-width: 320px;
    color: #475569;
    line-height: 1.45;
}
.audit-empty-cell { padding: 34px !important; color: #64748b; text-align: center; }
@media (max-width: 1280px) {
    .audit-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .audit-wide { grid-column: span 3; }
    .audit-panel-head { flex-direction: column; }
    .audit-reference-sample { min-width: 0; width: 100%; }
}
@media (max-width: 780px) {
    .audit-stat-grid,
    .audit-filter-grid { grid-template-columns: 1fr; }
    .audit-wide { grid-column: span 1; }
    .audit-form-footer { flex-direction: column; align-items: stretch; }
    .audit-form-actions { width: 100%; }
    .audit-form-actions .btn { flex: 1; }
    .audit-panel-title { flex-direction: column; }
}

/* SSA setup foundation additions */
.header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.field-block label{display:block;margin-bottom:7px;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;}
.policy-form-grid .field-block{min-width:0;}
.policy-form-grid .wide-field{grid-column:1/-1;}
.setup-flow-stack{display:grid;gap:8px;text-align:center;min-width:190px;}
.setup-flow-stack span{display:block;padding:9px 12px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-weight:900;font-size:12px;}
.setup-flow-stack em{font-style:normal;color:#fb923c;font-weight:900;line-height:1;}
.table-actions-inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.btn.danger,.btn-outline.danger{border-color:#fecaca;color:#b91c1c;background:#fff5f5;}
.btn.danger:hover,.btn-outline.danger:hover{background:#fee2e2;border-color:#fca5a5;color:#991b1b;}
.muted-text{color:#94a3b8;font-weight:800;}

/* SSA official branding pass - red, gold and clean academic neutral palette */
:root {
    --orange: #D7262F;
    --orange-dark: #AA141D;
    --orange-light: #EF4444;
    --orange-soft: #FFF1F2;
    --orange-line: #FECACA;
    --yellow: #D4A017;
    --yellow-soft: #FFFBEB;
    --green: #079455;
    --green-soft: #ECFDF3;
    --sidebar: #16090B;
    --sidebar-soft: #2A0F14;
}
.login-body,
.login-page-approved,
.login-page-simple,
.role-page-approved {
    background:
        radial-gradient(circle at top left, rgba(215,38,47,.12), transparent 34%),
        linear-gradient(135deg, #fff7f7 0%, #f8fafc 48%, #f7f1e3 100%);
}
.login-card-approved,
.login-card-simple,
.role-header-card,
.role-tile-approved {
    border-color: rgba(215,38,47,.14);
}
.login-card-approved::before,
.login-card-simple::before {
    background: linear-gradient(90deg, #D7262F 0%, #D7262F 62%, #D4A017 100%);
}
.login-card-logo {
    width: 132px;
    height: 132px;
    border-radius: 999px;
    padding: 7px;
    border: 1px solid rgba(215,38,47,.18);
    box-shadow: 0 18px 38px rgba(122,16,24,.12);
}
.login-card-approved h2 { color: #111827; }
.login-access-note strong { color: var(--orange-dark); }
.btn-signin,
.btn-primary {
    background: linear-gradient(135deg, #D7262F, #B91C1C 70%, #7F1D1D) !important;
    box-shadow: 0 16px 34px rgba(215,38,47,.22);
}
.sidebar {
    background:
        radial-gradient(circle at top left, rgba(212,160,23,.16), transparent 34%),
        linear-gradient(180deg, #16090B, #2A0F14 68%, #411116);
}
.brand-box {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    padding: 12px;
}
.brand-box img,
.login-brand-logo {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    padding: 5px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(215,38,47,.18);
}
.brand-system { color: #F9D66B; }
.nav-section-dot { background: #F9D66B; box-shadow: 0 0 0 5px rgba(249,214,107,.13); }
.nav-item:hover,
.nav-item.active,
.side-nav a:hover,
.side-nav a.active { background: rgba(215,38,47,.18); }
.nav-item.active,
.side-nav a.active { box-shadow: inset 3px 0 0 #F9D66B; }
.nav-icon { background: rgba(255,255,255,.08); color: #F9D66B; }
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon,
.side-nav a:hover .nav-icon,
.side-nav a.active .nav-icon { background: #FFF1F2; color: #B91C1C; }
.sidebar-avatar { background: #FFF1F2; color: #B91C1C; }
.sidebar-action:hover { background: rgba(215,38,47,.20); }
.sidebar-action.logout { background: rgba(215,38,47,.18); color: #fecaca; }
.page-kicker,
.welcome-label { color: var(--orange-dark); }
.setup-flow-stack span { background:#FFF1F2; border-color:#FECACA; color:#991B1B; }
.setup-flow-stack em { color:#D4A017; }
.status-pill.gold { background:#fffbeb; color:#92400e; border-color:#fde68a; }
.ssa-logo-watermark {
    position:absolute;
    right:18px;
    bottom:14px;
    width:150px;
    height:150px;
    object-fit:contain;
    opacity:.055;
    pointer-events:none;
}
.panel-card.has-watermark,
.dashboard-hero-v2.has-watermark { position:relative; overflow:hidden; }
.ssa-form-hint {
    margin-top:10px;
    padding:10px 12px;
    border-radius:14px;
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#92400e;
    font-size:12px;
    font-weight:800;
    line-height:1.45;
}
.inline-select-action { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.inline-select-action select { min-width:210px; height:38px; border-radius:12px; border:1px solid #d9e1ec; padding:0 10px; font-weight:800; color:#0f172a; background:#fff; }
@media(max-width:720px){ .login-card-logo{width:104px;height:104px}.brand-box img{width:60px;height:60px}.inline-select-action select{min-width:100%;} }

/* SSA step 3: responsive setup layout + current SY filtering UI */
.app-body { overflow-x: hidden; }
.main-area,
.content-area {
    max-width: calc(100vw - 290px);
    min-width: 0;
}
.page-header,
.dashboard-topline,
.panel-title-row { min-width: 0; }
.page-header > div:first-child,
.dashboard-topline > div:first-child,
.panel-title-row > div:first-child { min-width: 0; }
.page-header h1,
.dashboard-topline h1,
.panel-title-row h3 { overflow-wrap: anywhere; }
.current-sy-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #fff1f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .02em;
}
.ssa-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.ssa-table-wrap > table { margin: 0; }
.ssa-setup-table { min-width: 760px; }
.ssa-setup-table th,
.ssa-setup-table td { vertical-align: middle; }
.ssa-setup-table td:last-child { width: 1%; }
.ssa-offering-layout {
    display: grid;
    grid-template-columns: minmax(320px, .82fr) minmax(0, 1.55fr);
    gap: 18px;
    align-items: start;
    max-width: 100%;
    min-width: 0;
}
.ssa-offering-layout > * { min-width: 0; }
.ssa-offering-form-panel,
.ssa-assignment-panel { padding: 22px; min-width: 0; }
.ssa-offering-form { display: grid; gap: 14px; min-width: 0; }
.ssa-form-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}
.field-block,
.field-block .form-control,
.ssa-form-split > * { min-width: 0; max-width: 100%; }
.ssa-assignment-title { align-items: flex-start; }
.ssa-count-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}
.ssa-assignment-list { display: grid; gap: 12px; min-width: 0; }
.ssa-assignment-card {
    display: grid;
    grid-template-columns: minmax(170px, 1.35fr) minmax(82px, .55fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(92px, .65fr) minmax(190px, 1.1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.035);
    min-width: 0;
}
.assignment-cell,
.assignment-actions { min-width: 0; }
.assignment-cell { display: grid; gap: 3px; }
.assignment-cell .cell-label {
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: 10px;
    font-weight: 900;
}
.assignment-cell strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.assignment-cell small { color: #64748b; font-size: 11px; line-height: 1.25; }
.assignment-actions { display: grid; gap: 8px; }
.inline-select-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}
.inline-select-action select,
.inline-select-action .mini-select {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
}
.assignment-button-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.assignment-button-row .btn-sm,
.inline-select-action .btn-sm { min-height: 38px; }
.ssa-empty-assignment {
    display: grid;
    gap: 4px;
    place-items: center;
    min-height: 120px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    text-align: center;
}
@media (max-width: 1380px) {
    .ssa-offering-layout { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr); }
    .ssa-assignment-card {
        grid-template-columns: minmax(170px, 1.2fr) minmax(90px, .55fr) minmax(140px, 1fr) minmax(96px, .65fr);
    }
    .assignment-handle { grid-column: span 1; }
    .assignment-actions { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
    .ssa-offering-layout { grid-template-columns: 1fr; }
    .ssa-offering-form-panel { order: 1; }
    .ssa-assignment-panel { order: 2; }
    .dashboard-grid-v2 { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
    .main-area,
    .content-area { max-width: 100vw; width: 100%; }
}
@media (max-width: 840px) {
    .main-area,
    .content-area { padding: 16px; }
    .ssa-assignment-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assignment-status,
    .assignment-actions { grid-column: 1 / -1; }
    .stats-grid.four.dashboard-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .main-area,
    .content-area { padding: 12px; }
    .page-header,
    .dashboard-topline,
    .panel-title-row { flex-direction: column; align-items: stretch; }
    .header-actions { justify-content: stretch; width: 100%; }
    .header-actions .btn,
    .header-actions .inline-action-form,
    .header-actions .inline-action-form .btn { width: 100%; justify-content: center; }
    .stats-grid.four.dashboard-stat-row { grid-template-columns: 1fr; }
    .ssa-form-split,
    .ssa-assignment-card,
    .inline-select-action { grid-template-columns: 1fr; }
    .assignment-status,
    .assignment-actions { grid-column: auto; }
    .assignment-button-row .inline-action-form,
    .assignment-button-row .btn { flex: 1 1 120px; justify-content: center; }
}

/* SSA step 4: Class Schedule list moved below form */
.ssa-class-schedule-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.ssa-class-schedule-stack > * { min-width: 0; }
.ssa-add-schedule-panel,
.ssa-current-schedule-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.ssa-current-schedule-panel .ssa-table-wrap {
    margin-top: 10px;
}
.ssa-current-schedule-panel .ssa-setup-table {
    min-width: 920px;
}
.ssa-current-schedule-panel .table-actions-inline {
    justify-content: flex-start;
}
@media (min-width: 1200px) {
    .ssa-add-schedule-panel .policy-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .ssa-current-schedule-panel .ssa-setup-table { min-width: 820px; }
}


/* SSA Step 5 - level-aware section filter and SHS-only inputs */
.field-block .field-help {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.35;
    color: #7a8599;
}
.form-control.is-disabled,
.form-control:disabled {
    background: #f3f5f9;
    color: #9aa3b3;
    border-color: #d9e0ec;
    cursor: not-allowed;
    box-shadow: none;
}

/* SSA Step 6 - Offering Details organized layout */
.ssa-offering-layout {
    grid-template-columns: 1fr !important;
    gap: 18px;
}
.ssa-offering-form-panel,
.ssa-assignment-panel {
    width: 100%;
    max-width: 100%;
}
.ssa-offering-entry-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(260px, 1.35fr) minmax(160px, .65fr) minmax(190px, .8fr);
    gap: 14px;
    align-items: end;
    min-width: 0;
}
.ssa-offering-entry-grid .field-block { min-width: 0; }
.ssa-offering-submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}
.ssa-offering-submit-row .btn {
    min-width: 190px;
    justify-content: center;
}
.ssa-assignment-panel {
    overflow: hidden;
}
.ssa-assignment-card-clean {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
    border-color: #e7edf5;
}
.ssa-assignment-summary-grid {
    display: grid;
    grid-template-columns: minmax(230px, 1.4fr) minmax(120px, .65fr) minmax(210px, 1.05fr) minmax(210px, 1.05fr) minmax(110px, .55fr);
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    min-width: 0;
}
.assignment-actions-clean {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 14px 20px;
    border-top: 1px solid #eef2f7;
    background: #fbfcfe;
    min-width: 0;
}
.assignment-actions-clean .reassign-form,
.assignment-actions-clean .inline-select-action { min-width: 0; }
.assignment-actions-clean .inline-select-action {
    display: grid;
    grid-template-columns: auto minmax(260px, 520px) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.assignment-actions-clean .inline-select-action label {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.assignment-actions-clean .mini-select {
    height: 40px;
    border-radius: 14px;
    border: 1px solid #dbe4ef;
    background-color: #fff;
    padding: 0 12px;
    color: #0f172a;
    font-weight: 850;
}
.assignment-actions-clean .assignment-button-row {
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.assignment-actions-clean .btn-sm {
    min-width: 110px;
    justify-content: center;
    white-space: nowrap;
}
.ssa-assignment-card-clean .assignment-cell strong {
    font-size: 14px;
    max-width: 100%;
}
.ssa-assignment-card-clean .assignment-status {
    justify-items: start;
}

@media (max-width: 1320px) {
    .ssa-offering-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ssa-assignment-summary-grid {
        grid-template-columns: minmax(220px, 1.3fr) minmax(115px, .6fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(110px, .55fr);
    }
    .assignment-actions-clean {
        grid-template-columns: 1fr;
    }
    .assignment-actions-clean .assignment-button-row {
        justify-content: flex-start;
    }
}
@media (max-width: 1050px) {
    .ssa-assignment-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ssa-assignment-card-clean .assignment-status {
        grid-column: 1 / -1;
    }
}
@media (max-width: 760px) {
    .ssa-offering-entry-grid,
    .ssa-assignment-summary-grid,
    .assignment-actions-clean,
    .assignment-actions-clean .inline-select-action {
        grid-template-columns: 1fr !important;
    }
    .ssa-offering-submit-row,
    .assignment-actions-clean .assignment-button-row {
        justify-content: stretch;
    }
    .ssa-offering-submit-row .btn,
    .assignment-actions-clean .inline-action-form,
    .assignment-actions-clean .btn {
        width: 100%;
    }
    .assignment-actions-clean .assignment-button-row {
        flex-direction: column;
        align-items: stretch;
    }
    .assignment-actions-clean .inline-select-action label { white-space: normal; }
}

/* Upload drawer cleanup for long activity remarks / file names */
.upload-validation-drawer .activity-item-structured{display:flex;flex-direction:column;gap:6px}
.upload-validation-drawer .activity-item-top{display:flex;flex-direction:column;gap:3px}
.upload-validation-drawer .activity-remarks{display:block;white-space:normal;word-break:break-word;overflow-wrap:anywhere;line-height:1.5;color:#334155}
.upload-validation-drawer .drawer-section-block{overflow:hidden}
.upload-validation-drawer .drawer-body{scrollbar-gutter:stable both-edges}
.report-table-scroll{overflow-x:auto}
.ssa-grading-sheet-dynamic th,.ssa-grading-sheet-dynamic td{white-space:nowrap}
.ssa-grading-sheet-dynamic td.name{white-space:normal;min-width:220px}
.ssa-grading-sheet-dynamic thead th{font-size:10px}
.ssa-grading-sheet-dynamic tbody td{font-size:10px}


/* Step 19 - exact teacher grading sheet styling */
.teacher-grading-exact{padding:20px 20px 28px;border:1px solid #d6dde8;background:#fff}
.ssa-sheet-header{display:flex;justify-content:flex-start;margin-bottom:20px}
.ssa-sheet-brand{display:flex;align-items:flex-start;gap:16px}
.ssa-sheet-brand img{width:74px;height:74px;object-fit:contain}
.ssa-sheet-heading h2{margin:0;font-size:24px;line-height:1.1;color:#12213d;letter-spacing:.5px}
.ssa-sheet-title{margin-top:4px;font-size:18px;font-weight:800;color:#d46a1d;letter-spacing:.5px}
.ssa-sheet-tagline{margin-top:4px;color:#4b5563;font-size:14px}
.ssa-sheet-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;border-top:1px solid #d9dee8;border-bottom:1px solid #d9dee8;padding:16px 0;margin-bottom:12px}
.ssa-sheet-meta>div{padding-left:18px;border-left:2px solid #ef8a47;display:flex;flex-direction:column;gap:4px}
.ssa-sheet-meta>div strong{font-size:12px;color:#111827}.ssa-sheet-meta>div span{font-size:12px;color:#374151}
.ssa-exact-sheet{width:max-content;min-width:100%;border-collapse:collapse}
.ssa-exact-sheet th,.ssa-exact-sheet td{border:1px solid #cfd5df;padding:6px 8px;text-align:center;font-size:11px;color:#111827}
.ssa-exact-sheet .group-head{background:#fff;color:#d46a1d;font-size:12px}.ssa-exact-sheet .sub-head,.ssa-exact-sheet .item-head{background:#f8fafc;color:#111827}
.ssa-exact-sheet .hps-row th{background:#fff8ce;color:#111827;font-weight:700}
.ssa-exact-sheet td.name{text-align:left;white-space:normal;min-width:210px}.ssa-exact-sheet td.strong{font-weight:700}
.ssa-signature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:32px;margin-top:60px}.ssa-signature-grid>div{border-top:2px solid #ef8a47;padding-top:10px;text-align:center}.ssa-signature-grid strong{display:block;font-size:14px;color:#111827}.ssa-signature-grid span{display:block;color:#4b5563;margin-top:4px}
@media (max-width: 1100px){.ssa-sheet-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}



/* Step 27 - teacher grading sheet summary layout: 8.5 x 13 landscape */
.teacher-grading-summary {
    padding: 18px 18px 26px;
    border: 1px solid #d6dde8;
    background: #fff;
}

.teacher-grading-summary .ssa-sheet-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.teacher-grading-summary .ssa-sheet-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.teacher-grading-summary .ssa-sheet-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.teacher-grading-summary .ssa-sheet-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #12213d;
    letter-spacing: .5px;
}

.teacher-grading-summary .ssa-sheet-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    color: #d46a1d;
    letter-spacing: .5px;
}

.teacher-grading-summary .ssa-sheet-tagline {
    display: none !important;
}

.teacher-grading-summary .ssa-sheet-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    border-top: 1px solid #d9dee8;
    border-bottom: 1px solid #d9dee8;
    padding: 14px 0;
    margin-bottom: 12px;
}

.teacher-grading-summary .ssa-sheet-meta > div {
    padding-left: 16px;
    border-left: 2px solid #ef8a47;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-grading-summary .ssa-sheet-meta strong {
    font-size: 12px;
    color: #111827;
}

.teacher-grading-summary .ssa-sheet-meta span {
    font-size: 12px;
    color: #374151;
}

.ssa-summary-sheet {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.ssa-summary-sheet th,
.ssa-summary-sheet td {
    border: 1px solid #cfd5df;
    padding: 6px 6px;
    text-align: center;
    font-size: 11px;
    color: #111827;
    vertical-align: middle;
}

.ssa-summary-sheet thead th {
    background: #f8fafc;
    font-weight: 800;
}

.ssa-summary-sheet thead tr:first-child th {
    color: #d46a1d;
    background: #fff;
    font-size: 11px;
    text-transform: uppercase;
}

.ssa-summary-sheet td.name,
.ssa-summary-sheet th:nth-child(3) {
    text-align: left;
    white-space: normal;
}

.ssa-summary-sheet td.strong {
    font-weight: 900;
}

.ssa-summary-sheet th:nth-child(1),
.ssa-summary-sheet td:nth-child(1) {
    width: 42px;
}

.ssa-summary-sheet th:nth-child(2),
.ssa-summary-sheet td:nth-child(2) {
    width: 86px;
}

.ssa-summary-sheet th:nth-child(3),
.ssa-summary-sheet td:nth-child(3) {
    width: 220px;
}

.ssa-summary-sheet th:last-child,
.ssa-summary-sheet td:last-child {
    width: 86px;
}

.teacher-grading-summary .ssa-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 52px;
}

.teacher-grading-summary .ssa-signature-grid > div {
    border-top: 2px solid #ef8a47;
    padding-top: 9px;
    text-align: center;
}

.teacher-grading-summary .ssa-signature-grid strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.teacher-grading-summary .ssa-signature-grid span {
    display: block;
    color: #4b5563;
    margin-top: 4px;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.35in;
    }

    html,
    body {
        width: 13in;
        min-height: 8.5in;
        background: #fff !important;
    }

    .no-print,
    .sidebar,
    .student-menu,
    .page-header,
    .toolbar-actions {
        display: none !important;
    }

    .app-shell,
    .main-content,
    .content-area,
    .report-preview,
    .printable-report,
    .long-bond-report,
    .teacher-grading-summary {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
    }

    .teacher-grading-summary .ssa-sheet-brand img {
        width: 58px;
        height: 58px;
    }

    .teacher-grading-summary .ssa-sheet-heading h2 {
        font-size: 20px;
    }

    .teacher-grading-summary .ssa-sheet-title {
        font-size: 16px;
    }

    .teacher-grading-summary .ssa-sheet-header {
        margin-bottom: 10px;
    }

    .teacher-grading-summary .ssa-sheet-meta {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .teacher-grading-summary .ssa-sheet-meta > div {
        padding-left: 8px;
    }

    .teacher-grading-summary .ssa-sheet-meta strong,
    .teacher-grading-summary .ssa-sheet-meta span {
        font-size: 9px;
    }

    .report-table-scroll,
    .table-scroll {
        overflow: visible !important;
    }

    .ssa-summary-sheet {
        width: 100% !important;
        table-layout: fixed !important;
        page-break-inside: auto;
    }

    .ssa-summary-sheet th,
    .ssa-summary-sheet td {
        font-size: 8px !important;
        padding: 3px 3px !important;
        line-height: 1.15 !important;
    }

    .ssa-summary-sheet thead tr:first-child th {
        font-size: 8px !important;
    }

    .ssa-summary-sheet th:nth-child(1),
    .ssa-summary-sheet td:nth-child(1) {
        width: 28px !important;
    }

    .ssa-summary-sheet th:nth-child(2),
    .ssa-summary-sheet td:nth-child(2) {
        width: 58px !important;
    }

    .ssa-summary-sheet th:nth-child(3),
    .ssa-summary-sheet td:nth-child(3) {
        width: 150px !important;
    }

    .ssa-summary-sheet th:last-child,
    .ssa-summary-sheet td:last-child {
        width: 58px !important;
    }

    .teacher-grading-summary .ssa-signature-grid {
        gap: 30px;
        margin-top: 34px;
    }

    .teacher-grading-summary .ssa-signature-grid strong {
        font-size: 10px;
    }

    .teacher-grading-summary .ssa-signature-grid span {
        font-size: 9px;
    }
}



/* Step 28 - teacher grading sheet subcomponent summary layout */
.teacher-grading-subcomponent {
    padding: 18px 18px 26px;
    border: 1px solid #d6dde8;
    background: #fff;
}

.teacher-grading-subcomponent .ssa-sheet-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.teacher-grading-subcomponent .ssa-sheet-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.teacher-grading-subcomponent .ssa-sheet-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.teacher-grading-subcomponent .ssa-sheet-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #12213d;
    letter-spacing: .5px;
}

.teacher-grading-subcomponent .ssa-sheet-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    color: #d46a1d;
    letter-spacing: .5px;
}

.teacher-grading-subcomponent .ssa-sheet-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    border-top: 1px solid #d9dee8;
    border-bottom: 1px solid #d9dee8;
    padding: 14px 0;
    margin-bottom: 12px;
}

.teacher-grading-subcomponent .ssa-sheet-meta > div {
    padding-left: 16px;
    border-left: 2px solid #ef8a47;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-grading-subcomponent .ssa-sheet-meta strong {
    font-size: 12px;
    color: #111827;
}

.teacher-grading-subcomponent .ssa-sheet-meta span {
    font-size: 12px;
    color: #374151;
}

.ssa-subcomponent-sheet {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.ssa-subcomponent-sheet th,
.ssa-subcomponent-sheet td {
    border: 1px solid #cfd5df;
    padding: 7px 6px;
    text-align: center;
    font-size: 11px;
    color: #111827;
    vertical-align: middle;
}

.ssa-subcomponent-sheet thead th {
    background: #f8fafc;
    font-weight: 800;
}

.ssa-subcomponent-sheet thead tr:first-child th {
    color: #d46a1d;
    background: #fff;
    font-size: 11px;
    text-transform: uppercase;
}

.ssa-subcomponent-sheet td.name,
.ssa-subcomponent-sheet th:nth-child(3) {
    text-align: left;
    white-space: normal;
}

.ssa-subcomponent-sheet td.strong {
    font-weight: 900;
}

.ssa-subcomponent-sheet th:nth-child(1),
.ssa-subcomponent-sheet td:nth-child(1) {
    width: 42px;
}

.ssa-subcomponent-sheet th:nth-child(2),
.ssa-subcomponent-sheet td:nth-child(2) {
    width: 86px;
}

.ssa-subcomponent-sheet th:nth-child(3),
.ssa-subcomponent-sheet td:nth-child(3) {
    width: 230px;
}

.teacher-grading-subcomponent .ssa-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 52px;
}

.teacher-grading-subcomponent .ssa-signature-grid > div {
    border-top: 2px solid #ef8a47;
    padding-top: 9px;
    text-align: center;
}

.teacher-grading-subcomponent .ssa-signature-grid strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.teacher-grading-subcomponent .ssa-signature-grid span {
    display: block;
    color: #4b5563;
    margin-top: 4px;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.35in;
    }

    html,
    body {
        width: 13in;
        min-height: 8.5in;
        background: #fff !important;
    }

    .no-print,
    .sidebar,
    .student-menu,
    .page-header,
    .toolbar-actions {
        display: none !important;
    }

    .app-shell,
    .main-content,
    .content-area,
    .report-preview,
    .printable-report,
    .long-bond-report,
    .teacher-grading-subcomponent {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
    }

    .teacher-grading-subcomponent .ssa-sheet-brand img {
        width: 58px;
        height: 58px;
    }

    .teacher-grading-subcomponent .ssa-sheet-heading h2 {
        font-size: 20px;
    }

    .teacher-grading-subcomponent .ssa-sheet-title {
        font-size: 16px;
    }

    .teacher-grading-subcomponent .ssa-sheet-header {
        margin-bottom: 10px;
    }

    .teacher-grading-subcomponent .ssa-sheet-meta {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .teacher-grading-subcomponent .ssa-sheet-meta > div {
        padding-left: 8px;
    }

    .teacher-grading-subcomponent .ssa-sheet-meta strong,
    .teacher-grading-subcomponent .ssa-sheet-meta span {
        font-size: 9px;
    }

    .report-table-scroll,
    .table-scroll {
        overflow: visible !important;
    }

    .ssa-subcomponent-sheet {
        width: 100% !important;
        table-layout: fixed !important;
        page-break-inside: auto;
    }

    .ssa-subcomponent-sheet th,
    .ssa-subcomponent-sheet td {
        font-size: 8px !important;
        padding: 3px 3px !important;
        line-height: 1.15 !important;
    }

    .ssa-subcomponent-sheet thead tr:first-child th {
        font-size: 8px !important;
    }

    .ssa-subcomponent-sheet th:nth-child(1),
    .ssa-subcomponent-sheet td:nth-child(1) {
        width: 28px !important;
    }

    .ssa-subcomponent-sheet th:nth-child(2),
    .ssa-subcomponent-sheet td:nth-child(2) {
        width: 58px !important;
    }

    .ssa-subcomponent-sheet th:nth-child(3),
    .ssa-subcomponent-sheet td:nth-child(3) {
        width: 150px !important;
    }

    .teacher-grading-subcomponent .ssa-signature-grid {
        gap: 30px;
        margin-top: 34px;
    }

    .teacher-grading-subcomponent .ssa-signature-grid strong {
        font-size: 10px;
    }

    .teacher-grading-subcomponent .ssa-signature-grid span {
        font-size: 9px;
    }
}



/* Step 32 - upload busy overlay */
.upload-busy-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;z-index:9999;backdrop-filter:blur(3px)}
.upload-busy-overlay.show{display:flex}
.upload-busy-card{width:min(420px,calc(100vw - 32px));background:#fff;border-radius:22px;padding:28px;text-align:center;box-shadow:0 28px 80px rgba(15,23,42,.28);border:1px solid #e5e7eb}
.upload-busy-card strong{display:block;font-size:18px;color:#0f172a;margin-top:14px}
.upload-busy-card span{display:block;margin-top:8px;color:#64748b;line-height:1.5}
.upload-busy-spinner{width:54px;height:54px;border-radius:50%;border:5px solid #fee2e2;border-top-color:#b91c1c;margin:0 auto;animation:uploadSpin .85s linear infinite}
@keyframes uploadSpin{to{transform:rotate(360deg)}}

/* Step 33 - template block total/PS/WS columns */
.ssa-subcomponent-sheet thead tr:nth-child(3) th {
    background: #fff7ed;
    color: #111827;
    font-size: 10px;
    line-height: 1.15;
}
.ssa-subcomponent-sheet thead tr:nth-child(3) th small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    color: #475569;
    font-weight: 700;
}
.ssa-subcomponent-sheet td:nth-last-child(4),
.ssa-subcomponent-sheet td:nth-last-child(2) {
    font-weight: 900;
}
@media print {
    .ssa-subcomponent-sheet th,
    .ssa-subcomponent-sheet td {
        font-size: 7px !important;
        padding: 2px 2px !important;
    }
    .ssa-subcomponent-sheet thead tr:nth-child(3) th {
        font-size: 6.5px !important;
    }
    .ssa-subcomponent-sheet thead tr:nth-child(3) th small {
        font-size: 6px !important;
    }
}


/* Step 34 - crosstab-sourced teacher grading sheet */
.teacher-grading-crosstab {
    padding: 18px 18px 26px;
    border: 1px solid #d6dde8;
    background: #fff;
}

.teacher-grading-crosstab .ssa-sheet-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.teacher-grading-crosstab .ssa-sheet-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.teacher-grading-crosstab .ssa-sheet-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.teacher-grading-crosstab .ssa-sheet-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #12213d;
    letter-spacing: .5px;
}

.teacher-grading-crosstab .ssa-sheet-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    color: #d46a1d;
    letter-spacing: .5px;
}

.teacher-grading-crosstab .ssa-sheet-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    border-top: 1px solid #d9dee8;
    border-bottom: 1px solid #d9dee8;
    padding: 14px 0;
    margin-bottom: 12px;
}

.teacher-grading-crosstab .ssa-sheet-meta > div {
    padding-left: 16px;
    border-left: 2px solid #ef8a47;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-grading-crosstab .ssa-sheet-meta strong {
    font-size: 12px;
    color: #111827;
}

.teacher-grading-crosstab .ssa-sheet-meta span {
    font-size: 12px;
    color: #374151;
}

.ssa-crosstab-sheet {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.ssa-crosstab-sheet th,
.ssa-crosstab-sheet td {
    border: 1px solid #cfd5df;
    padding: 6px 6px;
    text-align: center;
    font-size: 11px;
    color: #111827;
    vertical-align: middle;
    white-space: nowrap;
}

.ssa-crosstab-sheet thead th {
    background: #f8fafc;
    font-weight: 800;
}

.ssa-crosstab-sheet thead tr:first-child th {
    color: #d46a1d;
    background: #fff;
    font-size: 11px;
    text-transform: uppercase;
}

.ssa-crosstab-sheet .summary-head,
.ssa-crosstab-sheet .summary-cell {
    font-weight: 900;
    background: #fffdfa;
}

.ssa-crosstab-sheet td.name,
.ssa-crosstab-sheet th:nth-child(3) {
    text-align: left;
    white-space: normal;
    min-width: 220px;
}

.teacher-grading-crosstab .ssa-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 52px;
}

.teacher-grading-crosstab .ssa-signature-grid > div {
    border-top: 2px solid #ef8a47;
    padding-top: 9px;
    text-align: center;
}

.teacher-grading-crosstab .ssa-signature-grid strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.teacher-grading-crosstab .ssa-signature-grid span {
    display: block;
    color: #4b5563;
    margin-top: 4px;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.35in;
    }

    html,
    body {
        width: 13in;
        min-height: 8.5in;
        background: #fff !important;
    }

    .no-print,
    .sidebar,
    .student-menu,
    .page-header,
    .toolbar-actions {
        display: none !important;
    }

    .app-shell,
    .main-content,
    .content-area,
    .report-preview,
    .printable-report,
    .long-bond-report,
    .teacher-grading-crosstab {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
    }

    .teacher-grading-crosstab .ssa-sheet-brand img {
        width: 58px;
        height: 58px;
    }

    .teacher-grading-crosstab .ssa-sheet-heading h2 {
        font-size: 20px;
    }

    .teacher-grading-crosstab .ssa-sheet-title {
        font-size: 16px;
    }

    .teacher-grading-crosstab .ssa-sheet-header {
        margin-bottom: 10px;
    }

    .teacher-grading-crosstab .ssa-sheet-meta {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .teacher-grading-crosstab .ssa-sheet-meta > div {
        padding-left: 8px;
    }

    .teacher-grading-crosstab .ssa-sheet-meta strong,
    .teacher-grading-crosstab .ssa-sheet-meta span {
        font-size: 9px;
    }

    .report-table-scroll,
    .table-scroll {
        overflow: visible !important;
    }

    .ssa-crosstab-sheet {
        width: 100% !important;
        table-layout: auto !important;
    }

    .ssa-crosstab-sheet th,
    .ssa-crosstab-sheet td {
        font-size: 7px !important;
        padding: 2px 3px !important;
        line-height: 1.12 !important;
    }

    .ssa-crosstab-sheet thead tr:first-child th {
        font-size: 7px !important;
    }

    .ssa-crosstab-sheet td.name,
    .ssa-crosstab-sheet th:nth-child(3) {
        min-width: 125px !important;
        max-width: 160px !important;
    }

    .teacher-grading-crosstab .ssa-signature-grid {
        gap: 30px;
        margin-top: 34px;
    }

    .teacher-grading-crosstab .ssa-signature-grid strong {
        font-size: 10px;
    }

    .teacher-grading-crosstab .ssa-signature-grid span {
        font-size: 9px;
    }
}



/* Step 35 - crosstab grading sheet total / PS / WS layout */
.ssa-crosstab-summary-sheet th,
.ssa-crosstab-summary-sheet td {
    font-size: 10px;
    padding: 5px 5px;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(2) th {
    color: #111827;
    background: #f8fafc;
    text-transform: uppercase;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(3) th {
    color: #334155;
    background: #fff7ed;
    font-size: 9px;
    font-weight: 800;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(4) th {
    color: #111827;
    background: #f8fafc;
    font-size: 9px;
}

.ssa-crosstab-summary-sheet .summary-cell {
    font-weight: 900;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.30in;
    }

    .ssa-crosstab-summary-sheet th,
    .ssa-crosstab-summary-sheet td {
        font-size: 6.5px !important;
        padding: 2px 2px !important;
        line-height: 1.05 !important;
    }

    .ssa-crosstab-summary-sheet thead tr:nth-child(2) th,
    .ssa-crosstab-summary-sheet thead tr:nth-child(3) th,
    .ssa-crosstab-summary-sheet thead tr:nth-child(4) th {
        font-size: 6.5px !important;
    }

    .ssa-crosstab-summary-sheet td.name,
    .ssa-crosstab-summary-sheet th:nth-child(3) {
        min-width: 115px !important;
        max-width: 145px !important;
    }
}



/* Step 36 - template-filtered crosstab report */
.ssa-crosstab-summary-sheet th,
.ssa-crosstab-summary-sheet td {
    font-size: 10px;
    padding: 5px 5px;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(2) th {
    color: #111827;
    background: #f8fafc;
    text-transform: uppercase;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(3) th {
    color: #334155;
    background: #fff7ed;
    font-size: 9px;
    font-weight: 800;
}

.ssa-crosstab-summary-sheet thead tr:nth-child(4) th {
    color: #111827;
    background: #f8fafc;
    font-size: 9px;
}

.ssa-crosstab-summary-sheet .summary-cell {
    font-weight: 900;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.30in;
    }

    .ssa-crosstab-summary-sheet th,
    .ssa-crosstab-summary-sheet td {
        font-size: 6.5px !important;
        padding: 2px 2px !important;
        line-height: 1.05 !important;
    }

    .ssa-crosstab-summary-sheet thead tr:nth-child(2) th,
    .ssa-crosstab-summary-sheet thead tr:nth-child(3) th,
    .ssa-crosstab-summary-sheet thead tr:nth-child(4) th {
        font-size: 6.5px !important;
    }

    .ssa-crosstab-summary-sheet td.name,
    .ssa-crosstab-summary-sheet th:nth-child(3) {
        min-width: 115px !important;
        max-width: 145px !important;
    }
}



/* Step 39 - normalized SSA teacher grading sheet */
.teacher-grading-normalized {
    padding: 18px 18px 26px;
    border: 1px solid #d6dde8;
    background: #fff;
}

.teacher-grading-normalized .ssa-sheet-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.teacher-grading-normalized .ssa-sheet-brand {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.teacher-grading-normalized .ssa-sheet-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.teacher-grading-normalized .ssa-sheet-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: #12213d;
    letter-spacing: .5px;
}

.teacher-grading-normalized .ssa-sheet-title {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    color: #d46a1d;
    letter-spacing: .5px;
}

.teacher-grading-normalized .ssa-sheet-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    border-top: 1px solid #d9dee8;
    border-bottom: 1px solid #d9dee8;
    padding: 14px 0;
    margin-bottom: 12px;
}

.teacher-grading-normalized .ssa-sheet-meta > div {
    padding-left: 16px;
    border-left: 2px solid #ef8a47;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-grading-normalized .ssa-sheet-meta strong {
    font-size: 12px;
    color: #111827;
}

.teacher-grading-normalized .ssa-sheet-meta span {
    font-size: 12px;
    color: #374151;
}

.ssa-normalized-sheet {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.ssa-normalized-sheet th,
.ssa-normalized-sheet td {
    border: 1px solid #cfd5df;
    padding: 6px 6px;
    text-align: center;
    font-size: 10px;
    color: #111827;
    vertical-align: middle;
    white-space: nowrap;
}

.ssa-normalized-sheet thead th {
    background: #f8fafc;
    font-weight: 800;
}

.ssa-normalized-sheet thead tr:first-child th {
    color: #d46a1d;
    background: #fff;
    font-size: 10px;
    text-transform: uppercase;
}

.ssa-normalized-sheet thead tr:nth-child(2) th {
    color: #111827;
    background: #f8fafc;
    text-transform: uppercase;
}

.ssa-normalized-sheet thead tr:nth-child(3) th {
    color: #334155;
    background: #fff7ed;
    font-size: 9px;
    font-weight: 800;
}

.ssa-normalized-sheet thead tr:nth-child(4) th {
    color: #111827;
    background: #f8fafc;
    font-size: 9px;
}

.ssa-normalized-sheet .summary-cell {
    font-weight: 900;
}

.ssa-normalized-sheet .letter-grade-cell {
    color: #7f1d1d;
    font-size: 11px;
    letter-spacing: .02em;
}

.ssa-normalized-sheet td.name,
.ssa-normalized-sheet th:nth-child(3) {
    text-align: left;
    white-space: normal;
    min-width: 220px;
}

.teacher-grading-normalized .ssa-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 52px;
}

.teacher-grading-normalized .ssa-signature-grid > div {
    border-top: 2px solid #ef8a47;
    padding-top: 9px;
    text-align: center;
}

.teacher-grading-normalized .ssa-signature-grid strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.teacher-grading-normalized .ssa-signature-grid span {
    display: block;
    color: #4b5563;
    margin-top: 4px;
}

@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.30in;
    }

    html,
    body {
        width: 13in;
        min-height: 8.5in;
        background: #fff !important;
    }

    .no-print,
    .sidebar,
    .student-menu,
    .page-header,
    .toolbar-actions {
        display: none !important;
    }

    .app-shell,
    .main-content,
    .content-area,
    .report-preview,
    .printable-report,
    .long-bond-report,
    .teacher-grading-normalized {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: 0 !important;
        background: #fff !important;
    }

    .teacher-grading-normalized .ssa-sheet-brand img {
        width: 58px;
        height: 58px;
    }

    .teacher-grading-normalized .ssa-sheet-heading h2 {
        font-size: 20px;
    }

    .teacher-grading-normalized .ssa-sheet-title {
        font-size: 16px;
    }

    .teacher-grading-normalized .ssa-sheet-header {
        margin-bottom: 10px;
    }

    .teacher-grading-normalized .ssa-sheet-meta {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
    }

    .teacher-grading-normalized .ssa-sheet-meta > div {
        padding-left: 8px;
    }

    .teacher-grading-normalized .ssa-sheet-meta strong,
    .teacher-grading-normalized .ssa-sheet-meta span {
        font-size: 9px;
    }

    .report-table-scroll,
    .table-scroll {
        overflow: visible !important;
    }

    .ssa-normalized-sheet {
        width: 100% !important;
        table-layout: auto !important;
    }

    .ssa-normalized-sheet th,
    .ssa-normalized-sheet td {
        font-size: 6.5px !important;
        padding: 2px 2px !important;
        line-height: 1.05 !important;
    }

    .ssa-normalized-sheet thead tr:first-child th,
    .ssa-normalized-sheet thead tr:nth-child(2) th,
    .ssa-normalized-sheet thead tr:nth-child(3) th,
    .ssa-normalized-sheet thead tr:nth-child(4) th {
        font-size: 6.5px !important;
    }

    .ssa-normalized-sheet td.name,
    .ssa-normalized-sheet th:nth-child(3) {
        min-width: 115px !important;
        max-width: 145px !important;
    }

    .teacher-grading-normalized .ssa-signature-grid {
        gap: 30px;
        margin-top: 34px;
    }

    .teacher-grading-normalized .ssa-signature-grid strong {
        font-size: 10px;
    }

    .teacher-grading-normalized .ssa-signature-grid span {
        font-size: 9px;
    }
}



/* STEP 46Q: exact grading-period upload status and readable dynamic grading sheet */
.quarter-status-link.compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 116px;
    padding: 8px 10px;
}
.quarter-status-link.compact strong { font-size: 11px; }
.quarter-status-link.compact span { width: 100%; text-align: center; }
.grading-sheet-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 10px;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 10px;
}
.grading-sheet-legend strong { color: #111827; }
.dynamic-component-sheet thead tr:nth-child(2) th { white-space: normal; min-width: 62px; }
.dynamic-component-sheet thead tr:nth-child(3) th { white-space: normal; }
.dynamic-component-sheet td { min-width: 38px; }
@media print {
    .grading-sheet-legend { font-size: 7px; padding: 5px 7px; gap: 4px 10px; margin-bottom: 5px; }
    .quarter-status-link.compact { display: none; }
}

/* STEP 46Q final polish: explicit period status and readable report columns */
.quarter-status-cell { align-items: stretch; }
.quarter-status-link.compact { min-width: 112px; justify-content: center; }
.quarter-status-link.compact span { font-weight: 800; }
.dynamic-component-sheet thead th { white-space: normal; line-height: 1.2; }
.dynamic-component-sheet tbody td { text-align: center; }
.dynamic-component-sheet tbody td.name { text-align: left; }
.grading-sheet-legend { border-left: 4px solid #f97316; }


/* STEP 46Q2: long-bond fit, upload-aware monitoring, and policy manual encoding */
.monitoring-stat-row { grid-template-columns: repeat(6, minmax(145px, 1fr)); }
.dynamic-component-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}
.dynamic-component-sheet th,
.dynamic-component-sheet td {
    min-width: 0 !important;
    max-width: none !important;
    padding: 5px 3px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip;
    line-height: 1.12;
}
.dynamic-component-sheet td.name,
.dynamic-component-sheet th:nth-child(3) {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}
.dynamic-component-sheet tbody td.name { font-size: 9px; }
.teacher-grading-normalized .report-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.item-pill { max-width: 190px; white-space: normal; line-height: 1.15; }
@media (max-width: 1450px) {
    .monitoring-stat-row { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
}
@media print {
    @page { size: 13in 8.5in; margin: .20in .18in; }
    .teacher-grading-normalized .report-table-scroll { overflow: visible !important; }
    .dynamic-component-sheet {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }
    .dynamic-component-sheet th,
    .dynamic-component-sheet td {
        font-size: 5.55px !important;
        padding: 1.6px 1.2px !important;
        line-height: 1.02 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    .dynamic-component-sheet thead tr:first-child th,
    .dynamic-component-sheet thead tr:nth-child(2) th,
    .dynamic-component-sheet thead tr:nth-child(3) th,
    .dynamic-component-sheet thead tr:nth-child(4) th { font-size: 5.4px !important; }
    .dynamic-component-sheet tbody td.name { font-size: 5.6px !important; }
    .teacher-grading-normalized .ssa-sheet-brand img { width: 46px !important; height: 46px !important; }
    .teacher-grading-normalized .ssa-sheet-heading h2 { font-size: 15px !important; }
    .teacher-grading-normalized .ssa-sheet-title { font-size: 12px !important; margin-top: 2px !important; }
    .teacher-grading-normalized .ssa-sheet-meta { padding: 5px 0 !important; gap: 4px !important; margin-bottom: 4px !important; }
    .teacher-grading-normalized .ssa-sheet-meta strong,
    .teacher-grading-normalized .ssa-sheet-meta span { font-size: 7px !important; }
    .grading-sheet-legend { font-size: 5.8px !important; padding: 3px 5px !important; gap: 2px 7px !important; margin-bottom: 3px !important; }
    .teacher-grading-normalized .ssa-signature-grid { margin-top: 18px !important; }
}


/* STEP 46Q4: centered headers, compact legal-landscape print, and balanced spacing */
.teacher-grading-normalized .ssa-normalized-sheet thead th,
.dynamic-component-sheet thead th {
    text-align: center !important;
    vertical-align: middle !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none;
}
.dynamic-component-sheet thead th:nth-child(3) {
    text-align: center !important;
}
.dynamic-component-sheet tbody td.name {
    text-align: left !important;
}
.dynamic-component-sheet thead tr:first-child th {
    font-size: 8.2px;
    letter-spacing: .02em;
}
.dynamic-component-sheet thead tr:nth-child(2) th {
    font-size: 7.7px;
    padding: 4px 2px;
}
.dynamic-component-sheet thead tr:nth-child(3) th,
.dynamic-component-sheet thead tr:nth-child(4) th {
    font-size: 7.2px;
    padding: 3px 2px;
}

@media print {
    @page teacher-grading-q4 {
        size: 13in 8.5in;
        margin: .14in .12in .14in .12in;
    }

    html,
    body {
        width: 13in !important;
        min-width: 13in !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .teacher-grading-normalized {
        page: teacher-grading-q4;
        width: 12.76in !important;
        max-width: 12.76in !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
        break-inside: avoid-page !important;
    }

    .teacher-grading-normalized .ssa-sheet-header {
        margin: 0 0 4px !important;
    }
    .teacher-grading-normalized .ssa-sheet-brand {
        gap: 7px !important;
        align-items: center !important;
    }
    .teacher-grading-normalized .ssa-sheet-brand img {
        width: 36px !important;
        height: 36px !important;
    }
    .teacher-grading-normalized .ssa-sheet-heading h2 {
        font-size: 12.5px !important;
        line-height: 1 !important;
        letter-spacing: .15px !important;
    }
    .teacher-grading-normalized .ssa-sheet-title {
        margin-top: 2px !important;
        font-size: 9.5px !important;
        line-height: 1 !important;
    }

    .teacher-grading-normalized .ssa-sheet-meta {
        gap: 3px 7px !important;
        padding: 3px 0 !important;
        margin: 0 0 3px !important;
    }
    .teacher-grading-normalized .ssa-sheet-meta > div {
        gap: 1px !important;
        padding-left: 5px !important;
        border-left-width: 1px !important;
    }
    .teacher-grading-normalized .ssa-sheet-meta strong,
    .teacher-grading-normalized .ssa-sheet-meta span {
        font-size: 5.8px !important;
        line-height: 1.05 !important;
    }

    .grading-sheet-legend {
        margin: 0 0 3px !important;
        padding: 2px 4px !important;
        gap: 1px 7px !important;
        border-radius: 4px !important;
        border-left-width: 2px !important;
        font-size: 5.1px !important;
        line-height: 1 !important;
    }

    .dynamic-component-sheet {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }
    .dynamic-component-sheet thead {
        display: table-header-group !important;
    }
    .dynamic-component-sheet tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .dynamic-component-sheet th,
    .dynamic-component-sheet td {
        font-size: 4.9px !important;
        padding: .85px .65px !important;
        line-height: 1 !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        vertical-align: middle !important;
    }
    .dynamic-component-sheet thead tr:first-child th {
        font-size: 5px !important;
        padding: 1.2px .7px !important;
    }
    .dynamic-component-sheet thead tr:nth-child(2) th {
        font-size: 4.75px !important;
        padding: 1.1px .6px !important;
    }
    .dynamic-component-sheet thead tr:nth-child(3) th {
        font-size: 4.45px !important;
        padding: .9px .5px !important;
    }
    .dynamic-component-sheet thead tr:nth-child(4) th {
        font-size: 4.6px !important;
        padding: .9px .5px !important;
    }
    .dynamic-component-sheet tbody td.name {
        font-size: 4.85px !important;
        line-height: 1.02 !important;
    }
    .dynamic-component-sheet .letter-grade-cell {
        font-size: 5.2px !important;
    }

    .teacher-grading-normalized .ssa-signature-grid {
        gap: 24px !important;
        margin-top: 10px !important;
    }
    .teacher-grading-normalized .ssa-signature-grid > div {
        padding-top: 3px !important;
        border-top-width: 1px !important;
    }
    .teacher-grading-normalized .ssa-signature-grid strong {
        font-size: 6px !important;
        line-height: 1 !important;
    }
    .teacher-grading-normalized .ssa-signature-grid span {
        margin-top: 1px !important;
        font-size: 5.3px !important;
        line-height: 1 !important;
    }
}

/* STEP 46Q5: true 8.5 x 13 long-bond landscape print canvas; remove nested print scrollbars and blank second sheet */
@media print {
    @page {
        size: 13in 8.5in;
        margin: 0.14in 0.12in;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .app-shell,
    .main-area,
    .content-area {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .report-preview,
    .printable-report,
    .long-bond-report,
    .teacher-grading-normalized,
    .teacher-grading-normalized .report-table-scroll,
    .teacher-grading-normalized .table-scroll {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }

    .teacher-grading-normalized {
        page: auto !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    .teacher-grading-normalized .report-table-scroll,
    .teacher-grading-normalized .table-scroll {
        display: block !important;
    }

    .teacher-grading-normalized .dynamic-component-sheet,
    .teacher-grading-normalized .ssa-normalized-sheet {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        margin: 0 !important;
    }

    .teacher-grading-normalized .ssa-sheet-header {
        margin: 0 0 3px !important;
    }

    .teacher-grading-normalized .ssa-sheet-meta {
        margin: 0 0 2px !important;
        padding: 2px 0 !important;
        gap: 2px 6px !important;
    }

    .grading-sheet-legend {
        margin: 0 0 2px !important;
    }

    .teacher-grading-normalized .ssa-signature-grid {
        margin-top: 7px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .teacher-grading-normalized .dynamic-component-sheet thead {
        display: table-header-group !important;
    }

    .teacher-grading-normalized .dynamic-component-sheet tbody,
    .teacher-grading-normalized .dynamic-component-sheet tr,
    .teacher-grading-normalized .dynamic-component-sheet td,
    .teacher-grading-normalized .dynamic-component-sheet th {
        overflow: visible !important;
    }
}

/* STEP 46Q5 print density: readable standard classes, compact only for large rosters */
@media print {
    .teacher-grading-normalized.print-standard .ssa-sheet-brand img {
        width: 42px !important;
        height: 42px !important;
    }
    .teacher-grading-normalized.print-standard .ssa-sheet-heading h2 {
        font-size: 14px !important;
    }
    .teacher-grading-normalized.print-standard .ssa-sheet-title {
        font-size: 10.5px !important;
    }
    .teacher-grading-normalized.print-standard .ssa-sheet-meta strong,
    .teacher-grading-normalized.print-standard .ssa-sheet-meta span {
        font-size: 6.4px !important;
        line-height: 1.08 !important;
    }
    .teacher-grading-normalized.print-standard .grading-sheet-legend {
        font-size: 5.7px !important;
        padding: 2.5px 4px !important;
    }
    .teacher-grading-normalized.print-standard .dynamic-component-sheet th,
    .teacher-grading-normalized.print-standard .dynamic-component-sheet td,
    .teacher-grading-normalized.print-standard .ssa-normalized-sheet th,
    .teacher-grading-normalized.print-standard .ssa-normalized-sheet td {
        font-size: 5.75px !important;
        padding: 1.45px .8px !important;
        line-height: 1.04 !important;
    }
    .teacher-grading-normalized.print-standard .dynamic-component-sheet thead tr:first-child th,
    .teacher-grading-normalized.print-standard .dynamic-component-sheet thead tr:nth-child(2) th {
        font-size: 5.85px !important;
        padding-top: 1.7px !important;
        padding-bottom: 1.7px !important;
    }
    .teacher-grading-normalized.print-standard .dynamic-component-sheet thead tr:nth-child(3) th,
    .teacher-grading-normalized.print-standard .dynamic-component-sheet thead tr:nth-child(4) th {
        font-size: 5.45px !important;
        padding-top: 1.3px !important;
        padding-bottom: 1.3px !important;
    }
    .teacher-grading-normalized.print-standard .dynamic-component-sheet tbody td.name {
        font-size: 5.75px !important;
    }
    .teacher-grading-normalized.print-standard .ssa-signature-grid {
        margin-top: 11px !important;
    }

    .teacher-grading-normalized.print-dense .dynamic-component-sheet th,
    .teacher-grading-normalized.print-dense .dynamic-component-sheet td,
    .teacher-grading-normalized.print-dense .ssa-normalized-sheet th,
    .teacher-grading-normalized.print-dense .ssa-normalized-sheet td {
        font-size: 4.85px !important;
        padding: .75px .55px !important;
        line-height: 1 !important;
    }
    .teacher-grading-normalized.print-dense .ssa-sheet-meta strong,
    .teacher-grading-normalized.print-dense .ssa-sheet-meta span {
        font-size: 5.6px !important;
    }
    .teacher-grading-normalized.print-dense .grading-sheet-legend {
        font-size: 5px !important;
        padding: 2px 4px !important;
    }
}

/* STEP 46Q5 standard roster uses the printable page height; signatures stay at the lower edge */
@media print {
    .teacher-grading-normalized.print-standard {
        display: flex !important;
        flex-direction: column !important;
        min-height: 8.18in !important;
    }
    .teacher-grading-normalized.print-standard .ssa-signature-grid {
        margin-top: auto !important;
        padding-top: 10px !important;
    }
}

.print-format-note {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

/* STEP 46R - Dynamic Academic Role Assignments */
.academic-scope-header {
    align-items: stretch;
    gap: 24px;
}

.academic-active-year {
    min-width: 210px;
    padding: 16px 18px;
    border: 1px solid #ead8d8;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #fff7f7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

.academic-active-year span,
.academic-active-year small {
    color: #78666a;
    font-size: 12px;
}

.academic-active-year strong {
    color: #65171c;
    font-size: 22px;
    line-height: 1.15;
    margin: 3px 0;
}

.alert-box.warning {
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid #f2d28d;
    background: #fff9e8;
    color: #704b00;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.academic-scope-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.academic-filter-card {
    margin-bottom: 18px;
}

.academic-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.academic-filter-grid label,
.academic-assignment-form label {
    font-weight: 700;
    font-size: 12px;
    color: #51454a;
    margin-bottom: 6px;
    display: block;
}

.academic-filter-action {
    display: flex;
    align-items: flex-end;
}

.academic-scope-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(290px, .9fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.academic-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.academic-form-grid .span-two {
    grid-column: 1 / -1;
}

.form-help {
    display: block;
    color: #7d7276;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 5px;
}

.academic-permission-box {
    margin-top: 18px;
    border: 1px solid #eadfe1;
    background: #fbf8f8;
    border-radius: 14px;
    padding: 14px;
}

.academic-permission-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.academic-permission-heading strong {
    display: block;
    color: #4c3035;
}

.academic-permission-heading span {
    display: block;
    color: #7e6c70;
    font-size: 11px;
    margin-top: 3px;
}

.academic-permission-heading .primary-toggle {
    white-space: nowrap;
    margin: 0;
}

.academic-permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.academic-permission-grid .check-row,
.academic-active-toggle {
    padding: 9px 10px;
    border: 1px solid #eadfe1;
    background: #fff;
    border-radius: 10px;
    font-weight: 600;
    margin: 0;
}

.academic-active-toggle {
    margin-top: 14px;
    display: inline-flex !important;
}

.academic-save-button {
    width: 100%;
    margin-top: 14px;
    justify-content: center;
}

.academic-role-guide h3 {
    margin-top: 0;
}

.role-guide-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #efe7e8;
}

.role-guide-badge {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #65171c;
}

.subject-guide .role-guide-badge {
    background: #9b5b16;
}

.role-guide-item strong {
    color: #4b2e33;
}

.role-guide-item p,
.academic-rule-note p {
    font-size: 12px;
    line-height: 1.55;
    color: #756a6d;
    margin: 4px 0 0;
}

.academic-rule-note {
    padding: 13px 0;
    border-bottom: 1px solid #efe7e8;
}

.academic-rule-note:last-child {
    border-bottom: 0;
}

.academic-assignment-list {
    margin-bottom: 22px;
}

.academic-scope-table th {
    white-space: nowrap;
}

.academic-scope-table td {
    vertical-align: top;
}

.academic-scope-table .inactive-row {
    opacity: .65;
    background: #fafafa;
}

.academic-permission-summary {
    display: inline-block;
    max-width: 310px;
    font-size: 12px;
    line-height: 1.45;
    color: #51454a;
}

.scope-note {
    color: #7b3940;
    font-weight: 700;
}

.academic-assignment-form select option[disabled] {
    color: #aaa;
}

.academic-assignment-form-card .form-control {
    min-height: 42px;
}

@media (max-width: 1100px) {
    .academic-scope-layout {
        grid-template-columns: 1fr;
    }

    .academic-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .academic-filter-action {
        grid-column: 1 / -1;
    }

    .academic-filter-action .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .academic-scope-header {
        display: block;
    }

    .academic-active-year {
        margin-top: 12px;
        align-items: flex-start;
    }

    .academic-scope-summary {
        grid-template-columns: 1fr;
    }

    .academic-filter-grid,
    .academic-form-grid,
    .academic-permission-grid {
        grid-template-columns: 1fr;
    }

    .academic-form-grid .span-two {
        grid-column: auto;
    }

    .academic-permission-heading {
        display: block;
    }

    .academic-permission-heading .primary-toggle {
        margin-top: 10px;
    }

    .academic-scope-table {
        min-width: 920px;
    }
}

/* STEP 46R1 - Unified user access assignments, searchable selectors, and multi-scope lists */
.access-assignment-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    margin: 0 0 16px;
    border: 1px solid #eadfe1;
    border-radius: 14px;
    background: #fff;
}

.access-tab-button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #67595d;
    font-weight: 800;
    cursor: pointer;
}

.access-tab-button.active {
    background: #65171c;
    color: #fff;
    box-shadow: 0 8px 18px rgba(101, 23, 28, .18);
}

.access-tab-panel {
    display: none;
}

.access-tab-panel.active {
    display: block;
}

.access-role-grid {
    align-items: start;
    margin-bottom: 20px;
}

.searchable-select-field .searchable-select-input {
    margin-bottom: 7px;
}

.multi-checklist {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #ded4d6;
    border-radius: 12px;
    background: #fff;
    padding: 7px;
}

.multi-checklist.tall {
    max-height: 330px;
}

.multi-check-item {
    display: flex !important;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 9px;
    margin: 0 !important;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #4e4346 !important;
}

.multi-check-item:hover {
    background: #fff4f4;
}

.multi-check-item input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.checklist-search {
    margin-bottom: 7px;
}

.shs-restriction-note {
    padding: 10px 12px;
    border: 1px solid #f2d28d;
    border-radius: 10px;
    background: #fff9e8;
    color: #704b00;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .access-assignment-tabs {
        display: flex;
    }

    .access-tab-button {
        flex: 1;
        padding: 0 10px;
    }

    .multi-checklist,
    .multi-checklist.tall {
        max-height: 260px;
    }
}

/* STEP 46R2 - Academic scope picker UI, readable multi-selection, and searchable employee combobox */
.academic-scope-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.academic-scope-summary .summary-card {
    min-height: 104px;
    padding: 18px 20px;
    border: 1px solid #eadfe1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.academic-scope-summary .summary-card span,
.academic-scope-summary .summary-card strong,
.academic-scope-summary .summary-card small {
    display: block;
}

.academic-scope-summary .summary-card span {
    color: #6b5d61;
    font-size: 12px;
    font-weight: 800;
}

.academic-scope-summary .summary-card strong {
    margin: 5px 0 2px;
    color: #65171c;
    font-size: 25px;
    line-height: 1;
}

.academic-scope-summary .summary-card small {
    color: #8b7e81;
    font-size: 11px;
}

.employee-picker-field {
    position: relative;
    min-width: 0;
}

.searchable-combobox {
    position: relative;
}

.searchable-combobox-input {
    padding-right: 44px !important;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 21px) 24px, calc(100% - 15px) 24px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.searchable-combobox-menu {
    display: none;
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    border: 1px solid #d9e1ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}

.searchable-combobox-menu.open {
    display: block;
}

.searchable-combobox-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #243047;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
}

.searchable-combobox-option:hover,
.searchable-combobox-option.active {
    background: #fff1f2;
    color: #65171c;
}

.searchable-combobox-empty {
    padding: 13px;
    color: #7c7074;
    font-size: 12px;
    text-align: center;
}

.searchable-select-source {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.scope-selection-block {
    min-width: 0;
    padding: 14px;
    border: 1px solid #eadfe1;
    border-radius: 16px;
    background: #fdfbfb;
}

.selection-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.selection-heading-row label {
    margin-bottom: 2px !important;
    color: #2c2730 !important;
    font-size: 13px !important;
}

.selection-count {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3e8ea;
    color: #65171c;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.selection-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 9px;
}

.selection-tools .checklist-search {
    min-width: 0;
    height: 44px;
    min-height: 44px;
    margin: 0;
    border-radius: 12px;
    font-size: 13px;
}

.selection-tool-button {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #dbcdd0;
    border-radius: 11px;
    background: #fff;
    color: #65171c;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.selection-tool-button:hover {
    border-color: #b56a70;
    background: #fff4f4;
}

.selection-tool-button.ghost {
    color: #6b7280;
}

.multi-checklist,
.multi-checklist.tall,
.level-checklist,
.group-checklist,
.subject-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border: 1px solid #ded4d6;
    border-radius: 13px;
    background: #fff;
    box-sizing: border-box;
}

.subject-checklist {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    max-height: 360px;
}

.multi-check-item,
.academic-assignment-form .multi-check-item {
    display: flex !important;
    width: auto !important;
    min-width: 0;
    min-height: 58px;
    align-items: flex-start;
    gap: 10px;
    margin: 0 !important;
    padding: 10px 11px;
    border: 1px solid #ece4e6;
    border-radius: 11px;
    background: #fff;
    color: #41383b !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    cursor: pointer;
    box-sizing: border-box;
}

.multi-check-item:hover {
    border-color: #d8aeb2;
    background: #fff7f7;
}

.multi-check-item.selected {
    border-color: #9f4b53;
    background: #fff0f1;
    box-shadow: inset 0 0 0 1px rgba(101, 23, 28, .10);
}

.multi-check-item input[type="checkbox"],
.academic-assignment-form .multi-check-item input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    accent-color: #65171c;
}

.multi-check-copy {
    display: block;
    min-width: 0;
    flex: 1;
}

.multi-check-copy strong,
.multi-check-copy small {
    display: block;
    overflow-wrap: anywhere;
}

.multi-check-copy strong {
    color: #2f2730;
    font-size: 12px;
    font-weight: 900;
}

.multi-check-copy small {
    margin-top: 3px;
    color: #776a6e;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.35;
}

.selection-empty-message {
    display: none;
    margin-top: 8px;
    padding: 12px;
    border: 1px dashed #dccfd2;
    border-radius: 11px;
    color: #786b70;
    background: #fff;
    font-size: 12px;
    text-align: center;
}

.required-mark,
.optional-mark {
    display: inline-flex;
    margin-left: 5px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}

.required-mark {
    background: #fee2e2;
    color: #b91c1c;
}

.optional-mark {
    background: #e0f2fe;
    color: #0369a1;
}

.assignment-steps {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
    padding: 0;
    list-style: none;
}

.assignment-steps li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid #efe7e8;
    border-radius: 12px;
    background: #fff;
}

.assignment-steps li > span {
    display: inline-flex;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #65171c;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.assignment-steps strong {
    display: block;
    color: #422f34;
    font-size: 12px;
}

.assignment-steps p {
    margin: 3px 0 0;
    color: #776b6e;
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .academic-scope-summary {
        grid-template-columns: 1fr;
    }

    .selection-tools {
        grid-template-columns: 1fr 1fr;
    }

    .selection-tools .checklist-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .selection-heading-row {
        display: block;
    }

    .selection-count {
        margin-top: 8px;
    }

    .selection-tools {
        grid-template-columns: 1fr;
    }

    .selection-tools .checklist-search {
        grid-column: auto;
    }

    .multi-checklist,
    .subject-checklist {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
}

/* STEP46AB - Extracurricular membership workspace */
.membership-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}.membership-overview-card{display:flex;align-items:center;gap:14px;padding:18px 20px;border:1px solid #e5e7eb;border-radius:18px;background:linear-gradient(145deg,#fff,#fffaf8);box-shadow:0 8px 24px rgba(15,23,42,.04)}.membership-overview-card .overview-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#fff1f2;color:#991b1b;font-size:18px;font-weight:900}.membership-overview-card small,.membership-overview-card strong{display:block}.membership-overview-card small{margin-bottom:3px;color:#64748b;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.membership-overview-card strong{color:#172033;font-size:15px}.membership-command-card{display:flex;align-items:center;justify-content:space-between;gap:24px}.membership-period-control{display:flex;align-items:end;gap:20px;min-width:0}.period-switch-form label span,.member-modal-filter-grid label span,.roster-search-field span{display:block;margin:0 0 6px;color:#475569;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.period-switch-form{min-width:190px}.membership-scope-note{display:grid;gap:2px;max-width:520px;padding-left:18px;border-left:3px solid #fed7aa}.membership-scope-note strong{color:#7c2d12}.membership-scope-note span{color:#64748b;font-size:12px;line-height:1.45}.membership-command-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:9px}.roster-card{scroll-margin-top:20px}.roster-title-row{align-items:flex-end}.roster-title-row h2{margin:4px 0}.roster-title-actions{display:flex;align-items:end;gap:14px}.roster-search-field{min-width:280px}.roster-count-group{display:flex;gap:7px;padding-bottom:8px}.membership-roster-table td{vertical-align:middle}.member-modal-panel{width:min(1100px,100%);max-height:calc(100vh - 36px);display:flex;flex-direction:column}.member-modal-form{display:flex;min-height:0;flex:1;flex-direction:column}.member-modal-form>header{flex:0 0 auto}.member-modal-body{display:flex;min-height:0;flex:1;flex-direction:column;gap:16px;padding:18px 24px}.member-scope-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #fed7aa;border-radius:14px;background:#fffaf2}.member-scope-banner strong{color:#9a3412}.member-scope-banner span{color:#64748b;font-size:12px;text-align:right}.member-scope-banner.compact{display:grid;justify-content:stretch;gap:3px}.member-scope-banner.compact span{text-align:left}.member-modal-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr)) minmax(240px,1.6fr);gap:12px}.member-modal-candidate-list{min-height:180px;max-height:none;flex:1;overflow:auto;padding:3px 6px 3px 3px}.member-modal-empty{grid-column:1/-1;display:grid;place-items:center;min-height:190px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc}.member-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 24px;border-top:1px solid #e5e7eb;background:#fff}.member-selection-tools{display:flex;align-items:center;gap:12px}.member-selection-tools span{color:#64748b}.member-selection-tools strong{color:#172033}.member-modal-footer-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.candidate-name{min-width:0}.candidate-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.candidate-row input:checked+.candidate-avatar{background:#991b1b;color:#fff}.btn:disabled{cursor:not-allowed;opacity:.55}
@media(max-width:980px){.membership-overview-grid{grid-template-columns:1fr}.membership-command-card,.membership-period-control{align-items:stretch;flex-direction:column}.membership-command-actions{justify-content:flex-start}.membership-scope-note{padding:12px 0 0;border-top:1px solid #e5e7eb;border-left:0}.member-modal-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.roster-title-actions{align-items:stretch;flex-direction:column}.roster-search-field{min-width:240px}.roster-count-group{padding-bottom:0}}
@media(max-width:700px){.ui-modal{padding:8px}.member-modal-panel{max-height:calc(100vh - 16px);border-radius:16px}.member-modal-body{padding:14px}.member-modal-filter-grid{grid-template-columns:1fr}.member-scope-banner{align-items:flex-start;flex-direction:column}.member-scope-banner span{text-align:left}.member-modal-footer{align-items:stretch;flex-direction:column;padding:12px 14px}.member-modal-footer-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.member-modal-footer-actions .btn{width:100%}.roster-title-actions{width:100%}.roster-search-field{min-width:0}.candidate-row{grid-template-columns:auto 34px minmax(0,1fr)}.candidate-row em,.candidate-row b{grid-column:3}.membership-command-actions .btn{width:100%}}


/* STEP 46Q6: configurable Teacher's Grading Sheet printing */
.teacher-print-toolbar {
    align-items: end;
    flex-wrap: wrap;
}
.teacher-print-setting {
    display: grid;
    gap: 5px;
    min-width: 145px;
}
.teacher-print-setting label {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.teacher-print-setting .compact-control {
    min-height: 42px;
    padding: 0 34px 0 11px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
}

/* Let report content determine its own height; do not push signatures to a second sheet. */
@media print {
    .teacher-grading-normalized.print-standard,
    .teacher-grading-normalized.print-dense {
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
    }
    .teacher-grading-normalized.print-standard .ssa-signature-grid,
    .teacher-grading-normalized.print-dense .ssa-signature-grid {
        margin-top: 8px !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 980px) {
    .teacher-print-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .teacher-print-toolbar .print-format-note,
    .teacher-print-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 620px) {
    .teacher-print-toolbar {
        grid-template-columns: 1fr;
    }
}

/* STEP 46Q8: readable grading-sheet preview and proper signing room. */
.teacher-grading-normalized .ssa-signature-grid > div{
    border-top:0;
    padding-top:0;
}
.teacher-grading-normalized .ssa-signature-space{
    display:block;
    height:46px;
    margin-bottom:4px;
    border-bottom:1px solid #111827;
}
.teacher-grading-normalized.print-roomy .dynamic-component-sheet tbody td,
.teacher-grading-normalized.print-roomy .ssa-normalized-sheet tbody td{
    line-height:1.12;
}
@media print{
    .teacher-grading-normalized .dynamic-component-sheet thead,
    .teacher-grading-normalized .ssa-normalized-sheet thead{
        display:table-header-group;
    }
    .teacher-grading-normalized .dynamic-component-sheet tbody tr,
    .teacher-grading-normalized .ssa-normalized-sheet tbody tr{
        break-inside:avoid;
        page-break-inside:avoid;
    }
    .teacher-grading-normalized .ssa-signature-grid{
        break-inside:avoid;
        page-break-inside:avoid;
    }
}
