/* ═══════════════════════════════════════════
   App layout — sidebar + main
═══════════════════════════════════════════ */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: none;
  transition: transform 0.25s ease;
  z-index: 100;
}

.sidebar-brand {
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.sidebar-logo {
  height: 32px;
  width: auto;
  max-width: 100%;
  display: block;
}

.sidebar-section-label {
  padding: 24px 24px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Sidebar Tab */
.tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  margin: 2px 16px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.tab svg {
  width: 18px;
  height: 18px;
  stroke: var(--sidebar-text);
  opacity: 0.85;
}

.tab:hover {
  background: var(--sidebar-hover-bg) !important;
  color: var(--sidebar-text-active) !important;
}

.tab:hover svg {
  stroke: var(--sidebar-text-active) !important;
  opacity: 1;
}

.tab.active {
  background: var(--sidebar-hover-bg) !important;
  color: var(--sidebar-text-active) !important;
  font-weight: 600 !important;
  box-shadow: none;
}

.tab.active svg {
  stroke: var(--sidebar-text-active) !important;
  opacity: 1;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user {
  font-size: 13px;
  /* Un poco más grande */
  color: var(--sidebar-text-active) !important;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-signout {
  background: none;
  border: none;
  color: var(--sidebar-text);
  opacity: 0.85;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}

.btn-signout:hover {
  color: #fff;
}

/* ── Main area ───────────────────────────── */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.header {
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 30px;
  gap: 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.header-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.header-actions {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}

.header-search-container {
  position: relative;
  width: 300px;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.header-search {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 10px 16px 10px 40px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.header-icon-btn {
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  position: relative;
}

.header-profile:hover {
  background: var(--bg-soft);
}

.profile-info {
  text-align: right;
}

.profile-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.profile-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-signout-header {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 2px;
}

.status {
  padding: 12px 16px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--sidebar-text-active);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.content {
  flex: 1;
  padding: 24px;
}

.content h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

