:root {
  --bg: #050608;
  --bg-alt: #0b0f17;
  --panel: #0f172a;
  --accent: #3ef89a;
  --accent-soft: rgba(62, 248, 154, 0.2);
  --danger: #ff4b81;
  --text-main: #e5e7eb;
  --text-dim: #6b7280;
  --border-subtle: #1f2933;
  --shadow-neon: 0 0 15px rgba(62, 248, 154, 0.4);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Light theme */
html.theme-light {
  --bg: #f1f5f9;
  --bg-alt: #e2e8f0;
  --panel: #ffffff;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --text-main: #1e293b;
  --text-dim: #64748b;
  --border-subtle: #cbd5e1;
  --shadow-neon: 0 0 12px rgba(16, 185, 129, 0.3);
}

html.theme-light body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

html.theme-light body::before {
  background:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.01) 1px, transparent 1px);
  opacity: 0.5;
}

html.theme-light .sidebar {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

html.theme-light .main {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

html.theme-light .column {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border-color: #e2e8f0;
}

html.theme-light .task-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

html.theme-light .task-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

html.theme-light .btn {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.theme-light .btn-primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), #ffffff);
  border-color: var(--accent);
}

html.theme-light .btn-danger {
  border-color: #f87171;
  color: #dc2626;
}

html.theme-light .btn-danger:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: #dc2626;
}

