.hidden { display: none !important; }

body {
    background: #eef4ff;
    color: #10203a;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.logo-area { display: flex; align-items: center; gap: 0.75rem; }
.logo-area h2 { margin: 0; font-size: 1.18rem; color: #1d4ed8; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #475569;
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
}
.nav-link:hover { background: rgba(37, 99, 235, 0.08); color: #1d4ed8; }

.progress-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 0.85rem;
    padding: 0.85rem;
    align-items: start;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.controls-panel {
    grid-column: 1;
    padding: 0.95rem;
    position: sticky;
    top: 68px;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
}

.controls-hero {
    display: grid;
    gap: 0.7rem;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.92));
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.panel-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #2563eb;
    font-weight: 800;
}

.controls-hero h1 {
    margin: 0;
    font-size: 1.38rem;
    line-height: 1.15;
    color: #0f172a;
}

.panel-copy {
    margin: 0.55rem 0 0;
    color: #475569;
    line-height: 1.45;
    font-size: 0.88rem;
}

.hero-chips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.82rem;
}

.controls-panel h3 {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.form-group {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.form-group label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 12px;
    padding: 0.78rem 0.88rem;
    background: #fff;
    color: #10203a;
    font: inherit;
}

.form-group textarea { resize: vertical; }

.exam-checklist {
    display: grid;
    gap: 0.5rem;
    max-height: 220px;
    overflow: auto;
    padding: 0.3rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: #f8fbff;
}

.exam-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    background: #fff;
}

.empty-hint {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.controls-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.selection-brief {
    margin: 1rem 0;
    padding: 0.95rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.selection-brief-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.selection-brief-head h3 {
    margin: 0;
}

.selection-pulse {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.selection-card {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 0.28rem;
}

.selection-card span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 700;
}

.selection-card strong {
    color: #0f172a;
    font-size: 0.94rem;
}

.exam-tools {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.btn-secondary { background: #e2e8f0; color: #10203a; }
.btn-chip { padding: 0.48rem 0.78rem; background: #eef2ff; color: #334155; font-size: 0.82rem; }

.controls-panel .btn,
.controls-panel button.btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(191, 219, 254, 0.38) !important;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24) !important;
}

.controls-panel .btn:hover:not(:disabled),
.controls-panel button.btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.controls-panel .btn-chip,
.controls-panel button.btn-chip {
    padding: 0.48rem 0.78rem;
    font-size: 0.82rem;
}

.controls-panel .btn:disabled,
.controls-panel button.btn:disabled {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    border-color: #93c5fd !important;
    color: #1e3a8a !important;
    -webkit-text-fill-color: #1e3a8a !important;
    box-shadow: none !important;
    opacity: 0.86 !important;
    cursor: not-allowed;
    transform: none !important;
}

.controls-panel input:disabled,
.controls-panel select:disabled,
.controls-panel textarea:disabled {
    background: #f8fafc !important;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 1 !important;
}

.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-illustration {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.2));
    color: #2563eb;
    font-size: 2rem;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.empty-state h2 { margin: 0 0 0.75rem; }
.empty-state p { margin: 0; color: #64748b; }

.progress-illustration {
    background: linear-gradient(135deg, #ecfeff, #dbeafe);
    color: #0f766e;
}

.batch-progress {
    width: min(560px, 100%);
    height: 14px;
    margin: 1.35rem auto 0.55rem;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(14, 116, 144, 0.18);
    background: #e2e8f0;
    box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.12);
}

.batch-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #06b6d4, #2563eb);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.35);
    transition: width 0.25s ease;
}

.batch-progress-count {
    display: block;
    color: #0f172a;
    letter-spacing: 0.03em;
}

.report-sheet {
    --report-accent: #2563eb;
    --report-accent-soft: #dbeafe;
    --report-surface: #ffffff;
    --report-surface-alt: #f8fbff;
    --report-border: rgba(148, 163, 184, 0.18);
    --report-radius: 28px;
    background: #fff;
    width: min(100%, 210mm);
    margin: 0 auto 1rem;
    box-sizing: border-box;
    border-radius: var(--report-radius);
    padding: 0.75rem 0.85rem 1rem;
    border: 1px solid var(--report-border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.report-host {
    grid-column: 2;
    min-width: 0;
    width: 100%;
    align-self: start;
    display: grid;
    align-content: start;
    gap: 1rem;
    overflow: visible;
    padding-right: 0;
}

.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.08);
    border-radius: 999px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.28);
    border-radius: 999px;
}

.report-host::-webkit-scrollbar {
    width: 10px;
}

.report-host::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
}

