/* ============================================================
   layout.css — Sidebar, nav superior y zona central
   ============================================================ */

/* ---- Shell SPA ---- */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--color-surface);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: var(--border);
}

.sidebar-logo .logo-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.sidebar-logo .logo-sub {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  padding: 10px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 0.875rem;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  margin: 0 6px;
  transition: background var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: var(--color-bg);
}

.nav-item.active {
  background: var(--color-bg);
  color: var(--color-accent);
  font-weight: 500;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg { opacity: 1; }

/* ---- Sidebar footer (usuario) ---- */
.sidebar-footer {
  border-top: var(--border);
  padding: 12px 16px;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.72rem;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--color-muted);
  transition: color var(--transition);
}

.btn-logout:hover { color: var(--color-danger); }

/* ---- Main area ---- */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- Top nav ---- */
.top-nav {
  height: var(--nav-h);
  min-height: var(--nav-h);
  background: var(--color-surface);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.top-nav-title {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- Content zone ---- */
.content-zone {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ---- Login page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.login-card {
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  width: 100%;
  max-width: 360px;
}

.login-logo {
  margin-bottom: 6px;
}

.login-logo-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

.login-logo-sub {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.login-card h1 {
  font-size: 1.1rem;
  margin: 20px 0 18px;
}