html.theme-light .modal-panel {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

html.theme-light .input,
html.theme-light .textarea,
html.theme-light .select {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.theme-light .calendar-view-day {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.theme-light .calendar-day-detail {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.theme-light .resizer-line,
html.theme-light .column-resizer-line {
  background: #cbd5e1;
}

html.theme-light .scanline {
  display: none;
}

/* Light theme - Project items */
html.theme-light .project-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.theme-light .project-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

html.theme-light .project-item.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

html.theme-light .project-item.dragging {
  opacity: 0.5;
  background: #e2e8f0;
}

html.theme-light .project-item.drag-over {
  border-color: var(--accent);
  border-style: dashed;
  background: rgba(16, 185, 129, 0.1);
}

/* Light theme - Search box */
html.theme-light .search-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* Light theme - Column count */
html.theme-light .column-count {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* Light theme - Priority badges (stronger colors) */
html.theme-light .priority-high {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.3);
}

html.theme-light .priority-medium {
  border-color: #d97706;
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

html.theme-light .priority-low {
  border-color: #059669;
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

/* Light theme - Calendar detail tasks */
html.theme-light .calendar-detail-task {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.theme-light .calendar-detail-task:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Light theme - Calendar priority dots */
html.theme-light .calendar-detail-task-priority.high {
  background: #dc2626;
}

html.theme-light .calendar-detail-task-priority.medium {
  background: #d97706;
}

html.theme-light .calendar-detail-task-priority.low {
  background: #059669;
}

/* Light theme - Calendar status badges */
html.theme-light .calendar-detail-task-status.backlog {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

html.theme-light .calendar-detail-task-status.in_progress {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
}

html.theme-light .calendar-detail-task-status.done {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* Light theme - Calendar month view task items */
html.theme-light .calendar-view-task-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
}

html.theme-light .calendar-view-task-item.high {
  border-left: 2px solid #dc2626;
}

html.theme-light .calendar-view-task-item.medium {
  border-left: 2px solid #d97706;
}

html.theme-light .calendar-view-task-item.low {
  border-left: 2px solid #059669;
}

/* Light theme - Calendar today highlight */
html.theme-light .calendar-view-day.today {
  background: rgba(16, 185, 129, 0.06);
}

html.theme-light .calendar-view-day.selected {
  background: rgba(16, 185, 129, 0.1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
  color: var(--text-main);
  overflow: hidden;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 2px, 3px 100%;
  mix-blend-mode: soft-light;
  opacity: 0.25;
  z-index: -1;
}

.app {
  display: flex;
  height: 100vh;
  width: 100vw;
  padding: 10px;
  gap: 0;
}

.sidebar {
  width: 260px;
  min-width: 180px;
  max-width: 400px;
  background: linear-gradient(145deg, #020617, #020617 40%, #020617 60%, #0b1220);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 0 0 1px rgba(15,23,42,0.8), 0 0 40px rgba(15,23,42,0.8);
  display: flex;
  flex-direction: column;
  padding: 14px 14px 10px;
  position: relative;
  flex-shrink: 0;
}

/* Resizer styles */
.resizer {
  width: 10px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resizer:hover .resizer-line,
.resizer.active .resizer-line {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(62, 248, 154, 0.5);
}

.resizer-line {
  width: 2px;
  height: 40px;
  background: rgba(148,163,184,0.3);
  border-radius: 2px;
  transition: all 0.15s ease-out;
}

.column-resizer {
  width: 12px;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 5;
}

.column-resizer:hover .column-resizer-line,
.column-resizer.active .column-resizer-line {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(62, 248, 154, 0.5);
}

.column-resizer-line {
  width: 2px;
  height: 40px;
  background: rgba(148,163,184,0.3);
  border-radius: 2px;
  transition: all 0.15s ease-out;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
}

.logo-badge {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin: 12px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: color 0.12s ease-out;
}

.sidebar-section-title:hover {
  color: var(--text-main);
}

.section-arrow {
  font-size: 10px;
  transition: transform 0.2s ease-out;
}

.section-arrow.collapsed {
  transform: rotate(-90deg);
}

.project-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out;
}

.project-list.collapsed {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s ease-out;
}

.project-item:hover {
  background: rgba(15,23,42,0.9);
  border-color: rgba(148,163,184,0.4);
}

.project-item.active {
  background: linear-gradient(135deg, rgba(62,248,154,0.16), rgba(15,23,42,0.95));
  border-color: var(--accent);
  box-shadow: var(--shadow-neon);
}

.project-item.dragging {
  opacity: 0.5;
  background: var(--bg-hover);
}

.project-item.drag-over {
  border-color: var(--accent);
  border-style: dashed;
  background: rgba(62,248,154,0.1);
}

.project-item.completed {
  opacity: 0.6;
}

.project-item.completed .project-name {
  text-decoration: line-through;
  color: var(--text-dim);
}

.project-name {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.project-delete-btn {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 10px;
  border-radius: 4px;
  transition: all 0.12s ease-out;
}

.project-item:hover .project-delete-btn {
  opacity: 1;
}

.project-delete-btn:hover {
  color: var(--danger);
  background: rgba(255, 75, 129, 0.15);
}

/* Project Groups */
.project-group {
  margin-bottom: 8px;
}

.project-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.12s ease-out;
  user-select: none;
}

.project-group-header:hover {
  background: rgba(148,163,184,0.1);
  color: var(--text-main);
}

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

.project-group-arrow {
  font-size: 8px;
  transition: transform 0.2s ease-out;
}

.project-group-arrow.collapsed {
  transform: rotate(-90deg);
}

.project-group-name {
  font-weight: 500;
}

.project-group-count {
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
}

.project-group-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.12s ease-out;
}

.project-group-header:hover .project-group-actions {
  opacity: 1;
}

.project-group-action-btn {
  padding: 2px 4px;
  font-size: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.12s ease-out;
}

.project-group-action-btn:hover {
  color: var(--accent);
  background: rgba(148,163,184,0.15);
}

.project-group-action-btn.delete:hover {
  color: var(--danger);
  background: rgba(255, 75, 129, 0.15);
}

.project-group-items {
  padding-left: 8px;
  overflow: hidden;
  transition: max-height 0.2s ease-out, opacity 0.15s ease-out;
}

.project-group-items.collapsed {
  max-height: 0 !important;
  opacity: 0;
}

.project-group-items .project-item {
  margin-left: 8px;
  border-left: 2px solid rgba(148,163,184,0.2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.project-group-items .project-item.active {
  border-left-color: var(--accent);
}

/* Light theme groups */
html.theme-light .project-group-header:hover {
  background: rgba(0,0,0,0.04);
}

html.theme-light .project-group-items .project-item {
  border-left-color: #e2e8f0;
}

html.theme-light .project-group-items .project-item.active {
  border-left-color: var(--accent);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  margin-left: auto;
  margin-right: 4px;
}

.pill {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
}

.btn {
  border: 1px solid rgba(148,163,184,0.6);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 6px 9px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.12s ease-out;
  outline: none;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-neon);
  transform: translateY(-0.5px);
}

.btn-primary {
  border-color: var(--accent);
  background: radial-gradient(circle at top, rgba(62,248,154,0.2) 0, #020617 50%);
  color: var(--accent);
  box-shadow: var(--shadow-neon);
}

.btn-ghost {
  border-style: dashed;
  border-color: rgba(148,163,184,0.7);
  background: transparent;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(15,23,42,0.9);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.shortcuts-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease-out;
}

.shortcuts-link:hover {
  color: var(--accent);
}

.privacy-hint {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
}

.privacy-hint a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.12s;
}

.privacy-hint a:hover {
  color: var(--accent);
}

.feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(62, 248, 154, 0.08);
  border: 1px solid rgba(62, 248, 154, 0.25);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feedback-btn:hover {
  background: rgba(62, 248, 154, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(62, 248, 154, 0.3);
}

.privacy-notice {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(62, 248, 154, 0.05);
  border: 1px solid rgba(62, 248, 154, 0.2);
  border-radius: var(--radius-md);
}

.privacy-notice-icon {
  font-size: 18px;
}

.privacy-notice-text {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.privacy-notice-text strong {
  color: var(--text-main);
}

html.theme-light .privacy-notice {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.verify-section {
  margin-top: 12px;
}

.verify-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.verify-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.verify-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

.verify-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  background: rgba(62, 248, 154, 0.15);
  color: var(--accent);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
}

html.theme-light .verify-step-num {
  background: rgba(16, 185, 129, 0.15);
}

.verify-step strong {
  color: var(--text-main);
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.12s;
}

.github-link:hover {
  color: var(--accent);
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 13px;
  color: var(--text-dim);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-out;
  border-radius: 6px;
}

.settings-btn:hover {
  color: var(--accent);
  border-color: rgba(148,163,184,0.3);
  background: rgba(148,163,184,0.1);
}

/* Settings modal specific styles */
.settings-section {
  margin-bottom: 16px;
}

.settings-section:last-child {
  margin-bottom: 0;
}

.settings-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148,163,184,0.3);
  margin-bottom: 8px;
  transition: all 0.12s ease-out;
}

.settings-option:hover {
  border-color: rgba(148,163,184,0.5);
}

.settings-option:last-child {
  margin-bottom: 0;
}

.settings-option-label {
  font-size: 12px;
  color: var(--text-main);
}

.settings-option-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

.theme-switcher {
  display: flex;
  gap: 6px;
}

.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease-out;
}

.theme-btn:hover {
  transform: scale(1.1);
}

.theme-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(62, 248, 154, 0.4);
}

.theme-btn-dark {
  background: linear-gradient(135deg, #0f172a, #020617);
}

.theme-btn-light {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.trash-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease-out;
}

.trash-btn:hover {
  color: var(--accent);
}

.trash-btn-count {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(31,41,55,0.9);
  color: var(--text-dim);
}

html.theme-light .trash-btn {
  color: #64748b;
}

html.theme-light .trash-btn-count {
  background: #e2e8f0;
  color: #475569;
}

/* Trash styles */
.trash-empty {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 4px 0;
}

.trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-size: 12px;
  border: 1px solid transparent;
  transition: all 0.12s ease-out;
}

.trash-item:hover {
  background: rgba(15,23,42,0.9);
  border-color: rgba(148,163,184,0.4);
}

.trash-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  flex: 1;
}

.trash-item-type {
  padding: 1px 5px;
  border-radius: 3px;
  border: none;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.6;
}

.trash-item-type.type-task {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.trash-item-type.type-project {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

html.theme-light .trash-item-type.type-task {
  background: rgba(251, 191, 36, 0.15);
  color: #d97706;
}

html.theme-light .trash-item-type.type-project {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.trash-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  color: var(--text-main);
  font-weight: 500;
}

html.theme-light .trash-item-name {
  color: #1e293b;
}

.trash-item-days {
  font-size: 10px;
  color: var(--text-dim);
  margin-right: 4px;
}

html.theme-light .trash-item-days {
  color: #64748b;
}

.trash-delete-btn {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 10px;
  transition: all 0.12s ease-out;
}

.trash-restore-btn {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 10px;
  transition: all 0.12s ease-out;
}

.trash-item:hover .trash-delete-btn,
.trash-item:hover .trash-restore-btn {
  opacity: 1;
}

.trash-restore-btn:hover {
  color: var(--accent);
}

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

.trash-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.empty-trash-btn {
  font-size: 9px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.7;
  transition: all 0.12s ease-out;
}

.empty-trash-btn:hover {
  color: var(--danger);
  opacity: 1;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-bar {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(31,41,55,0.9);
  overflow: hidden;
  margin-top: 4px;
}

.metric-bar-fill {
  position: absolute;
  inset: 0;
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), #22c55e, #22d3ee);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(30,64,175,0.8);
  box-shadow: 0 0 0 1px rgba(15,23,42,0.9), 0 0 40px rgba(15,23,42,0.9);
  padding: 10px 12px 12px;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.scanline {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(15,23,42,0) 0,
    rgba(15,23,42,0) 2px,
    rgba(148,163,184,0.06) 2px,
    rgba(15,23,42,0) 3px
  );
  opacity: 0.25;
  mix-blend-mode: soft-light;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.project-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-title span {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-dim);
}

.status-badge {
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spacer {
  flex: 1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-md);
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(31,41,55,0.9);
  padding: 4px 6px;
  min-width: 280px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: inherit;
  font-size: 11px;
  flex: 1;
}

.search-box span {
  font-size: 10px;
  color: var(--text-dim);
}

.tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.kanban {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  gap: 0;
  overflow: hidden;
}

/* Empty state overlay */
.empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(4px);
  z-index: 10;
  gap: 12px;
}

.empty-state.hidden {
  display: none;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.empty-state-btn {
  padding: 10px 24px;
  font-size: 14px;
}

.empty-state-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.empty-state-hint kbd {
  background: #1e293b;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: inherit;
}

.column {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.98));
  border-radius: var(--radius-md);
  border: 1px solid rgba(30,64,175,0.8);
  padding: 8px;
  min-width: 120px;
  overflow: hidden;
  flex: 1;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-task-btn {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px dashed rgba(148,163,184,0.5);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease-out;
  padding: 0;
  line-height: 1;
}

.add-task-btn:hover {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
  background: rgba(62, 248, 154, 0.1);
}

.column-count {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(30,64,175,0.9);
  font-size: 10px;
  color: #9ca3af;
}

.task-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-card {
  background: radial-gradient(circle at top left, rgba(62,248,154,0.06), rgba(15,23,42,0.98));
  border-radius: var(--radius-md);
  border: 1px solid rgba(148,163,184,0.6);
  padding: 6px 7px;
  font-size: 11px;
  cursor: grab;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.7);
  transition: all 0.12s ease-out;
  position: relative;
}

.task-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-neon);
}

.task-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.task-card:hover .task-delete-btn {
  opacity: 1;
}

.task-delete-btn:hover {
  background: rgba(248, 113, 113, 0.3);
}

html.theme-light .task-delete-btn {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

html.theme-light .task-delete-btn:hover {
  background: rgba(220, 38, 38, 0.2);
}

.task-title {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 10px;
}

.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.task-priority {
  padding: 2px 5px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
}

.priority-high {
  border-color: var(--danger);
  color: #fecaca;
  box-shadow: 0 0 8px rgba(248,113,113,0.6);
}

.priority-medium {
  border-color: #fbbf24;
  color: #fef3c7;
}

.priority-low {
  border-color: #22c55e;
  color: #bbf7d0;
}

.task-date {
  font-size: 10px;
}

.task-description {
  margin-top: 2px;
  color: #9ca3af;
  font-size: 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.drop-highlight {
  outline: 1px dashed rgba(148,163,184,0.8);
  outline-offset: -4px;
  background: radial-gradient(circle at top, rgba(59,130,246,0.18), rgba(15,23,42,0.95));
}

/* Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-panel {
  width: 420px;
  max-width: 94vw;
  background: linear-gradient(145deg, #020617, #020617 40%, #020617 70%, #020617);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(62,248,154,0.4);
  box-shadow: var(--shadow-neon);
  padding: 12px 12px 10px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.modal-header span {
  font-size: 10px;
  color: var(--text-dim);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
}

.field-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.field {
  display: flex;
  flex-direction: column;
}

.input, .textarea, .select {
  border-radius: var(--radius-md);
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.96);
  padding: 6px 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 11px;
  outline: none;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-neon);
}

/* Date input calendar icon styling - move icon to left side */
input[type="date"] {
  position: relative;
  padding-left: 28px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
  padding: 4px;
  margin: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

html.theme-light input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.6;
}

html.theme-light input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 160px;
}

.modal-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-dim);
}

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

.btn-danger {
  border-color: rgba(248,113,113,0.7);
  color: #fecaca;
}

.btn-danger:hover {
  border-color: var(--danger);
  box-shadow: 0 0 12px rgba(248,113,113,0.9);
}

.hidden {
  display: none;
}

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

.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(31,41,55,0.5);
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-key {
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.8);
  color: var(--accent);
  font-size: 11px;
  font-family: inherit;
}

.shortcut-desc {
  color: var(--text-main);
  font-size: 11px;
}

.trash-modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.trash-modal-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 12px;
}

.trash-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31,41,55,0.7);
  background: rgba(15,23,42,0.6);
  transition: all 0.12s ease-out;
}

