/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F5F6FA;
  --sidebar-bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ===== LAYOUT ===== */
.app {
  display: flex;
  height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 280px;
  min-width: 200px;
  max-width: 500px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-resizer {
  width: 5px;
  cursor: col-resize;
  background: transparent;
  flex-shrink: 0;
  transition: background 0.2s;
  position: relative;
  z-index: 10;
  margin-left: -3px;
}

.sidebar-resizer:hover,
.sidebar-resizer.active {
  background: var(--primary);
}

.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar-logo img {
  height: 36px;
  width: auto;
}

.sidebar-logo span {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.logo-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
}

.logo-subtitle {
  font-weight: 500;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.sidebar-section {
  padding: 16px 12px 8px;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 8px;
  padding: 0 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
  color: var(--text);
  position: relative;
}

.sidebar-item:hover { background: #F1F5F9; }
.sidebar-item.active { background: #EFF6FF; color: var(--primary); font-weight: 600; }
.sidebar-item.active .project-icon { color: var(--primary); }

.sidebar-project-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.project-icon {
  flex-shrink: 0;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-light);
}

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  transition: transform 0.2s;
  flex-shrink: 0;
  border-radius: 3px;
}

.tree-toggle:hover { color: var(--primary); }
.tree-toggle.expanded { transform: rotate(90deg); }

.tree-toggle-placeholder {
  width: 20px;
  flex-shrink: 0;
}

.sidebar-children {
  display: flex;
  flex-direction: column;
}

.sidebar-project-group {
  display: flex;
  flex-direction: column;
}

.sidebar-item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-item:hover .sidebar-item-actions { opacity: 1; }

.sidebar-item-action {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
}

.sidebar-item-action:hover { background: #E2E8F0; color: var(--primary); }

.inline-rename-input {
  flex: 1;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  min-width: 0;
}

.sidebar-item .task-count {
  margin-left: auto;
  background: var(--bg);
  color: var(--text-light);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-item.active .task-count {
  background: #DBEAFE;
  color: var(--primary);
}

.sidebar-actions {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  color: var(--text-light);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-action-btn:hover { background: #F1F5F9; color: var(--text); }

.add-project-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 4px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  transition: var(--transition);
}

.add-project-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FAFF;
}

/* ===== MAIN CONTENT ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.main-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.filter-select {
  padding: 6px 32px 6px 12px;
  font-size: 13px;
  border-radius: 20px;
  min-width: 110px;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
}

/* ===== TASK CARDS ===== */
.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.task-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.task-card-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-category {
  color: white;
}

.badge-status {
  border: 1px solid;
}

.badge-status.to-start { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.badge-status.ongoing { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; }
.badge-status.done { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }

.task-card-date {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-card-date.overdue { color: var(--danger); font-weight: 600; }

.task-card-preview {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 4px;
  max-height: 40px;
  overflow: hidden;
}

.task-card-actions {
  display: flex;
  gap: 6px;
}

.task-card-actions button {
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
}

.task-card-actions button:hover { background: #F1F5F9; color: var(--text); }
.task-card-actions button.delete:hover { color: var(--danger); }

/* ===== ADD TASK BUTTON ===== */
.add-task-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  width: 100%;
  margin-top: 8px;
}

.add-task-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FAFF;
}

/* ===== TASK FORM (INLINE FULL-WIDTH VIEW) ===== */
.task-form-view {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
}

.task-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.task-form-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.task-form-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 6px;
  transition: var(--transition);
}
.task-form-close:hover { background: #F1F5F9; color: var(--text); }

.task-form-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.task-form-body .form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.task-form-body .editor-content {
  min-height: 250px;
}

.task-form-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Dark mode */
body.dark-mode .task-form-view {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .task-form-header { border-bottom-color: #334155; }
body.dark-mode .task-form-header h2 { color: #E2E8F0; }
body.dark-mode .task-form-close { color: #64748B; }
body.dark-mode .task-form-close:hover { color: #E2E8F0; background: #334155; }
body.dark-mode .task-form-footer { border-top-color: #334155; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 8px;
  border-radius: 6px;
}

.modal-close:hover { background: #F1F5F9; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
  background: white;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group { flex: 1; }

/* ===== RICH TEXT EDITOR ===== */
.editor-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.editor-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: #F8FAFC;
  flex-wrap: wrap;
}

.editor-toolbar button {
  padding: 6px 10px;
  border: none;
  background: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.editor-toolbar button:hover { background: #E2E8F0; color: var(--text); }
.editor-toolbar button.active { background: var(--primary); color: white; }

.editor-toolbar .separator {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.editor-toolbar .import-md-btn {
  margin-left: auto;
  color: var(--primary);
  font-size: 12px;
}

.editor-toolbar .import-md-btn:hover { background: #EFF6FF; }

.editor-content {
  min-height: 200px;
  max-height: 400px;
  padding: 14px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}

.editor-content h1 { font-size: 24px; font-weight: 700; margin: 16px 0 8px; }
.editor-content h2 { font-size: 20px; font-weight: 700; margin: 14px 0 6px; }
.editor-content h3 { font-size: 17px; font-weight: 600; margin: 12px 0 6px; }
.editor-content h4 { font-size: 15px; font-weight: 600; margin: 10px 0 4px; }
.editor-content p { margin: 6px 0; }
.editor-content strong { font-weight: 700; }
.editor-content ul, .editor-content ol { padding-left: 24px; margin: 6px 0; }
.editor-content code { background: #F1F5F9; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.editor-content pre { background: #F1F5F9; padding: 12px; border-radius: 6px; overflow-x: auto; }
.editor-content blockquote { border-left: 3px solid var(--primary); padding-left: 14px; color: var(--text-light); margin: 8px 0; }

/* ===== CATEGORY MANAGER ===== */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
}

.category-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
}

.category-item input[type="text"] {
  flex: 1;
  border: none;
  font-size: 14px;
  color: var(--text);
  outline: none;
  background: transparent;
}

.category-item button {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.category-item button:hover { color: var(--danger); background: #FEF2F2; }

.category-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.category-main-row input[type="text"] {
  flex: 1;
  border: none;
  font-size: 14px;
  color: var(--text);
  outline: none;
  background: transparent;
}

.category-main-row .add-subcat-btn {
  font-size: 11px;
  color: var(--primary);
  white-space: nowrap;
  padding: 4px 8px;
}

.category-main-row .add-subcat-btn:hover {
  background: #EFF6FF;
  color: var(--primary-hover);
}

.subcategory-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.subcategory-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 20px;
  border-radius: 6px;
  background: #F8FAFC;
}

.subcategory-item .subcat-indent {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}

.subcategory-item input[type="text"] {
  flex: 1;
  border: none;
  font-size: 13px;
  color: var(--text);
  outline: none;
  background: transparent;
}

.subcategory-item button {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
}

.subcategory-item button:hover { color: var(--danger); background: #FEF2F2; }

.badge-subcategory {
  background: white;
  border: 1.5px solid;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.badge-project {
  background: #F1F5F9;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #F1F5F9; color: var(--text); }
.btn-secondary:hover { background: #E2E8F0; }
.btn-danger { background: #FEF2F2; color: var(--danger); }
.btn-danger:hover { background: #FEE2E2; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ===== STATUS DROPDOWN ===== */
.status-dropdown {
  position: relative;
  display: inline-block;
}

.status-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  min-width: 140px;
  padding: 4px;
  display: none;
}

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

.status-dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text);
}

.status-dropdown-menu button:hover { background: #F1F5F9; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 20px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ===== CONFIRM DIALOG ===== */
.confirm-msg {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

/* ===== SIDEBAR SEPARATOR ===== */
.sidebar-separator {
  height: 1px;
  background: var(--border);
  margin: 6px 12px;
}

/* ===== ALL PROJECTS VIEW ===== */
.project-card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.progress-ongoing {
  background: #F59E0B;
  z-index: 1;
}

.progress-fill.progress-done {
  background: var(--success);
  z-index: 2;
}

.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  min-width: 32px;
  text-align: right;
}

.project-card-children {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.project-child-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.project-child-badge:hover {
  background: #EFF6FF;
  border-color: var(--primary);
  color: var(--primary);
}

.project-child-badge small {
  color: var(--text-light);
  font-weight: 600;
}

/* ===== DASHBOARD ===== */
.dashboard {
  padding: 8px 0;
}

.dashboard-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.dashboard-counters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.counter-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.counter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  flex-shrink: 0;
}
.counter-icon svg { width: 28px; height: 28px; }

/* Icon color variants — Startup Radar style */
.counter-icon-sky { background: rgba(14,165,233,0.15); color: #0EA5E9; }
.counter-icon-emerald { background: rgba(16,185,129,0.15); color: #10B981; }
.counter-icon-blue { background: rgba(59,130,246,0.15); color: #3B82F6; }
.counter-icon-violet { background: rgba(139,92,246,0.15); color: #8B5CF6; }
.counter-icon-amber { background: rgba(245,158,11,0.15); color: #F59E0B; }
.counter-icon-red { background: rgba(239,68,68,0.15); color: #EF4444; }
.counter-icon-slate { background: rgba(148,163,184,0.15); color: #94A3B8; }

.counter-info { min-width: 0; }

.counter-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.counter-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 400;
  margin-top: 4px;
}

.counter-card.counter-clickable {
  cursor: pointer;
  transition: var(--transition);
}

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

.dashboard-period-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.dashboard-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-chart-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.dashboard-chart-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.dashboard-chart-card canvas {
  width: 100% !important;
  height: 250px !important;
}

.dashboard-chart-full {
  width: 100%;
}

.dashboard-chart-full canvas {
  height: 300px !important;
}

@media (max-width: 900px) {
  .dashboard-counters {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .dashboard-charts-row {
    grid-template-columns: 1fr;
  }
}

/* ===== SAVE ERROR TOAST ===== */
.save-error-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--danger);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ===== ATTACHMENTS ===== */
.attachments-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #FAFBFC;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
}

.attachment-item:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(59,130,246,0.1);
}

.attachment-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.attachment-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-size: 11px;
  color: var(--text-light);
}

.attachment-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.attachment-action-btn {
  padding: 4px 6px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-light);
  transition: var(--transition);
}

.attachment-action-btn:hover {
  background: #F1F5F9;
  color: var(--text);
}

.attachment-action-btn.delete:hover {
  color: var(--danger);
}

.attachment-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.attachment-hint {
  font-size: 11px;
  color: var(--text-light);
}

.attachment-save-hint {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  padding: 4px 0;
}

.task-card-attachments {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 2px;
}


/* ===== CARD INLINE ATTACHMENTS PANEL ===== */
.badge-attachments {
  cursor: pointer;
  transition: var(--transition);
  border-radius: 6px;
  padding: 2px 8px;
}

.badge-attachments:hover,
.badge-attachments.active {
  background: #EEF2FF;
  color: var(--primary);
}

.card-attachments-panel {
  margin-top: 8px;
  padding: 8px;
  background: #F8FAFC;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-att-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.card-att-item:hover {
  background: white;
}

.card-att-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.card-att-size {
  font-size: 11px;
  color: var(--text-light);
  flex-shrink: 0;
}

.card-att-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.card-att-actions button {
  padding: 2px 4px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-light);
  transition: var(--transition);
}

.card-att-actions button:hover {
  background: #E2E8F0;
  color: var(--text);
}

.card-att-actions button:last-child:hover {
  color: var(--danger);
}


/* ===== DEPENDENCY SECTION ===== */
.dependency-section {
  background: #F8FAFC;
  border-radius: 8px;
  padding: 12px;
}
.dep-group { margin-bottom: 12px; }
.dep-group:last-child { margin-bottom: 0; }
.dep-label {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}
.dep-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: white;
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 0.85rem;
}
.dep-done { color: #10B981; }
.dep-pending { color: #EA580C; }
.dep-reverse { color: #3B82F6; background: #EFF6FF; }
.dep-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  font-size: 0.9rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.dep-remove:hover { background: #FEE2E2; color: #DC2626; }
.dep-add-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.dep-add-row select { flex: 1; }
.dep-empty {
  color: #94A3B8;
  font-size: 0.82rem;
  font-style: italic;
}

/* ===== MOVE TASK ===== */
.move-current-project {
  font-size: 0.85rem;
  color: #64748B;
  margin: 4px 0 8px;
}
.move-current-project strong {
  color: var(--text);
}
.move-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.move-row select { flex: 1; }
body.dark-mode .move-current-project { color: #94A3B8; }
body.dark-mode .move-current-project strong { color: #E2E8F0; }

/* ===== PRIORITY BADGES ===== */
.badge-priority {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.badge-priority:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.badge-clickable { cursor: pointer; }

.priority-critical { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.priority-high { background: #FFF7ED; color: #EA580C; border: 1px solid #FED7AA; }
.priority-medium { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }
.priority-low { background: #EFF6FF; color: #3B82F6; border: 1px solid #BFDBFE; }

/* Priority dot in sidebar (computed, not clickable) */
.sidebar-priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 2px;
}
.sidebar-priority-dot.priority-critical { background: #DC2626; border: none; }
.sidebar-priority-dot.priority-high { background: #EA580C; border: none; }
.sidebar-priority-dot.priority-medium { background: #94A3B8; border: none; }
.sidebar-priority-dot.priority-low { background: #3B82F6; border: none; }

/* ===== BLOCKED TASK ===== */
.task-blocked { opacity: 0.75; border-left: 3px solid #DC2626; }
.badge-blocked {
  background: #FEF2F2;
  color: #DC2626;
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 6px;
}
.badge-blocks {
  background: #EFF6FF;
  color: #3B82F6;
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ===== UNBLOCKED TOAST ===== */
.unblocked-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10B981;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  animation: slideInToast 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

@keyframes slideInToast {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== BLOCKED COUNTER (dashboard) ===== */
/* counter-blocked styling via icon */

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 0;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 36px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}
.search-input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.search-input::placeholder { color: #94A3B8; }
.search-clear {
  position: absolute;
  right: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.search-clear:hover { color: #475569; background: #F1F5F9; }

/* ===== SEARCH HIGHLIGHT ===== */
.search-highlight {
  background: #FEF9C3;
  color: #92400E;
  border-radius: 2px;
  padding: 0 1px;
}


/* ===== SETTINGS PANEL ===== */
.settings-panel {
  position: fixed;
  bottom: 80px;
  left: 24px;
  width: 300px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2000;
  overflow: hidden;
  animation: settings-appear 0.2s ease;
}
@keyframes settings-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}
.settings-panel-header h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.settings-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #94A3B8;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.settings-close:hover { color: #475569; background: #F1F5F9; }
.settings-panel-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}
.settings-font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.settings-btn:hover { background: #EFF6FF; border-color: #3B82F6; color: #3B82F6; }
.settings-font-value {
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  min-width: 40px;
  text-align: center;
}

/* Toggle switch */
.settings-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
}
.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #CBD5E1;
  border-radius: 26px;
  transition: all 0.3s;
}
.settings-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.settings-toggle input:checked + .settings-toggle-slider {
  background: #3B82F6;
}
.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(22px);
}

/* ============================================================
   DARK MODE — Inspired by Startup Radar (slate-900 palette)
   ============================================================ */
body.dark-mode {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --text: #E2E8F0;
  --text-light: #94A3B8;
  --border: #334155;
  --primary: #38BDF8;
  --primary-light: #0EA5E9;
  background: #0F172A;
  color: #E2E8F0;
}

/* Sidebar */
body.dark-mode .sidebar {
  background: #1E293B;
  border-right-color: #334155;
}
body.dark-mode .sidebar-item:hover { background: #334155; }
body.dark-mode .sidebar-item.active { background: rgba(59, 130, 246, 0.2); color: #38BDF8; }
body.dark-mode .sidebar-item.active .project-icon { color: #38BDF8; }
body.dark-mode .sidebar-item.active .task-count { background: rgba(59, 130, 246, 0.15); color: #38BDF8; }
body.dark-mode .sidebar-item .task-count { background: #334155; color: #94A3B8; }
body.dark-mode .sidebar-section-title { color: #64748B; }
body.dark-mode .sidebar-actions { border-top-color: #334155; }
body.dark-mode .sidebar-action-btn { color: #94A3B8; }
body.dark-mode .sidebar-action-btn:hover { background: #334155; color: #E2E8F0; }
body.dark-mode .add-project-btn { border-color: #475569; color: #64748B; }
body.dark-mode .add-project-btn:hover { border-color: #38BDF8; color: #38BDF8; background: #334155; }
body.dark-mode .sidebar-resizer { background: #334155; }
body.dark-mode .sidebar-resizer:hover,
body.dark-mode .sidebar-resizer.dragging { background: #38BDF8; }

/* Inline rename */
body.dark-mode .inline-rename-input {
  background: #1E293B;
  border-color: #38BDF8;
  color: #E2E8F0;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
body.dark-mode .sidebar-item-action:hover { background: #334155; color: #38BDF8; }
body.dark-mode .tree-toggle { color: #64748B; }
body.dark-mode .tree-toggle:hover { color: #38BDF8; }

/* Main area */
body.dark-mode .main { background: #0F172A; }
body.dark-mode .main-header { border-bottom-color: #334155; background: transparent; }
body.dark-mode #projectTitle { color: #E2E8F0; }

/* Search bar */
body.dark-mode .search-input {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .search-input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
body.dark-mode .search-input::placeholder { color: #64748B; }
body.dark-mode .search-clear { color: #64748B; }
body.dark-mode .search-clear:hover { color: #E2E8F0; background: #334155; }
body.dark-mode .search-highlight { background: #854D0E; color: #FDE68A; }

/* Filters */
body.dark-mode .filters { background: transparent; }
body.dark-mode .filter-label { color: #94A3B8; }
body.dark-mode .filter-btn {
  background: #1E293B;
  border-color: #334155;
  color: #94A3B8;
}
body.dark-mode .filter-btn:hover { background: #334155; color: #E2E8F0; }
body.dark-mode .filter-btn.active {
  background: #0C4A6E;
  border-color: #38BDF8;
  color: #38BDF8;
}
body.dark-mode .filter-select,
body.dark-mode select.filter-select.form-input {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}

/* Task cards */
body.dark-mode .task-card {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .task-card:hover {
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.dark-mode .task-card-title { color: #E2E8F0; }
body.dark-mode .task-card-preview { color: #94A3B8; }
body.dark-mode .task-card-meta .badge { border-color: #475569; }
body.dark-mode .task-card-actions button { color: #64748B; }
body.dark-mode .task-card-actions button:hover { color: #38BDF8; background: #334155; }

/* Priority left border (keep colors vibrant) */
body.dark-mode .task-card { border-left-width: 3px; }

/* Badges */
body.dark-mode .badge {
  background: #334155;
  color: #94A3B8;
  border-color: #475569;
}
body.dark-mode .badge-priority.priority-critical { background: #7F1D1D; color: #FCA5A5; border-color: #991B1B; }
body.dark-mode .badge-priority.priority-high { background: #7C2D12; color: #FDBA74; border-color: #9A3412; }
body.dark-mode .badge-priority.priority-medium { background: #334155; color: #CBD5E1; border-color: #475569; }
body.dark-mode .badge-priority.priority-low { background: #0C4A6E; color: #7DD3FC; border-color: #075985; }
body.dark-mode .badge-status.to-start { background: #1E293B; color: #94A3B8; border-color: #334155; }
body.dark-mode .badge-status.ongoing { background: #1E3A5F; color: #38BDF8; border-color: #0C4A6E; }
body.dark-mode .badge-status.done { background: #14532D; color: #86EFAC; border-color: #166534; }
body.dark-mode .badge-project { background: #1E293B; color: #94A3B8; border-color: #334155; }
body.dark-mode .badge-category { color: white !important; }
body.dark-mode .badge-subcategory {
  background: transparent !important;
  color: #E2E8F0 !important;
  border-width: 1.5px;
}

/* Buttons */
body.dark-mode .btn { border-color: #334155; }
body.dark-mode .btn-primary { background: #0EA5E9; border-color: #0EA5E9; color: white; }
body.dark-mode .btn-primary:hover { background: #0284C7; }
body.dark-mode .btn-secondary { background: #1E293B; border-color: #334155; color: #E2E8F0; }
body.dark-mode .btn-secondary:hover { background: #334155; }
body.dark-mode .btn-danger { background: #7F1D1D; border-color: #991B1B; color: #FCA5A5; }
body.dark-mode .btn-danger:hover { background: #991B1B; }

/* Add task button */
body.dark-mode .add-task-btn {
  background: #1E293B;
  border-color: #334155;
  color: #64748B;
}
body.dark-mode .add-task-btn:hover {
  border-color: #38BDF8;
  color: #38BDF8;
  background: #0F172A;
}

/* Modals */
body.dark-mode .modal-backdrop { background: rgba(0,0,0,0.6); }
body.dark-mode .modal {
  background: #1E293B;
  border: 1px solid #334155;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
body.dark-mode .modal-header { border-bottom-color: #334155; }
body.dark-mode .modal-header h2 { color: #E2E8F0; }
body.dark-mode .modal-close { color: #64748B; }
body.dark-mode .modal-close:hover { color: #E2E8F0; background: #334155; }
body.dark-mode .form-label { color: #94A3B8; }
body.dark-mode .form-input,
body.dark-mode textarea.form-input {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .form-input:focus,
body.dark-mode textarea.form-input:focus {
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

/* Editor toolbar */
body.dark-mode .editor-toolbar { background: #0F172A; border-color: #334155; }
body.dark-mode .editor-toolbar button { color: #94A3B8; }
body.dark-mode .editor-toolbar button:hover { background: #334155; color: #E2E8F0; }
body.dark-mode .editor-toolbar button.active { background: #0C4A6E; color: #38BDF8; }

/* Confirm dialog */
body.dark-mode .confirm-dialog { background: #1E293B; border: 1px solid #334155; }
body.dark-mode .confirm-dialog p { color: #E2E8F0; }

/* Toasts */
body.dark-mode .save-error-toast { background: #7F1D1D; color: #FCA5A5; }

/* Dashboard */
body.dark-mode .dashboard-counters .counter-card {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .counter-value { color: #F1F5F9; }
body.dark-mode .counter-label { color: #94A3B8; }
body.dark-mode .counter-icon-sky { background: rgba(14,165,233,0.2); color: #38BDF8; }
body.dark-mode .counter-icon-emerald { background: rgba(16,185,129,0.2); color: #34D399; }
body.dark-mode .counter-icon-blue { background: rgba(59,130,246,0.2); color: #60A5FA; }
body.dark-mode .counter-icon-violet { background: rgba(139,92,246,0.2); color: #A78BFA; }
body.dark-mode .counter-icon-amber { background: rgba(245,158,11,0.2); color: #FBBF24; }
body.dark-mode .counter-icon-red { background: rgba(239,68,68,0.2); color: #F87171; }
body.dark-mode .counter-icon-slate { background: rgba(148,163,184,0.2); color: #CBD5E1; }
body.dark-mode .counter-card.counter-clickable:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
body.dark-mode .dashboard-section h3 { color: #E2E8F0; }
body.dark-mode .dashboard-chart-card {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .dashboard-chart-card h3 { color: #FFFFFF; }
body.dark-mode .chart-container {
  background: #1E293B;
  border-color: #334155;
}

/* Project cards (all projects view) */
body.dark-mode .project-card {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .project-card:hover {
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
body.dark-mode .project-card h3 { color: #E2E8F0; }
body.dark-mode .project-child-badge {
  background: #0F172A;
  color: #94A3B8;
}
body.dark-mode .project-child-badge:hover { background: #334155; color: #38BDF8; }

/* Category manager */
body.dark-mode .category-item {
  background: #0F172A;
  border-color: #334155;
}
body.dark-mode .category-item:hover { background: #1E293B; }
body.dark-mode .subcategory-item { background: #0F172A; border-color: #334155; }

/* Attachments */
body.dark-mode .attachment-item {
  background: #0F172A;
  border-color: #334155;
  color: #94A3B8;
}
body.dark-mode .attachment-item:hover { background: #1E293B; }

/* Dependencies */
body.dark-mode .dependency-item { background: #0F172A; border-color: #334155; color: #94A3B8; }

/* Empty state */
body.dark-mode .empty-state-icon { color: #334155; }
body.dark-mode .empty-state h3 { color: #94A3B8; }
body.dark-mode .empty-state p { color: #64748B; }

/* Scrollbar */
body.dark-mode ::-webkit-scrollbar-track { background: #0F172A; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #334155; }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Progress bars */
body.dark-mode .project-progress-bg { background: #334155; }

/* Settings panel in dark mode */
body.dark-mode .settings-panel {
  background: #1E293B;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
body.dark-mode .settings-panel-header { border-bottom-color: #334155; }
body.dark-mode .settings-panel-header h3 { color: #E2E8F0; }
body.dark-mode .settings-close { color: #64748B; }
body.dark-mode .settings-close:hover { color: #E2E8F0; background: #334155; }
body.dark-mode .settings-label { color: #CBD5E1; }
body.dark-mode .settings-btn {
  background: #0F172A;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .settings-btn:hover { background: #334155; border-color: #38BDF8; color: #38BDF8; }
body.dark-mode .settings-font-value { color: #94A3B8; }
body.dark-mode .settings-toggle-slider { background: #475569; }

/* Logo area */
body.dark-mode .sidebar-logo { border-bottom-color: #334155; }
body.dark-mode .sidebar-logo img { filter: brightness(0) invert(1); }
body.dark-mode .sidebar-brand { color: #E2E8F0; }
body.dark-mode .sidebar-brand small { color: #64748B; }
