/* ============================================================================
   Todo Lists Workspace - Apple Reminders-like UX
   ============================================================================ */

/* ============================================================================
   Sidebar - Todo Lists
   ============================================================================ */
/* Search Bar */
/* Search Results State */
.todos-search-results-header {
    margin: 8px 16px;
}

/* Sidebar Loading Skeleton */
.todos-sidebar-skeleton {
    padding: 8px;
}

.todos-skeleton-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

.todos-skeleton-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--hover) 25%, var(--border-color) 50%, var(--hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.todos-skeleton-text {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--hover) 25%, var(--border-color) 50%, var(--hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    flex: 1;
}

/* Empty State - No List Selected */
.todos-empty-state {
    flex: 1;
    padding: 48px 32px;
    max-width: 400px;
    margin: 0 auto;
}

/* No Lists Empty State - Full workspace empty */
.todos-no-lists-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
}

.todos-no-lists-illustration {
    position: relative;
    width: 180px;
    height: 160px;
    margin-bottom: 32px;
}

.todos-no-lists-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.todos-no-lists-card {
    position: absolute;
    width: 100px;
    height: 70px;
    border-radius: 12px;
    background: var(--background);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 6px;
    transition: transform 0.3s ease;
}

.todos-no-lists-card:nth-child(1) {
    top: 20px;
    left: 0;
    transform: rotate(-8deg);
    z-index: 1;
}

.todos-no-lists-card:nth-child(2) {
    top: 10px;
    left: 40px;
    transform: rotate(4deg);
    z-index: 2;
}

.todos-no-lists-card:nth-child(3) {
    top: 30px;
    right: 0;
    transform: rotate(12deg);
    z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
    .todos-no-lists-state:hover .todos-no-lists-card:nth-child(1) {
        transform: rotate(-12deg) translateY(-4px);
    }
}

@media (hover: hover) and (pointer: fine) {
    .todos-no-lists-state:hover .todos-no-lists-card:nth-child(2) {
        transform: rotate(0deg) translateY(-8px);
    }
}

@media (hover: hover) and (pointer: fine) {
    .todos-no-lists-state:hover .todos-no-lists-card:nth-child(3) {
        transform: rotate(8deg) translateY(-4px);
    }
}

.todos-no-lists-card-line {
    height: 8px;
    border-radius: 4px;
    background: var(--hover);
}

.todos-no-lists-card-line:first-child {
    width: 60%;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary-color) 100%);
    opacity: 0.6;
}

.todos-no-lists-card-line:nth-child(2) {
    width: 80%;
}

.todos-no-lists-card-line:nth-child(3) {
    width: 45%;
}

.todos-no-lists-plus {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb, 59, 130, 246), 0.4);
    z-index: 10;
}

.todos-no-lists-plus svg {
    width: 24px;
    height: 24px;
}

.todos-no-lists-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px;
    line-height: 1.3;
}

.todos-no-lists-text {
    font-size: 14px;
    color: var(--text-color-secondary);
    margin: 0 0 28px;
    line-height: 1.6;
    max-width: 320px;
}

/* ============================================================================
   List Header
   ============================================================================ */

/*
 * The whole main area shares one centered reading column so the header,
 * the todo rows and the composer align perfectly on wide screens.
 * --todos-col controls the column width, --todos-gutter the minimum
 * horizontal breathing room on narrow screens.
 */
.todos-main {
    --todos-col: 720px;
    --todos-gutter: 24px;
}

.todos-list-header {
    padding: 24px max(var(--todos-gutter), calc((100% - var(--todos-col)) / 2)) 12px;
    border-bottom: 1px solid var(--border-color);
}

.todos-list-header-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.todos-list-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    flex-shrink: 0;
}

.todos-list-header-icon svg {
    width: 20px;
    height: 20px;
}

.todos-list-header-info {
    flex: 1;
    min-width: 0;
}

