/* Custom styles for Collaborative Pomodoro Timer */

/* Timer-specific styles */
.timer-display {
  font-variant-numeric: tabular-nums;
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
}

.timer-mode-button {
  transition: all 0.3s ease;
}

.timer-mode-button.active {
  transform: scale(1.05);
}

/* Task list styles */
.task-item {
  transition: background-color 0.2s ease;
  position: relative;
  z-index: 1;
}

.task-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.task-item.current {
  border-left: 4px solid #f43f5e; /* tomato-500 */
}

/* Animation for timer completion */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.timer-complete {
  animation: pulse 1s infinite;
}

/* Glow text effects for different session types - reduced intensity */
.glow-text-red {
  text-shadow:
    0 0 2px rgba(239, 68, 68, 0.8),
    0 0 4px rgba(239, 68, 68, 0.6),
    0 0 6px rgba(239, 68, 68, 0.4),
    0 0 8px rgba(239, 68, 68, 0.3),
    0 0 12px rgba(239, 68, 68, 0.2);
}

.glow-text-blue {
  text-shadow:
    0 0 2px rgba(59, 130, 246, 0.8),
    0 0 4px rgba(59, 130, 246, 0.6),
    0 0 6px rgba(59, 130, 246, 0.4),
    0 0 8px rgba(59, 130, 246, 0.3),
    0 0 12px rgba(59, 130, 246, 0.2);
}

.glow-text-green {
  text-shadow:
    0 0 2px rgba(34, 197, 94, 0.8),
    0 0 4px rgba(34, 197, 94, 0.6),
    0 0 6px rgba(34, 197, 94, 0.4),
    0 0 8px rgba(34, 197, 94, 0.3),
    0 0 12px rgba(34, 197, 94, 0.2);
}

/* Enhanced button shadow effects */
.shadow-red-500\/50 {
  box-shadow:
    0 4px 15px rgba(239, 68, 68, 0.5),
    0 0 0 1px rgba(239, 68, 68, 0.2);
}

.shadow-blue-500\/50 {
  box-shadow:
    0 4px 15px rgba(59, 130, 246, 0.5),
    0 0 0 1px rgba(59, 130, 246, 0.2);
}

.shadow-green-500\/50 {
  box-shadow:
    0 4px 15px rgba(34, 197, 94, 0.5),
    0 0 0 1px rgba(34, 197, 94, 0.2);
}

/* Pulse animation for active timer */
@keyframes timerPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.timer-running {
  animation: timerPulse 2s ease-in-out infinite;
}

/* Button hover glow effects */
.hover\\:shadow-glow-red:hover {
  box-shadow:
    0 0 20px rgba(239, 68, 68, 0.6),
    0 4px 15px rgba(239, 68, 68, 0.5);
}

.hover\\:shadow-glow-blue:hover {
  box-shadow:
    0 0 20px rgba(59, 130, 246, 0.6),
    0 4px 15px rgba(59, 130, 246, 0.5);
}

.hover\\:shadow-glow-green:hover {
  box-shadow:
    0 0 20px rgba(34, 197, 94, 0.6),
    0 4px 15px rgba(34, 197, 94, 0.5);
}

/* Pushed button effect */
.button-pushed {
  transform: scale(0.95) translateY(2px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Working task highlight */
.task-item-working-on {
  border-left: 4px solid #ef4444; /* red-500 */
  background: rgba(239, 68, 68, 0.1);
}

/* HTMX indicator styles */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
  opacity: 1;
}
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Light Theme Styles */
.light-theme {
  background-color: #f8fafc;
  color: #1e293b;
}

.light-theme .glass-morphism {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow:
    0 8px 32px rgba(31, 41, 55, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.04);
}

.light-theme .glass-morphism:hover {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow:
    0 12px 40px rgba(31, 41, 55, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Light theme text colors */
.light-theme .text-white {
  color: #1e293b !important;
}

.light-theme .text-white\/70 {
  color: rgba(30, 41, 59, 0.7) !important;
}

.light-theme .text-white\/80 {
  color: rgba(30, 41, 59, 0.8) !important;
}

.light-theme .text-white\/60 {
  color: rgba(30, 41, 59, 0.6) !important;
}

.light-theme .text-white\/50 {
  color: rgba(30, 41, 59, 0.5) !important;
}

.light-theme .text-white\/40 {
  color: rgba(30, 41, 59, 0.4) !important;
}

/* Light theme backgrounds */
.light-theme .bg-black\/30 {
  background-color: rgba(248, 250, 252, 0.8) !important;
}

.light-theme .bg-black\/40 {
  background-color: rgba(241, 245, 249, 0.9) !important;
}

.light-theme .bg-white\/10 {
  background-color: rgba(203, 213, 225, 0.3) !important;
}

.light-theme .bg-white\/20 {
  background-color: rgba(203, 213, 225, 0.4) !important;
}

/* Light theme borders */
.light-theme .border-white\/10 {
  border-color: rgba(203, 213, 225, 0.3) !important;
}

.light-theme .border-white\/20 {
  border-color: rgba(203, 213, 225, 0.4) !important;
}

.light-theme .border-white\/30 {
  border-color: rgba(203, 213, 225, 0.5) !important;
}

.light-theme .border-white\/50 {
  border-color: rgba(148, 163, 184, 0.6) !important;
}

/* Light theme glow text effects - very subtle for light backgrounds */
.light-theme .glow-text-red {
  text-shadow:
    0 0 1px rgba(239, 68, 68, 0.6),
    0 0 2px rgba(239, 68, 68, 0.4),
    0 0 4px rgba(239, 68, 68, 0.2),
    0 0 6px rgba(239, 68, 68, 0.1);
}

.light-theme .glow-text-blue {
  text-shadow:
    0 0 1px rgba(59, 130, 246, 0.6),
    0 0 2px rgba(59, 130, 246, 0.4),
    0 0 4px rgba(59, 130, 246, 0.2),
    0 0 6px rgba(59, 130, 246, 0.1);
}

.light-theme .glow-text-green {
  text-shadow:
    0 0 1px rgba(34, 197, 94, 0.6),
    0 0 2px rgba(34, 197, 94, 0.4),
    0 0 4px rgba(34, 197, 94, 0.2),
    0 0 6px rgba(34, 197, 94, 0.1);
}

/* Light theme working task highlight */
.light-theme .task-item-working-on {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Light theme task item hover */
.light-theme .task-item:hover {
  background-color: rgba(203, 213, 225, 0.3);
}

/* Light theme placeholder text */
.light-theme .placeholder-white\/40::placeholder {
  color: rgba(100, 116, 139, 0.6) !important;
}

/* Light theme custom checkbox */
.light-theme .custom-checkbox {
  border: 2px solid rgba(100, 116, 139, 0.4);
  background-color: rgba(255, 255, 255, 0.8);
}

.light-theme .custom-checkbox:checked {
  background-color: #ff5252;
  border-color: #ff5252;
}

/* Light theme switch */
.light-theme .switch-slider {
  background-color: rgba(100, 116, 139, 0.3);
}

.light-theme .switch-slider:before {
  background-color: #1e293b;
}

.light-theme .switch-input:checked + .switch-slider {
  background-color: #ff5252;
}

.light-theme .switch-input:checked + .switch-slider:before {
  background-color: white;
}

/* Light theme button pushed effect */
.light-theme .button-pushed {
  transform: scale(0.95) translateY(2px);
  box-shadow:
    0 2px 8px rgba(100, 116, 139, 0.3),
    inset 0 2px 4px rgba(100, 116, 139, 0.2);
}

/* Light theme backlog drawer */
.light-theme .bg-neutral-800\/95 {
  background-color: rgba(248, 250, 252, 0.98) !important;
}

.light-theme .bg-gray-700\/80 {
  background-color: rgba(226, 232, 240, 0.9) !important;
}

.light-theme .bg-gray-600\/90 {
  background-color: rgba(203, 213, 225, 0.95) !important;
}

.light-theme .bg-gray-700\/50 {
  background-color: rgba(226, 232, 240, 0.7) !important;
}

.light-theme .bg-gray-600 {
  background-color: rgba(203, 213, 225, 0.8) !important;
}

.light-theme .bg-gray-600\/50 {
  background-color: rgba(226, 232, 240, 0.6) !important;
}

/* Light theme focus styles */
.light-theme .focus\\:border-primary:focus {
  border-color: #ff5252 !important;
}

/* Light theme range slider */
.light-theme .custom-range {
  background: rgba(100, 116, 139, 0.3) !important;
}

.light-theme .custom-range::-webkit-slider-thumb {
  background: #ff5252 !important;
  box-shadow: 0 0 5px rgba(255, 82, 82, 0.5) !important;
}

.light-theme .custom-range::-moz-range-thumb {
  background: #ff5252 !important;
  box-shadow: 0 0 5px rgba(255, 82, 82, 0.5) !important;
}

/* Light theme task details panel */
.light-theme #task-details-panel-container-mobile > div.glass-morphism,
.light-theme #task-details-panel-container-desktop > div.glass-morphism {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow:
    0 12px 40px rgba(31, 41, 55, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Light theme task details panel text */
.light-theme #task-details-panel-container-mobile .text-white\/80,
.light-theme #task-details-panel-container-desktop .text-white\/80 {
  color: rgba(30, 41, 59, 0.9) !important;
}

.light-theme #task-details-panel-container-mobile .text-white\/60,
.light-theme #task-details-panel-container-desktop .text-white\/60 {
  color: rgba(30, 41, 59, 0.7) !important;
}

.light-theme #task-details-panel-container-mobile .text-white\/50,
.light-theme #task-details-panel-container-desktop .text-white\/50 {
  color: rgba(30, 41, 59, 0.6) !important;
}

/* Light theme scrollbar for light theme */
.light-theme .custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.light-theme .custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.3);
  border-radius: 3px;
}

