/* ============================================================
   GURU CERDAS AI — Tema Utama (Orange Elegan)
   ============================================================ */
:root {
  --g-orange:       #F97316;
  --g-orange-dark:  #C2410C;
  --g-orange-soft:  #FFEDD5;
  --g-bg:           #FFF7ED;
  --g-white:        #FFFFFF;
  --g-text:         #292524;
  --g-gray:         #78716C;
  --g-line:         #F5E7D8;
  --g-shadow:       0 6px 24px rgba(194, 65, 12, .07);
  --g-radius:       16px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, sans-serif;
  background: var(--g-bg);
  color: var(--g-text);
  font-size: .925rem;
}

/* ------------------------- Sidebar ------------------------- */
.g-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 264px; z-index: 1040;
  background: var(--g-white);
  border-right: 1px solid var(--g-line);
  display: flex; flex-direction: column;
  transition: transform .28s ease;
}
.g-sidebar .g-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
}
.g-sidebar .g-brand .g-logo {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 46px;
  background: linear-gradient(135deg, var(--g-orange), var(--g-orange-dark));
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(249, 115, 22, .35);
}
.g-sidebar .g-brand img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.g-sidebar .g-brand .g-nama { font-weight: 800; font-size: 1.02rem; line-height: 1.15; letter-spacing: .2px; }
.g-sidebar .g-brand .g-nama small { display: block; color: var(--g-gray); font-weight: 500; font-size: .72rem; letter-spacing: .4px; }

.g-menu { flex: 1; overflow-y: auto; padding: 4px 12px 18px; }
.g-menu::-webkit-scrollbar { width: 5px; }
.g-menu::-webkit-scrollbar-thumb { background: var(--g-orange-soft); border-radius: 4px; }

.g-menu .g-grup {
  font-size: .68rem; font-weight: 700; color: var(--g-gray);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin: 16px 10px 6px;
}
.g-menu a {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 12px; margin: 2px 0;
  border-radius: 11px; color: #57534E; font-weight: 600; font-size: .875rem;
  text-decoration: none; transition: all .15s ease;
}
.g-menu a i { font-size: 1.06rem; color: #A8A29E; width: 20px; text-align: center; transition: color .15s; }
.g-menu a:hover { background: #FFFBF5; color: var(--g-orange-dark); }
.g-menu a:hover i { color: var(--g-orange); }
.g-menu a.aktif {
  background: linear-gradient(135deg, rgba(249,115,22,.14), rgba(249,115,22,.05));
  color: var(--g-orange-dark); font-weight: 700;
}
.g-menu a.aktif i { color: var(--g-orange); }
.g-menu a.aktif::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--g-orange); }

/* ------------------------- Konten ------------------------- */
.g-utama { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }

.g-header {
  position: sticky; top: 0; z-index: 1020;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--g-line);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
}
.g-header .g-judul { font-weight: 800; font-size: 1.06rem; margin: 0; }
.g-header .g-judul small { display: block; font-weight: 500; color: var(--g-gray); font-size: .74rem; }
.g-ta-badge {
  background: var(--g-orange-soft); color: var(--g-orange-dark);
  font-weight: 700; font-size: .76rem; border-radius: 99px; padding: 5px 13px;
  white-space: nowrap;
}
.g-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--g-orange), var(--g-orange-dark));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
  font-size: .95rem; overflow: hidden;
}
.g-avatar img { width: 100%; height: 100%; object-fit: cover; }

.g-konten { padding: 24px; flex: 1; }

/* ------------------------- Kartu & komponen ------------------------- */
.g-card {
  background: var(--g-white);
  border: 1px solid var(--g-line);
  border-radius: var(--g-radius);
  box-shadow: var(--g-shadow);
}
.g-card .g-card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--g-line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.g-card .g-card-head h6 { margin: 0; font-weight: 800; font-size: .96rem; }
.g-card .g-card-body { padding: 20px; }

.g-stat { display: flex; align-items: center; gap: 15px; padding: 18px 20px; }
.g-stat .g-stat-icon {
  width: 52px; height: 52px; border-radius: 15px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  background: var(--g-orange-soft); color: var(--g-orange-dark);
}
.g-stat .g-stat-nilai { font-size: 1.55rem; font-weight: 800; line-height: 1; }
.g-stat .g-stat-label { color: var(--g-gray); font-size: .8rem; font-weight: 600; margin-top: 3px; }

