/* Description Modal Styles */

/* Description icon styles */
.todo-btn.description {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.todo-btn.description:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.todo-btn.description.has-description {
    color: #3b82f6;
}

.todo-btn.description.has-description:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Description indicator in todo text */
.description-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    opacity: 0.7;
}

.todo-text .description-indicator {
    margin-left: 6px;
}

.todo-meta .description-indicator {
    margin-left: 8px;
    font-size: 12px;
}

/* Description modal styles */
.description-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.description-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.description-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.task-workspace-modal {
    width: min(1480px, calc(100vw - 96px));
    max-width: none;
    max-height: 88vh;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .description-modal-content {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

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

.description-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.description-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.description-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.description-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#due-date-modal .description-modal-body {
    gap: 12px;
}

.task-primary-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-primary-editor-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.task-primary-editor-title {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    cursor: text;
}

.task-primary-editor-input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    color: inherit;
}

.task-workspace-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.88fr);
    gap: 24px;
    align-items: start;
}

.task-workspace-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.task-workspace-column-main {
    padding-right: 6px;
}

.task-workspace-column-side {
    padding-left: 6px;
}

.task-workspace-section,
.task-workspace-section-topless {
    margin-top: 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fbfcff;
}

.task-planning-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.task-planning-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.task-planning-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.task-planning-type-select {
    min-height: 48px;
    border-radius: 14px;
}

.task-planning-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-planning-timing-actions {
    padding-top: 2px;
}

.task-planning-quick-btn {
    appearance: none;
    border: 1px solid #dbe1ea;
    background: #f8fbff;
    color: #475569;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-planning-quick-btn:hover {
    border-color: #6366f1;
    color: #4f46e5;
    transform: translateY(-1px);
}

.task-planning-quick-btn:focus-visible {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.task-planning-quick-btn.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.22);
}

.task-planning-editor-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-planning-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.task-planning-badge.event {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

.task-planning-summary {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.task-workspace-section {
    border-top: 1px solid #e5e7eb;
}

.task-workspace-section-topless {
    border-top: 1px solid #e5e7eb;
}

#due-date-input,
#due-date-recurring-pattern,
#due-date-schedule-type,
#due-date-start-date,
#due-date-end-date,
#due-date-start-time,
#due-date-end-time {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: 16px;
    min-height: 56px;
}

#due-date-modal .due-date-shortcuts-modal,
#due-date-modal #due-date-recurring-pattern {
    margin-top: 0;
}

.todo-event-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.todo-all-day-toggle {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #dbe1ea;
    border-radius: 14px;
    background: #f8fbff;
    font-weight: 600;
    color: #475569;
}

.todo-all-day-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.todo-composer-event-fields .todo-all-day-toggle {
    grid-column: auto;
    width: auto;
    margin-bottom: 0 !important;
    min-height: 36px;
    padding: 8px 12px;
    justify-self: stretch;
    align-self: end;
}

.todo-composer-event-fields .checkbox-label {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .task-planning-editor-header {
        flex-wrap: wrap;
    }

    .task-planning-editor-controls {
        gap: 10px;
    }

    .task-planning-quick-btn {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        text-align: center;
    }
}

.input-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.todo-event-fields.hidden {
    display: none;
}

.description-textarea {
    width: 100%;
    min-height: 260px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background-color: #ffffff;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.description-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.description-textarea::placeholder {
    color: #9ca3af;
}

