
/* BAGIAN 01 - Dasar website
   Variabel warna, reset bawaan browser, background global, animasi masuk. */
:root {
  --emerald: #059669;
  --teal: #115e59;
  --amber: #fbbf24;
  --slate: #0f172a;
  --muted: #64748b;
  --panel: rgba(255, 255, 255, .13);
  --border: rgba(255, 255, 255, .22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #ecfdf5;
}
body.admin-body { background: #f8fafc; color: #0f172a; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.bg {
  position: fixed;
  inset: 0;
  background: url('bg-madrasah.png') center/cover no-repeat;
  filter: blur(6px);
  transform: scale(1.04);
  z-index: -2;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(2px);
  z-index: -1;
}
.admin-body .overlay { background: rgba(255,255,255,.76); }
.page { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 32px 0; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.shell {
  background: linear-gradient(135deg, #059669, #115e59);
  border: 1px solid rgba(52, 211, 153, .35);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(6, 95, 70, .35);
  overflow: hidden;
}
.animate-in { animation: enter .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes enter {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.stagger > * { animation: liftFade .52s cubic-bezier(.2,.8,.2,1) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; }
@keyframes liftFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* BAGIAN 02 - Komponen umum
   Layout grid, input, tombol, kartu, badge, tabel, chat, dan upload foto. */
.home-grid { display: grid; grid-template-columns: 1.05fr .95fr; width: min(1080px, 100%); }
.pad { padding: clamp(24px, 5vw, 54px); }
.glass { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; }
.feature-list { padding: 16px; margin: 22px 0; display: grid; gap: 10px; font-weight: 800; font-size: 14px; }
.feature-list span:before { content: "âœ“"; color: var(--amber); font-weight: 1000; margin-right: 10px; }
.muted { color: #d1fae5; }
.text-muted { color: var(--muted); }
.title { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 12px 0 16px; font-weight: 900; }
.h1 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 8px; }
.h2 { font-size: 20px; margin: 0 0 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 800; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  color: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}
.select option { color: #111827; }
.input::placeholder, .textarea::placeholder { color: rgba(209,250,229,.65); }
.input.light, .textarea.light, .select.light {
  color: #0f172a;
  background: #fff;
  border-color: #dbe4ef;
}
.password-field {
  position: relative;
}
.password-field .input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #0f766e;
  background: transparent;
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle.is-visible {
  color: #0f172a;
  background: #e0f2fe;
}
.password-toggle .ui-icon {
  width: 18px;
  height: 18px;
}
.password-toggle .icon-eye-svg {
  display: block;
  width: 20px;
  height: 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 900;
  transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--slate); }
.btn-soft { background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-google { background: #fff; color: #1f2937; border: 1px solid rgba(15,23,42,.12); margin-top: 18px; }
.btn-block { width: 100%; }
.auth-note {
  padding: 12px 14px;
  margin-top: 18px;
  color: #d1fae5;
  font-weight: 750;
}
.google-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 12px;
}
.google-profile img,
.avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  color: #0f172a;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.google-profile span { color: #d1fae5; font-size: 13px; }
.ui-icon {
  position: relative;
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}
.icon-google::before {
  content: "G";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 1000;
  color: #4285f4;
}
.icon-message::before {
  content: "";
  position: absolute;
  left: .08em;
  top: .16em;
  width: .86em;
  height: .62em;
  border: .14em solid currentColor;
  border-radius: .18em;
}
.icon-message::after {
  content: "";
  position: absolute;
  left: .28em;
  bottom: .08em;
  width: .28em;
  height: .28em;
  border-left: .14em solid currentColor;
  border-bottom: .14em solid currentColor;
  transform: rotate(-45deg);
}
.icon-plus::before,
.icon-plus::after {
  content: "";
  position: absolute;
  inset: .48em .16em;
  background: currentColor;
  border-radius: 999px;
}
.icon-plus::after { transform: rotate(90deg); }
.icon-check::before {
  content: "";
  position: absolute;
  left: .2em;
  top: .28em;
  width: .68em;
  height: .38em;
  border-left: .16em solid currentColor;
  border-bottom: .16em solid currentColor;
  transform: rotate(-45deg);
}
.card {
  background: linear-gradient(135deg, #059669, #115e59);
  border: 1px solid rgba(52, 211, 153, .35);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 38px rgba(6, 95, 70, .24);
}
.card, .white-card, .glass, .btn { will-change: transform; }
.card:hover, .white-card:hover { transform: translateY(-2px); transition: transform .18s ease, border-color .18s ease; }
.category-card { min-height: 170px; position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.category-card:hover { transform: translateY(-3px) scale(1.01); border-color: rgba(251,191,36,.65); }
.category-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  color: var(--amber);
}
.floating-badge { position: absolute; top: -10px; right: -10px; }
.white-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  border-radius: 20px;
  padding: 20px;
}
.section-title { font-size: 12px; font-weight: 900; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.info-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 13px; }
.info-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}
.badge-wait { background: #fbbf24; color: #0f172a; }
.badge-progress { background: #0ea5e9; color: #fff; }
.badge-done { background: #10b981; color: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid rgba(255,255,255,.12); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; color: #d1fae5; letter-spacing: .04em; }

/* BAGIAN 03 - Admin shell
   Sidebar Guru BK, topbar mobile, area utama admin, chat dasar. */
.admin-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #065f46;
  color: #fff;
  padding: 12px 16px;
  justify-content: space-between;
  align-items: center;
}
.sidebar-backdrop { display: none; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #065f46, #042f2e);
  border-right: 1px solid rgba(255,255,255,.12);
  padding: 22px;
}
.nav { display: grid; gap: 8px; margin-top: 24px; }
.nav a { padding: 12px 14px; border-radius: 13px; color: #d1fae5; font-weight: 800; }
.nav a.active, .nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.main { padding: 28px; }
.admin-container { max-width: 1120px; margin: 0 auto; }
.photo { max-width: 100%; max-height: 330px; object-fit: contain; border-radius: 14px; border: 1px solid #e2e8f0; }
.chat { display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.bubble { padding: 11px 14px; border-radius: 16px; max-width: 78%; white-space: pre-wrap; }
.bubble.guru { background: #ecfdf5; color: #064e3b; justify-self: start; }
.bubble.siswa { background: #fbbf24; color: #0f172a; justify-self: end; }
.alert { border-radius: 14px; padding: 12px 14px; font-weight: 750; margin-bottom: 14px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.hero-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; border: 5px solid rgba(255,255,255,.55); background: #fff; }
.dropzone {
  position: relative;
  min-height: 180px;
  border: 2px dashed rgba(255,255,255,.34);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.dropzone img { width: 100%; height: 100%; object-fit: contain; background: rgba(0,0,0,.35); position: absolute; inset: 0; z-index: 1; }
.success-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px);
  color: #0f172a;
  border: 1px solid rgba(16,185,129,.22);
  border-radius: 28px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(15,23,42,.16);
}
.success-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #d1fae5;
  color: #10b981;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  font-size: 44px;
  font-weight: 1000;
}

/* BAGIAN 04 - Panel AI
   Tampilan saran penanganan, ringkasan, urgensi, skor, dan faktor risiko. */
.ai-grid { display: grid; grid-template-columns: 1fr 230px; gap: 12px; }
.ai-box { border: 1px solid #e2e8f0; border-radius: 16px; background: #f8fafc; padding: 14px; }
.urgency-Tinggi { background:#fff1f2; color:#be123c; border-color:#fecdd3; }
.urgency-Sedang { background:#fffbeb; color:#b45309; border-color:#fde68a; }
.urgency-Ringan { background:#ecfdf5; color:#047857; border-color:#bbf7d0; }
.urgency-Rendah { background:#ecfdf5; color:#047857; border-color:#bbf7d0; }
.urgency-meter {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.12);
}
.urgency-meter strong,
.urgency-meter span {
  font-size: 12px;
  font-weight: 900;
}
.urgency-track {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.1);
  overflow: hidden;
}
.urgency-track > div {
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}
.urgency-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.urgency-factors span {
  display: inline-flex;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(15,23,42,.1);
  color: currentColor;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}
.handling-reference-box {
  background: #f0fdf4;
  border-color: #86efac;
}
.handling-reference-box h3 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 16px;
}
.handling-reference-box p {
  margin: 12px 0;
  color: #064e3b;
  line-height: 1.6;
}
.handling-reference-box small {
  display: block;
  margin-top: 10px;
  color: #64748b;
  line-height: 1.5;
}
.handling-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.handling-meta span {
  display: inline-flex;
  padding: 7px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}
.file-input {
  width: 100%;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 11px;
}
.feature-list span:before { content: "\2713"; }

/* BAGIAN 14 - Responsive awal
   Aturan dasar supaya grid besar turun menjadi satu kolom di layar kecil. */
@media (max-width: 860px) {
  .home-grid, .admin-layout, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .mobile-topbar { display: flex; }
  .admin-layout { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: 260px;
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 40;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 35;
  }
  .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .main { padding: 18px; }
  .page { padding: 18px 0; }
  .input-row, .ai-grid { grid-template-columns: 1fr; }
}

/* BAGIAN 05 - Ikon CSS
   Ikon kecil untuk tombol, menu admin, badge, dan aksi tanpa library tambahan. */
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(251, 191, 36, .18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, .35);
  font-weight: 1000;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav .ui-icon { color: #a7f3d0; }
.nav a.active .ui-icon,
.nav a:hover .ui-icon { color: #fbbf24; }
.ui-icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
  color: currentColor;
}
.ui-icon::before,
.ui-icon::after {
  box-sizing: border-box;
}
.icon-dashboard::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
  box-shadow: 0 6px 0 -4px currentColor inset, 6px 0 0 -4px currentColor inset;
}
.icon-file::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 11px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.icon-file::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-90deg);
}
.icon-users::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 7px 2px 0 -2px currentColor;
}
.icon-users::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 2px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 3px 3px;
}
.icon-logout::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}
.icon-logout::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 7px;
  width: 10px;
  height: 2px;
  background: currentColor;
  box-shadow: 3px -3px 0 -1px currentColor, 3px 3px 0 -1px currentColor;
}
.icon-clock::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.icon-clock::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 5px;
  width: 2px;
  height: 6px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 3px 4px 0 -1px currentColor;
}
.icon-alert::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 2px;
  height: 9px;
  background: currentColor;
  border-radius: 999px;
}
.icon-alert::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.icon-tag::before {
  content: "";
  position: absolute;
  inset: 3px 2px 2px 3px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: rotate(-45deg);
}
.icon-tag::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.icon-menu::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}
.icon-send::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid currentColor;
  transform: scaleX(.9);
}
.icon-download::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 2px;
  height: 10px;
  background: currentColor;
  border-radius: 999px;
}
.icon-download::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 10px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.icon-bot::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 12px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.icon-bot::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 6px 0 0 currentColor, 3px -6px 0 currentColor;
}
.icon-user::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.icon-user::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 3px 3px;
}
.icon-mail::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.icon-mail::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 10px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.account-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(130px, .9fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}
.account-create-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.2fr) minmax(140px, .8fr) minmax(150px, .9fr) auto;
  gap: 12px;
  align-items: end;
}
.account-row-actions {
  display: grid;
  gap: 9px;
  justify-items: end;
}
.account-row-actions .btn {
  width: 100%;
  min-width: 104px;
}
.account-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.account-info span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.account-info strong {
  display: block;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  overflow-wrap: anywhere;
}