.todos-list-header-title {
    font-size: 20px;
    font-weight: 650;
    color: var(--text-color);
    margin: 0;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todos-list-header-description {
    font-size: 13px;
    color: var(--text-color-secondary);
    margin: 2px 0 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================================
   Todos List Container
   ============================================================================ */
.todos-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.todos-list-container {
    flex: 1;
    overflow-y: auto;
    /* Same centered column as the header and the composer. */
    padding: 10px max(var(--todos-gutter), calc((100% - var(--todos-col)) / 2)) 24px;
}

/* The kanban board benefits from the full width, so drop the column cap. */
.todos-list-container:has(.todos-kanban-board) {
    padding-inline: var(--todos-gutter);
}

.todos-list-container::-webkit-scrollbar {
    width: 6px;
}

.todos-list-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* ============================================================================
   Todo Item - Apple Reminders Style
   ============================================================================ */
.todo-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.15s ease, opacity 0.2s ease;
}

/* Hairline divider between rows, hidden while a row is highlighted. */
.todo-item + .todo-item::before {
    content: "";
    position: absolute;
    top: 0;
    /* Start the divider after select + checkbox + gaps so it aligns with the text. */
    inset-inline-start: 72px;
    inset-inline-end: 12px;
    height: 1px;
    background: var(--border-color);
    opacity: 0.6;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .todo-item:hover {
        background: var(--hover);
    }

    .todo-item:hover::before,
    .todo-item:hover + .todo-item::before {
        opacity: 0;
    }
}

.todo-item.completed {
    opacity: 0.55;
}

.todo-item.completed .todo-item-content {
    text-decoration: line-through;
    color: var(--text-color-secondary);
}

/* Checkbox */
.todo-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.todo-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.todo-checkbox-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--background);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
    .todo-checkbox input:hover + .todo-checkbox-visual {
        border-color: var(--primary-color);
    }
}

.todo-checkbox input:focus-visible + .todo-checkbox-visual {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.todo-checkbox input:checked + .todo-checkbox-visual {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.todo-checkbox-visual svg {
    width: 12px;
    height: 12px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.todo-checkbox input:checked + .todo-checkbox-visual svg {
    opacity: 1;
    transform: scale(1);
}

/* Todo Content */
.todo-item-body {
    flex: 1;
    min-width: 0;
}

.todo-item-content {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

.todo-item-notes {
    font-size: 13px;
    color: var(--text-color-secondary);
    line-height: 1.4;
    margin: 4px 0 0;
    word-wrap: break-word;
}

.todo-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-color-tertiary);
}

.todo-item-due {
    display: flex;
    align-items: center;
    gap: 4px;
}

.todo-item-due svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.todo-item-due.overdue {
    color: var(--error-color);
    font-weight: 500;
}

.todo-item-priority {
    display: flex;
    align-items: center;
    gap: 2px;
}

.todo-item-priority.high {
    color: var(--error-color);
}

.todo-item-priority.medium {
    color: var(--pending);
}

/* ============================================================================
   Add Todo Input - floating composer card
   ============================================================================ */
.todos-add-container {
    /* Follows the shared reading column; safe-area aware for phones. */
    padding: 8px max(var(--todos-gutter), calc((100% - var(--todos-col)) / 2))
        calc(16px + env(safe-area-inset-bottom, 0px));
}

.todos-add-form {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 7px 10px;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.todos-add-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.todos-add-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.todos-add-fields {
    display: grid;
    flex: 1;
    min-width: 0;
}

.todos-add-input {
    width: 100%;
    min-width: 0;
    padding: 3px 0;
    font-size: 15px;
    color: var(--text-color);
    background: transparent;
    border: none;
    outline: none;
}

.todos-add-input::placeholder {
    color: var(--text-color-tertiary);
}

.todos-add-notes {
    width: 100%;
    min-width: 0;
    padding: 2px 0;
    font-size: 13px;
    color: var(--text-color);
    background: transparent;
    border: none;
    outline: none;
    display: none;
}

.todos-add-notes.visible {
    display: block;
}

.todos-add-notes::placeholder {
    color: var(--text-color-tertiary);
}

.todos-add-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.todos-add-tool {
    position: relative;
}

.todos-add-tool-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-color-tertiary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.todos-add-tool-button.active,
.todos-add-tool-button[aria-expanded="true"] {
    background: var(--primary-light);
    color: var(--primary-color);
}

@media (hover: hover) and (pointer: fine) {
    .todos-add-tool-button:hover {
        background: var(--hover);
        color: var(--text-color);
    }
}

.todos-add-tool-button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.todos-add-tool-icon,
.todos-add-tool-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.todos-add-form.submitting {
    opacity: 0.65;
    pointer-events: none;
}

.todos-add-popover {
    position: absolute;
    inset-inline-end: 0;
    bottom: calc(100% + 10px);
    z-index: 120;
    width: min(280px, calc(100vw - 40px));
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.todos-add-popover[hidden] {
    display: none;
}

.todos-add-popover-label {
    display: block;
    margin: 0 0 8px;
    color: var(--text-color-secondary);
    font-size: 12px;
    font-weight: 600;
}

.todos-add-popover-input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: none;
    background: var(--input-bg);
    color: var(--text-color);
    font: inherit;
    font-size: 13px;
}

.todos-add-popover-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.todos-add-due-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.todos-add-popover-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
}

.todos-add-priority-popover {
    display: grid;
    gap: 3px;
    width: min(220px, calc(100vw - 40px));
    padding: 6px;
}

.todos-add-priority-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    font-size: 13px;
    text-align: start;
    cursor: pointer;
}

.todos-add-priority-option.selected {
    background: var(--primary-light);
    color: var(--primary-color);
}

.todos-add-option-check {
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    opacity: 0;
}

.todos-add-option-check svg {
    width: 16px;
    height: 16px;
}

.todos-add-priority-option.selected .todos-add-option-check {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .todos-add-priority-option:hover {
        background: var(--hover);
    }
}

.todos-add-priority-option:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.todos-add-native-select {
    display: none;
}

/* ============================================================================
   Loading States
   ============================================================================ */
.todos-loading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
}

