:root {
  /* 
   * Modern Enterprise Palette 
   * Deep Navy (Professional) + Teal (Vibrant) + Glassmorphism
   */

  /* Primary Colors */
  --color-primary: #0f172a;
  /* Deep Navy */
  --color-primary-light: #1e293b;
  /* Lighter Navy */
  --color-accent: #14b8a6;
  /* Teal */
  --color-accent-hover: #0d9488;

  /* Backgrounds */
  --color-bg-body: #f1f5f9;
  /* Light Gray Blue */
  --color-bg-card: rgba(255, 255, 255, 0.9);
  --color-bg-glass: rgba(255, 255, 255, 0.7);

  /* Text */
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;

  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Spacing & Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-lg: 16px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: 1.5;
  overflow: hidden;
  /* App-like feel */
}

/* App Shell Layout */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform var(--transition-fast);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  color: #94a3b8;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item.active {
  background-color: var(--color-accent);
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.user-profile {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header */
.top-header {
  height: var(--header-height);
  background: var(--color-bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 10;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  gap: 16px;
}

/* Content Scroll Area */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Cards & Glassmorphism */
.glass-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Grid Layouts */
.grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 6px rgba(20, 184, 166, 0.2);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--color-text-main);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Utilities */
.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ==========================
   Phase 5: New Features CSS
   ========================== */

/* View Switcher */
.view-switcher {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.view-btn {
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.view-btn.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  height: calc(100vh - 200px);
  padding-bottom: 12px;
}

.kanban-column {
  min-width: 300px;
  width: 300px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-header {
  font-weight: 600;
  color: var(--color-text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kanban-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

/* Timeline View */
.timeline-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
}

.timeline-header {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

.timeline-month {
  min-width: 100px;
  padding: 8px;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid #f1f5f9;
}

.timeline-body {
  position: relative;
  min-height: 400px;
}

.timeline-row {
  display: flex;
  align-items: center;
  height: 40px;
  margin-bottom: 8px;
  position: relative;
}

.timeline-bar {
  height: 24px;
  background: var(--color-accent);
  border-radius: 12px;
  position: absolute;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-sm);
}