/* ============================================
   Align Health Collective — Dashboard Demo Styles
   Loaded on: dashboard-demo.html only
   Dark sidebar + light content area
   ============================================ */

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
  width: 260px;
  background: #1E293B;
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  overflow-y: auto;
}

.dashboard-sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid #334155;
}

.dashboard-sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.dashboard-sidebar-nav a,
.dashboard-sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  color: #94A3B8;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
  text-align: left;
}

.dashboard-sidebar-nav a:hover,
.dashboard-sidebar-nav button:hover {
  color: #E2E8F0;
  background: #334155;
}

.dashboard-sidebar-nav .nav-active {
  color: #FFFFFF;
  background: #334155;
  border-right: 3px solid #0D9488;
}

.dashboard-sidebar-nav .nav-disabled {
  color: #475569;
  cursor: not-allowed;
  pointer-events: none;
}

.dashboard-sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid #334155;
  font-size: 0.75rem;
}

/* Main Content Area */
.dashboard-main {
  flex: 1;
  margin-left: 260px;
  background: #F8FAFC;
  min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* Demo Banner */
.dashboard-demo-banner {
  background: #163A86;
  color: #FFFFFF;
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
}

.dashboard-demo-banner a {
  color: #5EEAD4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dashboard-demo-banner a:hover {
  color: #FFFFFF;
}

/* Metric Cards */
.metric-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: box-shadow 200ms ease;
}

.metric-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.metric-value {
  font-variant-numeric: tabular-nums;
}

.metric-change--positive {
  color: #10B981;
}

.metric-change--negative {
  color: #EF4444;
}

/* Chart Containers */
.chart-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.chart-canvas-container {
  position: relative;
  width: 100%;
}

/* Tab Switcher */
.tab-group {
  display: flex;
  gap: 0.25rem;
  background: #F1F5F9;
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.tab-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.tab-btn.is-active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-btn:hover:not(.is-active) {
  color: #0F172A;
}

/* Mobile sidebar toggle */
.dashboard-mobile-toggle {
  display: none;
}

/* Mobile sidebar overlay */
.dashboard-sidebar-overlay {
  display: none;
}

/* Responsive — mobile: collapse sidebar */
@media (max-width: 1023px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 300ms ease;
  }

  .dashboard-sidebar.is-open {
    transform: translateX(0);
  }

  .dashboard-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
  }

  .dashboard-sidebar-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .dashboard-main {
    margin-left: 0;
    overflow-x: hidden;
  }

  .dashboard-header {
    padding: 1rem;
  }

  .dashboard-mobile-toggle {
    display: flex;
  }
}
