:root{--primary:#6366f1;--primary-hover:#4f46e5;--bg:#f8fafc;--bg-card:#fff;--bg-hover:#f1f5f9;--text:#1e293b;--text-secondary:#64748b;--text-muted:#94a3b8;--border:#e2e8f0;--shadow:0 1px 3px #00000014, 0 1px 2px #0000000f;--shadow-md:0 4px 6px #00000012, 0 2px 4px #0000000f;--radius:8px;--radius-lg:12px;--priority-low:#22c55e;--priority-medium:#f59e0b;--priority-high:#ef4444;--tag-blue:#3b82f6;--tag-purple:#8b5cf6;--tag-pink:#ec4899;--tag-teal:#14b8a6;--tag-orange:#f97316;--success:#22c55e;--warning:#f59e0b;--danger:#ef4444;--overlay:#0006}.dark{--primary:#818cf8;--primary-hover:#6366f1;--bg:#0f172a;--bg-card:#1e293b;--bg-hover:#334155;--text:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--border:#334155;--shadow:0 1px 3px #0000004d;--shadow-md:0 4px 6px #0006;--overlay:#0009}*,:before,:after{box-sizing:border-box;margin:0;padding:0}body{background:var(--bg);color:var(--text);min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;transition:background .3s,color .3s}#root{min-height:100vh}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{z-index:100;background:var(--bg-card);border-bottom:1px solid var(--border);box-shadow:var(--shadow);justify-content:space-between;align-items:center;gap:1rem;height:60px;padding:0 1.5rem;display:flex;position:sticky;top:0}.header-brand{align-items:center;gap:.5rem;display:flex}.header-brand h1{color:var(--text);font-size:1.25rem;font-weight:700}.header-brand .logo{font-size:1.5rem}.header-stats{color:var(--text-secondary);align-items:center;gap:.75rem;font-size:.8rem;display:flex}.stat-pill{background:var(--bg-hover);border:1px solid var(--border);border-radius:20px;align-items:center;gap:.3rem;padding:.25rem .75rem;display:flex}.stat-pill.danger{color:var(--danger);border-color:var(--danger);background:#ef444415}.stat-pill.success{color:var(--success)}.header-actions{align-items:center;gap:.5rem;display:flex}.icon-btn{border:1px solid var(--border);border-radius:var(--radius);color:var(--text-secondary);cursor:pointer;background:0 0;justify-content:center;align-items:center;padding:.4rem .6rem;font-size:1rem;transition:all .2s;display:flex}.icon-btn:hover{background:var(--bg-hover);color:var(--text)}.icon-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}.app-main{flex-direction:column;flex:1;gap:1.5rem;width:100%;max-width:1400px;margin:0 auto;padding:1.5rem;display:flex}.dashboard{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;display:grid}.dash-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:1.25rem;transition:transform .2s}.dash-card:hover{transform:translateY(-2px)}.dash-card-label{text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:.5rem;font-size:.75rem}.dash-card-value{color:var(--text);font-size:2rem;font-weight:700}.dash-card-sub{color:var(--text-secondary);margin-top:.25rem;font-size:.75rem}.dash-card.highlight{border-left:4px solid var(--primary)}.dash-card.highlight-green{border-left:4px solid var(--success)}.dash-card.highlight-red{border-left:4px solid var(--danger)}.weekly-chart-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);grid-column:span 2;padding:1.25rem}.weekly-chart-label{color:var(--text);margin-bottom:1rem;font-size:.85rem;font-weight:600}.chart-bars{align-items:flex-end;gap:.5rem;height:100px;margin-bottom:.5rem;display:flex}.chart-bar-wrapper{flex-direction:column;flex:1;align-items:center;gap:.35rem;height:100%;display:flex}.chart-bar-bg{background:var(--bg-hover);border-radius:4px 4px 0 0;flex:1;align-items:flex-end;width:100%;display:flex;position:relative}.chart-bar-fill{background:var(--primary);border-radius:4px 4px 0 0;width:100%;min-height:2px;transition:height .5s}.chart-bar-label{color:var(--text-muted);font-size:.65rem}.chart-bar-value{color:var(--text-secondary);font-size:.65rem;font-weight:600}.ai-tip-card{background:linear-gradient(135deg, var(--primary), #8b5cf6);border-radius:var(--radius-lg);color:#fff;padding:1.25rem}.ai-tip-label{text-transform:uppercase;letter-spacing:.08em;opacity:.85;align-items:center;gap:.35rem;margin-bottom:.5rem;font-size:.7rem;display:flex}.ai-tip-text{font-size:.9rem;line-height:1.5}.filter-bar{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);flex-wrap:wrap;align-items:center;gap:.75rem;padding:1rem;display:flex}.search-wrapper{flex:1;min-width:200px;position:relative}.search-wrapper .search-icon{color:var(--text-muted);pointer-events:none;position:absolute;top:50%;left:.75rem;transform:translateY(-50%)}.search-input{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);width:100%;color:var(--text);outline:none;padding:.5rem .75rem .5rem 2.25rem;font-size:.875rem;transition:border-color .2s,box-shadow .2s}.search-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6366f126}.search-input::placeholder{color:var(--text-muted)}.filter-select{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);cursor:pointer;outline:none;padding:.5rem .75rem;font-size:.875rem}.filter-select:focus{border-color:var(--primary)}.date-input{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);cursor:pointer;outline:none;padding:.5rem .75rem;font-size:.875rem}.date-input:focus{border-color:var(--primary)}.filter-divider{background:var(--border);width:1px;height:1.5rem;margin:0 .25rem}.filter-tag{background:var(--bg-hover);border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;border-radius:20px;align-items:center;gap:.35rem;padding:.3rem .65rem;font-size:.75rem;transition:all .2s;display:flex}.filter-tag:hover{background:var(--bg-hover)}.filter-tag.active{background:var(--primary);color:#fff;border-color:var(--primary)}.todo-list-header{justify-content:space-between;align-items:center;margin-bottom:.75rem;display:flex}.todo-count-label{color:var(--text-secondary);font-size:.85rem}.todo-list{flex-direction:column;gap:.6rem;display:flex}.todo-item{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:1rem;transition:transform .2s,box-shadow .2s,opacity .3s,max-height .3s;position:relative;overflow:hidden}.todo-item:hover{box-shadow:var(--shadow-md);transform:translateY(-1px)}.todo-item.completed{opacity:.6}.todo-item.completed .todo-title{color:var(--text-muted);text-decoration:line-through}.todo-item.overdue{border-left:3px solid var(--danger)}.todo-item-priority-border{border-radius:var(--radius-lg) 0 0 var(--radius-lg);width:3px;position:absolute;top:0;bottom:0;left:0}.todo-item-priority-border.low{background:var(--priority-low)}.todo-item-priority-border.medium{background:var(--priority-medium)}.todo-item-priority-border.high{background:var(--priority-high)}.todo-main{align-items:flex-start;gap:.75rem;padding-left:.5rem;display:flex}.todo-check{border:2px solid var(--border);cursor:pointer;color:#0000;background:0 0;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:22px;height:22px;margin-top:2px;font-size:.7rem;transition:all .2s;display:flex}.todo-check:hover{border-color:var(--primary)}.todo-check.checked{background:var(--success);border-color:var(--success);color:#fff}.todo-content{flex:1;min-width:0}.todo-title{color:var(--text);word-break:break-word;font-size:.95rem;font-weight:500;line-height:1.4}.todo-meta{flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.todo-badge{border:1px solid;border-radius:20px;align-items:center;gap:.25rem;padding:.2rem .5rem;font-size:.72rem;display:inline-flex}.todo-badge.due{color:var(--text-secondary);border-color:var(--border);background:var(--bg-hover)}.todo-badge.overdue-badge{color:var(--danger);border-color:var(--danger);background:#ef444415}.todo-badge.priority-low{color:var(--priority-low);border-color:var(--priority-low);background:#22c55e1a}.todo-badge.priority-medium{color:var(--priority-medium);border-color:var(--priority-medium);background:#f59e0b1a}.todo-badge.priority-high{color:var(--priority-high);border-color:var(--priority-high);background:#ef44441a}.todo-badge.category{color:var(--tag-blue);border-color:var(--tag-blue);background:#3b82f61a}.todo-notes-preview{color:var(--text-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:.4rem;font-size:.8rem;display:-webkit-box;overflow:hidden}.todo-subtasks-preview{color:var(--text-secondary);align-items:center;gap:.35rem;margin-top:.4rem;font-size:.75rem;display:flex}.subtask-progress-bar{background:var(--bg-hover);border-radius:2px;flex:1;max-width:80px;height:4px;overflow:hidden}.subtask-progress-fill{background:var(--success);border-radius:2px;height:100%;transition:width .3s}.tags-row{flex-wrap:wrap;gap:.35rem;margin-top:.5rem;display:flex}.tag-chip{border-radius:20px;padding:.15rem .45rem;font-size:.7rem;font-weight:500}.tag-chip.blue{color:var(--tag-blue);background:#3b82f626;border:1px solid #3b82f64d}.tag-chip.purple{color:var(--tag-purple);background:#8b5cf626;border:1px solid #8b5cf64d}.tag-chip.pink{color:var(--tag-pink);background:#ec489926;border:1px solid #ec48994d}.tag-chip.teal{color:var(--tag-teal);background:#14b8a626;border:1px solid #14b8a64d}.tag-chip.orange{color:var(--tag-orange);background:#f9731626;border:1px solid #f973164d}.tag-chip.gray{background:var(--bg-hover);color:var(--text-secondary);border:1px solid var(--border)}.todo-actions{opacity:0;flex-shrink:0;align-items:center;gap:.25rem;transition:opacity .2s;display:flex}.todo-item:hover .todo-actions{opacity:1}.action-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;padding:.25rem;font-size:.85rem;transition:all .15s;display:flex}.action-btn:hover{background:var(--bg-hover);color:var(--text)}.action-btn.delete:hover{color:var(--danger);background:#ef44441a}.empty-state{text-align:center;color:var(--text-muted);padding:4rem 2rem}.empty-state .empty-icon{margin-bottom:1rem;font-size:4rem;display:block}.empty-state .empty-title{color:var(--text-secondary);margin-bottom:.5rem;font-size:1.1rem;font-weight:600}.empty-state .empty-sub{font-size:.875rem}.todo-form{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:1.25rem}.todo-form-title{color:var(--text);margin-bottom:1rem;font-size:1rem;font-weight:600}.form-row{flex-wrap:wrap;gap:.75rem;display:flex}.form-group{flex-direction:column;flex:1;gap:.35rem;min-width:140px;display:flex}.form-group label{color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em;font-size:.75rem;font-weight:600}.form-input,.form-select,.form-textarea{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);outline:none;width:100%;padding:.5rem .75rem;font-family:inherit;font-size:.875rem;transition:border-color .2s,box-shadow .2s}.form-input:focus,.form-select:focus,.form-textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px #6366f126}.form-textarea{resize:vertical;min-height:80px}.nl-hint{color:var(--text-muted);margin-top:.25rem;font-size:.72rem;font-style:italic}.form-actions{justify-content:flex-end;gap:.5rem;margin-top:1rem;display:flex}.btn{border-radius:var(--radius);cursor:pointer;border:none;align-items:center;gap:.35rem;padding:.5rem 1rem;font-size:.875rem;font-weight:600;transition:all .2s;display:inline-flex}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-hover)}.btn-secondary{background:var(--bg-hover);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover{background:var(--border)}.tag-input-wrapper{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);cursor:text;flex-wrap:wrap;align-items:center;gap:.35rem;min-height:42px;padding:.5rem;transition:border-color .2s,box-shadow .2s;display:flex}.tag-input-wrapper:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px #6366f126}.tag-chip.removable{cursor:default;padding-right:.3rem}.tag-chip .remove-tag{color:inherit;cursor:pointer;opacity:.6;background:0 0;border:none;padding:0 0 0 .25rem;font-size:.65rem;line-height:1}.tag-chip .remove-tag:hover{opacity:1}.tag-input-field{color:var(--text);background:0 0;border:none;outline:none;flex:1;min-width:80px;font-size:.875rem}.subtask-list{flex-direction:column;gap:.35rem;margin-top:.75rem;display:flex}.subtask-item{background:var(--bg);border-radius:var(--radius);align-items:center;gap:.5rem;padding:.35rem .5rem;font-size:.85rem;transition:background .15s;display:flex}.subtask-item:hover{background:var(--bg-hover)}.subtask-item.completed span{color:var(--text-muted);text-decoration:line-through}.subtask-check{border:2px solid var(--border);cursor:pointer;color:#0000;background:0 0;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;font-size:.6rem;transition:all .15s;display:flex}.subtask-check:hover{border-color:var(--primary)}.subtask-check.checked{background:var(--success);border-color:var(--success);color:#fff}.subtask-text{word-break:break-word;flex:1}.subtask-delete{color:var(--text-muted);cursor:pointer;opacity:0;background:0 0;border:none;padding:0 .25rem;font-size:.75rem;transition:opacity .15s}.subtask-item:hover .subtask-delete{opacity:1}.subtask-delete:hover{color:var(--danger)}.subtask-add-row{align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.subtask-add-input{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);outline:none;flex:1;padding:.35rem .5rem;font-size:.85rem}.subtask-add-input:focus{border-color:var(--primary)}.modal-overlay{background:var(--overlay);z-index:200;justify-content:center;align-items:center;padding:1rem;animation:.2s fadeIn;display:flex;position:fixed;inset:0}.modal{background:var(--bg-card);border-radius:var(--radius-lg);width:100%;max-width:560px;max-height:90vh;animation:.25s slideUp;overflow-y:auto;box-shadow:0 20px 60px #0003}.modal-header{border-bottom:1px solid var(--border);background:var(--bg-card);z-index:1;justify-content:space-between;align-items:center;padding:1.25rem 1.5rem;display:flex;position:sticky;top:0}.modal-title{color:var(--text);font-size:1.05rem;font-weight:700}.modal-close{color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:.25rem;font-size:1.2rem;transition:all .15s}.modal-close:hover{background:var(--bg-hover);color:var(--text)}.modal-body{padding:1.5rem}.modal-footer{border-top:1px solid var(--border);background:var(--bg-card);justify-content:flex-end;gap:.5rem;padding:1rem 1.5rem;display:flex;position:sticky;bottom:0}.loading-row{color:var(--text-muted);justify-content:center;align-items:center;gap:.5rem;padding:2rem;font-size:.875rem;display:flex}.spinner{border:2px solid var(--border);border-top-color:var(--primary);border-radius:50%;width:18px;height:18px;animation:.6s linear infinite spin}.ai-suggestion{border-radius:var(--radius);background:linear-gradient(135deg,#6366f114,#8b5cf614);border:1px solid #6366f133;margin-top:.75rem;padding:.75rem 1rem}.ai-suggestion-label{color:var(--primary);text-transform:uppercase;letter-spacing:.05em;align-items:center;gap:.35rem;margin-bottom:.4rem;font-size:.7rem;font-weight:600;display:flex}.ai-suggestion-items{flex-direction:column;gap:.35rem;display:flex}.ai-suggestion-item{color:var(--text-secondary);cursor:pointer;align-items:center;gap:.5rem;padding:.25rem 0;font-size:.82rem;transition:color .15s;display:flex}.ai-suggestion-item:hover{color:var(--primary)}.ai-suggestion-item span{font-size:.7rem}@media (width<=768px){.app-header{padding:0 1rem}.header-stats{display:none}.app-main{padding:1rem}.dashboard{grid-template-columns:repeat(2,1fr)}.weekly-chart-card{grid-column:span 2}.filter-bar{flex-direction:column;align-items:stretch}.search-wrapper{min-width:100%}.form-row{flex-direction:column}.form-group{min-width:100%}.todo-actions{opacity:1}.ai-tip-card{display:none}}@media (width<=480px){.dashboard{grid-template-columns:1fr 1fr}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes spin{to{transform:rotate(360deg)}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}
