/* public/css/style.css
   Tema Opsi B (Refresh Moderat):
   - Sidebar gradasi indigo gelap dengan menu akordeon
   - Font Plus Jakarta Sans, aksen indigo #4F46E5 & mint #10B981
   - Background off-white (bukan putih mutlak), dark mode arang kebiruan
   - Teks charcoal (bukan hitam pekat), body >=16px, line-height 1.5-1.6
*/

:root {
  --bg: #F5F7FB;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F4F6FB;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E6EAF2;
  --accent-blue: #4F46E5;
  --accent-blue-hover: #4338CA;
  --accent-blue-soft: rgba(79, 70, 229, 0.12);
  --accent-mint: #10B981;
  --accent-mint-soft: #ECFDF5;
  --danger: #E11D48;
  --danger-soft: #FDECEF;
  --warning: #C9922B;
  --warning-soft: #FBF3E4;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.05);
}

:root[data-theme="dark"] {
  --bg: #111420;
  --bg-elevated: #191D2E;
  --bg-subtle: #1F2438;
  --text: #E7E9F0;
  --text-muted: #98A2B8;
  --border: #2A2F45;
  --accent-blue: #818CF8;
  --accent-blue-hover: #A5B4FC;
  --accent-blue-soft: rgba(129, 140, 248, 0.16);
  --accent-mint: #34D399;
  --accent-mint-soft: #14332A;
  --danger: #F47A86;
  --danger-soft: #3A2226;
  --warning: #E0B563;
  --warning-soft: #362C1A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.3; font-weight: 650; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* --- Auth (login/register) --- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-muted); }
.field input, .field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
.field input:disabled { opacity: 0.65; cursor: not-allowed; }
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 1px;
}
.field-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary { background: linear-gradient(135deg, #4F46E5, #4338CA); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #4338CA, #3730A3); transform: translateY(-1px); }
.btn-mint { background: linear-gradient(135deg, #10B981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22); }
.btn-mint:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-subtle); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }

/* --- Auth Opsi B: split-screen (panel branding + form) --- */
.auth-split {
  display: flex; width: 100%; max-width: 980px; min-height: 600px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(30, 27, 75, 0.16);
}
.auth-brand {
  flex: 1 1 45%;
  background: linear-gradient(160deg, #1E1B4B 0%, #312E81 55%, #4338CA 100%);
  color: #E0E7FF; padding: 40px 38px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-brand::before {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(52, 211, 153, 0.10); top: -120px; right: -120px;
}
.auth-brand::after {
  content: ''; position: absolute; width: 210px; height: 210px; border-radius: 50%;
  background: rgba(129, 140, 248, 0.14); bottom: -80px; left: -70px;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand-logo {
  display: inline-block; width: 118px; height: auto;
  background: #FFFFFF; border-radius: 12px; padding: 8px 12px;
}
.auth-brand h2 { color: #fff; font-size: 24px; line-height: 1.35; font-weight: 800; margin: auto 0 8px; padding-top: 38px; }
.auth-brand p { font-size: 14px; line-height: 1.7; color: #C7D2FE; margin-bottom: 22px; }
.auth-fitur { display: flex; flex-direction: column; gap: 12px; }
.auth-fitur div { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: #E0E7FF; }
.auth-fitur .ikon {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(165, 180, 252, 0.25);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.auth-form { flex: 1 1 55%; padding: 38px 40px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
@media (max-width: 860px) {
  .auth-shell { padding: 0; align-items: stretch; }
  .auth-split { flex-direction: column; max-width: none; min-height: 100vh; border-radius: 0; border: none; }
  .auth-brand { padding: 28px 24px; flex: none; }
  .auth-brand h2 { font-size: 20px; padding-top: 22px; }
  .auth-brand p { margin-bottom: 16px; }
  .auth-fitur div:nth-child(n+3) { display: none; }
  .auth-form { padding: 26px 20px 30px; justify-content: flex-start; }
}

.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--accent-mint-soft); color: var(--accent-mint); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }

/* --- App shell (dashboard/admin) --- */
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar Opsi B: gradasi indigo gelap (sama di mode terang & gelap) */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1E1B4B, #312E81);
  color: #E0E7FF;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #C7D2FE;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.nav-item.active {
  background: #fff; color: #312E81; font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

/* Menu induk akordeon */
.menu-induk { justify-content: space-between; user-select: none; }
.menu-induk .panah { transition: transform 0.25s; font-size: 11px; color: #818CF8; }
.menu-induk.buka { background: rgba(255, 255, 255, 0.09); color: #fff; }
.menu-induk.buka .panah { transform: rotate(90deg); }

.submenu { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.submenu.buka { max-height: 340px; }
.submenu .nav-item {
  padding: 8px 12px 8px 14px;
  margin: 2px 0 2px 14px;
  border-radius: 10px;
  color: #A5B4FC;
  font-size: 13.5px;
  border-left: 2px solid rgba(165, 180, 252, 0.25);
}
.submenu .nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; border-left-color: #818CF8; }
.submenu .nav-item.active {
  background: rgba(52, 211, 153, 0.14); color: #fff; border-left-color: #34D399; box-shadow: none;
}
.submenu .nav-item .no {
  width: 20px; height: 20px; border-radius: 6px;
  background: rgba(165, 180, 252, 0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; flex: 0 0 auto;
}
.submenu .nav-item.active .no { background: #34D399; color: #064E3B; }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-title { font-size: 16px; font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.icon-btn .badge { position: absolute; top: -4px; right: -4px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-subtle);
  cursor: pointer; font-size: 16px;
}

.content { padding: 24px 28px 64px; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 15px; font-weight: 650; margin-bottom: 4px; }
.card-sub { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 13.5px; color: var(--text-muted); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 13px; }
tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.pill-premium { background: var(--accent-mint-soft); color: var(--accent-mint); }
.pill-free { background: var(--warning-soft); color: var(--warning); }
.pill-expired { background: var(--danger-soft); color: var(--danger); }
.pill-pending { background: var(--warning-soft); color: var(--warning); }
.pill-paid { background: var(--accent-mint-soft); color: var(--accent-mint); }
.pill-audit { background: #E7E3FB; color: #6B4FBB; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 24, 30, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: var(--bg-elevated); border-radius: var(--radius);
  padding: 24px; width: 100%; max-width: 420px; box-shadow: var(--shadow);
}
.hidden { display: none !important; }

/* --- Logo / Branding --- */
.auth-logo-img {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 20px;
}
.sidebar-logo { padding: 4px 10px 16px; text-align: center; }
/* Logo berisi teks biru tua -> selalu ditaruh di atas kartu terang agar
   terbaca di sidebar indigo (mode terang maupun gelap). */
.sidebar-logo-img {
  display: block; width: 108px; height: auto; margin: 0 auto;
  background: #FFFFFF; border-radius: 12px; padding: 8px 12px; box-sizing: content-box;
}
.sidebar-logo-tag {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #A5B4FC;
}

:root[data-theme="dark"] .auth-logo-img {
  background: #F4F6F8;
  border-radius: 12px;
  padding: 10px 12px;
  box-sizing: content-box;
  width: 112px;
}


/* =====================================================================
   Tambahan: navigasi mobile, password toggle, tabel/kartu perangkat,
   paket, cover
   ===================================================================== */

/* --- Navigasi mobile (sidebar geser) --- */
.menu-btn { display: none; margin-right: 10px; font-size: 18px; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(20,24,30,.45); z-index: 40; }
.nav-group-label {
  margin: 16px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: #818CF8;
}
@media (max-width: 860px) {
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 45;
    transform: translateX(-100%); transition: transform .2s ease; width: 260px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .topbar { padding: 12px 14px; }
  .topbar-title { flex: 1; }
  #userChip { display: none; }
  .content { padding: 16px 14px 64px; }
}

/* --- Tombol lihat kata sandi --- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px !important; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 18px; line-height: 1; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { background: var(--bg-elevated); color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent-blue); }

/* --- Form filter perangkat --- */
.btn-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; gap: 0; } }
.demo-note {
  background: var(--warning-soft); color: var(--warning); border-radius: 8px;
  padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px;
}
.demo-note a { color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* --- Hasil: seksi tabel / kartu --- */
.hasil-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hasil-meta { font-size: 13px; color: var(--text-muted); }
.data-section { margin-top: 20px; }
.data-section:first-of-type { margin-top: 8px; }
.data-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.data-section-title { font-size: 14.5px; font-weight: 650; }
.data-count { font-weight: 500; color: var(--text-muted); font-size: 13px; margin-left: 6px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button {
  border: none; background: transparent; color: var(--text-muted); padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.seg button.on { background: var(--accent-mint-soft); color: var(--accent-mint); }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.tbl-wrap table { min-width: 560px; }
.tbl-wrap th { background: var(--bg-subtle); white-space: nowrap; position: sticky; top: 0; }
.tbl-wrap td { vertical-align: top; white-space: pre-line; line-height: 1.5; min-width: 90px; }
.tbl-wrap td.num, .tbl-wrap th.num { text-align: center; min-width: 0; padding: 8px 6px; }
.tbl-wrap td.mark { background: var(--accent-mint-soft); color: var(--accent-mint); font-weight: 700; }
.tbl-wrap tr:last-child td { border-bottom: none; }

.cards-wrap { display: grid; gap: 12px; }
.data-card {
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-subtle);
  padding: 14px 16px;
}
.data-card-title { font-weight: 650; margin-bottom: 8px; font-size: 14.5px; }
.data-card dl { margin: 0; display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 6px 14px; }
.data-card dt { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.data-card dd { margin: 0; font-size: 14px; white-space: pre-line; line-height: 1.55; }
@media (max-width: 640px) { .data-card dl { grid-template-columns: 1fr; gap: 0; } .data-card dd { margin-bottom: 8px; } }

.demo-cut {
  margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13.5px;
  background: var(--warning-soft); color: var(--warning);
}

/* --- Paket --- */
.paket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 8px; }
.paket-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  background: var(--bg-subtle); display: flex; flex-direction: column; gap: 6px;
}
.paket-card.aktif { border-color: var(--accent-mint); background: var(--accent-mint-soft); }
.paket-level { font-size: 12.5px; font-weight: 700; letter-spacing: .5px; color: var(--accent-blue); }
.paket-nama { font-weight: 650; font-size: 15px; }
.paket-harga { font-size: 24px; font-weight: 700; margin-top: 4px; }
.paket-coret { text-decoration: line-through; color: var(--text-muted); font-size: 13.5px; margin-right: 6px; }
.paket-diskon { display: inline-block; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.paket-card .btn { margin-top: auto; }

/* --- Cover --- */
.logo-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.logo-opt { cursor: pointer; position: relative; display: block; }
.logo-opt input { position: absolute; opacity: 0; pointer-events: none; }
.logo-opt-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid var(--border); border-radius: 10px; padding: 10px 6px; height: 100%;
  background: var(--bg-subtle); font-size: 12.5px; text-align: center;
}
.logo-opt-body img { width: 46px; height: 46px; object-fit: contain; }
.logo-opt-body em { font-style: normal; color: var(--text-muted); font-weight: 600; }
.logo-pair { display: flex; gap: 4px; }
.logo-pair img { width: 34px; height: 34px; }
.logo-none { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-muted); }
.logo-opt input:checked + .logo-opt-body { border-color: var(--accent-blue); background: var(--bg-elevated); }
.logo-opt input:focus-visible + .logo-opt-body { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

.cover-preview {
  background: #fff; color: #1A202C; border: 1px solid var(--border); border-radius: 6px;
  aspect-ratio: 210 / 297; width: 100%; max-width: 380px; margin: 0 auto; padding: 4.5% 6%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: var(--shadow); position: relative; outline: 2px solid #2D3748; outline-offset: -8px;
  font-size: clamp(8px, 1.9vw, 12px); container-type: inline-size;
}
.cover-preview .cv-inst { font-weight: 700; font-size: 1.05em; line-height: 1.45; text-transform: uppercase; }
.cover-preview .cv-logos { display: flex; gap: 6%; justify-content: center; margin: 5% 0 6%; min-height: 22%; align-items: center; }
.cover-preview .cv-logos img { height: 100%; max-height: 74px; width: auto; object-fit: contain; }
.cover-preview .cv-title { font-size: 2.6em; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin-top: auto; }
.cover-preview .cv-line { width: 55%; height: 2px; background: #5670C4; margin: 3% 0; }
.cover-preview .cv-mapel { font-weight: 700; font-size: 1.3em; }
.cover-preview .cv-sub { font-size: 1.1em; margin-top: 1.5%; }
.cover-preview .cv-muted { color: #718096; font-size: .95em; }
.cover-preview .cv-by { margin-top: auto; line-height: 1.5; }
.cover-preview .cv-by b { font-size: 1.3em; display: block; }
.cover-preview .cv-school { margin-top: 6%; font-weight: 700; font-size: 1.2em; text-transform: uppercase; }
@media (max-width: 860px) { .cover-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Menu Perangkat Guru: step indicator, daftar pilihan (checkbox), recap
   ===================================================================== */
.step-indicator { display: flex; align-items: center; margin-bottom: 22px; }
.step-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; }
.step-dot .step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-subtle); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: var(--text-muted);
}
.step-dot .step-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.step-dot.done .step-num { background: var(--accent-mint); border-color: var(--accent-mint); color: #fff; }
.step-dot.done .step-label { color: var(--accent-mint); }
.step-dot.active .step-num { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.step-dot.active .step-label { color: var(--accent-blue); }
.step-line { flex: 1 1 auto; height: 2px; background: var(--border); margin: 0 6px 18px; }
@media (max-width: 640px) { .step-dot .step-label { display: none; } }

.langkah-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.langkah-head h3 { margin: 0; font-size: 15px; }
.pilih-counter { font-size: 12.5px; font-weight: 700; color: var(--accent-blue); background: var(--accent-blue-soft, rgba(86,112,196,.12)); padding: 3px 10px; border-radius: 999px; }

.pilih-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.pilih-item {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; background: var(--bg-subtle); cursor: pointer;
}
.pilih-item input { margin-top: 3px; flex: 0 0 auto; }
.pilih-item .pilih-body { flex: 1 1 auto; }
.pilih-item .pilih-meta { font-size: 12px; font-weight: 700; color: var(--accent-blue); margin-bottom: 2px; }
.pilih-item .pilih-teks { font-size: 13.5px; line-height: 1.45; }
/* Toolbar daftar pilih: centang-semua + kolom cari manual (sejajar dengan kotak centang item) */
.pilih-bar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--bg-subtle); margin-bottom: 8px; }
.pilih-bar .pilih-semua { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pilih-bar .pilih-semua input { margin: 0; }
.pilih-bar .pilih-cari { flex: 1 1 auto; min-width: 120px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.pilih-item.checked { border-color: var(--accent-blue); background: var(--bg-elevated); }
.pilih-item.disabled { opacity: .45; cursor: not-allowed; }

.recap-box {
  background: var(--accent-mint-soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px;
}
.recap-box b { display: block; margin-bottom: 4px; }

.langkah.hidden { display: none; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 16px; }
.mini-table th, .mini-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; }
.mini-table th { background: var(--bg-subtle); }
.promes-grid-wrap { overflow-x: auto; }
.promes-grid-wrap table { min-width: 700px; }
.promes-grid-wrap td.bab-row { font-weight: 700; background: var(--bg-subtle); }
.promes-grid-wrap td.jp-cell { text-align: center; background: var(--accent-mint-soft); color: var(--accent-mint); font-weight: 700; }

/* Informasi Paket Aktif (Profil) */
.paket-aktif-item {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--accent-mint-soft);
}
.paket-aktif-item .judul { font-weight: 700; color: var(--accent-mint); margin-bottom: 6px; }
.paket-aktif-item dl { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-size: 13.5px; }
.paket-aktif-item dt { color: var(--text-muted); font-weight: 600; }
.paket-aktif-item dd { margin: 0; }

/* =====================================================================
   Live Chat (pengaduan/sharing guru <-> developer)
   ===================================================================== */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #4F46E5, #312E81); color: #fff; font-size: 24px;
  box-shadow: 0 8px 24px rgba(49,46,129,.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .chat-badge {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
  background: #E11D48; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.chat-panel {
  position: fixed; right: 22px; bottom: 90px; z-index: 90;
  width: 350px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px);
  background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15,23,42,.22);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head {
  padding: 12px 16px; background: linear-gradient(135deg, #1E1B4B, #312E81); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chat-head .chat-head-title { font-weight: 700; font-size: 14.5px; }
.chat-head .chat-head-sub { font-size: 11.5px; opacity: .8; }
.chat-head button { background: transparent; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.chat-head button:hover { background: rgba(255,255,255,.15); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg, #F5F7FB); }
.chat-msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-msg.saya { align-self: flex-end; background: #4F46E5; color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.lawan { align-self: flex-start; background: var(--bg-card, #fff); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg .chat-meta { display: block; font-size: 10.5px; opacity: .65; margin-top: 4px; }
.chat-empty { text-align: center; color: var(--text-muted); font-size: 13px; margin: auto; padding: 20px; }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--bg-card, #fff); }
.chat-input-bar textarea {
  flex: 1; resize: none; height: 42px; max-height: 90px; padding: 10px 12px; font-size: 13.5px;
  border: 1.5px solid var(--border); border-radius: 10px; font-family: inherit; background: var(--bg, #F5F7FB); color: var(--text);
}
.chat-input-bar textarea:focus { outline: none; border-color: #4F46E5; }
.chat-input-bar button {
  border: none; border-radius: 10px; padding: 0 14px; cursor: pointer;
  background: linear-gradient(135deg, #4F46E5, #312E81); color: #fff; font-size: 16px;
}
.chat-input-bar button:disabled { opacity: .5; cursor: not-allowed; }

/* Panel chat khusus halaman admin (bukan mengambang) */
.chat-admin-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.chat-thread-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-height: 560px; overflow-y: auto; background: var(--bg-card, #fff); }
.chat-thread { padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.chat-thread:hover { background: var(--accent-blue-soft, rgba(79,70,229,.08)); }
.chat-thread.active { background: var(--accent-blue-soft, rgba(79,70,229,.12)); border-left: 3px solid #4F46E5; }
.chat-thread .t-nama { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; gap: 8px; }
.chat-thread .t-sekolah { font-size: 11.5px; color: var(--text-muted); }
.chat-thread .t-cuplikan { font-size: 12px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread .t-badge { background: #E11D48; color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; }
.chat-room { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-card, #fff); height: 560px; }
.chat-room .chat-body { background: var(--bg, #F5F7FB); }
.chat-room-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.chat-room-head small { display: block; font-weight: 400; color: var(--text-muted); font-size: 12px; }
@media (max-width: 860px) {
  .chat-admin-grid { grid-template-columns: 1fr; }
  .chat-room { height: 420px; }
  .chat-panel { right: 8px; bottom: 78px; width: calc(100vw - 16px); }
  .chat-fab { right: 14px; bottom: 14px; }
}

/* Dropdown semester di samping tiap CP (Langkah 1 Perangkat Guru) */
.cp-semester {
  margin-left: 10px; flex-shrink: 0; align-self: center;
  padding: 6px 8px; font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg-card, #fff); color: var(--text); cursor: pointer;
}
.cp-semester:focus { outline: none; border-color: var(--accent-blue); }

/* Baris "Pilih semua" di daftar pilihan (TP & ATP / Modul Ajar) */
.pilih-item.pilih-semua {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-card, #fff);
  border-bottom: 2px solid var(--accent, #5670C4);
  font-weight: 600;
}


/* ---- Langkah 4 Modul Ajar: pratinjau identitas & TP refleksi (otomatis) ---- */
.refl-pratinjau { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); padding: 12px 14px; }
.refl-judul { font-size: 12px; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.refl-badge { background: var(--accent-blue-soft); color: var(--accent-blue); border-radius: 999px; padding: 1px 8px; font-size: 11px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.refl-grid { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-elevated); }
.refl-grid > div { padding: 6px 10px; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.refl-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.refl-k { color: var(--text-muted); }
.refl-v { font-weight: 600; word-break: break-word; }
.refl-tp { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated); }
.refl-tp-baris { display: grid; grid-template-columns: 28px auto 1fr; gap: 8px; padding: 7px 10px; font-size: 13.5px; border-bottom: 1px solid var(--border); align-items: baseline; }
.refl-tp-baris:last-child { border-bottom: 0; }
.refl-tp-no { color: var(--text-muted); text-align: center; }
@media (max-width: 560px) { .refl-grid { grid-template-columns: 1fr; } .refl-grid > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; } .refl-tp-baris { grid-template-columns: 24px 1fr; } .refl-tp-baris span:last-child { grid-column: 2; } }

/* ---- Pilihan bentuk lembar refleksi murid (Langkah 4) ---- */
.refl-bentuk { margin-top: 14px; }
.refl-opsi { align-items: flex-start; }
.refl-opsi.refl-rekom { border-color: var(--accent-mint, #2fb890); box-shadow: 0 0 0 1px var(--accent-mint, #2fb890) inset; }
.refl-ikon { font-size: 1.1em; margin-right: 2px; }
.refl-badge-rekom { background: var(--accent-mint, #2fb890); color: #fff; }
