:root{color-scheme:light;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;background:#edf1f0;color:#16282c;font-size:15px}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;overflow-x:hidden}
button,input,select,textarea{font:inherit}
button{min-height:44px;border:1px solid #bdc9c7;border-radius:10px;padding:9px 14px;background:white;color:#182d30;font-weight:700;cursor:pointer;touch-action:manipulation}
button:hover{border-color:#679a8e;background:#f3fbf7}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #b58b33;outline-offset:2px}
button:disabled{cursor:not-allowed;opacity:.5}
.primary{background:#14735d;color:white;border-color:#14735d}
.primary:hover{background:#10604e;color:white}
.danger{color:#9c2929;border-color:#d9afaf}
.warn{background:#fff4d8;border-color:#e8ce90;color:#643d06}
.loading{min-height:100dvh;display:grid;place-items:center;font-size:1.2rem}
.login-bg{min-height:100dvh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 80% 15%,#31555c,#152c33 65%)}
.login-card{width:min(440px,100%);padding:28px;background:#fff;border-radius:20px;box-shadow:0 18px 55px #061c2666}
.login-card h1{font-size:1.65rem;margin:5px 0 8px}
.login-card p{color:#526469;line-height:1.45}
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;font-weight:900;color:#16836b}
label{font-weight:700;display:block;margin-bottom:6px}
input,textarea,select{min-height:45px;width:100%;padding:10px 12px;border-radius:9px;border:1px solid #b9c8c6;background:#fff;color:#14262a}
textarea{resize:vertical;min-height:80px}
.field{margin:12px 0 16px}
.login-card button{width:100%;min-height:52px}
.muted{color:#647479}
.small{font-size:.83rem}
.error-box{padding:11px 14px;background:#fff0ef;color:#9e2222;border:1px solid #efb4b4;border-radius:10px;margin:12px 0;line-height:1.35}
.shell{height:100dvh;min-height:590px;display:flex;flex-direction:column}
.topbar{min-height:69px;display:flex;align-items:center;gap:13px;padding:10px 18px;background:#152c33;color:white;flex:none}
.brand{font-size:1.1rem;font-weight:900;line-height:1.1;white-space:nowrap}
.brand small{display:block;color:#bcd3cd;font-size:.72rem;font-weight:600;margin-top:4px}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:8px}
.topbar button{background:#27444b;border-color:#4b6970;color:white;min-height:40px}
.topbar button:hover{background:#345a60}
.network-pill{border-radius:999px;padding:5px 9px;background:#254740;color:#d4f9e9;font-size:.76rem;font-weight:700;white-space:nowrap}
.network-pill.bad{background:#713222;color:#fff1ed}
.service-shortcut{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;flex:none;padding:7px 16px;background:#e5f5ed;border-bottom:1px solid #b9d9c8;color:#164b3e;font-size:.84rem;line-height:1.3}
.service-shortcut a{display:inline-block;padding:6px 10px;border-radius:7px;background:#146954;color:white;font-weight:800;text-decoration:none}
.service-shortcut a:hover,.service-shortcut a:focus-visible{background:#0f5746;color:white}
.service-shortcut span{color:#3a6256}
.mobile-nav{display:none}
.workspace{flex:1;display:grid;grid-template-columns:minmax(245px,315px) minmax(310px,1fr) minmax(300px,380px);min-height:0}
.panel{min-width:0;min-height:0;background:white;border-right:1px solid #d6e0dc;display:flex;flex-direction:column}
.panel:last-child{border-right:0}
.panel-head{flex:none;padding:14px;border-bottom:1px solid #dbe4e1;background:#fbfdfc}
.panel-head h2{margin:0 0 9px;font-size:1.1rem}
.row{display:flex;gap:8px;align-items:center}
.row>*{min-width:0}
.row>button{flex:none}
.grow{flex:1}
.panel-body{min-height:0;overflow:auto;padding:12px;overscroll-behavior:contain}
.orders-list{display:grid;gap:9px;align-content:start}
.order-card{display:block;text-align:left;width:100%;padding:12px;min-height:80px;background:#f8faf9;border:1px solid #cbd9d4}
.order-card.active{border:2px solid #128168;background:#ebfaf4}
.order-card strong{display:block;font-size:1.1rem;margin-bottom:5px}
.order-card .meta{font-size:.82rem;font-weight:500;color:#50686b;line-height:1.4}
.order-card .amount{float:right;color:#185947;font-weight:800;font-size:1rem}
.closed-badge{display:inline-block;background:#e9ebeb;border-radius:6px;padding:1px 5px}
.empty{padding:30px 16px;color:#5a7272;text-align:center;border:1px dashed #b6c8c2;border-radius:12px;line-height:1.4}
.categories{flex:none;display:flex;gap:7px;overflow:auto;white-space:nowrap;padding:10px 12px;border-bottom:1px solid #dbe4e1}
.categories button{min-height:39px;padding:6px 11px}
.categories button.active{background:#185b51;color:white;border-color:#185b51}
.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px;align-content:start}
.product{min-height:78px;display:flex;flex-direction:column;justify-content:space-between;text-align:left;padding:11px;background:#f4f8f6;border:1px solid #cadbd3;line-height:1.22}
.product:hover{background:#e9f7ee}
.product span:last-child{font-size:.89rem;color:#256b54}
.product-hint{display:block;margin-top:4px;font-size:.73rem;line-height:1.2;font-weight:500;color:#65777a;max-height:2.4em;overflow:hidden}
.open-products{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #e0e8e5}
.ticket-context{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 8px}
.ticket-context h2{margin:0;font-size:1.2rem}
.ticket-context .muted{grid-column:1/-1}
.ticket-list{display:grid;gap:9px;align-content:start}
.ticket-item{border:1px solid #d5e1dc;border-radius:10px;padding:9px;background:#fcfdfc}
.ticket-item .top{display:flex;justify-content:space-between;gap:8px;align-items:start}
.ticket-item .top button{min-height:35px;padding:4px 9px;font-size:.8rem}
.ticket-item strong{font-size:1rem}
.ticket-item small{display:block;font-size:.78rem;color:#576e71;margin-top:3px;white-space:pre-wrap}
.ticket-item .sent{display:inline-block;margin-top:6px;border-radius:5px;padding:2px 6px;background:#e8f1f8;color:#345975;font-size:.75rem;font-weight:800}
.ticket-item .unsent{background:#fff1d3;color:#805912}
.ticket-footer{flex:none;border-top:1px solid #d6e0dc;padding:12px;background:#fbfdfc}
.total{display:flex;align-items:center;justify-content:space-between;font-size:1.25rem;font-weight:900;margin:0 0 9px}
.action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.action-grid button{padding:7px;min-height:48px}
.action-grid .wide{grid-column:1/-1}
.action-grid .primary{min-height:56px;font-size:1.02rem}
.status-note{margin:8px 0 0;font-size:.78rem;color:#4b686a;line-height:1.32}
#toast{display:none;position:fixed;z-index:1000;right:14px;bottom:14px;max-width:min(420px,calc(100vw - 28px));background:#19383a;color:white;border-radius:11px;padding:12px 16px;box-shadow:0 10px 30px #142b4155}
#toast.show{display:block}
#toast.bad{background:#922e28}
.modal-backdrop{position:fixed;z-index:100;inset:0;background:#142a31a8;display:flex;justify-content:center;align-items:center;padding:12px}
.modal{width:min(490px,100%);max-height:min(94dvh,850px);overflow:auto;background:white;border-radius:17px;box-shadow:0 18px 60px #15222377;padding:20px}
.modal h2{margin:1px 0 12px;font-size:1.34rem}
.modal .buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}
.modal .buttons button{min-width:98px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
.span2{grid-column:1/-1}
.panel-head #menu-section{margin-bottom:7px}
.choice-block{margin:10px 0 15px;padding:10px;border:1px solid #c9dad5;border-radius:10px;background:#f9fcfa;min-width:0}
.choice-block>label,.choice-block legend{font-weight:800;font-size:.94rem;padding:0 4px}
.choice-block select{margin-top:7px}
.choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px;max-height:230px;overflow:auto}
.choice-option{display:flex;align-items:center;gap:8px;margin:0;padding:7px;border:1px solid #d6e1dc;border-radius:8px;font-weight:600;background:white;min-height:43px}
.choice-option input{width:20px;min-height:20px;height:20px;flex:none}
.choice-option span{flex:1}
.choice-option b{white-space:nowrap;color:#17694c;font-size:.84rem}
.big-number{font-weight:900;font-size:1.15rem}
.printable{display:none}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(200px,260px) minmax(260px,1fr) minmax(270px,340px)}.products{grid-template-columns:repeat(auto-fill,minmax(112px,1fr))}}
@media(max-width:790px){.shell{min-height:0}.topbar{padding:8px 10px;min-height:58px}.brand{font-size:1rem}.brand small{font-size:.67rem}.topbar-right{gap:5px}.topbar button{font-size:.78rem;padding:5px 8px}.network-pill{font-size:.7rem}.mobile-nav{display:grid;grid-template-columns:repeat(3,1fr);flex:none;background:#f4f7f5;border-bottom:1px solid #d7e1dc;padding:5px;gap:5px}.mobile-nav button{min-height:45px;padding:5px;font-size:.89rem}.mobile-nav button.active{background:#185b51;color:white}.workspace{display:block;min-height:0;flex:1}.panel{display:none;height:100%;border:0}.panel.active-mobile{display:flex}.products{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}.ticket-footer{padding:9px}.ticket-list{padding-bottom:18px}.panel-head{padding:9px}.categories{padding:7px 9px}.panel-body{padding:9px}}
@media(max-width:790px){.service-shortcut{padding:5px 9px;gap:4px 7px;font-size:.75rem}.service-shortcut a{padding:5px 7px}.service-shortcut span{flex-basis:100%}}
@media(max-width:580px){.topbar{flex-wrap:wrap;gap:5px}.topbar-right{margin-left:0;width:100%;justify-content:flex-end}.brand small{display:none}}
@media(max-width:390px){.brand small{display:none}.network-pill{max-width:94px;overflow:hidden;text-overflow:ellipsis}.products{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}}
@media print{body{background:white}.shell,.modal-backdrop,#toast,.login-bg{display:none!important}.printable{display:block!important;color:black;padding:0;font:14px monospace;max-width:76mm;margin:0 auto}.printable h1{font-size:17px;text-align:center}.printable .line{display:flex;justify-content:space-between;gap:8px;margin:7px 0}.printable .total-line{border-top:1px dashed black;padding-top:8px;font-weight:bold}.printable .note{font-size:11px}}