.subtasks-editor {
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.subtasks-editor.task-workspace-section,
.subtasks-editor.task-workspace-section-topless,
.tags-editor.task-workspace-section,
.tags-editor.task-workspace-section-topless,
.comments-editor.task-workspace-section,
.attachments-editor.task-workspace-section,
.history-editor.task-workspace-section {
    margin-top: 0;
    padding-top: 18px;
}

.tags-editor {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.comments-editor {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.attachments-editor {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.history-editor {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.subtasks-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tags-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.comments-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.attachments-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.history-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.subtasks-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.tags-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.comments-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.history-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.subtasks-editor-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.tags-editor-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.comments-editor-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.history-editor-count {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.subtasks-editor-add {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.tags-editor-add {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.tags-editor-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.comments-editor-add {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.attachments-editor-add {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.subtasks-editor-input {
    flex: 1;
}

.tags-editor-input {
    flex: 1;
}

.comments-editor-input {
    flex: 1;
    width: 100%;
    min-height: 84px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    resize: vertical;
    background: #ffffff;
    color: #111827;
}

.attachments-editor-input {
    flex: 1 1 240px;
}

.comments-editor-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subtasks-editor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tags-editor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.comments-editor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachments-editor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-editor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subtasks-editor-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 0;
}

.tags-editor-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 0;
}

.comments-editor-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 0;
}

.history-editor-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 0;
}

.subtasks-editor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.subtasks-editor-drag-handle {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: grab;
    font-size: 16px;
    line-height: 1;
    padding: 2px 3px;
}

.subtasks-editor-item.dragging {
    opacity: 0.7;
}

.subtasks-editor-item.drop-target {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.subtasks-editor-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
}

.subtasks-editor-text {
    flex: 1;
    font-size: 14px;
    color: #111827;
}

.subtasks-editor-body {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.subtasks-editor-text-btn {
    border: none;
    background: transparent;
    text-align: left;
    cursor: text;
    padding: 0;
    font: inherit;
}

.subtasks-editor-inline-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.4;
    background: #ffffff;
    color: #111827;
}

.subtasks-editor-inline-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.subtasks-editor-item.completed .subtasks-editor-text {
    text-decoration: line-through;
    color: #6b7280;
}

.subtasks-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 11px;
    color: #64748b;
}

.subtasks-editor-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.subtasks-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.subtasks-editor-remove svg {
    width: 16px;
    height: 16px;
}

.subtasks-editor-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.tags-editor-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}

.tags-editor-chip.is-editing {
    background: #ffffff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.tags-editor-label {
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    line-height: 1.2;
}

.tags-editor-label:hover {
    color: #1e40af;
}

.tags-editor-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tags-editor-edit,
.tags-editor-save,
.tags-editor-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #60a5fa;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.tags-editor-edit svg {
    width: 14px;
    height: 14px;
}

.tags-editor-edit:hover,
.tags-editor-save:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.12);
}

.tags-editor-cancel:hover,
.tags-editor-remove:hover {
    color: #ef4444;
}

.tags-editor-rename-input {
    min-width: 110px;
    max-width: 170px;
    border: none;
    background: transparent;
    color: #1e3a8a;
    font: inherit;
    font-weight: 700;
    padding: 0;
    outline: none;
}

.tags-editor-suggestion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tags-editor-suggestion:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.tags-editor-suggestion.active {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.tags-editor-remove {
    border: none;
    background: transparent;
    color: #60a5fa;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.tags-editor-remove:hover {
    color: #ef4444;
}

.comments-editor-item {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.attachments-editor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.attachments-editor-main {
    flex: 1;
    min-width: 0;
}

.attachments-editor-link {
    display: inline-block;
    max-width: 100%;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachments-editor-link:hover {
    text-decoration: underline;
}

.attachments-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.attachments-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.attachments-editor-remove svg {
    width: 16px;
    height: 16px;
}

.attachments-editor-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.comments-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.comments-editor-date {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.comments-editor-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #111827;
    white-space: pre-wrap;
    word-break: break-word;
}

.comments-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.comments-editor-remove svg {
    width: 16px;
    height: 16px;
}

.comments-editor-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.history-editor-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
}

.history-editor-bullet {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    flex-shrink: 0;
}

.history-editor-content {
    flex: 1;
    min-width: 0;
}

.history-editor-label {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.history-editor-date {
    font-size: 12px;
    color: #6b7280;
}

.todo-comments-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.todo-comments-summary:hover {
    border-color: #c7d2fe;
    color: #4338ca;
    background: #eef2ff;
}

.todo-history-summary {
    border-color: #ede9fe;
    color: #6d28d9;
    background: #f5f3ff;
}

.todo-attachments-summary {
    border-color: #dbeafe;
    color: #1d4ed8;
    background: #eff6ff;
}

.todo-linked-summary {
    border-color: #dcfce7;
    color: #15803d;
    background: #f0fdf4;
}

.linked-tasks-editor.task-workspace-section {
    padding-top: 20px;
}

.linked-tasks-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.linked-tasks-editor-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.linked-tasks-editor-count {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
}

.linked-tasks-editor-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 14px;
}

.linked-tasks-editor-select {
    min-height: 46px;
}

.linked-tasks-editor-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.linked-tasks-editor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.linked-tasks-editor-link {
    flex: 1;
    min-width: 0;
    display: block;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.linked-tasks-editor-link:hover {
    color: #4f46e5;
    transform: translateX(2px);
}

.linked-tasks-editor-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
    flex-shrink: 0;
}

.linked-tasks-editor-remove svg {
    width: 16px;
    height: 16px;
}

.linked-tasks-editor-remove:hover {
    background: #fee2e2;
}

/* Dark mode textarea */
@media (prefers-color-scheme: dark) {
    .description-textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .description-textarea:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .description-textarea::placeholder {
        color: #9ca3af;
    }

    .subtasks-editor {
        border-top-color: #4b5563;
    }

    .tags-editor {
        border-top-color: #4b5563;
    }

    .comments-editor {
        border-top-color: #4b5563;
    }

    .attachments-editor {
        border-top-color: #4b5563;
    }

    .history-editor {
        border-top-color: #4b5563;
    }

    .task-workspace-section,
    .task-workspace-section-topless {
        background: rgba(255, 255, 255, 0.03);
        border-color: #4b5563;
    }

    .subtasks-editor-title {
        color: #f9fafb;
    }

    .tags-editor-title {
        color: #f9fafb;
    }

    .comments-editor-title {
        color: #f9fafb;
    }

    .history-editor-title,
    .history-editor-label {
        color: #f9fafb;
    }

    .subtasks-editor-count,
    .subtasks-editor-empty {
        color: #d1d5db;
    }

    .tags-editor-count,
    .tags-editor-empty {
        color: #d1d5db;
    }

    .comments-editor-count,
    .comments-editor-empty,
    .comments-editor-date {
        color: #d1d5db;
    }

    .history-editor-count,
    .history-editor-empty,
    .history-editor-date {
        color: #d1d5db;
    }

    .subtasks-editor-item {
        background: #374151;
        border-color: #4b5563;
    }

    .subtasks-editor-text {
        color: #f9fafb;
    }

    .subtasks-editor-inline-input {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .subtasks-editor-drag-handle {
        color: #9ca3af;
    }

    .tags-editor-chip {
        background: rgba(59, 130, 246, 0.15);
        border-color: rgba(96, 165, 250, 0.35);
        color: #bfdbfe;
    }

    .comments-editor-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    .comments-editor-item {
        background: #374151;
        border-color: #4b5563;
    }

    .comments-editor-text {
        color: #f9fafb;
    }

    .attachments-editor-item {
        background: #374151;
        border-color: #4b5563;
    }

    .attachments-editor-link {
        color: #93c5fd;
    }

    .attachments-editor-meta {
        color: #d1d5db;
    }

    .todo-comments-summary {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.12);
        color: #e5e7eb;
    }
}

.description-modal-footer {
    padding: 22px 24px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.description-modal-autosave {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.description-modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.description-modal-btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
}

.description-modal-btn-cancel:hover {
    background-color: #e5e7eb;
}

.description-modal-btn-save {
    background-color: #3b82f6;
    color: #ffffff;
}

.description-modal-btn-save:hover {
    background-color: #2563eb;
}

/* Dark mode buttons */
@media (prefers-color-scheme: dark) {
    .description-modal-autosave {
        color: #d1d5db;
    }

    .description-modal-btn-cancel {
        background-color: #374151;
        color: #f9fafb;
    }
    
    .description-modal-btn-cancel:hover {
        background-color: #4b5563;
    }
    
    .description-modal-btn-save {
        background-color: #3b82f6;
        color: #ffffff;
    }
    
    .description-modal-btn-save:hover {
        background-color: #2563eb;
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .description-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .description-modal-header,
    .description-modal-body,
    .description-modal-footer {
        padding: 16px;
    }

    .description-modal-footer {
        justify-content: flex-end;
    }

    .description-modal-autosave {
        flex-basis: 100%;
    }

    .description-modal-body {
        gap: 12px;
    }

    #due-date-modal .description-modal-body {
        gap: 10px;
    }
    
    .description-textarea {
        min-height: 150px;
    }

    .subtasks-editor-add {
        flex-direction: column;
        align-items: stretch;
    }

    .tags-editor-add {
        flex-direction: column;
        align-items: stretch;
    }

    .comments-editor-add {
        flex-direction: column;
        align-items: stretch;
    }

    .attachments-editor-add {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 1080px) {
    .task-workspace-modal {
        width: min(1120px, calc(100vw - 48px));
    }

    .task-workspace-body {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .task-workspace-column-main,
    .task-workspace-column-side {
        padding: 0;
    }
}

/* Animation for modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.description-modal.show .description-modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Table view specific styles */
.todo-table .description-cell {
    text-align: center;
    width: 60px;
}

.todo-table .description-indicator {
    margin: 0;
}

/* Grid view specific styles */
.todo-card .description-indicator {
    margin-left: 8px;
    font-size: 12px;
}

/* List view specific styles */
.todo-item .description-indicator {
    margin-left: 6px;
    font-size: 12px;
}
