  /* Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 2000;
  display: flex;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer genérico */
.drawer {
  position: absolute;
  top: 0;
  width: 90%;
  max-width: 320px;
  height: 100vh;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}

/* Posición inicial según side */
.drawer[data-side="left"] {
  left: 0;
  transform: translateX(-100%);
}

.drawer[data-side="right"] {
  right: 0;
  transform: translateX(100%);
}

/* Animación cuando overlay activo */
.drawer-overlay.active .drawer {
  transform: translateX(0);
}

/* Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--color-border);
}

.drawer-header img {
  height: 28px;
}

.drawer-header span {
  flex: 1;
  font-weight: 600;
}

/* Botón cerrar */
.drawer-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* Menu */
.drawer-menu {
  flex: 1;                /* scroll interno */
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.drawer-menu a {
  padding: 16px 22px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: background 0.2s ease;
}

.drawer-menu a:hover {
  background: var(--color-bg);
}

.drawer-menu hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 10px 0;
}
