/* Custom additions for Task Project Tracker */
:root {
  --status-done-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --status-done-glow: 0 0 16px rgba(16, 185, 129, 0.35);
  --status-progress-bg: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --status-progress-glow: 0 0 16px rgba(245, 158, 11, 0.35);
  --status-waiting-bg: rgba(148, 163, 184, 0.15);
  --status-waiting-border: rgba(148, 163, 184, 0.3);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.badge-status.badge-done {
  background: var(--status-done-bg);
  color: #ffffff;
  box-shadow: var(--status-done-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-status.badge-progress {
  background: var(--status-progress-bg);
  color: #ffffff;
  box-shadow: var(--status-progress-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-status.badge-waiting {
  background: var(--status-waiting-bg);
  color: #94a3b8;
  border: 1px solid var(--status-waiting-border);
}

/* Pulsing Dots */
.live-dot {
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-live 1.8s infinite;
}

@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Project Status Toggle */
.btn-toggle-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-toggle-status.is-open {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.btn-toggle-status.is-open:hover {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-toggle-status.is-closed {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.btn-toggle-status.is-closed:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Roadmap Spreadsheet Table */
.roadmap-table-container {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
}

.roadmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.roadmap-table thead th {
  background: #1F3864; /* Navy dark blue from user reference */
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}
.roadmap-table thead th:last-child {
  border-right: none;
}

.roadmap-table tbody td {
  padding: 0.8rem 0.75rem;
  font-size: 0.85rem;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  background: transparent;
  transition: background 0.15s ease;
}
.roadmap-table tbody td:last-child {
  border-right: none;
}

.roadmap-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Parent Task Row Header in Table */
.parent-task-cell {
  background: rgba(30, 41, 59, 0.45) !important;
  font-weight: 700;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Progress bar glowing styling */
.progress-roadmap {
  height: 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.progress-roadmap .progress-bar {
  background: linear-gradient(90deg, #6372FF 0%, #10b981 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Cards View */
.mobile-task-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.85rem;
}

.mobile-task-card .task-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.mobile-subtask-item {
  padding: 0.65rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Stat Widgets */
.stat-widget {
  background: rgba(22, 27, 46, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-widget:hover {
  border-color: rgba(99, 114, 255, 0.3);
  transform: translateY(-2px);
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header, .no-print, .btn, .header-actions {
    display: none !important;
  }
  .glass-card, .stat-widget, .roadmap-table-container {
    background: #ffffff !important;
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
  .roadmap-table thead th {
    background: #1F3864 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .roadmap-table tbody td {
    color: #000000 !important;
    border: 1px solid #ddd !important;
  }
  .badge-status.badge-done {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #059669 !important;
    -webkit-print-color-adjust: exact;
  }
  .badge-status.badge-progress {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #d97706 !important;
    -webkit-print-color-adjust: exact;
  }
  .badge-status.badge-waiting {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #94a3b8 !important;
    -webkit-print-color-adjust: exact;
  }
}
