@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');.app-breadcrumbs {
  padding: 12px 24px 14px;
  background-color: #ffffff;
}

.app-breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1;
}

.app-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
}

.app-breadcrumbs__link {
  color: var(--color-text-muted, #64748b);
  text-decoration: none;
  font-weight: 400;
  font-size: 12.5px;
  transition: color var(--transition-fast, 0.15s ease);
}

.app-breadcrumbs__link:hover {
  color: var(--color-brand-600, #2563eb);
}

.app-breadcrumbs__separator {
  color: var(--color-border-subtle, #94a3b8);
  user-select: none;
  font-weight: 400;
}

.app-breadcrumbs__current {
  color: var(--color-text-primary, #334155);
  font-weight: 600;
  font-size: 12.5px;
}.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-6);
  background-color: var(--color-bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.app-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header__logo-img {
  width: 24px;
  height: 24px;
  display: block;
}

.app-header__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.app-header__badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--color-brand-500);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.app-header__icon-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  position: relative;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast);
}

.app-header__icon-btn:hover {
  color: var(--color-text-primary);
  background-color: var(--color-bg-surface);
}

.app-header__dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--color-brand-500);
  border-radius: 50%;
}

.app-header__user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-border-subtle);
}

.app-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-brand-500);
}

.app-header__avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
}

.app-header__user-details {
  display: flex;
  flex-direction: column;
}

.app-header__user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.app-header__user-role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.app-sidebar {
  display: flex;
  flex-direction: row;
  height: 100%;
  align-self: stretch;
  flex-shrink: 0;
  z-index: 10;
  background-color: var(--color-bg-secondary);
}

.app-sidebar__primary {
  width: 240px;
  background-color: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-subtle);
  padding: var(--space-4) var(--space-2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-normal, 0.2s ease);
}

.app-sidebar__primary--collapsed {
  width: 64px;
}

.app-sidebar__primary--collapsed .section-header {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.app-sidebar__primary--collapsed .app-sidebar__link span,
.app-sidebar__primary--collapsed .sidebar-flyout__chevron {
  display: none;
}

.app-sidebar__primary--collapsed .app-sidebar__link {
  justify-content: center;
  padding: var(--space-2) 0;
}

.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  flex: 1;
}

.app-sidebar__link:hover,
.app-sidebar__link--open {
  color: var(--color-text-primary);
  background-color: var(--color-bg-surface);
}

.app-sidebar__link--active {
  color: var(--color-text-primary);
  background-color: rgba(99, 102, 241, 0.15);
  border-left: 3px solid var(--color-brand-500);
}

.app-sidebar__icon {
  flex-shrink: 0;
}

.sidebar-flyout__chevron {
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  margin-left: auto;
}

.sidebar-nav-item:hover .sidebar-flyout__chevron,
.sidebar-nav-item--open .sidebar-flyout__chevron {
  color: var(--color-text-primary);
  transform: translateX(2px);
}

/* Sidebar Section Headers */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-4);
}

.section-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-1);
}

.sidebar-nav-item {
  position: relative;
}

/* Secondary full-height adjacent nav panel (exact 240px width match) */
.app-sidebar__subpanel {
  width: 240px;
  background-color: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-subtle);
  padding: var(--space-4) var(--space-2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  animation: slideSubpanel 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideSubpanel {
  from {
    opacity: 0;
    transform: translateX(-8px);
    width: 200px;
  }
  to {
    opacity: 1;
    transform: translateX(0);
    width: 240px;
  }
}

/* Sidebar Collapse Toggle Footer */
.app-sidebar__footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
}

.app-sidebar__toggle-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.app-sidebar__primary--collapsed .app-sidebar__toggle-btn {
  justify-content: center;
  padding: var(--space-2) 0;
}

