/* =====================================================================
   MoDAI UI v4 · Lapisan tampilan global
   Glass, logo profesional, tombol hidup, isian lembut.
   Dimuat terakhir di semua halaman agar menimpa gaya lama.
   ===================================================================== */
:root{
  --ui-navy:#0b2545;
  --ui-navy-2:#15336b;
  --ui-blue:#3157d5;
  --ui-blue-2:#2447bf;
  --ui-sky:#38a3ee;
  --ui-gold:#c9a24a;
  --ui-green:#16956a;
  --ui-red:#d14b44;
  --ui-amber:#d38a1d;
  --ui-ink:#15213a;
  --ui-muted:#64748b;
  --ui-line:rgba(15,37,69,.10);
  --ui-glass:rgba(255,255,255,.70);
  --ui-glass-strong:rgba(255,255,255,.84);
  --ui-glass-border:rgba(255,255,255,.78);
  --ui-blur:saturate(170%) blur(18px);
  --ui-shadow-sm:0 1px 2px rgba(15,37,69,.05),0 4px 14px rgba(15,37,69,.05);
  --ui-shadow-md:0 2px 6px rgba(15,37,69,.05),0 14px 34px rgba(15,37,69,.09);
  --ui-shadow-lg:0 30px 70px rgba(15,37,69,.16);
  --ui-ease:cubic-bezier(.2,.8,.2,1);
  --ui-spring:cubic-bezier(.34,1.56,.64,1);
  --ui-radius:16px;
  --ui-top-h:74px;
  --ui-font-head:'Plus Jakarta Sans','Inter',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  --ui-font:'Inter',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
}