/* BAGIAN 06 - Dashboard guru
   Hero dashboard, kartu statistik, progress status, aktivitas terbaru. */
.dashboard-hero {
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  color: #fff;
  border-radius: 24px;
  border: 1px solid rgba(52, 211, 153, .35);
  background:
    linear-gradient(120deg, rgba(6, 95, 70, .94), rgba(17, 94, 89, .84)),
    url('bg-madrasah.png') center/cover no-repeat;
  box-shadow: 0 22px 58px rgba(15, 23, 42, .12);
}
.dashboard-hero .h1 { font-size: clamp(28px, 4vw, 42px); }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(5, 150, 105, .08);
}
.stat-card p {
  margin: 16px 0 8px;
  font-weight: 850;
}
.stat-card h2 {
  margin: 0;
  font-size: 42px;
  letter-spacing: 0;
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
}
.progress-row { display: grid; gap: 8px; }
.progress-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.progress-track > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, #fbbf24);
}
.recent-list { gap: 10px; }
.recent-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.recent-item:hover { border-color: #a7f3d0; background: #ecfdf5; }
.recent-item span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}
.notice-card {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
}
.white-card:has(.ai-grid),
.white-card[data-chat-panel] {
  box-shadow: 0 16px 42px rgba(15, 23, 42, .07);
}
.ai-box {
  line-height: 1.55;
}
.ai-box ol {
  margin: 0;
  padding-left: 20px;
}
.ai-box li { margin: 7px 0; }
.chat {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.bubble {
  position: relative;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  line-height: 1.45;
}
.bubble small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  opacity: .68;
}
.message-receipt {
  display: inline-flex;
  align-items: center;
  letter-spacing: -2px;
  font-weight: 1000;
  line-height: 1;
}
.message-receipt.read {
  color: #059669;
  opacity: 1;
}
.bubble.siswa .message-receipt.read {
  color: #064e3b;
}
.bubble.guru {
  border-bottom-left-radius: 4px;
}
.bubble.siswa {
  border-bottom-right-radius: 4px;
}
.card .glass {
  display: block;
  transition: .18s ease;
}
.card .glass:hover {
  transform: translateY(-1px);
  border-color: rgba(251,191,36,.65);
}
@media (max-width: 860px) {
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .recent-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
.icon-copy::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 9px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.icon-copy::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 9px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: inherit;
}

/* BAGIAN 07 - Halaman awal siswa
   Login Google, cek NIS, profil Google, dan foto hero untuk siswa. */
.home-center {
  padding: 24px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255,255,255,.88), rgba(255,255,255,0) 30%),
    radial-gradient(circle at 18% 88%, rgba(251,191,36,.22), rgba(251,191,36,0) 34%);
}
.home-shell {
  position: relative;
  background:
    linear-gradient(112deg, #059669 0%, #087f68 48%, rgba(255,255,255,.96) 48.2%, #f8fafc 100%);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 28px 78px rgba(6, 78, 59, .28);
}
.home-copy { position: relative; z-index: 1; }
.home-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}
.home-visual::before {
  content: "";
  position: absolute;
  inset: 44px 34px;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(236,253,245,.78));
  border: 1px solid rgba(5, 150, 105, .14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 18px 52px rgba(15, 23, 42, .12);
}
.hero-frame {
  position: relative;
  width: min(390px, 100%);
  padding: 10px;
  border-radius: 32px;
  background: linear-gradient(145deg, #ffffff, #dcfce7);
  border: 1px solid rgba(5, 150, 105, .22);
  box-shadow: 0 24px 58px rgba(15, 23, 42, .18);
}
.hero-frame .hero-img {
  display: block;
  border: 0;
  border-radius: 24px;
  background: #f8fafc;
}
.google-login-btn {
  min-height: 48px;
  color: #111827;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .12);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .10);
}
.google-login-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}
.google-mark {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  color: #fff;
  font-weight: 1000;
  font-size: 13px;
  line-height: 1;
}
.google-profile-card {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
  min-height: 64px;
}
.google-profile-card img,
.google-profile-card .avatar-fallback {
  flex: 0 0 44px;
  border: 3px solid rgba(255,255,255,.88);
}
.google-profile-card strong {
  display: block;
  line-height: 1.2;
}
.google-profile-card span {
  display: block;
  max-width: 285px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.student-check-card {
  padding: 18px;
  margin-top: 20px;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}
.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-weight: 850;
  line-height: 1.4;
}
.inline-alert .ui-icon { margin-top: 1px; }
.nis-row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 860px) {
  .home-shell {
    background: linear-gradient(180deg, #059669 0%, #087f68 58%, #f8fafc 58.2%, #ffffff 100%);
  }
  .home-visual {
    min-height: auto;
    padding-top: 10px;
  }
  .home-visual::before { inset: 22px; }
  .hero-frame { width: min(340px, 100%); }
  .google-profile-card span { max-width: 210px; }
}
@media (max-width: 520px) {
  .nis-row { grid-template-columns: 1fr; }
  .home-center { padding: 14px; }
}

/* BAGIAN 07A - Koreksi layout halaman awal siswa
   Penyesuaian desktop/tablet agar teks dan foto hero tetap rapi. */
.home-grid { grid-template-columns: minmax(420px, .92fr) minmax(420px, 1.08fr); }
.home-shell {
  background: linear-gradient(90deg, #059669 0%, #087f68 52%, #f8fafc 52.2%, #ffffff 100%);
}
.home-copy {
  max-width: 520px;
  text-shadow: 0 1px 1px rgba(6, 78, 59, .22);
}
.home-copy .muted,
.home-copy .field label,
.home-copy .feature-list,
.home-copy .student-check-card { text-shadow: none; }
.home-copy .feature-list {
  margin: 18px 0 16px;
  color: #ffffff;
  background: rgba(4, 47, 46, .24);
  border-color: rgba(255,255,255,.26);
}
.home-copy .feature-list span {
  line-height: 1.35;
}
.home-copy .auth-note {
  display: none;
}
.home-copy .google-login-btn {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: rgba(15,23,42,.12) !important;
}
.home-visual { min-height: 580px; }
.hero-frame {
  width: min(430px, 100%);
  background: #ffffff;
}
.hero-frame .hero-img {
  aspect-ratio: 1;
  object-fit: cover;
}
.google-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.google-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
}
.google-avatar img,
.google-avatar .avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.google-avatar img { object-fit: cover; z-index: 2; }
.google-avatar .avatar-fallback {
  display: grid;
  place-items: center;
  color: #047857;
  background: #ecfdf5;
  font-weight: 1000;
  z-index: 1;
}
.google-profile-card strong {
  color: #ffffff;
  font-size: 15px;
}
.google-profile-card span { display: none; }
.google-profile-card.logged-in-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-top: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(6, 78, 59, .12);
  transition: .2s ease;
}
.google-profile-card.logged-in-bar:hover {
  background: rgba(255,255,255,.22);
}
.logged-in-bar .logged-in-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.logged-in-bar .logged-in-info strong {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logged-in-bar .logged-in-info .logged-in-email {
  display: block;
  font-size: 12px;
  color: rgba(209, 250, 229, .85);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 850;
  color: #ffffff;
  background: rgba(239, 68, 68, .22);
  border: 1px solid rgba(239, 68, 68, .38);
  border-radius: 12px;
  transition: .2s ease;
  white-space: nowrap;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, .45);
  border-color: rgba(239, 68, 68, .60);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, .18);
}
@media (max-width: 980px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-shell {
    background: linear-gradient(180deg, #059669 0%, #087f68 58%, #f8fafc 58.2%, #ffffff 100%);
  }
  .home-copy { max-width: none; }
}

/* BAGIAN 08 - Laporan Saya
   Halaman siswa untuk cek laporan memakai email dan NIS. */
.google-report-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}
.google-report-note .ui-icon {
  width: 22px;
  height: 22px;
  color: #4285f4;
  background: #ffffff;
  border-radius: 50%;
}
.google-report-note strong,
.google-report-note span {
  display: block;
}
.google-report-note span {
  margin-top: 2px;
  color: #d1fae5;
  font-size: 13px;
}
.report-search .input[readonly] {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.3);
  color: #ffffff;
}

