/* ============================================================
   SIKUMDES — Gaya kustom di atas Bootstrap 5
   Palet warna wajib (Bagian B.1). Tanpa framework CSS lain.
   ============================================================ */

:root {
  --sk-navy:   #0B2D6B; /* Primer */
  --sk-navy-2: #123a86;
  --sk-hijau:  #1E7A3C; /* Sekunder */
  --sk-oranye: #E8720C; /* Aksen */
  --sk-ungu:   #6B2FA0; /* Aksen */
  --sk-merah:  #C0392B; /* Galat/hapus */
  --sk-abu:    #F4F6FA; /* Latar */
  --sk-teks:   #22272e;
  --sk-sidebar-w: 260px;
}

body {
  background-color: var(--sk-abu);
  color: var(--sk-teks);
  font-family: "Segoe UI", "Inter", "Poppins", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6, .fw-judul { color: var(--sk-navy); font-weight: 700; }

/* ---------- Warna utilitas merek ---------- */
.text-navy   { color: var(--sk-navy) !important; }
.text-hijau  { color: var(--sk-hijau) !important; }
.text-oranye { color: var(--sk-oranye) !important; }
.text-ungu   { color: var(--sk-ungu) !important; }
.text-merah  { color: var(--sk-merah) !important; }
.bg-navy   { background-color: var(--sk-navy) !important; color: #fff; }
.bg-hijau  { background-color: var(--sk-hijau) !important; color: #fff; }
.bg-oranye { background-color: var(--sk-oranye) !important; color: #fff; }
.bg-ungu   { background-color: var(--sk-ungu) !important; color: #fff; }
.bg-merah  { background-color: var(--sk-merah) !important; color: #fff; }

/* ---------- Tombol merek ---------- */
.btn-navy   { background-color: var(--sk-navy); border-color: var(--sk-navy); color: #fff; }
.btn-navy:hover, .btn-navy:focus { background-color: var(--sk-navy-2); border-color: var(--sk-navy-2); color: #fff; }
.btn-hijau  { background-color: var(--sk-hijau); border-color: var(--sk-hijau); color: #fff; }
.btn-hijau:hover { background-color: #17632f; color: #fff; }
.btn-oranye { background-color: var(--sk-oranye); border-color: var(--sk-oranye); color: #fff; }
.btn-oranye:hover { background-color: #cf6209; color: #fff; }
.btn-ungu { background-color: var(--sk-ungu); border-color: var(--sk-ungu); color: #fff; }
.btn-ungu:hover { background-color: #5a2789; color: #fff; }
.btn-merah { background-color: var(--sk-merah); border-color: var(--sk-merah); color: #fff; }
.btn-merah:hover { background-color: #a93226; color: #fff; }
.btn-outline-navy { border-color: var(--sk-navy); color: var(--sk-navy); }
.btn-outline-navy:hover { background-color: var(--sk-navy); color: #fff; }
.btn-outline-oranye { border-color: var(--sk-oranye); color: var(--sk-oranye); }
.btn-outline-oranye:hover { background-color: var(--sk-oranye); color: #fff; }

/* ---------- Kartu ---------- */
.card {
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(11, 45, 107, 0.06);
}
.card-header { background-color: #fff; border-bottom: 1px solid #eef1f6; font-weight: 600; color: var(--sk-navy); }

/* ---------- Kartu angka dasbor ---------- */
.kartu-angka { border-radius: 12px; border: none; color: #fff; }
.kartu-angka .angka { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.kartu-angka .label { opacity: .92; font-size: .85rem; }
.kartu-angka .ikon { font-size: 2.2rem; opacity: .35; }

/* ============================================================
   TATA LETAK ADMIN (sidebar navy + konten)
   ============================================================ */
.sk-wrapper { display: flex; min-height: 100vh; }

.sk-sidebar {
  width: var(--sk-sidebar-w);
  background: linear-gradient(180deg, var(--sk-navy) 0%, #081f4a 100%);
  color: #cdd7ee;
  position: fixed; top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}
.sk-sidebar .brand {
  padding: 18px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sk-sidebar .brand .logo {
  width: 38px; height: 38px; border-radius: 9px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--sk-navy); font-weight: 800;
}
.sk-sidebar .brand .nama { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .5px; }
.sk-sidebar .brand .sub { color: #9fb0d6; font-size: .68rem; }

.sk-menu { list-style: none; padding: 12px 10px; margin: 0; overflow-y: auto; flex: 1; }
.sk-menu .judul-grup { color: #7f93bf; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; padding: 14px 12px 6px; }
.sk-menu a {
  display: flex; align-items: center; gap: 11px;
  color: #cdd7ee; text-decoration: none;
  padding: 9px 12px; border-radius: 8px; font-size: .92rem; margin-bottom: 2px;
}
.sk-menu a i { font-size: 1.05rem; width: 20px; text-align: center; }
.sk-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sk-menu a.active { background: var(--sk-oranye); color: #fff; font-weight: 600; }
.sk-sidebar .kaki { padding: 12px 18px; font-size: .7rem; color: #7f93bf; border-top: 1px solid rgba(255,255,255,.08); }

.sk-konten { margin-left: var(--sk-sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

.sk-topbar {
  height: 62px; background: #fff; border-bottom: 1px solid #e6e9f0;
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  position: sticky; top: 0; z-index: 1030;
}
.sk-topbar .judul { font-weight: 700; color: var(--sk-navy); font-size: 1.05rem; }
.sk-topbar .btn-menu { border: none; background: transparent; color: var(--sk-navy); font-size: 1.4rem; }

.sk-isi { padding: 22px; flex: 1; }
.sk-footer { padding: 14px 22px; color: #6b7280; font-size: .82rem; border-top: 1px solid #e6e9f0; background: #fff; }

/* Avatar teks */
.sk-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--sk-navy);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}

/* ---------- Nomor lingkaran tahapan alur (1–7) ---------- */
.tahap-lingkaran {
  width: 30px; height: 30px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.tahap-1 { background: var(--sk-navy); }
.tahap-2 { background: var(--sk-hijau); }
.tahap-3 { background: var(--sk-ungu); }
.tahap-4 { background: var(--sk-oranye); }
.tahap-5 { background: #2b8cbe; }
.tahap-6 { background: #b8860b; }
.tahap-7 { background: var(--sk-merah); }

/* ---------- Timeline riwayat ---------- */
.sk-timeline { position: relative; padding-left: 6px; }
.sk-tl-item { position: relative; padding-left: 42px; padding-bottom: 18px; }
.sk-tl-item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 30px; bottom: 0; width: 2px; background: #e6e9f0; }
.sk-tl-dot { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85rem; }

/* ---------- Tabel selang-seling ---------- */
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(244,246,250,.7); }

/* ============================================================
   PORTAL PUBLIK
   ============================================================ */
.sk-portal-nav { background: var(--sk-navy); }
.sk-portal-nav .navbar-brand, .sk-portal-nav .nav-link { color: #fff !important; }
.sk-portal-nav .nav-link:hover { color: var(--sk-oranye) !important; }

.sk-hero {
  background: linear-gradient(135deg, #C0392B 0%, #A6281C 55%, #7B241C 100%);
  color: #fff; padding: 48px 0 64px;
}
.sk-hero .cari-box { max-width: 680px; }
/* Logo pada hero: langsung di atas latar merah. Glow putih tipis + bayangan
   membuat bagian navy logo (PNG transparan) tetap terbaca tanpa panel putih. */
.sk-hero-logo-wrap {
  display: inline-block;
  background: radial-gradient(closest-side, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 78%);
}
.sk-hero-logo {
  max-width: 320px; width: 100%; height: auto; display: block;
  filter: drop-shadow(0 0 16px rgba(255,255,255,.55)) drop-shadow(0 6px 16px rgba(0,0,0,.25));
}
@media (max-width: 991.98px) {
  .sk-hero-logo { max-width: 250px; margin: 0 auto; }
}
.sk-portal-footer { background: var(--sk-navy); color: #cdd7ee; padding: 30px 0; }

/* Bilah aksesibilitas mengambang */
.sk-aksesibilitas { position: fixed; right: 14px; bottom: 14px; display: flex; gap: 6px; z-index: 1050; }
.sk-aksesibilitas button {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--sk-navy); color: #fff; font-size: .8rem; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.sk-aksesibilitas button:hover { background: var(--sk-oranye); }

/* Mode kontras tinggi */
.sk-kontras { filter: contrast(1.25); }
.sk-kontras body { background: #fff !important; }
.sk-kontras .card { border-color: #000 !important; }
.sk-kontras .text-muted { color: #333 !important; }
.sk-portal-footer a { color: #cdd7ee; text-decoration: none; }
.sk-portal-footer a:hover { color: var(--sk-oranye); }

/* ============================================================
   RESPONSIF — sidebar tersembunyi di layar kecil
   ============================================================ */
.sk-overlay { display: none; }
@media (max-width: 991.98px) {
  .sk-sidebar { transform: translateX(-100%); }
  .sk-sidebar.terbuka { transform: translateX(0); }
  .sk-konten { margin-left: 0; }
  .sk-overlay.tampil {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035;
  }
}