.todo-skeleton {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
}

.todo-skeleton-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--hover) 25%, var(--border-color) 50%, var(--hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    flex-shrink: 0;
}

.todo-skeleton-body {
    flex: 1;
}

.todo-skeleton-title {
    height: 16px;
    width: 70%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--hover) 25%, var(--border-color) 50%, var(--hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    margin-bottom: 8px;
}

.todo-skeleton-notes {
    height: 12px;
    width: 50%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--hover) 25%, var(--border-color) 50%, var(--hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

/* ============================================================================
   Empty List State
   ============================================================================ */
.todos-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.todos-list-empty-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--hover);
    color: var(--text-color-secondary);
    margin-bottom: 16px;
}

.todos-list-empty-icon svg {
    width: 28px;
    height: 28px;
}

.todos-list-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 6px;
}

.todos-list-empty-text {
    font-size: 13px;
    color: var(--text-color-secondary);
    margin: 0;
}

/* ============================================================================
   Routed List Editor Page
   ============================================================================ */
.todos-list-editor-page {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.todos-list-editor-page[hidden] {
    display: none;
}

.todos-list-editor-shell {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 28px var(--todos-gutter) 48px;
}

.todos-list-editor-header {
    margin-bottom: 28px;
}

.todos-list-editor-title {
    margin: 0;
    color: var(--text-color);
    font-size: 22px;
    font-weight: 650;
    line-height: 1.3;
}

.todos-list-editor-form {
    display: grid;
    gap: 22px;
}

.todos-list-editor-field {
    min-width: 0;
}

.todos-list-editor-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color-secondary);
    margin-bottom: 8px;
}

.todos-list-editor-input,
.todos-list-editor-textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text-color);
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.todos-list-editor-input:focus,
.todos-list-editor-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 59, 130, 246), 0.12);
}

.todos-list-editor-input::placeholder,
.todos-list-editor-textarea::placeholder {
    color: var(--text-color-tertiary);
}

.todos-list-editor-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.todos-list-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 6px;
}

/* The picker remains inside page flow but scrolls when the viewport is short. */
.todos-list-editor-page .todos-icon-picker-dropdown {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* ============================================================================
   Icon Picker
   ============================================================================ */
.todos-icon-picker {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.todos-icon-picker-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .todos-icon-picker-trigger:hover {
        border-color: var(--text-color-secondary);
    }
}

.todos-icon-picker-trigger:focus {
    outline: none;
    border-color: var(--primary-color);
}

.todos-icon-picker-preview {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.todos-icon-picker-preview svg {
    width: 20px;
    height: 20px;
    color: white;
}

.todos-icon-picker-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    text-align: left;
}

.todos-icon-picker-caret {
    width: 16px;
    height: 16px;
    color: var(--text-color-secondary);
    transition: transform 0.2s ease;
}

.todos-icon-picker-caret svg {
    display: block;
    width: 100%;
    height: 100%;
}

.todos-icon-picker.open .todos-icon-picker-caret {
    transform: rotate(180deg);
}

.todos-icon-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    max-height: 360px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 260px;
}

