:root {
  --bg: #0f172a;
  --card: rgba(30, 41, 59, 0.7);
  --border: rgba(100, 116, 139, 0.2);
  --indigo: #6366f1;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
}

/* Glass Effects */
.glass-header {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.glass-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* Inputs */
.input-dark {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  transition: border-color 0.2s;
}
.input-dark:focus {
  border-color: var(--indigo);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.input-dark::placeholder { color: #64748b; }

/* Buttons */
.btn-primary {
  background: var(--indigo);
  transition: all 0.15s;
}
.btn-primary:hover { background: #4f46e5; }

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.15s;
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.1); color: #e2e8f0; }

/* Project Card */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.project-card .accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.project-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.project-card .card-desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #64748b;
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--indigo), #818cf8);
  transition: width 0.4s ease;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-locked { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-paused { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge-bmm { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

/* Lock icon */
.lock-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Task Item */
.task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.task-item:hover { background: rgba(30, 41, 59, 0.8); }

.task-checkbox {
  appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid #475569;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.task-checkbox:checked {
  background: var(--indigo);
  border-color: var(--indigo);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.task-text { flex: 1; font-size: 0.875rem; color: #e2e8f0; }
.task-text.done { text-decoration: line-through; color: #64748b; }

.task-delete {
  opacity: 0;
  color: #ef4444;
  cursor: pointer;
  transition: opacity 0.15s;
  font-size: 0.75rem;
}
.task-item:hover .task-delete { opacity: 0.6; }
.task-delete:hover { opacity: 1 !important; }

/* Next actions */
.next-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  padding: 0.25rem 0;
}
.next-action .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-todo { background: #475569; }
.dot-in-progress { background: #6366f1; }
.dot-drafted { background: #f59e0b; }
.dot-ready { background: #06b6d4; }

/* Color Picker */
.color-dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.color-dot:hover, .color-dot.active {
  border-color: white;
  transform: scale(1.15);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.375rem;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 999px;
  transition: 0.3s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  height: 1rem;
  width: 1rem;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .toggle-slider { background: var(--indigo); }
input:checked + .toggle-slider:before { transform: translateX(1.1rem); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Source label */
.source-tag {
  font-size: 0.625rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.source-custom { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.source-bmm { background: rgba(16, 185, 129, 0.12); color: #34d399; }

/* Sub-project item */
.sub-project-item {
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0.5rem;
  margin-top: 0.375rem;
  transition: background 0.15s;
}
.sub-project-item:hover { background: rgba(15, 23, 42, 0.8); }

/* Filter buttons */
.filter-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: transparent;
  color: #64748b;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { color: #e2e8f0; }
.filter-btn.active { color: #e2e8f0; background: rgba(99, 102, 241, 0.15); border-color: rgba(99, 102, 241, 0.3); }

/* Responsive */
@media (max-width: 640px) {
  .project-card { padding: 1rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
