* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

body {
    font-family: 'Playpen Sans', sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.page-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 40px 40px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    gap: 20px;
    min-height: 35vh;
    margin-bottom: 20px;
    justify-content: space-between;
    flex-wrap: wrap; /* Change from nowrap to wrap */
    width: 100%;
}

.task-column {
    flex: 1 1 100%; /* Change from calc(50% - 20px) to 100% */
    background: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #3d3d3d;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 100px;
}

.task-column h2 {
    margin-bottom: 15px;
    color: #ff6b2b;
    font-weight: 600;
}

.add-task-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

.add-task-btn:hover {
    background-color: #5dbd61;
}

/* Enhanced tooltip styling */
.add-task-btn[title]:hover:after {
    /* content: attr(title); */
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #363636;
    color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #444;
    z-index: 100;
}

.task-item {
    background: #363636;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    -webkit-user-drag: element;
    user-select: none;
    cursor: grab;
    border: 1px solid #444;
    transition: all 0.2s ease;
    width: 100%;
    min-width: 0;  /* Allows flex item to shrink below content size */
    max-width: 100%;
}

.task-item:hover, .task-item:focus {
    background: #404040;
    border-color: #ff6b2b;
}

.task-item:focus {
    outline: none;
}

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

.task-item.dragging {
    opacity: 0.5;
    border: 2px dashed #4CAF50;
    background: #404040;
}

.task-url-link {
    background: #363636;
    border: 1px solid #ff6b2b;
    color: #ff6b2b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    text-decoration: none;
    font-size: 1em;
    font-weight: bolder;
    padding: 0;
}

.task-url-link:hover, .task-url-link:focus-visible {
    background: #ff6b2b;
    color: white;
    transform: scale(1.05);
    outline: none;
}

/* Task deletion animation */
@keyframes taskComplete {
    0% {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
        margin-bottom: 8px;
    }
    70% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.task-item.completing,
.subtask-list .task-item.completing {
    animation: taskComplete 0.5s ease forwards;
    pointer-events: none;
}

.task-list {
    min-height: 10px;
    padding: 8px 0;
    max-height: 60vh;
    overflow: auto;
    scrollbar-gutter: stable;
    flex-grow: 1;
    width: 100%;
    max-width: 100%;
}

.task-list::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.task-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.task-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Custom checkbox styling */
.task-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b2b;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: transparent;
}

.task-checkbox:checked {
    background-color: #ff6b2b;
    border-color: #ff6b2b;
}

.task-checkbox:checked::before {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-checkbox:hover {
    border-color: #ff8951;
    transform: scale(1.05);
}

.task-checkbox:checked:hover {
    background-color: #ff8951;
    border-color: #ff8951;
}

.task-name {
    cursor: pointer;
    -webkit-user-drag: none;
    user-select: none;
    color: #e0e0e0;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 40%;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.task-tags:empty {
    display: none;
}

.task-item:has(.task-tags:empty) .task-name {
    max-width: none;
    flex: 1;
}

.task-name span {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px; /* Always reserve space for scrollbar */
    margin-bottom: -4px; /* Offset the padding to maintain consistent height */
}

/* Hide scrollbar by default */
.task-name span::-webkit-scrollbar {
    height: 4px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Show scrollbar only on hover */
.task-name:hover span::-webkit-scrollbar {
    opacity: 1;
}

/* Apply same scrollbar behavior to deleted tasks */
.deleted-task-item .task-name span::-webkit-scrollbar {
    display: none;
}

.deleted-task-item .task-name:hover span::-webkit-scrollbar {
    display: block;
}

.add-subtask-button {
    background: #363636;
    border: 1px solid #ff6b2b;
    color: #ff6b2b;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1em;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    flex-shrink: 0; /* Prevent button from shrinking */
    margin-left: auto; /* Push button to the right when no badge */
}

.add-subtask-button:hover {
    background: #ff6b2b;
    color: white;
    transform: scale(1.05);
}

.task-panel, .deleted-tasks-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    pointer-events: auto;  /* Enable pointer events by default */
}

.task-panel.active, .deleted-tasks-panel.active {
    display: block;
}

.task-panel.dragging-subtask {
    pointer-events: none;  /* Disable pointer events when dragging */
}

.task-panel.no-click {
    pointer-events: none;  /* Disable pointer events when drag ended */
}

.panel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 660px;
    max-height: 90vh; /* Limit height to 90% of viewport height */
    overflow-y: auto; /* Add vertical scrollbar when needed */
    border: 1px solid #3d3d3d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: auto !important;  /* Always enable pointer events for panel content */
}