.trash-modal-item:hover {
  border-color: rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.9);
}

.trash-modal-item:hover .trash-restore-btn,
.trash-modal-item:hover .trash-delete-btn {
  opacity: 1;
}

html.theme-light .trash-modal-item {
  border-color: #e2e8f0;
  background: #f8fafc;
}

html.theme-light .trash-modal-item:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

/* Calendar styles */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav-btn {
  background: none;
  border: 1px solid rgba(148,163,184,0.4);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.12s ease-out;
}

.calendar-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-month-label {
  font-size: 13px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-weekday {
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 2px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: all 0.12s ease-out;
  min-height: 50px;
  overflow: hidden;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-day.today {
  border-color: var(--accent);
  background: rgba(62, 248, 154, 0.1);
}

.calendar-day.has-tasks {
  background: rgba(31,41,55,0.6);
}

.calendar-day-num {
  font-weight: 500;
  margin-bottom: 2px;
}

.calendar-day-tasks {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  overflow: hidden;
}

.calendar-task-dot {
  width: 100%;
  height: 3px;
  border-radius: 1px;
  background: var(--accent);
}

.calendar-task-dot.high {
  background: var(--danger);
}

.calendar-task-dot.medium {
  background: #fbbf24;
}

.calendar-task-dot.low {
  background: #60a5fa;
}

.calendar-legend {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 10px;
  color: var(--text-dim);
}

.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.calendar-day-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 11px;
  max-width: 200px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.calendar-day-tooltip-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
}

.calendar-day-tooltip-task {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  color: var(--text-dim);
}

.calendar-day-tooltip-task .priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Full Calendar View */
.calendar-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-view.hidden {
  display: none;
}

.calendar-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  margin-bottom: 8px;
}

