/* =========================================================
   SPMB SIT Mutiara Islam — Stylesheet Utama
   Palet: emerald tua (identitas), pearl/gading (latar), emas pudar (aksen)
   Tipografi: Lora (judul) + Plus Jakarta Sans (isi & UI)
   ========================================================= */

:root {
  --pearl-950: #072620;
  --pearl-900: #0B5D4C;
  --pearl-800: #0E7A63;
  --pearl-100: #EAF3EF;
  --pearl-50:  #FAF8F3;
  --gold-600:  #B4872E;
  --gold-500:  #C89B3C;
  --gold-100:  #F3E9D2;
  --ink-900:   #1E2A27;
  --ink-600:   #4B5955;
  --ink-400:   #7C8985;
  --line-200:  #E4E0D6;
  --surface:   #FFFFFF;
  --danger-600:#A6432B;
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow-soft: 0 1px 2px rgba(7,38,32,.06), 0 8px 24px -12px rgba(7,38,32,.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink-900);
  background: var(--pearl-50);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Lora', Georgia, serif;
  color: var(--pearl-950);
  letter-spacing: -0.01em;
}

a { color: var(--pearl-900); text-decoration: none; }
a:hover { color: var(--pearl-800); }

.text-muted-ink { color: var(--ink-600) !important; }
.bg-pearl { background: var(--pearl-50) !important; }
.bg-pearl-100 { background: var(--pearl-100) !important; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--pearl-900);
  border: 1px solid var(--pearl-900);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: .6rem 1.3rem;
  transition: background .15s ease, transform .1s ease;
}
.btn-brand:hover { background: var(--pearl-800); color: #fff; }
.btn-brand:active { transform: translateY(1px); }

.btn-gold {
  background: var(--gold-500);
  border: 1px solid var(--gold-500);
  color: var(--pearl-950);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.btn-gold:hover { background: var(--gold-600); color: #fff; }

.btn-outline-brand {
  border: 1px solid var(--pearl-900);
  color: var(--pearl-900);
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: transparent;
}
.btn-outline-brand:hover { background: var(--pearl-900); color: #fff; }

/* ---------- Public site: navbar ---------- */
.navbar-public {
  background: var(--pearl-50);
  border-bottom: 1px solid var(--line-200);
  padding: .9rem 0;
}
.navbar-public .brand-mark {
  width: 42px; height: 42px;
  background: var(--pearl-900);
  color: var(--gold-100);
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-weight: 600; font-size: 1.15rem;
}
.navbar-public .brand-text { font-family: 'Lora', serif; font-weight: 600; font-size: 1.15rem; color: var(--pearl-950); line-height: 1.1; }
.navbar-public .brand-text small { display:block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500; font-size: .72rem; color: var(--ink-600); }

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--pearl-100) 0%, transparent 70%);
  z-index: 0;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--gold-600);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .9rem;
}
.hero h1 {
  font-size: 2.9rem;
  line-height: 1.15;
  max-width: 620px;
}
.hero p.lead-text {
  max-width: 520px;
  color: var(--ink-600);
  font-size: 1.08rem;
}
@media (max-width: 767px) {
  .hero h1 { font-size: 2.1rem; }
}

/* ---------- Unit cards (public) ---------- */
.unit-card {
  background: var(--surface);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  height: 100%;
}
.unit-card .unit-tag {
  display: inline-block;
  background: var(--pearl-100);
  color: var(--pearl-900);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}

/* ---------- Alur pendaftaran (numbered — genuinely sequential) ---------- */
.alur-list { counter-reset: alur; list-style: none; padding: 0; margin: 0; }
.alur-item {
  counter-increment: alur;
  display: flex; gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-200);
}
.alur-item:last-child { border-bottom: none; }
.alur-item::before {
  content: counter(alur);
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pearl-950);
  color: var(--gold-100);
  font-family: 'Lora', serif;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.alur-item h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.alur-item p { color: var(--ink-600); margin-bottom: 0; font-size: .95rem; }

