
/* ============================================================
   sidebar.css - navigasi sidebar bersama untuk semua halaman dashboard.
   Tema NAVY PROFESIONAL (senada dengan aksen tabel bulanan #0a2540).
   ============================================================ */

/* Ruang di kiri body desktop supaya konten tidak tertutup sidebar tetap. */
body.has-sb {
  padding-left: 248px;
}

/* ---- container sidebar (navy) ---- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 248px;
  z-index: 120;
  background:
    radial-gradient(circle at 15% 8%, rgba(59,130,246,.22), transparent 28%),
    linear-gradient(180deg, #0b2545 0%, #06182f 100%);
  border-right: 1px solid #1d3a5f;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(2, 10, 25, 0.35);
  font-family: var(--font, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.sb-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.sb-logo {
  display: block;
  width: 58px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 5px 7px;
}

.sb-brand-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.sb-brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.60);
  margin-top: 2px;
  font-weight: 500;
}

.sb-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sb-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sb-link.active {
  background: linear-gradient(90deg, rgba(59,130,246,.30), rgba(59,130,246,.14));
  color: #ffffff;
  font-weight: 700;
}

.sb-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  background: #60a5fa;
  border-radius: 0 4px 4px 0;
}

.sb-ico {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: currentColor;
}

.sb-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sb-foot {
  margin-top: auto;
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
  background: rgba(2, 8, 20, 0.45);
}

.sb-foot b {
  color: #ffffff;
  font-weight: 600;
}

/* tombol tutup (hanya tampil mobile) */
.sb-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid #2b4a6b;
  background: #0c2a4f;
  border-radius: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  transition: all 0.15s ease;
}

.sb-close:hover {
  color: #fff;
  background: #16395e;
}

/* hamburger hanya tampil mobile */
.sb-hamburger {
  display: none;
}
.sb-scrim {
  display: none;
}

/* ---- RESPONSIF: mobile / layar sempit ---- */
@media (max-width: 900px) {
  body.has-sb {
    padding-left: 0;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(2, 8, 20, 0.5);
  }
  .sb-close {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.sb-open .sidebar {
    transform: translateX(0);
  }
  .sb-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 25, 0.55);
    backdrop-filter: blur(2px);
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
  }
  body.sb-open .sb-scrim {
    opacity: 1;
    visibility: visible;
  }
  .sb-hamburger {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 130;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #2b4a6b;
    background: #0c2a4f;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(2, 8, 20, 0.35);
    cursor: pointer;
    color: #fff;
    padding: 0;
    transition: all 0.15s ease;
  }
  .sb-hamburger:hover {
    background: #16395e;
  }
  .has-sb .report-head,
  .has-sb .kw-head {
    padding-left: 60px;
  }
}

/* ---- PRINT: sembunyikan sidebar agar tidak tumpang tindih cetakan ---- */
@media print {
  .sidebar,
  .sb-hamburger,
  .sb-scrim,
  .sb-close {
    display: none !important;
  }
  body.has-sb {
    padding-left: 0 !important;
  }
}