/* Add scrollbar styling for panel content */
.panel-content::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.close-panel {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    color: #ff6b2b;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-panel:hover {
    color: #ff8951;
}

#task-name, #task-description, #task-url {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 4px;
    background: #363636;
    color: #e0e0e0;
}

#task-description {
    height: 100px;
    resize: vertical;
}

.save-task {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.save-task:hover {
    background-color: #5dbd61;
}

.save-task:disabled {
    background-color: #3a5c3b;
    color: #888;
    cursor: not-allowed;
}

#subtask-name, #subtask-description, #subtask-url {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 4px;
    background: #363636;
    color: #e0e0e0;
}

#subtask-description {
    height: 100px;
    resize: vertical;
}

.save-subtask {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.save-subtask:hover {
    background-color: #5dbd61;
}

.save-subtask:disabled {
    background-color: #3a5c3b;
    color: #888;
    cursor: not-allowed;
}

.subtasks {
    margin-top: 15px;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.subtask-list {
    margin: 10px 0;
    max-height: 200px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.subtask-list::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.subtask-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.subtask-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.bottom-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px auto;
    width: fit-content;
}

.show-deleted-btn {
    padding: 8px 16px;
    background-color: #ff6b2b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.show-deleted-btn:hover {
    background-color: #ff8951;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sync-btn {
    padding: 8px 12px;
    background-color: transparent;
    color: #ff6b2b;
    border: 1px solid #ff6b2b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-btn:hover {
    background-color: #ff6b2b;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 43, 0.3);
}

.deleted-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #363636;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid #444;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.deleted-task-item .task-name {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 80px); /* Account for restore button */
    overflow: hidden;
    height: 20px; /* Set fixed height */
}

.deleted-task-item .task-name span {
    display: block;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    height: 100%;
    padding-bottom: 4px; /* Always reserve space for scrollbar */
    margin-bottom: -4px; /* Offset the padding */
    scrollbar-gutter: stable; /* Ensure scrollbar space is always reserved */
}

/* Update scrollbar styling for completed tasks */
.deleted-task-item .task-name span::-webkit-scrollbar {
    height: 4px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s;
}

.deleted-task-item .task-name:hover span::-webkit-scrollbar {
    opacity: 1;
}

.deleted-task-item .task-name:hover span::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.deleted-task-item .task-name:hover span::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.restore-task-btn {
    padding: 4px 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.restore-task-btn:hover {
    background-color: #5dbd61;
}

.subtask-list .task-item {
    background: #363636;
    border-left: 3px solid #4CAF50;
    margin: 5px 0;
    padding: 8px;
    width: 100%;
    min-width: 0;
    cursor: grab;
    transition: all 0.2s ease;
}

.subtask-list .task-item .task-name {
    flex: 1;
    min-width: 0;  /* Allows flex item to shrink below content size */
    white-space: nowrap;
    overflow: hidden;
}

.subtask-list .task-item .task-name span {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px; /* Reserve space for scrollbar */
    margin-bottom: -4px; /* Offset the padding */
}

/* Hide scrollbar by default */
.subtask-list .task-item .task-name span::-webkit-scrollbar {
    height: 4px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Show scrollbar on hover */
.subtask-list .task-item .task-name:hover, span::-webkit-scrollbar {
    opacity: 1;
}

.subtask-list .task-item.dragging {
    opacity: 0.5;
    border: 2px dashed #4CAF50;
    background: #404040;
    cursor: grabbing;
}

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

.subtask-list .task-item:hover {
    background: #404040;
    border-color: #ff6b2b;
}

.remove-subtask-btn {
    background: none;
    border: none;
    color: #ff6b2b;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
    transition: color 0.2s ease;
}

.remove-subtask-btn:hover {
    color: #ff8951;
}

.subtask-badge {
    background-color: #ff6b2b;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.8em;
    margin-left: 5px;
    flex-shrink: 0; /* Prevent badge from shrinking */
    margin-right: 5px; /* Add margin to separate badge from + button */
}

.hero-banner {
    background: #2d2d2d;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid #3d3d3d;
}

.hero-banner h1 {
    color: #ff6b2b;
    margin: 0;
    font-size: 2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.add-subtask-btn {
    width: auto;
    padding: 8px 16px;
    margin-top: 10px;
    background-color: #363636;
    color: #ff6b2b;
    border: 1px solid #ff6b2b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-subtask-btn::before {
    content: '+';
    font-size: 1.2em;
    font-weight: bold;
}

.add-subtask-btn:hover {
    background-color: #ff6b2b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 107, 43, 0.2);
}

.deleted-task-list {
    max-height: 60vh;
    overflow: auto;
    scrollbar-gutter: stable;
    margin: 10px 0;
}

.deleted-task-list::-webkit-scrollbar {
    width: 8px;
    background: transparent;
}

.deleted-task-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.deleted-task-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.bottom-bar {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 10px 16px;
    margin-top: auto;
    background-color: #1a1a1a;
    box-sizing: border-box;
}

.clear-all-btn {
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background-color: #ff6b2b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-all-btn:hover {
    background-color: #ff8951;
}

.panel-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.panel-footer .clear-all-btn,
.panel-footer .close-completed-btn {
    flex: 1;
    padding: 10px;
    margin-top: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: center;
}

.close-completed-btn {
    padding: 10px 20px;
    background-color: #363636;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-completed-btn:hover {
    background-color: #444;
    border-color: #ff6b2b;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.button-container .save-task,
.button-container .close-task-btn,
.button-container .save-subtask,
.button-container .close-subtask-btn {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: center;
    margin-top: 0;
}

.close-task-btn,
.close-subtask-btn {
    background-color: #363636;
    color: white;
    border: 1px solid #444;
}

.close-task-btn:hover,
.close-subtask-btn:hover {
    background-color: #444;
    border-color: #ff6b2b;
}

.save-subtask {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.save-subtask:hover {
    background-color: #5dbd61;
}

.save-subtask:disabled {
    background-color: #3a5c3b;
    color: #888;
    cursor: not-allowed;
}

/* Quill Editor Styles */
.ql-toolbar.ql-snow {
    border: 1px solid #444;
    background: #363636;
    border-radius: 4px 4px 0 0;
}

.ql-container.ql-snow {
    border: 1px solid #444;
    border-top: 0;
    background: #363636;
    color: #e0e0e0;
    border-radius: 0 0 4px 4px;
    min-height: 100px;
    margin-bottom: 10px;
}

.ql-editor.ql-blank::before {
    color: #888;
}

.ql-snow .ql-stroke {
    stroke: #e0e0e0;
}

.ql-snow .ql-fill {
    fill: #e0e0e0;
}

.ql-snow .ql-picker {
    color: #e0e0e0;
}

.ql-snow .ql-picker-options {
    background-color: #363636;
    border-color: #444;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
    color: #ff6b2b;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow .ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke {
    stroke: #ff6b2b;
}

.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow .ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill {
    fill: #ff6b2b;
}

/* Make the Quill editor fit the panel width */
#task-description-editor,
#subtask-description-editor {
    margin-bottom: 15px;
}

.task-panel.dragging-subtask {
    background-color: rgba(0, 0, 0, 0.3);  /* Lighter overlay when dragging */
}

/* Add media query for wider screens */
@media screen and (min-width: 768px) {
    .container {
        flex-wrap: nowrap;
    }
    
    .task-column {
        flex: 1 1 calc(50% - 20px);
    }

    .hero-banner {
        background: #2d2d2d;
        padding: 20px;
        text-align: center;
        margin-bottom: 30px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        overflow: hidden;
        position: relative;
        border: 1px solid #3d3d3d;
    }
    
    .hero-logo {
        height: 150px;
        transform:  scale(5, 4.5) translateY(3px);
    }
}

@media screen and (max-width: 768px) {
    .hero-logo {
        width: -webkit-fill-available;
        height: 50px;
        transform: scale(2.5, 10) translateY(1.3px);
    }

    .tag-autocomplete-container {
        width: calc(100vw - 40px) !important;
        left: 20px !important;
        right: 20px;
    }

}

/* Loading overlay */
#loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
#loading-overlay.active {
    display: flex;
}
.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: #2d2d2d;
    border-radius: 8px;
    padding: 28px 36px;
    color: #e0e0e0;
    font-size: 0.95em;
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #444;
    border-top-color: #ff6b2b;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-error-icon {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    align-items: center;
    justify-content: center;
}
#loading-dismiss-btn {
    display: none;
    padding: 6px 18px;
    background: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}
#loading-dismiss-btn:hover {
    background: #4a4a4a;
}
#loading-overlay.error .loading-spinner {
    display: none;
}
#loading-overlay.error .loading-error-icon {
    display: flex;
}
#loading-overlay.error #loading-label {
    color: #e07070;
}
#loading-overlay.error #loading-dismiss-btn {
    display: block;
}

