:root[data-student-theme="dark"] { color-scheme: dark; }
.student-brand .student-theme-toggle {
    margin-right: auto; min-height: 32px; padding: 6px 0;
    border: 0; background: transparent; color: var(--gold);
    font-family: inherit; font-size: 10px; font-weight: 800; letter-spacing: 2px; border-radius: 0; cursor: pointer;
}
.student-theme-toggle:hover { border-color: var(--gold); }
.student-theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@font-face { font-family: 'Student Roboto'; src: url('admin/fonts/roboto-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Student Roboto'; src: url('admin/fonts/roboto-700.ttf') format('truetype'); font-weight: 700 900; font-display: swap; }
:root[data-student-theme="light"] {
    color-scheme: light;
    --bg: #f8f7f5; --panel: #fff; --panel-2: #faf9f7; --line: #d9d7d2;
    --text: #202124; --muted: #62615e; --gold: #80601d; --gold-soft: #765719;
    --green: #26703c; --red: #a93232;
}
:root[data-student-theme="light"] body { background: var(--bg); font-family: 'Student Roboto', Arial, sans-serif; }
:root[data-student-theme="light"] .student-card {
    background: #fff; border-color: var(--line); border-radius: 12px;
    box-shadow: 0 8px 30px rgba(40,35,24,.08);
}
:root[data-student-theme="light"] :is(.plan-card,.account-tile,.upcoming-classes-card,.recent-attendance-card,.scanner-fallback,.history-total,.scanner-result) {
    background: #faf9f7; border-color: var(--line); border-radius: 8px; box-shadow: none;
}
:root[data-student-theme="light"] :is(.detail-panel,.detail-panel:not(.hidden)),
:root[data-student-theme="light"] body.is-account-view .detail-panel:not(.hidden) {
    background: #fff; border-color: var(--line); border-radius: 10px;
    box-shadow: 0 0 0 100vmax rgba(28,34,42,.35), 0 16px 48px rgba(28,34,42,.18);
}
:root[data-student-theme="light"] .history-filters { background: #f8f7f5; }
:root[data-student-theme="light"] :is(input,select) {
    background: #fff; color: var(--text); border-color: #c9c7c2; border-radius: 6px;
}
:root[data-student-theme="light"] :is(input,select):focus { border-color: #a37c28; box-shadow: 0 0 0 2px #fdf1d5; }
:root[data-student-theme="light"] :is(.student-form button,.scan-main,.capture-button) {
    background: #f8d481; border-color: #e3c172; color: #202124; border-radius: 6px;
}
:root[data-student-theme="light"] :is(.logout-link,.secondary-button,.history-button,.history-close,.capture-button-secondary) {
    background: #fff; color: #464440; border-color: #ccc9c2; border-radius: 6px;
}
:root[data-student-theme="light"] :is(.logout-link,.history-button,.history-close):hover { background: #fdf1d5; border-color: #c2a263; }
:root[data-student-theme="light"] .profile-avatar { background: #fdf1d5; border-color: #d5bc80; box-shadow: none; }
:root[data-student-theme="light"] :is(.detail-item,.recent-attendance-row,.upcoming-class-row) { border-color: var(--line); }
:root[data-student-theme="light"] .scanner-view.is-external-scan .scanner-message { background: #faf9f7; border-color: var(--line); }
:root[data-student-theme="light"] .reader { border-color: #d9d7d2; }
:root[data-student-theme="light"] .partner-logo-mqr { content: url('admin/logo-mqr-claro.png'); filter: none; }
:root[data-student-theme="light"] .partner-logo-emuna { content: url('admin/logo-emuna-claro.png'); filter: none; }
:root[data-student-theme="dark"] .partner-logo-mqr { content: url('admin/logo-mqr-oscuro.png'); filter: none; }
:root[data-student-theme="dark"] .partner-logo-mambo { filter: brightness(1.85) saturate(.65); }
@media (max-width: 520px) { :root[data-student-theme="light"] body.is-account-view .student-card { border-radius: 0; } }
body.is-account-view .student-brand { min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 520px) {
    body.is-account-view .student-brand { padding-top: calc(4px + env(safe-area-inset-top)); }
}
@media (min-width: 521px) { body.is-account-view .student-shell { padding-top: 8px; padding-bottom: 8px; } }