/* ---------- Latar mesh gradien bergerak ---------- */
html{background:#eef3fb;scroll-behavior:smooth}
html::before{
  content:"";position:fixed;inset:-18%;z-index:-1;pointer-events:none;
  background:
    radial-gradient(38% 34% at 12% 10%,rgba(49,87,213,.20),transparent 70%),
    radial-gradient(32% 30% at 90% 6%,rgba(56,163,238,.20),transparent 70%),
    radial-gradient(30% 30% at 80% 88%,rgba(201,162,74,.16),transparent 70%),
    radial-gradient(36% 32% at 8% 92%,rgba(22,149,106,.10),transparent 70%),
    linear-gradient(180deg,#f5f8fe 0%,#ebf0fa 100%);
  animation:ui-mesh 28s ease-in-out infinite alternate;
}
@keyframes ui-mesh{0%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(2%,-2%,0) scale(1.05)}100%{transform:translate3d(-2%,1.5%,0) scale(1.02)}}
body,body.student-body,body.teacher-body,body.login{background:transparent!important;font-family:var(--ui-font);color:var(--ui-ink);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
::selection{background:rgba(49,87,213,.18);color:var(--ui-navy)}
h1,h2,h3,.s-hero h1,.teacher-hero h1,.mig-hero h1,.modai-auth-card h1{font-family:var(--ui-font-head);letter-spacing:-.02em}

/* Scrollbar tipis */
*{scrollbar-width:thin;scrollbar-color:rgba(49,87,213,.28) transparent}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-thumb{background:rgba(49,87,213,.25);border-radius:99px;border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-thumb:hover{background-color:rgba(49,87,213,.45)}

/* ---------- Topbar kaca ---------- */
html body .student-topbar,html body .teacher-topbar,html body header.top,html body .login-head,html body .mig-topbar{
  height:var(--ui-top-h)!important;min-height:var(--ui-top-h)!important;
  padding:0 22px!important;position:sticky!important;top:0!important;z-index:60!important;
  background:linear-gradient(115deg,rgba(11,37,69,.84) 0%,rgba(21,51,107,.80) 100%)!important;
  -webkit-backdrop-filter:var(--ui-blur);backdrop-filter:var(--ui-blur);
  border-bottom:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 8px 30px rgba(11,37,69,.14)!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:16px!important;
  transition:box-shadow .3s var(--ui-ease),background .3s var(--ui-ease);
}
html body .is-scrolled .student-topbar,html body .is-scrolled .teacher-topbar,html body .is-scrolled header.top,html body .is-scrolled .login-head,html body .is-scrolled .mig-topbar{
  background:linear-gradient(115deg,rgba(11,37,69,.92) 0%,rgba(21,51,107,.88) 100%)!important;box-shadow:0 12px 34px rgba(11,37,69,.24)!important}
/* garis aksen emas tipis */
.student-topbar::after,.teacher-topbar::after,header.top::after,.login-head::after,.mig-topbar::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(56,163,238,.7) 25%,rgba(201,162,74,.75) 60%,transparent);opacity:.65}
.student-topbar,.teacher-topbar,header.top,.login-head,.mig-topbar{position:sticky}

/* Brand */
html body .student-brand-wrap,html body .teacher-brand-wrap,html body .top-brand-wrap,html body .login-brand-wrap,html body .mig-brand{
  display:flex!important;align-items:center!important;gap:13px!important;min-width:0!important;text-decoration:none!important;color:#fff!important}
/* Logo profesional: rasio asli, pelat putih, tidak gepeng */
html body .student-logo-img,html body .teacher-logo-img,html body .top-brand-logo,html body .login-brand-logo,html body .mig-brand img{
  display:block!important;flex:0 0 auto!important;
  height:46px!important;width:auto!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;
  object-fit:contain!important;
  padding:6px 10px!important;border-radius:13px!important;
  background:linear-gradient(180deg,#ffffff,#f3f6fc)!important;
  border:1px solid rgba(255,255,255,.65)!important;
  box-shadow:0 8px 20px rgba(3,14,32,.28),inset 0 -1px 0 rgba(15,37,69,.06)!important;
  transition:transform .45s var(--ui-spring),box-shadow .3s var(--ui-ease)!important;
}
html body a:hover>.student-logo-img,html body a:hover>.teacher-logo-img,html body a:hover>.top-brand-logo,html body .login-brand-wrap:hover .login-brand-logo,html body .mig-brand:hover img{
  transform:translateY(-2px) scale(1.04)!important;box-shadow:0 14px 28px rgba(3,14,32,.34),0 0 0 4px rgba(56,163,238,.18)!important}
.student-brand,.teacher-brand,.top-brand-copy strong,.login-brand-copy strong,.mig-brand strong{
  font-family:var(--ui-font-head)!important;font-weight:800!important;letter-spacing:-.03em!important;line-height:1!important}
.student-brand,.teacher-brand{font-size:21px!important}
.student-brand span,.teacher-brand span,.mig-brand strong span{color:#6cc3f5!important}
.student-brand b,.teacher-brand b{
  font:700 9.5px/1 var(--ui-font)!important;letter-spacing:.06em!important;padding:4px 7px!important;margin-left:6px!important;border-radius:99px!important;
  background:rgba(201,162,74,.18)!important;color:#f1d58e!important;border:1px solid rgba(201,162,74,.35)!important;vertical-align:middle}
.student-brand-sub,.teacher-brand-sub,.top-brand-copy span,.login-brand-copy span,.mig-brand small{
  color:rgba(226,236,250,.78)!important;font-size:11px!important;font-weight:500!important;margin-top:5px!important;letter-spacing:.01em!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:34ch}

/* Strip logo institusi: satu aturan untuk semua ukuran, proporsional saat zoom */
html body :is(.login-head .login-inst-shell,.student-institutions,.teacher-institutions,.top-inst-shell){
  display:flex!important;align-items:center!important;justify-content:center!important;flex:0 1 auto!important;
  box-sizing:border-box!important;
  height:calc(var(--ui-top-h) - 22px)!important;min-height:0!important;max-height:none!important;
  width:auto!important;min-width:0!important;max-width:min(38vw,420px)!important;
  margin:0!important;padding:6px 16px!important;border-radius:999px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(244,247,253,.93))!important;
  border:1px solid rgba(255,255,255,.75)!important;
  box-shadow:0 8px 22px rgba(3,14,32,.22),inset 0 -1px 0 rgba(15,37,69,.06)!important;
  position:relative!important;top:auto!important;transform:none!important;overflow:hidden!important;
  transition:box-shadow .3s ease,transform .35s var(--ui-spring)!important}
html body :is(.login-head .login-inst-shell,.student-institutions,.teacher-institutions,.top-inst-shell):hover{transform:translateY(-1px)!important;box-shadow:0 12px 26px rgba(3,14,32,.28)!important}
html body :is(.login-head .login-inst-shell,.student-institutions,.teacher-institutions,.top-inst-shell) img{
  display:block!important;height:100%!important;width:auto!important;max-width:100%!important;max-height:100%!important;min-width:0!important;
  object-fit:contain!important;margin:0!important}
@media(max-width:1100px){html body :is(.login-head .login-inst-shell,.student-institutions,.teacher-institutions,.top-inst-shell){max-width:30vw!important;padding:6px 12px!important}}
@media(max-width:820px){html body :is(.login-head .login-inst-shell,.student-institutions,.teacher-institutions,.top-inst-shell){display:none!important}}

/* Tombol ikon di topbar */
html body .student-profile-btn,html body .student-logout-btn,html body .student-notif-top,html body .teacher-profile-btn,html body .logout-btn,html body .top-profile-btn,html body .top-logout-btn,html body .mig-top-actions a{
  position:relative;width:40px!important;height:40px!important;border-radius:12px!important;
  display:inline-grid!important;place-items:center!important;
  background:rgba(255,255,255,.09)!important;border:1px solid rgba(255,255,255,.14)!important;color:#e7eefb!important;
  transition:transform .3s var(--ui-spring),background .25s ease,border-color .25s ease,box-shadow .25s ease!important}
html body .mig-top-actions a{width:auto!important;padding:0 14px!important;display:inline-flex!important;gap:8px}
html body .student-profile-btn:hover,html body .student-logout-btn:hover,html body .student-notif-top:hover,html body .teacher-profile-btn:hover,html body .logout-btn:hover,html body .top-profile-btn:hover,html body .top-logout-btn:hover,html body .mig-top-actions a:hover{
  transform:translateY(-2px)!important;background:rgba(255,255,255,.18)!important;border-color:rgba(255,255,255,.28)!important;box-shadow:0 10px 20px rgba(3,14,32,.25)!important}
.student-profile-btn:hover i,.teacher-profile-btn:hover i{transform:rotate(25deg)}
.student-logout-btn:hover i,.logout-btn:hover i{transform:translateX(2px)}
.student-notif-top:hover i{animation:ui-bell .7s ease}
.student-profile-btn i,.teacher-profile-btn i,.student-logout-btn i,.logout-btn i{transition:transform .35s var(--ui-spring)}
html body .student-logout-btn:hover,html body .logout-btn:hover,html body .top-logout-btn:hover{background:rgba(209,75,68,.28)!important;border-color:rgba(255,160,150,.4)!important}
@keyframes ui-bell{0%,100%{transform:rotate(0)}20%{transform:rotate(16deg)}40%{transform:rotate(-12deg)}60%{transform:rotate(8deg)}80%{transform:rotate(-4deg)}}
.student-notif-top span{animation:ui-badge 2.4s ease-in-out infinite}
@keyframes ui-badge{0%,100%{box-shadow:0 0 0 0 rgba(209,75,68,.55)}50%{box-shadow:0 0 0 6px rgba(209,75,68,0)}}

/* Akun */
html body .student-account-link,html body .teacher-account-link,html body .top-account-link{
  padding:5px 12px 5px 5px!important;border-radius:999px!important;transition:background .25s ease!important}
html body .student-account-link:hover,html body .teacher-account-link:hover,html body .top-account-link:hover{background:rgba(255,255,255,.10)!important}
.student-avatar,.student-avatar-img,.teacher-avatar,.teacher-avatar-img,.top-avatar,.top-avatar-img{
  box-shadow:0 0 0 2px rgba(255,255,255,.85),0 0 0 4px rgba(56,163,238,.35)!important;border:0!important}
.student-avatar,.teacher-avatar,.top-avatar{background:linear-gradient(135deg,var(--ui-sky),var(--ui-blue))!important}

/* Pengalih bahasa */
.modai-langsw{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.18)!important}
.modai-langsw button{transition:background .25s ease,color .25s ease,transform .25s var(--ui-spring)!important}
.modai-langsw button:hover:not(.on){color:#fff!important;background:rgba(255,255,255,.12)!important}
.modai-langsw button.on{box-shadow:0 4px 10px rgba(3,14,32,.25)}
.modai-langsw button:active{transform:scale(.92)}

/* ---------- Sidebar kaca ---------- */
html body .student-sidebar,html body .teacher-sidebar,html body .side{
  background:rgba(255,255,255,.58)!important;-webkit-backdrop-filter:var(--ui-blur);backdrop-filter:var(--ui-blur);
  border-right:1px solid rgba(255,255,255,.7)!important;box-shadow:inset -1px 0 0 rgba(15,37,69,.05)}
@media(min-width:1001px){
  html body .student-sidebar,html body .teacher-sidebar{top:var(--ui-top-h)!important;height:calc(100vh - var(--ui-top-h))!important}
}
.student-nav-head,.teacher-nav-head{color:var(--ui-muted)!important;letter-spacing:.08em}
html body .student-nav-item,html body .teacher-nav-item,html body .side .nav a{
  position:relative;border-radius:12px!important;
  transition:background .25s ease,color .25s ease,transform .3s var(--ui-ease),box-shadow .3s ease!important}
html body .student-nav-item:hover:not(.active),html body .teacher-nav-item:hover:not(.active),html body .side .nav a:hover:not(.active){
  background:rgba(49,87,213,.08)!important;color:var(--ui-blue-2)!important;transform:translateX(4px)}
.student-nav-item>i,.teacher-nav-item>i:first-child{transition:transform .35s var(--ui-spring)}
.student-nav-item:hover>i,.teacher-nav-item:hover>i:first-child{transform:scale(1.18)}
html body .student-nav-item.active,html body .teacher-nav-item.active,html body .side .nav a.active{
  background:linear-gradient(120deg,var(--ui-blue) 0%,#4271ec 55%,var(--ui-sky) 130%)!important;color:#fff!important;
  box-shadow:0 10px 22px rgba(49,87,213,.30),inset 0 1px 0 rgba(255,255,255,.22)!important}
html body .student-nav-item.active::before,html body .teacher-nav-item.active::before{
  content:"";position:absolute;left:-14px;top:22%;bottom:22%;width:4px;border-radius:0 4px 4px 0;background:var(--ui-gold);
  animation:ui-grow .45s var(--ui-spring) both}
@keyframes ui-grow{from{transform:scaleY(0)}to{transform:scaleY(1)}}
.student-info-box,.teacher-control-box{
  background:linear-gradient(140deg,rgba(49,87,213,.10),rgba(56,163,238,.08))!important;border:1px solid rgba(49,87,213,.16)!important;border-radius:16px!important}

/* Bar konteks */
html body .student-context-bar,html body .teacher-context-bar{
  background:linear-gradient(115deg,rgba(36,71,191,.88),rgba(49,87,213,.80) 60%,rgba(56,163,238,.78))!important;color:#fff!important;
  -webkit-backdrop-filter:var(--ui-blur);backdrop-filter:var(--ui-blur);
  border:1px solid rgba(255,255,255,.22)!important;border-radius:14px!important;box-shadow:0 10px 26px rgba(49,87,213,.20)!important}
html body .student-context-bar span,html body .teacher-context-bar span{background:rgba(255,255,255,.16)!important;color:#fff!important;border-radius:99px!important;padding:4px 10px!important;letter-spacing:.06em}

/* ---------- Kartu kaca ---------- */
html body :is(.s-card,.eco-card,.card,.kpi,.s-kpi,.s-time-card,.s-learning-card,.modai-profile-card,.profile-photo-card,.profile-form-card,.profile-security-card,.ags-student-game,.ags-assignment-card,.ags-student-mini-grid article,.eco-student-card,.ai-panel,.table-wrap,.mig-game-card,.mig-info-grid article,.mig-instructions article,.mig-target-card,.ags-adapt-card,.ags-summary-box>div){
  background:var(--ui-glass)!important;
  -webkit-backdrop-filter:var(--ui-blur);backdrop-filter:var(--ui-blur);
  border:1px solid var(--ui-glass-border)!important;
  border-radius:var(--ui-radius)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),var(--ui-shadow-sm)!important;
  transition:transform .35s var(--ui-ease),box-shadow .35s var(--ui-ease),border-color .3s ease,background .3s ease!important;
}
html body .mig-target-card{background:var(--ui-glass-strong)!important}
/* kartu yang dapat diklik/terangkat */
html body :is(.s-learning-card,.ags-student-game,.ags-assignment-card,.eco-student-card,.s-kpi,.kpi,.ags-student-mini-grid article,.mig-info-grid article,.ags-adapt-card):hover{
  transform:translateY(-4px)!important;background:var(--ui-glass-strong)!important;border-color:rgba(49,87,213,.22)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 40px rgba(15,37,69,.12)!important}
/* sorotan mengikuti kursor */
.ui-spot{position:relative}
.ui-spot::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .35s ease;
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),rgba(56,163,238,.12),transparent 60%)}
.ui-spot:hover::after{opacity:1}

/* Hero */
html body :is(.s-hero,.teacher-hero,.mig-hero,.modai-profile-hero){
  position:relative;overflow:hidden;isolation:isolate;
  background:linear-gradient(125deg,#0b2545 0%,#16366f 52%,#2447bf 100%)!important;
  box-shadow:0 20px 44px rgba(11,37,69,.22)!important;border-radius:22px!important}
html body :is(.s-hero,.teacher-hero,.mig-hero)::before{
  content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;
  background:
    radial-gradient(260px 260px at 88% 12%,rgba(56,163,238,.45),transparent 70%),
    radial-gradient(220px 220px at 70% 120%,rgba(201,162,74,.35),transparent 70%),
    radial-gradient(180px 180px at 6% -20%,rgba(255,255,255,.14),transparent 70%);
  animation:ui-orbs 14s ease-in-out infinite alternate}
@keyframes ui-orbs{from{transform:translate3d(0,0,0)}to{transform:translate3d(-4%,6%,0) scale(1.08)}}
html body :is(.s-hero,.teacher-hero,.mig-hero) .badge,html body .mig-level,html body .s-hero-meta>*{
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}

/* Judul kecil status */
.s-status,.ags-domain-tag,.ags-student-count,.ags-ai-badge,.ags-teacher-badge{transition:transform .3s var(--ui-spring)}
.s-status:hover,.ags-domain-tag:hover{transform:scale(1.05)}

/* Tabel */
html body .table-wrap{overflow:auto}
html body .table th{background:rgba(241,245,252,.8)!important;backdrop-filter:blur(6px)}
html body .table tbody tr{transition:background .2s ease}
html body .table tbody tr:hover{background:rgba(49,87,213,.05)!important}

/* ---------- Tombol hidup ---------- */
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.profile-save,.profile-cancel,.modai-login-button,.modai-register-link,.modai-register-submit,.modai-back-link,.mig-controls button,.mig-start-row button,.mig-finish button,.profile-upload-label,.modai-captcha-refresh,button.primary){
  position:relative;overflow:hidden;isolation:isolate;
  border-radius:12px!important;
  font-family:var(--ui-font-head)!important;letter-spacing:.01em;
  transition:transform .3s var(--ui-spring),box-shadow .3s var(--ui-ease),filter .25s ease,background-color .25s ease,border-color .25s ease,color .25s ease!important;
  -webkit-tap-highlight-color:transparent;will-change:transform}
/* kilau menyapu */
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.profile-save,.modai-login-button,.modai-register-submit,.mig-controls button,.mig-start-row button,.mig-finish button,button.primary)::before{
  content:"";position:absolute;top:0;bottom:0;left:-75%;width:50%;z-index:2;pointer-events:none;
  background:linear-gradient(105deg,transparent,rgba(255,255,255,.42),transparent);transform:skewX(-18deg);transition:left .7s var(--ui-ease)}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.profile-save,.modai-login-button,.modai-register-submit,.mig-controls button,.mig-start-row button,.mig-finish button,button.primary):hover::before{left:130%}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.profile-save,.profile-cancel,.modai-login-button,.modai-register-link,.modai-register-submit,.modai-back-link,.mig-controls button,.mig-start-row button,.mig-finish button,.profile-upload-label,button.primary):hover:not(:disabled){
  transform:translateY(-2px);box-shadow:0 12px 24px rgba(15,37,69,.16)}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.profile-save,.profile-cancel,.modai-login-button,.modai-register-link,.modai-register-submit,.modai-back-link,.mig-controls button,.mig-start-row button,.mig-finish button,.mig-answer-btn,.profile-upload-label,.modai-captcha-refresh,.ags-step,button.primary):active:not(:disabled){
  transform:translateY(0) scale(.96)!important;transition-duration:.08s!important}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.mig-controls button,.mig-start-row button) i{transition:transform .35s var(--ui-spring)}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.mig-controls button,.mig-start-row button):hover i{transform:scale(1.16) rotate(-6deg)}