.calendar-view-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-view-nav-btn {
  background: none;
  border: 1px solid rgba(148,163,184,0.4);
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.12s ease-out;
}

.calendar-view-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-view-month {
  font-size: 16px;
  font-weight: 600;
  min-width: 160px;
  text-align: center;
}

.calendar-view-today-btn {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid rgba(148,163,184,0.4);
  background: none;
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease-out;
}

.calendar-view-today-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-view-content {
  flex: 1;
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.calendar-view-grid-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.calendar-view-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  flex: 1;
}

.calendar-view-weekday {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.calendar-view-day {
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid rgba(31,41,55,0.5);
  background: rgba(15,23,42,0.3);
  cursor: pointer;
  transition: all 0.12s ease-out;
  overflow: hidden;
  min-height: 80px;
}

.calendar-view-day:hover {
  border-color: rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.6);
}

.calendar-view-day.other-month {
  opacity: 0.3;
}

.calendar-view-day.today {
  background: rgba(62, 248, 154, 0.05);
}

.calendar-view-day.today .calendar-view-day-num {
  position: relative;
}

.calendar-view-day.today .calendar-view-day-num::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-view-day.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(62, 248, 154, 0.3);
  background: rgba(62, 248, 154, 0.1);
}

.calendar-view-day-num {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  position: relative;
  display: inline-block;
}

