/* To-do-Tab */
.td-add { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 0.6rem; margin-bottom: 1rem; }
.td-add input, .td-edit input {
    background: rgba(0, 0, 0, 0.3); border: 1px solid var(--color-border); border-radius: var(--radius-small);
    padding: 0.65rem 0.85rem; min-width: 0; width: 100%; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.td-add input:hover, .td-edit input:hover { border-color: var(--color-border-strong); }
.td-add input:focus, .td-edit input:focus { outline: none; border-color: rgba(255, 122, 51, 0.6); box-shadow: var(--glow-accent); background: rgba(0, 0, 0, 0.45); }

.td-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.td-bar .tk-hint { margin-right: auto; }
.td-tabs { display: inline-flex; gap: 0.4rem; }
.td-tabs .tk-btn.is-on { border-color: rgba(255, 122, 51, 0.6); background: var(--color-accent-soft); }
.td-bar [hidden] { display: none; }

.td-msg { min-height: 1.2em; margin: 0.2rem 0 0.2rem; font-size: var(--fs-small); color: var(--color-error); }

.td-list { list-style: none; margin: 0; padding: 0; }
.td-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0; border-top: 1px solid var(--color-border); }
.td-item:first-child { border-top: none; }
.td-body { flex: 1; min-width: 0; }
.td-check { display: block; min-width: 0; }
.td-note { padding-left: 34px; margin: -0.3rem 0 0.2rem; color: var(--color-text-muted); font-size: var(--fs-small); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.td-meta { padding-left: 34px; margin-bottom: 0.45rem; font-size: var(--fs-tiny); color: var(--color-text-faint); }
.td-item.is-done .td-note { opacity: 0.6; }

.td-actions { display: flex; gap: 0.15rem; flex: none; padding-top: 6px; }
.td-icon {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; border: 0; background: none;
    color: var(--color-text-faint); transition: color 0.15s, background 0.15s;
}
.td-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.td-icon:hover { color: var(--color-text); background: var(--color-surface-hover); }
.td-icon--danger:hover { color: var(--color-error); background: var(--color-error-soft); }

.td-edit { display: grid; gap: 0.5rem; width: 100%; padding: 0.7rem 0; }
.td-edit-actions { display: flex; gap: 0.5rem; }

.td-empty { padding: 1.4rem 0.2rem; color: var(--color-text-faint); font-size: var(--fs-small); }

@media (max-width: 700px) {
    .td-add { grid-template-columns: minmax(0, 1fr); }
    .td-add .ao-run-btn { justify-self: start; }
    /* Schmal: Stift/Papierkorb rechts in die Datumszeile, damit der Titel die volle Breite bekommt */
    .td-item:not(.td-editing) { display: block; position: relative; }
    .td-actions { position: absolute; right: 0; bottom: 0.1rem; padding-top: 0; }
    .td-meta { min-height: 32px; display: flex; align-items: center; margin-bottom: 0; padding-right: 76px; }
}