.todos-icon-picker.open-up .todos-icon-picker-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(8px);
}

.todos-icon-picker.align-end .todos-icon-picker-dropdown {
    left: auto;
    right: 0;
}

.todos-icon-picker.open .todos-icon-picker-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .todos-icon-picker-dropdown,
    .todos-icon-picker.open .todos-icon-picker-dropdown,
    .todos-icon-picker.open-up .todos-icon-picker-dropdown {
        transition: none;
        transform: none;
    }
}

.todos-icon-picker-section {
    padding: 12px;
}

.todos-icon-picker-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.todos-icon-picker-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color-tertiary);
    margin: 0 0 10px;
}

.todos-icon-picker-panel {
    display: none;
}

.todos-icon-picker-panel.active {
    display: block;
}

/* Icon Grid */
.todos-icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.todos-icon-option {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--hover);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .todos-icon-option:hover {
        background: var(--border-color);
        transform: scale(1.05);
    }
}

.todos-icon-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.todos-icon-option svg {
    width: 18px;
    height: 18px;
}

/* Color Picker Grid */
.todos-color-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.todos-color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .todos-color-option:hover {
        transform: scale(1.1);
    }
}

.todos-color-option.selected {
    border-color: var(--text-color);
}

.todos-color-option.selected::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}

/* Updated list item icon with background color */
.todos-list-item-icon.has-color {
    background: var(--icon-bg-color, var(--hover));
}

.todos-list-item-icon.has-color svg {
    color: white;
}

.todos-list-header-icon.has-color {
    background: var(--icon-bg-color, var(--primary-light));
}

.todos-list-header-icon.has-color svg {
    color: white;
}

/* ============================================================================
   Header Filter and Sort Menus
   ============================================================================ */
.todos-list-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.todos-header-selector {
    position: relative;
}

.todos-header-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    min-height: 32px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
    .todos-header-trigger:hover {
        color: var(--text-color);
        background: var(--hover);
    }
}

.todos-header-trigger:focus-visible {
    outline: none;
    border-color: var(--primary-color);
}

.todos-header-trigger svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.todos-header-trigger .caret {
    transition: transform 0.2s ease;
}

.todos-header-selector.open .todos-header-trigger .caret {
    transform: rotate(180deg);
}

.todos-header-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-end: 0;
    min-width: 180px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
    max-height: min(360px, 70vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.todos-header-selector.open .todos-header-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.todos-header-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.1s ease;
    text-align: start;
}

@media (hover: hover) and (pointer: fine) {
    .todos-header-option:hover {
        background: var(--hover);
    }
}

.todos-header-option.selected {
    color: var(--primary-color);
    font-weight: 500;
}

.todos-header-option-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-tertiary);
}

.todos-header-option.selected .todos-header-option-icon {
    color: var(--primary-color);
}

.todos-header-option-icon svg {
    width: 14px;
    height: 14px;
}

.todos-header-option-check {
    width: 16px;
    height: 16px;
    margin-inline-start: auto;
    opacity: 0;
}

.todos-header-option-check svg {
    width: 16px;
    height: 16px;
}

.todos-header-option.selected .todos-header-option-check {
    opacity: 1;
    color: var(--primary-color);
}

.todos-mobile-back-btn {
    margin: 0 8px 6px -8px;
    color: var(--primary-color);
}

/*
 * The visual checkbox stays 22px, but on touch devices the invisible input
 * is enlarged to a ~40px hit area so completing a todo is easy to tap.
 */
@media (hover: none), (pointer: coarse) {
    .todo-checkbox input {
        top: -9px;
        left: -9px;
        width: 40px;
        height: 40px;
    }
}

/* ============================================================================
   Responsive Design - Mobile Sub-Sidebar Pattern
   ============================================================================ */