.light-theme .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 3px;
}

.light-theme .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* Uniform width for priority chips */
.priority-chip {
  display: inline-block;
  min-width: 4rem; /* ~64px, accommodates longest label */
  text-align: center;
  font-size: 0.75rem; /* text-xs */
  padding: 0.125rem 0.5rem; /* 0.5 px-2-ish */
  border-radius: 9999px; /* full */
}

/* Light theme – flatten task-item shadow for cleaner look */
.light-theme .task-item {
  box-shadow: none !important;
  border: 1px solid rgba(203, 213, 225, 0.6); /* light border for separation */
}

/* Sortable drag and drop styles */
.sortable-ghost {
  opacity: 0.4;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border: 1px dashed rgba(255, 255, 255, 0.4) !important;
}

.sortable-chosen {
  box-shadow: 0 0 15px rgba(255, 82, 82, 0.3) !important;
  z-index: 10;
}

.sortable-drag {
  cursor: grabbing !important;
}

.task-item {
  cursor: grab;
}

.task-item:active {
  cursor: grabbing;
}

/* Pomodoro counter styles */
.pomodoro-counter {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
}

.pomodoro-counter .divider {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0.25rem;
}

.pomodoro-counter .value {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.pomodoro-counter .controls {
  display: flex;
  flex-direction: column;
  margin-left: 0.25rem;
}

.pomodoro-counter .controls button {
  padding: 0;
  height: 0.75rem;
  width: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.pomodoro-counter .controls button:hover {
  color: rgba(255, 255, 255, 1);
}

.light-theme .pomodoro-counter {
  background-color: rgba(0, 0, 0, 0.05);
}

.light-theme .pomodoro-counter .divider {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .pomodoro-counter .controls button {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .pomodoro-counter .controls button:hover {
  color: rgba(0, 0, 0, 1);
}

.pomodoro-input {
  width: 2.5rem; /* Tailwind w-10 equivalent */
  text-align: center;
  background: transparent;
  border: none;
  color: inherit;
}

.pomodoro-input:focus {
  outline: none;
}

/* Hide default number input arrows in Chrome */
.pomodoro-input::-webkit-inner-spin-button,
.pomodoro-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Same for Firefox */
.pomodoro-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Styles for Markdown rendered content in task details */

/* === HEADING STYLES === */
#task-details-panel-container-mobile .prose-sm h1,
#task-details-panel-container-desktop .prose-sm h1 {
  font-size: 1.8em !important;
  line-height: 1.2 !important;
  margin-top: 0.8em !important;
  margin-bottom: 0.5em !important;
  font-weight: bold !important;
  color: inherit !important;
}

#task-details-panel-container-mobile .prose-sm h2,
#task-details-panel-container-desktop .prose-sm h2 {
  font-size: 1.5em !important;
  line-height: 1.25 !important;
  margin-top: 0.7em !important;
  margin-bottom: 0.4em !important;
  font-weight: bold !important;
  color: inherit !important;
}

#task-details-panel-container-mobile .prose-sm h3,
#task-details-panel-container-desktop .prose-sm h3 {
  font-size: 1.25em !important;
  line-height: 1.3 !important;
  margin-top: 0.6em !important;
  margin-bottom: 0.35em !important;
  font-weight: bold !important;
  color: inherit !important;
}

#task-details-panel-container-mobile .prose-sm h4,
#task-details-panel-container-desktop .prose-sm h4 {
  font-size: 1.1em !important;
  line-height: 1.35 !important;
  margin-top: 0.5em !important;
  margin-bottom: 0.3em !important;
  font-weight: bold !important;
  color: inherit !important;
}

/* === TASK LIST STYLES === */

/* Reset list styles for task lists */
#task-details-panel-container-mobile .prose-sm ul.contains-task-list,
#task-details-panel-container-desktop .prose-sm ul.contains-task-list {
  list-style-type: none !important;
  padding-left: 0.5em !important;
  margin-left: 0 !important;
}

/* Style for task list items */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item,
#task-details-panel-container-desktop .prose-sm ul li.task-list-item {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  margin-bottom: 0.5em !important;
}

/* Style for task list checkboxes */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item input[type="checkbox"],
#task-details-panel-container-desktop .prose-sm ul li.task-list-item input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 1.2em !important;
  height: 1.2em !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 3px !important;
  margin-right: 0.5em !important;
  margin-top: 0.2em !important;
  position: relative !important;
  cursor: default !important;
  flex-shrink: 0 !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Style for checked task list items */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item input[type="checkbox"]:checked,
#task-details-panel-container-desktop .prose-sm ul li.task-list-item input[type="checkbox"]:checked {
  background-color: #ff5252 !important;
  border-color: #ff5252 !important;
}

/* Style for checkmark */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item input[type="checkbox"]:checked::after,
#task-details-panel-container-desktop .prose-sm ul li.task-list-item input[type="checkbox"]:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 0.3em !important;
  height: 0.6em !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: translate(-50%, -60%) rotate(45deg) !important;
}

/* Light theme adjustments for task lists */
.light-theme #task-details-panel-container-mobile .prose-sm ul li.task-list-item input[type="checkbox"],
.light-theme #task-details-panel-container-desktop .prose-sm ul li.task-list-item input[type="checkbox"] {
  border-color: rgba(30, 41, 59, 0.5) !important;
  background-color: rgba(0, 0, 0, 0.05) !important;
}

.light-theme #task-details-panel-container-mobile .prose-sm ul li.task-list-item input[type="checkbox"]:checked,
.light-theme #task-details-panel-container-desktop .prose-sm ul li.task-list-item input[type="checkbox"]:checked {
  background-color: #ff5252 !important;
  border-color: #ff5252 !important;
}

/* Fix paragraph margins in task lists */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item p,
#task-details-panel-container-desktop .prose-sm ul li.task-list-item p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: inline !important;
}

/* Fix for regular lists within task details */
#task-details-panel-container-mobile .prose-sm ul:not(.contains-task-list),
#task-details-panel-container-desktop .prose-sm ul:not(.contains-task-list) {
  list-style-type: disc !important;
  padding-left: 1.5em !important;
}

#task-details-panel-container-mobile .prose-sm ol,
#task-details-panel-container-desktop .prose-sm ol {
  list-style-type: decimal !important;
  padding-left: 1.8em !important;
  margin-left: 0 !important;
}

/* Strikethrough text when checkbox is checked */
#task-details-panel-container-mobile .prose-sm ul li.task-list-item input.task-checkbox:checked + span,
#task-details-panel-container-desktop .prose-sm ul li.task-list-item input.task-checkbox:checked + span {
  text-decoration: line-through !important;
  opacity: 0.7 !important;
}

/* === Dark theme typography overrides === */
#task-details-panel-container-mobile .prose-sm strong,
#task-details-panel-container-mobile .prose-sm b,
#task-details-panel-container-desktop .prose-sm strong,
#task-details-panel-container-desktop .prose-sm b {
  color: #f5f5f5 !important;
  font-weight: 700 !important;
}

#task-details-panel-container-mobile .prose-sm a,
#task-details-panel-container-desktop .prose-sm a {
  color: #38bdf8 !important; /* sky-400 */
  text-decoration: underline;
}
#task-details-panel-container-mobile .prose-sm a:hover,
#task-details-panel-container-desktop .prose-sm a:hover {
  color: #7dd3fc !important; /* sky-300 */
}

#task-details-panel-container-mobile .prose-sm blockquote,
#task-details-panel-container-desktop .prose-sm blockquote {
  color: #e2e8f0 !important; /* slate-200 */
  border-left-color: rgba(255,255,255,0.3) !important;
}

#task-details-panel-container-mobile .prose-sm table th,
#task-details-panel-container-mobile .prose-sm table td,
#task-details-panel-container-desktop .prose-sm table th,
#task-details-panel-container-desktop .prose-sm table td {
  color: #f5f5f5 !important;
  border-color: rgba(255,255,255,0.2) !important;
}