.btn-oranye {
  background: linear-gradient(135deg, var(--g-orange), #EA580C);
  border: none; color: #fff; font-weight: 700;
  border-radius: 12px; padding: .58rem 1.15rem;
  box-shadow: 0 5px 14px rgba(249,115,22,.3);
  transition: all .15s ease;
}
.btn-oranye:hover, .btn-oranye:focus { color: #fff; filter: brightness(.94); transform: translateY(-1px); }
.btn-oranye:disabled { opacity: .65; box-shadow: none; transform: none; }

.btn-garis {
  border: 1.5px solid #FDBA74; background: #fff; color: var(--g-orange-dark);
  font-weight: 700; border-radius: 12px; padding: .55rem 1.05rem; transition: all .15s;
}
.btn-garis:hover { background: var(--g-orange-soft); color: var(--g-orange-dark); }

.form-control, .form-select {
  border-radius: 11px; border: 1.5px solid #E7DDD3; padding: .56rem .85rem; font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--g-orange); box-shadow: 0 0 0 .22rem rgba(249,115,22,.14);
}
.form-label { font-weight: 700; font-size: .82rem; color: #57534E; margin-bottom: .3rem; }

.table thead th {
  background: #FFFBF5; color: #9A3412; font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--g-line)!important;
  padding: .8rem .9rem; white-space: nowrap;
}
.table tbody td { padding: .72rem .9rem; vertical-align: middle; border-color: #FAF0E4; }
.table tbody tr:hover td { background: #FFFBF7; }

.badge-fase, .badge-soft {
  background: var(--g-orange-soft); color: var(--g-orange-dark);
  font-weight: 700; border-radius: 99px; padding: .35em .8em; font-size: .72rem;
}
.badge-draft { background: #FEF3C7; color: #92400E; }
.badge-final { background: #DCFCE7; color: #166534; }

.g-kosong { text-align: center; padding: 46px 20px; color: var(--g-gray); }
.g-kosong i { font-size: 2.6rem; color: #FDBA74; margin-bottom: 10px; display: block; }

.g-ai-panel {
  background: linear-gradient(135deg, #FFF1E4, #FFE8D1);
  border: 1px solid #FDBA74; border-radius: var(--g-radius);
}
.g-ai-panel .g-ai-tanda {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--g-orange), var(--g-orange-dark));
  color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .5px;
  border-radius: 99px; padding: 4px 14px;
}

/* ------------------------- Responsif ------------------------- */
.g-tertutup .g-overlay { display: block; }
.g-overlay {
  display: none; position: fixed; inset: 0; z-index: 1035;
  background: rgba(41,37,36,.45); backdrop-filter: blur(2px);
}
@media (max-width: 991.98px) {
  .g-sidebar { transform: translateX(-100%); }
  body.g-buka .g-sidebar { transform: translateX(0); }
  .g-utama { margin-left: 0; }
  .g-konten { padding: 16px; }
}
@media (min-width: 992px) {
  .g-overlay { display: none !important; }
}

/* ------------------------- Login ------------------------- */
.g-login { min-height: 100vh; display: flex; }
.g-login-kiri {
  flex: 1.1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  background: linear-gradient(150deg, #F97316 0%, #C2410C 68%);
  color: #fff; padding: 52px;
  position: relative; overflow: hidden;
}
.g-login-kiri::before, .g-login-kiri::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.09);
}
.g-login-kiri::before { width: 340px; height: 340px; top: -110px; right: -90px; }
.g-login-kiri::after  { width: 260px; height: 260px; bottom: -80px; left: -70px; }
.g-login-kiri h1 { font-weight: 800; font-size: 2.3rem; position: relative; z-index: 2; }
.g-login-kiri p { opacity: .92; max-width: 430px; font-size: 1.02rem; position: relative; z-index: 2; }
.g-login-fitur { list-style: none; padding: 0; margin: 26px 0 0; position: relative; z-index: 2; }
.g-login-fitur li { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 13px; opacity: .95; font-size: .95rem; }
.g-login-fitur i { background: rgba(255,255,255,.18); border-radius: 9px; padding: 5px 8px; font-size: .9rem; }
.g-login-kanan {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px;
}
.g-login-kartu { width: 100%; max-width: 420px; }
@media (max-width: 991.98px) {
  .g-login-kiri { display: none; }
}

/* ------------------------- Halaman cetak ------------------------- */
.g-cetak-wrap { background: #EDE9E3; padding: 26px 12px; }
.g-kertas {
  background: #fff; width: 100%; max-width: 920px; margin: 0 auto;
  box-shadow: 0 3px 18px rgba(0,0,0,.14); padding: 40px 46px;
  color: #000; font-size: 12.5pt; line-height: 1.6;
}
.g-kop { text-align: center; border-bottom: 3px double #000; padding-bottom: 12px; margin-bottom: 18px; }
.g-kop img { height: 74px; max-width: 90px; object-fit: contain; }
.g-kop .g-kop-nama { font-size: 16pt; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.g-kop .g-kop-info { font-size: 10.5pt; }
.g-ttd { width: 100%; margin-top: 34px; }
.g-ttd td { vertical-align: top; border: none !important; }
@media print {
  body { background: #fff; }
  .g-no-cetak { display: none !important; }
  .g-cetak-wrap { padding: 0; background: #fff; }
  .g-kertas { box-shadow: none; max-width: 100%; padding: 0; }
  @page { size: A4; margin: 14mm 16mm; }
}

/* ------------------------- Wizard bertahap -------------------------
   Form panjang dibagi langkah supaya guru tidak bingung:
   hanya satu bagian tampil pada satu waktu, dengan indikator langkah. */
.g-wizard-langkah {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 16px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--g-line); border-radius: 14px;
  box-shadow: 0 1px 4px rgba(41, 37, 36, .04);
}
.g-langkah-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 600; color: var(--g-gray);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: .18s;
  user-select: none;
}
.g-langkah-item b {
  width: 21px; height: 21px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F5F5F4; color: var(--g-gray); font-size: .72rem;
}
.g-langkah-item:hover { color: #C2410C; border-color: var(--g-orange-soft); }
.g-langkah-item.aktif { color: #9A3412; background: var(--g-orange-soft); border-color: #FDBA74; }
.g-langkah-item.aktif b { background: var(--g-orange); color: #fff; }
.g-langkah-item.selesai b { background: #16a34a; color: #fff; }
.g-langkah-item.selesai { color: #292524; }
.g-langkah-posisi { margin-left: auto; font-size: .76rem; font-weight: 700; color: var(--g-gray); white-space: nowrap; }
.g-pane { display: none; }
.g-pane.aktif { display: block; }

/* ---------- Pengaturan: kotak ringkasan kerangka 8-3-3-4 ---------- */
.pm-kotak-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pm-kotak {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 4px 8px; border-radius: 14px; text-align: center;
  background: linear-gradient(160deg, #FFF7ED, #FFEDD5); border: 1px solid #FED7AA;
}
.pm-kotak b { font-size: 1.35rem; line-height: 1.1; color: #C2410C; }
.pm-kotak span { font-size: .64rem; font-weight: 600; color: #9A3412; line-height: 1.25; margin-top: 2px; }

/* ---------- PROTA: chip bulan ---------- */
/* Baris bulan: TETAP 1 baris x 12 kolom (tidak pernah melipat 2x6).
   Kolom bulan diberi 680px; grid membagi rata 12 sel (~55px per bulan). */
.baris-bulan {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}
.bulan-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 2px; border-radius: 8px; border: 1px solid #E7E5E4;
  font-size: .74rem; font-weight: 600; color: #78716C; cursor: pointer;
  background: #FAFAF9; user-select: none; transition: .15s;
  min-width: 0; white-space: nowrap; overflow: hidden;
}
.bulan-chip input { width: 12px; height: 12px; min-width: 12px; accent-color: #F97316; margin: 0; flex: 0 0 auto; }
.bulan-chip.ganjil { border-left: 3px solid #FDBA74; }
.bulan-chip.genap { border-left: 3px solid #86EFAC; }
.bulan-chip.terpilih { background: var(--g-orange-soft, #FFF1E2); border-color: #FB923C; color: #9A3412; }
/* Input JP PROTA: kolom 110px, angka besar di tengah, tanpa panah spinner
   agar terbaca jelas dan tidak menyempitkan ruang angka */
#tabelProta td:nth-child(3) { padding-left: 5px; padding-right: 5px; }
.jp-input {
  width: 100%; text-align: center; font-weight: 800; font-size: .95rem;
  color: var(--g-orange-dark, #C2410C); background: #FFFBF5;
}
.jp-input::-webkit-outer-spin-button, .jp-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jp-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.titik-bulan { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; }
.titik-bulan.ganjil { background: #FDBA74; }
.titik-bulan.genap { background: #86EFAC; }

/* ---------- Matriks jawaban: sel berwarna ---------- */
.sel-matriks {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 24px; padding: 1px 6px; border-radius: 7px;
  font-size: .72rem; font-weight: 700;
  background: #F5F5F4; color: #A8A29E;
}
.sel-matriks.sel-benar { background: #DCFCE7; color: #15803D; }
.sel-matriks.sel-salah { background: #FEE2E2; color: #B91C1C; }
.sel-matriks.sel-kosong { background: #F5F5F4; color: #A8A29E; }
.titik-matriks { display: inline-block; width: 11px; height: 11px; border-radius: 4px; vertical-align: middle; }
.titik-matriks.benar { background: #22C55E; }
.titik-matriks.salah { background: #EF4444; }
.titik-matriks.kosong { background: #D6D3D1; }
.jawab-input.sel-benar { background: #DCFCE7 !important; border-color: #4ADE80 !important; color: #166534 !important; font-weight: 700; }
.jawab-input.sel-salah { background: #FEE2E2 !important; border-color: #F87171 !important; color: #991B1B !important; font-weight: 700; }

/* ---------- Bar mini ketuntasan (Matriks Jawaban gaya APSIS) ---------- */
.bar-mini {
  width: 64px; height: 7px; border-radius: 5px;
  background: #F5F5F4; border: 1px solid #E7E5E4;
  overflow: hidden; margin: 4px auto 2px;
}
.bar-mini .bar-isi { height: 100%; border-radius: 5px; transition: width .35s ease; }
.bar-mini .bar-isi.bagus  { background: linear-gradient(90deg, #4ADE80, #16A34A); }
.bar-mini .bar-isi.kurang { background: linear-gradient(90deg, #FDBA74, #F97316); }

/* ---------- Pembelajaran Mendalam 8-3-3-4: panel ringkasan (form CP) ---------- */
.pm-panel {
  border: 1px solid #FED7AA; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
}
.pm-kepala {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; text-decoration: none; color: #7C2D12; flex-wrap: wrap;
}
.pm-kepala:hover, .pm-kepala:focus { text-decoration: none; color: #7C2D12; }
.pm-judul { font-weight: 800; font-size: .92rem; }
.pm-hint {
  font-size: .7rem; color: #9A3412; background: #FFEDD5;
  border: 1px solid #FDBA74; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.pm-isi {
  padding: 2px 16px 14px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.pm-kotak { background: #fff; border: 1px solid #FED7AA; border-radius: 12px; padding: 10px 12px; }
.pm-kotak h6 {
  margin: 0 0 6px; font-size: .74rem; font-weight: 800;
  color: #C2410C; text-transform: uppercase; letter-spacing: .4px;
}
.pm-kotak ul { margin: 0; padding-left: 15px; font-size: .78rem; color: #431407; line-height: 1.55; }

/* ---------- Chip Dimensi Profil Lulusan (form CP) ---------- */
.chip-dimensi-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-dimensi { position: relative; }
.chip-dimensi input { position: absolute; opacity: 0; pointer-events: none; }
.chip-dimensi span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1.5px solid #FDBA74; background: #fff;
  color: #9A3412; border-radius: 999px; font-size: .8rem; font-weight: 600;
  cursor: pointer; user-select: none; transition: all .15s ease;
}
.chip-dimensi span i { display: none; font-weight: 800; }
.chip-dimensi span:hover { border-color: #F97316; background: #FFF7ED; }
.chip-dimensi input:checked + span {
  background: linear-gradient(135deg, #F97316, #EA580C);
  border-color: #EA580C; color: #fff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, .28);
}
.chip-dimensi input:checked + span i { display: inline; }
.chip-dimensi input:focus-visible + span { outline: 2px solid #FDBA74; outline-offset: 2px; }

/* ---------- Lencana dimensi pada kartu CP & dokumen ---------- */
.badge-dimensi {
  display: inline-block; background: #FFF7ED; border: 1px solid #FDBA74;
  color: #9A3412; border-radius: 999px; font-size: .66rem; font-weight: 600;
  padding: 2px 9px; margin: 2px 3px 0 0; white-space: nowrap;
}

/* ---------- AI Sekali Klik (v1.3.8): sorot bidang wajib yang belum terisi ---------- */
.g-wajib-sorot {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .16) !important;
  background: #FEF2F2 !important;
  transition: box-shadow .25s, border-color .25s, background .25s;
}
