/* ============================================================
   LP3H Doa Bangsa — Tema dashboard (Bootstrap 5 overlay)
   Palet: hijau emerald sesuai branding LP3H Doa Bangsa
   ============================================================ */
:root {
  --lp3h-900: #064e3b;
  --lp3h-800: #065f46;
  --lp3h-700: #047857;
  --lp3h-600: #059669;
  --lp3h-500: #10b981;
  --lp3h-100: #d1fae5;
  --lp3h-50:  #ecfdf5;
  --lp3h-bg:  #f4f9f6;
  --lp3h-line: #e2e8f0;
}

body {
  background: var(--lp3h-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1e293b;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 260px;
  background: rgba(255, 255, 255, .96);
  border-right: 1px solid var(--lp3h-line);
  padding: 14px 12px;
  z-index: 1035;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--lp3h-900);
  padding: 6px 8px 14px; border-bottom: 1px solid var(--lp3h-line);
  margin-bottom: 10px;
}
.brand-logo {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--lp3h-600), var(--lp3h-800));
  color: #fff; border-radius: 12px; font-size: 1.25rem;
}
.brand-logo-lg { width: 64px; height: 64px; font-size: 2rem; border-radius: 18px; }
.side-caption {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: #94a3b8; padding: 8px 10px 4px;
}
.side-nav { overflow-y: auto; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px;
  border-radius: 10px; color: #475569; text-decoration: none;
  font-size: .9rem; transition: background .15s, color .15s;
}
.side-link i { font-size: 1.05rem; color: #64748b; transition: color .15s; }
.side-link:hover { background: var(--lp3h-50); color: var(--lp3h-800); }
.side-link:hover i { color: var(--lp3h-600); }
.side-link.active {
  background: linear-gradient(135deg, var(--lp3h-600), var(--lp3h-700));
  color: #fff; font-weight: 600;
  box-shadow: 0 6px 14px -6px rgba(5, 150, 105, .55);
}
.side-link.active i { color: #fff; }
.side-foot {
  border-top: 1px solid var(--lp3h-line);
  padding: 10px 8px 2px; margin-top: 8px;
}
.side-offcanvas { width: 275px !important; }

/* ---------- Layout ---------- */
.main-wrap { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .main-wrap { margin-left: 260px; }
}
.topbar { min-height: 58px; }
.content { flex: 1 0 auto; }
.foot { flex-shrink: 0; }

/* ---------- Kartu & statistik ---------- */
.lp3h-card { border-radius: 14px; }
.stat-card { transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(6, 78, 59, .25) !important; }
.stat-ikon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 10px;
}
.ik-hijau { background: var(--lp3h-100); color: var(--lp3h-700); }
.ik-biru  { background: #dbeafe; color: #1d4ed8; }
.ik-emas  { background: #fef3c7; color: #b45309; }
.ik-merah { background: #fee2e2; color: #b91c1c; }
.ik-ungu  { background: #ede9fe; color: #6d28d9; }
.stat-angka { font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .82rem; color: #475569; font-weight: 600; }
.stat-sub   { font-size: .72rem; color: #94a3b8; }

.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lp3h-100); color: var(--lp3h-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
}
.avatar-xl {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--lp3h-600), var(--lp3h-800));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800;
}

/* ---------- Badge & label ---------- */
.kbli-kode {
  font-family: 'Consolas', 'Courier New', monospace;
  background: var(--lp3h-50); color: var(--lp3h-800);
  border: 1px solid var(--lp3h-100);
  font-weight: 700; letter-spacing: .04em;
}
.badge { border-radius: 20px; padding: .38em .7em; font-weight: 600; }

/* Warna badge 11 tahapan sertifikasi */
.tahap-draft      { background: #e2e8f0; color: #334155; }
.tahap-submit     { background: #dbeafe; color: #1d4ed8; }
.tahap-selesai    { background: #d1fae5; color: #065f46; }
.tahap-kembali_pu { background: #fef3c7; color: #92400e; }
.tahap-kembali_kf { background: #ffedd5; color: #9a3412; }
.tahap-batal      { background: #1e293b; color: #f8fafc; }
.tahap-tolak      { background: #fee2e2; color: #b91c1c; }
.tahap-kirim_kf   { background: #c7d2fe; color: #3730a3; }
.tahap-sidang     { background: #ede9fe; color: #6d28d9; }
.tahap-penerbitan { background: #ccfbf1; color: #0f766e; }
.tahap-terbit     { background: #059669; color: #ffffff; }

/* ---------- Leaderboard ---------- */
.rank-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-weight: 800; font-size: .85rem; color: #fff;
}
.rank-medal.gold   { background: #f59e0b; box-shadow: 0 3px 8px -2px rgba(245, 158, 11, .6); }
.rank-medal.silver { background: #94a3b8; box-shadow: 0 3px 8px -2px rgba(148, 163, 184, .6); }
.rank-medal.bronze { background: #b45309; box-shadow: 0 3px 8px -2px rgba(180, 83, 9, .6); }

/* ---------- Login (split-screen: kiri gambar, kanan form) ---------- */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #052e22, var(--lp3h-900));
}
.demo-box {
  background: var(--lp3h-50);
  border: 1px dashed var(--lp3h-500);
  border-radius: 10px; padding: 10px 12px; color: var(--lp3h-900);
}
.login-split { min-height: 100vh; display: flex; }

/* Animasi kemunculan (staggered lewat --d = urutan) */
@keyframes lp3hFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes lp3hFadeLeft {
  from { opacity: 0; transform: translateX(-34px); }
  to   { opacity: 1; transform: none; }
}
@keyframes lp3hZoom {
  from { opacity: 0; transform: scale(1.07); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes lp3hFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes lp3hPulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: .8; }
}
.anim {
  opacity: 0;
  animation-duration: .7s;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(.22, .8, .32, 1);
  animation-delay: calc(var(--d, 0) * .14s);
}
.anim-fadeup   { animation-name: lp3hFadeUp; }
.anim-fadeleft { animation-name: lp3hFadeLeft; }
.anim-zoom     { animation-name: lp3hZoom; animation-duration: 1.3s; }

/* Panel kiri: gambar dari Pengaturan Superadmin */
.login-hero {
  flex: 1 1 52%;
  position: relative;
  overflow: hidden;
  align-items: flex-end;
  background: linear-gradient(150deg, #052e22, var(--lp3h-900) 55%, var(--lp3h-800));
  color: #fff;
}
.login-hero .hero-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(200deg,
    rgba(4, 47, 35, .22) 0%,
    rgba(4, 47, 35, .74) 62%,
    rgba(3, 36, 27, .92) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: clamp(28px, 5vw, 64px);
  max-width: 660px;
}
.hero-logo {
  width: 72px; height: 72px; font-size: 2.2rem; border-radius: 20px;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55);
  animation: lp3hFloat 5.5s ease-in-out infinite;
}
.hero-title {
  font-weight: 800; letter-spacing: -.01em; line-height: 1.12;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  margin-bottom: .45rem;
}
.hero-tagline {
  color: #a7f3d0; font-weight: 600;
  font-size: clamp(.95rem, 1.4vw, 1.12rem);
  margin-bottom: 14px;
}
.hero-desc {
  color: rgba(255, 255, 255, .84);
  font-size: .98rem; line-height: 1.68;
  max-width: 540px;
  margin-bottom: 26px;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .85rem; font-weight: 600;
}
.hero-chip i { color: #6ee7b7; }
.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); z-index: 1;
  animation: lp3hPulse 7s ease-in-out infinite;
}
.blob-1 { width: 340px; height: 340px; background: rgba(16, 185, 129, .55); top: -80px; right: -60px; }
.blob-2 { width: 260px; height: 260px; background: rgba(4, 120, 87, .65); bottom: 80px; left: -100px; animation-delay: 2.5s; }

/* Panel kanan: akses login */
.login-panel {
  flex: 1 1 48%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(16, 185, 129, .12), transparent 60%),
    #ffffff;
  padding: 40px 24px;
}
.login-box { width: 100%; max-width: 430px; }
.login-foot { text-align: center; color: #94a3b8; font-size: .8rem; margin-top: 34px; }
.btn-login { transition: transform .15s, box-shadow .15s; }
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(5, 150, 105, .65);
}
.login-preview {
  height: 120px; border-radius: 10px;
  background-size: cover; background-position: center;
  border: 1px solid var(--lp3h-line);
}
.login-preview-default {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--lp3h-50), var(--lp3h-100));
  color: var(--lp3h-600); font-size: 2rem;
}

/* Responsif: layar kecil hanya panel form */
@media (max-width: 991.98px) {
  .login-body {
    background:
      radial-gradient(700px 380px at 110% -10%, rgba(16, 185, 129, .35), transparent 60%),
      linear-gradient(135deg, #052e22, var(--lp3h-900));
  }
  .login-panel { min-height: 100vh; }
}

/* Hormati preferensi pengguna yang mematikan animasi */
@media (prefers-reduced-motion: reduce) {
  .anim, .hero-logo, .hero-blob, .btn-login {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Atribut mini ---------- */
.atribut-mini { border-radius: 14px; }
.atribut-preview { background: #fbfefd; }

/* ---------- Empty state ---------- */
.empty-state i { opacity: .5; }

/* ---------- Sticky first column pada papan sertifikasi ---------- */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* Scrollbar halus */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lp3h-500); }