#task-details-panel-container-mobile .prose-sm code,
#task-details-panel-container-desktop .prose-sm code {
  color: #facc15 !important; /* amber-400 */
  background-color: rgba(255,255,255,0.08) !important;
  padding: 0.15em 0.35em;
  border-radius: 0.25rem;
}

/* Light theme overrides keep default Tailwind palette */
.light-theme #task-details-panel-container-mobile .prose-sm strong,
.light-theme #task-details-panel-container-mobile .prose-sm b,
.light-theme #task-details-panel-container-desktop .prose-sm strong,
.light-theme #task-details-panel-container-desktop .prose-sm b {
  color: #1e293b !important;
}

.light-theme #task-details-panel-container-mobile .prose-sm blockquote,
.light-theme #task-details-panel-container-desktop .prose-sm blockquote {
  color: #334155 !important;
  border-left-color: rgba(0,0,0,0.15) !important;
}

.light-theme #task-details-panel-container-mobile .prose-sm table th,
.light-theme #task-details-panel-container-mobile .prose-sm table td,
.light-theme #task-details-panel-container-desktop .prose-sm table th,
.light-theme #task-details-panel-container-desktop .prose-sm table td {
  color: #1e293b !important;
  border-color: rgba(0,0,0,0.2) !important;
}

.light-theme #task-details-panel-container-mobile .prose-sm code,
.light-theme #task-details-panel-container-desktop .prose-sm code {
  color: #b45309 !important; /* amber-700 */
  background-color: rgba(0,0,0,0.05) !important;
}

/* === EasyMDE Overrides (refined) === */
.easyMDEContainer {
  border-radius: 0.5rem !important; /* match rounded inputs */
  overflow: hidden; /* keep radius on inner elements */
}

/* Glass-morphism background for dark theme */
.easyMDEContainer .editor-toolbar,
.easyMDEContainer .CodeMirror,
.easyMDEContainer .editor-preview,
.easyMDEContainer .editor-preview-side {
  background: rgba(0,0,0,0.3) !important;
}

/* Update dark theme EasyMDE colors */
.easyMDEContainer .editor-toolbar {
  border-color: rgba(255,255,255,0.15) !important;
}
.easyMDEContainer .CodeMirror {
  border-color: rgba(255,255,255,0.15) !important;
}

/* DARK THEME */
.easyMDEContainer .editor-toolbar {
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(30, 30, 30, 0.6);
  border-bottom: none;
  opacity: 0.8;
}
.easyMDEContainer .editor-toolbar button {
  color: rgba(255, 255, 255, 0.7) !important; /* Reverted for dark theme */
  font-size: 16px !important;
  padding: 4px !important;
  margin: 2px !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}
.easyMDEContainer .editor-toolbar button:hover,
.easyMDEContainer .editor-toolbar button.active {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.easyMDEContainer .editor-toolbar button.active {
  background: rgba(239, 68, 68, 0.2) !important;
}

.easyMDEContainer .CodeMirror {
  background: rgba(0,0,0,0.3) !important; /* same as inputs */
  color: #f5f5f5 !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-bottom-left-radius: 0.5rem !important;
  border-bottom-right-radius: 0.5rem !important;
  padding: 0 1rem;
  min-height: 220px;
}
.easyMDEContainer .CodeMirror-cursor {
  border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
}
.easyMDEContainer .CodeMirror-gutters {
  background: transparent !important;
  border-right: 1px solid rgba(255,255,255,0.15) !important;
}

/* LIGHT THEME */
.light-theme .easyMDEContainer .editor-toolbar {
  background-color: rgba(241, 245, 249, 0.8);
  border-color: rgba(203, 213, 225, 0.4);
}
.light-theme .easyMDEContainer .editor-toolbar button,
.light-theme .easyMDEContainer .editor-toolbar a {
  background-color: #ffffff !important; /* white background */
  border: none !important;  /* REMOVED border for flatter look */
  color: #1f2937 !important;            /* gray-800 - Strong dark color for text/icons */
}
.light-theme .easyMDEContainer .editor-toolbar button .fa,
.light-theme .easyMDEContainer .editor-toolbar button i,
.light-theme .easyMDEContainer .editor-toolbar a .fa,
.light-theme .easyMDEContainer .editor-toolbar a i {
  color: inherit !important; /* Icons inherit the strong dark color */
  background-color: transparent !important;
}

.light-theme .easyMDEContainer .editor-toolbar button:hover,
.light-theme .easyMDEContainer .editor-toolbar a:hover {
  background-color: #d1d5db !important; /* gray-300 */
  border-color: #9ca3af !important;     /* gray-400 */
  color: #111827 !important;            /* gray-900 - Even darker text */
}
.light-theme .easyMDEContainer .editor-toolbar button:hover .fa,
.light-theme .easyMDEContainer .editor-toolbar button:hover i,
.light-theme .easyMDEContainer .editor-toolbar a:hover .fa,
.light-theme .easyMDEContainer .editor-toolbar a:hover i {
  color: inherit !important; /* Inherit from hovered button/a */
}

.light-theme .easyMDEContainer .editor-toolbar button.active,
.light-theme .easyMDEContainer .editor-toolbar a.active {
  background-color: #ef4444 !important; /* red-500 */
  border-color: #dc2626 !important;     /* red-600 */
  color: #ffffff !important;            /* white text - good contrast on red */
}
.light-theme .easyMDEContainer .editor-toolbar button.active .fa,
.light-theme .easyMDEContainer .editor-toolbar button.active i,
.light-theme .easyMDEContainer .editor-toolbar a.active .fa,
.light-theme .easyMDEContainer .editor-toolbar a.active i {
  color: inherit !important; /* Inherit white from active button/a */
}

.light-theme .easyMDEContainer .CodeMirror-gutters {
  background: transparent !important;
  border-right: 1px solid rgba(203,213,225,0.5) !important;
}

/* DARK theme preview */
.easyMDEContainer .editor-preview,
.easyMDEContainer .editor-preview-side {
  background: rgba(0,0,0,0.3) !important;
  color: #f5f5f5 !important;
}
/* Light theme preview */
.light-theme .easyMDEContainer .editor-preview,
.light-theme .easyMDEContainer .editor-preview-side {
  background: rgba(248,250,252,0.8) !important;
  color: #1e293b !important;
}

/* Force CodeMirror theme colors */
#task-form .cm-s-easymde, #task-form .cm-s-easymde .CodeMirror,
#task-details-panel-container-mobile .cm-s-easymde, #task-details-panel-container-mobile .cm-s-easymde .CodeMirror,
#task-details-panel-container-desktop .cm-s-easymde, #task-details-panel-container-desktop .cm-s-easymde .CodeMirror {
  background: rgba(0,0,0,0.3) !important;
  color: #f5f5f5 !important;
}
.light-theme #task-form .cm-s-easymde, .light-theme #task-form .cm-s-easymde .CodeMirror,
.light-theme #task-details-panel-container-mobile .cm-s-easymde, .light-theme #task-details-panel-container-mobile .cm-s-easymde .CodeMirror,
.light-theme #task-details-panel-container-desktop .cm-s-easymde, .light-theme #task-details-panel-container-desktop .cm-s-easymde .CodeMirror {
  background: rgba(248,250,252,0.8) !important;
  color: #1e293b !important;
}

/* Cursor color override - ensure visibility in both themes */
.easyMDEContainer .CodeMirror-cursor,
.CodeMirror-cursor,
.cm-s-easymde .CodeMirror-cursor {
  border-left: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-right: none !important;
}

.light-theme .easyMDEContainer .CodeMirror-cursor,
.light-theme .CodeMirror-cursor,
.light-theme .cm-s-easymde .CodeMirror-cursor {
  border-left: 2px solid rgba(30, 41, 59, 0.9) !important;
  border-right: none !important;
}

/* Improve task list appearance in the editor */
.cm-formatting-task {
  color: rgba(255, 255, 255, 0.5) !important;
}

.light-theme .cm-formatting-task {
  color: rgba(30, 41, 59, 0.5) !important;
}

/* Highlight task list text */
.cm-task-list-item {
  color: rgba(255, 255, 255, 0.9) !important;
}

.light-theme .cm-task-list-item {
  color: rgba(30, 41, 59, 0.9) !important;
}

/* === EasyMDE Dark/Light Theme Fixes (preview + toolbar) === */

/* Dark theme preview when in full preview mode - glassmorphism style */
.editor-preview-full {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f5f5f5 !important;
}

/* Light theme preview when in full preview mode - glassmorphism style */
.light-theme .editor-preview-full {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(226, 232, 240, 0.6) !important;
  color: #1e293b !important;
}

/* Toolbar icons - fix all elements (buttons, anchors, and their children) */
.easyMDEContainer .editor-toolbar button,
.easyMDEContainer .editor-toolbar a,
.easyMDEContainer .editor-toolbar .fa,
.easyMDEContainer .editor-toolbar i {
  color: rgba(255, 255, 255, 0.7) !important; /* Reverted for dark theme */
  background: rgba(0, 0, 0, 0.2) !important;
}