@media (max-width: 768px) {
    .todos-list-editor-shell {
        padding: 14px var(--todos-gutter) 32px;
    }

    .todos-list-editor-header {
        margin-bottom: 22px;
    }

    .todos-list-editor-title {
        font-size: 19px;
    }

    .todos-icon-picker {
        flex-direction: column;
        gap: 10px;
    }

    .todos-icon-picker-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 100%;
    }

    /* Tighter gutter drives the header, list and composer alignment. */
    .todos-main {
        --todos-gutter: 12px;
    }

    /* Adjust header for back button */
    .todos-list-header {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .todos-list-header-top {
        gap: 10px;
    }

    .todos-list-header-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .todos-list-header-icon svg {
        width: 18px;
        height: 18px;
    }

    .todos-list-header-title {
        font-size: 17px;
    }

    /* The board toggle collapses to an icon-only button to save space. */
    .todos-board-toggle span {
        display: none;
    }

    .todos-board-toggle {
        padding: 6px 8px;
    }

    .todo-item {
        padding: 12px 8px;
    }

    /* Divider offset follows the reduced row padding. */
    .todo-item + .todo-item::before {
        inset-inline-start: 68px;
        inset-inline-end: 8px;
    }

    /* Comfortable touch targets for row actions. */
    .todo-edit-btn,
    .todo-delete-btn {
        width: 36px;
        height: 36px;
    }

    .todos-add-container {
        padding-top: 6px;
    }

    .todos-add-form {
        gap: 7px;
        padding: 7px 8px;
    }

    .todos-add-notes {
        font-size: 12px;
    }

    .todos-add-tools {
        gap: 2px;
    }

    .todos-add-tool-button {
        width: 32px;
        height: 32px;
    }

    .todos-add-tool:first-child .todos-add-popover {
        inset-inline-end: -72px;
    }

    .todos-add-tool:nth-child(2) .todos-add-popover {
        inset-inline-end: -36px;
    }

    /* Empty states responsive */
    .todos-empty-state {
        padding: 32px 20px;
    }

    .todos-no-lists-state {
        padding: 32px 20px;
    }

    .todos-no-lists-illustration {
        width: 160px;
        height: 140px;
        margin-bottom: 24px;
    }

    .todos-no-lists-card {
        width: 85px;
        height: 60px;
        padding: 8px;
    }

    .todos-no-lists-plus {
        width: 40px;
        height: 40px;
    }

    .todos-no-lists-plus svg {
        width: 20px;
        height: 20px;
    }

    .todos-no-lists-title {
        font-size: 18px;
    }

    .todos-no-lists-text {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .todos-sidebar-empty-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .todos-sidebar-empty-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* On narrow phones the compact controls move together below the title. This
   avoids truncating the list name while keeping filter and sort side by side. */
@media (max-width: 560px) {
    .todos-list-header-top {
        flex-wrap: wrap;
    }

    .todos-list-header-actions {
        width: 100%;
        margin-inline-start: 0;
        justify-content: flex-end;
    }

    .todos-header-trigger > span {
        max-width: 104px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .todos-list-header-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .todos-list-header-icon svg {
        width: 16px;
        height: 16px;
    }

    .todos-list-header-title {
        font-size: 16px;
    }

    .todos-list-header-description {
        font-size: 12px;
    }

    .todos-no-lists-illustration {
        width: 140px;
        height: 120px;
    }

    .todos-no-lists-card {
        width: 75px;
        height: 52px;
        padding: 6px;
        gap: 4px;
    }

    .todos-no-lists-card-line {
        height: 6px;
    }
     }

/* ============================================================================
   Todo List Item Menu (Three Dots Dropdown)
   ============================================================================ */

.todos-list-item {
    position: relative;
}

.todos-list-item-menu-btn {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-color-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
    z-index: 2;
}

.todos-list-item-menu-btn:focus,
.todos-list-item:has([data-todo-dropdown].open) .todos-list-item-menu-btn {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .todos-list-item:hover .todos-list-item-menu-btn {
        opacity: 1;
    }
}
@media (hover: none), (pointer: coarse) {
    .todos-list-item .todos-list-item-menu-btn {
        opacity: 1;
    }
}

@media (hover: hover) and (pointer: fine) {
    .todos-list-item-menu-btn:hover {
        background: var(--hover);
        color: var(--text-color);
    }
}

.todos-list-item-menu-btn:focus {
    outline: none;
}

.todos-list-item-menu-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.todos-list-item-menu-btn svg {
    width: 16px;
    height: 16px;
}

/* Active state overrides for dropdown visibility */
.todos-list-item:has([data-todo-dropdown].open) {
    background: var(--hover);
}

/* Mobile adjustments for dropdown */
@media (max-width: 768px) {
    .todos-list-item-menu-btn {
        opacity: 1;
    }
    
     }

/* ============================================================================
   Marked Todos Feature
   ============================================================================ */

/* Sidebar divider between marked list and regular lists */
.todos-sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 12px;
}

/* Marked list item styling */
.todos-marked-list-item {
    background: linear-gradient(135deg, rgba(251, 140, 0, 0.08) 0%, rgba(251, 140, 0, 0.04) 100%);
    border: 1px solid rgba(251, 140, 0, 0.15);
}

@media (hover: hover) and (pointer: fine) {
    .todos-marked-list-item:hover {
        background: linear-gradient(135deg, rgba(251, 140, 0, 0.12) 0%, rgba(251, 140, 0, 0.08) 100%);
    }
}

.todos-marked-list-item.active {
    background: linear-gradient(135deg, rgba(251, 140, 0, 0.18) 0%, rgba(251, 140, 0, 0.12) 100%);
    border-color: rgba(251, 140, 0, 0.3);
}

.todos-marked-list-item .todos-list-item-name {
    color: #E65100;
    font-weight: 600;
}

.todos-marked-list-item.active .todos-list-item-name {
    color: #E65100;
}

.todos-marked-list-item .todos-list-item-count {
    background: rgba(251, 140, 0, 0.15);
    color: #E65100;
    font-weight: 600;
}

/* Mark button on todo items */
.todo-mark-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-color-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.todo-mark-btn:focus, .todo-mark-btn.active {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .todo-item:hover .todo-mark-btn {
        opacity: 1;
    }
}
@media (hover: none), (pointer: coarse) {
    .todo-item .todo-mark-btn {
        opacity: 1;
    }
}

@media (hover: hover) and (pointer: fine) {
    .todo-mark-btn:hover {
        background: var(--hover);
        color: #FB8C00;
    }
}

.todo-mark-btn:focus {
    outline: none;
}

.todo-mark-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.todo-mark-btn.active {
    color: #FB8C00;
}

@media (hover: hover) and (pointer: fine) {
    .todo-mark-btn.active:hover {
        background: rgba(251, 140, 0, 0.1);
    }
}

.todo-mark-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .todo-mark-btn:hover svg {
        transform: scale(1.1);
    }
}

.todo-mark-btn:active svg {
    transform: scale(0.95);
}

/* Marked todo item styling */
.todo-item.marked {
    background: linear-gradient(135deg, rgba(251, 140, 0, 0.06) 0%, transparent 100%);
    border-left: 3px solid #FB8C00;
    padding-left: 9px;
}

/* Highlighted rows do not need the hairline divider. */
.todo-item.marked::before,
.todo-item.marked + .todo-item::before {
    opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
    .todo-item.marked:hover {
        background: linear-gradient(135deg, rgba(251, 140, 0, 0.1) 0%, var(--hover) 100%);
    }
}

/* List info in marked view */
.todo-item-list-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px 2px 4px;
    background: var(--hover);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-color-secondary);
    margin-right: 8px;
}

