:root {
  --bg: #090a0f;
  --surface: #12141c;
  --surface-card: #171a24;
  --border: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.35);
  --gold: #d4af37;
  --gold-glow: #f5e7b2;
  --text: #f3f4f6;
  --muted: #8b92a5;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* TOP NAV */
.top-nav {
  height: 64px;
  background: rgba(14, 16, 23, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-menu {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  cursor: pointer;
}

.btn-menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

/* BRAND & LOGO LUXURY STYLING */
/* BRAND EMBLEM LUXURY (TRANSPARENT & SEAMLESS) */
.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  height: 42px; /* Ketinggian optimum untuk mobile header */
  width: auto;
  object-fit: contain;
  background: transparent;
  border: none;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.25)); /* Glow halus pada logam gold */
  transition: transform 0.2s ease;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 30%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.58rem;
  font-weight: 700;
  color: #34d399; /* Sentuhan neon emerald yang padan dengan daun logo kau */
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 1px;
}

.brand-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #000;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  letter-spacing: 0.5px;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  background: linear-gradient(180deg, #ffffff 40%, #c4c4c4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* NAV RIGHT */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 10px 4px 5px;
  border-radius: 30px;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37 0%, #8a6a14 100%);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.btn-logout-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-icon:active {
  transform: scale(0.92);
}

/* LAYOUT BODY & VIEWPORT */
.shell-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 64px);
  position: relative;
}

.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 16px 14px 8px;
}

.section-label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 1.5px;
  font-weight: 700;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px;
}

.menu-item {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.menu-item:hover {
  background: var(--surface-card);
  color: var(--text);
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.14) 0%, rgba(212, 175, 55, 0.02) 100%);
  color: var(--gold-glow);
  border-left: 3px solid var(--gold);
}

/* VIEWPORT CONTAINER TANPA DEAD SPACE */
.viewport {
  flex: 1;
  padding: 18px 16px 32px;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.04), transparent 50%);
  min-width: 0;
  height: auto;
}

/* RESPONSIVE DRAWER (PHONE) */
@media (max-width: 850px) {
  .sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 100;
    transform: translateX(-100%);
    box-shadow: 12px 0 35px rgba(0,0,0,0.8);
    display: flex;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .backdrop {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 90;
  }

  .backdrop.active {
    display: block;
  }
}