/* BAGIAN 08A - Layout Laporan Saya
   Daftar laporan siswa, detail laporan, status, bukti foto, dan chat siswa. */
.report-page { max-width: 1120px; }
.report-hero {
  padding: 24px;
  background: linear-gradient(135deg, #059669 0%, #0f766e 58%, #115e59 100%);
}
.report-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.report-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.google-report-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  min-height: 46px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .12);
}
.google-report-pill .google-mark {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}
.google-report-pill strong,
.google-report-pill span {
  display: block;
  line-height: 1.15;
}
.google-report-pill strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.google-report-pill span {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.report-search {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin-top: 22px;
}
.report-search label {
  font-size: 12px;
  font-weight: 900;
  color: #d1fae5;
}
.report-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.report-search-row.secure-report-search {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) auto;
}
.report-search .input {
  max-width: none !important;
  min-height: 46px;
}
.report-lock-card {
  margin-top: 18px;
  display: grid;
  gap: 6px;
}
.report-lock-card strong {
  font-size: 18px;
}
.report-lock-card span {
  color: #d1fae5;
}
.report-grid > .card {
  min-height: 150px;
}
.report-list-card,
.report-detail-card {
  background: linear-gradient(135deg, #059669, #0f766e);
}
.report-list-item {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
}
.report-list-item span {
  display: block;
  margin-top: 4px;
  color: #d1fae5;
  font-size: 13px;
}
.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  min-height: 86px;
  align-content: center;
  border-radius: 16px;
  color: #d1fae5;
  background: rgba(255,255,255,.1);
  border: 1px dashed rgba(255,255,255,.24);
}
.empty-state strong { color: #ffffff; }
.empty-state span { font-size: 13px; line-height: 1.45; }
.detail-empty { min-height: 170px; }
@media (max-width: 720px) {
  .report-hero-top,
  .report-actions {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }
  .report-search-row { grid-template-columns: 1fr; }
  .google-report-pill { border-radius: 16px; }
}

/* BAGIAN 09 - Halaman sukses
   Tampilan setelah laporan berhasil dikirim siswa. */
.success-center {
  padding: 24px;
}
.success-card-new {
  width: min(520px, 100%);
  text-align: left;
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(240,253,244,.94));
  border-color: rgba(16,185,129,.24);
}
.success-card-new .h1 {
  margin: 4px 0 10px;
  line-height: 1.15;
}
.success-mark-new {
  width: 70px;
  height: 70px;
  margin: 0 0 20px;
  border-radius: 22px;
  background: #d1fae5;
  color: #059669;
  font-size: 32px;
}
.success-steps {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.success-steps > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dcfce7;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}
.success-steps > div > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #047857;
  background: #ecfdf5;
}
.success-steps strong,
.success-steps small {
  display: block;
}
.success-steps strong {
  color: #0f172a;
  line-height: 1.25;
}
.success-steps small {
  margin-top: 3px;
  color: #64748b;
  line-height: 1.35;
}
.success-note {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dcfce7;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}
.success-note > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #047857;
  background: #ecfdf5;
}
.success-note strong,
.success-note small {
  display: block;
}
.success-note strong {
  color: #0f172a;
  line-height: 1.3;
}
.success-note small {
  margin-top: 5px;
  color: #64748b;
  line-height: 1.45;
}
.success-secondary {
  color: #334155 !important;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

/* BAGIAN 10 - Form pengaduan siswa
   Form cerita lengkap, data pelapor, bantuan cepat, dan upload foto bukti. */
.complaint-center {
  align-items: start;
  padding: 28px 18px;
}
.complaint-shell {
  width: min(760px, 100%);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(5,150,105,.98), rgba(15,118,110,.96) 52%, rgba(6,95,70,.98)),
    url('bg-madrasah.png') center/cover no-repeat;
  border-radius: 26px;
  border-color: rgba(255,255,255,.20);
  box-shadow: 0 28px 70px rgba(4, 47, 46, .34);
}
.complaint-pad {
  padding: clamp(24px, 4vw, 34px);
}
.complaint-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}
.complaint-back {
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
}
.complaint-secure {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #064e3b;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 950;
}
.complaint-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.complaint-heading .section-title {
  color: #bbf7d0;
  margin: 0;
}
.complaint-heading .h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
}
.complaint-heading .muted {
  max-width: 620px;
  margin: 0;
  color: #d1fae5;
  line-height: 1.65;
}
.student-report-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 20px 0 22px;
  padding: 13px;
  border-radius: 18px;
  color: #0f172a;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 16px 34px rgba(4, 47, 46, .16);
}
.student-report-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-weight: 1000;
}
.student-report-main,
.student-report-main span,
.student-report-main strong {
  display: block;
  min-width: 0;
}
.student-report-main span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.student-report-main strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #0f172a;
  line-height: 1.25;
}
.student-report-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.student-report-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  font-weight: 950;
}
.complaint-form {
  gap: 16px;
}
.complaint-field {
  gap: 8px;
}
.complaint-field label {
  color: #ffffff;
  font-size: 13px;
  letter-spacing: .01em;
}
.complaint-field .muted {
  color: #bbf7d0;
  font-weight: 800;
}
.complaint-field .input,
.complaint-field .textarea {
  min-height: 50px;
  color: #ffffff;
  background: rgba(4, 47, 46, .36);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.complaint-field .input:focus,
.complaint-field .textarea:focus {
  border-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251,191,36,.14), inset 0 1px 0 rgba(255,255,255,.06);
}
.complaint-field .input::placeholder,
.complaint-field .textarea::placeholder {
  color: rgba(209,250,229,.68);
}
.complaint-textarea {
  min-height: 164px;
  resize: vertical;
}
.complaint-dropzone {
  min-height: 152px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(4,47,46,.34), rgba(5,150,105,.18));
  border-color: rgba(187,247,208,.58);
}
.complaint-dropzone:hover {
  border-color: #fbbf24;
  background:
    linear-gradient(135deg, rgba(4,47,46,.30), rgba(251,191,36,.12));
}
.complaint-upload-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  max-width: 330px;
  padding: 18px;
}
.complaint-upload-empty .upload-icon {
  width: 50px;
  height: 50px;
  margin: 0;
  border-radius: 16px;
  color: #fbbf24;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.24);
}
.complaint-upload-empty strong {
  color: #fbbf24;
  font-size: 15px;
}
.complaint-upload-empty span {
  color: #d1fae5;
  font-size: 13px;
  line-height: 1.45;
}
.complaint-submit {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 15px;
  box-shadow: 0 14px 28px rgba(251, 191, 36, .25);
}
@media (max-width: 680px) {
  .complaint-center {
    padding: 14px;
  }
  .complaint-topbar,
  .student-report-card {
    grid-template-columns: 1fr;
  }
  .complaint-topbar {
    align-items: stretch;
  }
  .complaint-secure {
    justify-content: center;
    border-radius: 14px;
  }
  .student-report-meta {
    justify-content: flex-start;
  }
}