.app-sidebar__toggle-btn:hover {
  color: var(--color-text-primary);
  background-color: var(--color-bg-surface);
}.main-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.main-layout__body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.main-layout__content {
  flex: 1;
  padding: 0;
  background-color: #ffffff;
  overflow-y: auto;
  overflow-x: auto;
  min-width: 0;
}
.login-page {
  display: flex;
  min-height: 100vh;
  background-color: #eff3fa;
}

/* Left Panel: Premium Branding */
.login-page__brand-side {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f4c81 0%, #1a1f36 100%);
  color: #ffffff;
  padding: var(--space-12);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .login-page__brand-side {
    display: none; /* Hide branding on mobile for usability */
  }
}

.login-page__brand-side::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(46, 125, 246, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.login-page__brand-side::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(116, 59, 0, 0.12) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.login-page__brand-content {
  max-width: 520px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.login-page__brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.login-page__brand-logo svg {
  color: #2e7df6;
  filter: drop-shadow(0 0 8px rgba(46, 125, 246, 0.4));
}

.login-page__brand-logo-img {
  width: 28px;
  height: 28px;
  display: block;
}

.login-page__brand-middle {
  margin: var(--space-12) 0;
}

.login-page__brand-headline {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
  margin-bottom: var(--space-4);
  background: linear-gradient(to right, #ffffff, #eff3fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-page__brand-description {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.login-page__brand-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.login-page__brand-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2e8f0;
}

.login-page__brand-feature .feature-icon {
  color: #2e7df6;
}

.login-page__brand-feature-text {
  text-align: left;
}

.login-page__brand-footer {
  font-size: 0.8125rem;
  color: #64748b;
}

/* Right Panel: Clean form */
.login-page__form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background-color: #eff3fa;
}

.login-page__container {
  width: 100%;
  max-width: 440px;
}

.login-page__card-wrapper {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 16px !important;
  box-shadow:
    0 10px 25px -5px rgba(26, 31, 54, 0.05),
    0 8px 16px -6px rgba(26, 31, 54, 0.03) !important;
}

.login-page__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-6);
}

.login-page__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}

.login-page__title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #1a1f36 !important;
  line-height: 1.1;
}

.login-page__subtitle {
  font-size: 0.875rem;
  color: #4e5983 !important;
  font-weight: 500;
}

.login-page__alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
}

.login-page__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.login-page__submit {
  width: 100%;
  margin-top: var(--space-2);
  font-weight: 600 !important;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast) !important;
}

.login-page__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(46, 125, 246, 0.3) !important;
}

.login-page__demo-hint {
  padding: var(--space-4);
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  color: #4e5983;
  text-align: center;
}

.login-page__demo-hint code {
  color: #0f4c81;
  font-family: monospace;
  font-weight: 700;
  background-color: rgba(15, 76, 129, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
/* ==========================================================================
   Enterprise Design Tokens & Design System Foundation
   WCAG AA Compliant Color Palette, Typography, Glassmorphism & Spacing
   ========================================================================== */

:root {
  /* Color Palette - Modern Dark/Light Design Tokens */
  --font-family-base:
    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Theme: Light (Default ELEMENT Modern) */
  --color-bg-primary: #eff3fa;
  --color-bg-secondary: #ffffff;
  --color-bg-tertiary: #eef2fa;
  --color-bg-surface: rgba(239, 243, 250, 0.8);
  --color-bg-glass: rgba(255, 255, 255, 0.85);

  --color-border-subtle: #e2e8f0;
  --color-border-medium: #cbd5e1;
  --color-border-focus: #2e7df6;

  --color-text-primary: #1a1f36;
  --color-text-secondary: #4e5983;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Brand & Status Colors */
  --color-brand-500: #0f4c81;
  --color-brand-600: #2e7df6;
  --color-brand-700: #1a1f36;
  --color-tertiary-500: #743b00;

  --color-success-500: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);

  --color-warning-500: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.15);

  --color-danger-500: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.15);

  --color-info-500: #06b6d4;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius Scale */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadow & Glow Tokens */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glow-brand: 0 0 20px rgba(99, 102, 241, 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-bg-surface: rgba(30, 41, 59, 0.7);
  --color-bg-glass: rgba(15, 23, 42, 0.75);

  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-medium: rgba(255, 255, 255, 0.16);

  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-inverse: #0f172a;
}

