/* =============================================
   LAYOUT — Header, Sidebar, Page Main
   opcartas
============================================= */

/* ── DESKTOP: sidebar siempre visible ── */
@media(min-width:1025px){
  #sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: var(--sidebar-w);
    height: calc(100vh - var(--header-h));
    transform: none !important;
    z-index: 80;
  }
  .page-main { margin-left: var(--sidebar-w); }
  .hamburger { display: none !important; }
  .sidebar-header { display: none !important; }
  .sidebar-brand { display: flex !important; }
  #overlay { display: none !important; }
}

/* ── HEADER ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 90;
  background: rgba(11,11,12,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-inline: var(--sp-5);
}
.header-left { display: flex; align-items: center; gap: var(--sp-3); }
.header-right { display: flex; align-items: center; gap: var(--sp-2); }
.header-nav { display: none; align-items: center; gap: 2px; }
@media(min-width:1025px){ .header-nav { display: flex; } }
.header-login { display: none; }
@media(min-width:640px){ .header-login { display: inline-flex; } }

/* ── SIDEBAR ── */
#sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--c-dark);
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--t-slow) cubic-bezier(0.4,0,0.2,1);
  z-index: 100;
}
#sidebar.open { transform: translateX(0); }
.sidebar-brand {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  padding: 16px var(--sp-4) 14px;
  border-bottom: 1px solid var(--c-border);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}
.sidebar-nav { padding: var(--sp-3) 0; flex: 1; }
.sidebar-pro-badge {
  margin: var(--sp-3);
  padding: var(--sp-4);
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.03));
  border: 1px solid var(--c-border-gold);
  border-radius: var(--radius-md);
}

/* ── OVERLAY ── */
#overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}
#overlay.active { opacity: 1; pointer-events: all; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
}