/* =============================================================
   cintabelajar.com — shared app shell (sidebar + topbar + widgets)
   Dipakai oleh: dashboard.php, sd.php, smp.php, sma.php,
   bahasainggris.php, tesmasukkerja.php
   ============================================================= */
:root{
  --pink:#ec4899;
  --pink-dark:#db2777;
  --blue:#2563eb;
  --navy:#1e2a4a;
  --green:#16a34a;
  --orange:#f97316;
  --purple:#9333ea;
  --yellow:#facc15;
  --bg:#f6f8fc;
  --accent:#2563eb;
  --accent-soft:#eaf1ff;
}
*{box-sizing:border-box;}
body{
  margin:0;
  font-family:"Baloo 2","Poppins",Arial,sans-serif;
  background:var(--bg);
  color:var(--navy);
}
img{max-width:100%;display:block;}
a{text-decoration:none;color:inherit;}
button{font-family:inherit;}

/* theme accents per halaman */
body.theme-pink{--accent:#ec4899;--accent-soft:#fce7f3;}
body.theme-blue{--accent:#2563eb;--accent-soft:#dbeafe;}
body.theme-green{--accent:#16a34a;--accent-soft:#dcfce7;}
body.theme-orange{--accent:#f97316;--accent-soft:#ffedd5;}
body.theme-purple{--accent:#9333ea;--accent-soft:#f3e8ff;}
body.theme-yellow{--accent:#d97706;--accent-soft:#fef3c7;}

/* ---------- APP SHELL ---------- */
.app-shell{display:flex;min-height:100vh;align-items:flex-start;}

/* ---------- SIDEBAR ---------- */
.sidebar{
  width:250px;
  flex-shrink:0;
  background:#fff;
  border-right:1px solid #eef1f6;
  padding:18px 16px 24px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:16px;
  z-index:50;
}
.sidebar .logo{display:flex;align-items:center;gap:8px;padding:0 6px;}
.sidebar .logo img{height:38px;width:auto;}
.sidebar-toggle{
  display:flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:12px;border:none;background:#fff;color:#334155;cursor:pointer;flex-shrink:0;box-shadow:0 2px 8px rgba(0,0,0,.08);
  position:relative;z-index:60;
}
.sidebar-toggle svg{width:22px;height:22px;}

/* Sidebar sebagai overlay: default tertutup (collapsed). */
.sidebar{position:fixed;left:0;top:0;transform:translateX(0);transition:transform .22s ease;box-shadow:2px 0 16px rgba(0,0,0,.12);}
.app-shell.sidebar-collapsed .sidebar{transform:translateX(-105%);box-shadow:none;}
/* backdrop saat sidebar terbuka */
.app-shell::after{content:"";position:fixed;inset:0;background:rgba(15,23,42,.35);opacity:1;transition:opacity .22s;z-index:40;pointer-events:auto;}
.app-shell.sidebar-collapsed::after{opacity:0;pointer-events:none;}
/* konten memenuhi lebar penuh karena sidebar overlay */
.main-col{width:100%;}

/* ===== Desktop (layar lebar): sidebar mendorong konten, bukan menutupi ===== */
@media (min-width:901px){
  /* saat sidebar terbuka, ia kembali jadi bagian alur (sticky) dan mendorong konten */
  .app-shell:not(.sidebar-collapsed) .sidebar{
    position:sticky; top:0; transform:none; box-shadow:none;
    border-right:1px solid #eef1f6;
  }
  /* saat terbuka, main-col menyesuaikan lebar sisa (flex), tidak lagi 100% penuh */
  .app-shell:not(.sidebar-collapsed) .main-col{width:auto;}
  /* tidak ada backdrop gelap di desktop */
  .app-shell::after{display:none;}
  /* saat collapsed di desktop, sidebar benar-benar hilang dari alur */
  .app-shell.sidebar-collapsed .sidebar{position:fixed;}
}

/* Slim topbar: hanya tombol menu */
.topbar-slim{display:flex;align-items:center;padding:12px 16px;position:sticky;top:0;z-index:45;}

/* Profil + notif di atas sidebar */
.sidebar-profile{background:#f8fafc;border:1px solid #eef1f6;border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px;}
.sidebar-profile .sp-user{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;}
.sidebar-profile .sp-user img{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#eee;flex-shrink:0;}
.sidebar-profile .who{display:flex;flex-direction:column;line-height:1.2;font-size:13px;}
.sidebar-profile .who b{font-size:14px;color:#1e293b;}
.sidebar-profile .who span{color:#64748b;font-size:11.5px;}
.sidebar-profile .sp-actions{display:flex;gap:8px;}
.sidebar-profile .sp-icon{position:relative;width:38px;height:38px;border-radius:10px;border:none;background:#fff;border:1px solid #eef1f6;color:#334155;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;}
.sidebar-profile .sp-icon .badge{position:absolute;top:-4px;right:-4px;background:#ef4444;color:#fff;font-size:10px;font-weight:800;min-width:16px;height:16px;border-radius:999px;display:flex;align-items:center;justify-content:center;padding:0 3px;}
.sidebar-profile .sp-pill{display:flex;align-items:center;gap:6px;background:#fef9c3;color:#a16207;font-weight:800;font-size:12.5px;padding:8px 12px;border-radius:999px;justify-content:center;}

.sidebar-nav{display:flex;flex-direction:column;gap:3px;flex:1;}
.sidebar-nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:12px;
  font-weight:700;font-size:13.5px;color:#475569;
  border-left:3px solid transparent;
}
.sidebar-nav a .ico{width:20px;height:20px;flex-shrink:0;display:flex;align-items:center;justify-content:center;}
.sidebar-nav a .ico svg{width:19px;height:19px;}
.sidebar-nav a:hover{background:#f8fafc;}
.sidebar-nav a.active{
  background:var(--accent-soft);
  color:var(--accent);
  border-left:3px solid var(--accent);
}
.sidebar-nav a.sidebar-logout{
  color:#dc2626;
  margin-top:8px;
  border-top:1px solid #eef1f6;
  padding-top:12px;
}
.sidebar-nav a.sidebar-logout:hover{background:#fef2f2;}
.sidebar-quote{
  background:linear-gradient(160deg,#1e2a4a,#334155);
  border-radius:16px;
  padding:16px;
  color:#fff;
  text-align:center;
}
.sidebar-quote img{width:72px;margin:0 auto 8px;}
.sidebar-quote h5{margin:0 0 6px;font-size:13px;line-height:1.3;}
.sidebar-quote p{margin:0;font-size:11.5px;font-style:italic;color:#cbd5e1;}

/* ---------- TOPBAR ---------- */
.main-col{flex:1;min-width:0;}
.topbar{
  display:flex;align-items:center;gap:14px;
  padding:12px 24px;background:#fff;
  border-bottom:1px solid #eef1f6;
  position:sticky;top:0;z-index:40;
}
.topbar .search-mini{
  flex:1;max-width:420px;
  display:flex;align-items:center;gap:8px;
  background:#f1f5f9;border-radius:999px;
  padding:9px 16px;
}
.topbar .search-mini input{flex:1;border:none;background:none;outline:none;font-size:13.5px;font-family:inherit;}
.topbar-spacer{flex:1;}
.topbar-icon-btn{
  position:relative;width:38px;height:38px;border-radius:50%;
  background:#f1f5f9;border:none;display:flex;align-items:center;justify-content:center;
  color:#475569;cursor:pointer;flex-shrink:0;
}
.topbar-icon-btn .badge{
  position:absolute;top:-2px;right:-2px;background:#ef4444;color:#fff;
  font-size:10px;font-weight:800;border-radius:999px;min-width:16px;height:16px;
  display:flex;align-items:center;justify-content:center;padding:0 3px;
}
.topbar-pill{
  display:flex;align-items:center;gap:6px;
  background:#fef3c7;color:#92400e;font-weight:800;font-size:13px;
  padding:7px 14px;border-radius:999px;white-space:nowrap;flex-shrink:0;
}
.topbar-user{display:flex;align-items:center;gap:8px;flex-shrink:0;cursor:pointer;}
.topbar-user img{width:36px;height:36px;border-radius:50%;object-fit:cover;background:#eee;}
.topbar-user .who{line-height:1.2;}
.topbar-user .who b{font-size:13.5px;display:block;}
.topbar-user .who span{font-size:11.5px;color:#64748b;}

.breadcrumb{
  padding:14px 24px 0;font-size:13px;color:#64748b;font-weight:600;
}
.breadcrumb a{color:var(--accent);}

/* ---------- CONTENT GRID ---------- */
.content-grid{
  display:grid;
  grid-template-columns:1fr 320px;
  gap:20px;
  padding:16px 24px 40px;
  max-width:100%;
  width:100%;
}
.main-content{min-width:0;display:flex;flex-direction:column;gap:20px;}
.side-content{display:flex;flex-direction:column;gap:16px;}
.panel-card{
  background:#fff;border-radius:20px;padding:22px 24px;
  box-shadow:0 4px 16px rgba(30,42,74,.06);
}
.panel-card h3{margin:0 0 16px;font-size:17px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.panel-card h3 .see-all{font-size:12.5px;color:var(--accent);font-weight:700;}

/* ---------- HERO BANNER (app pages) ---------- */
.app-hero{
  position:relative;border-radius:22px;overflow:hidden;
  background-size:cover;background-position:center;
  min-height:230px;padding:28px;color:#fff;
  display:flex;flex-direction:column;justify-content:center;
}
.app-hero::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(15,23,42,.55),rgba(15,23,42,.15));}
.app-hero-inner{position:relative;z-index:2;max-width:640px;}
.app-hero-inner h1{margin:0 0 8px;font-size:30px;line-height:1.2;}
.app-hero-inner p{margin:0;font-size:14.5px;opacity:.95;font-weight:600;}
.speech-bubble{
  position:absolute;background:#fff;color:var(--navy);
  padding:8px 14px;border-radius:14px;font-size:12.5px;font-weight:700;
  box-shadow:0 4px 10px rgba(0,0,0,.12);z-index:3;
}
.signboard{
  position:absolute;right:22px;bottom:18px;background:#8b5a2b;color:#fff;
  padding:12px 16px;border-radius:10px;font-size:12px;font-weight:800;
  line-height:2;z-index:3;box-shadow:0 6px 14px rgba(0,0,0,.18);
}
.signboard .ok{color:#4ade80;margin-right:6px;}
.hero-char{position:absolute;bottom:-6px;height:112%;z-index:1;object-fit:contain;pointer-events:none;}
.hero-char.right{right:4%;}
.hero-char.left{left:4%;}
@media (max-width:900px){ .hero-char{display:none;} }

/* ---------- TABS / FILTER PILLS ---------- */
.pill-tabs{display:flex;gap:8px;flex-wrap:wrap;}
.pill-tabs button{
  border:1px solid #e2e8f0;background:#fff;color:#475569;
  padding:8px 16px;border-radius:999px;font-weight:700;font-size:13px;cursor:pointer;
}
.pill-tabs button.active{background:var(--accent);border-color:var(--accent);color:#fff;}

/* ---------- SUBJECT CARDS (SD/SMP/SMA) ---------- */
.search-inline{
  display:flex;align-items:center;gap:8px;background:#f1f5f9;border-radius:10px;
  padding:8px 12px;max-width:260px;margin-left:auto;
}
.search-inline input{border:none;background:none;outline:none;font-size:13px;font-family:inherit;flex:1;}
.subject-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.subj-card{
  border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:8px;
}
.subj-card .ico{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.6);}
.subj-card .ico svg{width:22px;height:22px;}
.subj-card .ico:has(img){background:transparent;overflow:hidden;}
.subj-card .ico img{width:100%;height:100%;object-fit:contain;}
.subj-card h4{margin:0;font-size:14.5px;}
.subj-card .count{font-size:12px;color:#475569;font-weight:600;}
.subj-card .go{
  margin-top:auto;display:inline-flex;align-items:center;gap:6px;
  padding:7px 12px;border-radius:999px;color:#fff;font-size:12px;font-weight:800;
  align-self:flex-start;
}

/* ---------- FEATURE MINI ROW ---------- */
.feature-mini-row{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
.feature-mini-row.cols-6{grid-template-columns:repeat(6,1fr);}
.cta-img-banner{border-radius:22px;overflow:hidden;box-shadow:0 8px 24px rgba(30,42,74,.1);}
.cta-img-banner img{width:100%;display:block;}
.feature-mini{text-align:center;padding:6px;}
.feature-mini .ico{
  width:50px;height:50px;border-radius:14px;margin:0 auto 10px;
  display:flex;align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent);
}
.feature-mini .ico svg{width:24px;height:24px;}
.feature-mini .ico img{width:32px;height:32px;object-fit:contain;}
.feature-mini h5{margin:0 0 4px;font-size:13.5px;}
.feature-mini p{margin:0;font-size:11.5px;color:#64748b;line-height:1.4;}

/* ---------- HORIZONTAL RECOMMENDATION SCROLL ---------- */
.reco-wrap{position:relative;}
.reco-scroll{
  display:flex;gap:14px;overflow-x:auto;scroll-behavior:smooth;
  padding-bottom:4px;
}
.reco-scroll::-webkit-scrollbar{height:6px;}
.reco-scroll::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:99px;}
.reco-card{
  flex:0 0 175px;background:#f8fafc;border-radius:14px;overflow:hidden;
}
.reco-card .thumb{height:90px;display:flex;align-items:center;justify-content:center;font-size:30px;}
.reco-card .thumb img{width:100%;height:100%;object-fit:cover;}
.reco-card .body{padding:10px 12px;}
.reco-card h6{margin:0;font-size:12.5px;line-height:1.4;}
.reco-nav{
  position:absolute;top:38%;width:30px;height:30px;border-radius:50%;
  background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15);border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:5;
}
.reco-nav.prev{left:-14px;}
.reco-nav.next{right:-14px;}

/* ---------- QUOTE STRIP ---------- */
.quote-banner{
  border-radius:22px;overflow:hidden;position:relative;min-height:140px;
  background-size:cover;background-position:center;
  display:flex;align-items:center;padding:24px 30px;
}
.quote-banner::before{content:'';position:absolute;inset:0;background:rgba(15,23,42,.28);}
.quote-banner p{position:relative;z-index:2;color:#fff;font-size:19px;font-weight:700;margin:0;max-width:560px;text-shadow:0 2px 6px rgba(0,0,0,.35);}

/* ---------- PROGRESS DONUT ---------- */
.donut-row{display:flex;align-items:center;gap:16px;}
.donut{
  width:76px;height:76px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;position:relative;
}
.donut::after{content:'';position:absolute;inset:8px;background:#fff;border-radius:50%;}
.donut span{position:relative;z-index:2;font-weight:800;font-size:15px;color:var(--navy);}
.donut-info b{display:block;font-size:14px;}
.donut-info span{font-size:12px;color:#64748b;}

/* ---------- TARGET / CHECKLIST ---------- */
.target-item{margin-bottom:12px;}
.target-item:last-child{margin-bottom:0;}
.target-item .lbl{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;margin-bottom:5px;}
.target-item .lbl .chk{width:15px;height:15px;border-radius:5px;border:2px solid #cbd5e1;flex-shrink:0;display:flex;align-items:center;justify-content:center;}
.target-item.done .lbl .chk{background:var(--accent);border-color:var(--accent);}
.target-item.done .lbl .chk svg{width:10px;height:10px;stroke:#fff;}
.progress-track{height:7px;border-radius:99px;background:#e2e8f0;overflow:hidden;}
.progress-track > span{display:block;height:100%;border-radius:99px;background:var(--accent);}
.target-item .frac{font-size:11px;color:#94a3b8;font-weight:700;float:right;}

/* ---------- ACTIVITY LIST ---------- */
.activity-item{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px dashed #eef1f6;}
.activity-item:last-child{border-bottom:none;padding-bottom:0;}
.activity-item .ico{width:30px;height:30px;border-radius:9px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.activity-item .ico svg{width:16px;height:16px;}
.activity-item .txt b{display:block;font-size:12.5px;line-height:1.35;}
.activity-item .txt span{font-size:11px;color:#94a3b8;}
.activity-item-link{text-decoration:none;color:inherit;cursor:pointer;border-radius:8px;margin:0 -8px;padding:9px 8px;}
.activity-item-link:hover{background:#f8fafc;}

/* ---------- CALENDAR WIDGET ---------- */
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:800;font-size:13.5px;}
.cal-head button{border:none;background:#f1f5f9;width:24px;height:24px;border-radius:50%;cursor:pointer;color:#64748b;}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center;font-size:11px;}
.cal-grid .dow{color:#94a3b8;font-weight:800;padding-bottom:4px;}
.cal-grid .day{padding:6px 0;border-radius:8px;color:#334155;position:relative;}
.cal-grid .day.today{background:var(--accent);color:#fff;font-weight:800;}
.cal-grid .day.has-activity::after{content:'';position:absolute;bottom:2px;left:50%;transform:translateX(-50%);width:4px;height:4px;border-radius:50%;background:var(--accent);}
.cal-grid .day.today.has-activity::after{background:#fff;}
.cal-grid .day.empty{visibility:hidden;}

/* ---------- MINI CTA (side) ---------- */
.side-cta{
  border-radius:16px;padding:16px;background:linear-gradient(160deg,var(--accent),var(--navy));color:#fff;
}
.side-cta b{display:block;font-size:14px;margin-bottom:10px;}
.side-cta a{
  display:inline-flex;align-items:center;gap:6px;background:#fff;color:var(--accent);
  font-weight:800;font-size:12.5px;padding:9px 14px;border-radius:999px;
}
.quote-card{
  background:#f8fafc;border-radius:14px;padding:14px 16px;font-size:12.5px;font-style:italic;color:#475569;
  border-left:3px solid var(--accent);
}

/* ---------- STAT CHIPS (dashboard profile row) ---------- */
.profile-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.profile-row .avatar-big{width:56px;height:56px;border-radius:50%;flex-shrink:0;}
.profile-row .name b{font-size:16px;display:block;}
.profile-row .name span{font-size:12.5px;color:#64748b;}
.stat-chips{display:flex;gap:10px;flex-wrap:wrap;margin-left:auto;}
.stat-chip{
  background:#f8fafc;border-radius:12px;padding:8px 14px;text-align:center;min-width:88px;
}
.stat-chip b{display:block;font-size:15px;}
.stat-chip span{font-size:10.5px;color:#64748b;font-weight:700;}

/* ---------- BOTTOM VALUE STRIP (dashboard) ---------- */
.value-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;text-align:center;}
.value-strip .v-item .ico{width:40px;height:40px;margin:0 auto 8px;color:var(--accent);}
.value-strip .v-item .ico svg{width:34px;height:34px;}
.value-strip .v-item span{font-size:12.5px;font-weight:700;}

/* ---------- RESPONSIVE ---------- */
@media (max-width:1200px){
  .content-grid{grid-template-columns:1fr;}
  .subject-grid{grid-template-columns:repeat(3,1fr);}
  .feature-mini-row, .feature-mini-row.cols-6{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:900px){
  .sidebar{width:82%;max-width:300px;bottom:0;}
  .subject-grid{grid-template-columns:repeat(2,1fr);}
  .feature-mini-row, .feature-mini-row.cols-6{grid-template-columns:repeat(2,1fr);}
  .value-strip{grid-template-columns:repeat(2,1fr);}
  .app-hero-inner h1{font-size:24px;}
  .signboard{display:none;}
  .profile-row .stat-chips{margin-left:0;width:100%;}
}
@media (max-width:560px){
  .subject-grid{grid-template-columns:1fr 1fr;}
  .feature-mini-row, .feature-mini-row.cols-6{grid-template-columns:1fr 1fr;}
  .topbar-user .who{display:none;}
  .app-hero{min-height:190px;padding:20px;}
}

/* =============================================================
   AUTH PAGES (login / register)
   ============================================================= */
.auth-shell{
  min-height:100vh;display:flex;align-items:stretch;background:var(--bg);
}
.auth-visual{
  flex:1;position:relative;overflow:hidden;color:#fff;
  background:linear-gradient(160deg,#1e3a8a,#312e81);
  display:flex;flex-direction:column;justify-content:center;
  padding:48px;background-size:cover;background-position:center;
}
.auth-visual::before{content:'';position:absolute;inset:0;background:rgba(15,23,42,.45);}
.auth-visual-inner{position:relative;z-index:2;max-width:420px;}
.auth-visual-inner .logo img{height:34px;margin-bottom:22px;}
.auth-visual-inner h1{font-size:28px;line-height:1.25;margin:0 0 12px;}
.auth-visual-inner p{font-size:14px;opacity:.9;margin:0 0 24px;line-height:1.6;}
.auth-feature-row{display:flex;gap:18px;flex-wrap:wrap;}
.auth-feature{text-align:center;font-size:11.5px;font-weight:700;max-width:80px;}
.auth-feature .ico{width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;margin:0 auto 8px;}
.auth-feature .ico svg{width:22px;height:22px;}
.auth-form-col{
  width:460px;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:32px;
}
.auth-card{width:100%;max-width:380px;}
.auth-card .logo-mobile{display:none;text-align:center;margin-bottom:18px;}
.auth-card .logo-mobile img{height:36px;margin:0 auto;}
.auth-steps{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:22px;}
.auth-steps .step{width:26px;height:26px;border-radius:50%;background:#e2e8f0;color:#94a3b8;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;}
.auth-steps .step.active{background:var(--pink);color:#fff;}
.auth-steps .bar{width:34px;height:2px;background:#e2e8f0;}
.auth-card h2{font-size:22px;margin:0 0 6px;text-align:center;}
.auth-card p.sub{text-align:center;font-size:13px;color:#64748b;margin:0 0 22px;}
.field{margin-bottom:14px;}
.field label{display:block;font-size:12.5px;font-weight:700;margin-bottom:6px;color:#334155;}
.field .input-wrap{display:flex;align-items:center;gap:8px;border:1.5px solid #e2e8f0;border-radius:10px;padding:10px 12px;background:#fff;}
.field .input-wrap:focus-within{border-color:var(--pink);}
.field .input-wrap svg{width:16px;height:16px;color:#94a3b8;flex-shrink:0;}
.field .input-wrap input,.field .input-wrap select{border:none;outline:none;flex:1;font-size:13.5px;font-family:inherit;background:none;min-width:0;}
.field .toggle-pw{cursor:pointer;color:#94a3b8;flex-shrink:0;}
.field-row{display:flex;gap:10px;}
.field-row .field{flex:1;}
.checkline{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:#475569;margin-bottom:16px;}
.checkline input{margin-top:2px;}
.checkline a{color:var(--pink);font-weight:700;}
.btn-auth-submit{
  width:100%;padding:12px;border:none;border-radius:10px;
  background:linear-gradient(180deg,#f472b6,#ec4899);color:#fff;font-weight:800;font-size:14px;cursor:pointer;
  box-shadow:0 4px 0 var(--pink-dark);
}
.auth-divider{display:flex;align-items:center;gap:10px;margin:18px 0;color:#94a3b8;font-size:11.5px;font-weight:700;}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:#e2e8f0;}
.social-row{display:flex;gap:10px;}
.social-row.single{display:block;}
.social-row button,.social-row a{
  flex:1;border:1.5px solid #e2e8f0;background:#fff;border-radius:10px;padding:10px;
  display:flex;align-items:center;justify-content:center;cursor:pointer;font-weight:800;font-size:13px;color:#334155;
}
/* Tombol Google satu baris penuh dengan logo warna */
.google-btn{
  width:100%;box-sizing:border-box;border:1.5px solid #dadce0;background:#fff;border-radius:12px;
  padding:12px 16px;display:flex;align-items:center;justify-content:center;gap:12px;
  cursor:pointer;font-weight:700;font-size:14.5px;color:#3c4043;text-decoration:none;
  transition:background .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.google-btn:hover{background:#f8faff;border-color:#c7d2fe;box-shadow:0 2px 8px rgba(60,64,67,.12);}
.google-btn .g-logo{flex:0 0 auto;display:block;}
.google-btn span{line-height:1;}
.auth-switch{text-align:center;font-size:12.5px;color:#64748b;margin-top:18px;}
.auth-switch a{color:var(--blue);font-weight:800;}
.remember-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;font-size:12px;}
.remember-row label{display:flex;align-items:center;gap:6px;color:#475569;}
.remember-row a{color:var(--blue);font-weight:700;}
.alert-box{
  background:#fee2e2;color:#b91c1c;border-radius:10px;padding:10px 14px;font-size:12.5px;font-weight:700;margin-bottom:16px;
}
.success-box{text-align:center;padding:20px 0;}
.success-box .check-circle{
  width:80px;height:80px;border-radius:50%;background:#dcfce7;color:#16a34a;
  display:flex;align-items:center;justify-content:center;margin:0 auto 18px;
}
.success-box .check-circle svg{width:40px;height:40px;}
.success-box h2{margin:0 0 10px;}
.success-box p{color:#64748b;font-size:13.5px;margin:0 0 22px;}

@media (max-width:900px){
  .auth-visual{display:none;}
  .auth-form-col{width:100%;}
  .auth-card .logo-mobile{display:block;}
}

/* =============================================================
   UJIAN / LATIHAN SOAL / GAME (mesin soal)
   Dipakai oleh: ujian.php, latihan-soal.php, game.php
   ============================================================= */
.exam-header-row{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:4px;}
.exam-title-card{flex:1;min-width:220px;background:#fff;border-radius:16px;padding:16px 20px;display:flex;align-items:center;gap:14px;box-shadow:0 4px 16px rgba(30,42,74,.06);}
.exam-title-card .ico{width:44px;height:44px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.exam-title-card .ico svg{width:22px;height:22px;}
.exam-title-card h2{margin:0;font-size:17px;}
.exam-title-card span{font-size:12px;color:#64748b;font-weight:700;}
.exam-timer-card{min-width:180px;background:#fff;border-radius:16px;padding:14px 20px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 16px rgba(30,42,74,.06);}
.exam-timer-card .ico{width:38px;height:38px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.exam-timer-card .ico svg{width:18px;height:18px;}
.exam-timer-card b{display:block;font-size:11.5px;color:#64748b;font-weight:700;}
.exam-timer-card .big{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;}
.exam-timer-card .bar{height:4px;background:#e2e8f0;border-radius:99px;margin-top:5px;overflow:hidden;width:120px;}
.exam-timer-card .bar>span{display:block;height:100%;background:var(--accent);}

.exam-layout{display:grid;grid-template-columns:230px 1fr;gap:20px;align-items:start;}
.exam-sidebar{background:#fff;border-radius:20px;padding:20px;box-shadow:0 4px 16px rgba(30,42,74,.06);}
.exam-sidebar h4{margin:0 0 12px;font-size:14px;}
.examnum-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;}
.examnum{aspect-ratio:1;border-radius:10px;border:1px solid #e2e8f0;background:#f8fafc;font-weight:800;font-size:12.5px;color:#475569;cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:inherit;}
.examnum.answered{background:#22c55e;border-color:#22c55e;color:#fff;}
.examnum.current{background:var(--accent);border-color:var(--accent);color:#fff;}
.exam-legend{display:flex;flex-direction:column;gap:7px;margin-top:16px;font-size:11.5px;color:#475569;font-weight:600;}
.exam-legend .dot{width:10px;height:10px;border-radius:50%;display:inline-block;margin-right:7px;flex-shrink:0;}
.exam-legend .dot.answered{background:#22c55e;}
.exam-legend .dot.current{background:var(--accent);}
.exam-legend .dot.empty{background:#e2e8f0;}
.exam-quote{margin-top:18px;font-size:11.5px;font-style:italic;color:#64748b;text-align:center;border-top:1px dashed #eef1f6;padding-top:14px;}

.opt-list{display:flex;flex-direction:column;gap:12px;margin:18px 0;}
.opt-item{display:flex;align-items:center;gap:14px;border:1.5px solid #e2e8f0;border-radius:14px;padding:13px 18px;cursor:pointer;font-weight:700;font-size:14px;background:#fff;}
.opt-item input{margin:0;}
.opt-item .letter{width:30px;height:30px;border-radius:50%;background:#eef2f7;color:#475569;display:flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0;font-size:13px;}
.opt-item.selectable:hover{border-color:var(--accent);}
.opt-item.selected{border-color:var(--accent);background:var(--accent-soft);}
.opt-item.selected .letter{background:var(--accent);color:#fff;}
.opt-item.correct{border-color:#16a34a;background:#f0fdf4;}
.opt-item.correct .letter{background:#16a34a;color:#fff;}
.opt-item.wrong{border-color:#dc2626;background:#fef2f2;}
.opt-item.wrong .letter{background:#dc2626;color:#fff;}
.opt-item .tag{margin-left:auto;font-size:11px;font-weight:800;}
.opt-item.correct .tag{color:#16a34a;}
.opt-item.wrong .tag{color:#dc2626;}

.exam-nav-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;flex-wrap:nowrap;}
.exam-nav-row>*{flex:0 0 auto;}
.exam-nav-row .btn-exam{white-space:nowrap;}
.btn-exam{padding:11px 22px;border-radius:10px;border:1.5px solid #e2e8f0;background:#fff;font-weight:800;font-size:13.5px;cursor:pointer;color:#334155;display:inline-flex;align-items:center;gap:8px;font-family:inherit;}
.btn-exam.primary{background:var(--accent);border-color:var(--accent);color:#fff;}
.btn-exam.finish{background:#16a34a;border-color:#16a34a;color:#fff;}
.btn-exam:disabled{opacity:.45;cursor:not-allowed;}

.feedback-banner{display:flex;align-items:center;gap:12px;padding:14px 18px;border-radius:14px;font-weight:800;margin-bottom:4px;font-size:14px;}
.feedback-banner.correct{background:#dcfce7;color:#15803d;}
.feedback-banner.wrong{background:#fee2e2;color:#b91c1c;}
.feedback-banner .ico{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.7);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.feedback-banner .ico svg{width:18px;height:18px;}
.pembahasan-box{background:#f8fafc;border-radius:14px;padding:16px 18px;margin-top:14px;font-size:13.5px;line-height:1.6;color:#334155;}
.pembahasan-box b{display:block;margin-bottom:6px;color:var(--navy);}

.result-card{text-align:center;padding:26px 16px;}
.result-card .score-circle{width:118px;height:118px;border-radius:50%;margin:0 auto 16px;display:flex;align-items:center;justify-content:center;position:relative;}
.result-card .score-circle::after{content:'';position:absolute;inset:9px;background:#fff;border-radius:50%;}
.result-card .score-circle span{position:relative;z-index:2;font-size:26px;font-weight:800;color:var(--navy);}
.result-stats{display:flex;justify-content:center;gap:26px;margin:16px 0;flex-wrap:wrap;}
.result-stats div b{display:block;font-size:19px;}
.result-stats div span{font-size:11.5px;color:#64748b;font-weight:700;}
.result-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:6px;}

/* Chooser panel (pilih mapel/kelas sebelum mulai) */
.chooser-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:14px 0 20px;}
.chooser-opt{border:1.5px solid #e2e8f0;border-radius:12px;padding:12px 8px;text-align:center;font-weight:800;font-size:13px;cursor:pointer;background:#fff;}
.chooser-opt.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);}
.chooser-opt.disabled{opacity:.45;cursor:not-allowed;}
.empty-state{text-align:center;padding:30px 16px;color:#64748b;}
.empty-state .ico{width:60px;height:60px;margin:0 auto 14px;color:#cbd5e1;}

/* Game: peta level */
.level-map{display:flex;flex-wrap:wrap;gap:24px 18px;justify-content:center;padding:20px 8px;}
.level-node{width:80px;display:flex;flex-direction:column;align-items:center;gap:5px;text-decoration:none;}
.level-node .circle{width:62px;height:62px;border-radius:50%;background:#e2e8f0;color:#94a3b8;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:800;border:4px solid #fff;box-shadow:0 4px 10px rgba(0,0,0,.12);}
.level-node.unlocked .circle{background:var(--accent);color:#fff;}
.level-node.done .circle{background:#facc15;color:#78350f;}
.level-node .stars{font-size:11px;color:#ca8a04;font-weight:800;height:14px;}
.level-node .bab{font-size:10px;text-align:center;color:#64748b;font-weight:700;line-height:1.25;}
.level-node.locked{pointer-events:none;opacity:.55;}
.level-node.locked .circle svg{width:18px;height:18px;}

.game-side-panel{background:#fff;border-radius:20px;padding:22px;box-shadow:0 4px 16px rgba(30,42,74,.06);}
.level-saya-star{display:flex;align-items:center;gap:10px;margin-bottom:8px;}
.level-saya-star .ico{width:34px;height:34px;color:#facc15;}
.xp-bar{height:8px;border-radius:99px;background:#e2e8f0;overflow:hidden;margin-bottom:4px;}
.xp-bar>span{display:block;height:100%;background:linear-gradient(90deg,#facc15,#f59e0b);}
.game-stat-chips{display:flex;gap:8px;margin:14px 0;}
.game-stat-chips .chip{flex:1;background:#f8fafc;border-radius:12px;padding:10px 6px;text-align:center;}
.game-stat-chips .chip b{display:block;font-size:16px;}
.game-stat-chips .chip span{font-size:10px;color:#64748b;font-weight:700;}
.subject-lock-tag{font-size:9.5px;background:#f1f5f9;color:#94a3b8;padding:3px 8px;border-radius:99px;font-weight:800;margin-left:auto;white-space:nowrap;}

.qdots{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin:6px 0 16px;}
.qdots .qdot{width:28px;height:28px;border-radius:50%;background:#e2e8f0;color:#94a3b8;font-size:11.5px;font-weight:800;display:flex;align-items:center;justify-content:center;}
.qdots .qdot.done{background:#22c55e;color:#fff;}
.qdots .qdot.current{background:var(--accent);color:#fff;}

@media (max-width:900px){
  .exam-layout{grid-template-columns:1fr;}
  .exam-sidebar{order:2;}
}
@media (max-width:560px){
  .examnum-grid{grid-template-columns:repeat(5,1fr);}
  .result-stats{gap:16px;}
}

/* ---------- SIDEBAR TREE MENU ---------- */
.tree-group{display:flex;flex-direction:column;}
.tree-head,.tree-subhead{display:flex;align-items:center;gap:10px;width:100%;background:none;border:none;cursor:pointer;font:inherit;color:#334155;text-align:left;padding:9px 12px;border-radius:10px;font-weight:600;}
.tree-head:hover,.tree-subhead:hover{background:#f1f5f9;}
.tree-head .tree-caret,.tree-subhead .tree-caret{margin-left:auto;display:inline-flex;transition:transform .15s;}
.tree-head .tree-caret svg,.tree-subhead .tree-caret svg{width:15px;height:15px;}
.tree-group.open>.tree-head .tree-caret,.tree-sub.open>.tree-subhead .tree-caret{transform:rotate(180deg);}
.tree-body{display:none;flex-direction:column;padding-left:8px;margin:2px 0 4px;border-left:2px solid #eef1f6;}
.tree-group.open>.tree-body{display:flex;}
.tree-body a{padding:7px 12px;border-radius:8px;color:#475569;text-decoration:none;font-size:13.5px;font-weight:500;}
.tree-body a:hover{background:#f1f5f9;color:var(--accent,#2563eb);}
.tree-sub{display:flex;flex-direction:column;}
.tree-subhead{font-size:13.5px;padding:7px 12px;}
.tree-subbody{display:none;flex-direction:column;padding-left:10px;border-left:2px solid #eef1f6;margin-left:6px;}
.tree-sub.open>.tree-subbody{display:flex;}
.tree-empty{padding:7px 12px;color:#94a3b8;font-size:12.5px;}

/* Nav soal tetap 1 baris di layar kecil */
@media (max-width:520px){
  .exam-nav-row{gap:8px;}
  .exam-nav-row .btn-exam{padding:11px 14px;font-size:13px;}
}

/* ---------- Ikon gambar untuk mapel populer & fitur (dashboard) ---------- */
.subj-mini-ico{width:52px;height:52px;border-radius:14px;margin:0 auto 6px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.subj-mini-ico img{width:100%;height:100%;object-fit:contain;}

/* Grid Mata Pelajaran Populer — ukuran ikon disamakan dengan index.php */
.dash-subjects-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.dash-subject-item{display:flex;flex-direction:column;align-items:center;text-align:center;text-decoration:none;color:inherit;}
.dash-subject-ico{width:100%;aspect-ratio:1/1;border-radius:16px;overflow:hidden;background:#f8fafc;display:flex;align-items:center;justify-content:center;}
.dash-subject-ico img{width:100%;height:100%;object-fit:contain;transition:transform .2s ease;}
.dash-subject-item:hover .dash-subject-ico img{animation:iconBerdetak .7s ease-in-out infinite;}
.dash-subject-lbl{display:block;margin-top:8px;font-size:12px;font-weight:700;color:#334155;line-height:1.25;}
@keyframes iconBerdetak{0%,100%{transform:scale(1);}30%{transform:scale(1.14);}60%{transform:scale(.96);}}
@media(max-width:900px){.dash-subjects-grid{grid-template-columns:repeat(3,1fr);}}
@media(max-width:560px){.dash-subjects-grid{grid-template-columns:repeat(3,1fr);}}

/* kalau ikon berupa gambar, buang latar kotak berwarna supaya rapi */
.feature-mini .ico:has(img){background:transparent;width:56px;height:56px;}
.feature-mini .ico img{width:100%;height:100%;object-fit:contain;}

/* Info konteks di atas soal (kelas/kurikulum/mapel/topik/semester) */
.info-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 4px;}
.info-chip{background:#f1f5f9;color:#334155;font-size:12px;padding:5px 10px;border-radius:999px;}
.info-chip b{color:#64748b;font-weight:700;}

/* Materi belajar (di atas soal latihan) */
.materi-box{border:1.5px solid #dbeafe;background:#f8fbff;border-radius:14px;padding:6px 14px;margin:6px 0 14px;}
.materi-box summary{cursor:pointer;font-weight:800;color:#1d4ed8;padding:8px 0;list-style:none;font-size:14px;}
.materi-box summary::-webkit-details-marker{display:none;}
.materi-box[open] summary{border-bottom:1px solid #e5edff;margin-bottom:10px;}
.materi-body{padding-bottom:10px;}
.materi-teks{font-size:14px;color:#334155;line-height:1.7;margin-bottom:10px;}
.materi-img{max-width:100%;border-radius:10px;border:1px solid #e5e7eb;margin-bottom:10px;}
.materi-video{position:relative;padding-bottom:56.25%;height:0;border-radius:10px;overflow:hidden;}
.materi-video iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0;}

/* Slideshow materi (siswa) */
.materi-slideshow{margin-bottom:10px;}
.ms-stage{position:relative;width:100%;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;min-height:160px;display:flex;align-items:center;justify-content:center;}
.ms-slide{display:none;width:100%;max-height:360px;object-fit:contain;}
.ms-slide.active{display:block;}
.ms-nav{position:absolute;top:50%;transform:translateY(-50%);width:38px;height:38px;border:none;border-radius:50%;background:rgba(15,23,42,.55);color:#fff;font-size:22px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.ms-prev{left:8px;} .ms-next{right:8px;}
.ms-counter{text-align:center;font-size:12.5px;color:#64748b;margin-top:6px;font-weight:700;}
.ms-thumbs{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;justify-content:center;}
.ms-thumb{width:54px;height:54px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;opacity:.65;}
.ms-thumb.active{border-color:var(--accent,#2563eb);opacity:1;}

/* ===== Background belajar per jenjang (SD/SMP/SMA) ===== */
/* Pakai layer ::before fixed (bukan background-attachment:fixed yang sering
   tidak jalan di browser HP). Portrait & landscape pakai gambar berbeda. */
body.bg-sd::before,
body.bg-smp::before,
body.bg-sma::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  background-size:cover;
  background-position:center top;
  background-repeat:no-repeat;
  pointer-events:none;
}
/* Portrait (default) — SMP & SMA disamakan dengan SD */
body.bg-sd::before,
body.bg-smp::before,
body.bg-sma::before{ background-image:url('background-04.png'); }
/* Landscape — SMP & SMA disamakan dengan SD */
@media (orientation:landscape){
  body.bg-sd::before,
  body.bg-smp::before,
  body.bg-sma::before{ background-image:url('background-05.png'); }
}
body.bg-sd,
body.bg-smp,
body.bg-sma{background:transparent;}
/* panel sedikit transparan + blur supaya isi tetap terbaca di atas gambar */
body.bg-sd .panel-card,
body.bg-sd .exam-title-card,
body.bg-sd .exam-timer-card,
body.bg-smp .panel-card,
body.bg-smp .exam-title-card,
body.bg-smp .exam-timer-card,
body.bg-sma .panel-card,
body.bg-sma .exam-title-card,
body.bg-sma .exam-timer-card{
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(2px);
}
/* topbar slim & breadcrumb dibuat transparan biar gambar kelihatan */
body.bg-sd .topbar-slim,
body.bg-smp .topbar-slim,
body.bg-sma .topbar-slim{background:transparent;}

/* ---------- Kartu Game Kilat Matematika (game.php → game.html) ---------- */
.game-quick-launch{background:#fff;border:1px solid #eef2f7;}
.game-quick-launch .gql-inner{display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.game-quick-launch .gql-emoji{font-size:44px;line-height:1;flex:0 0 auto;}
.game-quick-launch .gql-text{flex:1 1 220px;min-width:200px;}
.game-quick-launch .gql-text h3{margin:0 0 4px;color:#0f172a;font-size:18px;}
.game-quick-launch .gql-text p{margin:0;color:#64748b;font-size:13px;line-height:1.4;}
.game-quick-launch .gql-btn{flex:0 0 auto;background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;font-weight:800;
  padding:12px 22px;border-radius:999px;text-decoration:none;font-size:14.5px;
  box-shadow:0 6px 16px rgba(22,163,74,.28);transition:transform .15s ease;white-space:nowrap;}
.game-quick-launch .gql-btn:hover{transform:translateY(-2px);}
.game-quick-launch .gql-ops{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:16px;}
.game-quick-launch .gql-op{display:flex;flex-direction:column;align-items:stretch;
  background:#f8fafc;color:#0f172a;text-decoration:none;font-weight:700;font-size:13.5px;
  border-radius:16px;border:1px solid #e5e7eb;overflow:hidden;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;}
.game-quick-launch .gql-op:hover{transform:translateY(-3px);box-shadow:0 8px 18px rgba(15,23,42,.12);border-color:#c7d2fe;}
.game-quick-launch .gql-op img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#fff;}
.game-quick-launch .gql-op .gql-op-lbl{padding:10px 6px;text-align:center;line-height:1.2;}
@media(max-width:600px){
  .game-quick-launch .gql-ops{grid-template-columns:repeat(2,1fr);}
  .game-quick-launch .gql-btn{width:100%;text-align:center;}
}
