/* Quick Add Card with Inline Toolbar */
.quick-add-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.quick-add-wrap:focus-within {
  border-color: rgba(0, 255, 135, 0.65);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.quick-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-add-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}
.quick-add-input::placeholder { color: var(--text-muted); }

.quick-add-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-hairline);
  flex-wrap: wrap;
}

.qa-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .12s ease;
}
.qa-pill:hover, .qa-pill.active {
  border-color: var(--accent-neon);
  color: var(--accent-neon);
  background: var(--accent-dim);
}

.nlp-chip {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent-neon);
  border: 1px solid rgba(0, 255, 135, 0.3);
}

/* TickTick-Style Collapsible Grouped Task Cards */
.task-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.task-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.015);
}
.task-group-header.overdue { color: var(--prio-high); }

.group-count-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
  transition: background .12s ease;
  position: relative;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--bg-hover); }
.task-row.selected {
  background: rgba(0, 255, 135, 0.07);
  box-shadow: inset 3px 0 0 var(--accent-neon);
}
html[dir="rtl"] .task-row.selected {
  box-shadow: inset -3px 0 0 var(--accent-neon);
}
.task-row.done { opacity: 0.48; }
.task-row.done .task-title { text-decoration: line-through; color: var(--text-muted); }

/* Priority Rounded Checkbox */
.prio-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.8px solid var(--prio-none);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #050507;
  font-size: 11px;
  font-weight: 700;
  transition: all .14s ease;
  padding: 0;
}
.prio-check:hover { transform: scale(1.08); }
.prio-check.p5 { border-color: var(--prio-high); background: rgba(255, 71, 87, 0.08); }
.prio-check.p3 { border-color: var(--prio-med); background: rgba(255, 184, 0, 0.08); }
.prio-check.p1 { border-color: var(--prio-low); background: rgba(0, 210, 255, 0.08); }
.prio-check.checked {
  background: var(--accent-neon) !important;
  border-color: var(--accent-neon) !important;
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.35);
}

.task-main { flex: 1; min-width: 0; }
.task-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-submeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.task-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.task-date-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.task-date-label.today { color: var(--accent-neon); }
.task-date-label.overdue { color: var(--prio-high); }

.task-hover-btn {
  opacity: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .12s ease;
}
.task-row:hover .task-hover-btn { opacity: 1; }
.task-hover-btn:hover { color: var(--accent-neon); border-color: var(--accent-neon); }

.tag-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-hairline);
}

.mini-progress {
  width: 44px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}
.mini-progress > div { height: 100%; background: var(--accent-neon); }

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 24px;
  min-height: 65vh;
}
.kanban-col {
  width: 288px;
  min-width: 288px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-col.drag-over {
  border-color: var(--accent-neon);
  background: rgba(0, 255, 135, 0.05);
}
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 4px 10px;
  border-bottom: 1px solid var(--border-hairline);
}
.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color .12s ease;
}
.kanban-card:hover { border-color: rgba(0, 255, 135, 0.45); }

/* Detail Inspector */
.detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 14px;
}
.detail-title-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  margin-bottom: 10px;
}
.detail-notes {
  width: 100%;
  min-height: 96px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 12px;
  font-size: 13.5px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 16px;
}
.detail-notes:focus { outline: none; border-color: rgba(0, 255, 135, 0.5); }

.detail-section { margin-bottom: 16px; }
.detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
}

.progress-bar-track {
  width: 100%;
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-neon), var(--accent-lime));
  transition: width .2s ease;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  margin-bottom: 5px;
  font-size: 13px;
}
.checklist-row.done span { text-decoration: line-through; color: var(--text-muted); }

/* Shared Buttons, Inputs, Modals & Toast */
.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .12s ease;
}
.icon-btn:hover { border-color: rgba(0, 255, 135, 0.5); color: var(--text-primary); }
.icon-btn.active { background: var(--accent-dim); border-color: var(--accent-neon); color: var(--accent-neon); }
.icon-btn.danger:hover { border-color: var(--prio-high); color: var(--prio-high); }

.small-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.small-input:focus { outline: none; border-color: var(--accent-neon); }

.btn-neon {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00FF87, #65FA03);
  color: #050507;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 18px rgba(0, 255, 135, 0.25);
  transition: transform .12s ease, filter .12s ease;
}
.btn-neon:hover { filter: brightness(1.06); transform: translateY(-1px); }

.undo-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--accent-neon);
  color: var(--text-primary);
  padding: 9px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
  z-index: 95;
  font-size: 13px;
}
.undo-toast button {
  background: var(--accent-neon);
  color: #050507;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 85;
  padding: 16px;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.modal-card h3 { margin: 0 0 16px; color: var(--accent-neon); font-size: 17px; }

.auth-shell { max-width: 440px; margin: 56px auto; padding: 18px; }
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}
