.todos-shell {
    max-width: 780px;
    margin: 0 auto;
}

.todos-form {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.todos-form-label {
    padding-left: 4px;
    color: var(--text-3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.todos-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 58px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, var(--accent-soft) 0, transparent 38%),
        var(--surface-solid);
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.todos-composer:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm);
    transform: translateY(-1px);
}

.todos-composer-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.todos-composer-icon svg,
.todos-add svg,
.todo-complete svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.todos-composer input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-1);
    font-size: 15px;
}

.todos-composer input::placeholder {
    color: var(--text-4);
}

.todos-add {
    display: inline-flex;
    height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background .16s ease, transform .12s ease, opacity .16s ease;
}

.todos-add:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.todos-add:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

.todos-filters {
    display: inline-flex;
    gap: 3px;
    margin: 18px 0 8px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
}

.todos-filters button {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.todos-filters button:hover {
    color: var(--text-1);
}

.todos-filters button.is-active {
    background: var(--surface-solid);
    color: var(--accent-strong);
    box-shadow: var(--shadow-xs);
}

.todos-list {
    display: grid;
    gap: 8px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.todo-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-solid);
    box-shadow: var(--shadow-xs);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.todo-row:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.todo-complete {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-2);
    color: transparent;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .12s ease;
}

.todo-complete:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-strong);
    transform: scale(1.04);
}

.todo-complete:disabled {
    cursor: wait;
    opacity: .5;
    transform: none;
}

.todo-complete--done {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: default;
}

.todo-title {
    min-width: 0;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 550;
    overflow-wrap: anywhere;
}

.todos-empty {
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 13px;
    color: var(--text-4);
    text-align: center;
}

.todos-live {
    min-height: 1.3em;
    margin: 2px 0 0;
    color: var(--text-3);
    font-size: 12px;
}

.todos-live:empty {
    min-height: 0;
    margin: 0;
}

.todos-live.is-error,
.todos-error {
    color: var(--danger);
}

@media (max-width: 520px) {
    .todos-composer {
        grid-template-columns: auto minmax(0, 1fr);
        padding-right: 8px;
    }

    .todos-add {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 2px;
    }
}