/* CSS Reset & General Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: var(--font-family-base);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Utility Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) forwards;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}


.dashboard-page {
  --bg: #eef0f3;
  --panel: #ffffff;
  --panel-raised: #f6f7f9;
  --hairline: #dee2e8;
  --hairline-soft: #e9ecf0;
  --text: #1b212b;
  --text-dim: #5b6473;
  --text-faint: #8a93a3;
  --healthy: #24915f;
  --healthy-dim: rgba(36, 145, 95, 0.12);
  --over: #c6431d;
  --over-dim: rgba(198, 67, 29, 0.11);
  --under: #3868b8;
  --under-dim: rgba(56, 104, 184, 0.11);
  --amber: #a97a1e;
  --amber-dim: rgba(169, 122, 30, 0.13);
  --radius: 7px;
  --radius-sm: 3px;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;

  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 0 60px;
}

/* ---------- Top bar ---------- */
.dashboard-page .topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.dashboard-page .brand-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-page .brand-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--healthy);
  box-shadow: 0 0 0 3px var(--healthy-dim);
}

.dashboard-page h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.dashboard-page .sync-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 6px;
}

.dashboard-page .sync-note b {
  color: var(--text-dim);
  font-weight: 500;
}

.dashboard-page .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-page .filter-chip {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.dashboard-page .filter-chip:hover {
  border-color: #b7bfcc;
  color: var(--text);
}

.dashboard-page .filter-chip svg {
  width: 9px;
  height: 9px;
  opacity: 0.6;
}

.dashboard-page .filter-chip .label {
  color: var(--text-faint);
}

/* ---------- Layout Grid ---------- */
.dashboard-page .grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.dashboard-page .panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow:
    0 1px 2px rgba(20, 25, 35, 0.04),
    0 6px 20px rgba(20, 25, 35, 0.03);
}

.dashboard-page .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-page .panel-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dashboard-page .panel-sub {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Info tooltip ---------- */
.dashboard-page .info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  background: var(--panel-raised);
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.dashboard-page .info-icon:hover,
.dashboard-page .info-icon:focus-visible {
  border-color: var(--text-dim);
  color: var(--text);
  outline: none;
}

.dashboard-page .info-icon .tip {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1b212b;
  color: #f2f4f6;
  font-family: var(--body);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  width: 240px;
  padding: 11px 13px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 25, 35, 0.22);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  z-index: 60;
}

.dashboard-page .info-icon .tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1b212b;
}

.dashboard-page .info-icon:hover .tip,
.dashboard-page .info-icon:focus-visible .tip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dashboard-page .stat .info-icon .tip {
  left: auto;
  right: -6px;
  transform: translateY(4px);
}

.dashboard-page .stat .info-icon:hover .tip,
.dashboard-page .stat .info-icon:focus-visible .tip {
  transform: translateY(0);
}

.dashboard-page .stat .info-icon .tip::after {
  left: auto;
  right: 10px;
  transform: none;
}

/* ---------- Horizon instrument ---------- */
.dashboard-page .horizon {
  grid-column: span 12;
}

.dashboard-page .horizon-track-wrap {
  position: relative;
  padding-top: 6px;
}

.dashboard-page .horizon-track {
  position: relative;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(36, 145, 95, 0.14) 0%,
    rgba(36, 145, 95, 0.14) 24%,
    rgba(169, 122, 30, 0.12) 24%,
    rgba(169, 122, 30, 0.09) 40%,
    rgba(20, 25, 35, 0.035) 40%,
    rgba(20, 25, 35, 0.035) 100%
  );
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.dashboard-page .horizon-week {
  flex: 1;
  height: 100%;
  position: relative;
  border-right: 1px solid rgba(20, 25, 35, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-page .horizon-week:last-child {
  border-right: none;
}

.dashboard-page .horizon-week .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(36, 145, 95, 0.5), rgba(36, 145, 95, 0.22));
}

