.add-form { display: flex; gap: 10px; flex-wrap: wrap; }
.add-form input[name="title"] { flex: 1; min-width: 220px; }
.add-form select, .add-form input[type="date"] { width: auto; }

.tabs { display: flex; gap: 4px; background: #f3f4f6; padding: 4px; border-radius: 9px; }
.tab { font: inherit; border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.tab span { background: #e5e7eb; border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list li.empty { justify-content: center; color: var(--muted); padding: 30px; }
.todo-list .check { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: var(--ok); }
.todo-list .body { flex: 1; min-width: 0; }
.todo-list .title { font-weight: 500; word-break: break-word; }
.todo-list .notes { color: var(--muted); font-size: 13px; white-space: pre-line; word-break: break-word; }
.todo-list .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 3px; }
.todo-list .meta .overdue { color: var(--danger); font-weight: 600; }
.todo-list li.done .title { text-decoration: line-through; color: var(--muted); }
.todo-list .ops { display: flex; gap: 6px; }
.prio { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; }
.prio.p3 { background: #fee2e2; color: #991b1b; }
.prio.p2 { background: #dbeafe; color: #1e40af; }
.prio.p1 { background: #f3f4f6; color: #4b5563; }

.dlg { border: 0; border-radius: 12px; padding: 22px; width: min(520px, 94vw); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(15,23,42,.45); }
.dlg h2 { margin: 0 0 14px; font-size: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