.todo-item-list-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    flex-shrink: 0;
}

.todo-item-list-icon svg {
    width: 10px;
    height: 10px;
    color: white;
}

.todo-item-list-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Mobile adjustments for mark button */
@media (max-width: 768px) {
    .todo-mark-btn {
        opacity: 1;
        width: 36px;
        height: 36px;
    }
    
    .todo-mark-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .todo-item.marked {
        padding-left: 5px;
    }
    
    .todo-item-list-info {
        font-size: 10px;
        padding: 1px 6px 1px 3px;
    }
    
    .todo-item-list-icon {
        width: 16px;
        height: 16px;
    }
    
    .todo-item-list-icon svg {
        width: 8px;
        height: 8px;
    }

    .todo-item-list-name {
        max-width: 70px;
    }
     }

/* Dark mode adjustments for marked todos */
@media (prefers-color-scheme: dark) {
    .todos-marked-list-item .todos-list-item-name {
        color: #FFB74D;
    }
    
    .todos-marked-list-item.active .todos-list-item-name {
        color: #FFB74D;
    }
    
    .todos-marked-list-item .todos-list-item-count {
        color: #FFB74D;
    }
     }

[data-theme="dark"] .todos-marked-list-item .todos-list-item-name,
[data-theme="dark"] .todos-marked-list-item.active .todos-list-item-name,
[data-theme="dark"] .todos-marked-list-item .todos-list-item-count {
    color: #FFB74D;
}