.dashboard-page .horizon-week.partial .fill {
  background: linear-gradient(180deg, rgba(169, 122, 30, 0.5), rgba(169, 122, 30, 0.2));
}

.dashboard-page .horizon-week.empty .fill {
  display: none;
}

.dashboard-page .horizon-week .pct {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.dashboard-page .horizon-week.empty .pct {
  color: var(--text-faint);
}

.dashboard-page .horizon-labels {
  display: flex;
  margin-top: 9px;
}

.dashboard-page .horizon-labels span {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
}

.dashboard-page .horizon-marker {
  position: absolute;
  top: -8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.dashboard-page .horizon-marker .flag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--amber);
  background: var(--panel-raised);
  border: 1px solid var(--amber);
  border-radius: 3px;
  padding: 2px 6px;
  white-space: nowrap;
  margin-bottom: 4px;
}

.dashboard-page .horizon-marker .line {
  width: 1px;
  height: 70px;
  background: var(--amber);
  opacity: 0.5;
}

.dashboard-page .horizon-readout {
  display: flex;
  gap: 28px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.dashboard-page .horizon-readout .item {
  display: flex;
  flex-direction: column;
}

.dashboard-page .horizon-readout .item .num {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.dashboard-page .horizon-readout .item .lbl {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ---------- Stat cards ---------- */
.dashboard-page .stat {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-page .stat .stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dashboard-page .stat-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  color: var(--text-faint);
  border: 1px solid var(--hairline-soft);
}

.dashboard-page .stat-tag.over {
  color: var(--over);
  border-color: rgba(198, 67, 29, 0.3);
  background: var(--over-dim);
}

.dashboard-page .stat-tag.under {
  color: var(--under);
  border-color: rgba(56, 104, 184, 0.3);
  background: var(--under-dim);
}

.dashboard-page .stat-tag.healthy {
  color: var(--healthy);
  border-color: rgba(36, 145, 95, 0.3);
  background: var(--healthy-dim);
}

.dashboard-page .stat-value {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  margin-top: 14px;
  letter-spacing: -0.01em;
}

.dashboard-page .stat-value small {
  font-size: 15px;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 4px;
}

.dashboard-page .stat-label {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

.dashboard-page .stat-delta {
  font-family: var(--mono);
  font-size: 11px;
  margin-top: 10px;
  color: var(--text-faint);
}

.dashboard-page .stat-delta.up {
  color: var(--over);
}

.dashboard-page .stat-delta.down {
  color: var(--healthy);
}

/* ---------- Chart panel ---------- */
.dashboard-page .chart-panel {
  grid-column: span 8;
  display: flex;
  flex-direction: column;
}

.dashboard-page .chart-legend {
  display: flex;
  gap: 16px;
}

.dashboard-page .chart-legend .li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  font-family: var(--mono);
}

.dashboard-page .chart-legend .sw {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.dashboard-page .chart-wrapper {
  position: relative;
  flex-grow: 1;
  min-height: 260px;
  max-height: 260px;
}

/* ---------- Utilization by team/role ---------- */
.dashboard-page .util-panel {
  grid-column: span 4;
}

.dashboard-page .util-row {
  margin-bottom: 14px;
}

.dashboard-page .util-row:last-child {
  margin-bottom: 0;
}

.dashboard-page .util-row .util-top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.dashboard-page .util-row .util-top .name {
  color: var(--text);
  font-weight: 500;
}

.dashboard-page .util-row .util-top .val {
  font-family: var(--mono);
  color: var(--text-dim);
}

.dashboard-page .util-bar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 25, 35, 0.07);
  overflow: visible;
}

.dashboard-page .util-bar-band {
  position: absolute;
  top: -3px;
  bottom: -3px;
  background: rgba(20, 25, 35, 0.035);
  border-left: 1px dashed rgba(20, 25, 35, 0.22);
  border-right: 1px dashed rgba(20, 25, 35, 0.22);
}

.dashboard-page .util-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px;
}

/* ---------- Watchlist ---------- */
.dashboard-page .watch-panel {
  grid-column: span 8;
}

.dashboard-page table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-page thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--hairline);
}