/* BAGIAN 11 - Admin laporan
   Dashboard, arsip laporan, kategori laporan, detail laporan, dan chat guru. */
body.admin-body {
  background:
    radial-gradient(circle at 18% 10%, rgba(251,191,36,.16), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(16,185,129,.18), transparent 30%),
    #f4f7f4;
}
.admin-body .overlay { background: rgba(255,255,255,.70); }
.sidebar {
  background:
    linear-gradient(180deg, rgba(6,95,70,.96), rgba(4,47,46,.98)),
    url('bg-madrasah.png') center/cover no-repeat;
}
.admin-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 4vw, 38px);
  color: #fff;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.26);
  background:
    linear-gradient(120deg, rgba(5,150,105,.96), rgba(15,118,110,.90) 54%, rgba(251,191,36,.22)),
    url('bg-madrasah.png') center/cover no-repeat;
  box-shadow: 0 24px 60px rgba(6,78,59,.23);
}
.admin-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -130px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.admin-hero > *,
.detail-hero > * { position: relative; z-index: 1; }
.admin-hero.compact { min-height: 170px; }
.admin-hero .h1,
.detail-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}
.admin-hero-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.admin-hero-panel {
  min-width: 170px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
}
.admin-hero-panel strong { display:block; font-size:42px; line-height:1; }
.admin-hero-panel span { display:block; margin-top:8px; color:#d1fae5; font-weight:800; }
.admin-stat-card,
.admin-panel,
.archive-report-card,
.archive-category-card {
  color: #0f172a;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(15,23,42,.07);
}
.admin-stat-card {
  min-height: 158px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.admin-stat-card::after {
  content:"";
  position:absolute;
  right:-36px;
  bottom:-44px;
  width:120px;
  height:120px;
  border-radius:50%;
  background:rgba(251,191,36,.16);
}
.admin-stat-card p { margin:16px 0 8px; color:#64748b; font-weight:900; }
.admin-stat-card h2 { margin:0; font-size:44px; }
.admin-stat-card span { color:#64748b; font-size:13px; }
.admin-panel { padding: 20px; }
.admin-panel .text-muted { color: #64748b; }
.admin-empty {
  display:grid;
  gap:6px;
  padding:18px;
  border-radius:16px;
  color:#64748b;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
}
.admin-empty strong { color:#0f172a; }
.admin-recent-item {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:13px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.admin-recent-item span { display:block; margin-top:4px; color:#64748b; font-size:13px; }
.sample-table {
  display:grid;
  grid-template-columns: 1.1fr .8fr .6fr;
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:14px;
  font-size:13px;
}
.sample-table-4 { grid-template-columns: 1.1fr .7fr .6fr .8fr; }
.sample-table span { padding:9px 10px; border-bottom:1px solid #e2e8f0; }
.sample-table span:nth-child(-n+3) { background:#ecfdf5; color:#047857; font-weight:900; }
.sample-table span:nth-child(n+4) { border-bottom:0; }
.sample-table-4 span:nth-child(-n+4) { background:#ecfdf5; color:#047857; font-weight:900; border-bottom:1px solid #e2e8f0; }
.sample-table-4 span:nth-child(n+5) { border-bottom:0; }
.import-panel-head {
  align-items: flex-start;
  margin-bottom: 12px;
}
.template-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.template-btn {
  min-height: 38px;
  padding: 9px 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #dbe4ef;
}
.template-btn:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.danger-panel { border-color:#fecaca; background:linear-gradient(145deg,#fff,#fff7f7); }
.admin-table-panel table th { color:#64748b; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.admin-table-panel table td { color:#0f172a; border-bottom:1px solid #e2e8f0; }
.pager {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:16px;
}
.pager span { color:#64748b; font-weight:900; }
.btn.disabled { opacity:.45; pointer-events:none; }
.archive-category-card {
  display:flex;
  flex-direction:column;
  min-height:215px;
  padding:18px;
  transition:.18s ease;
}
.archive-category-card:hover,
.archive-report-card:hover { transform:translateY(-3px); border-color:#a7f3d0; box-shadow:0 20px 45px rgba(6,78,59,.13); }
.category-card-top,
.category-card-meta,
.archive-report-meta { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.category-card-top { justify-content:space-between; }
.category-icon.small { width:42px; height:42px; border-radius:14px; color:#047857; background:#ecfdf5; }
.archive-category-card h2 { margin:18px 0 8px; font-size:20px; }
.archive-category-card p { flex:1; margin:0; color:#64748b; line-height:1.45; }
.category-card-meta { margin-top:16px; color:#047857; font-weight:900; font-size:13px; }
.archive-filter { display:grid; grid-template-columns:minmax(0,1fr) 180px auto; gap:10px; }
.archive-list { display:grid; gap:12px; }
.archive-report-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  padding:18px;
}
.archive-report-card h2 { margin:0; font-size:20px; }
.archive-report-card p { margin:10px 0; color:#64748b; line-height:1.45; }
.archive-report-meta { color:#047857; font-size:13px; font-weight:900; }
.detail-hero { min-height:180px; align-items:flex-end; }
.detail-hero h1 { max-width:760px; }
.detail-hero p { color:#d1fae5; margin:0; font-weight:800; }
.detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:18px; margin-top:18px; align-items:start; }
.detail-main,
.detail-side { display:grid; gap:18px; }
.report-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.report-overview > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 15px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.report-overview span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.report-overview strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
}
.report-overview .urgency-Tinggi,
.report-overview .is-quick {
  border-color: #fecaca;
  background: #fff1f2;
}
.report-overview .urgency-Sedang { border-color:#fde68a; background:#fffbeb; }
.report-overview .urgency-Ringan { border-color:#bbf7d0; background:#ecfdf5; }
.story-panel { padding: 0; overflow: hidden; }
.story-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.story-panel-head .h2,
.story-panel-head .section-title { margin-bottom: 0; }
.story-date {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 900;
}
.report-body {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  color:#334155;
  line-height:1.72;
}
.report-body p {
  margin: 0;
  padding: 14px 15px;
  border-left: 3px solid #a7f3d0;
  border-radius: 0 13px 13px 0;
  background: #f8fafc;
}
.nlp-details {
  margin: 0 22px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.nlp-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.nlp-details .nlp-box {
  margin: 0;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-radius: 0;
}
.nlp-box {
  display:grid;
  gap:8px;
  margin:16px 0;
  padding:14px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.nlp-box code { white-space:pre-wrap; color:#047857; }
.side-panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.side-panel-heading .h2,
.side-panel-heading .section-title { margin-bottom: 0; }
.side-panel-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 13px;
}
.student-profile { display:grid; gap:9px; color:#64748b; }
.student-profile > strong {
  padding-bottom: 11px;
  border-bottom: 1px solid #e2e8f0;
  color:#0f172a;
  font-size:17px;
}
.student-profile > div {
  display: grid;
  gap: 2px;
}
.student-profile small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.student-profile span {
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13px;
}
.side-helper {
  margin: -4px 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.report-followup-panel {
  border-color: #fde68a;
  background: linear-gradient(145deg, #ffffff, #fffbeb);
}
.report-followup-panel .field strong {
  color: #334155;
  font-size: 12px;
}
.timeline { display:grid; gap:12px; }
.timeline > div:not(.admin-empty) {
  padding:14px;
  border-left:4px solid #10b981;
  background:#f8fafc;
  border-radius:14px;
}
.timeline span { display:block; color:#64748b; font-size:13px; margin-top:3px; }
.timeline p { margin:8px 0 0; color:#334155; }
@media (max-width: 980px) {
  .detail-layout, .archive-filter { grid-template-columns:1fr; }
  .report-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .archive-report-card { grid-template-columns:1fr; }
  .admin-hero, .detail-hero { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 560px) {
  .report-overview { grid-template-columns:1fr; }
  .story-panel-head { display:grid; padding:18px; }
  .story-date { width:fit-content; }
  .report-body { padding:16px 18px; }
  .nlp-details { margin:0 18px 18px; }
}

/* BAGIAN 11A - Koreksi admin laporan
   Penyempurnaan kartu arsip, detail laporan, collapse AI, dan tombol aksi. */
.icon-eye::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 16px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 999px 999px / 80% 80% 80% 80%;
}
.icon-eye::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.archive-report-card {
  grid-template-columns: minmax(0, 1fr) auto;
}
.archive-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.archive-actions form { margin: 0; }
.archive-actions .btn { min-width: 92px; }
.ai-collapse > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 900;
  color: #0f172a;
  background: #fbbf24;
  box-shadow: 0 12px 26px rgba(251, 191, 36, .22);
}
.ai-collapse > summary::-webkit-details-marker { display: none; }
.ai-collapse[open] > summary { margin-bottom: 16px; }
.ai-collapse-body { animation: enter .22s ease both; }
.ai-assistant-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: linear-gradient(145deg,#f8fafc,#ffffff);
}
.ai-assistant-head .h2 { margin: 2px 0 4px; }
.ai-assistant-head .text-muted { margin: 0; font-size: 12px; }
.ai-priority-card {
  display: grid;
  gap: 3px;
  min-width: 130px;
  padding: 13px 15px;
  border: 1px solid currentColor;
  border-radius: 16px;
}
.ai-priority-card span,
.ai-priority-card small {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ai-priority-card strong {
  font-size: 22px;
  line-height: 1.1;
}
.ai-action-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}
.ai-action-card {
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: #ffffff;
}
.ai-action-card.primary-action {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.ai-action-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ai-action-title > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 10px;
  color: #047857;
  background: #d1fae5;
  font-weight: 1000;
}
.ai-action-title .section-title { margin: 0 0 2px; }
.ai-action-title h3,
.ai-reply-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}
.ai-action-card ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}
.ai-action-card li::marker {
  color: #059669;
  font-weight: 1000;
}
.ai-reply-card {
  margin-top: 12px;
  padding: 16px;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.ai-reply-card .section-title { color:#047857; margin:0 0 2px; }
.ai-reply-card > p {
  margin: 14px 0 0;
  padding: 13px 14px;
  color: #064e3b;
  background: rgba(255,255,255,.72);
  border: 1px solid #bbf7d0;
  border-radius: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}
.ai-analysis-details {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #f8fafc;
  overflow: hidden;
}
.ai-analysis-details > summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.ai-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(220px,.55fr);
  gap: 12px;
  padding: 0 12px 12px;
}
.draft-box .between { align-items: center; }
.admin-chat-panel .bubble.guru {
  justify-self: end;
  background: #fbbf24;
  color: #0f172a;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}
.admin-chat-panel .bubble.siswa {
  justify-self: start;
  background: #ecfdf5;
  color: #064e3b;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 4px;
}
@media (max-width: 720px) {
  .archive-report-card { grid-template-columns: 1fr; }
  .archive-actions { justify-content: flex-start; }
  .ai-assistant-head,
  .ai-action-grid,
  .ai-analysis-grid {
    grid-template-columns: 1fr;
  }
  .ai-priority-card { width: 100%; }
  .ai-reply-card .between {
    display: grid;
    justify-items: stretch;
  }
}

/* BAGIAN 12 - Data siswa
   Tampilan pencarian siswa, import data, tombol template, dan pagination. */
.student-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 430px;
  width: 100%;
}
.student-search .input {
  min-height: 44px;
}
.student-search .btn {
  min-height: 44px;
  align-self: stretch;
}
.admin-table-panel > .between {
  align-items: flex-start;
}
.pager {
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}
.pager .btn {
  color: #0f172a;
  background: #fbbf24;
  border-color: #fbbf24;
  min-width: 146px;
  box-shadow: 0 10px 22px rgba(251, 191, 36, .20);
}
.pager .btn.disabled {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
  box-shadow: none;
}
@media (max-width: 760px) {
  .admin-table-panel > .between,
  .student-search {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
  }
  .pager {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .pager span { text-align: center; }
}

/* BAGIAN 13 - Evaluasi AI lokal
   Ringkasan performa AI, riwayat pengujian, feedback guru, dan detail training. */
.admin-alert {
  margin: 0 0 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}
.admin-layout {
  align-items: stretch;
}
.admin-layout .sidebar {
    align-self: stretch;
}

.ai-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ai-stat-card h2 {
    font-size: 32px;
}

.dataset-source-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.dataset-source-list > div,
.feedback-item,
.wrong-list > div {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 12px;
}

.dataset-source-list strong,
.feedback-item strong {
    display: block;
    color: #0f172a;
}

.dataset-source-list span,
.feedback-item span,
.wrong-list span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.wrong-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.wrong-list p {
    margin: 0;
    color: #0f172a;
    line-height: 1.45;
}

.feedback-item small {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-weight: 900;
}

.category-bars {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.ai-simple-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-simple-card h2 {
    margin: 2px 0 8px;
    color: #047857;
    font-size: 38px;
    line-height: 1;
}

.ai-simple-card p:last-child {
    margin-bottom: 0;
    line-height: 1.55;
}

.ai-explain-panel {
    display: grid;
    gap: 14px;
}

.ai-plain-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ai-plain-steps > div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ai-plain-steps strong,
.ai-plain-steps span {
    display: block;
}

.ai-plain-steps strong {
    color: #0f172a;
    line-height: 1.3;
}

.ai-plain-steps span {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.ai-technical-panel details {
    display: grid;
}

.ai-technical-panel summary {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 14px;
    color: #0f172a;
    background: #fbbf24;
    font-weight: 900;
    list-style: none;
}

.ai-technical-panel summary::-webkit-details-marker {
    display: none;
}

.ai-technical-body {
    margin-top: 18px;
    animation: enter .22s ease both;
}

.ai-dataset-manager {
    scroll-margin-top: 18px;
    border-color: #a7f3d0;
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
}

.ai-dataset-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.ai-dataset-flow > div,
.ai-train-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: rgba(255,255,255,.86);
}

.ai-dataset-flow strong,
.ai-train-card strong {
    color: #0f172a;
}

.ai-dataset-flow span,
.ai-train-card span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.ai-dataset-actions {
    align-items: stretch;
}

.ai-dataset-actions > form {
    min-width: 0;
}

.ai-dataset-types {
    margin-top: 18px;
    align-items: stretch;
}

.ai-dataset-type {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    background: rgba(255,255,255,.88);
}

.ai-dataset-type.handling-type {
    border-color: #bae6fd;
    background: rgba(240,249,255,.9);
}

.ai-dataset-type h3 {
    margin: 8px 0 5px;
    color: #0f172a;
    font-size: 18px;
}

.ai-dataset-type p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.ai-type-number {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #047857;
    background: #d1fae5;
    border-radius: 10px;
    font-weight: 1000;
}

.handling-type .ai-type-number {
    color: #0369a1;
    background: #e0f2fe;
}

.ai-import-status {
    padding: 9px 11px;
    color: #047857;
    background: #ecfdf5;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
}

.handling-type .ai-import-status {
    color: #0369a1;
    background: #e0f2fe;
}

.ai-direct-note {
    display: grid;
    gap: 4px;
    padding: 13px;
    border: 1px solid #bae6fd;
    border-radius: 14px;
    background: #ffffff;
}

.ai-direct-note strong {
    color: #0369a1;
}

.ai-direct-note span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.ai-train-card {
    align-content: start;
    border-color: #fde68a;
    background: #fffbeb;
}

.ai-train-card .btn {
    margin-top: auto;
}

.ai-test-panel {
    scroll-margin-top: 18px;
}

.dashboard-status-panel {
    overflow: hidden;
}

.status-stackbar {
    display: flex;
    width: 100%;
    height: 18px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    border: 1px solid #dbe4ef;
}

.status-stackbar span {
    display: block;
    min-width: 4px;
}

.dashboard-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.status-mini-card {
    position: relative;
    display: grid;
    gap: 5px;
    padding: 13px 13px 13px 34px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.status-mini-card i {
    position: absolute;
    left: 13px;
    top: 17px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.status-mini-card strong {
    color: #0f172a;
}

.status-mini-card span {
    color: #047857;
    font-weight: 900;
    font-size: 13px;
}

.status-mini-card small {
    color: #64748b;
    line-height: 1.4;
}

.detail-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-test-form {
    display: grid;
    gap: 12px;
}

.ai-test-controls {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.ai-test-controls .btn {
    min-height: 46px;
}

.ai-test-table table {
    min-width: 820px;
}

.ai-test-table th {
    color: #047857;
    background: #ecfdf5;
    border-bottom: 1px solid #bbf7d0;
    letter-spacing: .05em;
}

.ai-test-table td {
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

.ai-test-table form {
    margin: 0;
}

.ai-test-delete {
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 10px;
}

@media (max-width: 760px) {
    .ai-stat-grid {
        grid-template-columns: 1fr;
    }

    .ai-simple-grid,
    .ai-plain-steps {
        grid-template-columns: 1fr;
    }

    .ai-simple-card h2 {
        font-size: 32px;
    }

    .dashboard-status-grid,
    .ai-test-controls,
    .ai-dataset-flow,
    .ai-dataset-types {
        grid-template-columns: 1fr;
    }

    .ai-technical-panel summary {
        width: 100%;
        justify-content: center;
    }
}

/* BAGIAN 14A - Print laporan
   Mode cetak supaya laporan bisa diprint bersih tanpa sidebar dan tombol. */
@media print {
    @page {
        margin: 14mm;
    }

    body,
    body.admin-body {
        background: #ffffff !important;
        color: #111827 !important;
        max-width: none !important;
        overflow: visible !important;
    }

    .bg,
    .overlay,
    .mobile-topbar,
    .sidebar,
    .admin-sidebar-fill,
    .sidebar-backdrop,
    .detail-hero-actions,
    .ai-detail-panel,
    .report-followup-panel,
    .admin-chat-panel,
    .btn {
        display: none !important;
    }

    .admin-layout {
        display: block !important;
        padding-left: 0 !important;
        min-height: auto !important;
    }

    .main {
        padding: 0 !important;
        min-height: auto !important;
    }

    .admin-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .detail-hero {
        min-height: 0 !important;
        padding: 0 0 14px !important;
        color: #111827 !important;
        background: #ffffff !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .detail-hero::after {
        display: none !important;
    }

    .detail-hero p {
        color: #334155 !important;
    }

    .detail-layout {
        display: block !important;
        margin-top: 0 !important;
    }

    .detail-main,
    .detail-side {
        display: block !important;
    }

    .admin-panel,
    .report-print-section,
    .nlp-box {
        break-inside: avoid;
        box-shadow: none !important;
        background: #ffffff !important;
        border-color: #d1d5db !important;
    }

    .admin-panel {
        margin: 0 0 12px !important;
        padding: 14px !important;
        border-radius: 10px !important;
    }

    .nlp-box code {
        color: #111827 !important;
    }
}

/* BAGIAN 14B - Responsive hardening
   Perlindungan layout untuk HP, tablet, laptop, tabel lebar, dan teks panjang. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
canvas {
    max-width: 100%;
}

.main,
.admin-container,
.page,
.shell,
.card,
.admin-panel,
.admin-hero,
.detail-hero,
.archive-report-card,
.archive-category-card {
    min-width: 0;
}

.table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table-wrap table {
    min-width: 720px;
}

.admin-table-panel .table-wrap {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

@media (min-width: 1180px) {
    .admin-container {
        max-width: 1180px;
    }

    .page {
        width: min(1180px, calc(100% - 40px));
    }
}

@media (max-width: 1080px) {
    .home-grid {
        grid-template-columns: 1fr;
        width: min(720px, 100%);
    }

    .home-shell {
        background: linear-gradient(180deg, #059669 0%, #087f68 56%, #f8fafc 56.2%, #ffffff 100%);
    }

    .home-copy {
        max-width: none;
    }

    .home-visual {
        min-height: auto;
        padding-top: 4px;
    }

    .hero-frame {
        width: min(380px, 100%);
    }
}

@media (max-width: 980px) {
    .admin-dashboard-grid,
    .student-admin-grid,
    .report-grid,
    .account-row,
    .account-create-form {
        grid-template-columns: 1fr;
    }

    .report-detail-card {
        grid-column: auto !important;
    }

    .admin-stat-grid,
    .archive-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-hero-panel {
        width: 100%;
        min-width: 0;
    }

    .account-row-actions {
        justify-items: stretch;
    }

    .admin-hero-actions .btn,
    .detail-hero .btn {
        min-height: 44px;
    }
}

@media (max-width: 760px) {
    .center {
        padding: 14px;
    }

    .pad,
    .complaint-pad {
        padding: 22px;
    }

    .h1,
    .admin-hero .h1,
    .detail-hero h1 {
        font-size: 28px;
        line-height: 1.12;
    }

    .title {
        font-size: 32px;
        line-height: 1.08;
    }

    .admin-hero,
    .detail-hero,
    .report-hero {
        padding: 22px;
        border-radius: 20px;
    }

    .admin-hero-actions,
    .report-actions,
    .template-actions,
    .archive-actions {
        width: 100%;
        justify-content: stretch;
    }

    .admin-hero-actions .btn,
    .report-actions .btn,
    .template-actions .btn,
    .archive-actions .btn {
        flex: 1 1 150px;
    }

    .import-panel-head,
    .report-hero-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sample-table {
        grid-template-columns: repeat(3, minmax(76px, 1fr));
        overflow: hidden;
    }

    .sample-table-4 {
        grid-template-columns: repeat(4, minmax(76px, 1fr));
    }

    .archive-filter,
    .report-search-row,
    .report-search-row.secure-report-search,
    .student-search,
    .input-row,
    .nis-row {
        grid-template-columns: 1fr;
    }

    .archive-report-meta,
    .category-card-meta {
        gap: 7px;
    }

    .archive-report-meta span,
    .category-card-meta span {
        padding: 5px 8px;
        border-radius: 999px;
        background: #ecfdf5;
        color: #047857;
    }

    .bubble {
        max-width: 92%;
    }

    .chat {
        max-height: 360px;
    }
}

@media (max-width: 560px) {
    .page {
        width: calc(100% - 24px);
        max-width: 100%;
        padding: 18px 0;
    }

    .shell,
    .card,
    .admin-panel,
    .archive-report-card,
    .archive-category-card,
    .success-card-new,
    .complaint-shell {
        border-radius: 18px;
    }

    .home-center,
    .complaint-center,
    .success-center {
        padding: 12px;
    }

    .home-grid {
        width: 100%;
    }

    .home-shell {
        width: calc(100vw - 28px) !important;
        margin-inline: auto;
        overflow: hidden;
    }

    .home-copy,
    .student-check-card,
    .google-login-btn {
        max-width: 100%;
        min-width: 0;
    }

    .home-shell {
        background: linear-gradient(180deg, #059669 0%, #087f68 100%);
    }

    .home-copy {
        padding: 22px 18px 18px;
    }

    .home-copy .row {
        gap: 10px;
    }

    .home-copy .row h1 {
        font-size: 21px !important;
        line-height: 1.15;
    }

    .home-copy .row p {
        font-size: 13px;
    }

    .home-copy .title {
        font-size: 29px;
        line-height: 1.12;
        margin: 14px 0 8px;
        max-width: 100%;
        overflow-wrap: normal;
    }

    .home-copy > .muted {
        color: #ecfdf5;
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 12px;
    }

    .home-copy > p.muted {
        display: none;
    }

    .home-copy .feature-list {
        display: none;
    }

    .mobile-hero-frame {
        display: none !important;
    }

    .google-login-btn {
        margin-top: 10px;
        min-height: 46px;
        color: #0f172a !important;
        background: #ffffff !important;
        border-color: rgba(15,23,42,.12) !important;
    }

    .auth-note {
        display: none;
    }

    .student-check-card {
        margin-top: 14px;
        padding: 15px;
        background: rgba(255,255,255,.18);
        border-color: rgba(255,255,255,.30);
    }

    .student-check-card .field {
        gap: 6px;
    }

    .student-check-card .input {
        min-height: 46px;
    }

    .home-visual {
        padding: 0 18px 24px;
    }

    .hero-frame {
        width: min(300px, 100%);
        border-radius: 24px;
    }

    .hero-frame .hero-img {
        border-radius: 18px;
    }

    .admin-stat-grid,
    .archive-category-grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .admin-stat-card,
    .archive-category-card {
        min-height: auto;
    }

    .admin-recent-item,
    .recent-item {
        display: grid;
        align-items: start;
    }

    .google-report-pill {
        width: 100%;
        justify-content: flex-start;
    }

    .report-list-card,
    .report-detail-card {
        padding: 18px;
    }

    .complaint-heading .h1 {
        font-size: 30px;
    }

    .student-report-card {
        padding: 12px;
    }

    .student-report-meta span {
        flex: 1 1 auto;
        justify-content: center;
    }

    .complaint-dropzone {
        min-height: 140px;
    }

    .success-card-new {
        padding: 24px;
    }

    .success-note {
        display: grid;
    }
}

@media (max-width: 380px) {
    .pad,
    .complaint-pad,
    .admin-panel,
    .report-list-card,
    .report-detail-card {
        padding: 18px;
    }

    .btn {
        padding: 11px 12px;
    }

    .h1,
    .admin-hero .h1,
    .detail-hero h1,
    .complaint-heading .h1 {
        font-size: 26px;
    }
}

@media (max-width: 340px) {
    .home-copy .row {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .home-copy .category-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border-radius: 13px;
    }

    .home-copy .row h1 {
        font-size: 17px !important;
    }

    .home-copy .row p {
        font-size: 11px;
    }
}

/* BAGIAN 14C - Sidebar admin full height
   Menjaga sidebar Guru BK tetap penuh sampai bawah di desktop dan mobile. */
@media (min-width: 861px) {
    body.admin-body {
        min-height: 100vh;
    }

    body.admin-body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        pointer-events: none;
        background:
            linear-gradient(180deg, rgba(6,95,70,.97), rgba(4,47,46,.99)),
            url('bg-madrasah.png') center/cover no-repeat;
        z-index: 0;
    }

    .admin-layout {
        position: relative;
        z-index: 1;
        display: block;
        min-height: 100vh;
        padding-left: 260px;
    }

    .admin-layout .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        min-height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        z-index: 10;
    }

    .admin-layout .main {
        min-height: 100vh;
        min-width: 0;
    }

    .admin-container {
        width: min(1180px, 100%);
    }
}

@media (max-width: 860px) {
    body.admin-body::before {
        display: none;
    }

    .admin-layout .sidebar {
        min-height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
    }
}

/* BAGIAN 08B - Notifikasi dan bukti laporan siswa
   Tanda balasan baru, ceklis baca chat, preview foto bukti, dan bantuan cepat. */
.student-notif-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fbbf24;
    color: #0f172a;
    font-size: 13px;
    font-weight: 1000;
    box-shadow: 0 10px 24px rgba(251, 191, 36, .24);
}

.report-list-item {
    display: grid;
    gap: 7px;
    padding: 14px;
    border-radius: 16px;
    transition: .18s ease;
}

.report-list-item.is-active,
.report-list-item:hover {
    border-color: rgba(251, 191, 36, .58);
    background: rgba(255, 255, 255, .19);
}

.report-list-item.has-update {
    border-color: rgba(251, 191, 36, .75);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .10);
}

.report-item-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mini-update-dot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fbbf24;
    color: #0f172a;
    font-size: 11px;
    font-weight: 1000;
}

.student-report-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 14px;
}

.student-report-summary {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 16px;
    background: rgba(0,0,0,.12);
}

.student-report-summary p {
    margin: 0;
    color: #ecfdf5;
    line-height: 1.65;
    white-space: pre-wrap;
}

.evidence-card {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #f8fafc;
}

.student-report-summary .evidence-card {
    margin: 0;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.12);
}

.evidence-card a {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.evidence-card img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.evidence-card figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.evidence-card figcaption strong {
    color: #0f172a;
}

.student-report-summary .evidence-card figcaption,
.student-report-summary .evidence-card figcaption strong {
    color: #ecfdf5;
}

.complaint-hint {
    color: rgba(209,250,229,.78);
    line-height: 1.45;
}

.quick-help-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(251,191,36,.55);
    background: rgba(251,191,36,.10);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.quick-help-option input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #fbbf24;
}

.quick-help-option strong,
.quick-help-option small {
    display: block;
}

.quick-help-option strong {
    color: #fff;
    font-weight: 1000;
}

.quick-help-option small {
    margin-top: 3px;
    color: #fffbeb;
    line-height: 1.45;
}

.quick-help-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 12px;
    font-weight: 1000;
}

.recent-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-report-card.is-quick-help {
    border-color: #fecaca;
    box-shadow: 0 18px 42px rgba(185, 28, 28, .10);
}

.detail-hero.is-quick-help {
    border-color: rgba(254, 202, 202, .85);
}

.admin-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

@media (max-width: 560px) {
    .report-item-title,
    .evidence-card figcaption {
        display: grid;
    }

    .mini-update-dot {
        width: fit-content;
    }
}

/* BAGIAN 11B - Notifikasi, filter operasional, dan tren anonim admin. */
.archive-filter.operational-filter {
    grid-template-columns: minmax(240px, 1.4fr) repeat(5, minmax(145px, .7fr)) auto auto;
    align-items: center;
}
.urgency-badge,
.due-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 1000;
}
.urgency-badge.urgency-Tinggi { color:#b91c1c; background:#fee2e2; border:1px solid #fecaca; }
.urgency-badge.urgency-Sedang { color:#92400e; background:#fef3c7; border:1px solid #fde68a; }
.urgency-badge.urgency-Ringan { color:#047857; background:#d1fae5; border:1px solid #a7f3d0; }
.due-badge { color:#475569; background:#f1f5f9; border:1px solid #e2e8f0; }
.due-badge.is-overdue { color:#b91c1c; background:#fff1f2; border-color:#fecdd3; }
.notification-center { overflow: hidden; }
.notification-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.notification-summary span {
    display: grid;
    min-width: 86px;
    padding: 9px 12px;
    border-radius: 14px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
}
.notification-summary strong { font-size: 21px; }
.notification-summary .danger { color:#b91c1c; background:#fff1f2; border-color:#fecdd3; }
.notification-list { display:grid; gap:9px; margin-top:16px; }
.notification-item {
    display: grid;
    grid-template-columns: 10px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border-radius: 16px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.notification-item:hover { border-color:#6ee7b7; background:#f0fdf4; }
.notification-item.is-new { border-left:4px solid #0ea5e9; }
.notification-item.is-emergency { background:#fff7f7; border-color:#fecaca; }
.notification-dot { width:9px; height:9px; border-radius:50%; background:#94a3b8; }
.notification-item.is-new .notification-dot { background:#0ea5e9; box-shadow:0 0 0 5px rgba(14,165,233,.12); }
.notification-item.is-emergency .notification-dot { background:#dc2626; box-shadow:0 0 0 5px rgba(220,38,38,.12); }
.notification-item small { display:block; margin-top:4px; color:#64748b; }
.trend-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(48px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 235px;
    margin-top: 16px;
}
.trend-column { display:grid; grid-template-rows:auto 160px auto; gap:7px; text-align:center; min-width:0; }
.trend-value { color:#047857; font-weight:1000; }
.trend-track { display:flex; align-items:flex-end; overflow:hidden; border-radius:14px; background:#f1f5f9; }
.trend-track span { display:block; width:100%; min-height:5px; border-radius:14px; background:linear-gradient(180deg,#34d399,#047857); }
.trend-column small { color:#64748b; font-size:10px; font-weight:800; line-height:1.25; }
.class-trend-list { display:grid; gap:16px; margin-top:20px; }
.class-trend-row { display:grid; gap:7px; }
.class-trend-row span { color:#047857; font-size:12px; font-weight:900; }
.nav-notification-badge {
    margin-left: auto;
    min-width: 23px;
    padding: 3px 6px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 10px;
    text-align: center;
}
.nav-notification-badge.emergency { color:#991b1b; background:#fee2e2; }
@media (max-width: 1180px) {
    .archive-filter.operational-filter { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .archive-filter.operational-filter .filter-search { grid-column:1/-1; }
}
@media (max-width: 720px) {
    .archive-filter.operational-filter,
    .notification-item { grid-template-columns:1fr; }
    .notification-dot { display:none; }
    .notification-item .recent-badges { justify-content:flex-start; }
    .trend-bars { gap:5px; }
    .trend-column { grid-template-rows:auto 120px auto; }
}

/* BAGIAN 07B - Final halaman awal siswa
   Posisi foto hero khusus HP, jarak form, dan tombol halaman siswa. */
.home-center {
    display: grid;
    place-items: start center;
    min-height: 100svh;
}

.home-copy .title {
    max-width: 11ch;
}

.home-copy .btn-soft {
    color: #ffffff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.24);
}

.home-copy .btn-soft:hover {
    background: rgba(255,255,255,.20);
}

.hero-frame {
    box-shadow: 0 28px 70px rgba(6, 78, 59, .18);
}

.hero-frame .hero-img {
    background: #ecfdf5;
}

.mobile-hero-frame {
    display: none;
}

.mobile-hero-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 20px;
}

@media (max-width: 1080px) {
    .home-center {
        padding-block: 18px;
    }

    .home-shell {
        background:
            linear-gradient(180deg, rgba(5,150,105,.98), rgba(8,127,104,.98) 100%) !important;
    }

    .home-grid {
        gap: 0;
    }

    .home-copy {
        max-width: none;
    }

    .home-copy .title {
        max-width: 720px;
    }

    .home-visual {
        min-height: auto !important;
        padding: 4px 24px 28px;
        display: none;
    }

    .home-visual::before {
        display: none;
    }

    .mobile-hero-frame {
        display: block;
        width: min(360px, 100%);
        margin: 18px auto 6px;
        padding: 8px;
        border-radius: 26px;
        background: rgba(255,255,255,.86);
        border: 1px solid rgba(255,255,255,.55);
        box-shadow: 0 18px 40px rgba(6, 78, 59, .18);
    }

    .hero-frame {
        width: min(360px, 100%);
        padding: 8px;
        background: rgba(255,255,255,.82);
        border: 1px solid rgba(255,255,255,.55);
    }
}

@media (max-width: 700px) {
    .home-center {
        padding: 10px;
    }

    .home-shell {
        width: min(100%, 640px) !important;
        border-radius: 22px;
    }

    .home-copy {
        padding: 22px 18px 16px !important;
    }

    .home-copy .row {
        align-items: flex-start;
    }

    .home-copy .category-icon {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .home-copy .title {
        max-width: 100%;
        margin: 18px 0 10px;
        font-size: clamp(30px, 8.2vw, 42px);
        line-height: 1.04;
    }

    .home-copy > .muted {
        max-width: 36rem;
        margin: 0;
        color: #ecfdf5;
    }

    .home-copy .feature-list {
        margin: 16px 0 14px;
        padding: 13px;
        gap: 8px;
        font-size: 13px;
        background: rgba(4,47,46,.22);
    }

    .google-profile-card,
    .student-check-card {
        margin-top: 12px;
        border-radius: 18px;
    }

    .student-check-card {
        padding: 14px;
        gap: 12px;
        background: rgba(255,255,255,.15);
        border-color: rgba(255,255,255,.28);
    }

    .student-check-card .input,
    .student-check-card .btn {
        min-height: 46px;
    }

    .home-visual {
        padding: 0 18px 22px;
    }

    .hero-frame {
        width: min(300px, 86vw);
        border-radius: 24px;
    }

    .hero-frame .hero-img {
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .home-copy .row h1 {
        font-size: 20px !important;
    }

    .home-copy .title {
        font-size: 29px;
    }

    .google-profile-card {
        padding: 10px;
    }

    .google-profile-card.logged-in-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logged-in-bar .logged-in-info {
        flex: 1 1 0;
        min-width: 120px;
    }

    .btn-logout {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .hero-frame {
        width: min(260px, 86vw);
    }
}

@media (max-width: 700px) {
    .mobile-hero-frame {
        display: block;
        width: min(310px, 100%);
        margin: 16px auto 4px;
        padding: 7px;
        border-radius: 24px;
        background: rgba(255,255,255,.86);
        border: 1px solid rgba(255,255,255,.55);
        box-shadow: 0 18px 40px rgba(6, 78, 59, .18);
    }

    .home-visual {
        display: none;
    }
}

/* BAGIAN 07C - Penyempurnaan panel pendamping halaman awal
   Membuat ilustrasi terasa terarah, hangat, dan seimbang dengan form siswa. */
@media (min-width: 1081px) {
    .home-grid {
        grid-template-columns: minmax(430px, 1.02fr) minmax(420px, .98fr);
        width: min(1120px, 100%);
    }

    .home-shell {
        background: #ffffff;
    }

    .home-copy {
        max-width: 600px;
        padding-right: clamp(34px, 4vw, 58px);
        background: linear-gradient(135deg, #059669, #087f68);
    }

    .home-visual {
        min-height: 620px;
        padding: 24px 28px;
        background: linear-gradient(145deg, #f8fffc, #ffffff);
        overflow: hidden;
        isolation: isolate;
    }

    .home-visual::before {
        inset: 14px 16px 14px 18px;
        border-radius: 32px;
        background:
            radial-gradient(circle at 82% 12%, rgba(251,191,36,.24), transparent 28%),
            radial-gradient(circle at 10% 72%, rgba(16,185,129,.15), transparent 34%),
            linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,253,245,.82));
        border-color: rgba(5,150,105,.20);
        box-shadow: inset 0 1px 0 #ffffff, 0 22px 58px rgba(15,23,42,.11);
        z-index: -1;
    }

    .home-visual-inner {
        width: min(470px, 100%);
        display: grid;
        justify-items: center;
        gap: 20px;
        transform: translateY(-4px);
    }

    .visual-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        justify-self: start;
        padding: 8px 12px;
        color: #047857;
        background: rgba(255,255,255,.84);
        border: 1px solid rgba(16,185,129,.20);
        border-radius: 999px;
        box-shadow: 0 8px 22px rgba(6,78,59,.08);
        font-size: 12px;
        font-weight: 1000;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .visual-eyebrow span {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #10b981;
        box-shadow: 0 0 0 6px rgba(16,185,129,.12);
    }

    .hero-stage {
        position: relative;
        width: 100%;
        padding: 0 6px 20px;
    }

    .hero-frame {
        width: min(405px, 100%);
        margin: 0 auto;
        padding: 9px;
        border-radius: 30px;
        border: 2px solid rgba(255,255,255,.92);
        box-shadow: 0 26px 58px rgba(6,78,59,.24), 0 0 0 1px rgba(5,150,105,.16);
    }

    .hero-frame .hero-img {
        border-radius: 22px;
    }

    .hero-privacy-card {
        position: absolute;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 230px;
        padding: 12px 14px;
        color: #064e3b;
        background: rgba(255,255,255,.94);
        border: 1px solid rgba(16,185,129,.22);
        border-radius: 16px;
        box-shadow: 0 16px 36px rgba(15,23,42,.18);
        backdrop-filter: blur(10px);
    }

    .privacy-check {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        flex: 0 0 34px;
        color: #047857;
        background: #d1fae5;
        border-radius: 11px;
    }

    .hero-privacy-card strong,
    .hero-privacy-card small {
        display: block;
    }

    .hero-privacy-card strong {
        font-size: 13px;
    }

    .hero-privacy-card small {
        margin-top: 2px;
        color: #64748b;
        font-size: 10px;
        font-weight: 750;
    }

    .visual-steps {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto 1fr auto 1fr;
        align-items: center;
        gap: 10px;
        padding: 17px 18px;
        background: rgba(255,255,255,.88);
        border: 1px solid rgba(5,150,105,.20);
        border-radius: 20px;
        box-shadow: 0 14px 34px rgba(6,78,59,.10);
    }

    .visual-step {
        display: grid;
        justify-items: center;
        gap: 7px;
    }

    .visual-step b {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        color: #047857;
        background: #d1fae5;
        border: 1px solid #a7f3d0;
        border-radius: 50%;
        font-size: 13px;
    }

    .visual-step span {
        color: #065f46;
        font-size: 12px;
        font-weight: 900;
    }

    .visual-steps > i {
        width: 28px;
        height: 2px;
        background: linear-gradient(90deg, #a7f3d0, #fbbf24);
        border-radius: 999px;
    }
}

/* BAGIAN 17 - Laporan Saya (Mobile Fix) */
.report-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.report-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 860px) {
    .report-hero-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .report-actions {
        width: 100%;
    }
    .report-actions .btn {
        flex: 1;
        justify-content: center;
    }
    .student-notif-pill, .google-report-pill {
        width: 100%;
        margin-bottom: 8px;
    }
}