/* ============================================================================
   Sharing Styles
   ============================================================================ */

/* Subscribed list indicator */
.todos-list-item.subscribed {
    border-left: 3px solid #10b981;
}

.todos-list-subscribed-badge {
    display: inline;
    font-size: 11px;
    font-weight: 400;
    color: #10b981;
    margin-left: 6px;
}

.todos-dropdown-button-shared {
    color: var(--primary-color);
}

.todos-dropdown-button-shared svg {
    color: var(--primary-color);
}

/* ============================================================================
   Accept Shared Modal Styles
   ============================================================================ */

.share-accept-overlay {
    --shared-modal-z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.share-accept-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-accept-modal {
    --shared-modal-width: 440px;
}

.share-accept-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-accept-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.share-accept-header-text {
    flex: 1;
    min-width: 0;
}

.share-accept-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #10b981;
    margin: 0 0 6px;
}

.share-accept-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-accept-owner {
    font-size: 13px;
    color: var(--text-color-secondary);
    margin: 0;
}

.share-accept-desc {
    font-size: 13px;
    color: var(--text-color-secondary);
    line-height: 1.5;
    margin: 0 0 16px;
}

.share-accept-preview {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.75)
    );
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.share-accept-preview-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color-secondary);
    margin: 0 0 10px;
}

.share-accept-preview-content {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
}

.share-accept-preview-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.share-accept-preview-content li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}

.share-accept-preview-content li:last-child {
    border-bottom: none;
}

[data-mode="dark"] .share-accept-preview {
    background: linear-gradient(
        135deg,
        rgba(32, 35, 41, 0.95),
        rgba(22, 24, 29, 0.9)
    );
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65);
}

[data-mode="dark"] .share-accept-preview-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-mode="dark"] .share-accept-preview-content {
    color: rgba(255, 255, 255, 0.9);
}

.todos-task-priority-select .admin-select-menu,
.todos-task-status-select .admin-select-menu {
    background: var(--surface-elevated, var(--background));
    border-color: var(--border-color);
}

/* Board/List view toggle - ghost button next to the sort selector */
.todos-board-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    min-height: 32px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.todos-board-toggle.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.todos-board-toggle svg,
.todo-edit-btn svg,
.todo-delete-btn svg {
    width: 16px;
    height: 16px;
}

.todo-item-tags,
.todo-item-checklist,
.todo-item-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: var(--text-color-secondary);
    font-size: 12px;
}

.todo-item-checklist,
.todo-item-links {
    color: var(--text-color-tertiary);
}

.todo-item-tags span {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--hover);
    color: var(--text-color-secondary);
}

/* Row action buttons (edit / delete / mark) */
.todo-edit-btn,
.todo-delete-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color-tertiary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* On pointer devices, actions stay hidden until the row is hovered. */
@media (hover: hover) and (pointer: fine) {
    .todo-edit-btn,
    .todo-delete-btn {
        opacity: 0;
    }

    .todo-item:hover .todo-edit-btn,
    .todo-item:hover .todo-delete-btn,
    .todo-edit-btn:focus-visible,
    .todo-delete-btn:focus-visible {
        opacity: 1;
    }
}

.todo-edit-btn:focus-visible,
.todo-delete-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

@media (hover: hover) and (pointer: fine) {
    .todo-edit-btn:hover,
    .todos-board-toggle:hover {
        background: var(--hover);
        color: var(--text-color);
    }

    .todo-delete-btn:hover {
        background: var(--hover);
        color: var(--error-color);
    }
}

