:root {
  --navy-900: #0b2a5e;
  --navy-700: #123f8c;
  --blue-600: #2a6be0;
  --violet: #7c5cf5;
  --bg: #eef2fb;
  --ink: #12203a;
  --muted: #6b7690;
  --sidebar-w: 236px;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #1c58c8 0%, #123c86 55%, #0d2f6e 100%);
  color: #fff; overflow-y: auto; z-index: 1040; transition: transform .2s;
  padding-bottom: 24px;
}
.sidebar .brand {
  height: 71px; display: flex; align-items: center; gap: 10px;
  padding: 0 20px; font-weight: 800; font-size: 1.15rem; letter-spacing: .2px;
}
.sidebar .brand i { font-size: 1.6rem; }
.sidebar .nav-sec {
  text-transform: uppercase; font-size: .68rem; letter-spacing: .08em;
  opacity: .6; padding: 16px 22px 6px; font-weight: 700;
}
.sidebar a.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; margin: 2px 12px; border-radius: 12px;
  color: rgba(255,255,255,.88); text-decoration: none; font-weight: 700; font-size: .92rem;
}
.sidebar a.nav-item i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar a.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar a.nav-item.active { background: var(--violet); color: #fff; box-shadow: 0 6px 16px rgba(124,92,245,.35); }
.sidebar .badge-soft {
  margin-left: auto; background: rgba(255,255,255,.18); color: #fff;
  border-radius: 999px; padding: 2px 9px; font-size: .7rem; font-weight: 800;
}
.sidebar .badge-warn { background: #f5a524; color: #3a2600; }

/* ---------- Topbar & main ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }
.topbar {
  height: 71px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; color: #fff;
  background: linear-gradient(90deg, var(--navy-900), #1650b8);
  position: sticky; top: 0; z-index: 1030;
}
.topbar h1 { font-size: 1.45rem; font-weight: 800; margin: 0; }
.topbar .who { text-align: right; line-height: 1.2; }
.topbar .who small { opacity: .8; }
.topbar .logout {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff; text-decoration: none; margin-left: 14px;
}
.topbar .logout:hover { background: rgba(255,255,255,.28); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; margin-right: 10px; }
.content { padding: 28px; }

/* ---------- Kartu statistik ---------- */
.stat-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  padding: 22px 24px; color: #fff; min-height: 160px;
  box-shadow: 0 10px 24px rgba(18,32,58,.12);
}
.stat-card::after {
  content: ''; position: absolute; top: -34px; right: -34px; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(255,255,255,.14);
}
.stat-card .ico {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.2);
  display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 14px;
}
.stat-card .lbl { text-transform: uppercase; font-size: .72rem; letter-spacing: .07em; font-weight: 800; }
.stat-card .num { font-size: 2.1rem; font-weight: 800; line-height: 1.15; }
.stat-card .sub { font-size: .8rem; opacity: .92; }
.g-blue   { background: linear-gradient(135deg, #2a6be0, #0f2f6b); }
.g-violet { background: linear-gradient(135deg, #8b5cf6, #4b35b8); }
.g-pink   { background: linear-gradient(135deg, #ec5aa0, #b02a6c); }
.g-teal   { background: linear-gradient(135deg, #1cc1a0, #0c8f78); }
.g-orange { background: linear-gradient(135deg, #f5a524, #c9720a); }
.g-red    { background: linear-gradient(135deg, #ef5b5b, #b32b2b); }

/* ---------- Panel ---------- */
.panel {
  background: #fff; border-radius: var(--radius); padding: 22px 24px;
  box-shadow: 0 6px 18px rgba(18,32,58,.06);
}
.panel h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 16px; }
.panel h2 i { color: var(--blue-600); margin-right: 6px; }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); border-bottom-width: 1px; white-space: nowrap;
}
.form-label { font-weight: 700; font-size: .85rem; }
.btn-primary { background: var(--blue-600); border-color: var(--blue-600); font-weight: 700; }
.btn-primary:hover { background: #1f57bd; border-color: #1f57bd; }
.btn { border-radius: 10px; }
.form-control, .form-select { border-radius: 10px; }

/* ---------- Checklist & progress ---------- */
.step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #dfe5f2; }
.step:last-child { border-bottom: 0; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .85rem; flex: none; background: #e4e9f5; color: var(--muted);
}
.step.ok .dot { background: #d6f3e4; color: #0a7a43; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: linear-gradient(135deg, #0b2a5e, #1c58c8);
}
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 34px 30px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }

/* ---------- Responsif ---------- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-block; }
  .topbar { padding: 0 16px; }
  .topbar .who { display: none; }
  .content { padding: 16px; }
}
@media print { .sidebar, .topbar, .no-print { display: none !important; } .main { margin: 0; } }
