/* KEMBANGLAMPIR EDUKASI — remake antarmuka Guru v1.0 (lokal, belum deploy)
   Pertahankan seluruh ID lama dan aturan akses Supabase. */
:root{--ke-green:#197c4b;--ke-green-dark:#115b36;--ke-green-soft:#e5f6e9;--ke-green-mist:#f5fcf6;--ke-border:#bcdec9;--ke-text:#143f2d;--ke-muted:#526a5c;--ke-red:#b42330}
body{background:linear-gradient(125deg,#e2f5e8 0%,#ffffff 50%,#e8f7ee 100%)!important;color:var(--ke-text)!important}
.wrap{box-shadow:0 14px 52px #12552c16}
.wrap.dashboard-mode{width:min(1240px,100%);border:1px solid #d3e9d9;overflow:visible}
.dashboard-hero{position:relative;background:linear-gradient(115deg,#105c35 0%,#198450 65%,#5cb87a 100%)!important;padding:28px 30px!important;border-radius:20px 20px 0 0}
.dashboard-hero p,.dashboard-hero .eyebrow{color:#e8fff0!important}
.dashboard-hero h2{font-size:clamp(22px,3vw,30px)!important;color:#fff}
.ke-remake-ready .dashboard-body{display:none!important} /* Isi asli sudah dipindahkan, bukan dihapus */
.wrap.dashboard-mode:has(.ke-remake-ready)>#message{display:none}
.wrap.dashboard-mode:has(.ke-remake-ready)>.actions{display:none}
.wrap.dashboard-mode>footer{font-size:11px;color:var(--ke-muted);padding-top:9px}
.dashboard-card{border:1px solid var(--ke-border)!important;background:#fff!important;border-radius:16px!important;padding:22px!important;box-shadow:0 3px 20px #0e5e2910;min-width:0}
.dashboard-card h3,.dashboard-card h4{color:var(--ke-green-dark)!important}
.dashboard-card p,.meta,.dashboard-note,.class-note{color:var(--ke-muted)!important}
.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.metric{background:#fff!important;border:1px solid var(--ke-border)!important;min-height:116px}
.metric .metric-label{font-size:14px;color:var(--ke-muted)!important}
.metric .metric-value{color:var(--ke-green-dark)!important}
.metric .metric-value.state{color:var(--ke-green)!important}
button,.dashboard-action,.exercise-ai-button,.ken-tabs button{background:var(--ke-green)!important;color:#fff!important;font-size:15px!important;padding:12px 17px!important;border-radius:11px!important;border:1px solid var(--ke-green)!important;box-shadow:none!important;line-height:1.4}
button:hover:not(:disabled),button:focus-visible:not(:disabled){background:var(--ke-green-dark)!important;border-color:var(--ke-green-dark)!important;color:white!important}
button:disabled{background:#d9e3dc!important;border-color:#d9e3dc!important;color:#697c71!important;opacity:1!important;cursor:not-allowed!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #78c99a!important;outline-offset:2px}
input,select,textarea{border-color:#b6d6c2!important;color:var(--ke-text)!important;min-height:42px;font-size:15px!important}
label{color:var(--ke-text)!important;font-size:14px!important}
.note,.notice:not(.bad),.placeholder{background:#eef9f1!important;color:var(--ke-text)!important;border:1px solid #d0ebd7}
.notice.bad,.exercise-ai-feedback.error{background:#fff0f0!important;color:var(--ke-red)!important;border:1px solid #f3c3c4}
.mapel-table li,.teaching-list li,.exercise-row,.material-row,.schedule-row{background:#f6fcf8!important;border-color:#d5ebdc!important}
.exercise-ai-panel{background:#f5fcf6!important;border:1px solid var(--ke-border)!important}
.exercise-ai-panel h4,.exercise-ai-panel p{color:var(--ke-green-dark)!important}
.exercise-ai-feedback.success{color:var(--ke-green-dark)!important}
#ke-remake-app{display:grid;grid-template-columns:minmax(220px,260px) minmax(0,1fr);gap:22px;padding:26px;background:linear-gradient(130deg,#f1fcf4,#fff 70%,#eaf9ef)}
#ke-remake-nav{display:flex;flex-direction:column;gap:9px;align-self:start;position:sticky;top:14px}
#ke-remake-nav .ke-navtitle{font-size:12px;letter-spacing:.09em;color:var(--ke-muted);font-weight:800;padding:4px 11px 9px;text-transform:uppercase}
#ke-remake-nav button{display:flex;text-align:left;align-items:center;gap:13px;width:100%;background:#fff!important;border:1px solid #c9e5d2!important;color:var(--ke-green-dark)!important;padding:15px 14px!important;font-size:15px!important;min-height:55px;box-shadow:0 2px 12px #0f64300a!important}
#ke-remake-nav button .ke-nav-icon{width:24px;text-align:center;font-size:20px;flex-shrink:0}
#ke-remake-nav button[aria-current="page"],#ke-remake-nav button:hover,#ke-remake-nav button:focus-visible{background:var(--ke-green)!important;color:white!important;border-color:var(--ke-green)!important}
#ke-remake-pages{min-width:0}
.ke-page[hidden],.ke-workspace[hidden],#ke-remake-app[hidden]{display:none!important}
.ke-page h2{color:var(--ke-green-dark)!important;margin:3px 0 5px;font-size:clamp(21px,2.8vw,27px)}
.ke-page .ke-subtitle{color:var(--ke-muted);font-size:14px;margin:0 0 22px;line-height:1.6}
.ke-page .dashboard-card{width:100%;margin:0}
#ke-page-ringkasan .ke-hello{background:linear-gradient(115deg,#e6f8ec,#fff);border-radius:16px;padding:18px;margin:18px 0;border:1px solid var(--ke-border);line-height:1.7}
#ke-page-ringkasan .ke-hello strong{display:block;font-size:17px;color:var(--ke-green-dark)}
#ke-page-mapel .mapel-form,#ke-page-jadwal .schedule-form{max-width:800px}
#ke-page-latihan .ke-mode-list{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:10px 0 22px}
#ke-page-latihan .ke-mode{border:1px solid #b9ddc4;background:white!important;color:var(--ke-green-dark)!important;min-height:148px;display:flex;align-items:center;justify-content:center;gap:9px;flex-direction:column;font-size:17px!important;padding:18px!important;white-space:normal}
#ke-page-latihan .ke-mode .ke-mode-icon{font-size:30px}
#ke-page-latihan .ke-mode small{color:var(--ke-muted);font-size:13px;text-align:center;font-weight:500}
#ke-page-latihan .ke-mode:hover,#ke-page-latihan .ke-mode[aria-pressed="true"]{background:var(--ke-green-soft)!important;color:var(--ke-green-dark)!important;border:2px solid var(--ke-green)!important}
.ke-workspace{display:grid;gap:12px}
.ke-workspace>p{font-size:14px;color:var(--ke-muted);line-height:1.7}
#ke-page-latihan #ke-native-panel,#ke-page-nilai #ke-native-panel{border:1px solid var(--ke-border)!important;background:#fff!important;margin:0!important;padding:23px!important;border-radius:16px!important}
#ke-native-panel h3{color:var(--ke-green-dark)!important}
#ke-page-latihan .ken-tabs [data-ke-tab="nilai"]{display:none!important}
#ke-page-nilai .ken-tabs [data-ke-tab="soal"],#ke-page-nilai .ken-tabs [data-ke-tab="jadwal"]{display:none!important}
#ke-page-nilai .ken-tabs [data-ke-tab="nilai"]{display:none!important}
#ke-page-nilai #ken-refresh{display:none}
.ke-advanced{border:1px solid #d0e8d8;border-radius:12px;background:#f9fdf9;padding:16px;margin-top:14px}
.ke-advanced summary{cursor:pointer;color:var(--ke-green-dark);font-size:15px;font-weight:800}
.ke-advanced .dashboard-card{margin-top:15px!important}
.ke-account-wrap{position:absolute;right:25px;top:24px;z-index:50}
#ke-account-button{background:#fff!important;color:var(--ke-green-dark)!important;border:1px solid #fff!important;min-height:44px;padding:9px 15px!important;font-weight:800}
#ke-account-button:hover{background:#ecfff2!important;color:var(--ke-green-dark)!important}
#ke-account-menu{position:absolute;right:0;top:calc(100% + 8px);width:240px;max-width:85vw;background:#fff;border:1px solid var(--ke-border);box-shadow:0 15px 40px #154c2c2e;border-radius:14px;padding:8px;z-index:60}
#ke-account-menu[hidden]{display:none!important}
#ke-account-menu button{display:block;width:100%;text-align:left;margin:4px 0;background:#fff!important;color:var(--ke-green-dark)!important;border:1px solid transparent!important;min-height:46px}
#ke-account-menu button:hover{background:var(--ke-green-soft)!important}
#ke-account-menu .ke-account-exit{border-top:1px solid #d4e7d8!important;border-radius:2px}
#ke-remake-toast{position:fixed;top:16px;right:16px;z-index:9999;min-width:290px;max-width:min(440px,calc(100vw - 32px));background:#e6f6eb;color:#165c38;border:1px solid #73b989;border-left:7px solid var(--ke-green);box-shadow:0 12px 32px #14563235;border-radius:12px;padding:16px 48px 16px 17px;font-size:15px;line-height:1.5;font-weight:700;animation:ke-toast-life 5s forwards;overflow-wrap:anywhere}
#ke-remake-toast[hidden]{display:none!important}
#ke-remake-toast[data-kind="error"]{background:#fff0f1;color:#a01f2e;border-color:#eba8af;border-left-color:#be2638}
#ke-remake-toast .ke-toast-close{position:absolute;right:8px;top:8px;background:transparent!important;color:inherit!important;border:none!important;padding:5px 11px!important;min-height:30px;font-size:20px!important}
@keyframes ke-toast-life{0%,78%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-7px)}}
.ke-modal-backdrop{position:fixed;inset:0;background:#062b1980;z-index:10000;display:flex;align-items:center;justify-content:center;padding:20px}
.ke-modal-backdrop[hidden]{display:none!important}
.ke-modal{width:min(520px,100%);background:linear-gradient(125deg,#e7f8ed,#fff 60%,#def3e6);color:var(--ke-text);border-radius:22px;border:1px solid #b4dfc0;padding:30px;box-shadow:0 22px 65px #072d1b6b;text-align:center;max-height:90vh;overflow:auto}
.ke-modal h2{font-size:clamp(21px,4vw,29px);color:var(--ke-green-dark);line-height:1.3}
.ke-modal .ke-modal-icon{font-size:38px}
.ke-modal p{color:var(--ke-muted);font-size:15px;line-height:1.7}
.ke-modal button{min-width:165px;padding:14px!important;font-size:17px!important}
.ke-modal-form{text-align:left;display:grid;gap:12px}
.ke-modal-form label{margin:0}
.ke-modal-form .ke-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.ke-tagline{font-size:13px;color:#5c7564;margin-top:12px}
#ke-native-panel .ken-status{border-color:var(--ke-border)!important;color:var(--ke-text)}
/* Old native notification chip: reuse green/red design; keep its current event logic. */
.ke41c-notice-toast{background:#e6f6eb!important;color:#165c38!important;border-color:#73b989!important}
.ke41c-notice-toast.ken-error,.ke41c-notice-toast[data-kind="error"]{background:#fff0f1!important;color:var(--ke-red)!important}
@media(max-width:840px){#ke-remake-app{grid-template-columns:1fr;padding:16px;gap:17px}#ke-remake-nav{position:static;display:flex;flex-direction:row;overflow-x:auto;gap:7px;padding-bottom:7px}#ke-remake-nav .ke-navtitle{display:none}#ke-remake-nav button{min-width:140px;max-width:195px;flex-shrink:0;min-height:55px;font-size:14px!important}#ke-page-latihan .ke-mode-list{grid-template-columns:1fr 1fr}.dashboard-hero{padding-right:20px!important;padding-top:75px!important}.ke-account-wrap{top:16px;right:16px}}
@media(max-width:520px){body{padding:8px}.wrap.dashboard-mode{border-radius:16px}.dashboard-hero{border-radius:16px 16px 0 0}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:13px}.metric .metric-value{font-size:22px}#ke-page-latihan .ke-mode-list{grid-template-columns:1fr}#ke-remake-app{padding:12px}.dashboard-card{padding:16px!important}#ke-remake-nav button{min-width:123px;gap:7px;padding:11px!important}#ke-remake-nav button .ke-nav-icon{font-size:18px}}
@media(prefers-reduced-motion:reduce){#ke-remake-toast{animation:none}}

/* ==========================================================
   Header Profil Profesional — 2026, kandidat Guru lokal.
   Brand/Home kiri, Notifikasi dan Avatar/Profile dropdown kanan.
   Profil di kanan dan kiri merujuk ke SATU halaman.
   ========================================================== */
#approved.ke-remake-ready .dashboard-body{display:none!important}
.wrap.dashboard-mode:has(#approved.ke-remake-ready)>footer{display:none!important}
.wrap.dashboard-mode:has(#approved.ke-remake-ready)>.actions{display:none!important}
#approved.ke-remake-ready .dashboard-note{display:none!important}
.dashboard-hero{padding:0 0 29px!important;overflow:visible!important}
.dashboard-hero>.eyebrow{padding:24px 30px 0}
.dashboard-hero>h2{padding:0 30px}
.dashboard-hero>p{padding:0 30px}
.ke-topbar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:82px;padding:14px 27px;background:linear-gradient(100deg,#082c1d,#124b30);border-radius:20px 20px 0 0;border-bottom:1px solid #ffffff22;color:#fff;z-index:110}
.ke-topbar-brand,.ke-topbar-right{display:flex;align-items:center;gap:13px;min-width:0}
.ke-brand-copy{display:grid;gap:3px;min-width:0}
.ke-brand-copy strong{font-size:16px;line-height:1.2;color:#fff;letter-spacing:.015em;overflow-wrap:anywhere}
.ke-brand-copy small{color:#bde6cf;font-weight:800;letter-spacing:.13em;font-size:10px}
.ke-topbar-role{font-weight:800;color:#cfecda;font-size:12px;letter-spacing:.13em;padding-right:3px}
.ke-topbar button{display:inline-flex;align-items:center;justify-content:center;border-color:#ffffff2d!important;color:#fff!important;background:#ffffff11!important;box-shadow:none!important}
.ke-topbar button:hover:not(:disabled),.ke-topbar button:focus-visible:not(:disabled){background:#ffffff26!important;border-color:#ffffff50!important;color:#fff!important}
.ke-home-icon,.ke-header-icon{width:47px;height:47px;min-height:47px!important;padding:11px!important;border-radius:14px!important;flex:0 0 auto}
.ke-home-icon svg,.ke-header-icon svg{width:23px;height:23px}
.ke-notice-wrap,.ke-account-wrap{position:relative;top:auto;right:auto;z-index:120}
#ke-account-button.ke-avatar-button{min-height:48px!important;padding:3px 6px 3px 3px!important;border:0!important;background:transparent!important;color:#fff!important;gap:9px}
.ke-avatar img,.ke-profile-mini-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.ke-avatar{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:2px solid #c8efdb;background:linear-gradient(125deg,#b2e0c3,#f8fff9);color:#104c2d;font-weight:900;font-size:16px;box-shadow:0 4px 12px #002d1940}
.ke-chevron{width:16px;height:16px;color:#d3f6de}
.ke-head-pop{position:absolute;top:calc(100% + 12px);right:0;background:#fff!important;color:#173b28!important;border:1px solid #b4d7c0;border-radius:17px;z-index:200;box-shadow:0 18px 50px #062f1f4a;overflow:hidden}
.ke-head-pop[hidden]{display:none!important}
#ke-account-menu.ke-profile-menu{width:min(310px,calc(100vw - 30px));padding:10px!important}
.ke-profile-menu-title{display:flex;gap:12px;align-items:center;padding:13px 12px 15px;border-bottom:1px solid #d7eadd;margin-bottom:6px}
.ke-profile-menu-title strong{display:block;font-size:15px;color:#14452d;max-width:215px;overflow-wrap:anywhere}
.ke-profile-menu-title small{color:#647a6b;letter-spacing:.1em;font-size:10px;font-weight:800}
.ke-profile-mini-avatar{width:39px;height:39px;border-radius:50%;background:#d5f0df;color:#155b36;display:inline-flex;align-items:center;justify-content:center;font-weight:900}
.ke-account-items{display:grid;gap:3px}
.ke-profile-menu button.ke-account-act{display:flex!important;justify-content:flex-start!important;text-align:left;gap:13px;min-height:48px;padding:11px 13px!important;background:#fff!important;color:#184b31!important;border:1px solid transparent!important;width:100%;font-size:15px!important;font-weight:700}
.ke-profile-menu button.ke-account-act:hover{background:#eaf7ee!important;color:#164b2f!important}
.ke-account-act-icon{font-size:20px;width:25px;display:inline-flex;align-items:center;justify-content:center}
.ke-profile-menu button.ke-account-exit{color:#b52b37!important;border-top:1px solid #e5eee8!important;border-radius:8px!important;margin-top:7px}
.ke-profile-menu button.ke-account-exit:hover{background:#fff0f1!important;color:#a51f30!important}
.ke-notice-pop{width:min(335px,calc(100vw - 30px));padding:16px 15px;line-height:1.6}
.ke-notice-pop>strong{color:#164e32;display:block;padding-bottom:9px;border-bottom:1px solid #e0eee5}
.ke-notice-pop #ke-notice-items{color:#526e5b;padding-top:7px;font-size:13px;max-height:310px;overflow:auto}
.ke-notice-item{padding:9px 3px;border-bottom:1px solid #e6f1e8;display:grid;gap:3px}
.ke-notice-item small{color:#648070;font-size:11px}
.ke-notice-item span{color:#17653c}
.ke-notice-item.ke-notice-error span{color:#b42330}
.ke-profile-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:22px;padding-top:17px;border-top:1px solid #d3e9d8}
.ke-profile-actions button{min-height:48px}
#ke-profile-logout{background:var(--ke-green)!important;color:white!important}
#ke-profile-logout:hover{background:var(--ke-green-dark)!important}
@media(max-width:680px){.ke-topbar{min-height:72px;padding:12px;border-radius:16px 16px 0 0}.ke-topbar-brand,.ke-topbar-right{gap:7px}.ke-home-icon,.ke-header-icon{width:42px;height:42px;min-height:42px!important;padding:10px!important}.ke-brand-copy strong{font-size:12px}.ke-brand-copy small{font-size:9px}.ke-topbar-role{display:none}.ke-avatar{width:40px;height:40px}.dashboard-hero>.eyebrow{padding:20px 15px 0}.dashboard-hero>h2,.dashboard-hero>p{padding-left:15px;padding-right:15px}}
@media(max-width:380px){.ke-brand-copy strong{font-size:11px;max-width:120px}.ke-brand-copy small{font-size:8px}.ke-topbar{gap:5px}.ke-avatar-button{gap:3px}}

/* Profil 3 menu: diseragamkan dengan topbar; password Google via akun asli. */
#ke-profile-password.ke-profile-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;min-height:49px;padding:12px 17px;border-radius:11px;background:var(--ke-green);color:#fff!important;border:1px solid var(--ke-green);font-weight:800;font-size:15px;line-height:1.4}
#ke-profile-password.ke-profile-link:hover,#ke-profile-password.ke-profile-link:focus-visible{background:var(--ke-green-dark);border-color:var(--ke-green-dark);color:white!important}
.ke-profile-help{font-size:13px!important;line-height:1.6;color:#4e6c59!important;margin:10px 0!important}
#ke-account-items button.ke-account-exit{color:var(--ke-red)!important}

/* Tahap 151: jalur AI ke Native yang dapat dibaca Guru senior. */
#teacherAIToNative{background:var(--ke-green)!important;border-color:var(--ke-green)!important;color:white!important;font-weight:800!important;min-height:50px}
#teacherAIToNative:disabled{background:#d9e3dc!important;border-color:#d9e3dc!important;color:#697c71!important}
#ke-page-latihan .exercise-ai-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
#ke-page-latihan .exercise-ai-controls button{min-height:48px;white-space:normal}

/* Tahap 152: fade out Native Guru setelah 5 detik */
#ke41c-notice-toast.ken-toast-fade{opacity:0!important;transition:opacity .3s ease!important;pointer-events:none}