.todo-inline-edit-input {
    width: 100%;
    min-height: 30px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: var(--background);
    color: var(--text-color);
    font: inherit;
    padding: 4px 6px;
}

.todos-kanban-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    padding: 12px 0;
}

.todos-kanban-column {
    min-width: 0;
    border: none;
    border-radius: 14px;
    background: var(--hover);
}

.todos-kanban-column-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 14px 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-color-secondary);
}

.todos-kanban-column-body {
    min-height: 160px;
    padding: 4px 8px 8px;
}

/* Cards inside a board column sit on the column tint, so give them a surface. */
.todos-kanban-column .todo-item {
    background: var(--background);
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.todos-kanban-column .todo-item + .todo-item::before {
    display: none;
}

.todos-kanban-empty {
    padding: 18px 8px;
    color: var(--text-color-secondary);
    text-align: center;
    font-size: 13px;
}

.todo-item.dragging {
    opacity: 0.55;
}

.todos-command-palette-overlay {
    --shared-modal-z-index: 10000;
}

.todos-command-palette-overlay.visible {
    display: grid;
}

/*
 * Task editing uses the shared workspace CRUD shell. The shell owns the
 * backdrop, surface, border, animation, and footer; this component only sets
 * a wider responsive size and gives the form body the single scroll region.
 */
.delete-warning-card.workspace-crud-card.todos-task-details-modal {
    --shared-modal-width: 820px;
}

.todos-task-details-body {
    display: grid;
    gap: 18px;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.todos-task-details-field {
    display: grid;
    align-content: start;
    min-width: 0;
}

.todos-task-details-field .form-label {
    margin-bottom: 7px;
    color: var(--text-color-secondary);
    font-weight: 600;
}

.todos-task-details-field > .form-input,
.todos-task-details-due-inputs > .form-input {
    min-height: 42px;
    padding: 9px 11px;
    background: var(--modal-surface, var(--input-bg, var(--background)));
    border-color: var(--modal-border, var(--border-color));
    border-radius: 9px;
}

.todos-task-details-field textarea.form-input {
    min-height: 112px;
    line-height: 1.45;
    resize: vertical;
}

.todos-task-details-field textarea.todos-task-details-notes {
    min-height: 88px;
}

.todos-task-details-meta {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}

.todos-task-details-schedule-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.todos-task-details-due-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-width: 0;
}

.todos-task-details-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--modal-border, var(--border-color));
    border-radius: 9px;
    background: var(--modal-surface, var(--input-bg, var(--background)));
    color: var(--text-color);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.todos-task-details-extras {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.todos-task-priority-select,
.todos-task-status-select {
    min-width: 0;
}

.todos-task-priority-select .admin-select-trigger,
.todos-task-status-select .admin-select-trigger {
    height: 42px;
    border-color: var(--modal-border, var(--border-color));
    border-radius: 9px;
    background: var(--modal-surface, var(--input-bg, var(--background)));
    color: var(--text-color);
    font-size: 14px;
}

@media (max-width: 760px) {
    .todos-task-details-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .todos-task-details-schedule {
        grid-column: 1 / -1;
    }

    .todos-task-details-extras {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .todos-task-details-body {
        gap: 15px;
        scrollbar-gutter: auto;
    }

    .todos-task-details-meta,
    .todos-task-details-schedule-controls {
        grid-template-columns: 1fr;
    }

    .todos-task-details-schedule {
        grid-column: auto;
    }

    .todos-task-details-check {
        width: 100%;
    }
}

.todos-command-list button {
    min-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background);
    color: var(--text-color);
    cursor: pointer;
    padding: 7px 12px;
}

.todos-command-list {
    display: grid;
    gap: 8px;
}

.todos-command-list button {
    text-align: left;
}

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

@media (max-width: 480px) {
    .todos-list-editor-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/*
 * Reduced animations: no dedicated rules are needed here. init.css globally
 * disables all transitions/animations with !important for the OS-level
 * prefers-reduced-motion preference. Every affordance in this file (hover
 * reveals, focus rings, active states) also works without motion.
 */
