:root {
  --bg: #fff4ec;
  --card: #ffffff;
  --muted: #6b5e4b;
  --accent: #a9734b;
  --accent-light: #d4a077;
  --pink: #ff8b94;
  --pink-light: #ffc4c8;
}

/* HEADER */
.main-header {
  width: 100%;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: linear-gradient(90deg, #f892a1, #fdc2c9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  font-family: 'Poppins', sans-serif;

  position: fixed; /* ✅ changed from sticky */
  top: 0;
  left: 0;
  z-index: 100;

  /* optional: make header full width and push content down */
  height: 60px; /* adjust to your header height */
}


.logo-img { height: 40px; }

.logo-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 0;
  color: var(--bg);
  font-family: 'Courier New', Courier, monospace;
}

nav a.nav-link {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 16px;
}

nav a.nav-link:hover {
  color: var(--accent);
  transform: scale(1.05);
}

.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-light);
  object-fit: cover;
}

/* BURGER */
.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-btn .bar {
  height: 3px;
  width: 100%;
  background-color: var(--bg);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-btn.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-btn.active .bar:nth-child(2) { opacity: 0; }
.menu-btn.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* OVERLAY */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 150;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* lock scroll when open */
body.sidebar-open { overflow: hidden; }

/* SIDEBAR (OFFCANVAS BOTH DESKTOP + MOBILE) */
.sidebar {
  position: fixed;
  top: 0;
  right: -280px;           /* hidden by default */
  width: 280px;
  height: 100%;
  background: #fdfdfd !important;
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Poppins', sans-serif;
  z-index: 200;
  transition: right 0.3s ease;
}

.sidebar.active { right: 0; }

.sidebar .sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 12px;
  border-bottom: 1px solid #ff8b94;
}

.sidebar .sidebar-header h5 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pink);
  margin: 0;
}

.sidebar ul {
  list-style: none;
  padding: 10px 0;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
  border-bottom: 1px solid #ff8b94;
}

.sidebar ul li { margin: 6px 0; }

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.sidebar ul li a i {
  font-size: 18px;
  color: var(--accent);
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  background-color: rgba(212, 160, 119, 0.22);
  color: var(--accent);
}

.sidebar-section-title {
  padding: 10px 20px 4px;
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(107, 94, 75, 0.75);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-divider {
  height: 1px;
  background: rgba(107, 94, 75, 0.35);
  margin: 10px 18px;
  border-radius: 999px;
}

.sidebar-footer {
    margin-top: -5px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: none; /* tanggalin ang footer border */
}


.sidebar-footer button {
  border-radius: 12px;
  padding: 8px 0;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-footer button:hover {
  background-color: var(--accent);
  color: var(--bg);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.7rem;
  font-weight: bold;
  color: var(--accent);
  cursor: pointer;
  margin-left: auto;
  transition: color 0.2s ease;
}
.close-btn:hover { color: var(--pink); }
