/* Dashboard Shell Layout */

.dashboard {
  display: flex;
  min-height: 100vh;
}

/* ─── Header ─── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: var(--z-header);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  height: 32px;
  width: auto;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.header-client {
  display: flex;
  flex-direction: column;
}

.header-client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-client-domain {
  font-size: 12px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(106, 171, 181, 0.1);
  color: var(--tc-primary);
  border: 1px solid rgba(106, 171, 181, 0.2);
}

.header-badge.demo {
  background: rgba(245, 158, 11, 0.1);
  color: var(--severity-warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.header-updated {
  font-size: 11px;
  color: var(--text-muted);
}

.client-selector {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
}

.client-selector:hover {
  border-color: var(--border-color-hover);
}

/* Hamburger */

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-primary);
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

/* ─── Sidebar ─── */

.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sidebar);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding-left: 22px;
}

.nav-item.active {
  background: var(--tc-primary-glow);
  color: var(--tc-primary);
  border-left-color: var(--tc-primary);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item-label {
  flex: 1;
}

.nav-item-score {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

/* Nav section hierarchy */
.nav-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 16px;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 12px 20px 4px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Main Content ─── */

.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  flex: 1;
  min-height: calc(100vh - var(--header-height));
}

.tab-content {
  display: none;
  padding: 32px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  animation: fadeIn var(--transition-normal);
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Backdrop (mobile) ─── */

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-sidebar) - 1);
}

.sidebar-backdrop.visible {
  display: block;
}

/* ─── Tab Header ─── */

.tab-header {
  margin-bottom: 28px;
}

.tab-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tab-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}