.dashboard-page tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px;
}

.dashboard-page tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-page .person {
  font-weight: 500;
  color: var(--text);
}

.dashboard-page .role-team {
  color: var(--text-faint);
  font-size: 12px;
}

.dashboard-page .flag-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.dashboard-page .flag-pill.over {
  color: var(--over);
  background: var(--over-dim);
}

.dashboard-page .flag-pill.under {
  color: var(--under);
  background: var(--under-dim);
}

.dashboard-page .flag-pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-page .hrs {
  font-family: var(--mono);
  color: var(--text-dim);
}

.dashboard-page .escalate {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Open capacity ---------- */
.dashboard-page .open-panel {
  grid-column: span 4;
}

.dashboard-page .open-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.dashboard-page .open-row:last-child {
  border-bottom: none;
}

.dashboard-page .open-team {
  font-size: 13px;
  color: var(--text);
}

.dashboard-page .open-team .sub {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 1px;
}

.dashboard-page .open-hrs {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--healthy);
  font-weight: 500;
}

/* ---------- Footer ---------- */
.dashboard-page footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 980px) {
  .dashboard-page .stat {
    grid-column: span 6;
  }

  .dashboard-page .chart-panel {
    grid-column: span 12;
  }

  .dashboard-page .util-panel {
    grid-column: span 12;
  }

  .dashboard-page .watch-panel {
    grid-column: span 12;
  }

  .dashboard-page .open-panel {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  .dashboard-page .stat {
    grid-column: span 12;
  }
}
.iam-page {
  --bg: #eef0f3;
  --panel: #ffffff;
  --panel-raised: #f6f7f9;
  --hairline: #dee2e8;
  --hairline-soft: #e9ecf0;
  --text: #1b212b;
  --text-dim: #4e5566;
  --text-faint: #8a93a3;
  --red: var(--color-brand-500);
  --red-dim: var(--color-bg-tertiary);
  --blue: var(--color-brand-600);
  --blue-dim: rgba(46, 125, 246, 0.1);
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.12);
  --orange: #f59e0b;
  --orange-dim: rgba(245, 158, 11, 0.12);
  --radius: 6px;
  --font-mono: 'IBM Plex Mono', monospace;

  font-family: 'Inter', sans-serif;
  color: var(--text);
  padding: 10px 24px 40px;
}

/* ---------- Header ---------- */
.iam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.iam-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.iam-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: uppercase;
}

/* ---------- Actions/Filters Row ---------- */
.filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0 10px;
  width: 280px;
}

.search-bar input {
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 13px;
  width: 100%;
  outline: none;
}

.filter-group select {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-dim);
  outline: none;
  cursor: pointer;
  min-width: 120px;
}

.add-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast, 0.15s ease);
}

.add-btn:hover {
  background-color: var(--color-brand-600) !important;
  box-shadow: var(--glow-brand);
}

.add-btn.danger-red {
  background-color: var(--red) !important;
}

.add-btn.danger-red:hover {
  background-color: var(--color-brand-600) !important;
}

/* ---------- Card ---------- */
.iam-card {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: var(--panel) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

/* ---------- Tables ---------- */
.iam-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.iam-table {
  width: 100%;
  border-collapse: collapse;
}

.iam-table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
  letter-spacing: 0.05em;
  background: #fafbfd;
}

.iam-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 13px;
  color: var(--text-dim);
  vertical-align: middle;
}

.iam-table tr:last-child td {
  border-bottom: none;
}

