:root {
  --eos-primary: #4f46e5;
  --eos-primary-hover: #4338ca;
  --eos-primary-light: #eef2ff;
  --eos-dark: #0f172a;
  --eos-surface: #ffffff;
  --eos-bg: #f8fafc;
  --eos-border: #e2e8f0;
  --eos-text: #1e293b;
  --eos-text-muted: #64748b;
  --eos-success: #10b981;
  --eos-success-light: #ecfdf5;
  --eos-danger: #ef4444;
  --eos-danger-light: #fef2f2;
  --eos-warning: #f59e0b;
  --eos-warning-light: #fffbeb;
  --eos-info: #0ea5e9;
  --eos-info-light: #f0f9ff;
  --eos-sidebar-width: 260px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--eos-bg);
  color: var(--eos-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sidebar */
.app-sidebar {
  width: var(--eos-sidebar-width);
  background: #0f172a;
  color: #94a3b8;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease-in-out;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.sidebar-brand:hover {
  color: #ffffff;
}

.sidebar-brand .brand-badge {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 800;
}

/* Sleek Custom Scrollbar for Sidebar Menu */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.75rem;
  list-style: none;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  scroll-behavior: smooth;
}

.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.sidebar-menu:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

/* Global Modern Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

.sidebar-menu .nav-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 0.75rem 0.75rem 0.25rem;
}

.sidebar-menu .nav-item {
  margin-bottom: 0.25rem;
}

.sidebar-menu .nav-link {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar-menu .nav-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.sidebar-menu .nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-menu .nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

/* Main Content Area */
.app-main {
  margin-left: var(--eos-sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--eos-border);
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.page-content {
  padding: 2rem 1.75rem;
  flex: 1;
}

/* Cards & UI Elements */
.card {
  border: 1px solid var(--eos-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  background: #ffffff;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--eos-border);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.stat-card {
  padding: 1.25rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--eos-border);
  position: relative;
  overflow: hidden;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* EOS Scorecard Matrix */
.scorecard-table th, .scorecard-table td {
  vertical-align: middle;
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
}

.scorecard-cell {
  min-width: 80px;
  text-align: center;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.scorecard-cell:hover {
  transform: scale(1.05);
}

.scorecard-cell.hit {
  background-color: var(--eos-success-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.scorecard-cell.miss {
  background-color: var(--eos-danger-light);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.scorecard-cell.empty {
  background-color: #f1f5f9;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

/* L10 Timer */
.l10-timer-box {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(49, 46, 129, 0.25);
}

.l10-timer-display {
  font-size: 3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  color: #38bdf8;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.step-bubble {
  padding: 0.5rem 0.85rem;
  border-radius: 30px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid var(--eos-border);
}

.step-bubble.active {
  background: var(--eos-primary);
  color: #ffffff;
  border-color: var(--eos-primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.step-bubble.completed {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* Accountability Chart Tree */
.seat-node {
  background: #ffffff;
  border: 2px solid var(--eos-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.2s ease;
}

.seat-node:hover {
  border-color: var(--eos-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.1);
}

.seat-node.visionary-node {
  border-top: 4px solid #f59e0b;
}

.seat-node.integrator-node {
  border-top: 4px solid #4f46e5;
}

.seat-node.dept-node {
  border-top: 4px solid #0ea5e9;
}

/* Custom Purple Badges */
.bg-purple-subtle {
  background-color: #f3e8ff !important;
}

.text-purple {
  color: #6b21a8 !important;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
}
