:root {
  --vtm-bg: #0f1b2d; /* deep navy background */
  --vtm-panel: #111b2f; /* panel */
  --vtm-accent: #125123; /* brand green */
  --vtm-text: #f4f6fb; /* text */
  --vtm-muted: #a9b3c6; /* muted */
  --vtm-border: rgba(255, 255, 255, 0.08);
  --vtm-width: 88vw; /* panel width */
  --vtm-z: 1200; /* above header */
  --vtm-radius: 18px;
  --vtm-speed: 0.28s;
}

/* Overlay */
#vtm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: saturate(120%) blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--vtm-speed) ease;
  z-index: var(--vtm-z);
}
#vtm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
#vtm {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: var(--vtm-width);
  max-width: 420px;
  background: linear-gradient(180deg, var(--vtm-panel), #0b1426);
  color: var(--vtm-text);
  z-index: calc(var(--vtm-z) + 1);
  transform: translateX(-100%);
  transition: transform var(--vtm-speed) ease;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  border-top-right-radius: var(--vtm-radius);
  border-bottom-right-radius: var(--vtm-radius);
}
#vtm.active {
  transform: none;
}

.vtm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--vtm-border);
}
.vtm-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vtm-text);
  text-decoration: none;
  font-weight: 600;
}
.vtm-logo .bi {
  font-size: 18px;
  color: var(--vtm-accent);
}
.vtm-close {
  appearance: none;
  background: #0c1528;
  border: 1px solid var(--vtm-border);
  color: var(--vtm-text);
  border-radius: 12px;
  padding: 10px;
  line-height: 0;
}

.vtm-body {
  height: calc(100dvh - 140px);
  overflow: auto;
  scrollbar-width: thin;
}
.vtm-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--vtm-border);
  display: flex;
  gap: 10px;
}
.vtm-cta {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--vtm-accent);
  color: white;
  font-weight: 600;
}
.vtm-cta.ghost {
  background: transparent;
  border: 1px solid var(--vtm-border);
  color: var(--vtm-text);
}

/* List */
.vtm-list,
.vtm-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vtm-list > li > a {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--vtm-text);
  text-decoration: none;
  border-bottom: 1px solid var(--vtm-border);
}
.vtm-list li {
  position: relative;
}

/* Toggle button for items that have children */
.vtm-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--vtm-border);
  background: #0d172a;
  color: var(--vtm-text);
}
.vtm-toggle .bi {
  transition: transform 0.2s;
}
.vtm-item.open > .vtm-toggle .bi {
  transform: rotate(180deg);
}

/* Submenus */
.vtm-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.vtm-item.open > .vtm-sub {
  max-height: 1200px;
}
.vtm-sub a {
  display: block;
  padding: 12px 18px 12px 28px;
  border-bottom: 1px dashed var(--vtm-border);
  color: var(--vtm-muted);
  text-decoration: none;
}
.vtm-sub .vtm-item > a {
  padding-left: 36px;
}

/* Badges for sections (optional) */
.vtm-badge {
  margin-left: auto;
  background: rgba(18, 81, 35, 0.2);
  border: 1px solid var(--vtm-accent);
  color: #c9ffd7;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Hide desktop-only extras inside mobile menu */
.vtm .menu-extra {
  display: none !important;
}

/* Small screens ensure full width */
@media (max-width: 420px) {
  :root {
    --vtm-width: 96vw;
  }
}
/* ===== Phân cấp ===== */
.vtm-sub {
  border-left: 1px dashed var(--vtm-border);
  margin-left: 14px;
}

.vtm-sub .vtm-item > a {
  padding-left: 18px; /* cấp 2 */
  font-size: 15px;
}

.vtm-sub .vtm-sub .vtm-item > a {
  padding-left: 32px; /* cấp 3 */
  font-size: 14px;
  color: var(--vtm-muted);
}
.vtm-toggle .bi-dash-lg {
  font-size: 18px;
}
#vtm .vtm-item {
  position: relative;
} /* base */
#vtm .vtm-item.open {
  position: relative !important;
} /* thắng rule cũ .open */