/* Varian utama: gradien biru hidup */
html body :is(.s-btn.primary,.eco-btn.primary,.btn-primary,.modai-btn.primary,.profile-save,.modai-login-button,.modai-register-submit,.mig-controls button.primary,.mig-start-row button.primary,button.primary){
  color:#fff!important;border:0!important;
  background:linear-gradient(120deg,#3a69ee 0%,var(--ui-blue) 40%,var(--ui-blue-2) 70%,#3b8de8 100%)!important;background-size:220% 100%!important;background-position:0% 50%!important;
  box-shadow:0 8px 20px rgba(49,87,213,.30),inset 0 1px 0 rgba(255,255,255,.22)!important}
html body :is(.s-btn.primary,.eco-btn.primary,.btn-primary,.modai-btn.primary,.profile-save,.modai-login-button,.modai-register-submit,.mig-controls button.primary,.mig-start-row button.primary,button.primary):hover:not(:disabled){
  background-position:100% 50%!important;box-shadow:0 14px 30px rgba(49,87,213,.40),0 0 0 4px rgba(49,87,213,.12),inset 0 1px 0 rgba(255,255,255,.25)!important}
html body :is(.s-btn.green,.eco-btn.green,.btn-success,.mig-finish button){
  color:#fff!important;border:0!important;background:linear-gradient(120deg,#1fb17f,var(--ui-green) 55%,#0f7a57)!important;background-size:200% 100%!important;
  box-shadow:0 8px 20px rgba(22,149,106,.28)!important}
html body :is(.s-btn.green,.eco-btn.green,.btn-success,.mig-finish button):hover{background-position:100% 50%!important;box-shadow:0 14px 28px rgba(22,149,106,.38),0 0 0 4px rgba(22,149,106,.12)!important}
html body :is(.s-btn.red,.btn-danger,.modai-btn.danger){background:linear-gradient(120deg,#e2635b,var(--ui-red))!important;color:#fff!important;border:0!important;box-shadow:0 8px 18px rgba(209,75,68,.26)!important}
html body :is(.s-btn.amber,.btn-warning){background:linear-gradient(120deg,#eaa63a,var(--ui-amber))!important;color:#fff!important;border:0!important;box-shadow:0 8px 18px rgba(211,138,29,.26)!important}
html body :is(.s-btn.dark,.eco-btn.dark,.btn-dark){background:linear-gradient(120deg,#1c3766,var(--ui-navy))!important;color:#fff!important;border:0!important;box-shadow:0 8px 18px rgba(11,37,69,.26)!important}
html body :is(.s-btn.soft,.btn-soft,.modai-btn.soft,.profile-cancel,.mig-controls button:not(.primary)){
  background:rgba(49,87,213,.08)!important;color:var(--ui-blue-2)!important;border:1px solid rgba(49,87,213,.14)!important;box-shadow:none!important}
html body :is(.s-btn.soft,.btn-soft,.modai-btn.soft,.profile-cancel,.mig-controls button:not(.primary)):hover:not(:disabled){background:rgba(49,87,213,.14)!important;border-color:rgba(49,87,213,.3)!important}
html body :is(.s-btn.outline,.eco-btn.outline,.btn-ghost,.modai-register-link,.modai-back-link){
  background:rgba(255,255,255,.6)!important;border:1.5px solid rgba(49,87,213,.28)!important;color:var(--ui-blue-2)!important}
html body :is(.s-btn.outline,.eco-btn.outline,.btn-ghost,.modai-register-link,.modai-back-link):hover{background:#fff!important;border-color:var(--ui-blue)!important;box-shadow:0 10px 22px rgba(49,87,213,.16),0 0 0 4px rgba(49,87,213,.08)!important}
html body :is(.s-btn,.eco-btn,.btn,.modai-btn,.mig-controls button,.mig-start-row button,button.primary):disabled{filter:grayscale(.35);opacity:.55!important;cursor:not-allowed;transform:none!important}
html body .modai-captcha-refresh:hover{transform:translateY(-2px) rotate(-8deg)!important;box-shadow:0 10px 20px rgba(49,87,213,.18)}

/* Riak (ripple) dari JS */
.ui-ripple{position:absolute;z-index:3;border-radius:50%;pointer-events:none;transform:scale(0);opacity:.55;
  background:radial-gradient(circle,rgba(255,255,255,.9) 0%,rgba(255,255,255,.4) 40%,transparent 70%);animation:ui-ripple .65s var(--ui-ease) forwards}
.ui-ripple.dark{background:radial-gradient(circle,rgba(49,87,213,.35) 0%,rgba(49,87,213,.12) 45%,transparent 70%)}
@keyframes ui-ripple{to{transform:scale(1);opacity:0}}

/* Langkah wizard & pilihan */
html body .ags-step{position:relative;overflow:hidden;border-radius:14px!important;transition:transform .3s var(--ui-spring),background .25s ease,box-shadow .3s ease,color .25s ease!important}
html body .ags-step:hover:not(.active){transform:translateY(-2px);background:#fff!important;box-shadow:0 10px 20px rgba(15,37,69,.08)}
html body .ags-step.active{background:linear-gradient(120deg,var(--ui-blue),var(--ui-sky))!important;box-shadow:0 10px 22px rgba(49,87,213,.3)!important;border-color:transparent!important}
html body .ags-choice span,html body .ags-source-tabs span{border-radius:16px!important;transition:transform .3s var(--ui-spring),box-shadow .3s ease,border-color .25s ease,background .25s ease!important}
html body .ags-source-tabs span{border-radius:12px!important}
html body .ags-choice span:hover,html body .ags-source-tabs span:hover{transform:translateY(-3px);border-color:rgba(49,87,213,.35)!important;box-shadow:0 12px 24px rgba(15,37,69,.08)}
html body .ags-choice input:checked+span{animation:ui-pop .4s var(--ui-spring)}
@keyframes ui-pop{0%{transform:scale(.96)}60%{transform:scale(1.03)}100%{transform:scale(1)}}

/* ---------- Isian yang lembut (tidak kaku) ---------- */
html body :is(input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=hidden],[type=submit],[type=button],[type=color],[type=image],[type=reset]),select,textarea){
  border:1.5px solid rgba(15,37,69,.12)!important;
  border-radius:14px!important;
  background-color:rgba(255,255,255,.78)!important;
  color:var(--ui-ink)!important;
  font-family:var(--ui-font)!important;
  box-shadow:inset 0 1px 2px rgba(15,37,69,.04)!important;
  outline:none!important;
  transition:border-color .25s ease,box-shadow .3s var(--ui-ease),background-color .25s ease,transform .3s var(--ui-ease)!important;
  caret-color:var(--ui-blue)}
html body :is(input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=hidden],[type=submit],[type=button],[type=color],[type=image],[type=reset]),select,textarea):hover:not(:focus):not([readonly]):not(:disabled){
  border-color:rgba(49,87,213,.32)!important;background-color:rgba(255,255,255,.95)!important}
html body :is(input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=hidden],[type=submit],[type=button],[type=color],[type=image],[type=reset]),select,textarea):focus{
  border-color:var(--ui-blue)!important;background-color:#fff!important;
  box-shadow:0 0 0 4px rgba(49,87,213,.13),0 10px 24px rgba(49,87,213,.10)!important;transform:translateY(-1px)}
html body :is(input,textarea)::placeholder{color:#9aa7ba!important;opacity:1;transition:opacity .25s ease,transform .25s ease}
html body :is(input,textarea):focus::placeholder{opacity:.45}
html body textarea{line-height:1.55!important;resize:vertical;min-height:84px}
html body :is(input,textarea)[readonly],html body :is(input,select,textarea):disabled{background-color:rgba(241,245,250,.75)!important;color:#5b6b82!important;cursor:not-allowed}
html body select:not([multiple]){
  -webkit-appearance:none!important;appearance:none!important;cursor:pointer;padding-right:38px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233157d5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 13px center!important;background-size:16px!important}
html body input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px #f3f7ff inset!important;-webkit-text-fill-color:var(--ui-ink)!important}
html body input.ui-valid:not(:focus){border-color:rgba(22,149,106,.45)!important}
html body input.ui-invalid:not(:focus){border-color:rgba(209,75,68,.55)!important;animation:ui-shake .35s ease}
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--ui-blue)}
input[type=checkbox],input[type=radio]{transition:transform .25s var(--ui-spring)}
input[type=checkbox]:active,input[type=radio]:active{transform:scale(.85)}
/* label ikut menyala saat fokus */
:is(.s-field,.eco-field,.modai-field,.profile-field,.field,.ags-student-form label):focus-within>label,
:is(.s-field,.eco-field,.modai-field,.profile-field,.field):focus-within label{color:var(--ui-blue)!important;transition:color .25s ease}
:is(.s-field,.eco-field,.modai-field,.profile-field,.field) label{transition:color .25s ease}
/* file input */
html body input[type=file]{font-family:var(--ui-font);font-size:13px}
html body input[type=file]::file-selector-button{border:0;border-radius:10px;padding:8px 14px;margin-right:10px;cursor:pointer;
  background:rgba(49,87,213,.10);color:var(--ui-blue-2);font-weight:700;transition:background .25s ease}
html body input[type=file]::file-selector-button:hover{background:rgba(49,87,213,.2)}
/* details/summary */
html body details{transition:background .25s ease}
html body summary{transition:color .2s ease}
html body summary:hover{color:var(--ui-blue)}

/* Notifikasi */
html body :is(.notice,.profile-note,.ags-note,.ags-publish-box,.ags-safety,.mig-privacy,.mig-success){
  border-radius:14px!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:ui-in .45s var(--ui-ease) both}

/* Fokus keyboard */
:focus-visible{outline:3px solid rgba(56,163,238,.55)!important;outline-offset:2px!important}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none!important}

/* ---------- Kartu masuk & daftar ---------- */
html body :is(.modai-auth-card,.modai-register-card){
  background:rgba(255,255,255,.74)!important;-webkit-backdrop-filter:saturate(170%) blur(22px);backdrop-filter:saturate(170%) blur(22px);
  border:1px solid rgba(255,255,255,.85)!important;box-shadow:inset 0 1px 0 #fff,var(--ui-shadow-lg)!important;border-radius:26px!important}
html body .modai-inst-strip{background:rgba(255,255,255,.75)!important;border-color:rgba(255,255,255,.9)!important}
html body .modai-captcha-box{border-radius:14px!important;border-color:rgba(15,37,69,.10)!important}
html body .login-body{position:relative}
html body.login .login-body::before,html body.login .login-body::after{
  content:"";position:fixed;z-index:-1;border-radius:50%;filter:blur(2px);pointer-events:none;opacity:.55}
html body.login .login-body::before{width:280px;height:280px;left:6%;top:26%;background:radial-gradient(circle at 30% 30%,rgba(56,163,238,.55),rgba(49,87,213,.18) 60%,transparent 70%);animation:ui-float 11s ease-in-out infinite}
html body.login .login-body::after{width:220px;height:220px;right:8%;bottom:10%;background:radial-gradient(circle at 30% 30%,rgba(201,162,74,.55),rgba(201,162,74,.14) 60%,transparent 70%);animation:ui-float 13s ease-in-out infinite reverse}
@keyframes ui-float{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(18px,-26px,0)}}

/* ---------- Animasi masuk ---------- */
@keyframes ui-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes ui-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.ui-js .ui-reveal{opacity:0}
.ui-js .ui-reveal.ui-shown{animation:ui-reveal .65s var(--ui-ease) var(--ui-d,0ms) both}
@keyframes ui-reveal{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
.ui-count{font-variant-numeric:tabular-nums}

/* Footer */
.student-footer,.teacher-footer,.footer{color:#8090a8!important;background:transparent!important}

/* ---------- Responsif ---------- */
@media(max-width:1000px){
  :root{--ui-top-h:66px}
  html body .student-topbar,html body .teacher-topbar,html body header.top,html body .login-head,html body .mig-topbar{padding:0 16px!important;gap:10px!important}
  html body .student-logo-img,html body .teacher-logo-img,html body .top-brand-logo,html body .login-brand-logo,html body .mig-brand img{height:40px!important;padding:5px 8px!important;border-radius:11px!important}
  .student-brand,.teacher-brand{font-size:18px!important}
  html body .student-sidebar,html body .teacher-sidebar{border-right:0!important;border-bottom:1px solid rgba(255,255,255,.7)!important}
}
@media(max-width:640px){
  .student-brand-sub,.teacher-brand-sub,.top-brand-copy span,.login-brand-copy span,.mig-brand small{display:none!important}
  .student-brand b,.teacher-brand b{display:none!important}
  html body .student-profile,html body .teacher-profile,html body .top-account-copy{display:none!important}
  html body .student-account-link,html body .teacher-account-link,html body .top-account-link{padding:3px!important}
  html body .student-profile-btn,html body .teacher-profile-btn,html body .top-profile-btn{display:none!important}
  html body .student-logout-btn,html body .student-notif-top,html body .logout-btn,html body .top-logout-btn{width:36px!important;height:36px!important;border-radius:10px!important}
  html body .student-logo-img,html body .teacher-logo-img,html body .top-brand-logo,html body .login-brand-logo,html body .mig-brand img{height:38px!important}
  html body :is(.modai-auth-card,.modai-register-card){border-radius:22px!important}
  html body :is(.s-hero,.teacher-hero,.mig-hero){border-radius:18px!important}
  .ui-spot::after{display:none}
}

/* Navigasi seluler: pita geser horizontal */
@media(max-width:1000px){
  html body .student-shell>*,html body .teacher-shell>*{min-width:0!important;max-width:100vw}
  html body .student-sidebar,html body .teacher-sidebar{position:sticky!important;top:var(--ui-top-h)!important;z-index:40!important;height:auto!important;padding:10px 12px!important;overflow:visible!important}
  html body .student-nav,html body .teacher-nav{display:flex!important;flex-direction:row!important;gap:8px!important;overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important;padding:2px 2px 6px!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  html body .student-nav::-webkit-scrollbar,html body .teacher-nav::-webkit-scrollbar{display:none}
  html body .student-nav-item,html body .teacher-nav-item{flex:0 0 auto!important;min-height:38px!important;padding:0 14px!important;white-space:nowrap!important;scroll-snap-align:start;background:rgba(255,255,255,.7)!important;border:1px solid rgba(15,37,69,.07)!important;gap:8px!important}
  html body .student-nav-item.active,html body .teacher-nav-item.active{border-color:transparent!important}
  html body .student-nav-item.active::before,html body .teacher-nav-item.active::before{display:none}
  html body .student-nav-item:hover:not(.active),html body .teacher-nav-item:hover:not(.active){transform:none}
  html body .student-nav-head,html body .teacher-nav-head,html body .student-info-box,html body .teacher-control-box{display:none!important}
  html body .student-nav-item em{position:static!important;margin-left:4px}
}
@media(max-width:480px){
  html body .student-brand-text,html body .teacher-brand-text,html body .top-brand-copy{display:none!important}
  html body .login-brand-copy strong{font-size:18px!important}
  html body .student-top-actions,html body .teacher-top-actions,html body .top-account{gap:6px!important}
}
html body .login-brand-copy strong,html body .top-brand-copy strong{font-size:21px!important}
html body .student-top-actions,html body .teacher-top-actions,html body .top-account{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:9px!important}
html body .student-brand-wrap,html body .teacher-brand-wrap,html body .top-brand-wrap,html body .login-brand-wrap{flex:1 1 auto!important;overflow:hidden}
html body .login-head .modai-langsw{width:auto!important;flex:0 0 auto!important}
@media (hover:none){
  html body :is(.s-learning-card,.ags-student-game,.ags-assignment-card,.eco-student-card,.s-kpi,.kpi):hover{transform:none!important}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .ui-js .ui-reveal{opacity:1;transform:none}
}

/* ===== Mode cepat v9: tanpa efek berat, respon instan ===== */
html body *,html body *::before,html body *::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.ui-js .ui-reveal,html.ui-js .ui-reveal.ui-shown{opacity:1!important;animation:none!important;transform:none!important}
html body .ui-spot::before,html body .ui-spot::after{display:none!important}
html body *{transition-duration:.12s!important;animation-duration:.2s!important}
html body .mv-badge.live::before,html body .kq-timer.warn{animation-duration:1.2s!important}
html body .student-topbar,html body .teacher-topbar,html body header.top,html body .mig-topbar{background:#0e2a52!important}
html body .student-sidebar,html body .teacher-sidebar,html body .side{background:#f7f9fd!important}
html body :is(.eco-card,.s-card,.card,.kpi,.s-kpi,.eco-head,.s-head,.tg-tabs){background-color:#fff!important}
html body .ui-ripple{display:none!important}
.ui-navbar{position:fixed;top:0;left:0;height:3px;width:0;z-index:9999;background:linear-gradient(90deg,#38a3ee,#2454c6);box-shadow:0 0 8px rgba(36,84,198,.6);pointer-events:none}
.ui-navbar.go{animation:ui-nav 1.6s cubic-bezier(.1,.7,.3,1) forwards!important;animation-duration:1.6s!important}
@keyframes ui-nav{0%{width:0}60%{width:70%}100%{width:92%}}