.calendar-view-day-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}

.calendar-view-task-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 10px;
  background: rgba(31,41,55,0.8);
  overflow: hidden;
}

.calendar-view-task-item.high {
  border-left: 2px solid var(--danger);
}

.calendar-view-task-item.medium {
  border-left: 2px solid #fbbf24;
}

.calendar-view-task-item.low {
  border-left: 2px solid #60a5fa;
}

.calendar-view-task-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-view-more {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  padding: 2px 0;
}

/* Day Detail Panel */
.calendar-day-detail {
  width: 280px;
  flex-shrink: 0;
  border: 1px solid rgba(31,41,55,0.7);
  border-radius: var(--radius-md);
  background: rgba(15,23,42,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-day-detail.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
}

.calendar-day-detail-header {
  padding: 12px;
  border-bottom: 1px solid rgba(31,41,55,0.7);
  font-weight: 600;
  font-size: 13px;
}

.calendar-day-detail-date {
  color: var(--accent);
}

.calendar-day-detail-count {
  font-size: 11px;
  font-weight: normal;
  color: var(--text-dim);
  margin-left: 8px;
}

.calendar-day-detail-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.calendar-detail-task {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(31,41,55,0.7);
  background: rgba(15,23,42,0.6);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.12s ease-out;
}

.calendar-detail-task:hover {
  border-color: rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.9);
}

.calendar-detail-task:last-child {
  margin-bottom: 0;
}

.calendar-detail-task-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.calendar-detail-task-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-detail-task-priority.high {
  background: var(--danger);
}

.calendar-detail-task-priority.medium {
  background: #fbbf24;
}

.calendar-detail-task-priority.low {
  background: #60a5fa;
}

.calendar-detail-task-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-detail-task-project {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.calendar-detail-task-status {
  display: inline-block;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-detail-task-status.backlog {
  background: rgba(148,163,184,0.2);
  color: #94a3b8;
}

.calendar-detail-task-status.in_progress {
  background: rgba(251,191,36,0.2);
  color: #fbbf24;
}

.calendar-detail-task-status.done {
  background: rgba(62,248,154,0.2);
  color: var(--accent);
}

.calendar-view-legend {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  font-size: 10px;
  color: var(--text-dim);
}

.calendar-view-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-view-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

@media (max-width: 960px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: 170px;
    flex-shrink: 0;
  }
  .main {
    height: calc(100vh - 190px);
  }
}

@media (max-width: 720px) {
  .kanban {
    grid-template-columns: 1fr;
  }
}
