:root{--navy: #0f172a;--navy-soft: #1e293b;--accent: #2563eb;--accent-dark: #1d4ed8;--accent-soft: #eff6ff;--text: #0f172a;--text-muted: #64748b;--border: #e2e8f0;--bg: #f8fafc;--white: #fff;--success: #16a34a;--danger: #dc2626;--radius: 10px;--shadow: 0 1px 4px rgba(15, 23, 42, .06);--shadow-md: 0 4px 14px rgba(15, 23, 42, .1)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:Inter,system-ui,sans-serif;font-size:15px;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}.page-wrap{min-height:100dvh;display:flex;flex-direction:column}.content{flex:1;padding:24px 16px 48px;max-width:760px;margin:0 auto;width:100%}.nav{background:var(--navy);padding:0 20px;display:flex;align-items:center;gap:16px;height:56px;position:sticky;top:0;z-index:100}.nav-logo{font-weight:700;font-size:17px;letter-spacing:-.3px;color:#fff;text-decoration:none;white-space:nowrap}.nav-logo span{color:#93c5fd;font-weight:600}.nav-user{margin-left:auto;font-size:13px;color:#ffffffb3;display:flex;align-items:center;gap:10px}.nav-user-name{white-space:nowrap}.nav-user button{background:none;border:1px solid rgba(255,255,255,.25);color:#ffffffbf;font-size:12px;font-family:inherit;padding:5px 12px;border-radius:6px;cursor:pointer;transition:background .15s,color .15s}.nav-user button:hover{background:#ffffff1a;color:#fff}.auth-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--navy)}.auth-card{background:var(--white);border-radius:14px;padding:40px 32px;width:100%;max-width:400px;box-shadow:var(--shadow-md);text-align:center}.auth-card .logo{font-weight:700;font-size:22px;letter-spacing:-.4px;margin-bottom:10px;color:var(--navy)}.auth-card .logo span{color:var(--accent);font-weight:600}.auth-card h1{font-size:18px;font-weight:600;margin-bottom:8px}.auth-card p{color:var(--text-muted);font-size:14px;margin-bottom:24px}.form-group{margin-bottom:16px;text-align:left}label{display:block;font-size:13px;font-weight:500;margin-bottom:6px;color:var(--text)}.label-optional{color:var(--text-muted);font-weight:400}input[type=text],input[type=email],input[type=date],textarea,select{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:8px;font-size:15px;font-family:inherit;color:var(--text);background:var(--white);transition:border-color .15s;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #2563eb1f}textarea{resize:vertical;min-height:80px}.form-stack{display:flex;flex-direction:column}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 18px;border-radius:8px;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;border:none;transition:background .15s,opacity .15s;text-decoration:none;white-space:nowrap}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover:not(:disabled){background:var(--accent-dark)}.btn-secondary{background:var(--white);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){background:var(--bg)}.btn-lg{padding:12px 24px;font-size:15px}.btn-full{width:100%}.page-header{display:flex;align-items:center;gap:12px;margin-bottom:18px}.page-title{font-size:22px;font-weight:700;flex:1;letter-spacing:-.3px}.tab-bar{display:flex;gap:4px;border-bottom:2px solid var(--border);margin-bottom:14px;overflow-x:auto;scrollbar-width:none}.tab-bar::-webkit-scrollbar{display:none}.tab{background:none;border:none;font-family:inherit;font-size:14px;font-weight:500;color:var(--text-muted);padding:9px 14px;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;white-space:nowrap;transition:color .1s,border-color .1s}.tab:hover{color:var(--text)}.tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:600}.tab-open.active{color:#1d4ed8;border-bottom-color:#3b82f6}.tab-in_progress.active{color:#a16207;border-bottom-color:#eab308}.tab-done.active{color:#15803d;border-bottom-color:#22c55e}.todo-quickadd{display:flex;gap:8px;margin-bottom:16px}.todo-quickadd input{flex:1;min-width:0}@media(max-width:480px){.todo-quickadd{flex-direction:column}.todo-quickadd .btn{width:100%}}.filter-row{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}.filter-row .search-input{flex:1 1 220px}.filter-row select{flex:0 1 auto;width:auto;min-width:140px}@media(max-width:520px){.filter-row select{flex:1 1 45%;min-width:0}}.todo-list{display:flex;flex-direction:column;gap:10px}.todo-card{display:block;background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;text-decoration:none;color:inherit;box-shadow:var(--shadow);transition:box-shadow .15s,border-color .15s}.todo-card:hover{box-shadow:var(--shadow-md);border-color:#cbd5e1}.todo-card.status-open{background:#f5f9ff;border-color:#dbeafe}.todo-card.status-in_progress{background:#fefce8;border-color:#fdf0b8}.todo-card.status-done{background:#f2fdf5;border-color:#d3f5de}.todo-card.status-open:hover{border-color:#bfdbfe}.todo-card.status-in_progress:hover{border-color:#fde68a}.todo-card.status-done:hover{border-color:#bbf7d0}.todo-card.status-done{opacity:.72}.todo-card-top{display:flex;align-items:center;gap:8px;margin-bottom:8px}.todo-card-title{font-size:15px;font-weight:600;line-height:1.35;margin-bottom:2px}.todo-card.status-done .todo-card-title{text-decoration:line-through;text-decoration-thickness:1px}.todo-card-desc{font-size:13px;color:var(--text-muted);line-height:1.45;margin-bottom:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.todo-card-meta{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);margin-top:6px;flex-wrap:wrap}.badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap;text-transform:uppercase;letter-spacing:.03em}.urgency-urgent{background:#fee2e2;color:#b91c1c}.urgency-high{background:#ffedd5;color:#c2410c}.urgency-normal{background:#f1f5f9;color:#475569}.urgency-low{background:#f8fafc;color:#94a3b8;border:1px solid var(--border)}.chip{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:500;background:var(--accent-soft);color:var(--accent-dark);white-space:nowrap}.due-chip{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600;white-space:nowrap}.due-chip.due-upcoming{background:#f1f5f9;color:#475569}.due-chip.due-today{background:#fef9c3;color:#a16207}.due-chip.due-overdue{background:#fee2e2;color:#b91c1c}.expected-chip{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:500;white-space:nowrap;color:#94a3b8;border:1px dashed #cbd5e1;background:transparent}.status-badge{text-transform:none;letter-spacing:0}.status-badge.status-open{background:#dbeafe;color:#1d4ed8}.status-badge.status-in_progress{background:#fef9c3;color:#a16207}.status-badge.status-done{background:#dcfce7;color:#15803d}.status-seg{display:inline-flex;border:1px solid var(--border);border-radius:20px;overflow:hidden;flex-shrink:0;background:var(--white)}.status-seg-btn{border:none;background:none;padding:5px 12px;font-size:12.5px;font-weight:600;color:var(--text-muted);cursor:pointer;white-space:nowrap}.status-seg-btn+.status-seg-btn{border-left:1px solid var(--border)}.status-seg-btn:hover:not(.on){color:#334155;background:#f8fafc}.status-seg-btn:disabled{cursor:default;opacity:.6}.status-seg-btn.on.status-open{background:#dbeafe;color:#1d4ed8}.status-seg-btn.on.status-in_progress{background:#fef9c3;color:#a16207}.status-seg-btn.on.status-done{background:#dcfce7;color:#15803d}.status-dot{width:8px;height:8px;border-radius:50%;margin-left:auto;flex-shrink:0}.card-done-btn{margin-left:auto;flex-shrink:0;width:26px;height:26px;border-radius:50%;border:1.5px solid #cbd5e1;background:var(--white);color:#94a3b8;font-size:13px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:border-color .15s,color .15s,background .15s}.card-done-btn:hover{border-color:var(--success);background:#f0fdf4;color:var(--success)}.card-del-btn{flex-shrink:0;margin-left:8px;width:26px;height:26px;border-radius:50%;border:1.5px solid transparent;background:none;color:#b6c0cd;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:border-color .15s,color .15s,background .15s}.card-del-btn:hover{border-color:#fecaca;background:#fef2f2;color:#dc2626}.card-conclude{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:-4px;padding:10px 16px 12px;background:var(--white);border:1px solid var(--border);border-top:none;border-radius:0 0 var(--radius) var(--radius)}.card-conclude input{flex:1;min-width:180px}.todo-item>.todo-card:has(+.card-conclude){border-bottom-left-radius:0;border-bottom-right-radius:0}.status-dot.status-open{background:#3b82f6}.status-dot.status-in_progress{background:#eab308}.status-dot.status-done{background:var(--success)}.back-link{display:inline-flex;align-items:center;gap:6px;color:var(--text-muted);text-decoration:none;font-size:14px;margin-bottom:16px}.back-link:hover{color:var(--text)}.tcard{background:var(--white);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.tcard-head{padding:20px 22px 14px;border-bottom:1px solid var(--border)}.tcard-head.done{background:#f0fdf4;border-bottom-color:#bbf7d0}.tcard-title-row{display:flex;align-items:flex-start;gap:12px}.tcard-title{flex:1;font-size:21px;font-weight:700;letter-spacing:-.3px;line-height:1.3;cursor:text;min-width:0;overflow-wrap:anywhere}.tcard-title .pencil{font-size:13px;color:#cbd5e1;vertical-align:middle;visibility:hidden}.tcard-title:hover .pencil{visibility:visible}.title-input{flex:1;font-size:21px;font-weight:700;letter-spacing:-.3px;line-height:1.3;border:none!important;box-shadow:none!important;padding:0!important;background:transparent;border-radius:0}.title-input::placeholder{color:#cbd5e1;font-weight:600}.tcard-title-row .status-badge{margin-top:4px;flex-shrink:0}.tcard-title-row .status-seg{margin-top:4px}.tcard-meta{font-size:13px;color:var(--text-muted);margin-top:6px}.tcard-conclusion{margin-top:10px;padding:10px 12px;background:#ffffffa6;border:1px solid #bbf7d0;border-radius:8px}.tcard-conclusion-text{font-size:14px;line-height:1.55;color:#14532d;white-space:pre-wrap}.tcard-conclusion-meta{margin-top:6px;font-size:12px;color:#4d7c5f;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.link-btn{background:none;border:none;font-family:inherit;font-size:12px;font-weight:600;color:var(--accent);cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px}.link-btn:hover{color:var(--accent-dark)}.link-btn:disabled{opacity:.5;cursor:not-allowed}.tcard-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:14px 22px 0}.chip-select{appearance:none;-webkit-appearance:none;width:auto;border:1px solid var(--border);border-radius:20px;background:var(--bg);font-size:12.5px;font-weight:600;color:#475569;padding:4px 24px 4px 12px;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2394a3b8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.chip-select:hover:not(:disabled){border-color:#94a3b8}.chip-select:disabled{opacity:.55;cursor:default}.chip-select.chip-urgency-urgent{background-color:#fee2e2;border-color:#fecaca;color:#b91c1c}.chip-select.chip-urgency-high{background-color:#ffedd5;border-color:#fed7aa;color:#c2410c}.chip-select.chip-urgency-low{background-color:#f8fafc;color:#94a3b8}.chip-date{position:relative;display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:20px;background:var(--bg);font-size:12.5px;font-weight:600;color:#475569;padding:4px 12px;cursor:pointer}.chip-date:hover{border-color:#94a3b8}.chip-date.due-today{background:#fef9c3;border-color:#fde68a;color:#a16207}.chip-date.due-overdue{background:#fee2e2;border-color:#fecaca;color:#b91c1c}.chip-date-icon{font-size:10px;margin-right:5px;opacity:.7}.chip-date.chip-expected{background:transparent;border-style:dashed;border-color:#94a3b8;color:#475569;font-weight:500}.chip-date.chip-expected:hover{border-color:#64748b;color:#1e293b}.chip-date input[type=date]{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer;padding:0;border:none;pointer-events:none}.chip-clear{background:none;border:none;color:var(--text-muted);font-size:15px;line-height:1;cursor:pointer;padding:2px 4px;border-radius:50%}.chip-clear:hover{color:var(--danger)}.tcard-desc{padding:12px 22px 18px;border-bottom:1px solid var(--border)}.desc-label{font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;margin-bottom:6px}.desc-box{font-size:14px;line-height:1.6;white-space:pre-wrap;border-radius:8px;padding:12px 14px;cursor:text}.desc-text{color:#334155;background:#f8fafc;border:1px solid #eef2f7}.desc-text:hover{border-color:#cbd5e1;background:#f4f7fb}.desc-empty{color:#9aa7b8;background:#f8fafc;border:1px dashed #cbd5e1}.desc-empty:hover{border-color:#94a3b8;color:#64748b}.desc-empty.muted{cursor:default}.desc-input{width:100%;font-size:14px;line-height:1.6;border-radius:8px;background:#f8fafc}.tcard-updates{padding:16px 22px}.composer{display:flex;gap:8px;margin-bottom:14px}.composer input{flex:1;min-width:0}.note-item{padding:10px 0;border-top:1px solid #f1f5f9}.note-item:first-of-type{border-top:none}.note-head{display:flex;align-items:baseline;gap:10px;margin-bottom:3px}.note-author{font-size:13px;font-weight:600}.note-time{font-size:12px;color:var(--text-muted);margin-left:auto;white-space:nowrap}.note-body{font-size:14px;line-height:1.55;white-space:pre-wrap;color:#334155}.history-toggle{display:block;background:none;border:none;font-family:inherit;font-size:12.5px;font-weight:500;color:var(--text-muted);cursor:pointer;padding:8px 0 2px;margin-top:4px;border-top:1px solid #f1f5f9;width:100%;text-align:left}.history-toggle:hover{color:var(--text)}.sys-item{display:flex;align-items:baseline;gap:10px;font-size:12.5px;color:var(--text-muted);padding:4px 0}.tcard-footer{padding:14px 22px 18px;border-top:1px solid var(--border);background:#fafbfc}.footer-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.btn-delete{background:none;border:none;font-family:inherit;font-size:13px;font-weight:500;color:#94a3b8;cursor:pointer;padding:8px 10px;border-radius:6px}.btn-delete:hover{color:#dc2626;background:#fef2f2}.btn-delete:disabled{opacity:.5;cursor:default}.conclude-inline{display:flex;flex-direction:column;gap:10px}.conclude-inline label{font-weight:600}.conclude-actions{display:flex;gap:10px}.spinner{width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.loading-center{display:flex;align-items:center;justify-content:center;min-height:200px}.empty-state{text-align:center;padding:56px 16px;color:var(--text-muted)}.empty-state h3{font-size:16px;margin-bottom:8px;color:var(--text)}.empty-state p{font-size:14px}.alert{padding:10px 14px;border-radius:8px;font-size:14px;margin-bottom:14px}.alert-error{background:#fee2e2;color:#991b1b}.alert-success{background:#dcfce7;color:#166534}@media(max-width:520px){.content{padding:18px 12px 40px}.page-title{font-size:19px}.nav{padding:0 14px}.nav-user-name{max-width:110px;overflow:hidden;text-overflow:ellipsis}.tcard-head,.tcard-desc,.tcard-updates,.tcard-footer,.tcard-chips{padding-left:16px;padding-right:16px}.tcard-title,.title-input{font-size:18px}.conclude-actions .btn{flex:1}}
