/* Gantt View Styles */

.gantt-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.gantt-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.8);
}

.gantt-filter-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gantt-select {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: #f8fafc;
  cursor: pointer;
  font-family: "Outfit", sans-serif;
}

.gantt-btn {
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.gantt-btn:hover {
  background: rgba(99, 102, 241, 0.2);
}

/* Grid Wrapper */
.gantt-grid-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
}

.gantt-table {
  width: 100%;
  border-collapse: separate; /* Required for sticky */
  border-spacing: 0;
  min-width: 800px;
}

.gantt-table th,
.gantt-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.gantt-table th {
  background: rgba(30, 41, 59, 1);
  position: sticky;
  top: 0;
  z-index: 10;
  font-weight: 600;
  color: #94a3b8;
  height: 60px;
  z-index: 99;
}

/* Sticky First Column (Card Column) */
.gantt-table th:first-child,
.gantt-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 20;
  background: rgba(30, 41, 59, 1);
  text-align: left;
  min-width: 300px;
  width: 300px;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid #3b82f6;
  vertical-align: top !important;
}

.gantt-table th:first-child {
  z-index: 30;
  padding: 1rem !important;
}

/* --- Row Alignments --- */

.gantt-member-row td {
  vertical-align: middle;
}

/* Status Icons */
.gantt-status-cell {
  cursor: pointer;
  transition: background 0.1s;
  user-select: none;
}
.gantt-status-cell:hover {
  background: rgba(255, 255, 255, 0.05);
}

.status-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.status-warning {
  color: #f59e0b;
}
.status-check {
  color: #22c55e;
}
.status-error {
  color: #ef4444;
}

/* System Labels (reused from main css logic) */
.system-label {
  border-radius: 4px;
  font-weight: 500;
}
.label-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}
.label-green {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}
.label-purple {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}
.label-orange {
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
}
.label-pink {
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
}
.label-red {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* Status Counter Bar */
.gantt-status-counters {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.gantt-counter-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
  transition: all 0.2s;
}

.gantt-counter-badge .gantt-counter-icon {
  font-size: 0.9rem;
}

.gantt-counter-badge .gantt-counter-label {
  opacity: 0.85;
}

.gantt-counter-badge .gantt-counter-value {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 1.2rem;
  text-align: center;
}

.gantt-counter-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.gantt-counter-check {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.gantt-counter-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
