:root{--navy:#0d3b66;--blue:#1475e3;--green:#169b62;--red:#d9485f;--orange:#e58d16;--purple:#8d43c7;--bg:#eef3f8;--card:#fff;--text:#132238;--muted:#6f7d91;--line:#dfe5ed;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{background:#dfe7ef}body{margin:0;background:var(--bg);color:var(--text);font-family:Tahoma,"Segoe UI",sans-serif;overscroll-behavior-y:none}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}.hidden{display:none!important}
#app{min-height:100dvh}.shell{width:min(100%,600px);min-height:100dvh;margin:auto;background:var(--bg);padding-bottom:calc(84px + var(--safe-bottom));box-shadow:0 0 28px #20364d16}.topbar{position:sticky;top:0;z-index:30;background:linear-gradient(135deg,#0b3158,#145b93);color:#fff;padding:12px 14px;padding-top:max(12px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 10px #0002}.brand{font-weight:900;font-size:15px}.userbox{font-size:11px;opacity:.9;margin-top:3px}.top-actions{display:flex;gap:6px;align-items:center}.btn{border:0;border-radius:13px;padding:12px 15px;background:#e9eef5;color:#18304e;font-weight:800;min-height:44px}.btn.primary{background:var(--blue);color:white}.btn.green{background:var(--green);color:white}.btn.red{background:var(--red);color:white}.btn.orange{background:var(--orange);color:white}.btn.ghost{background:#fff1;color:white;border:1px solid #fff5}.btn.small{padding:8px 10px;border-radius:10px;font-size:12px;min-height:36px}.btn:disabled{opacity:.5;cursor:not-allowed}
.nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:40;width:min(100%,600px);display:flex;gap:4px;overflow-x:auto;padding:8px 8px calc(8px + var(--safe-bottom));background:#fff;border-top:1px solid var(--line);box-shadow:0 -5px 18px #19344d14;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav button{flex:1 0 74px;white-space:nowrap;border:0;border-radius:12px;padding:9px 7px;background:transparent;color:#617087;font-weight:800;font-size:11px;min-height:50px}.nav button.active{background:#e8f2ff;color:#0759a8}.nav button:before{display:block;font-size:18px;margin-bottom:3px}.nav button[data-r="dashboard"]:before{content:"⌂"}.nav button[data-r="cuts"]:before{content:"✂"}.nav button[data-r="newcut"]:before{content:"＋"}.nav button[data-r="corrections"]:before{content:"↺"}.nav button[data-r="settings"]:before{content:"⚙"}
.page{padding:11px}.card{background:var(--card);border:1px solid #e5eaf0;border-radius:17px;padding:14px;margin-bottom:11px;box-shadow:0 3px 11px #172b4d0b}.card h2,.card h3,.card h4{margin:0 0 12px}.sub{color:var(--muted);font-size:12px}.grid{display:grid;gap:10px}.grid.two,.grid.three{grid-template-columns:1fr}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:12px;color:#52637a;font-weight:800}.field input,.field select,.field textarea{width:100%;border:1px solid #cbd7e5;border-radius:12px;padding:12px 11px;background:white;color:#172b4d;min-height:48px;font-size:16px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#3b8eea;box-shadow:0 0 0 3px #1475e319}.field textarea{min-height:88px;resize:vertical}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.actions .btn{flex:1}.kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kpi{background:white;border-radius:15px;padding:12px;border:1px solid #e0e6ee;min-height:92px}.kpi .n{font-size:24px;font-weight:900;margin-top:6px}.kpi.blue{border-right:5px solid var(--blue)}.kpi.green{border-right:5px solid var(--green)}.kpi.red{border-right:5px solid var(--red)}.kpi.orange{border-right:5px solid var(--orange)}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:13px;background:#fff;-webkit-overflow-scrolling:touch}.table{width:100%;border-collapse:collapse;min-width:600px}.table th,.table td{padding:10px 8px;border-bottom:1px solid #edf0f4;text-align:center;font-size:13px}.table th{background:#eaf2fb;color:#26486e;position:sticky;top:0;z-index:3}.table input,.table select{width:82px;padding:9px;border:1px solid #ccd7e5;border-radius:9px;font-size:16px}.table tr:last-child td{border-bottom:0}.badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900;background:#e7edf5;color:#3a506b}.badge.green{background:#dff4e9;color:#11663f}.badge.red{background:#fde5e9;color:#9f283d}.badge.orange{background:#fff0d6;color:#9c5a00}.badge.blue{background:#dfeeff;color:#0b5eac}.badge.purple{background:#efe4f7;color:#6e2f9d}.list{display:flex;flex-direction:column;gap:8px}.item{background:white;border:1px solid #e1e6ed;border-radius:14px;padding:13px;display:flex;justify-content:space-between;gap:10px;align-items:flex-start;box-shadow:0 2px 7px #172b4d08}.item:active{transform:scale(.995)}.item-main{min-width:0}.item-title{font-weight:900}.item-meta{font-size:12px;color:var(--muted);margin-top:5px;line-height:1.7}.ltr{direction:ltr;text-align:left}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:2px 0 10px}.section-title h2{font-size:18px;margin:0}.notice{padding:11px 12px;border-radius:12px;background:#fff7df;border:1px solid #ffe2a1;color:#795100;font-size:12px;line-height:1.8}.error{padding:12px;border-radius:12px;background:#fee9ed;border:1px solid #ffc9d2;color:#8e2134}.ok{padding:12px;border-radius:12px;background:#e7f8ef;border:1px solid #bfead2;color:#156942}.tabs{display:flex;gap:6px;overflow:auto;margin-bottom:10px;scrollbar-width:none;padding-bottom:2px}.tabs::-webkit-scrollbar{display:none}.tabs button{border:0;border-radius:11px;padding:10px 12px;background:#eef2f7;white-space:nowrap;min-height:42px}.tabs button.active{background:#d8ebff;color:#075aa7;font-weight:900}.login{min-height:100dvh;display:grid;place-items:center;padding:18px;background:linear-gradient(145deg,#dbeeff,#f8fbff)}.login-card{width:min(430px,100%);background:white;border-radius:24px;padding:23px;box-shadow:0 18px 45px #16365f20}.logo{width:76px;height:76px;border-radius:22px;margin:auto;background:#0e4f86;color:white;display:grid;place-items:center;font-size:36px}.login h1{text-align:center;margin:12px 0 4px;font-size:22px}.login p{text-align:center;color:var(--muted);margin:0 0 18px}.demo{font-size:11px;background:#f5f8fc;padding:10px;border-radius:10px;margin-top:12px;line-height:1.9}.matrix th:first-child,.matrix td:first-child{position:sticky;right:0;background:#fff;z-index:2}.matrix th:first-child{background:#eaf2fb}.matrix input{width:68px}.muted{color:var(--muted)}.danger-text{color:var(--red);font-weight:900}.good-text{color:var(--green);font-weight:900}.divider{height:1px;background:var(--line);margin:12px 0}.timeline{border-right:3px solid #d7e6f6;margin-right:7px;padding-right:15px}.event{position:relative;margin:0 0 12px}.event:before{content:"";position:absolute;right:-21px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--blue)}.event .time{font-size:11px;color:var(--muted)}
#toast{position:fixed;bottom:calc(78px + var(--safe-bottom));right:50%;transform:translateX(50%);z-index:100;width:max-content;max-width:88%;padding:11px 15px;border-radius:12px;background:#172b4d;color:white;opacity:0;pointer-events:none;transition:.2s}#toast.show{opacity:1}.install-banner{display:none;background:#e9f4ff;border:1px solid #bedcff;color:#124f84;border-radius:12px;padding:9px 11px;font-size:12px;align-items:center;gap:8px}.install-banner.show{display:flex}.install-banner button{margin-right:auto}
@media(min-width:560px){.grid.two{grid-template-columns:1fr 1fr}.grid.three{grid-template-columns:repeat(2,1fr)}}