.easyMDEContainer .editor-toolbar button,
.easyMDEContainer .editor-toolbar a {
  font-size: 16px !important;
  padding: 4px !important;
  margin: 2px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.easyMDEContainer .editor-toolbar button:hover,
.easyMDEContainer .editor-toolbar button.active,
.easyMDEContainer .editor-toolbar a:hover,
.easyMDEContainer .editor-toolbar a.active {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.easyMDEContainer .editor-toolbar button:hover,
.easyMDEContainer .editor-toolbar button:hover .fa,
.easyMDEContainer .editor-toolbar button:hover i,
.easyMDEContainer .editor-toolbar button.active,
.easyMDEContainer .editor-toolbar button.active .fa,
.easyMDEContainer .editor-toolbar button.active i,
.easyMDEContainer .editor-toolbar a:hover,
.easyMDEContainer .editor-toolbar a:hover .fa,
.easyMDEContainer .editor-toolbar a:hover i,
.easyMDEContainer .editor-toolbar a.active,
.easyMDEContainer .editor-toolbar a.active .fa,
.easyMDEContainer .editor-toolbar a.active i {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Light theme variants for all toolbar elements */
.light-theme .easyMDEContainer .editor-toolbar button,
.light-theme .easyMDEContainer .editor-toolbar a,
.light-theme .easyMDEContainer .editor-toolbar .fa,
.light-theme .easyMDEContainer .editor-toolbar i {
  color: rgba(30, 41, 59, 0.7) !important;
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(203, 213, 225, 0.3) !important;
}

.light-theme .easyMDEContainer .editor-toolbar button:hover,
.light-theme .easyMDEContainer .editor-toolbar button.active,
.light-theme .easyMDEContainer .editor-toolbar a:hover,
.light-theme .easyMDEContainer .editor-toolbar a.active {
  background: rgba(255, 255, 255, 0.6) !important;
  border-color: rgba(30, 41, 59, 0.3) !important;
}

.light-theme .easyMDEContainer .editor-toolbar button:hover,
.light-theme .easyMDEContainer .editor-toolbar button:hover .fa,
.light-theme .easyMDEContainer .editor-toolbar button:hover i,
.light-theme .easyMDEContainer .editor-toolbar button.active,
.light-theme .easyMDEContainer .editor-toolbar button.active .fa,
.light-theme .easyMDEContainer .editor-toolbar button.active i,
.light-theme .easyMDEContainer .editor-toolbar a:hover,
.light-theme .easyMDEContainer .editor-toolbar a:hover .fa,
.light-theme .easyMDEContainer .editor-toolbar a:hover i,
.light-theme .easyMDEContainer .editor-toolbar a.active,
.light-theme .easyMDEContainer .editor-toolbar a.active .fa,
.light-theme .easyMDEContainer .editor-toolbar a.active i {
  color: rgba(30, 41, 59, 0.9) !important;
}

.light-theme .easyMDEContainer .editor-toolbar button.active,
.light-theme .easyMDEContainer .editor-toolbar a.active {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Override EasyMDE default button styles with theme-specific colors */
.easyMDEContainer .editor-toolbar button.active, 
.easyMDEContainer .editor-toolbar button:hover,
.editor-toolbar button.active, 
.editor-toolbar button:hover {
  background: #000 !important;
  border-color: #95a5a6 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Light theme override for button active/hover states */
.light-theme .easyMDEContainer .editor-toolbar button.active, 
.light-theme .easyMDEContainer .editor-toolbar button:hover,
.light-theme .editor-toolbar button.active, 
.light-theme .editor-toolbar button:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(30, 41, 59, 0.4) !important;
  color: rgba(30, 41, 59, 0.9) !important;
}

/* Ensure anchor elements follow the same pattern */
.easyMDEContainer .editor-toolbar a.active, 
.easyMDEContainer .editor-toolbar a:hover,
.editor-toolbar a.active, 
.editor-toolbar a:hover {
  background: #000 !important;
  border-color: #95a5a6 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.light-theme .easyMDEContainer .editor-toolbar a.active, 
.light-theme .easyMDEContainer .editor-toolbar a:hover,
.light-theme .editor-toolbar a.active, 
.light-theme .editor-toolbar a:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(30, 41, 59, 0.4) !important;
  color: rgba(30, 41, 59, 0.9) !important;
}

/* === EasyMDE Preview Task List Styling === */

/* Task list styling for preview mode */
.editor-preview ul li.task-list-item,
.editor-preview-side ul li.task-list-item,
.editor-preview-full ul li.task-list-item {
  list-style: none !important;
  margin: 0.5em 0 !important;
  padding-left: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
}

.editor-preview ul li.task-list-item input[type="checkbox"],
.editor-preview-side ul li.task-list-item input[type="checkbox"],
.editor-preview-full ul li.task-list-item input[type="checkbox"] {
  margin-right: 0.5em !important;
  margin-top: 0.1em !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #ef4444 !important; /* red-500 */
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

/* Task text styling */
.editor-preview ul li.task-list-item .task-text,
.editor-preview-side ul li.task-list-item .task-text,
.editor-preview-full ul li.task-list-item .task-text {
  flex: 1 !important;
  transition: all 0.2s ease !important;
}

/* Strikethrough for completed tasks */
.editor-preview ul li.task-list-item.completed,
.editor-preview-side ul li.task-list-item.completed,
.editor-preview-full ul li.task-list-item.completed {
  text-decoration: line-through !important;
  opacity: 0.6 !important;
}

/* Remove bullets from task lists */
.editor-preview ul.contains-task-list,
.editor-preview-side ul.contains-task-list,
.editor-preview-full ul.contains-task-list {
  list-style-type: none !important;
  padding-left: 0 !important;
}

/* Dark theme task list */
.editor-preview ul li.task-list-item,
.editor-preview-side ul li.task-list-item,
.editor-preview-full ul li.task-list-item {
  color: #f5f5f5 !important;
}

/* Light theme task list */
.light-theme .editor-preview ul li.task-list-item,
.light-theme .editor-preview-side ul li.task-list-item,
.light-theme .editor-preview-full ul li.task-list-item {
  color: #1e293b !important;
}

/* Ensure task list items render as checkboxes, not just text */
.editor-preview .task-list-item,
.editor-preview-side .task-list-item,
.editor-preview-full .task-list-item {
  display: list-item !important;
}

/* Fix ordered and unordered lists in preview */
.editor-preview ol,
.editor-preview-side ol,
.editor-preview-full ol {
  padding-left: 1.5em !important;
  margin: 1em 0 !important;
}

.editor-preview ul:not(.contains-task-list),
.editor-preview-side ul:not(.contains-task-list),
.editor-preview-full ul:not(.contains-task-list) {
  padding-left: 1.5em !important;
  margin: 1em 0 !important;
}

.editor-preview ul:not(.contains-task-list) li,
.editor-preview-side ul:not(.contains-task-list) li,
.editor-preview-full ul:not(.contains-task-list) li {
  list-style: disc !important;
  margin: 0.25em 0 !important;
}

.editor-preview ol li,
.editor-preview-side ol li,
.editor-preview-full ol li {
  list-style: decimal !important;
  margin: 0.25em 0 !important;
}

/* Blockquote styling in preview */
.editor-preview blockquote,
.editor-preview-side blockquote,
.editor-preview-full blockquote {
  border-left: 4px solid rgba(255, 255, 255, 0.3) !important;
  padding-left: 1em !important;
  margin: 1em 0 !important;
  font-style: italic !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.light-theme .editor-preview blockquote,
.light-theme .editor-preview-side blockquote,
.light-theme .editor-preview-full blockquote {
  border-left-color: rgba(30, 41, 59, 0.3) !important;
  color: rgba(30, 41, 59, 0.8) !important;
}

/* Heading styles in preview */
.editor-preview h1, .editor-preview h2, .editor-preview h3, .editor-preview h4,
.editor-preview-side h1, .editor-preview-side h2, .editor-preview-side h3, .editor-preview-side h4,
.editor-preview-full h1, .editor-preview-full h2, .editor-preview-full h3, .editor-preview-full h4 {
  margin: 1em 0 0.5em 0 !important;
  line-height: 1.2 !important;
}

.editor-preview h1, .editor-preview-side h1, .editor-preview-full h1 {
  font-size: 2em !important;
  font-weight: bold !important;
}

.editor-preview h2, .editor-preview-side h2, .editor-preview-full h2 {
  font-size: 1.5em !important;
  font-weight: bold !important;
}

.editor-preview h3, .editor-preview-side h3, .editor-preview-full h3 {
  font-size: 1.25em !important;
  font-weight: bold !important;
}

.editor-preview h4, .editor-preview-side h4, .editor-preview-full h4 {
  font-size: 1.1em !important;
  font-weight: bold !important;
}

/* Remove bullet markers for task list items in preview */
.editor-preview li.task-list-item,
.editor-preview-side li.task-list-item,
.editor-preview-full li.task-list-item {
  list-style-type: none !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Ensure strikethrough applies */
.editor-preview li.task-list-item.completed,
.editor-preview-side li.task-list-item.completed,
.editor-preview-full li.task-list-item.completed {
  text-decoration: line-through !important; /* fallback */
  text-decoration-line: line-through !important;
  text-decoration-thickness: 2px !important;
  opacity: 0.6 !important;
}

/* === EasyMDE Side-by-Side Preview Fixes === */

/* Dark theme */
.editor-preview-side {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #f5f5f5 !important;
  opacity: 1 !important; /* override EasyMDE default */
  filter: none !important;
}

/* Active state (when focus is on preview) */
.editor-preview-active-side {
  background: rgba(0, 0, 0, 0.3) !important;
  color: #f5f5f5 !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Light theme */
.light-theme .editor-preview-side,
.light-theme .editor-preview-active-side {
  background: rgba(248, 250, 252, 0.8) !important;
  color: #1e293b !important;
  opacity: 1 !important;
  filter: none !important;
}

/* EasyMDE Editor Customizations */
.EasyMDEContainer .editor-toolbar button {
  color: rgba(255, 255, 255, 0.7) !important; /* Reverted for dark theme */
}

.EasyMDEContainer .editor-toolbar button:hover, 
.EasyMDEContainer .editor-toolbar button.active {
  color: rgba(255, 255, 255, 1) !important;
}

.EasyMDEContainer .editor-toolbar i.separator {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.editor-preview, .editor-preview-side {
  background-color: rgba(18, 18, 18, 0.8) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.editor-preview a, .editor-preview-side a {
  color: #ff5252 !important;
  text-decoration: underline;
}

/* Fix for dark theme cursor visibility */
.CodeMirror-cursor {
  border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
}

/* Remove bullets from task lists and match details card styling - with increased specificity */
body .EasyMDEContainer .editor-preview ul.contains-task-list,
body .EasyMDEContainer .editor-preview-side ul.contains-task-list,
body .editor-preview ul.contains-task-list,
body .editor-preview-side ul.contains-task-list,
body .editor-preview-full ul.contains-task-list {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
}

body .EasyMDEContainer .editor-preview li.task-list-item,
body .EasyMDEContainer .editor-preview-side li.task-list-item,
body .editor-preview li.task-list-item,
body .editor-preview-side li.task-list-item,
body .editor-preview-full li.task-list-item {
  list-style-type: none !important;
  color: rgba(255, 255, 255, 0.8) !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
  margin-bottom: 0.5em !important;
}

/* Style task list checkboxes with increased specificity */
body .EasyMDEContainer .editor-preview li.task-list-item input[type="checkbox"],
body .EasyMDEContainer .editor-preview-side li.task-list-item input[type="checkbox"],
body .editor-preview li.task-list-item input[type="checkbox"],
body .editor-preview-side li.task-list-item input[type="checkbox"],
body .editor-preview-full li.task-list-item input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 1.2em !important;
  height: 1.2em !important;
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 3px !important;
  margin-right: 0.5em !important;
  margin-top: 0.2em !important;
  position: relative !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Style checked checkbox */
body .EasyMDEContainer .editor-preview li.task-list-item input[type="checkbox"]:checked,
body .EasyMDEContainer .editor-preview-side li.task-list-item input[type="checkbox"]:checked,
body .editor-preview li.task-list-item input[type="checkbox"]:checked,
body .editor-preview-side li.task-list-item input[type="checkbox"]:checked,
body .editor-preview-full li.task-list-item input[type="checkbox"]:checked {
  background-color: #ff5252 !important;
  border-color: #ff5252 !important;
}

/* Add checkmark for checked items */
body .EasyMDEContainer .editor-preview li.task-list-item input[type="checkbox"]:checked::after,
body .EasyMDEContainer .editor-preview-side li.task-list-item input[type="checkbox"]:checked::after,
body .editor-preview li.task-list-item input[type="checkbox"]:checked::after,
body .editor-preview-side li.task-list-item input[type="checkbox"]:checked::after,
body .editor-preview-full li.task-list-item input[type="checkbox"]:checked::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 0.3em !important;
  height: 0.6em !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: translate(-50%, -60%) rotate(45deg) !important;
}



/* === Light Theme EasyMDE Toolbar Button Fixes for #task-form === */
/* Ensure these rules are specific enough to override previous general light theme EasyMDE styles */

/* Base style for buttons and anchors within #task-form toolbar */
.light-theme body #task-form .EasyMDEContainer .editor-toolbar button,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar a {
  background-color: #ffffff !important; /* white background */
  border: none !important;  /* REMOVED border for flatter look */
  color: #1f2937 !important;            /* gray-800 - Strong dark color for text/icons */
}

/* Style for icons within these specific buttons/anchors */
.light-theme body #task-form .EasyMDEContainer .editor-toolbar button .fa,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar button i,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar a .fa,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar a i {
  color: inherit !important; /* Icons inherit the strong dark color */
  background-color: transparent !important;
}

/* Hover state for these specific buttons/anchors */
.light-theme body #task-form .EasyMDEContainer .editor-toolbar button:hover,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar a:hover {
  background-color: #d1d5db !important; /* gray-300 */
  border-color: #9ca3af !important;     /* gray-400 */
  color: #111827 !important;            /* gray-900 - Even darker text */
}

/* Active state for these specific buttons/anchors */
.light-theme body #task-form .EasyMDEContainer .editor-toolbar button.active,
.light-theme body #task-form .EasyMDEContainer .editor-toolbar a.active {
  background-color: #ef4444 !important; /* red-500 */
  border-color: #dc2626 !important;     /* red-600 */
  color: #ffffff !important;            /* white text - good contrast on red */
}

/* Light theme toolbar separator */
.light-theme .EasyMDEContainer .editor-toolbar i.separator {
  border-left-color: #d1d5db !important;   /* gray-300 */
  border-right-color: #d1d5db !important;  /* gray-300 */
}

/* Light theme - darker text for all list items in EasyMDE preview */
.light-theme #task-form div.editor-preview-side ul li,
.light-theme #task-form div.editor-preview ul li,
.light-theme #task-form div.editor-preview-active-side ul li,
.light-theme .EasyMDEContainer .editor-preview-side ul li,
.light-theme .EasyMDEContainer .editor-preview ul li,
.light-theme #task-form div.editor-preview-side ol li,
.light-theme #task-form div.editor-preview ol li,
.light-theme #task-form div.editor-preview-active-side ol li,
.light-theme .EasyMDEContainer .editor-preview-side ol li,
.light-theme .EasyMDEContainer .editor-preview ol li {
  color: rgba(30, 41, 59, 0.9) !important;
}

/* Light theme - border for unchecked checkboxes */
.light-theme #task-form div.editor-preview-side input[type="checkbox"],
.light-theme #task-form div.editor-preview input[type="checkbox"],
.light-theme #task-form div.editor-preview-active-side input[type="checkbox"],
.light-theme .EasyMDEContainer .editor-preview-side input[type="checkbox"],
.light-theme .EasyMDEContainer .editor-preview input[type="checkbox"] {
  border: 2px solid rgba(30, 41, 59, 0.4) !important;
}

/* Light theme - strikethrough for checked items */
/* Tooltip styles - using inline styles now for better control */

.light-theme #task-form div.editor-preview-side ul li.completed,
.light-theme #task-form div.editor-preview ul li.completed,
.light-theme #task-form div.editor-preview-active-side ul li.completed,
.light-theme .EasyMDEContainer .editor-preview-side ul li.completed,
.light-theme .EasyMDEContainer .editor-preview ul li.completed,
.light-theme #task-form div.editor-preview-side ul li:has(input[type="checkbox"]:checked),
.light-theme #task-form div.editor-preview ul li:has(input[type="checkbox"]:checked),
.light-theme #task-form div.editor-preview-active-side ul li:has(input[type="checkbox"]:checked),
.light-theme .EasyMDEContainer .editor-preview-side ul li:has(input[type="checkbox"]:checked),
.light-theme .EasyMDEContainer .editor-preview ul li:has(input[type="checkbox"]:checked) {
  text-decoration: line-through !important;
  color: rgba(30, 41, 59, 0.5) !important;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
  background-color: rgba(23, 23, 23, 0.95);
  backdrop-filter: blur(20px);
}

.light-theme .mobile-nav-menu {
  background-color: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-nav-menu h2 {
  color: #1e293b;
}

.light-theme .mobile-nav-menu a {
  color: #1e293b;
}

.light-theme .mobile-nav-menu button {
  color: #64748b;
}

.light-theme .mobile-nav-menu button:hover {
  color: #1e293b;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* General mobile adjustments */
  .timer-display {
    font-size: 7rem !important;
  }
  
  /* Ensure timer display is 7rem on mobile screens */
  h2.timer-display,
  .timer-display {
    font-size: 7rem !important;
  }
  
  /* Override any other timer font sizes on mobile */
  .text-6xl.timer-display,
  .text-7xl.timer-display,
  .text-8xl.timer-display,
  .text-9xl.timer-display {
    font-size: 6rem !important;
  }
  
  /* Hide desktop task details panel on mobile */
  #task-details-panel-container-desktop {
    display: none !important;
  }
  
  /* Task item mobile adjustments */
  .task-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  /* Task actions mobile menu */
  .task-actions-mobile {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .light-theme .task-actions-mobile {
    border-top-color: rgba(0, 0, 0, 0.1);
  }
  
  /* Mobile drawer for task details */
  .mobile-task-details-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }

  /* Mobile collaboration drawer */
  .mobile-collaboration-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50; /* Higher than backlog drawer (z-30) and task details drawer (z-40) */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  
  .mobile-task-details-content {
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(20px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .mobile-collaboration-content {
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(20px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .light-theme .mobile-task-details-content {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }

  .light-theme .mobile-collaboration-content {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }
  
  /* Mobile task details prose styling */
  .mobile-task-details-content .prose-content {
    color: rgba(255, 255, 255, 0.8);
  }
  
  .mobile-task-details-content .prose-content p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
  }
  
  .mobile-task-details-content .prose-content ul:not(.contains-task-list),
  .mobile-task-details-content .prose-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    list-style-position: inside;
  }
  
  /* Remove list bullets for all lists in mobile drawer */
  .mobile-task-details-content .prose-content ul:not(.contains-task-list) {
    list-style-type: disc;
  }
  
  .mobile-task-details-content .prose-content li {
    margin-bottom: 0.5rem;
  }
  
  .mobile-task-details-content .prose-content strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
  }
  
  .mobile-task-details-content .prose-content em {
    font-style: italic;
  }
  
  .mobile-task-details-content .prose-content h1,
  .mobile-task-details-content .prose-content h2,
  .mobile-task-details-content .prose-content h3,
  .mobile-task-details-content .prose-content h4 {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.95);
  }
  
  .mobile-task-details-content .prose-content blockquote {
    border-left: 4px solid #ff5252;
    padding-left: 1rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
  }
  
  .mobile-task-details-content .prose-content code {
    background: rgba(255, 255, 255, 0.1);
    color: #ff5252;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875rem;
  }
  
  /* Light theme prose styling for mobile */
  .light-theme .mobile-task-details-content .prose-content {
    color: rgba(30, 41, 59, 0.9);
  }
  
  .light-theme .mobile-task-details-content .prose-content strong {
    color: #1e293b;
  }
  
  .light-theme .mobile-task-details-content .prose-content h1,
  .light-theme .mobile-task-details-content .prose-content h2,
  .light-theme .mobile-task-details-content .prose-content h3,
  .light-theme .mobile-task-details-content .prose-content h4 {
    color: #1e293b;
  }
  
  .light-theme .mobile-task-details-content .prose-content blockquote {
    color: rgba(30, 41, 59, 0.7);
  }
  
  .light-theme .mobile-task-details-content .prose-content code {
    background: rgba(0, 0, 0, 0.1);
  }
  
  /* Fix task list styling in mobile drawer */
  .mobile-task-details-content .prose-content ul.contains-task-list,
  .mobile-task-details-content .prose-content ul[data-list="check"] {
    list-style: none !important;
    padding-left: 0 !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item {
    position: relative !important;
    padding-left: 1.8em !important;
    margin: 0.3em 0 !important;
    list-style: none !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item::before {
    content: none !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 1.2em !important;
    height: 1.2em !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 3px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.2em !important;
    cursor: pointer !important;
    margin: 0 !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item input[type="checkbox"]:checked {
    background-color: #ff5252 !important;
    border-color: #ff5252 !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item input[type="checkbox"]:checked::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 0.3em !important;
    height: 0.6em !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -60%) rotate(45deg) !important;
  }
  
  .mobile-task-details-content .prose-content li.task-list-item p {
    margin: 0 !important;
    display: inline !important;
  }
  
  /* Light theme task list styling */
  .light-theme .mobile-task-details-content .prose-content li.task-list-item input[type="checkbox"] {
    border-color: rgba(100, 116, 139, 0.4) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
  }
  
  .light-theme .mobile-task-details-content .prose-content li.task-list-item input[type="checkbox"]:checked {
    background-color: #ff5252 !important;
    border-color: #ff5252 !important;
  }
  
  /* Drawer handle */
  .mobile-drawer-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 12px auto 8px;
  }
  
  .light-theme .mobile-drawer-handle {
    background: rgba(0, 0, 0, 0.2);
  }
  
  /* Mobile Pro Badge positioning */
  .pro-badge {
    top: 10px !important;
    right: 10px !important;
    padding: 2px 4px !important;
    font-size: 0.6rem !important;
  }
  
  /* Tab buttons mobile */
  .tab-button {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
  }
  
  /* Mobile timer controls */
  #start-timer {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
  }
  
  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
  
  /* Show mobile-only elements */
  .mobile-only {
    display: block !important;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .timer-display,
  h2.timer-display {
    font-size: 6rem !important;
  }
  
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Very small tab buttons */
  .tab-button {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
}

/* PRO Badge in Header */
.pro-badge-header {
  position: absolute;
  top: -4px;
  right: -18px;
  background: linear-gradient(135deg, #10b981, #06d6a0);
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-weight: 900;
  font-style: italic;
  font-size: 0.45rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 10;
  display: flex;
  align-items: center;
  box-shadow: 
    0 0 8px rgba(16, 185, 129, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  min-width: 22px;
  height: 14px;
  justify-content: center;
}

.pro-badge-header:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 
    0 0 12px rgba(16, 185, 129, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Desktop-only and mobile-only utility classes */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* Swipe hint animation */
@keyframes swipeHint {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.swipe-hint {
  animation: swipeHint 2s ease-in-out infinite;
}

/* Mobile task action buttons */
.mobile-action-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.2s;
  border: 1px solid transparent;
  font-weight: 500;
}

.mobile-action-btn:hover,
.mobile-action-btn:active {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
  border-color: rgba(255, 255, 255, 0.3);
}

.light-theme .mobile-action-btn {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-action-btn:hover,
.light-theme .mobile-action-btn:active {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Mobile dropdown menu styles */
.mobile-dropdown-menu {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-100%);
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.25rem;
  min-width: 120px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

/* Ensure task items have relative positioning for dropdown anchoring */
.task-item {
  position: relative;
}

/* Allow dropdowns to overflow from scrolling containers */
#task-list:has(.mobile-dropdown-menu) {
  overflow: visible !important;
}

/* Fallback for browsers without :has support - use class toggling */
#task-list.dropdown-open {
  overflow: visible !important;
}

.light-theme .mobile-dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
  white-space: nowrap;
  font-size: 0.75rem;
}

.mobile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.light-theme .mobile-dropdown-item {
  color: rgba(0, 0, 0, 0.7);
}

.light-theme .mobile-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
}

/* Touch-friendly checkbox */
@media (max-width: 768px) {
  .custom-checkbox {
    width: 24px;
    height: 24px;
  }
}

/* Task dropdown menu styles */
.task-dropdown-menu {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 9999;
  position: relative;
}

.light-theme .task-dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.task-dropdown-menu button {
  transition: all 0.2s;
  white-space: nowrap;
}

.task-dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.light-theme .task-dropdown-menu button {
  color: rgba(0, 0, 0, 0.7);
}

.light-theme .task-dropdown-menu button:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.9);
}

.light-theme .task-dropdown-menu button.text-red-400 {
  color: #dc2626;
}

.light-theme .task-dropdown-menu button.text-red-400:hover {
  background: rgba(220, 38, 38, 0.1);
}

/* Mobile-optimized Task Form */
.mobile-task-form {
  background: transparent;
  padding: 0;
  margin: 0;
}

.mobile-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.mobile-form-header h3 {
  margin: 0;
  color: white;
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: white;
}

.mobile-form-body {
  padding: 0 16px;
}

.form-field {
  margin-bottom: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-field-half {
  flex: 1;
}

.mobile-input,
.mobile-select,
.mobile-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 16px; /* Prevent zoom on iOS */
  transition: all 0.2s;
}

.mobile-input:focus,
.mobile-select:focus,
.mobile-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
}

.mobile-input::placeholder,
.mobile-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.mobile-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  padding-right: 36px;
}

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

.mobile-pomodoro-counter {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 12px;
  height: 42px;
}

.mobile-pomodoro-input {
  background: transparent;
  border: none;
  color: white;
  width: 30px;
  text-align: center;
  font-size: 16px;
  padding: 0;
}

.mobile-pomodoro-input:focus {
  outline: none;
}

.mobile-pomodoro-counter .divider {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 4px;
}

.mobile-form-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-btn-secondary,
.mobile-btn-primary {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.mobile-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.mobile-btn-primary {
  background: var(--primary);
  color: white;
}

.mobile-btn-primary:hover {
  background: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .mobile-form-header {
    padding: 10px 12px;
  }
  
  .mobile-form-body {
    padding: 0 12px;
  }
  
  .mobile-form-actions {
    padding: 12px;
  }
  
  .form-row {
    gap: 8px;
  }
}

/* Light theme support for mobile form */
.light-theme .mobile-task-form {
  color: #333;
}

.light-theme .mobile-form-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-form-header h3 {
  color: #333;
}

.light-theme .close-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .close-btn:hover {
  color: #333;
}

.light-theme .mobile-input,
.light-theme .mobile-select,
.light-theme .mobile-textarea {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

.light-theme .mobile-input:focus,
.light-theme .mobile-select:focus,
.light-theme .mobile-textarea:focus {
  background: white;
  border-color: var(--primary);
}

.light-theme .mobile-input::placeholder,
.light-theme .mobile-textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .mobile-pomodoro-counter {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-pomodoro-input {
  color: #333;
}

.light-theme .mobile-form-actions {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.light-theme .mobile-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Mobile Task Items */
.task-item-mobile {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.task-item-mobile:last-child {
  border-bottom: none;
}

.task-item-content {
  padding: 12px 0;
}

.task-main-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.task-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.task-title {
  font-size: 16px;
  margin: 0 0 4px 0;
  color: white;
  word-break: break-word;
}

.task-title.completed {
  text-decoration: line-through;
  opacity: 0.6;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.priority-dot.priority-high {
  background: #ef4444;
}

.priority-dot.priority-medium {
  background: #3b82f6;
}

.priority-dot.priority-low {
  background: rgba(255, 255, 255, 0.4);
}

.pomo-count {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pomo-count i {
  font-size: 14px;
}

.task-menu-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px;
  cursor: pointer;
  font-size: 20px;
  transition: color 0.2s;
}

.task-menu-btn:hover {
  color: white;
}

/* Task Menu Dropdown */
.task-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px;
  min-width: 160px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.task-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.task-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.task-menu-item.delete {
  color: #ef4444;
}

.task-menu-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Light theme support for mobile tasks */
.light-theme .task-item-mobile {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .task-checkbox {
  border-color: rgba(0, 0, 0, 0.3);
}

.light-theme .task-title {
  color: #333;
}

.light-theme .task-meta {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .task-menu-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .task-menu-btn:hover {
  color: #333;
}

.light-theme .task-menu {
  background: white;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.light-theme .task-menu-item {
  color: #333;
}

.light-theme .task-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Remove task form container padding on mobile */
@media (max-width: 768px) {
  #task-form-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure task list doesn't have extra spacing on mobile */
  #active-tasks {
    margin-bottom: 1.5rem !important;
  }
  
  /* Remove extra spacing from task item wrapper divs */
  #active-tasks > div,
  #completed-tasks > div > div {
    margin: 0;
  }
  
  /* Ensure mobile task items have consistent spacing */
  .task-item-mobile + .task-item-mobile {
    margin-top: 0;
  }
}

/* Clean Glass Form */
.clean-glass-form {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.form-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.close-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
  transition: color 0.2s;
  border-radius: 4px;
}

.close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.form-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
}

.title-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.title-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.meta-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.priority-select {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
  cursor: pointer;
  transition: all 0.2s;
}

.priority-select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(0, 0, 0, 0.3);
}

.pomodoro-inputs {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
}

.pomo-input {
  background: transparent;
  border: none;
  color: white;
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.pomo-input:focus {
  outline: none;
}

.pomo-divider {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.description-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s;
  font-family: inherit;
}

.description-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.description-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.btn-cancel,
.btn-save {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.btn-save {
  background: #dc2626 !important;
  color: white !important;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save:hover {
  background: #b91c1c !important;
  transform: translateY(-1px);
}

/* Light theme support for clean glass form */
.light-theme .clean-glass-form {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .form-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .form-header h3 {
  color: #333;
}

.light-theme .close-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .close-btn:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .title-input,
.light-theme .priority-select,
.light-theme .description-input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

.light-theme .title-input:focus,
.light-theme .priority-select:focus,
.light-theme .description-input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.light-theme .title-input::placeholder,
.light-theme .description-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .pomodoro-inputs {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .pomo-input {
  color: #333;
}

.light-theme .pomo-divider {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .form-actions {
  border-top-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.light-theme .btn-cancel:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .form-header {
    padding: 12px 16px;
  }
  
  .form-content {
    padding: 16px;
    gap: 12px;
  }
  
  .form-actions {
    padding: 12px 16px;
  }
  
  .meta-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .priority-select,
  .pomodoro-inputs {
    width: 100%;
  }
}

/* Clean Task Items - No Containers */
.clean-task-item {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.clean-task-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.clean-task-item:last-child {
  border-bottom: none;
}

.task-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  gap: 12px;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  appearance: none;
  position: relative;
}

.task-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.drag-handle {
  color: rgba(255, 255, 255, 0.3);
  cursor: grab;
  padding: 4px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.drag-handle:hover {
  color: rgba(255, 255, 255, 0.6);
}

.drag-handle:active {
  cursor: grabbing;
}

.task-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.task-title {
  font-size: 16px;
  font-weight: 500;
  color: white;
  margin: 0 0 4px 0;
  line-height: 1.3;
  word-break: break-word;
  transition: all 0.2s ease;
}

.task-title.completed {
  text-decoration: line-through;
  opacity: 0.5;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

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

.priority-dot.priority-high {
  background: #ef4444;
}

.priority-dot.priority-medium {
  background: #3b82f6;
}

.priority-dot.priority-low {
  background: rgba(255, 255, 255, 0.3);
}

.pomo-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.pomo-count i {
  font-size: 14px;
}

.task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.clean-task-item:hover .task-actions {
  opacity: 1;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Mobile specific styles */
@media (max-width: 768px) {
  .task-row {
    padding: 16px 0;
  }
  
  .task-actions {
    opacity: 1; /* Always show on mobile */
  }
  
  .action-btn {
    width: 36px;
    height: 36px;
  }
  
  .drag-handle {
    display: none !important; /* Hide drag handle on mobile */
  }
}

/* Light theme support */
.light-theme .clean-task-item {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.light-theme .clean-task-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .task-checkbox {
  border-color: rgba(0, 0, 0, 0.25);
}

.light-theme .task-title {
  color: #333;
}

.light-theme .task-meta {
  color: rgba(0, 0, 0, 0.5);
}

.light-theme .priority-dot.priority-low {
  background: rgba(0, 0, 0, 0.3);
}

.light-theme .drag-handle {
  color: rgba(0, 0, 0, 0.3);
}

.light-theme .drag-handle:hover {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .action-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* Clean Task List */
.clean-task-list {
  background: transparent;
  margin-bottom: 1.5rem;
}

.clean-task-list:empty {
  display: none;
}

/* Override old task spacing */
#active-tasks,
#completed-tasks .clean-task-list {
  margin: 0;
  padding: 0;
}

/* Responsive spacing */
@media (max-width: 640px) {
  .clean-task-list {
    margin-bottom: 1rem;
  }
}

/* Mobile Task Menu */
.mobile-menu-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
  border-radius: 6px;
}

.mobile-menu-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-task-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px;
  min-width: 120px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  border-radius: 4px;
}

.mobile-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mobile-menu-item.delete {
  color: #ef4444;
}

.mobile-menu-item.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.mobile-task {
  position: relative;
}

/* Light theme mobile menu */
.light-theme .mobile-menu-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .mobile-menu-btn:hover {
  color: rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .mobile-task-menu {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.light-theme .mobile-menu-item {
  color: #333;
}

.light-theme .mobile-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Table-Style Task Layout */
.task-table-container {
  background: transparent;
  margin-bottom: 1.5rem;
}

.task-table-header {
  display: grid;
  grid-template-columns: 40px 32px 1fr 100px 120px 80px;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
}

.task-table-body {
  background: transparent;
}

.header-cell {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 4px;
}

.task-table-row {
  display: grid;
  grid-template-columns: 40px 32px 1fr 100px 120px 80px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.task-table-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.table-cell {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

/* Column-specific styling */
.checkbox-col {
  justify-content: center;
}

.drag-col {
  justify-content: center;
}

.task-col {
  min-width: 0; /* Allow text truncation */
  cursor: pointer;
}

.priority-col {
  justify-content: center;
}

.pomodoro-col {
  justify-content: center;
}

.actions-col {
  justify-content: center;
}

/* Task elements styling */
.task-title {
  font-size: 15px;
  font-weight: 500;
  color: white;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.task-title.completed {
  text-decoration: line-through;
  opacity: 0.5;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  position: relative;
}

.task-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.drag-handle {
  color: rgba(255, 255, 255, 0.25);
  cursor: grab;
  padding: 4px;
  transition: color 0.2s ease;
  border-radius: 4px;
}

.drag-handle:hover {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.drag-handle:active {
  cursor: grabbing;
}

.priority-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-badge.priority-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.priority-badge.priority-medium {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.priority-badge.priority-low {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.pomo-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.table-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.task-table-row:hover .table-actions {
  opacity: 1;
}

.table-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.table-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.table-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Mobile responsive table */
@media (max-width: 768px) {
  .task-table-header {
    grid-template-columns: 40px 1fr 80px 60px;
    gap: 12px;
  }
  
  .task-table-row {
    grid-template-columns: 40px 1fr 80px 60px;
    gap: 12px;
    padding: 20px 0;
  }
  
  .table-actions {
    opacity: 1; /* Always show on mobile */
  }
  
  .table-action-btn {
    width: 32px;
    height: 32px;
  }
}

/* Light theme support */
.light-theme .task-table-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .header-cell {
  color: rgba(0, 0, 0, 0.5);
}

.light-theme .task-table-row {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.light-theme .task-table-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .task-title {
  color: #333;
}

.light-theme .task-checkbox {
  border-color: rgba(0, 0, 0, 0.25);
}

.light-theme .drag-handle {
  color: rgba(0, 0, 0, 0.25);
}

.light-theme .drag-handle:hover {
  color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.05);
}

.light-theme .priority-badge.priority-low {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .pomo-count {
  color: rgba(0, 0, 0, 0.7);
}

.light-theme .table-action-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .table-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* Mobile Task Rows */
.mobile-task-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.mobile-task-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.mobile-task-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 12px;
}

.mobile-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.mobile-task-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.mobile-task-title {
  font-size: 15px;
  font-weight: 500;
  color: white;
  margin: 0 0 4px 0;
  line-height: 1.3;
  word-break: break-word;
}

.mobile-task-title.completed {
  text-decoration: line-through;
  opacity: 0.5;
}

.mobile-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.mobile-priority {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.mobile-priority.priority-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.mobile-priority.priority-medium {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.mobile-priority.priority-low {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.mobile-pomo-count {
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

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

.mobile-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

.mobile-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.mobile-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Light theme mobile */
.light-theme .mobile-task-row {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.light-theme .mobile-task-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.light-theme .mobile-task-title {
  color: #333;
}

.light-theme .mobile-priority.priority-low {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .mobile-pomo-count {
  color: rgba(0, 0, 0, 0.6);
}

.light-theme .mobile-action-btn {
  color: rgba(0, 0, 0, 0.4);
}

.light-theme .mobile-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.8);
}

/* ===== MODERN TASK TABLE DESIGN ===== */

/* Main Container */
.modern-task-container {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* Table Header */
.modern-table-header {
  display: grid;
  grid-template-columns: 40px 32px 1fr 120px 140px 80px;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Task Rows */
.modern-task-row {
  display: grid;
  grid-template-columns: 40px 32px 1fr 120px 140px 80px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.modern-task-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

/* Checkbox */
.modern-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  position: relative;
}

.modern-checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.modern-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 11px;
  font-weight: bold;
}

/* Drag Handle */
.drag-icon {
  color: rgba(255, 255, 255, 0.3);
  cursor: grab;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.drag-icon:hover {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

/* Task Name */
.task-name {
  font-size: 15px;
  font-weight: 500;
  color: white;
  line-height: 1.4;
  margin: 0;
  cursor: pointer;
}

/* Priority Tags */
.priority-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-tag.priority-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.priority-tag.priority-medium {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.priority-tag.priority-low {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Progress Display */
.progress-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.progress-numbers {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.progress-bar {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #f97316);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modern-task-row:hover .action-buttons {
  opacity: 1;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Mobile Meta */
.mobile-meta {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
}

.mobile-priority {
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.mobile-priority.priority-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.mobile-priority.priority-medium {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.mobile-priority.priority-low {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.mobile-progress {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Completed Section */
.completed-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.completed-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
}

.modern-task-row.completed {
  opacity: 0.6;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(255, 255, 255, 0.4);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modern-table-header {
    grid-template-columns: 40px 1fr 80px;
    gap: 12px;
    padding: 12px;
  }
  
  .modern-task-row {
    grid-template-columns: 40px 1fr 80px;
    gap: 12px;
    padding: 16px 12px;
  }
  
  .action-buttons {
    opacity: 1;
  }
}

/* Clean table-row task list */
.task-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.25rem;
}

.task-row:hover {
  background: rgba(255,255,255,0.05);
}

.light-theme .task-row:hover {
  background: rgba(0,0,0,0.04);
}

@media (max-width: 480px) {
  .clean-glass-form {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .clean-glass-form .form-header,
  .clean-glass-form .form-actions {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Button animation */
.btn-save {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -4px var(--primary);
}
.btn-save:active {
  transform: scale(0.97);
}

/* Remove paddings in mobile edit form body */
@media (max-width: 640px) {
  .mobile-form-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Mobile primary button styles */
.mobile-btn-primary {
  background: #dc2626 !important;
  color: white !important;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.2s ease;
}

.mobile-btn-primary:hover {
  background: #b91c1c !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -4px #dc2626;
}

.mobile-btn-primary:active {
  transform: scale(0.97);
}

/* =================================
   RESPONSIVE MODAL SYSTEM
   ================================= */

/* Base modal container */
.responsive-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.responsive-modal.active {
  display: flex;
}

/* Mobile-first: Bottom Sheet */
.responsive-modal-content {
  width: 100%;
  height: 85vh;
  max-height: 85vh;
  background: rgba(23, 23, 23, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

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

/* Bottom sheet handle */
.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 0 auto 16px;
  cursor: grab;
}

/* Desktop: Traditional centered modal */
@media (min-width: 768px) {
  .responsive-modal {
    align-items: center;
    padding: 20px;
  }
  
  .responsive-modal-content {
    width: auto;
    height: auto;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
  }
  
  .responsive-modal.active .responsive-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  
  .bottom-sheet-handle {
    display: none;
  }
}

/* Light theme support */
.light-theme .responsive-modal-content {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

.light-theme .bottom-sheet-handle {
  background: rgba(0, 0, 0, 0.2);
}

/* Mobile backdrop (subtle) */
.responsive-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.responsive-modal.active .responsive-modal-backdrop {
  opacity: 1;
}

/* Desktop backdrop (more prominent) */
@media (min-width: 768px) {
  .responsive-modal-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

/* Modal header styling */
.modal-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-theme .modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.light-theme .modal-close {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7);
}

.light-theme .modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: black;
}

/* Modal body scrolling */
.modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0; /* Important for flex child scrolling */
}

/* Mobile swipe gesture support */
@media (max-width: 767px) {
  .responsive-modal-content {
    touch-action: pan-y;
  }
  
  .bottom-sheet-handle {
    touch-action: pan-y;
  }
  
  .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile Modal Form Elements */
.responsive-modal .custom-select {
  position: relative;
  min-width: 120px;
}

.responsive-modal .custom-select select {
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.responsive-modal .custom-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: border-top-color 0.2s ease;
}

.responsive-modal .custom-select:hover select {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.responsive-modal .custom-select:hover::after {
  border-top-color: rgba(255, 255, 255, 0.8);
}

.responsive-modal .custom-range {
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.responsive-modal .custom-range:hover {
  background: rgba(255, 255, 255, 0.25);
}

.responsive-modal .custom-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff5252;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.4);
  transition: all 0.2s ease;
}

.responsive-modal .custom-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px rgba(255, 82, 82, 0.6);
  transform: scale(1.1);
}

.responsive-modal .custom-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff5252;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(255, 82, 82, 0.4);
  transition: all 0.2s ease;
}

.responsive-modal .switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.responsive-modal .switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.responsive-modal .switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.responsive-modal .switch-slider:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.responsive-modal .switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.responsive-modal .switch-input:checked + .switch-slider {
  background-color: #ff5252;
}

.responsive-modal .switch-input:checked + .switch-slider:before {
  transform: translateX(20px);
}

.responsive-modal .switch-input:focus + .switch-slider {
  box-shadow: 0 0 0 2px rgba(255, 82, 82, 0.2);
}

/* Light theme support for mobile modal */
.light-theme .responsive-modal .custom-select select {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
  color: #1f2937;
}

.light-theme .responsive-modal .custom-select::after {
  border-top-color: rgba(0, 0, 0, 0.6);
}

.light-theme .responsive-modal .custom-select:hover select {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
}

.light-theme .responsive-modal .custom-range {
  background: rgba(0, 0, 0, 0.2);
}

.light-theme .responsive-modal .switch-slider {
  background-color: rgba(0, 0, 0, 0.2);
}

.light-theme .responsive-modal .switch-slider:hover {
  background-color: rgba(0, 0, 0, 0.25);
}

.light-theme .responsive-modal .switch-slider:before {
  background-color: #1f2937;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.light-theme .responsive-modal .switch-input:checked + .switch-slider:before {
  background-color: white;
}