.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    flex: 0 0 auto;
    background: white;
    padding: 2px;
}

.loginbrand .brand img {
    width: 82px;
    height: 82px;
}

.subject {
    padding: 0;
    overflow: hidden;
}

.subject-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center 22%;
    border-bottom: 1px solid var(--line);
    background: #eef1f8;
}
.subject-special-cover { display:grid; place-items:center; background:linear-gradient(135deg,#15164b,#283275); }
.subject-special-cover img { width:82px; height:82px; object-fit:contain; filter:drop-shadow(0 8px 18px rgba(0,0,0,.25)); }

.subject-body {
    padding: 18px 20px 20px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
}

.subject-body .btn { margin-top: auto; }
.subject-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.study-year { margin-bottom: 38px; }
.year-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.year-heading h2, .year-heading p { margin-bottom: 0; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field { margin-bottom: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.access-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 20px 0 12px; }
.access-summary div { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #f7f8fb; }
.access-summary span, .access-summary strong { display: block; }
.access-summary span { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.reset-access { margin-bottom: 10px; }
.uppercase { text-transform: uppercase; }
.field-help { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.assignment-year-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 18px; }
.assignment-year-head .label { margin: 0; }
.question-count-options { display: flex; gap: 8px; flex-wrap: wrap; }
.question-count-options label { cursor: pointer; }
.question-count-options input { position: absolute; opacity: 0; pointer-events: none; }
.question-count-options span { display: block; min-width: 100px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-weight: 600; background: white; }
.question-count-options input:checked + span { color: white; border-color: var(--navy); background: var(--navy); }
.question-count-options input:focus-visible + span { outline: 3px solid #bf8600; outline-offset: 3px; }
.subject-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assignment-check { align-items: flex-start; min-width: 0; }
.assignment-check span { min-width: 0; }
.assignment-check strong, .assignment-check small { display: block; }
.assignment-check small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.subject-search { display:grid; grid-template-columns:minmax(160px,220px) minmax(260px,1fr) auto; gap:16px; align-items:center; margin:22px 0 26px; padding:18px; border:1px solid #cad4e6; border-left:5px solid var(--yellow); border-radius:8px; background:#f6f8fc; }
.subject-search label span,.subject-search label small { display:block; }
.subject-search label span { font-weight:700; color:var(--navy); }
.subject-search label small { margin-top:3px; color:var(--muted); }
.subject-search-control { position:relative; display:flex; align-items:center; }
.subject-search-control>span { position:absolute; left:14px; color:#59657d; font-size:22px; pointer-events:none; }
.subject-search-control input[type=search] { width:100%; min-height:48px; padding:12px 76px 12px 44px; border:2px solid #8c9ab5; border-radius:8px; background:white; color:var(--ink); }
.subject-search-control input[type=search]:focus { outline:3px solid rgba(247,201,40,.35); border-color:var(--navy); }
.subject-search-control button { position:absolute; right:7px; padding:7px 9px; border:0; border-radius:5px; background:#e8ecf5; color:var(--navy); cursor:pointer; }
.subject-search output { min-width:130px; color:var(--muted); font-size:13px; }
.year-assignment.search-empty { display:none; }

.phone-field { display:grid; grid-template-columns:auto 66px 44px minmax(125px,1fr); gap:8px; align-items:center; }
.phone-country,.phone-nine { min-height:46px; display:grid; place-items:center; border:1px solid #c3cada; border-radius:6px; background:#eef1f7; color:var(--navy); font-weight:700; }
.phone-country { padding:0 11px; }
.phone-field input { min-width:0; text-align:center; }

.profile-photo-panel { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,420px); gap:28px; align-items:center; }
.profile-photo-preview { display:flex; align-items:center; gap:20px; }
.profile-photo-preview img,.profile-photo-admin-grid>img { width:112px; height:112px; border-radius:50%; object-fit:cover; border:4px solid white; box-shadow:0 0 0 2px var(--yellow),0 10px 26px rgba(21,22,75,.16); background:#eef1f8; flex:0 0 auto; }
.profile-photo-preview h2,.profile-photo-preview p { margin-bottom:6px; }
.profile-photo-form { display:grid; gap:9px; padding:18px; border-radius:8px; background:#f6f8fc; }
.profile-photo-form small { color:var(--muted); }
.profile-photo-admin-grid { display:grid; grid-template-columns:112px minmax(0,1fr); gap:22px; align-items:center; margin-top:18px; }

.profile-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 0;
}

.profile-data div { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.profile-data dt { font-size: 12px; color: var(--muted); }
.profile-data dd { margin: 5px 0 0; font-weight: 600; }
.document-center { text-align: center; }
.profile-logo { width: 100px; height: 100px; border-radius: 50%; object-fit: contain; margin-bottom: 15px; }
.document-center p { margin-left: auto; margin-right: auto; }
.document-center .actions { justify-content: center; }

.document-preview { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.document-preview > div { display: flex; align-items: center; gap: 20px; }
.document-preview img { width: 86px; height: 86px; border-radius: 50%; object-fit: contain; }
.document-preview h2, .document-preview p { margin-bottom: 5px; }
input[type=number], input[type=email] { width: 100%; border: 1px solid #bfc7d7; border-radius: 6px; padding: 12px; background: white; color: var(--ink); }
.declaration-logo { display: block; object-fit: contain; background: transparent; }
.signature-image-wrap { height: 84px; display: flex; align-items: flex-end; justify-content: center; }
.signature-image { display: block; max-width: 220px; max-height: 78px; object-fit: contain; }
.declaration-validation { display: flex; align-items: center; gap: 15px; margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
#declaration-qrcode { width: 94px; height: 94px; flex: 0 0 94px; }
#declaration-qrcode svg { display: block; width: 100%; height: 100%; }
.declaration-validation strong, .declaration-validation span, .declaration-validation small { display: block; }
.declaration-validation span { margin-top: 4px; font-family: Consolas, monospace; font-size: 12px; }
.declaration-validation small { max-width: 560px; margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); }
.declaration-validation > div:last-child { min-width: 0; display: grid; gap: 4px; }
.validation-page { max-width: 760px; min-height: 100vh; padding: 48px 20px; }
.validation-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.validation-brand img { width: 72px; height: 72px; object-fit: contain; }
.validation-brand strong, .validation-brand span { display: block; }
.validation-brand strong { font-size: 20px; }
.validation-brand span { margin-top: 3px; color: var(--muted); }
.validation-result { padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 32px #15164b14; }
.validation-result h1 { margin-top: 18px; }
.validation-status { display: inline-block; padding: 7px 10px; border-radius: 5px; font-size: 13px; font-weight: 700; }
.validation-status.valid { color: #176438; background: #e7f3ed; }
.validation-status.invalid { color: #8b1f1f; background: #fff0f0; }
.validation-result dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 24px 0; }
.validation-result dl div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.validation-result dt { color: var(--muted); font-size: 12px; }
.validation-result dd { margin: 5px 0 0; font-weight: 600; }
.validation-code { overflow-wrap: anywhere; font-family: Consolas, monospace; }

@media (max-width: 800px) {
    .document-preview, .document-preview > div { align-items: flex-start; flex-direction: column; }
    .document-preview .btn { width: 100%; }
    .subject-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .section-heading, .student-document-card summary { align-items: flex-start; flex-direction: column; }
    .student-document-body { grid-template-columns: 1fr; gap: 8px; }
    .form-grid, .access-grid, .access-summary, .profile-data, .validation-result dl { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .year-heading { align-items: flex-start; flex-direction: column; }
    .subject-image { height: 180px; }
    .assignment-year-head { align-items: flex-start; flex-direction: column; }
    .subject-check-grid { grid-template-columns: 1fr; }
    .subject-search { grid-template-columns:1fr; }
    .subject-search output { min-width:0; }
    .phone-field { grid-template-columns:auto 60px 42px minmax(100px,1fr); }
    .profile-photo-panel { grid-template-columns:1fr; }
    .profile-photo-preview { align-items:flex-start; }
    .profile-photo-admin-grid { grid-template-columns:1fr; }
    .calendar-grid { grid-template-columns:1fr; }
    .declaration-validation { align-items: flex-start; }
    .validation-page { padding-top: 24px; }
    .validation-result { padding: 22px; }
}

@media (max-width: 480px) {
    .validation-page { padding: 16px; }
    .validation-brand { gap: 10px; margin-bottom: 16px; }
    .validation-brand img { width: 48px; height: 48px; }
    .validation-brand strong { font-size: 16px; line-height: 1.15; }
    .validation-brand span { font-size: 13px; }
    .validation-result { padding: 18px; border-radius: 6px; }
    .validation-result h1 { font-size: 22px; overflow-wrap: anywhere; }
    .validation-result dd { overflow-wrap: anywhere; }
}

@media print {
    .workspace > header { display: none !important; }
    .declaration-page > .declaration-head { display: block !important; }
    .signature-grid, .declaration-validation { break-inside: avoid; }
}

/* Shared brand geometry keeps the logo aligned in the sidebar, login and documents. */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    display: block;
    flex: 0 0 auto;
}

.brand span {
    min-width: 0;
}

aside > .brand {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
}

aside > .brand img {
    width: 78px;
    height: 78px;
}

.loginbrand .brand {
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.loginbrand .brand img {
    width: 108px;
    height: 108px;
}

.welcome-visual {
    min-width: 180px;
    min-height: 170px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    border-left: 1px solid #65658c;
    color: var(--yellow);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.welcome-visual img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    opacity: .92;
}

.welcome-visual { display: none; }
.journey-dashboard { background: linear-gradient(135deg,#15164b 0%,#252762 100%); color: white; border-radius: 12px; padding: 30px; margin-bottom: 28px; box-shadow: 0 16px 34px rgba(21,22,75,.16); }
.journey-head { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; }
.journey-head h2 { margin:6px 0 8px; font-size:25px; }
.journey-head p { color:#d7d9ef; margin:0; }
.eyebrow { color:#ffd129; font-size:12px; font-weight:700; letter-spacing:1.4px; }
.journey-total { text-align:right; min-width:150px; }
.journey-total strong { display:block; color:#ffd129; font-size:36px; line-height:1; }
.journey-total span { color:#d7d9ef; font-size:13px; }
.journey-track { height:8px; background:#44477e; border-radius:8px; overflow:hidden; margin:28px 0 20px; }
.journey-track span { display:block; height:100%; background:#ffd129; border-radius:8px; transition:width .3s ease; }
.journey-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.journey-step { display:flex; gap:10px; align-items:center; min-width:0; color:#d7d9ef; }
.journey-number { width:30px; height:30px; flex:0 0 30px; border:1px solid #6b6d98; border-radius:50%; display:grid; place-items:center; font-weight:700; }
.journey-step.done { color:white; }
.journey-step.done .journey-number { color:#15164b; background:#ffd129; border-color:#ffd129; }
.journey-step strong,.journey-step small { display:block; }
.journey-step strong { font-size:14px; }
.journey-step small { font-size:12px; margin-top:3px; }
.journey-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:26px; }
.calendar-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.calendar-grid>div { padding:16px; border:1px solid var(--line); border-radius:8px; background:#f6f8fc; }
.calendar-grid small,.calendar-grid strong { display:block; }
.calendar-grid small { color:var(--muted); font-size:12px; }
.calendar-grid strong { margin-top:5px; color:var(--navy); }
.course-calendar .feedback { margin:12px 0 0; }
.whatsapp { background:#20a464 !important; border-color:#20a464 !important; color:white !important; }
.completion-notice { border:1px solid #9ed9b8; background:#eaf8f0; color:#174d31; border-radius:10px; padding:22px 24px; margin-bottom:28px; }
.completion-notice strong { font-size:20px; }
.completion-notice p { margin:8px 0 16px; }
.document-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.danger { color:#9a2b2b; border-color:#e4b3b3; }
.document-status-list { margin:10px 0 18px; padding-left:20px; }
.document-status-list li { margin:5px 0; color:var(--muted); }
.document-status-list { list-style:none; padding-left:0; }
.document-status-list li { padding:10px 12px 10px 34px; background:#f5f7fb; border:1px solid #e1e5ef; border-radius:7px; position:relative; }
.document-status-list li::before { content:'✓'; position:absolute; left:12px; color:#1b9660; font-weight:800; }
.document-status-list.pending-list li::before { content:'!'; color:#b27b00; }
.document-status-list.pending-list li { background:#fff9e8; border-color:#f1df9c; }
.status-heading { display:flex; align-items:center; gap:8px; }
.status-heading::before { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; color:white; font-size:12px; animation:status-pulse 1.8s ease-in-out infinite; }
.status-pending::before { content:'!'; background:#d39b18; }
.status-complete::before { content:'✓'; background:#1b9660; }
@keyframes status-pulse { 0%,100% { transform:scale(1); box-shadow:0 0 0 0 rgba(211,155,24,.18); } 50% { transform:scale(1.08); box-shadow:0 0 0 7px rgba(211,155,24,0); } }
.section-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.student-document-card { border:1px solid var(--line); border-radius:8px; margin-top:12px; overflow:hidden; background:#fbfcfe; }
.student-document-card summary { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 18px; cursor:pointer; list-style:none; }
.student-document-card summary::-webkit-details-marker { display:none; }
.student-document-card summary > span:first-child { display:grid; gap:4px; }
.student-document-card summary small { color:var(--muted); }
.document-counter { padding:6px 9px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.document-counter.attention { background:#fff3cd; color:#8b6500; }
.document-counter.complete { background:#e3f5eb; color:#177a4d; }
.student-document-body { display:grid; grid-template-columns:1fr 1fr; gap:22px; padding:18px; border-top:1px solid var(--line); background:white; }
.student-document-body h3 { font-size:14px; }
.upload-form { display:grid; gap:10px; max-width:620px; }
.account-avatar { width:42px; height:42px; border-radius:50%; overflow:hidden; border:2px solid var(--yellow); background:#eef1f8; display:block; flex:0 0 auto; }
.account-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.upload-form .label { margin-top:7px; }
.file-list { list-style:none; padding:0; display:grid; gap:8px; }
.file-list li { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 12px; background:#f5f7fb; border:1px solid var(--line); border-radius:6px; }
.tag.red { background:#fde8e8; color:#a53030; }
.results-table .result-row { transition:background .2s, transform .2s; }
.results-table .result-approved { background:rgba(26,151,94,.045); }
.results-table .result-failed { background:rgba(194,59,59,.045); }
.result-status { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:800; }
.result-status::before { content:'●'; font-size:10px; }
.result-status.approved { color:#177a4d; background:#e3f5eb; }
.result-status.failed { color:#a53030; background:#fde8e8; }
.result-actions { white-space:nowrap; }
.inline-form { display:inline; margin-left:10px; }
.sidebottom { border-top:1px solid rgba(255,255,255,.18); }
.sidebottom::after { content:'CNPJ: 15.175.731/0001-45'; display:block; font-size:11px; }
.whatsapp-float-label { display:none; }
.whatsapp-float { display:none !important; }
.whatsapp-float-label { background:#174d31; padding:8px 11px; border-radius:6px; font-size:12px; font-weight:700; box-shadow:0 5px 18px rgba(23,77,49,.22); }
.whatsapp-float-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:50%; background:#20a464; color:white; font-size:30px; font-weight:700; box-shadow:0 7px 22px rgba(32,164,100,.35); }
.whatsapp-float:hover .whatsapp-float-icon { background:#168b53; }
@media (max-width:700px) { .whatsapp-float { right:14px; bottom:14px; } .whatsapp-float-label { display:none; } .whatsapp-float-icon { width:48px; height:48px; font-size:27px; } }

.assignment-year-head > div:first-child {
    display: grid;
    gap: 8px;
}

.assignment-check span {
    display: block;
    line-height: 1.35;
}

.assignment-check strong {
    margin-right: 6px;
}

.declaration-page {
    width: min(100%, 210mm);
    min-height: 297mm;
    margin: 0 auto;
    padding: 18mm 20mm;
    box-sizing: border-box;
    font-family: Arial, "Helvetica Neue", sans-serif;
}

.declaration-logo {
    width: 25mm;
    height: 25mm;
    margin: 0 auto 5mm;
}

.declaration-head {
    margin-bottom: 14mm;
    padding-top: 4mm;
    position: relative;
    z-index: 1;
}
.declaration-page .declaration-head { border: 0 !important; }

.declaration-page h1 {
    margin-bottom: 13mm;
}

.declaration-page p {
    line-height: 1.75;
}

.declaration-page .filiation-line {
    text-align: left;
}

@page {
    size: A4 portrait;
    margin: 30mm 20mm 20mm 30mm;
}

@media print {
    .whatsapp-float, .whatsapp-float-label, .whatsapp-float-icon { display:none !important; }
    html, body {
        width: auto;
        min-height: 0;
        background: white;
    }

    .declaration-page {
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        overflow: visible;
        display: block;
        box-sizing: border-box;
    }

    .declaration-logo {
        width: 24mm;
        height: 24mm;
    }

    .declaration-page .declaration-head {
        height: auto;
        margin: 0 0 8mm !important;
        padding-top: 0;
    }

    .declaration-page h1 {
        margin: 0 0 9mm !important;
    }

    .declaration-page p {
        font-size: 12pt;
        line-height: 1.5;
        margin-bottom: 8mm;
    }

    .signature-grid {
        margin-top: 14mm;
        gap: 24mm;
        break-inside: avoid;
    }

    .signature-image-wrap {
        height: 68px;
    }

    .signature-image {
        max-width: 190px;
        max-height: 64px;
    }

    .declaration-validation {
        display: grid;
        grid-template-columns: 25mm minmax(0, 1fr);
        align-items: center;
        gap: 5mm;
        margin-top: 10mm;
        padding-top: 5mm;
        break-inside: avoid;
    }

    .declaration-validation strong,
    .declaration-validation span,
    .declaration-validation small {
        display: block !important;
    }

    #declaration-qrcode,
    #declaration-qrcode svg {
        width: 25mm !important;
        height: 25mm !important;
        max-width: 25mm !important;
        max-height: 25mm !important;
    }

    .declaration-validation span,
    .declaration-validation small {
        font-size: 8pt;
        line-height: 1.25;
    }

    .declaration-page table { width: 100%; border-collapse: collapse; }
    .declaration-page thead { display: table-header-group; }
    .declaration-page tr { break-inside: avoid; }
}

@media (max-width: 700px) {
    .journey-dashboard { padding:22px; }
    .journey-head { display:block; }
    .journey-total { text-align:left; margin-top:18px; }
    .journey-steps { grid-template-columns:1fr 1fr; row-gap:16px; }
    .document-checks { grid-template-columns:1fr; }
    .declaration-page {
        width: 100%;
        min-height: auto;
        padding: 28px 22px;
    }

    .welcome-visual {
        min-width: 0;
        min-height: 120px;
        margin-top: 22px;
        border-left: 0;
        border-top: 1px solid #65658c;
    }

    .welcome-visual img {
        width: 86px;
        height: 86px;
    }
}
.theme-toggle{position:fixed;right:18px;bottom:18px;width:42px;height:42px;border:1px solid #cfd6e5;border-radius:50%;background:#fff;color:#172354;font-size:20px;z-index:20;box-shadow:0 4px 14px rgba(23,35,84,.15);cursor:pointer}.theme-toggle:focus-visible{outline:3px solid #f7c928;outline-offset:3px}html[data-theme=dark] body{background:#11162d;color:#eef2ff}html[data-theme=dark] .workspace,html[data-theme=dark] .panel,html[data-theme=dark] .subject,html[data-theme=dark] header{background:#1b2240;color:#eef2ff;border-color:#3a466d}html[data-theme=dark] .muted,html[data-theme=dark] small{color:#c2cbe2}html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#11162d;color:#eef2ff;border-color:#536184}html[data-theme=dark] a{color:#f7d45a}html[data-theme=dark] .theme-toggle{background:#252e52;color:#f7d45a;border-color:#536184}
html[data-theme=dark] .subject-search,html[data-theme=dark] .profile-photo-form{background:#151b35;border-color:#536184}html[data-theme=dark] .subject-search label span{color:#f7d45a}html[data-theme=dark] .phone-country,html[data-theme=dark] .phone-nine{background:#252e52;color:#f7d45a;border-color:#536184}
/* Definitive AVA-style navigation. One drawer, one breakpoint, no legacy bottom bar. */
.menu-toggle { display:none; border:1px solid #cbd3e3; background:#fff; color:var(--navy); border-radius:8px; min-width:44px; min-height:44px; font-size:20px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.student-shell { display:block; }
.student-shell aside { position:fixed; inset:0 auto 0 0; width:min(320px,86vw); height:100dvh; padding:24px 18px; transform:translateX(-105%); transition:transform .18s ease; z-index:50; overflow-y:auto; box-shadow:14px 0 32px rgba(21,22,75,.28); }
.student-shell aside .brand { display:flex; align-items:center; gap:12px; padding:0 8px 22px; border-bottom:1px solid rgba(255,255,255,.18); }
.student-shell aside .sidebottom { display:block; margin-top:auto; }
.student-shell aside .nav { display:grid; grid-template-columns:1fr; gap:5px; margin-top:22px; }
.student-shell aside .nav a { min-width:0; padding:13px 14px; text-align:left; border-left:3px solid transparent; }
.student-shell aside .nav a:hover, .student-shell aside .nav a.active { background:#303166; border-left-color:var(--yellow); }
.student-shell.menu-open aside { transform:translateX(0); }
.student-shell.menu-open::before { content:""; position:fixed; inset:0; background:rgba(9,12,35,.46); z-index:40; }
.student-shell .menu-toggle { display:inline-grid; place-items:center; flex:0 0 44px; }
.student-shell header { position:sticky; top:0; z-index:30; height:72px; padding:0 28px; }
.student-shell header > span { flex:1; font-weight:600; color:var(--navy); }
.student-shell main { max-width:1180px; }
/* v2.16: navegação de retorno e formulários responsivos sem sobreposição. */
.page-back{display:flex;margin:0 0 18px}.page-back .btn{background:#fff;box-shadow:0 2px 8px rgba(23,35,84,.10)}
.intro,.panel,.filters,.actions,.tablewrap,.field{min-width:0}.filters{align-items:end}.filters input,.filters select,.filters textarea,.class-group-form input,.class-group-form select,.class-group-edit input,.class-group-edit select{width:100%;max-width:100%}
.pill-links,.ficha-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;padding-bottom:4px}.pill-links a,.ficha-tabs a{flex:0 0 auto}
.class-groups-grid{display:grid;gap:18px}.class-group-form,.class-group-edit{display:grid;grid-template-columns:minmax(180px,1.25fr) repeat(3,minmax(150px,1fr)) auto;gap:14px;align-items:end}.class-group-form .field,.class-group-edit .field{margin:0}.class-group-card .section-heading{align-items:flex-start}.class-group-card .section-heading h2{margin-bottom:4px}.class-group-card .tag{white-space:nowrap}
details form input,details form select,details form textarea{max-width:100%}
@media(max-width:900px){.class-group-form,.class-group-edit{grid-template-columns:repeat(2,minmax(0,1fr))}.class-group-form .btn,.class-group-edit .btn{grid-column:1/-1;width:100%}}
@media(max-width:640px){.page-back{margin-bottom:14px}.page-back .btn{width:auto;min-height:40px}.class-group-form,.class-group-edit{grid-template-columns:1fr}.class-group-form .btn,.class-group-edit .btn{grid-column:auto}.class-group-card .section-heading{display:grid;gap:10px}.class-group-card .tag{justify-self:start}.intro .actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.intro .actions .btn{width:100%}.intro .actions .btn:first-child:last-child{grid-column:1/-1}.filters{grid-template-columns:1fr!important}.filters .field,.filters .btn{grid-column:1/-1!important;max-width:none!important}.tablewrap{max-width:100%}details[open]{overflow:visible}details form{width:100%;min-width:0!important}}
@media (prefers-reduced-motion: reduce) { .student-shell aside { transition:none; } }