.report-host::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
}

.school-header {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 0.65rem;
    align-items: center;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid #dbeafe;
}

.school-header-logo {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.school-header-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.school-header-copy h1 {
    margin: 0;
    font-size: 1.42rem;
    color: #0f172a;
    line-height: 1.08;
}

.school-header-copy p {
    margin: 0.14rem 0 0;
    color: #475569;
    font-size: 0.85rem;
}

.subline {
    color: #1d4ed8 !important;
    font-weight: 700;
}

.report-intelligence-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.65rem;
}

.intelligence-card {
    padding: 1rem 1rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--report-border);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 34%),
        #f8fbff;
    display: grid;
    gap: 0.28rem;
}

.intelligence-card span {
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.intelligence-card strong {
    font-size: 1.55rem;
    line-height: 1;
    color: #0f172a;
}

.intelligence-card small {
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.45;
}

.report-narrative-strip {
    margin-top: 0.6rem;
    padding: 0.85rem 0.95rem;
    border-radius: 20px;
    border: 1px solid var(--report-border);
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
}

.narrative-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eef6ff;
    color: var(--report-accent);
    font-size: 1.2rem;
}

.narrative-label {
    display: inline-block;
    margin-bottom: 0.25rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--report-accent);
}

.report-narrative-strip p {
    margin: 0;
    color: #334155;
    line-height: 1.6;
}

.report-section {
    margin-top: 0.7rem;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.section-title-row h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.profile-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
}

.photo-card,
.info-card,
.exam-card,
.remarks-box {
    border: 1px solid var(--report-border);
    border-radius: 18px;
    background: var(--report-surface);
}

.photo-card {
    padding: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-card img {
    width: 100%;
    max-width: 160px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.info-card { padding: 0.85rem; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
}

.info-grid div {
    display: grid;
    gap: 0.2rem;
}

.info-grid span {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.info-grid strong { color: #0f172a; }

.attendance-pill {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: var(--report-accent-soft);
    color: var(--report-accent);
    font-weight: 800;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.report-table th,
.report-table td {
    border: 1px solid rgba(148, 163, 184, 0.24);
    padding: 0.5rem 0.45rem;
    text-align: center;
}

.report-table tbody tr:nth-child(even) td {
    background: rgba(148, 163, 184, 0.035);
}

.report-table th {
    background: var(--report-accent-soft);
    color: var(--report-accent);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-table th.subject-col-subject,
.report-table td:first-child {
    background-image: linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent);
}

.report-table th.subject-col-score {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.14));
}

.report-table th.subject-col-average {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(219, 39, 119, 0.1));
}

.report-table th.subject-col-status {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(34, 197, 94, 0.1));
}

.report-table tbody tr.subject-row-fail td {
    background: #fff1f2;
    border-color: rgba(244, 63, 94, 0.35);
}

.report-table tbody tr.subject-row-fail td:first-child {
    box-shadow: inset 5px 0 0 #e11d48;
}

.report-table tbody tr.subject-row-strong td {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.28);
}

.report-table tbody tr.subject-row-strong td:first-child {
    box-shadow: inset 5px 0 0 #10b981;
}

.score-cell-fail {
    color: #be123c;
    font-weight: 900;
}

.score-cell-strong {
    color: #047857;
    font-weight: 900;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
}

