*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:#f3f4f6;color:#171717;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.4}button,input,select,textarea{font:inherit}button,input,select,textarea{font-size:16px}button{cursor:pointer}.boot{min-height:280px;display:grid;place-items:center;align-content:center;gap:10px}.boot img{width:150px;max-width:55vw}.boot p{margin:0;color:#666}.shell{min-height:100vh}.topbar{height:58px;background:#111;color:white;display:flex;align-items:center;gap:12px;padding:8px 14px;position:sticky;top:0;z-index:30;border-bottom:3px solid #d5101d}.brandmark{display:flex;align-items:center;gap:9px;min-width:0}.brandmark img{width:40px;height:40px;object-fit:contain;background:white;border-radius:8px}.brandmark strong{font-size:16px;white-space:nowrap}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.top-actions button,.iconbtn{border:1px solid #444;background:#222;color:white;border-radius:8px;min-height:40px;padding:0 11px}.layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 58px)}.nav{background:#191919;color:#eee;padding:12px 10px;position:sticky;top:58px;height:calc(100vh - 58px);overflow:auto}.nav a{display:flex;align-items:center;gap:9px;color:#ddd;text-decoration:none;padding:10px 11px;border-radius:8px;margin:2px 0;font-size:14px}.nav a:hover,.nav a.active{background:#303030;color:#fff}.nav .section{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#999;padding:14px 10px 5px}.main{min-width:0;padding:18px}.pagehead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.pagehead h1{font-size:21px;line-height:1.2;margin:0}.pagehead p{margin:4px 0 0;color:#666;font-size:14px}.actions{display:flex;gap:8px;flex-wrap:wrap}.btn{min-height:42px;border:1px solid #b9bdc5;border-radius:8px;background:white;color:#171717;padding:0 14px;font-weight:650}.btn.primary{background:#d5101d;border-color:#d5101d;color:white}.btn.dark{background:#171717;border-color:#171717;color:white}.btn.danger{background:#a91520;border-color:#a91520;color:white}.btn.small{min-height:36px;padding:0 10px;font-size:14px}.card{background:white;border:1px solid #dadde2;border-radius:11px;padding:14px;margin-bottom:12px}.card h2{font-size:17px;margin:0 0 10px}.card h3{font-size:15px;margin:0 0 8px}.grid{display:grid;gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.stat{background:white;border:1px solid #dadde2;border-radius:10px;padding:13px}.stat .label{font-size:12px;color:#686868}.stat .value{font-size:22px;font-weight:800;margin-top:4px}.field{min-width:0}.field label{display:block;font-size:13px;font-weight:700;margin:0 0 5px}.field input,.field select,.field textarea{width:100%;border:1px solid #b6bbc4;border-radius:8px;background:white;padding:9px 10px;min-height:42px;color:#171717}.field textarea{min-height:92px;resize:vertical}.field .hint{font-size:12px;color:#707070;margin-top:4px}.tablewrap{width:100%;overflow-x:auto;border:1px solid #dadde2;border-radius:10px;background:white}table{border-collapse:collapse;width:100%;min-width:680px}th,td{text-align:left;padding:10px 11px;border-bottom:1px solid #eceef1;font-size:14px;vertical-align:top}th{background:#f8f9fa;font-size:12px;color:#555;text-transform:uppercase;letter-spacing:.03em}tr:last-child td{border-bottom:0}.link{color:#a6000c;text-decoration:none;font-weight:700}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:12px;background:#eceef1;color:#333}.badge.warn{background:#fff2cf;color:#714d00}.badge.good{background:#e7f5ea;color:#17642a}.badge.bad{background:#fde8ea;color:#89131e}.empty{padding:24px;text-align:center;color:#666}.switchrow{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:50px;padding:8px 0;border-bottom:1px solid #eceef1}.switchrow:last-child{border-bottom:0}.switchtext strong{display:block;font-size:14px}.switchtext span{display:block;font-size:12px;color:#707070;margin-top:2px}.switch{position:relative;display:inline-flex;align-items:center;flex:0 0 auto}.switch input{position:absolute;opacity:0;pointer-events:none}.switch span{width:46px;height:26px;border-radius:999px;background:#b8bcc3;position:relative;transition:.15s}.switch span:after{content:"";position:absolute;width:20px;height:20px;border-radius:50%;background:white;top:3px;left:3px;transition:.15s;box-shadow:0 1px 3px rgba(0,0,0,.25)}.switch input:checked+span{background:#d5101d}.switch input:checked+span:after{left:23px}.switch input:focus-visible+span{outline:3px solid rgba(213,16,29,.25);outline-offset:2px}.modal{border:0;border-radius:12px;padding:0;width:min(680px,calc(100% - 24px));max-height:90vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.28)}.modal::backdrop{background:rgba(0,0,0,.5)}.modalhead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 15px;border-bottom:1px solid #e2e4e8;position:sticky;top:0;background:white;z-index:2}.modalhead h2{font-size:18px;margin:0}.modalbody{padding:15px}.modalfoot{display:flex;justify-content:flex-end;gap:8px;padding:12px 15px;border-top:1px solid #e2e4e8;background:#fafafa}.closebtn{border:0;background:transparent;font-size:24px;line-height:1;width:40px;height:40px}.toast{position:fixed;right:16px;bottom:16px;z-index:100;background:#171717;color:white;border-radius:9px;padding:11px 14px;max-width:min(420px,calc(100% - 32px));box-shadow:0 8px 30px rgba(0,0,0,.3)}.toast.error{background:#98131e}.loginwrap{min-height:100vh;display:grid;place-items:center;padding:20px}.authcard{width:min(460px,100%);background:white;border:1px solid #d9dce1;border-radius:14px;padding:20px}.authbrand{text-align:center;margin-bottom:14px}.authbrand img{width:150px;max-width:62vw}.authbrand h1{font-size:20px;margin:7px 0 2px}.tabs{display:flex;gap:7px;margin-bottom:14px}.tabs button{flex:1;border:1px solid #c9cdd3;background:#fff;border-radius:8px;min-height:40px;font-weight:700}.tabs button.active{background:#171717;color:#fff;border-color:#171717}.publicwrap{max-width:820px;margin:0 auto;padding:18px}.publicbrand{display:flex;align-items:center;gap:12px;margin-bottom:14px}.publicbrand img{width:72px;height:72px;object-fit:contain}.publicbrand h1{font-size:20px;margin:0}.publicbrand p{font-size:13px;color:#666;margin:3px 0 0}.orderhead{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}.orderhead .grow{flex:1;min-width:220px}.sectiontabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:12px}.sectiontabs button{white-space:nowrap;border:1px solid #c9cdd3;background:white;border-radius:8px;padding:8px 11px;min-height:40px}.sectiontabs button.active{background:#171717;color:white;border-color:#171717}.timeline{display:grid;gap:8px}.timelineitem{display:grid;grid-template-columns:130px 1fr;gap:10px;border-left:3px solid #d5101d;padding:5px 0 5px 10px}.timelineitem time{font-size:12px;color:#666}.kicker{font-size:12px;color:#666;text-transform:uppercase;letter-spacing:.04em}.money{font-variant-numeric:tabular-nums}.readonly{background:#fff3cd;border:1px solid #ead091;color:#624c00;padding:10px 12px;border-radius:8px;margin-bottom:12px}.hidden{display:none!important}.mobile-menu{display:none}.split{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:12px}.compact-list{display:grid;gap:7px}.compact-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e0e3e7;border-radius:8px;padding:9px 10px}.compact-row strong{font-size:14px}.compact-row span{font-size:12px;color:#666}.help{font-size:13px;color:#666}.statusbar{display:flex;gap:7px;flex-wrap:wrap}.statusbar select{min-height:40px;border:1px solid #b6bbc4;border-radius:8px;padding:0 10px;background:#fff}@media(max-width:980px){.layout{grid-template-columns:185px minmax(0,1fr)}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:1fr}}@media(max-width:760px){.topbar{height:56px;padding:7px 10px}.brandmark strong{font-size:15px}.layout{display:block}.nav{display:none;position:fixed;left:0;top:56px;bottom:0;width:min(280px,85vw);height:auto;z-index:50;box-shadow:10px 0 30px rgba(0,0,0,.2)}.nav.open{display:block}.mobile-menu{display:inline-flex}.main{padding:12px}.pagehead{align-items:center}.pagehead h1{font-size:19px}.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.stat{padding:11px}.stat .value{font-size:19px}.tablewrap table{min-width:620px}.modal{width:calc(100% - 14px);max-height:92vh}.timelineitem{grid-template-columns:1fr;gap:2px}.publicwrap{padding:12px}.authcard{padding:16px}}@media(max-width:390px){.stats{grid-template-columns:1fr}.main{padding:10px}.top-actions .userlabel{display:none}.brandmark img{width:37px;height:37px}.pagehead{display:block}.pagehead .actions{margin-top:9px}.btn{width:100%}.actions .btn{width:auto;flex:1}.statusbar{display:grid;grid-template-columns:1fr}.statusbar select,.statusbar .btn{width:100%}}
.sigcanvas{display:block;width:100%;height:180px;border:1px solid #aeb4bd;border-radius:8px;background:white;touch-action:none}.sigtools{display:flex;justify-content:flex-end;margin-top:6px}

/* 1.0.5 form/action resilience */
.form-error{margin:0 0 12px;padding:10px 12px;border:1px solid #e4aab0;border-radius:8px;background:#fdecee;color:#7f111a;font-size:14px;font-weight:650}
button:disabled,.btn:disabled{cursor:not-allowed;opacity:.62}
button[aria-busy="true"]{cursor:progress}
