/* ===========================
   Design System & Variables
   =========================== */
:root {
  /* Color Palette - Vibrant & Professional */
  --primary-hue: 250;
  --primary-sat: 85%;
  --primary-light: 55%;

  --accent-hue: 280;
  --accent-sat: 75%;
  --accent-light: 60%;

  /* Semantic Colors */
  --bg-primary: hsl(240, 15%, 8%);
  --bg-secondary: hsl(240, 12%, 12%);
  --bg-tertiary: hsl(240, 10%, 16%);
  --bg-glass: hsla(240, 15%, 20%, 0.7);

  --text-primary: hsl(0, 0%, 95%);
  --text-secondary: hsl(0, 0%, 70%);
  --text-muted: hsl(0, 0%, 50%);

  --border-color: hsla(240, 10%, 30%, 0.5);
  --border-hover: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.5);

  --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
  --primary-dark: hsl(var(--primary-hue), var(--primary-sat), 45%);
  --primary-light: hsl(var(--primary-hue), var(--primary-sat), 65%);

  --accent: hsl(var(--accent-hue), var(--accent-sat), var(--accent-light));
  --accent-dark: hsl(var(--accent-hue), var(--accent-sat), 50%);

  --success: hsl(145, 65%, 50%);
  --warning: hsl(40, 95%, 60%);
  --error: hsl(0, 75%, 60%);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-glass: linear-gradient(135deg,
      hsla(var(--primary-hue), 50%, 25%, 0.3) 0%,
      hsla(var(--accent-hue), 50%, 25%, 0.2) 100%);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.3);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

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

/* ===========================
   Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%,
      hsla(var(--primary-hue), 70%, 30%, 0.15) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 80%,
      hsla(var(--accent-hue), 70%, 30%, 0.15) 0%,
      transparent 50%);
  animation: gradientShift 20s ease infinite;
  z-index: -1;
}

@keyframes gradientShift {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(-5%, -5%) rotate(5deg);
  }
}

/* ===========================
   Typography
   =========================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
}

header {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.header-title {
  flex: 1;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-glass);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: hsl(0, 75%, 50%);
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--warning);
  color: hsl(240, 15%, 8%);
  font-weight: 600;
}

.btn-warning:hover {
  background: hsl(40, 95%, 50%);
  transform: translateY(-2px);
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.875rem;
}

.btn-icon {
  padding: var(--space-sm);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ===========================
   Controls Section
   =========================== */
