/* KEMBANGLAMPIR EDUKASI V1.1 — AUDIT KONTRAS AKHIR
   2026-10-20: Patch UI-only. No SQL, roles, routes, auth, grading, or exam logic.
   Target: all live Admin/Guru panels, forms and dialogs — never print views.
   Added after existing V1.1 CSS so old white V1.0 styles cannot override.
*/
:root{--kl-a-bg:#0a1219;--kl-a-card:#17252f;--kl-a-card-hi:#263a43;--kl-a-border:#355259;
 --kl-a-ink:#f0fbf7;--kl-a-sub:#c0d5d0;--kl-a-hint:#a3c4b8;--kl-a-focus:#6af6a9;
 --kl-a-gradient:linear-gradient(147deg,#253744 0%,#1b2c36 45%,#121f29 100%);
 --kl-a-glow:inset 0 1px 0 rgba(255,255,255,.055),0 9px 23px rgba(0,0,0,.53),0 22px 46px rgba(0,0,0,.26);
}
/* ADMIN: V1.0 submodules that still inherited a white base. Keep external/print documents untouched. */
body.kl-v11-admin :is(
 .topic-card,.resource-card,.reader-panel,.quiz-answer,.lesson-row,.summary-mini,
 .weekly-metrics>div,.weekly-archive-item,.school-metrics>div,.school-home,
 .school-daystats,.school-code,.weekly-preview-empty,.online-studio-box,.topic-option,
 .import-box,.quiz-card,.filters,.panel,.module-card,.stat,.resource-list .resource-card,
 .grade-chip,.topbar,.school-filter,.weekly-editor,.school-statusmetrics,
 .reader-header,.weekly-note,.weekly-history,.book-card,.form-answers,
 .lesson-form,.lesson-list,.weekly-two>*,.school-formgrid>*,.weekly-links,
 .quiz-footer,.quiz-question,.school-table-scroll,.school-table,.topic-list,
 .notice:not(.warn),.empty,.import-box,.online-studio-box
){background:var(--kl-a-gradient)!important;color:var(--kl-a-ink)!important;
 border-color:var(--kl-a-border)!important;box-shadow:var(--kl-a-glow)!important}
body.kl-v11-admin :is(
 .school-daystats,.school-code,.lesson-row .lesson-time,.grade-chip,
 .module-symbol,.resource-icon,.stat-icon,.weekly-metrics>div,
 .school-metrics>div,.school-home,.quiz-tick
){background:linear-gradient(145deg,#2b404b,#1b303b)!important;color:#e9fff5!important}
body.kl-v11-admin :is(.topic-card p,.topic-option small,.topic-option b,.reader-footer,
 .quiz-answer,.lesson-row small,.weekly-metrics span,.weekly-metrics strong,
 .weekly-preview-empty p,.weekly-archive-item p,.school-metrics span,.school-metrics b,
 .school-home span,.school-home strong,.school-formfield,
 .school-formfield>span,.school-filter label>span,.school-table td small,
 .form-answers summary,.form-label,.quiz-index,.reader-content,.list-icon,.school-code,
 .topic-card h3,.quiz-question,.week-title,.online-studio-box p,.empty p,.empty h3){color:var(--kl-a-sub)!important}
body.kl-v11-admin :is(.topic-card h3,.topic-option b,.resource-card h3,
 .school-home strong,.weekly-metrics strong,.school-metrics b,.lesson-row strong,
 .section-head h2,.module-card strong,.reader-header h2){color:var(--kl-a-ink)!important}
body.kl-v11-admin :is(.btn.white,.btn.ghost,.icon-button,.bookmark-button,
 .chip,.topic-option,.quiz-answer,.quiz-answer:hover:not(:disabled)){
 background:linear-gradient(135deg,#293e49,#182b34)!important;
 color:var(--kl-a-ink)!important;border:1px solid #41645a!important}
body.kl-v11-admin .chip.selected,
body.kl-v11-admin .quiz-answer.chosen{background:#174a35!important;color:#e8fff1!important;border-color:#2ce088!important}
body.kl-v11-admin .quiz-answer.correct{background:#13583f!important;color:#b9ffce!important;border-color:#4fce89!important}
body.kl-v11-admin .quiz-answer.incorrect{background:#4c2532!important;color:#ffdce1!important;border-color:#e57882!important}
body.kl-v11-admin :is(.btn.danger,.notice.warn,.toast.kl-toast-error){
 background:#402830!important;color:#ffe2df!important;border-color:#b96c70!important}
/* Admin backup/import, popover and transient dialogs (not print-only windows). */
body.kl-v11-admin :is(.kl-menu,.kl-profile-panel,.kl-welcome-inner,.school-menu,
 .reader-modal,.school-table th,.form-question,.school-header,.ke-ai-card,
 .ke-ai-question,.ke-ai-option,.ke-ai-grid>div){background:var(--kl-a-gradient)!important;color:var(--kl-a-ink)!important;border-color:var(--kl-a-border)!important}
body.kl-v11-admin :is(.kl-menu button,.school-formgrid input,.weekly-field .field,
 .school-table input,.school-formfield input,.reader-panel input){color:var(--kl-a-ink)!important}
body.kl-v11-admin .school-table th{background:#1d3c38!important}
body.kl-v11-admin .school-table td{color:var(--kl-a-sub)!important}
body.kl-v11-admin .topbar,.kl-v11-admin .topbar .crumb,
body.kl-v11-admin .topbar .crumb strong{color:var(--kl-a-ink)!important}
/* Dynamically-created credential dialog, previously hardcoded white using element.style. */
body.kl-v11-admin > div[role="dialog"][aria-modal="true"] > div:first-child{
 background:var(--kl-a-gradient)!important;color:var(--kl-a-ink)!important;
 border:1px solid var(--kl-a-border)!important;box-shadow:0 25px 75px #000c!important}
body.kl-v11-admin > div[role="dialog"][aria-modal="true"] > div:first-child > p{
 color:var(--kl-a-sub)!important}
body.kl-v11-admin > div[role="dialog"][aria-modal="true"] > div:first-child > button,
body.kl-v11-admin > div[role="dialog"][aria-modal="true"] > div:first-child > div > button{
 background:#224439!important;color:#f3fff7!important;border-color:#547965!important}
/* GURU: forms and list surfaces that retained direct #fff or purple from older sheets. */
body.kl-v11-guru :is(.metric,.dashboard-card,.ke-advanced,.exercise-ai-panel,
 .exercise-ai-question,.exercise-ai-controls,.exercise-row,.material-row,
 .schedule-row,.teaching-list li,.mapel-table li,.class-option,.class-list,
 .mapel-summary,.exercise-list li,.ke-lesson-panel,.weekly-row,
 .schedule-form,.schedule-filter,.mapel-form,.material-form,
 .exercise-form,.ke-profile-menu,.ke-head-pop,#ke-account-menu,
 #ke-account-menu button,.ke-account-act,#ke-account-button,
 #ke-page-latihan #ke-native-panel,#ke-page-nilai #ke-native-panel,
 #ke-native-panel .ken-q,#ke-native-panel .ken-record,
 #ke-native-panel .ken-sched-row,#ke-native-panel .ken-manage,
 #ke-native-panel .ken-manage-selection,#ke-page-nilai .ken-v11-left,
 #ke-page-nilai .ken-v11-right,.ke-adv-row,.ke-v11-dialog-classes label,
 .placeholder,.notice,.note,.teacher-profile div,.school-item
){background:var(--kl-a-gradient)!important;color:var(--kl-a-ink)!important;
 border-color:var(--kl-a-border)!important;box-shadow:var(--kl-a-glow)!important}
body.kl-v11-guru :is(.exercise-ai-panel h4,.exercise-ai-panel p,
 .exercise-ai-question p,.exercise-ai-question strong,.exercise-ai-question ol,
 .exercise-form label,.mapel-form label,.schedule-form label,
 .material-form label,.schedule-filter label,.exercise-row strong,
 .material-row strong,.teacher-profile strong,.metric strong,
 .ke-page h2,.ke-page h3,.ke-page h4){color:var(--kl-a-ink)!important}
body.kl-v11-guru :is(.exercise-row small,.material-row small,.exercise-row em,
 .schedule-row small,.teaching-list small,.metric small,.teacher-profile small,
 .ke-page .muted,.ke-page small,.exercise-ai-feedback:not(.error):not(.success),
 .placeholder,.ke-page p,.ke-page .meta,.ke-profile-menu small,
 .exercise-ai-panel label){color:var(--kl-a-sub)!important}
body.kl-v11-guru :is(.exercise-ai-question,.exercise-ai-panel,.metric,
 .teaching-list li,.material-row,.exercise-row,.schedule-row){border-radius:13px!important}
body.kl-v11-guru :is(#ke-account-menu button,.ke-profile-menu button.ke-account-act){
 background:#20333d!important;color:#effff4!important;border:1px solid #38554e!important}
body.kl-v11-guru :is(.ke-profile-menu button.ke-account-exit:hover,
 .notice.bad,.exercise-ai-feedback.error,.ke41c-notice-toast.ken-error){
 background:#492a31!important;color:#ffdbdf!important;border-color:#b66b72!important}
body.kl-v11-guru :is(.notice.good,.exercise-ai-feedback.success){
 background:#154230!important;color:#baffd4!important;border-color:#2faf77!important}
body.kl-v11-guru :is(.schedule-row button,.remove-mapel){
 background:#432a32!important;color:#ffe1e5!important;border:1px solid #ae6770!important}
body.kl-v11-guru :is(.exercise-ai-controls button,.ke-v11-dialog-buttons button){
 border-color:#356856!important}
/* Both app sections: make outlines and field labels legible against dark panels. */
body:is(.kl-v11-guru,.kl-v11-admin) :is(input:not([type=checkbox]),select,textarea,.field){
 background:#142630!important;color:#f3fff9!important;border:1px solid #42645a!important;
 box-shadow:inset 0 2px 5px #0006!important}
body:is(.kl-v11-guru,.kl-v11-admin) :is(input,textarea)::placeholder{color:#a6c1b7!important}
body:is(.kl-v11-guru,.kl-v11-admin) :is(input,textarea,select):focus-visible{
 outline:2px solid var(--kl-a-focus)!important;outline-offset:2px!important}
/* Keep primary action buttons and semantic states, don't turn everything green. */
body:is(.kl-v11-guru,.kl-v11-admin) :is(.toast,.notice,.badge,.status){color:inherit}
@media(max-width:800px){body.kl-v11-admin .school-formgrid,body.kl-v11-guru .schedule-form{min-width:0}}
@media(prefers-reduced-motion:reduce){body:is(.kl-v11-admin,.kl-v11-guru) .module-card{transition:none!important}}

/* Tahap 121 — perataan sidebar Siswa dan kartu sambutan Guru.
   Pure visual change, same behavior and backend. */
body.kl-v11-student #dashboardView .tabs .tab{
 display:flex!important; flex-flow:row nowrap!important;
 align-items:center!important; justify-content:flex-start!important;
 text-align:left!important; column-gap:13px!important;
 padding:12px 14px!important; min-height:45px!important;
 width:100%!important; margin-inline:0!important; box-sizing:border-box!important;
}
body.kl-v11-student #dashboardView .tabs .tab .ke-v11-icon{
 width:19px!important; height:19px!important; flex:0 0 19px!important;
 margin:0!important; align-self:center!important;
}
body.kl-v11-guru #ke-page-ringkasan .ke-hello{
 background:linear-gradient(145deg,#22323d 0%,#172730 54%,#101b24 100%)!important;
 color:#e8f8f0!important; border:1px solid #324b50!important;
 box-shadow:0 14px 30px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.07)!important;
 border-radius:15px!important;
}
body.kl-v11-guru #ke-page-ringkasan .ke-hello strong{
 color:#f4fff9!important;font-weight:800!important;
}
@media(max-width:800px){
 body.kl-v11-student #dashboardView .tabs .tab{width:auto!important;padding:11px 13px!important}
}
