:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#233b3a;background:#f6f7f3;font-synthesis:none;--green:#176457;--deep:#153c3b;--line:#e1e6df;--muted:#74817b}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:3px solid #67bca7;outline-offset:3px}[hidden]{display:none!important}.muted{color:var(--muted);line-height:1.55}h1,h2,p{margin-top:0}h1{font-size:clamp(30px,4vw,42px);font-weight:650;letter-spacing:-1.4px;margin-bottom:9px}h2{font-size:25px;letter-spacing:-.6px}.eyebrow{display:block;font-size:10px;letter-spacing:2px;font-weight:750;margin-bottom:17px;color:#74847a}.primary{background:var(--green);color:white;border:0;border-radius:12px;padding:14px 20px;font-weight:600;white-space:nowrap}.primary:hover{background:#104e43}.ghost,.text-button{background:transparent;border:0;color:var(--green);padding:10px}.danger{color:#ac4d43}.brand{display:flex;align-items:center;gap:10px;font-size:30px;letter-spacing:-1px;font-weight:700;color:inherit;text-decoration:none}.brand span{font-size:11px;font-weight:400;letter-spacing:1px;margin-left:5px}.login-wrap{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.intro{background:var(--deep);color:#f0f5ec;padding:48px 9%;display:flex;flex-direction:column}.intro-copy{margin:auto 0;padding:70px 0}.intro .eyebrow{color:#a5c2aa}.intro h1{font-size:clamp(40px,5vw,70px);line-height:1.08;letter-spacing:-3px}.intro-copy>p{color:#bdcfc4;line-height:1.7;margin:25px 0}.intro-footer{font-size:12px;color:#a5b9ae;line-height:1.8;margin:0}.sample-card{display:flex;align-items:center;gap:15px;margin-top:50px;background:#244c48;border:1px solid #3b6054;padding:20px;border-radius:15px;transform:rotate(-2deg);box-shadow:0 16px 40px #09272444}.sample-check{width:28px;height:28px;border-radius:50%;background:#bbd9ac;color:#244c48;display:grid;place-items:center}.sample-tag{font-size:10px;margin-left:auto;color:#b8cec0}.login-side{display:grid;place-items:center;padding:35px}.login-card{width:100%;max-width:365px}.login-card h2{font-size:30px}.login-card .primary{width:100%;display:flex;justify-content:space-between;margin-top:15px}.fine{font-size:12px;color:var(--muted);line-height:1.7;margin-top:24px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;margin-bottom:20px}input,textarea,select{width:100%;border:1px solid #d5ddd4;background:#fff;border-radius:10px;padding:12px;color:inherit;outline:none}input:focus,textarea:focus,select:focus{border-color:#378675;box-shadow:0 0 0 3px #37867514}textarea{resize:vertical;min-height:160px;line-height:1.6}.error{color:#ae4a42;font-size:13px;white-space:pre-wrap}.loading{min-height:100vh;display:grid;place-items:center;color:var(--muted)}.app-layout{display:grid;grid-template-columns:235px 1fr;min-height:100dvh}.sidebar{position:sticky;top:0;height:100dvh;border-right:1px solid var(--line);padding:30px 22px;display:flex;flex-direction:column;background:#fcfcf9}.sidebar .brand{margin:0 14px 46px}.nav-caption{font-size:9px;letter-spacing:1.8px;color:#9ca69c;margin:0 14px 16px}nav{display:flex;flex-direction:column;gap:5px}nav button{background:none;border:0;text-align:left;color:#68766f;padding:13px 15px;border-radius:10px;font-size:13px;display:flex;gap:14px;align-items:center}nav button span{width:18px;font-size:21px}nav button:hover{background:#eff3ed}nav button.active{background:#e4eee4;color:#22604e;font-weight:650}.sidebar-bottom{margin-top:auto;padding-top:30px}.install-button{width:100%;border:1px dashed #bdcbbb;border-radius:10px;padding:12px 5px;background:none;color:#647862;font-size:12px}.account-button{margin-top:20px;display:flex;gap:10px;align-items:center;border:0;background:none;width:100%;font-size:12px;padding:8px 0;text-align:left}.account-button>span:last-child{margin-left:auto}.avatar{display:grid;place-items:center;width:32px;height:32px;background:#e9eddf;border-radius:50%;color:#68744b}.app-layout main{width:100%;max-width:1240px;padding:0 52px;margin:0 auto;min-width:0}.topbar{min-height:84px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);font-size:12px;color:#8b968e;gap:12px}.online-status{font-size:10px;color:#76917c}.page-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:45px 0 25px}.page-head p{font-size:13px;margin:0}.page-head .eyebrow{margin-bottom:12px}.toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:22px}.toolbar input{width:auto}.segment{display:flex;gap:4px;padding:4px;border:1px solid var(--line);background:#edf0e9;border-radius:11px}.segment button{border:0;background:transparent;color:#768378;border-radius:8px;padding:9px 15px;font-size:12px}.segment button.active{background:#fff;color:#265b49;box-shadow:0 1px 4px #2133210e}.progress-card{background:#eaf0e2;border:1px solid #dfe8d7;border-radius:17px;padding:24px 26px;margin-bottom:26px;display:grid;grid-template-columns:1fr auto;gap:12px}.progress-card h3{font-size:17px;margin:0 0 6px}.progress-card p{font-size:12px;margin:0;color:#798771}.progress-number{font-size:32px;letter-spacing:-1px;align-self:center}.progress-card progress{grid-column:1/-1;width:100%;height:6px;appearance:none;border:0;background:#d9e2cd;border-radius:9px}.progress-card progress::-webkit-progress-bar{background:#d9e2cd;border-radius:9px}.progress-card progress::-webkit-progress-value{background:#718d58;border-radius:9px}.progress-card progress::-moz-progress-bar{background:#718d58;border-radius:9px}.section-caption{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1.4px;color:#8d978e;margin:25px 2px 13px}.task-list{display:flex;flex-direction:column;gap:10px}.task-row{display:flex;align-items:center;gap:16px;padding:19px 20px;background:#fff;border:1px solid var(--line);border-radius:13px;transition:border-color .15s}.task-row:hover{border-color:#b8c7b5}.check-button{flex-shrink:0;width:25px;height:25px;border:1.5px solid #c9d5c3;border-radius:8px;background:none;color:white;padding:0;font-size:14px}.check-button.done{background:#719275;border-color:#719275}.task-main{flex:1;min-width:0;border:0;background:none;text-align:left;padding:0;color:inherit}.task-title{display:block;font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.task-row.completed .task-title{text-decoration:line-through;color:#8c978f}.task-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px;font-size:10px;color:#95a08f}.row-arrow{font-size:20px;color:#a5aea2}.note-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.note-card{border:1px solid var(--line);background:#fffef8;border-radius:15px;padding:24px;text-align:left;min-height:160px;color:inherit}.note-card p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7}.note-card small{color:#9a9e8f}.empty{padding:65px 25px;text-align:center;border:1px dashed #cdd7c8;border-radius:18px;background:#fafbf7;color:#83917b}.empty strong{display:block;color:#4e6249;font-size:20px;margin-bottom:12px}.empty p{font-size:13px;line-height:1.7}.pagination{display:flex;justify-content:center;gap:15px;align-items:center;margin-top:25px;font-size:12px;color:var(--muted)}.pagination button{background:#fff;border:1px solid var(--line);border-radius:8px;padding:8px 15px;color:inherit}.page-footer{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a0a798;margin:35px 0 25px;gap:8px}.banner{background:#fff0dc;color:#855c28;padding:13px;border-radius:10px;font-size:12px;margin-top:15px}.summary{font-size:13px;background:#f0f1ec;border-radius:10px;padding:16px;line-height:1.6;margin-top:20px}.stats-text{white-space:pre-wrap;line-height:1.8;font-size:13px;background:white;border:1px solid var(--line);border-radius:14px;padding:24px;overflow:auto}dialog{border:1px solid var(--line);border-radius:20px;width:min(560px,calc(100% - 28px));padding:28px;color:inherit;max-height:90dvh;box-shadow:0 24px 90px #152c3540}dialog::backdrop{background:#17373265;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog-head h2{margin:0;font-size:23px}.icon-button{border:0;background:#f0f2ec;color:#728070;width:32px;height:32px;border-radius:50%;font-size:22px}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.dialog-actions .danger{margin-right:auto}.dialog-note{font-size:12px;line-height:1.7;color:#8a8266;background:#f8f3e5;padding:12px;border-radius:9px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#24473f;color:white;padding:14px 22px;border-radius:12px;box-shadow:0 8px 30px #24473f33;z-index:10;font-size:13px;max-width:90vw}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}
@media(max-width:900px){.app-layout{grid-template-columns:190px 1fr}.sidebar{padding:25px 12px}.app-layout main{padding:0 25px}.brand{font-size:26px}.sidebar .brand{margin-left:8px}.note-grid{grid-template-columns:1fr}.intro{padding:35px}.intro h1{font-size:48px}}
@media(max-width:640px){.login-wrap{display:block}.intro{padding:24px;min-height:auto}.intro-copy{padding:32px 0 0}.intro h1{font-size:38px;letter-spacing:-1.6px}.intro-copy>p,.intro-footer,.sample-card{display:none}.intro .eyebrow{font-size:9px;margin-bottom:12px}.login-side{padding:32px 25px}.app-layout{display:block}.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:14px 18px;display:grid;grid-template-columns:1fr auto;gap:10px}.sidebar .brand{margin:0;font-size:24px}.sidebar .brand img{width:30px;height:30px}.nav-caption{display:none}nav{grid-column:1/-1;flex-direction:row;overflow-x:auto;gap:2px;padding-bottom:3px}nav button{flex-shrink:0;padding:9px 11px;font-size:12px;gap:6px}nav button span{font-size:18px;width:17px}.sidebar-bottom{margin:0;padding:0;grid-column:2;grid-row:1;display:flex;gap:6px;align-items:center}.install-button{width:auto;padding:8px;border:0;font-size:0}.install-button::after{content:'＋ Установить';font-size:11px}.account-button{margin:0;width:auto}.account-button #account-name,.account-button>span:last-child{display:none}.app-layout main{padding:0 18px}.topbar{min-height:52px;font-size:10px}.online-status{font-size:9px}.page-head{padding:26px 0 18px;align-items:flex-start;flex-wrap:wrap}.page-head h1{font-size:31px}.page-head .eyebrow{font-size:8px;margin-bottom:10px}.page-head .primary{padding:12px 15px;font-size:12px}.progress-card{padding:20px;margin-bottom:20px}.task-row{padding:16px 14px;gap:12px}.task-title{font-size:14px}.task-meta{font-size:10px}.toolbar{gap:8px}.segment button{padding:9px 11px;font-size:11px}.toolbar input{max-width:100%}.page-footer{margin-bottom:25px}.toast{bottom:18px}.two-fields{grid-template-columns:1fr}dialog{padding:22px}input,textarea,select{font-size:16px}}