.controls {
  display: flex;
  gap: var(--space-lg);
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 100;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.week-display {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

.actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  position: relative;
}

/* ===========================
   Dropdown Menu
   =========================== */
.dropdown {
  position: relative;
  z-index: 200;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  display: none;
  z-index: 9999;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

/* ===========================
   Modal Tabs
   =========================== */
.modal-large {
  max-width: 900px;
}

.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  padding: 0 1.5rem;
  gap: 1rem;
}

.tab-btn {
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

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

/* ===========================
   Timesheet Table
   =========================== */
.timesheet-container {
  overflow-x: auto;
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.timesheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.timesheet-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.timesheet-table th {
  background: var(--gradient-glass);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-weight: 700;
  text-align: left;
  padding: var(--space-md);
  border-bottom: 2px solid var(--border-hover);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.timesheet-table th:first-child {
  border-top-left-radius: var(--radius-md);
}

.timesheet-table th:last-child {
  border-top-right-radius: var(--radius-md);
  text-align: right;
}

.timesheet-table th.day-header {
  text-align: center;
}

.timesheet-table tbody tr {
  transition: background var(--transition-fast);
}

.timesheet-table tbody tr:hover {
  background: var(--bg-glass);
}

.timesheet-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

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

.project-cell {
  font-weight: 500;
  color: var(--text-primary);
}

.customer-name {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.time-cell {
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.time-cell:hover {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  cursor: help;
}

/* Tooltip styling */
.time-cell[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xs);
  pointer-events: none;
}

.time-cell[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-hover);
  z-index: 100;
  pointer-events: none;
}

.time-input-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.hours-display {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--primary-light);
  min-height: 1.5rem;
}

.hours-display.has-value {
  color: var(--accent);
}

.comment-indicator {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.total-cell {
  font-weight: 700;
  text-align: right;
  color: var(--accent);
  font-size: 1.125rem;
}

/* Summary Row */
.summary-row {
  background: var(--gradient-glass) !important;
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.summary-row td {
  border-top: 2px solid var(--border-hover);
  padding: var(--space-lg) var(--space-md);
}

.summary-row .total-cell {
  font-size: 1.25rem;
}

/* Inactive Projects Section */
.inactive-projects-section {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.inactive-header {
  margin-bottom: var(--space-md);
}

.inactive-header button {
  width: 100%;
  justify-content: flex-start;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
}

.inactive-header button:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
}

.inactive-projects-list {
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.inactive-project-row {
  opacity: 0.7;
}

.inactive-project-row:hover {
  opacity: 1;
  background: var(--bg-glass);
}

/* ===========================
   Weekly Summary Card
   =========================== */
.weekly-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.summary-card {
  background: var(--gradient-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-hover);
}

.summary-card h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.summary-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.summary-value.positive {
  color: var(--success);
}

.summary-value.negative {
  color: var(--error);
}

/* ===========================
   Modal
   =========================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-base);
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--transition-slow);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.modal-header h2 {
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

.close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: var(--space-xl);
}

.modal-footer {
  display: flex;
  flex-direction: row-reverse;
  gap: var(--space-md);
  justify-content: flex-start;
}

/* ===========================
   Customers List
   =========================== */
.customers-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.customer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.customer-item:hover {
  background: var(--bg-glass);
  border-color: var(--border-hover);
}

.customer-info {
  flex: 1;
}

.customer-item-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.customer-item-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.customer-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ===========================
   Forms
   =========================== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: var(--space-md);
}

/* ===========================
   Utility Classes
   =========================== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

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

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  .container {
    padding: var(--space-md);
  }

  .controls {
    flex-direction: column;
    gap: var(--space-md);
  }

  .week-nav {
    width: 100%;
    justify-content: center;
  }

  .actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .timesheet-container {
    padding: var(--space-sm);
  }

  .timesheet-table {
    font-size: 0.875rem;
  }

  .timesheet-table th,
  .timesheet-table td {
    padding: var(--space-sm);
  }

  h1 {
    font-size: 2rem;
  }

  .summary-value {
    font-size: 2rem;
  }
}

/* ===========================
   Scrollbar Styling
   =========================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===========================
   Gantt Chart Styles
   =========================== */

.gantt-chart-section {
  margin-top: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.gantt-header {
  margin-bottom: 1rem;
}

.gantt-chart-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.gantt-chart-container.active {
  max-height: 600px;
  overflow-y: auto;
}

.gantt-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.gantt-wrapper {
  display: flex;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  min-height: 400px;
  position: relative;
}

.gantt-sidebar {
  min-width: 250px;
  max-width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.gantt-sidebar-header {
  height: 40px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.gantt-row-label {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.gantt-project-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.gantt-customer-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}

.gantt-timeline-container {
  flex: 1;
  overflow-x: auto;
  position: relative;
}

.gantt-timeline-header {
  height: 40px;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
}

.gantt-month-label {
  position: absolute;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

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

.gantt-row {
  height: 90px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.gantt-bar-established,
.gantt-bar-potential {
  position: absolute;
  height: 32px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 40px;
}

.gantt-bar-established {
  background: var(--primary);
  border: 2px solid var(--primary-dark);
}

.gantt-bar-potential {
  background: repeating-linear-gradient(
    45deg,
    rgba(108, 117, 125, 0.3),
    rgba(108, 117, 125, 0.3) 10px,
    rgba(108, 117, 125, 0.5) 10px,
    rgba(108, 117, 125, 0.5) 20px
  );
  border: 2px dashed var(--text-secondary);
}

.gantt-bar-established:hover,
.gantt-bar-potential:hover {
  opacity: 0.8;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gantt-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
}

.gantt-bar-potential .gantt-bar-label {
  color: var(--text-primary);
  text-shadow: none;
}

.gantt-today-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger);
  z-index: 10;
  pointer-events: none;
}

.gantt-today-label {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.gantt-capacity-warning {
  position: absolute;
  top: 5px;
  width: 24px;
  height: 24px;
  background: var(--warning);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  cursor: help;
  animation: pulse 2s ease-in-out infinite;
  transform: translateX(-12px);
}

.warning-icon {
  font-size: 0.9rem;
}

@keyframes pulse {
  0%, 100% {
    transform: translateX(-12px) scale(1);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  50% {
    transform: translateX(-12px) scale(1.1);
    box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
  }
}

/* Badge styles for project status */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.badge-established {
  background: var(--success-bg);
  color: var(--success);
}

.badge-potential {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-inactive {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Project list styles for Manage Projects modal */
.projects-section {
  margin-bottom: 2rem;
}

.projects-section h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.project-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.project-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.project-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.project-item-details {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.project-item-details strong {
  color: var(--text-primary);
  font-weight: 600;
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Radio group for project status */
.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.radio-group input[type="radio"] {
  cursor: pointer;
}

/* Form helper text */
.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gantt-wrapper {
    flex-direction: column;
  }

  .gantt-sidebar {
    min-width: 100%;
    max-width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .gantt-timeline-container {
    min-height: 300px;
  }

  .project-item-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .project-actions .btn {
    flex: 1;
    min-width: 120px;
  }
}

/* ===========================
   Statistics Modal
   =========================== */
.modal-content-wide {
  max-width: 820px;
  width: 95%;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.stats-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid hsla(240, 10%, 30%, 0.25);
  vertical-align: middle;
}

.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover td { background: var(--bg-glass); }

.stat-month {
  font-weight: 600;
  font-family: var(--font-mono);
}

.stat-hours {
  color: var(--primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

.stat-won { color: var(--success); font-weight: 600; }
.stat-lost { color: var(--error); font-weight: 600; }

.loss-reason-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: hsla(0, 75%, 60%, 0.15);
  color: var(--error);
  border: 1px solid hsla(0, 75%, 60%, 0.3);
  margin: 2px;
  white-space: nowrap;
}