/* Quill changes for my dark theme */
.ql-editor li[data-list=checked] > .ql-ui:before,
.ql-editor li[data-list=unchecked] > .ql-ui:before {
    color: #d1af8e;
    font-variant: emoji
}
.ql-snow a {
    color: #5e9ddc;
    font-variant: emoji
}
.ql-container {
    font-size: 14.5px;
}

/* Tag/Label feature */
.task-item {
    position: relative;
}

.task-tags {
    flex: 1;
    min-width: 0;
    min-height: 28px;
    display: flex;
    cursor: pointer;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.task-tags::-webkit-scrollbar {
    display: none;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72em;
    color: white;
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

.tag-remove {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 1.1em;
    line-height: 1;
    margin-left: 1px;
}

.tag-pill:hover .tag-remove {
    opacity: 1;
}

.tag-button {
    background: transparent;
    border: 1px solid #555;
    color: #777;
    cursor: pointer;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
}

.task-item:hover .tag-button,
.task-item:focus-within .tag-button {
    opacity: 1;
}

@media (hover: none), screen and (max-width: 768px) {
    .tag-button {
        opacity: 1;
        border: none;
    }
}

.tag-button:hover {
    background: #ff6b2b;
    color: white;
    border-color: #ff6b2b;
}

/* Tag autocomplete dropdown */
.tag-autocomplete-container {
    position: fixed;
    z-index: 9999;
    width: 220px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
    overflow: hidden;
}

.tag-input {
    width: 100%;
    padding: 7px 10px;
    background: #2d2d2d;
    border: none;
    border-bottom: 1px solid #444;
    color: #e0e0e0;
    font-size: 0.85em;
    outline: none;
}

.tag-input::placeholder {
    color: #666;
}

.tag-dropdown {
    max-height: 180px;
    overflow-y: auto;
    scrollbar-width: none;
}

.tag-dropdown::-webkit-scrollbar {
    display: none;
}

.tag-dd-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    font-size: 0.85em;
    color: #e0e0e0;
    cursor: pointer;
}

.tag-dd-item:hover,
.tag-dd-item.highlighted {
    background: #3a3a3a;
    color: #ff6b2b;
}

.tag-dd-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-dd-item .tag-dd-remove {
    margin-left: auto;
    color: #555;
    font-size: 1em;
    line-height: 1;
    padding: 0 2px;
}

.tag-dd-item:hover .tag-dd-remove {
    color: #888;
}

.tag-dd-item .tag-dd-remove:hover {
    color: #e55;
}

.tag-dd-empty {
    padding: 8px 10px;
    font-size: 0.8em;
    color: #666;
}

.panel-tags-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    min-height: 32px;
}

.panel-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    flex: 1;
}

.panel-tags-list .tag-remove {
    opacity: 0.7;
}

.panel-tags-list .tag-pill:hover .tag-remove {
    opacity: 1;
}

.panel-tag-button {
    background: transparent;
    border: 1px solid #555;
    color: #777;
    cursor: pointer;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
}

.panel-tag-button:hover {
    background: #ff6b2b;
    color: white;
    border-color: #ff6b2b;
}