.bold-name {
  font-weight: 600;
  color: var(--text) !important;
}

.mono {
  font-family: var(--font-mono);
}

.text-muted {
  color: var(--text-faint) !important;
}

.role-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.role-tag.bg-green-dim {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.users-count-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-brand-500);
  background: var(--color-bg-tertiary);
  padding: 3px 8px;
  border-radius: 4px;
}

.security-level-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: #e11d48;
  background: #fff1f2;
  padding: 3px 8px;
  border-radius: 4px;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.active {
  color: #047857;
  background: #d1fae5;
}

.status-pill.inactive {
  color: #4b5563;
  background: #e5e7eb;
}

.status-pill.pending {
  color: #d97706;
  background: #fef3c7;
}

.status-pill.locked {
  color: #b91c1c;
  background: #fee2e2;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.act-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.act-btn.edit-icon-btn {
  color: var(--color-brand-600);
}

.act-btn.edit-icon-btn:hover {
  background: rgba(46, 125, 246, 0.1);
}

.act-btn.key-perm-btn {
  color: #059669;
  background: #ecfdf5;
}

.act-btn.key-perm-btn:hover {
  background: #d1fae5;
}

.act-btn.finger-state-btn {
  color: #d97706;
  background: #fffbeb;
}

.act-btn.finger-state-btn:hover {
  background: #fef3c7;
}

.act-btn.delete {
  color: #dc2626;
  background: #fee2e2;
}

.act-btn.delete:hover {
  background: #fca5a5;
}

/* Method pills */
.method-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.method-pill.get {
  color: #047857;
  background: #d1fae5;
}
.method-pill.post {
  color: #1d4ed8;
  background: #dbeafe;
}
.method-pill.put {
  color: #b45309;
  background: #fef3c7;
}
.method-pill.delete {
  color: #b91c1c;
  background: #fee2e2;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: var(--panel);
  border-radius: 8px;
  width: 460px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  background: #fafbfd;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
}

.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.form-group input,
.form-group select {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  background: var(--panel);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--text);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--panel-raised);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--hairline-soft);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  margin-top: 10px;
}

.btn-sec {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dim);
}

.btn-sec:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ==================== DRAWER FOR PERMISSIONS ACCESS MATRIX ==================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 110;
}

.drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 900px;
  background: var(--panel);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 120;
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--hairline);
  background: #fafbfd;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.drawer-form-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-fields {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--hairline-soft);
}

.drawer-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--hairline);
  padding: 0 24px;
  background: #fafbfd;
}

.drawer-tab-btn {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 12px 18px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
}

.drawer-tab-btn:hover {
  color: var(--text);
}

.drawer-tab-btn.active {
  color: var(--red);
}

.drawer-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--red);
}

.drawer-tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Matrix Table styles */
.matrix-table-wrap {
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th {
  background: #fafbfd;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-dim);
}

.matrix-table th:first-child {
  text-align: left;
  padding-left: 16px;
}

.matrix-table td {
  padding: 10px;
  border-bottom: 1px solid var(--hairline-soft);
  text-align: center;
  font-size: 12.5px;
}

.matrix-table td:first-child {
  text-align: left;
  padding-left: 16px;
}

.screen-name-label {
  font-weight: 600;
  color: var(--text);
}

.screen-module-label {
  font-size: 10px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: normal;
}

.matrix-table input[type='checkbox'] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--red);
}

.matrix-toggles {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
}

.matrix-toggles span {
  cursor: pointer;
  font-weight: 700;
}

.matrix-toggles .all-link {
  color: #047857;
}

.matrix-toggles .none-link {
  color: #b91c1c;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafbfd;
}

.btn-lg-foot {
  padding: 10px 24px;
  font-size: 13.5px;
}

.tab-placeholder-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-dim);
}

.tab-placeholder-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 12px 0 6px;
  color: var(--text);
}

.tab-placeholder-info p {
  font-size: 13px;
  max-width: 400px;
  line-height: 1.5;
}