.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.auth-back{margin-top:20px}.login-card .muted{line-height:1.6}.login-card input[name="code"]{font-family:monospace}
/* v7: shared interaction and layout polish. Business rules stay in the existing API. */
:root{--green:#245f4d;--deep:#203f35;--muted:#708075;--line:#e4e9e1;background:#f5f7f2;color:#263e32;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{background:radial-gradient(ellipse at 95% 0%,#edf2e5 0%,transparent 55%),#f7f8f4}button,a,input,textarea,summary{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}button:active:not(:disabled){transform:scale(.975)}button:disabled{cursor:default;opacity:.55}button[aria-busy="true"]{position:relative;cursor:progress;opacity:.8}button[aria-busy="true"]::after{content:'';position:absolute;right:9px;top:calc(50% - 6px);width:12px;height:12px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ui-spin .65s linear infinite}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #7ca28c;outline-offset:4px}#content{transition:opacity .15s;min-height:140px}#content[aria-busy="true"]{opacity:.5;pointer-events:none}#page-kicker,#page-subtitle,.page-footer>span{display:none}.page-head{padding:32px 0 22px;align-items:center}.page-head h1{font-size:34px;letter-spacing:-1.15px;margin:0}.page-footer{justify-content:flex-end;margin-top:22px}.page-footer button{font-size:12px;color:#7b8b7b}.topbar{min-height:66px;font-size:11px;border-bottom:1px solid #e5eadd}.sidebar{background:#fafbf7;border-color:#e4e9df;padding-top:28px}.nav-caption{font-size:9px;letter-spacing:1.3px;margin:35px 15px 15px}.sidebar .brand{font-size:27px}.sidebar .brand img{width:34px;height:34px}nav{gap:6px}nav button{min-height:46px;gap:12px;padding:12px 14px;border-radius:12px;font-size:13px;color:#738071}nav button.active{background:#e4edde;color:#28573f}nav button span{width:21px;height:21px;display:flex;align-items:center}nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.nav-extra{display:contents}.nav-more{display:none}.primary,.en-primary{border-radius:12px;background:#285d48;box-shadow:0 3px 8px #2047310c;font-weight:600}.primary:hover,.en-primary:hover{background:#204e3c}.toolbar:empty{display:none}.segment{background:#eef2e8;border-color:transparent;border-radius:12px;padding:4px}.segment button{border-radius:9px;min-height:35px}.segment button.active{box-shadow:0 2px 5px #2741260d}.task-list{gap:9px}.task-row{border-color:#e2e8de;border-radius:15px;min-height:79px;box-shadow:0 2px 4px #23392102}.task-row:hover{border-color:#c4d2ba;box-shadow:0 4px 14px #29412606}.task-row.completed{background:#f9fbf6}.check-button{width:28px;height:28px;border-radius:10px;border-color:#b9c9b3}.check-button.done{background:#759c6a;border-color:#759c6a}.check-button[aria-busy="true"]::after{right:6px}.task-title{font-size:14px;font-weight:500}.task-meta{color:#929d89}.section-caption{letter-spacing:.4px;font-size:12px;text-transform:none;margin:24px 1px 12px}.row-arrow{color:#a5b29b}.progress-card{background:#eaf0df;border:0;border-radius:19px;padding:23px 25px}.progress-card h3{font-size:16px}.progress-number{font-size:34px;font-weight:450}.note-card{border-radius:18px;background:#fffef9;border-color:#e4e7dc;box-shadow:0 3px 14px #233c1d03;transition:box-shadow .18s,transform .18s}.note-card:hover{box-shadow:0 8px 26px #243b1c09;transform:translateY(-2px)}.note-card small{font-size:11px}.empty{border:1px solid #e1e7d9;background:#fafcf6;border-radius:20px;padding:50px 25px}.empty strong{font-weight:550;font-size:21px}.empty p{max-width:330px;margin:0 auto}.stats-text{border-radius:18px}.summary{font-size:12px;background:#edf2e7;color:#697b5c}dialog{border:1px solid #e0e7d9;border-radius:24px;box-shadow:0 30px 100px #19322530;padding:28px;background:#fcfdf9}dialog[open]{animation:ui-dialog-in .22s cubic-bezier(.2,.8,.2,1)}dialog::backdrop{background:#1c302552;backdrop-filter:blur(6px)}.dialog-head h2,dialog>h2{font-size:23px;font-weight:600;letter-spacing:-.5px}.dialog-actions{gap:10px}.dialog-actions button{min-height:44px}.confirm-dialog{max-width:420px}.confirm-dialog .muted{font-size:14px}.confirm-dialog .dialog-actions{margin-top:25px}.icon-button{width:34px;height:34px;background:#edf2e7;color:#6b7c62}.dialog-note{font-size:12px;background:#f0f4e8;color:#667559;border:1px solid #e6ebdc;border-radius:12px}.error:not(:empty){padding:11px 13px;background:#fff0ec;border-radius:10px;color:#a04f43}label{font-weight:500;color:#4d6150}input,textarea{background:white;border-color:#dbe3d4;border-radius:12px;padding:13px}textarea{min-height:110px;line-height:1.65}input:focus,textarea:focus{box-shadow:0 0 0 3px #84a66e1a;border-color:#8aa877}.toast{background:#254736;border:1px solid #ffffff1c;border-radius:14px;box-shadow:0 8px 24px #223d2626;padding:14px 20px;font-size:13px}.brand{letter-spacing:-1.1px}.login-card h2{font-weight:600}.login-card .primary{min-height:49px}.auth-links{font-size:13px}
@keyframes ui-spin{to{transform:rotate(360deg)}}@keyframes ui-dialog-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:640px){body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}.app-layout main{padding:0 19px}.sidebar{display:grid;position:relative;height:auto;padding:17px 20px 10px;background:transparent;border:0}.sidebar .brand{font-size:24px}.sidebar-bottom{gap:10px}.install-button::after{content:'Установить';font-size:11px}.account-button .avatar{background:#e9efdf}.topbar{min-height:38px;font-size:10px;border-bottom:0}.online-status{font-size:9px}.page-head{padding:17px 0 23px;gap:12px}.page-head h1{font-size:31px}.page-head .primary{font-size:12px;min-height:42px;padding:11px 13px}.page-footer{margin-bottom:10px}.task-row{padding:16px 14px;min-height:80px}.progress-card{padding:21px}.sidebar nav{position:fixed;bottom:0;left:0;right:0;z-index:8;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin:0;border-top:1px solid #e2e8db;background:#fafcf8f5;backdrop-filter:blur(14px);padding:8px 10px calc(8px + env(safe-area-inset-bottom));overflow:visible;box-shadow:0 -4px 24px #29452c06}.sidebar nav>button{display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:51px;width:100%;padding:5px 0;font-size:10px;border-radius:12px;white-space:nowrap}.sidebar nav>button span{width:21px;height:21px}.sidebar nav>button.active{background:#e6eedd}.nav-more::before{content:'•••';font-size:16px;letter-spacing:3px;height:21px;line-height:21px}.nav-extra{display:none;position:absolute;bottom:calc(100% + 10px);right:12px;min-width:190px;padding:9px;border:1px solid #dde6d5;background:#fcfef9;border-radius:17px;box-shadow:0 12px 45px #243e2426}.nav-more[aria-expanded="true"]+.nav-extra{display:grid;gap:3px;animation:ui-dialog-in .16s ease-out}.nav-extra button{padding:12px 15px;min-height:46px;font-size:13px}.toast{bottom:calc(86px + env(safe-area-inset-bottom));max-width:calc(100% - 32px);width:max-content;font-size:12px}.confirm-dialog{width:calc(100% - 28px)}dialog{padding:23px;border-radius:23px;max-height:calc(100dvh - 40px)}.dialog-actions{flex-wrap:wrap}.dialog-actions .primary{flex:1}.dialog-actions .danger{margin-right:auto}.toolbar{margin-bottom:18px}.segment{max-width:100%;overflow:auto;white-space:nowrap}.segment button{padding:9px 10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}button:active:not(:disabled),.note-card:hover{transform:none}}

.stats-report{background:#fff;border:1px solid #e1e7db;border-radius:19px;padding:25px;font-size:13px;line-height:1.7}.stats-report h2{font-size:19px;font-weight:550}.stats-report p{color:#6a7d63;margin:11px 0}.stats-table{overflow:auto;margin:24px 0}.stats-table table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}.stats-table th{text-align:left;color:#677b5c;font-weight:500;background:#f2f6eb}.stats-table th,.stats-table td{padding:11px 12px;border-bottom:1px solid #edf0e6}.stats-table td{color:#455a3d}.stats-table tr:last-child td{border-bottom:0}
@media(max-width:640px){.nav-more:has(+.nav-extra button.active){background:#e6eedd;color:#28573f}}
