 :root{--bg:#f5f5f4;--surface:#fff;--surface-2:#fafafa;--text:#171717;--muted:#777773;--line:#e9e9e7;--accent:#171717;--accent-contrast:#fff;--soft:#f0f0ee;--shadow:0 8px 30px rgba(20,20,20,.045);--radius:20px}
*{box-sizing:border-box}html{scroll-behavior:auto}body{margin:0;background:var(--bg);color:var(--text);font-family:"DM Sans",sans-serif;font-size:14px;line-height:1.5;transition:background .2s ease,color .2s ease}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #888;outline-offset:3px}.app-shell{min-height:100vh;display:grid;grid-template-columns:244px minmax(0,1fr);max-width:1800px;margin:0 auto}.sidebar{background:var(--surface);border-right:1px solid var(--line);padding:28px 18px 18px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-family:Manrope,sans-serif;font-weight:800;font-size:21px;letter-spacing:-.8px;padding:0 9px 38px}.brand-mark{display:grid;place-items:center;background:var(--text);color:var(--surface);width:32px;height:32px;border-radius:11px;font-size:19px;letter-spacing:-1px}.side-label{font-size:10px;font-weight:700;letter-spacing:1.5px;color:var(--muted);padding:0 12px 12px}.nav-item{border:0;background:transparent;color:var(--muted);width:100%;display:flex;align-items:center;gap:13px;text-align:left;padding:12px 13px;border-radius:12px;margin-bottom:4px;font-weight:600;transition:background .18s,color .18s}.nav-item:hover{background:var(--surface-2);color:var(--text)}.nav-item.active{background:var(--soft);color:var(--text)}.nav-icon{width:19px;text-align:center;font-size:17px}.sidebar-bottom{margin-top:auto}.profile-mini{border-top:1px solid var(--line);margin-top:20px;padding:18px 3px 0;display:flex;align-items:center;gap:10px}.avatar{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;background:var(--soft);font-weight:700;color:var(--text);flex-shrink:0}.avatar.small{width:29px;height:29px;font-size:12px}.profile-copy{display:flex;flex-direction:column;min-width:0;flex:1}.profile-copy strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-copy span{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-btn{border:1px solid var(--line);color:var(--text);background:var(--surface);width:36px;height:36px;border-radius:12px;display:grid;place-items:center;font-size:17px;transition:background .18s}.icon-btn:hover{background:var(--soft)}.main-content{padding:0 38px 22px;min-width:0}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:15px}.breadcrumb{color:var(--muted);font-size:12px}.breadcrumb span{padding:0 9px;color:#b5b5b1}.breadcrumb strong{color:var(--text);font-weight:600}.top-actions{display:flex;align-items:center;gap:12px}.today-label{color:var(--muted);font-size:11px}.user-chip{display:flex;align-items:center;gap:8px;background:transparent;border:1px solid var(--line);border-radius:30px;padding:4px 10px 4px 5px;color:var(--text);font-size:12px;font-weight:600}.chevron{color:var(--muted)}.mobile-brand{display:none}.view{display:none;padding-top:34px;animation:fadeIn .22s ease both}.view.active-view{display:block}@keyframes fadeIn{from{opacity:.65}to{opacity:1}}.welcome-row,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:26px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.8px;color:var(--muted);margin:0 0 9px}.welcome-row h1,.section-heading h1{font-family:Manrope,sans-serif;font-size:clamp(25px,3vw,34px);letter-spacing:-1.5px;line-height:1.2;margin:0;font-weight:800}.muted-heading{color:#a2a29e}.subheading{margin:9px 0 0;color:var(--muted);font-size:13px}.primary-btn,.secondary-btn{border-radius:12px;padding:11px 16px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;transition:transform .15s,opacity .15s,background .15s}.primary-btn{background:var(--accent);color:var(--accent-contrast);border:1px solid var(--accent)}.primary-btn:hover{opacity:.88}.primary-btn:active,.secondary-btn:active{transform:scale(.985)}.secondary-btn{background:var(--surface);color:var(--text);border:1px solid var(--line)}.secondary-btn:hover{background:var(--soft)}.text-btn{border:0;background:transparent;color:var(--text);font-size:11px;font-weight:700;padding:5px}.text-btn:hover{text-decoration:underline}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.stat-card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.stat-card{padding:20px 21px;min-width:0;min-height:166px}.stat-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:12px;font-weight:600}.stat-icon{width:30px;height:30px;border-radius:10px;background:var(--soft);color:var(--text);display:grid;place-items:center;font-size:15px}.stat-number{display:flex;align-items:baseline;gap:7px;font-family:Manrope,sans-serif;font-size:34px;line-height:1.25;font-weight:800;letter-spacing:-1.5px;margin-top:13px}.stat-number small{font:600 12px "DM Sans",sans-serif;letter-spacing:0;color:var(--muted)}.progress-track{height:5px;border-radius:8px;background:var(--soft);overflow:hidden;margin-top:13px}.progress-fill{height:100%;width:0;background:var(--text);border-radius:8px;transition:width .35s ease}.stat-foot{font-size:11px;color:var(--muted);margin:10px 0 0}.mini-bars{display:flex;align-items:end;gap:5px;height:20px;margin-top:9px}.mini-bars i{display:block;width:9px;border-radius:4px 4px 2px 2px;background:var(--soft);height:45%}.mini-bars i:nth-child(2),.mini-bars i:nth-child(5){height:75%}.mini-bars i:nth-child(3),.mini-bars i:nth-child(6){height:100%}.mini-bars i:nth-child(4){height:60%}.stat-note{font-size:10px;color:var(--muted);margin-top:13px}.content-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(280px,.88fr);gap:18px}.panel{padding:22px;min-width:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}.panel-heading h2,.settings-card h2,.focus-copy h2{font-family:Manrope,sans-serif;font-size:16px;letter-spacing:-.4px;margin:0;font-weight:800}.panel-heading p,.settings-card>p{font-size:11px;color:var(--muted);margin:5px 0 0}.pill{display:inline-flex;align-items:center;padding:6px 9px;background:var(--soft);border-radius:30px;font-size:10px;color:var(--muted);white-space:nowrap}.habit-list{display:flex;flex-direction:column}.habit-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);min-width:0}.habit-row:last-child{border-bottom:0}.habit-symbol{width:39px;height:39px;border-radius:13px;background:var(--soft);display:grid;place-items:center;flex-shrink:0;font-size:18px}.habit-info{flex:1;min-width:0}.habit-info strong{font-size:12px;display:block;overflow-wrap:anywhere}.habit-info span{font-size:10px;color:var(--muted)}.check-btn{width:28px;height:28px;border:1.5px solid var(--line);background:var(--surface);color:transparent;border-radius:50%;display:grid;place-items:center;flex-shrink:0;transition:background .16s,border .16s,color .16s}.check-btn.done{background:var(--text);border-color:var(--text);color:var(--surface)}.habit-row.is-done .habit-info strong{text-decoration:line-through;color:var(--muted)}.habit-actions{display:flex;align-items:center;gap:7px}.delete-habit{border:0;background:transparent;color:var(--muted);padding:5px;font-size:15px;opacity:.65}.delete-habit:hover{opacity:1;color:var(--text)}.week-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;height:168px;align-items:end;padding-top:8px}.chart-day{display:flex;flex-direction:column;align-items:center;justify-content:end;height:100%;gap:8px;min-width:0}.chart-value{font-size:9px;color:var(--muted)}.bar-track{height:112px;width:100%;max-width:24px;background:var(--soft);border-radius:8px;display:flex;align-items:end;overflow:hidden}.bar-fill{width:100%;height:0;background:var(--text);border-radius:8px;transition:height .3s ease}.chart-label{font-size:10px;color:var(--muted)}.chart-footer{border-top:1px solid var(--line);margin-top:16px;padding-top:14px;display:flex;justify-content:space-between;gap:10px;font-size:10px;color:var(--muted)}.chart-footer strong{color:var(--text)}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--text);margin-right:6px}.focus-panel{margin-top:18px;display:flex;align-items:center;justify-content:space-between;padding:19px 22px}.focus-copy{display:flex;align-items:center;gap:14px}.focus-icon{width:39px;height:39px;border:1px solid var(--line);border-radius:13px;display:grid;place-items:center;font-size:20px}.focus-copy h2{font-size:13px}.focus-copy p{margin:5px 0 0;color:var(--muted);font-size:11px}.focus-caption{font-size:9px;font-weight:700;letter-spacing:1.5px;color:var(--muted)}.footer{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:10px;padding:28px 3px 0}.footer-dot{padding:0 5px}.empty-state{text-align:center;padding:30px 12px;color:var(--muted)}.empty-state strong{display:block;color:var(--text);font-size:13px}.empty-state p{font-size:11px;margin:6px 0 16px}.empty-symbol{width:42px;height:42px;border-radius:14px;background:var(--soft);display:grid;place-items:center;margin:0 auto 12px;font-size:23px;color:var(--text)}.hidden{display:none!important}.section-heading{margin-bottom:25px}.section-heading .pill{align-self:center}.analytics-stats .stat-card{min-height:148px}.best-habit{font-family:Manrope,sans-serif;font-weight:800;font-size:23px;letter-spacing:-.7px;margin-top:18px;overflow-wrap:anywhere}.analytics-panel{margin-top:18px}.large-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:16px;height:220px;align-items:end;padding:10px 8px 0}.large-chart .bar-track{height:160px;max-width:100%;width:100%;border-radius:10px}.large-chart .chart-day{gap:9px}.large-chart .chart-value{font-size:10px}.large-chart .chart-label{font-size:11px}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;min-width:600px}th{font-size:10px;color:var(--muted);font-weight:600;padding:12px 10px;border-bottom:1px solid var(--line)}td{padding:15px 10px;border-bottom:1px solid var(--line);font-size:11px}tbody tr:last-child td{border-bottom:0}.rate-pill{background:var(--soft);padding:5px 8px;border-radius:20px;font-weight:700;font-size:10px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.settings-card{padding:25px}.settings-symbol{width:42px;height:42px;background:var(--soft);border-radius:14px;display:grid;place-items:center;font-size:20px;margin-bottom:18px}.settings-card h2{font-size:17px}.settings-card label,.modal label,.auth-card label{display:block;font-size:11px;font-weight:700;margin:18px 0 7px}.settings-card input,.modal input,.modal select,.auth-card input{width:100%;border:1px solid var(--line);background:var(--surface-2);color:var(--text);padding:12px 13px;border-radius:11px;outline:none}.settings-card input:focus,.modal input:focus,.modal select:focus,.auth-card input:focus{border-color:#999}.settings-card input:disabled{opacity:.6}.full-btn{width:100%;margin-top:20px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--line);padding:17px 0}.setting-row:first-of-type{margin-top:16px}.setting-row strong,.setting-row span{display:block}.setting-row strong{font-size:12px}.setting-row span{font-size:10px;color:var(--muted);margin-top:3px}.switch{width:43px;height:25px;border:0;background:#d3d3d0;border-radius:30px;padding:3px;flex-shrink:0;transition:background .2s}.switch span{display:block;width:19px;height:19px;border-radius:50%;background:white;transition:transform .2s}.switch[aria-checked=true]{background:var(--text)}.switch[aria-checked=true] span{transform:translateX(18px)}.modal-backdrop{position:fixed;inset:0;background:rgba(15,15,15,.35);display:grid;place-items:center;padding:20px;z-index:10;animation:fadeIn .16s ease}.modal{width:min(100%,420px);background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:24px;padding:28px;box-shadow:0 25px 90px #0002;position:relative;animation:modalIn .18s ease}@keyframes modalIn{from{opacity:.7;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.modal-close{position:absolute;right:17px;top:15px;border:0;background:var(--soft);color:var(--text);border-radius:10px;width:30px;height:30px;font-size:20px}.modal-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:var(--text);color:var(--surface);font-size:24px;margin-bottom:20px}.modal h2{font:800 24px Manrope,sans-serif;letter-spacing:-.7px;margin:0}.modal-description{font-size:12px;color:var(--muted);margin:7px 0 20px}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--surface);padding:11px 16px;border-radius:12px;font-size:12px;box-shadow:var(--shadow);z-index:30;opacity:0;pointer-events:none;transition:opacity .18s}.toast.show{opacity:1}.auth-screen{position:fixed;inset:0;z-index:20;background:var(--bg);display:grid;place-items:center;padding:25px;overflow:auto}.auth-card{width:min(100%,410px);background:var(--surface);border:1px solid var(--line);border-radius:28px;padding:36px;box-shadow:0 20px 70px #00008;position:relative;overflow:hidden;animation:fadeIn .3s ease}.auth-brand{padding:0 0 34px}.auth-decoration{position:absolute;right:-38px;top:15px;width:135px;height:135px;pointer-events:none}.auth-decoration span{position:absolute;border:1px solid var(--line);border-radius:50%;width:120px;height:120px;right:0;top:0}.auth-decoration span:nth-child(2){width:85px;height:85px;right:17px;top:17px}.auth-decoration span:nth-child(3){width:48px;height:48px;right:36px;top:36px;background:var(--soft);border:0}.auth-card h1{font:800 35px/1.13 Manrope,sans-serif;letter-spacing:-1.7px;margin:0}.auth-card h1 span{color:#999}.auth-intro{color:var(--muted);font-size:12px;margin:12px 0 25px}.auth-card label{margin-top:15px}.auth-card input{padding:13px}.auth-submit{margin-top:22px;padding:13px}.auth-submit span{font-size:16px}.auth-switch{text-align:center;font-size:11px;color:var(--muted);margin:21px 0 0}.auth-switch .text-btn{color:var(--text)}.auth-message{min-height:16px;text-align:center;font-size:11px;color:var(--muted);margin:10px 0 0}.auth-foot{font-size:10px;color:var(--muted);text-align:center;margin:23px 0 0}.auth-side-note{position:fixed;bottom:24px;right:28px;font-size:9px;letter-spacing:1.7px;font-weight:700;color:var(--muted)}.auth-side-note span{font-size:15px;margin-left:7px}
body.dark{--bg:#111;--surface:#191919;--surface-2:#202020;--text:#f3f3f1;--muted:#a0a09b;--line:#30302f;--accent:#f3f3f1;--accent-contrast:#111;--soft:#282827;--shadow:0 8px 30px rgba(0,0,0,.16)}body.dark .muted-heading{color:#666}body.dark .mini-bars i{background:#353534}body.dark .auth-decoration span:nth-child(3){background:#2a2a29}
@media(min-width:1500px){.main-content{padding-left:48px;padding-right:48px}.app-shell{grid-template-columns:260px minmax(0,1fr)}.content-grid{gap:22px}.stat-card{padding:24px}}
@media(max-width:1100px){.app-shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding-left:13px;padding-right:13px}.main-content{padding:0 24px 20px}.content-grid{grid-template-columns:1fr}.week-panel{min-height:250px}.week-chart{height:145px}.bar-track{height:95px}.stat-card{padding:17px}.stats-grid{gap:11px}}
@media(max-width:760px){.app-shell{display:block}.sidebar{display:none}.main-content{padding:0 16px 20px}.topbar{height:65px}.mobile-brand{display:flex;align-items:center;gap:8px;font:800 18px Manrope,sans-serif;letter-spacing:-.7px}.mobile-brand .brand-mark{width:29px;height:29px;font-size:17px}.breadcrumb{display:none}.top-actions{gap:8px}.today-label{display:none}.user-chip{padding-right:7px}.user-chip #topName,.chevron{display:none}.view{padding-top:25px}.welcome-row,.section-heading{align-items:flex-start;gap:12px}.welcome-row h1,.section-heading h1{font-size:27px}.welcome-row .primary-btn,.section-heading>.primary-btn{padding:10px 12px}.subheading{font-size:12px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat-card{padding:16px;min-height:153px}.stat-card:last-child:nth-child(odd){grid-column:1/-1}.stat-number{font-size:30px}.content-grid{gap:12px}.panel{padding:17px;border-radius:17px}.panel-heading{margin-bottom:12px}.focus-panel{margin-top:12px;padding:16px;align-items:flex-start}.focus-caption{display:none}.focus-copy{gap:11px}.focus-copy h2{font-size:12px}.focus-copy p{line-height:1.5}.footer{padding-top:23px}.footer span:last-child{display:none}.settings-grid{grid-template-columns:1fr;gap:12px}.settings-card{padding:20px}.large-chart{gap:8px;height:190px;padding-left:0;padding-right:0}.large-chart .bar-track{height:130px}.analytics-stats .stat-card{min-height:145px}.best-habit{font-size:20px}.section-heading .pill{font-size:9px}.auth-side-note{display:none}}
@media(max-width:420px){.main-content{padding-left:12px;padding-right:12px}.welcome-row h1,.section-heading h1{font-size:24px;letter-spacing:-1px}.welcome-row .primary-btn{font-size:10px;padding:9px}.stats-grid{gap:8px}.stat-card{padding:13px;min-height:148px}.stat-top{font-size:10px}.stat-icon{width:27px;height:27px}.stat-number{font-size:27px}.stat-foot{font-size:10px}.panel{padding:14px}.habit-symbol{width:34px;height:34px}.habit-row{gap:9px}.week-chart{gap:6px}.chart-footer{font-size:9px}.auth-card{padding:27px 22px}.auth-card h1{font-size:31px}.user-chip{border:0;padding:0}.theme-toggle{width:32px;height:32px}}