/* ---------- Footer (public) ---------- */
.site-footer { background: var(--pearl-950); color: #C9D6D1; padding: 2.6rem 0; }
.site-footer h5 { color: #fff; font-family: 'Lora', serif; }
.site-footer a { color: #C9D6D1; }
.site-footer a:hover { color: #fff; }

/* ---------- Auth pages (login/register) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pearl-950);
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  max-width: 460px;
  width: 100%;
  padding: 2.4rem 2.2rem;
  box-shadow: var(--shadow-soft);
}
.auth-card .brand-mark { width: 48px; height: 48px; background: var(--pearl-900); color: var(--gold-100); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family:'Lora',serif; font-weight:600; margin-bottom: 1rem; }

/* ---------- App shell (dashboard) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 250px;
  flex: none;
  background: var(--pearl-950);
  color: #D8E4E0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
}
.app-sidebar .brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.3rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.app-sidebar .brand .brand-mark { width: 36px; height: 36px; background: var(--gold-500); color: var(--pearl-950); border-radius: 9px; display:flex; align-items:center; justify-content:center; font-family:'Lora',serif; font-weight:700; }
.app-sidebar .brand .brand-text { font-family: 'Lora', serif; font-size: 1rem; color: #fff; line-height: 1.15; }
.app-sidebar .brand .brand-text small { display: block; font-family: 'Plus Jakarta Sans'; font-size: .68rem; color: #9FB3AD; font-weight: 500; }
.app-sidebar .nav-section-label { text-transform: none; font-size: .74rem; color: #7F958E; padding: 1rem 1.2rem .35rem; }
.app-sidebar .nav-link {
  color: #C9D6D1;
  padding: .62rem 1.2rem;
  font-size: .92rem;
  font-weight: 500;
  display: flex; align-items: center; gap: .65rem;
  border-left: 3px solid transparent;
}
.app-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-sidebar .nav-link.active { background: rgba(200,155,60,.14); color: #fff; border-left-color: var(--gold-500); font-weight: 600; }
.app-sidebar .nav-icon { width: 18px; text-align: center; }

.app-main { flex: 1; min-width: 0; }
.app-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line-200);
  padding: .95rem 1.6rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.app-topbar h1 { font-size: 1.25rem; margin: 0; }
.app-content { padding: 1.6rem; max-width: 1220px; }

.user-chip { display: flex; align-items: center; gap: .6rem; }
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pearl-100); color: var(--pearl-900);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.user-chip .role-tag { font-size: .74rem; color: var(--ink-600); }

/* ---------- Cards & stat blocks ---------- */
.card-plain {
  background: var(--surface);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}
.stat-block {
  background: var(--surface);
  border: 1px solid var(--line-200);
  border-left: 4px solid var(--pearl-900);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
}
.stat-block.stat-gold { border-left-color: var(--gold-500); }
.stat-block.stat-danger { border-left-color: var(--danger-600); }
.stat-block .stat-num { font-family: 'Lora', serif; font-size: 1.9rem; color: var(--pearl-950); line-height:1; }
.stat-block .stat-label { color: var(--ink-600); font-size: .84rem; margin-top: .3rem; }

/* ---------- Badges ---------- */
.badge-status { font-weight: 600; font-size: .74rem; padding: .4em .7em; border-radius: 999px; }

/* ---------- Stepper / Timeline (proses pendaftaran anak) ---------- */
.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 1.8rem; overflow-x: auto; }
.stepper li {
  flex: 1; min-width: 130px;
  text-align: center;
  position: relative;
  padding-top: 2.6rem;
  font-size: .82rem;
  color: var(--ink-400);
}
.stepper li::before {
  content: "";
  position: absolute; top: 14px; left: -50%; width: 100%; height: 2px;
  background: var(--line-200);
}
.stepper li:first-child::before { display: none; }
.stepper li::after {
  content: "";
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-200);
}
.stepper li.done { color: var(--pearl-900); font-weight: 600; }
.stepper li.done::before { background: var(--pearl-900); }
.stepper li.done::after { background: var(--pearl-900); border-color: var(--pearl-900); }
.stepper li.active { color: var(--pearl-950); font-weight: 700; }
.stepper li.active::after { background: var(--gold-500); border-color: var(--gold-500); width:26px; height:26px; top:2px; }

/* ---------- Action card (kotak arahan aksi di dashboard ortu) ---------- */
.action-card {
  background: linear-gradient(135deg, var(--pearl-950), var(--pearl-900));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1.8rem;
}
.action-card h3 { color: #fff; }
.action-card p { color: #CFE0DA; }

/* ---------- Tables ---------- */
.table-plain thead th {
  font-size: .78rem;
  text-transform: none;
  color: var(--ink-600);
  border-bottom: 2px solid var(--line-200);
  font-weight: 700;
}
.table-plain td { vertical-align: middle; font-size: .92rem; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink-900); }
.form-control:focus, .form-select:focus {
  border-color: var(--pearl-800);
  box-shadow: 0 0 0 .2rem rgba(11,93,76,.12);
}
.form-section-title {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line-200);
  padding-bottom: .5rem;
  margin-bottom: 1.1rem;
}

/* ---------- Misc ---------- */
.divider-soft { border-top: 1px solid var(--line-200); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-600); }
.empty-state .icon { font-size: 2.4rem; color: var(--line-200); margin-bottom: .8rem; }

@media (max-width: 991px) {
  .app-sidebar { position: fixed; left: -260px; top:0; bottom:0; z-index: 1050; transition: left .2s ease; }
  .app-sidebar.open { left: 0; }
  .app-shell { display: block; }
}