.status-pass {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.status-fail {
    color: #be123c;
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(244, 63, 94, 0.24);
}

.attendance-table td:first-child,
.report-table th:first-child {
    text-align: left;
    font-weight: 700;
}

.exam-sections {
    display: grid;
    gap: 1rem;
}

.batch-stack {
    display: grid;
    gap: 1.4rem;
}

.batch-stack.hidden {
    display: none !important;
}

.exam-card {
    padding: 0.85rem;
}

.exam-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.exam-kpi {
    border-radius: 14px;
    background: var(--report-accent-soft);
    padding: 0.65rem;
}

.exam-kpi span {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exam-kpi strong {
    display: block;
    margin-top: 0.35rem;
    color: #0f172a;
}

.rank-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.rank-strip div {
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 16px;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
}

.rank-strip span,
.rank-strip small {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rank-strip strong {
    display: block;
    margin: 0.24rem 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.chart-wrap {
    height: 220px;
    margin-top: 0.75rem;
}

.remarks-box {
    padding: 0.9rem;
    min-height: 90px;
    line-height: 1.65;
    color: #334155;
}

.signature-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.signature-box {
    padding-top: 2.8rem;
    text-align: center;
    border-top: 2px solid #94a3b8;
    font-weight: 700;
    color: #0f172a;
}

.report-sheet.template-academic-classic {
    --report-accent: #2563eb;
    --report-accent-soft: #dbeafe;
    --report-surface: #fdfefe;
}

.report-sheet.template-executive-brief {
    --report-accent: #0f766e;
    --report-accent-soft: #d9fbf4;
    --report-surface: #fcfffe;
    --report-radius: 20px;
}

.report-sheet.template-executive-brief .school-header {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.report-sheet.template-executive-brief .school-header-logo {
    order: 2;
    width: 92px;
    height: 92px;
    border-radius: 16px;
}

.report-sheet.template-executive-brief .report-section {
    padding-top: 1rem;
    border-top: 1px solid var(--report-border);
}

.report-sheet.template-parent-journal {
    --report-accent: #db2777;
    --report-accent-soft: #fce7f3;
    --report-surface: #fffafc;
    background: linear-gradient(180deg, #fffdfd, #fff7fb);
}

.report-sheet.template-parent-journal .profile-grid,
.report-sheet.template-parent-journal .signature-row {
    grid-template-columns: 1fr;
}

.report-sheet.template-parent-journal .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-sheet.template-future-lab {
    --report-accent: #7c3aed;
    --report-accent-soft: #f3e8ff;
    --report-surface: #faf7ff;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.1), transparent 24%),
        linear-gradient(180deg, #ffffff, #faf7ff);
}

.report-sheet.template-future-lab .exam-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-sheet.template-future-lab .exam-card {
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.08);
}

.report-sheet.template-heritage-ledger {
    --report-accent: #92400e;
    --report-accent-soft: #ffedd5;
    --report-surface: #fffdf8;
    border-style: double;
    border-width: 3px;
}

.report-sheet.template-heritage-ledger .school-header {
    border-bottom-width: 2px;
    border-bottom-style: dashed;
}

.report-sheet.template-heritage-ledger .report-table th,
.report-sheet.template-heritage-ledger .report-table td {
    text-align: left;
}

.report-sheet.template-portfolio-board {
    --report-accent: #1d4ed8;
    --report-accent-soft: #e0ecff;
    --report-surface: #fbfdff;
}

.report-sheet.template-portfolio-board .exam-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-sheet.template-portfolio-board .exam-kpi {
    min-height: 88px;
}

.report-sheet.template-mentor-notebook {
    --report-accent: #059669;
    --report-accent-soft: #dcfce7;
    --report-surface: #fcfffc;
    background-image: linear-gradient(to bottom, rgba(5, 150, 105, 0.04) 1px, transparent 1px);
    background-size: 100% 42px;
}

.report-sheet.template-mentor-notebook .school-header-copy h1,
.report-sheet.template-mentor-notebook .section-title-row h2 {
    letter-spacing: -0.03em;
}

.report-sheet.template-studio-profile {
    --report-accent: #ea580c;
    --report-accent-soft: #ffedd5;
    --report-surface: #fffaf5;
}

.report-sheet.template-studio-profile .school-header {
    grid-template-columns: 1fr;
    text-align: center;
}

.report-sheet.template-studio-profile .school-header-logo {
    margin: 0 auto;
}

.report-sheet.template-studio-profile .profile-grid {
    grid-template-columns: 220px 1fr;
}

.report-sheet.template-scholar-certificate {
    --report-accent: #ca8a04;
    --report-accent-soft: #fef3c7;
    --report-surface: #fffdf5;
    border-width: 8px;
    box-shadow: inset 0 0 0 2px rgba(202, 138, 4, 0.18), 0 24px 60px rgba(15, 23, 42, 0.08);
}

.report-sheet.template-scholar-certificate .school-header-copy {
    text-align: center;
}

.report-sheet.template-scholar-certificate .school-header {
    grid-template-columns: 1fr;
}

.report-sheet.template-scholar-certificate .school-header-logo {
    margin: 0 auto;
}

.report-sheet.template-insight-grid {
    --report-accent: #0891b2;
    --report-accent-soft: #cffafe;
    --report-surface: #f8feff;
    width: min(100%, 297mm);
}

.report-sheet.template-insight-grid .profile-grid,
.report-sheet.template-insight-grid .exam-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-sheet.template-insight-grid .exam-sections {
    display: block;
}

.report-sheet.template-insight-grid .exam-matrix-card {
    grid-column: 1 / -1;
    width: 100%;
}

.report-sheet.template-insight-grid .remarks-box,
.report-sheet.template-insight-grid .attendance-table {
    grid-column: span 2;
}

.report-sheet.template-with-charts {
    --report-accent: #2563eb;
    --report-accent-soft: #dbeafe;
    --report-surface: #fbfdff;
    width: min(100%, 297mm);
}

.report-sheet.template-with-charts .report-section-profile,
.report-sheet.template-with-charts .report-section-attendance,
.report-sheet.template-with-charts .report-section-remarks,
.report-sheet.template-with-charts .intelligence-card-attendance {
    display: none;
}

.report-sheet.template-with-charts .report-intelligence-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-sheet.template-with-charts .report-section-exams {
    margin-top: 1rem;
}

.with-charts-dashboard,
.with-charts-static {
    display: grid;
    gap: 0.85rem;
}

.with-charts-panel,
.with-charts-exam-card {
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    background: #ffffff;
    padding: 0.85rem;
}

.with-charts-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.with-charts-kpis div {
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid rgba(37, 99, 235, 0.12);
    padding: 0.7rem;
    min-width: 0;
}

.with-charts-kpis span,
.with-charts-bar-row small {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.with-charts-kpis strong {
    display: block;
    margin-top: 0.28rem;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.chart-wrap-large {
    height: 280px;
}

.with-charts-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.with-charts-bars-list {
    display: grid;
    gap: 0.55rem;
}

.with-charts-bars-list.compact {
    gap: 0.42rem;
}

.with-charts-bar-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.9fr) minmax(180px, 2fr) minmax(90px, 0.75fr);
    gap: 0.6rem;
    align-items: center;
}

.with-charts-bar-row strong {
    color: #0f172a;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.with-charts-bars {
    position: relative;
    display: grid;
    gap: 0.22rem;
}

.with-charts-bars::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: #eef2ff;
}

.with-charts-bar {
    position: relative;
    z-index: 1;
    height: 0.52rem;
    min-width: 3px;
    border-radius: 99px;
}

.with-charts-bar-student {
    background: #2563eb;
}

.with-charts-bar-average {
    background: #7dd3fc;
}

.with-charts-empty {
    color: #64748b;
}

.exam-matrix-card {
    overflow-x: auto;
    padding: 0.55rem;
}

.exam-matrix-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.exam-matrix-table th,
.exam-matrix-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.exam-matrix-table td strong {
    color: #0f172a;
}

.matrix-subtext {
    color: #64748b;
    font-size: 0.76rem;
}

.matrix-summary {
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.exam-matrix-table td {
    vertical-align: top;
}

.matrix-cell {
    display: grid;
    gap: 0.12rem;
    min-width: 88px;
}

.matrix-avg {
    color: #64748b;
    font-size: 0.74rem;
}

.batch-meta {
    margin: 0.65rem 0 1rem;
    color: #475569;
    font-size: 0.9rem;
}

.batch-stack .profile-grid {
    margin-bottom: 1rem;
}

.pdf-export-root {
    width: 210mm;
    max-width: 297mm;
    margin: 0 auto;
    background: #ffffff;
}

.pdf-export-root .report-sheet {
    width: calc(100% - 10mm);
    max-width: none;
    margin: 0 auto 3mm;
    padding: 5mm;
    box-shadow: none;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
}

.pdf-export-root .report-section,
.pdf-export-root .exam-card,
.pdf-export-root .remarks-box,
.pdf-export-root .photo-card,
.pdf-export-root .info-card {
    break-inside: avoid;
    page-break-inside: avoid;
}

.pdf-export-root .school-header {
    grid-template-columns: 18mm 1fr;
    gap: 3mm;
    padding-bottom: 2.5mm;
}

.pdf-export-root .school-header-copy h1 {
    font-size: 17pt;
}

.pdf-export-root .report-intelligence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2mm;
    margin-top: 2.5mm;
}

.pdf-export-root .report-narrative-strip,
.pdf-export-root .report-section {
    margin-top: 2.5mm;
}

.pdf-export-root .exam-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5mm;
    margin-bottom: 3mm;
}

.pdf-export-root .report-table {
    font-size: 9px;
}

.pdf-export-root .report-table th,
.pdf-export-root .report-table td {
    padding: 1.2mm 1mm;
}

.pdf-export-root .exam-matrix-table {
    table-layout: fixed;
    font-size: 8.5px;
}

.pdf-export-root .matrix-cell {
    min-width: 0;
}

.pdf-export-root .matrix-avg,
.pdf-export-root .matrix-subtext {
    font-size: 7.5px;
}

.pdf-export-root .chart-wrap {
    height: 48mm;
    margin-top: 3mm;
}

body.print-progress-report .top-nav,
body.print-progress-report .controls-panel,
body.print-progress-report #pr-empty {
    display: none !important;
}

body.print-progress-report .progress-layout {
    display: block;
    padding: 0;
}

body.print-progress-report .report-host {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

body.print-progress-report .report-host > :not(#pr-report):not(#pr-batch-stack) {
    display: none !important;
}

body.print-progress-report #pr-report,
body.print-progress-report #pr-batch-stack {
    display: block !important;
}

body.print-progress-report:has(.report-sheet.template-insight-grid:not(.hidden)),
body.print-progress-report:has(.report-sheet.template-with-charts:not(.hidden)) {
    --pr-print-orientation: landscape;
}

@media (max-width: 1100px) {
    .report-intelligence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-sheet.template-future-lab .exam-sections,
    .report-sheet.template-insight-grid .profile-grid,
    .report-sheet.template-insight-grid .exam-sections,
    .report-sheet.template-with-charts .with-charts-card-grid,
    .report-sheet.template-parent-journal .info-grid,
    .report-sheet.template-studio-profile .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .progress-layout {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        position: static;
    }

    .report-host {
        grid-column: 1;
    }

    .selection-grid,
    .report-intelligence-grid,
    .profile-grid,
    .school-header,
    .signature-row,
    .exam-summary,
    .with-charts-kpis,
    .with-charts-bar-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 6mm;
    }

    @page wide-progress-report {
        size: A4 landscape;
        margin: 5mm;
    }

    body {
        background: #fff;
        font-size: 11px;
    }

    .top-nav,
    .controls-panel,
    #pr-empty {
        display: none !important;
    }

    .progress-layout {
        display: block;
        padding: 0;
    }

    .report-host {
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    .report-sheet {
        box-shadow: none;
        border: none;
        border-radius: 0;
        width: 198mm;
        max-width: 198mm;
        margin: 0 auto 3mm;
        padding: 4mm;
    }

    .report-sheet.template-insight-grid {
        page: wide-progress-report;
        width: 287mm;
        max-width: 287mm;
        padding: 4mm;
    }

    .report-sheet.template-with-charts {
        page: wide-progress-report;
        width: 287mm;
        max-width: 287mm;
        padding: 4mm;
    }

    .report-section,
    .exam-card,
    .remarks-box,
    .photo-card,
    .info-card {
        break-inside: avoid;
    }

    .school-header {
        grid-template-columns: 18mm 1fr;
        gap: 3mm;
        padding-bottom: 2.5mm;
    }

    .school-header-logo {
        width: 18mm;
        height: 18mm;
        border-radius: 4mm;
    }

    .school-header-copy h1 {
        font-size: 17pt;
    }

    .school-header-copy p {
        font-size: 8.5pt;
        margin-top: 1mm;
    }

    .report-intelligence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2mm;
        margin-top: 2.5mm;
    }

    .report-narrative-strip,
    .report-section {
        margin-top: 2.5mm;
    }

    .exam-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5mm;
        margin-bottom: 3mm;
    }

    .report-table {
        font-size: 9px;
    }

    .report-table th,
    .report-table td {
        padding: 1.2mm 1mm;
    }

    .report-sheet.template-insight-grid .exam-sections {
        display: block;
    }

    .report-sheet.template-with-charts .report-intelligence-grid,
    .with-charts-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .with-charts-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-matrix-table {
        table-layout: fixed;
        font-size: 8.3px;
    }

    .matrix-cell {
        min-width: 0;
        gap: 0.5mm;
    }

    .matrix-avg,
    .matrix-subtext {
        font-size: 7.2px;
    }

    .chart-wrap {
        height: 48mm;
        margin-top: 3mm;
    }
}
