/* ════════════════════════════════════════
   NEXCORE — Shared Dashboard Styles
   Compartido por: dashboard general + sub-dashboards
   ════════════════════════════════════════ */

/* ══ THEMES ══ */
[data-theme="dark"]{--bg:#0f1117;--s1:#161821;--s2:#1d2030;--s3:#242840;--border:rgba(255,255,255,0.1);--border2:rgba(255,255,255,0.18);--white:#f0ede8;--muted:#8a8e9a;--text:#c4c2cc;--input-bg:#1d2030;}
[data-theme="warm"]{--bg:#faf7f2;--s1:#f3ede4;--s2:#ede5d8;--s3:#e6dcc9;--border:rgba(0,0,0,0.1);--border2:rgba(0,0,0,0.18);--white:#2c2a26;--muted:#8a7f72;--text:#5a5248;--input-bg:#ede5d8;}
[data-theme="light"]{--bg:#ffffff;--s1:#f7f7f7;--s2:#eeeeee;--s3:#e5e5e5;--border:rgba(0,0,0,0.1);--border2:rgba(0,0,0,0.18);--white:#1a1a1a;--muted:#888888;--text:#444444;--input-bg:#eeeeee;}
:root{--gold:#e8b84b;--gold2:#ffd166;--gold-dim:rgba(232,184,75,0.12);--red:#e05252;--amber:#e09a3a;--green:#34d399;}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{background:var(--bg);color:var(--white);font-family:'Plus Jakarta Sans',sans-serif;min-height:100vh;}
*, *::before, *::after { transition: none; }

.plan-badge{font-family:'JetBrains Mono',monospace;background:var(--gold);color:#0f1117;padding:0.3rem 0.7rem;border-radius:6px;font-size:0.6rem;font-weight:700;letter-spacing:0.08em;}

/* SELECTOR USUARIO */
.user-selector{background:var(--s1);border:1.5px solid var(--border);border-radius:8px;padding:0.6rem 1rem;font-family:'Plus Jakarta Sans',sans-serif;font-size:0.85rem;font-weight:600;color:var(--white);cursor:pointer;min-width:180px;}

/* MAIN */
.main-wrap{padding:3rem 5%;max-width:1400px;margin:0 auto;min-height:calc(100vh - 65px);}

/* ════════════════════════════════════════
   LAYOUT 2 COLUMNAS — DASHBOARD
   ════════════════════════════════════════ */

.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 80px);
  position: relative;
}

.dashboard-layout .main-wrap {
  padding: 2rem 2.5rem 4rem;
  max-width: 100%;
  margin: 0;
}

/* PANEL LATERAL */
.sidebar {
  background: var(--s1);
  border-right: 1px solid var(--border);
  padding: 2rem 1.25rem;
  overflow-y: auto;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
}

.sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.sidebar-close:hover { color: var(--white); }

/* CATEGORÍA — botón grande de navegación */
.sidebar-categoria {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 0.35rem;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-categoria:hover {
  background: var(--s2);
  color: var(--white);
}

.sidebar-categoria.active {
  background: var(--gold-dim);
  color: var(--gold);
}

.sidebar-categoria-icono {
  font-size: 1.1rem;
}

.sidebar-categoria-nombre {
  flex: 1;
}

.sidebar-categoria-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--s2);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.sidebar-categoria.active .sidebar-categoria-count {
  background: rgba(232,184,75,0.15);
  color: var(--gold);
}

.sidebar-general {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* HAMBURGUESA + OVERLAY (móvil) */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 0.85rem 1.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 100;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* RESPONSIVO — TABLET */
@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 240px 1fr;
  }
  .dashboard-layout .main-wrap {
    padding: 1.5rem 1.5rem 3rem;
  }
}

/* RESPONSIVO — MÓVIL */
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 95;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .sidebar-close { display: block; }
  .sidebar-toggle { display: inline-block; }
  .dashboard-layout .main-wrap {
    padding: 1rem 1rem 5rem;
  }
}
