*{box-sizing:border-box}body{margin:0;background:#f5f6f8;color:#192536;font:14px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #dce2e9;background:white;padding:10px 15px;border-radius:8px;color:#26364a}button:hover{background:#eef3f8}button.primary{background:#2563eb;color:white;border-color:#2563eb}button.primary:hover{background:#1c50c6}aside{width:225px;background:#132238;color:#a8b7cb;position:fixed;height:100vh;padding:28px 18px;display:flex;flex-direction:column}.brand{font-size:24px;color:white;font-weight:750;letter-spacing:-1px;padding:4px 12px 40px}.brand span{color:#68a4ff}nav button{display:block;width:100%;text-align:left;margin-bottom:7px;border:0;background:transparent;color:#b7c5d8;padding:14px}nav button.active,nav button:hover{background:#263b58;color:white}.account{margin-top:auto;padding:15px 10px;border-top:1px solid #334155}.account small{display:block;margin:7px 0 18px;color:#98abc4}main{margin-left:225px;padding:34px 42px;max-width:1700px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}h1{font-size:29px;letter-spacing:-.9px;margin:0 0 8px}p{color:#768397;line-height:1.5}header p{margin:0}.eyebrow{font-size:11px;letter-spacing:1.5px;color:#8492a6;margin-bottom:12px}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:28px}.card,.panel{background:white;border:1px solid #e2e7ed;border-radius:12px}.card{padding:23px}.card label{color:#718095}.card strong{display:block;font-size:30px;letter-spacing:-1px;margin-top:13px}.card small{display:block;color:#91a0b2;margin-top:7px}.toolbar{display:flex;gap:12px;padding:20px;border-bottom:1px solid #e7ebf0}input,select{border:1px solid #dce2e9;border-radius:7px;padding:11px 12px;background:white;color:#26364a;min-width:0}input:focus,select:focus{outline:2px solid #a4c2ff;outline-offset:1px}.toolbar input{width:320px}.toolbar .refresh{margin-left:auto}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:11px;text-transform:uppercase;letter-spacing:.7px;color:#7a879a;background:#fafbfd;padding:15px 20px;font-weight:600}td{padding:19px 20px;border-top:1px solid #eef1f5}td strong{font-size:14px}td small{display:block;color:#95a0af;margin-top:6px}.badge{display:inline-block;background:#edf7f1;color:#26804f;border-radius:6px;padding:5px 9px;font-size:12px}.badge.zero{background:#fff1ed;color:#c66a43}.foot{padding:16px 20px;color:#8b97a8;font-size:12px}.empty{text-align:center;padding:65px 25px;color:#7f8c9f}.empty h2{color:#26364a}.auth{max-width:430px;margin:12vh auto;background:white;border:1px solid #e2e7ed;padding:35px;border-radius:16px}.auth .brand{color:#132238;padding:0 0 25px}.auth h1{font-size:24px}form label{display:block;margin:17px 0 7px;color:#57677c;font-size:13px}form input,form select{width:100%}form .actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.auth button{width:100%;margin-top:25px}.error{color:#c03636;font-size:13px;margin-top:14px}dialog{border:0;border-radius:15px;padding:28px;width:450px;box-shadow:0 20px 80px #0b1c3540}dialog::backdrop{background:#10213b66}dialog h2{margin:0;font-size:22px}.hint{font-size:12px;line-height:1.6;color:#8a96a6}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#162b46;color:white;padding:13px 23px;border-radius:9px;display:none;z-index:10}.split{display:grid;grid-template-columns:1fr 1fr;gap:15px}.note{max-width:320px;white-space:normal;line-height:1.5}.security{margin-top:20px;color:#8d99aa;font-size:12px}@media(max-width:850px){aside{position:static;width:100%;height:auto;padding:15px}.brand{padding:0 0 15px}nav{display:flex}nav button{margin:0}.account{display:flex;gap:14px;align-items:center;padding-bottom:0}.account small{margin:0}main{margin:0;padding:24px 16px}.cards{gap:8px}.card{padding:15px}.card strong{font-size:23px}header{gap:12px}.toolbar{flex-wrap:wrap}.toolbar input{width:100%}.auth{margin:6vh 16px}.account button{margin-left:auto}}

.warehouse-bar{display:flex;align-items:center;gap:12px;margin-bottom:24px;flex-wrap:wrap}.warehouse-bar label{color:#718095}.warehouse-bar select{min-width:260px}

/* Compact table rows for denser inventory lists. */
th{padding:11px 16px}
td{padding:10px 16px}
td small{margin-top:3px;font-size:11px}
td button{padding:7px 10px;font-size:13px}
td .badge{padding:4px 8px}

@media(max-width:600px){
 body{font-size:14px}
 aside{padding:14px 12px}
 aside .brand{font-size:22px;padding-bottom:12px}
 nav{gap:4px;overflow-x:auto}
 nav button{width:auto;flex:1;white-space:nowrap;text-align:center;padding:11px 8px;font-size:12px;min-height:44px}
 .account{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0 0;margin-top:10px}
 .account strong{font-size:13px}.account small{font-size:11px;margin-right:auto}
 .account button{margin:0;padding:8px 10px;font-size:11px;min-height:40px}
 main{padding:20px 12px}
 .eyebrow{font-size:10px;letter-spacing:.7px;line-height:1.6}
 header{align-items:stretch;flex-direction:column;margin-bottom:18px;gap:14px}
 h1{font-size:25px}header p{font-size:13px}
 header>button{width:100%;min-height:46px}
 .warehouse-bar{gap:8px;margin-bottom:18px}
 .warehouse-bar label{width:100%;font-size:12px}
 .warehouse-bar select{min-width:0;width:100%;flex:1 1 100%}
 .warehouse-bar button{min-height:44px;width:100%}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
 .card{padding:14px 12px;min-width:0}.card:last-child{grid-column:1/-1}
 .card label{font-size:12px}.card strong{font-size:24px;margin-top:8px;overflow-wrap:anywhere}.card small{font-size:11px}
 .toolbar{padding:12px;gap:8px}
 .toolbar input{width:100%;flex:1 1 100%}
 .toolbar select{width:100%;flex:1 1 100%}
 .toolbar button{flex:1;min-height:44px;margin:0;font-size:12px}
 input,select{font-size:16px;min-height:44px;width:100%}
 .panel{border-radius:10px}
 .table-wrap{overflow:visible}
 table,thead,tbody,tr,td{display:block;white-space:normal;width:100%}
 thead{display:none}
 tbody{padding:0 12px}
 tbody tr{padding:12px 0;border-bottom:1px solid #e4e9ef}
 tbody tr:last-child{border-bottom:0}
 td{border:0;padding:5px 0;display:flex;gap:12px;justify-content:space-between;align-items:center;overflow-wrap:anywhere;min-width:0}
 td::before{content:attr(data-label);color:#7a879a;font-size:12px;flex-shrink:0;max-width:40%}
 td:first-child{display:block;padding:3px 0 9px}
 td:first-child::before{display:none}
 td:first-child strong{font-size:16px}
 td small{margin-top:3px}
 td:last-child:has(button){display:flex;flex-wrap:wrap;gap:8px;margin-top:7px}
 td:last-child:has(button)::before{display:none}
 td:last-child button{flex:1;min-height:44px;padding:10px;font-size:12px}
 td button{min-height:40px}
 td.note{max-width:none;align-items:flex-start}
 .foot{padding:12px;font-size:11px}
 dialog{width:calc(100% - 24px);max-width:450px;max-height:90dvh;padding:22px 18px;overflow-y:auto}
 dialog h2{font-size:21px}.split{gap:10px}
 form .actions{position:sticky;bottom:-22px;background:white;padding:12px 0;margin-top:18px}
 form .actions button{flex:1;min-height:46px}
 .auth{margin:30px 12px;padding:25px 20px}.auth button{min-height:46px}
 #toast{width:calc(100% - 24px);text-align:center;bottom:16px;font-size:13px}
 .security{line-height:1.6}
}

.extra-cost-row{padding:12px;margin:10px 0;border:1px solid #e2e7ed;border-radius:9px;background:#fafbfd}.extra-cost-row label:first-child{margin-top:0}.extra-cost-row button{margin-top:12px}#add-extra-cost{margin-top:8px}

.receipt-actions{display:flex;gap:10px;margin-top:20px}#receipt-paper{overflow-wrap:anywhere}#receipt-paper p{color:#26364a}
@media print{body.printing-receipt{background:white}body.printing-receipt>#app,body.printing-receipt>#toast{display:none!important}body.printing-receipt dialog{position:static;display:block;width:100%;max-width:none;max-height:none;margin:0;padding:10mm;box-shadow:none;border:0;overflow:visible}body.printing-receipt dialog::backdrop{background:transparent}body.printing-receipt .receipt-actions{display:none!important}#receipt-paper{font-size:12pt;color:black}#receipt-paper h2{font-size:18pt}}

textarea{width:100%;font:inherit;padding:11px;border:1px solid #dce2e9;border-radius:7px;resize:vertical}details{margin-top:18px}summary{cursor:pointer;color:#57677c;padding:8px 0}@media(max-width:600px){textarea{font-size:16px}}

/* Light workspace palette. */
:root{--page:#f1f3f5;--surface:#fff;--ink:#27323e;--muted:#788491;--line:#e0e5e9;--accent:#397b80}
body{background:var(--page);color:var(--ink)}
aside{background:#e8ecef;color:#616f7c;border-right:1px solid #d9e0e5;padding:25px 16px}
.brand{color:#293b48;letter-spacing:-.8px}.brand span{color:#397b80}
nav button{color:#65717d;border-radius:9px;font-weight:500;padding:13px 12px}
nav button:hover{background:#dfe6e9;color:#2d4e58}
nav button.active{background:#d5e5e4;color:#285e63;box-shadow:inset 3px 0 #397b80}
.account{border-top:1px solid #d2dbe0;color:#344754;padding:16px 8px 0}
.account small{color:#78858e;line-height:1.5}
.account button{display:block;width:100%;margin-top:7px;background:#f5f7f8;border-color:#d7dfe4;color:#62717c;font-size:12px;padding:9px}
main{padding:28px 30px;max-width:none}
.eyebrow{color:#8b969e;font-size:10px;letter-spacing:1.2px}
h1{font-size:28px;font-weight:700;color:#263642}
header{margin-bottom:24px}header p{font-size:13px;color:#84909a}
button{border-color:#dbe2e6;border-radius:8px;color:#50616e;transition:background .15s,border-color .15s}
button:hover{background:#edf3f3;border-color:#bbcfd0}
button.primary{background:#397b80;border-color:#397b80;box-shadow:0 2px 4px #2b656514}
button.primary:hover{background:#306b70;border-color:#306b70}
input,select,textarea{border-color:#dbe2e6;color:#3d505c;background:#fff}
input:focus,select:focus,textarea:focus{outline:2px solid #a7cbcc;outline-offset:1px}
.warehouse-bar{background:#e9edef;border:1px solid #dfe5e8;border-radius:10px;padding:11px 14px;margin-bottom:20px}
.warehouse-bar label{font-size:12px;font-weight:600;color:#75848d}
.warehouse-bar select{border-color:#d4dde2;min-width:260px}
.cards{gap:14px;margin-bottom:22px}
.card{padding:18px 21px;border-color:#e0e6e9;border-radius:11px;box-shadow:0 2px 3px #24354103}
.card label{font-size:12px;color:#7e8c96}
.card strong{font-size:28px;margin-top:10px;font-weight:650;color:#314754}
.card small{font-size:11px;color:#97a1a9}
.card:nth-child(2){background:#f4f8f8;border-color:#dce8e7}
.card:nth-child(2) strong{color:#397b80}
.card:nth-child(3){background:#f8f7f3;border-color:#e8e5dc}
.card:nth-child(3) strong{color:#7c7357}
.panel{border-color:#dfe5e9;border-radius:11px;box-shadow:0 3px 10px #263b4803}
.toolbar{padding:14px;gap:9px;background:#fff;border-radius:11px 11px 0 0}
.toolbar input{width:270px;font-size:13px}
.toolbar select,.toolbar button{font-size:12px}
th{background:#edf1f3;color:#7a8994;letter-spacing:.5px;font-size:10px;padding:11px 10px}
td{padding:10px;font-size:13px;border-color:#edf0f2}
td strong{font-size:13px;font-weight:600}td small{color:#99a4ad;font-size:10px}
tbody tr:hover{background:#f8fafb}
.badge{background:#e8f3ed;color:#4a8565;font-size:11px;border-radius:5px}
.badge.zero{background:#faf0e5;color:#ad8150}
td button{font-size:11px;padding:7px 8px;border-color:#e0e6e9;background:#fafcfc}
td:last-child:has(button){white-space:normal;min-width:180px;max-width:230px}
td:last-child button{margin:2px}
td:first-child{white-space:normal;min-width:130px;max-width:230px}
td.note{min-width:70px;max-width:180px;font-size:12px}
.foot,.security{color:#95a0a8;font-size:11px}
dialog{border:1px solid #e2e8eb;border-radius:13px;box-shadow:0 20px 80px #263e482b}
dialog::backdrop{background:#34485455}dialog h2{color:#304754}
#toast{background:#365f65}
@media(min-width:1200px){table{white-space:normal}td:nth-child(2){max-width:140px}td:nth-child(3){max-width:90px}}
@media(max-width:850px){aside{border-right:0;border-bottom:1px solid #d9e0e5}.account button{width:auto;margin:0}.account{padding-top:12px}main{padding:22px 16px}}
@media(max-width:600px){aside{padding:14px 12px}main{padding:20px 12px}.account button{font-size:11px;padding:8px}.cards{gap:8px}.card{padding:14px 12px}.card strong{font-size:24px}.warehouse-bar{padding:12px}.warehouse-bar select{min-width:0}.toolbar input{width:100%;font-size:16px}.toolbar select{font-size:16px}td{padding:5px 0}td:first-child,td:last-child:has(button),td.note{max-width:none;min-width:0}td:first-child strong{font-size:16px}td:last-child button{margin:0;font-size:12px}tbody tr:hover{background:transparent}nav button{font-size:11px;padding:11px 8px}}
@media print{body.printing-receipt{background:white}#receipt-paper h2,#receipt-paper p{color:black}}

/* Dense desktop rows: keep actions on one line. */
@media(min-width:601px){
 th{padding:8px 9px}
 td{padding:6px 9px;font-size:12px;line-height:1.25}
 td strong{font-size:12px}
 td small{font-size:10px;margin-top:2px}
 td button{padding:5px 6px;font-size:10px;line-height:1.2;border-radius:6px;min-height:26px}
 td .badge{padding:3px 6px;font-size:10px}
 td:last-child:has(button){white-space:nowrap;min-width:0;max-width:none}
 td:last-child button{margin:0 2px 0 0}
 td:first-child{min-width:115px}
 td.note{max-width:120px;font-size:11px}
}

/* Icon actions with a tooltip above the focused control. */
td button.icon-action{position:relative;display:inline-flex;align-items:center;justify-content:center;width:30px;height:28px;padding:0;font-size:17px;line-height:1;vertical-align:middle;border-radius:7px;overflow:visible}
td button.icon-stock{font-size:12px;font-weight:650}
td button.icon-sell{color:#397b80;background:#f0f7f6;border-color:#d4e5e3}
.icon-action:focus-visible{outline:2px solid #397b80;outline-offset:2px}
.icon-action::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);background:#344854;color:#fff;font-size:11px;font-weight:400;line-height:1.4;padding:6px 9px;border-radius:6px;white-space:nowrap;box-shadow:0 3px 10px #263b4820;opacity:0;visibility:hidden;pointer-events:none;z-index:20}
.icon-action:hover::after,.icon-action:focus-visible::after{opacity:1;visibility:visible}
.table-wrap:has(.icon-action){padding-top:32px;margin-top:-32px}
@media(max-width:600px){td:last-child button.icon-action{flex:0 0 44px;width:44px;height:44px;min-height:44px;font-size:20px}td:last-child button.icon-stock{font-size:14px}}

.product-thumb{width:36px;height:36px;object-fit:cover;border-radius:6px;float:left;margin-right:8px;background:#edf1f3}.photo-preview{display:block;max-width:100%;max-height:180px;object-fit:contain;margin:12px 0;border-radius:8px}.photo-preview[hidden]{display:none}

dialog:has(.contract-paper),dialog:has(#contract-preview){width:750px;max-width:calc(100% - 24px);max-height:90dvh;overflow:auto}.contract-paper{font-family:Georgia,serif;font-size:14px;line-height:1.5}.contract-paper p{margin:8px 0}@media print{body.printing-receipt dialog:has(.contract-paper){width:100%;max-width:none;max-height:none;overflow:visible}.contract-paper{font-size:11pt;line-height:1.35}.contract-paper p{margin:5pt 0;orphans:2;widows:2}}

.expense-summary{margin-top:18px;grid-template-columns:repeat(2,minmax(0,1fr))}aside nav{overflow-y:auto;min-height:0}aside .account{flex-shrink:0}@media(max-width:600px){aside nav{overflow-y:hidden;flex-shrink:0}}

/* Compact workspace and report controls. */
@media(min-width:601px){
 aside{width:205px;padding:18px 12px}
 aside .brand{font-size:23px;padding:2px 10px 22px}
 nav button{padding:9px 10px;margin-bottom:4px;font-size:12px;line-height:1.35}
 .account{padding:11px 7px 0;font-size:12px}.account small{font-size:10px;margin:5px 0 10px}
 .account button{font-size:10px;padding:7px;margin-top:5px}
 main{margin-left:205px;padding:20px 24px}
 .eyebrow{margin-bottom:8px;font-size:9px}
 h1{font-size:25px;margin-bottom:5px}h2{font-size:19px;margin:17px 0 12px}
 header{margin-bottom:16px}header p{font-size:12px}
 header>button{padding:9px 13px;font-size:12px}
 .warehouse-bar{padding:8px 11px;gap:9px;margin-bottom:14px}
 .warehouse-bar select{padding:7px 10px;font-size:12px}
 .warehouse-bar button{padding:8px 11px;font-size:11px}
 .cards{gap:12px;margin-bottom:15px}
 .card{padding:13px 16px}.card label{font-size:11px}.card strong{font-size:24px;margin-top:6px}.card small{font-size:10px;margin-top:4px}
 .expense-summary{margin-top:13px;grid-template-columns:minmax(240px,1fr) minmax(140px,.5fr)}
 .toolbar{padding:11px;gap:8px}
 form.toolbar{align-items:flex-end;flex-wrap:wrap}
 form.toolbar>div{flex:0 1 190px;min-width:150px}
 form.toolbar label{margin:0 0 5px;font-size:11px}
 form.toolbar input{width:100%;padding:7px 9px;font-size:12px;height:33px}
 form.toolbar button{flex:0 0 auto;align-self:flex-end;height:33px;padding:7px 12px;font-size:11px}
 .foot{padding:10px 13px;font-size:10px}
 .security{margin-top:14px;font-size:10px}
}
@media(min-width:601px) and (max-width:850px){aside{width:100%;padding:12px}main{margin-left:0;padding:18px 14px}.account button{width:auto}nav button{margin-bottom:0}}
@media(max-width:600px){form.toolbar{align-items:flex-end}form.toolbar>div{flex:1 1 120px;min-width:0}form.toolbar label{margin:0 0 6px;font-size:11px}form.toolbar input{width:100%}.expense-summary{margin-top:12px}.expense-summary .card:last-child{grid-column:auto}}

.expense-line{display:flex;align-items:flex-start;gap:12px;padding:0 15px;border-bottom:1px solid #e6ecef}.expense-line:last-of-type{border-bottom:0}.expense-line details{flex:1;min-width:0;margin:0}.expense-line summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;color:#405762;font-size:13px;list-style:none}.expense-line summary:before{content:'›';color:#9ba8af;font-size:18px}.expense-line details[open] summary:before{transform:rotate(90deg)}.expense-line summary>span:first-of-type{flex:1}.expense-line-amount{text-align:right;font-weight:600;white-space:nowrap}.expense-line-amount small{display:block;font-size:10px;font-weight:400;color:#94a0a8;margin-top:3px}.expense-plus{margin-top:12px;flex:0 0 30px;width:30px;height:30px;padding:0;font-size:19px;color:#397b80;border-color:#cfe1df;background:#eff7f5}.expense-line-details{padding:0 0 12px 18px}.expense-entry{display:flex;justify-content:space-between;gap:12px;padding:11px 12px;background:#f4f7f8;border-radius:7px;margin-bottom:6px;font-size:12px}.expense-entry small{display:block;color:#87959f;margin-top:3px}.expense-entry p{white-space:pre-wrap;overflow-wrap:anywhere;color:#546570;margin:7px 0 0}.expense-entry button{padding:5px 8px;font-size:10px;margin:2px}.expense-entry>div{min-width:0}@media(max-width:600px){.expense-line{padding:0 10px;gap:8px}.expense-line summary{font-size:12px}.expense-plus{height:40px;width:40px;flex-basis:40px}.expense-line-details{padding-left:0}.expense-entry{flex-wrap:wrap}.expense-entry button{min-height:40px;font-size:12px}}

.mobile-topbar,#menu-close,#menu-overlay{display:none}
@media(max-width:850px){
 .mobile-topbar{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:30;padding:9px 12px;background:#edf1f3;border-bottom:1px solid #dbe3e7;min-height:58px}
 .mobile-topbar>button{width:40px;height:40px;padding:0;font-size:23px;background:white}
 .mobile-topbar strong{font-size:22px;color:#304853}.mobile-topbar strong span{color:#397b80}
 .mobile-topbar>span{margin-left:auto;font-size:11px;color:#788995;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 aside#sidebar{position:fixed;top:0;bottom:0;left:0;width:min(290px,85vw);height:100dvh;padding:20px 14px;z-index:60;transform:translateX(-100%);visibility:hidden;transition:transform .2s ease,visibility .2s;display:flex;flex-direction:column;border-right:1px solid #d5dfe4;box-shadow:12px 0 40px #22394620;overflow-y:auto}
 aside#sidebar nav{display:block;overflow-x:hidden;overflow-y:auto;flex:1;min-height:80px}
 aside#sidebar nav button{display:block;width:100%;text-align:left;white-space:normal;font-size:13px;padding:12px;margin-bottom:4px;min-height:44px}
 aside#sidebar .brand{padding:2px 35px 22px 10px}
 aside#sidebar #menu-close{display:block;position:absolute;top:14px;right:12px;width:34px;height:34px;padding:0;font-size:24px;background:transparent;border:0}
 aside#sidebar .account{display:block;margin-top:14px;padding-top:12px}
 aside#sidebar .account small{display:block;margin:6px 0 12px}
 aside#sidebar .account button{display:block;width:100%;margin:6px 0 0;min-height:40px}
 body.mobile-menu-open aside#sidebar{transform:translateX(0);visibility:visible}
 #menu-overlay:not([hidden]){display:block;position:fixed;inset:0;z-index:50;border:0;border-radius:0;background:#1c324966;cursor:pointer;padding:0}
 body.mobile-menu-open{overflow:hidden}
 main{margin-left:0}
}
@media(prefers-reduced-motion:reduce){aside#sidebar{transition:none}}
@media print{.mobile-topbar,#menu-overlay,#menu-close{display:none!important}}

/* Dense dialogs; print document layout stays independent. */
@media screen{
 dialog{padding:17px 19px;max-height:94dvh;overflow-y:auto}
 dialog h2{font-size:20px;margin:0 0 9px;line-height:1.25}
 dialog p{margin:7px 0;font-size:12px;line-height:1.4}
 dialog form label{margin:9px 0 4px;font-size:11px;line-height:1.3}
 dialog input,dialog select,dialog textarea{padding:7px 9px;font-size:13px;min-height:32px;border-radius:6px}
 dialog input[type=file]{padding:6px;font-size:11px;min-height:32px}
 dialog input[type=file]::file-selector-button{font:inherit;padding:4px 7px;margin-right:7px;border:0;border-radius:4px;background:#e8eef0;color:#405762}
 dialog textarea{line-height:1.4}
 dialog button{padding:7px 10px;font-size:11px;min-height:30px}
 dialog .split{gap:10px}
 dialog .hint{font-size:10px;line-height:1.4;margin:5px 0}
 dialog details{margin-top:9px}
 dialog summary{font-size:12px;padding:5px 0}
 dialog .extra-cost-row{padding:9px;margin:7px 0}
 dialog .extra-cost-row button{margin-top:7px}
 dialog .photo-preview{max-height:110px;margin:7px 0}
 dialog #photo-status:empty{display:none}
 dialog form .actions{margin-top:13px;padding:8px 0 0;bottom:-17px;gap:8px;background:white}
 dialog .error{font-size:11px;margin-top:7px}
 dialog:has(.contract-paper),dialog:has(#contract-preview){max-height:94dvh}
}
@media screen and (max-width:600px){
 dialog{width:calc(100% - 16px);max-height:94dvh;padding:14px}
 dialog h2{font-size:19px;margin-bottom:8px}
 dialog input,dialog select,dialog textarea{font-size:16px;min-height:36px;padding:6px 8px}
 dialog form label{font-size:11px;margin-top:8px;margin-bottom:3px}
 dialog button{min-height:36px;padding:7px 10px;font-size:12px}
 dialog form .actions{bottom:-14px;margin-top:10px;padding-top:8px}
 dialog form .actions button{min-height:38px}
 dialog .hint{font-size:10px;line-height:1.35}
}

.task-card{padding:15px 18px;border-bottom:1px solid #e4eaee}.task-card:last-child{border-bottom:0}.task-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.task-heading strong{font-size:14px;overflow-wrap:anywhere}.task-description,.task-result{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.5;color:#526571;margin:8px 0}.task-result{background:#edf5f3;padding:9px;border-radius:6px}.task-actions{display:flex;gap:7px;margin-top:10px}.task-actions button{font-size:11px;padding:7px 10px}@media(max-width:600px){.task-card{padding:13px}.task-heading{align-items:flex-start}.task-actions button{min-height:40px}}

#ozon-packing{margin-bottom:16px}#ozon-packing>p{padding:12px}.ozon-posting{margin:0 14px;padding:7px 0 12px;border-top:1px solid #e2e9ed}.ozon-posting p{font-size:12px;overflow-wrap:anywhere}.ozon-posting button{font-size:11px}

#yandex-packing{margin-bottom:16px}

.brand img{display:block;width:180px;max-width:100%;height:auto}.mobile-topbar .mobile-brand{display:flex;align-items:center;gap:8px;font-size:19px;letter-spacing:1px}.mobile-brand img{width:30px;height:30px}.auth .brand img{width:230px}.brand{line-height:1}@media(max-width:850px){aside#sidebar .brand img{width:190px}}

.period-panel{padding:12px 16px;margin-bottom:16px}.period-picker{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.period-picker select{width:auto;min-width:90px;padding:8px 10px}.period-picker button{min-height:36px}.period-picker [data-period-step]{font-size:22px;padding:3px 12px;line-height:1}.period-panel>.hint{margin:8px 0 0}@media(max-width:600px){.period-panel{padding:10px}.period-picker{gap:6px}.period-picker select{font-size:16px;min-width:76px;flex:1}.period-picker button{min-height:40px}.period-picker [data-period-today],.period-picker [data-period-all]{flex:1;font-size:12px}}

.cash-articles{margin:16px 0}.cash-articles-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px}.cash-articles-heading h2{margin:0;font-size:16px}.cash-entry{padding:10px 0;border-top:1px solid #e4eaee}.cash-entry small{display:block;color:#7c8e98}.cash-entry p{white-space:pre-wrap;margin:6px 0}.cash-articles summary{cursor:pointer}.cash-articles td{vertical-align:top}.cash-articles td:nth-child(2),.cash-articles td:nth-child(3){white-space:nowrap}@media(max-width:600px){.cash-articles-heading{flex-wrap:wrap}.cash-articles td,.cash-articles th{font-size:12px;padding:8px}.cash-articles td:first-child{min-width:150px}}

/* Compact monthly cash rows; opening a category still reveals its notes. */
.cash-articles table{white-space:normal}
.cash-articles th{padding:6px 10px;line-height:1.2}
.cash-articles td{padding:4px 10px;font-size:12px;line-height:1.25;vertical-align:middle}
.cash-articles td details{margin:0}
.cash-articles td summary{padding:3px 0;font-size:12px;line-height:1.25}
.cash-articles td:last-child{width:40px;white-space:nowrap}
.cash-articles button[data-cash-add]{width:26px;height:26px;min-height:26px;padding:0;margin:0;font-size:17px;line-height:1;border-radius:5px}
.cash-articles .cash-entry{padding:7px 0;margin-top:5px}
.cash-articles .cash-entry p{margin:4px 0}
.cash-articles .cash-entry button{padding:4px 7px;font-size:11px;min-height:26px}
@media(max-width:600px){.cash-articles th,.cash-articles td{padding:3px 7px}.cash-articles td summary{padding:4px 0}.cash-articles button[data-cash-add]{width:32px;height:32px;min-height:32px}}

.brand-home{border:0;background:transparent;cursor:pointer;text-align:left}.brand-home:hover{background:#dce7e8}.brand-home:focus-visible{outline:2px solid #397b80;outline-offset:3px}.dashboard-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.dashboard-cards .card strong{font-size:26px}.dashboard-cards .card small{line-height:1.4}.mobile-topbar .brand-home{padding:0;color:inherit;font-weight:700}@media(max-width:600px){.dashboard-cards{grid-template-columns:1fr 1fr}.dashboard-cards .card strong{font-size:20px}.dashboard-cards .card label{font-size:12px}}
.custom-period{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:10px}.custom-period label{margin:0;font-size:12px}.custom-period input{display:block;padding:7px 9px;margin-top:4px;width:auto}.custom-period button{min-height:36px}.custom-period .error{margin:0}@media(max-width:600px){.custom-period label{flex:1;min-width:130px}.custom-period input{width:100%;font-size:16px}.period-picker [data-period-previous],.period-picker [data-period-year-all],.period-picker [data-period-custom]{flex:1;font-size:12px}}
.account-settings{padding:20px;max-width:760px;margin-bottom:16px}.profile-heading{display:flex;align-items:center;gap:16px}.account-avatar{width:76px;height:76px;object-fit:cover;border-radius:50%;margin:8px 0}.avatar-placeholder{display:flex;align-items:center;justify-content:center;background:#d9e9e8;color:#397b80;font-size:30px;font-weight:700}.profile-heading h2{margin:0}.profile-heading p{margin:5px 0}.account-settings dl{display:grid;grid-template-columns:155px 1fr;gap:12px;font-size:13px}.account-settings dt{color:#7c8d98}.account-settings dd{margin:0;overflow-wrap:anywhere}.profile-actions{display:flex;gap:8px;flex-wrap:wrap}.password-visibility{display:flex;align-items:center;gap:8px}.password-visibility input{width:auto;min-height:0}@media(max-width:600px){.account-settings{padding:14px}.account-settings dl{grid-template-columns:1fr;gap:5px}.account-settings dd{margin-bottom:10px}.profile-actions button{flex:1;min-height:40px}}

/* Compact product cards, with prices and stock directly tappable. */
#rows .cell-edit{cursor:pointer;min-height:28px;padding:3px 6px;font:inherit;line-height:1.2;border:1px dashed #c7d8db;border-radius:5px;white-space:nowrap}
#rows .price-cell,#rows .cost-cell{background:transparent;color:inherit}
#rows .cell-edit:hover{background:#eaf4f3;border-color:#397b80}
#rows .cell-edit:focus-visible{outline:2px solid #397b80;outline-offset:2px}
@media(max-width:600px){
 #rows{padding:0 10px}
 #rows .product-row{padding:9px 0}
 #rows .product-row td{padding:2px 0;font-size:12px;line-height:1.25;min-height:25px;gap:8px}
 #rows .product-row td::before{font-size:11px}
 #rows .product-row td:first-child{padding:1px 0 5px;min-height:0}
 #rows .product-row td:first-child strong{font-size:14px;line-height:1.25}
 #rows .product-row td:first-child small{font-size:10px;margin-top:2px}
 #rows .product-row td.product-field-empty{display:none}
 #rows .product-row .cell-edit{flex:0 0 auto;width:auto;min-height:28px;height:auto;padding:4px 6px;font-size:12px;margin:0}
 #rows .product-row td:last-child{justify-content:flex-end;gap:6px;margin-top:5px;padding-top:4px;min-height:0}
 #rows .product-row td:last-child button{flex:0 0 auto;width:auto;min-height:32px;padding:5px 9px;font-size:11px;margin:0}
 #rows .product-row td:last-child .icon-action{width:34px;height:32px;padding:0;font-size:17px}
 #rows .product-row td:last-child .icon-stock{font-size:12px}
 #rows .product-row .product-thumb{width:38px;height:38px;margin-right:8px}
 main:has(#rows) .cards{gap:6px;margin-bottom:12px}
 main:has(#rows) .card{padding:10px}
 main:has(#rows) .card strong{font-size:20px;margin-top:5px}
 main:has(#rows) .card small{font-size:10px;margin-top:3px}
 main:has(#rows) header{margin-bottom:14px}
 main:has(#rows) .warehouse-bar{padding:8px;margin-bottom:12px}
 main:has(#rows) .toolbar{padding:10px;gap:6px}
}

/* Shared screen layout: consistent rhythm, compact controls, readable surfaces. */
@media screen {
 :root{--page:#f3f5f6;--surface:#fff;--ink:#263b45;--muted:#71838c;--line:#e0e7e9;--accent:#32777b}
 body{color:var(--ink);line-height:1.4;-webkit-font-smoothing:antialiased}
 main{min-width:0;max-width:1680px;padding:24px 28px}
 header{gap:16px;align-items:center;margin-bottom:18px}header>div{min-width:0}header p{line-height:1.5;color:var(--muted)}
 h1{font-size:26px;letter-spacing:-.7px;line-height:1.2}h2{font-size:17px;letter-spacing:-.25px;line-height:1.3}
 p{color:var(--muted)}button{font-weight:500;line-height:1.25;min-height:34px;padding:8px 12px;border-radius:7px;touch-action:manipulation}
 button:disabled{cursor:default;opacity:.5}button:focus-visible,summary:focus-visible{outline:2px solid #70a6a8;outline-offset:3px}
 input,select,textarea{border-radius:7px;padding:8px 10px;line-height:1.35}input::placeholder,textarea::placeholder{color:#96a3aa}
 .panel{border-radius:12px;box-shadow:0 2px 5px #263b4503;min-width:0}
 .brand-home{border-radius:8px;min-height:0}.brand-home img{max-width:100%}
 aside#sidebar{background:#eaf0f1}.account{padding-top:14px}.account small{margin-bottom:10px}
 nav button{font-size:12px;font-weight:550}nav button.active{background:#d8e9e7;color:#266368}
 .warehouse-bar{gap:8px;background:#edf1f2;padding:9px 12px;border-radius:9px;margin-bottom:16px}
 .warehouse-bar select{min-height:34px}.warehouse-bar button{background:transparent;font-size:11px}
 .cards{gap:12px;margin-bottom:18px}.card{padding:15px 16px;min-width:0;border-radius:11px}
 .card strong{font-size:25px;line-height:1.15;letter-spacing:-.65px;font-variant-numeric:tabular-nums}
 .card small{line-height:1.45;color:#81929a}.card label{color:#6c8089;line-height:1.4}
 .toolbar{align-items:center;padding:12px;gap:8px;flex-wrap:wrap}.toolbar>strong{font-size:14px}
 .toolbar input,.toolbar select{min-height:34px}.toolbar button{min-height:34px}
 .table-wrap{border-radius:11px}.table-wrap:has(.icon-action){padding-top:0;margin-top:0}
 th{background:#eff4f4;font-size:10px;color:#70848c;padding:9px 10px;line-height:1.3}
 td{padding:8px 10px;line-height:1.4;border-color:#e8eeef;vertical-align:middle}
 td:first-child{max-width:260px}td:nth-child(2),td:nth-child(3){max-width:none}
 td button{min-height:28px}.foot{padding:11px 14px;line-height:1.45;color:#81929b}
 .empty{padding:30px 18px;font-size:13px}.empty h2{font-size:17px;margin:0 0 6px}.empty p{margin:0}
 .hint{font-size:11px;line-height:1.5;color:#7b8c95}.security{font-size:10px;line-height:1.5;margin-top:16px}
 .period-panel{padding:12px 14px}.period-picker{gap:7px}.period-picker select{min-width:80px;min-height:34px}
 .period-picker button{min-height:34px;font-size:12px}.period-picker [data-period-step]{font-size:21px;min-width:32px;padding:2px 9px}
 .period-panel>.hint{font-size:11px;margin-top:9px}.custom-period label{font-size:11px}
 .cash-articles-heading{padding:12px 14px}.cash-articles-heading h2{font-size:15px}.cash-articles-heading button{font-size:11px}
 .cash-articles td{padding:4px 10px}.cash-articles summary{font-size:12px;color:#3b545e}
 .cash-entry{font-size:12px}.cash-entry p{overflow-wrap:anywhere}
 .task-card{padding:14px 16px}.task-heading{align-items:flex-start}.task-heading strong{font-size:14px;line-height:1.4}
 .task-card .hint{margin:5px 0}.task-description{margin:8px 0;line-height:1.5}.task-actions{flex-wrap:wrap;gap:7px}
 .task-actions button{min-height:32px;font-size:11px}.task-result{border:1px solid #dfebe7;background:#f0f7f4}
 .market-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:18px;align-items:start}
 #ozon-packing,#yandex-packing{margin:0;overflow:hidden}
 .market-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 10px}
 .market-name{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.3px;padding:3px 7px;border-radius:5px;margin-bottom:5px}
 .market-ozon{background:#edf2ff;color:#426cc1}.market-yandex{background:#fff5dd;color:#8b6b20}
 .market-heading h2{margin:0;font-size:15px;font-weight:650}.market-count{font-size:12px;color:#617982;background:#eff4f4;padding:2px 6px;border-radius:5px;margin-left:5px}
 .market-refresh{flex:none;font-size:22px;width:34px;height:34px;min-height:34px;padding:0;color:#4d797d;background:#f5f9f9;border-color:#dce7e8}
 .market-account{display:flex;align-items:center;gap:10px;padding:0 16px 10px}.market-account label{font-size:11px;color:#7c8e96}.market-account select{flex:1;min-width:0;padding:6px 9px;font-size:12px;min-height:32px}
 .market-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 16px;background:#f7fafb;border-top:1px solid #eaf0f1;border-bottom:1px solid #eaf0f1;font-size:11px;color:#768992}
 .market-meta strong{font-weight:550;color:#5c757e}.market-notice{font-size:12px;line-height:1.5;padding:10px 16px;margin:0}
 .ozon-posting{margin:0;padding:0;border:0;border-bottom:1px solid #e8edef}
 .ozon-posting summary{display:flex;align-items:center;gap:8px;padding:11px 16px;margin:0;list-style:none;font-size:12px;color:#47616b}
 .ozon-posting summary::-webkit-details-marker{display:none}.ozon-posting summary:before{content:'›';font-size:17px;line-height:1;color:#8b9da5;transition:transform .15s}
 .ozon-posting[open] summary:before{transform:rotate(90deg)}.posting-number{font-weight:600;overflow-wrap:anywhere;min-width:0}.posting-quantity{margin-left:auto;white-space:nowrap;color:#7d9199;font-size:11px}
 .posting-body{padding:0 16px 12px 32px}.posting-body>.hint{margin:0 0 8px}.posting-body button{margin-top:8px;min-height:32px;font-size:11px}
 .posting-product{display:flex;align-items:start;justify-content:space-between;gap:10px;font-size:12px;padding:7px 0}.posting-product>span{min-width:0;overflow-wrap:anywhere}.posting-product small{display:block;color:#8799a0;font-size:10px;margin-top:2px}.posting-product strong{white-space:nowrap;font-size:11px}
 .market-empty{display:flex;align-items:center;gap:8px;padding:22px 16px;color:#82949b;font-size:12px}.market-empty>span{color:#548c79;background:#ebf5ef;border-radius:50%;width:23px;height:23px;display:grid;place-items:center}
 .market-info{margin:0;padding:0 16px}.market-info summary{font-size:10px;padding:9px 0;color:#8b9aa2}.market-info p{font-size:10px;line-height:1.5;margin:0 0 12px;overflow-wrap:anywhere}
 .account-settings{padding:18px;max-width:800px}.profile-actions button{font-size:12px}.profile-heading h2{font-size:20px}
 dialog{width:min(480px,calc(100% - 24px));border-radius:14px;padding:18px 20px;max-height:calc(100dvh - 32px);scrollbar-width:thin}
 dialog h2{font-size:20px;margin-bottom:12px}dialog form label{font-size:12px;margin:12px 0 5px}
 dialog form input,dialog form select,dialog form textarea{min-height:35px;font-size:14px;padding:8px 10px}
 dialog input[type=checkbox]{min-height:0;width:auto}dialog input[type=file]{font-size:12px}
 dialog textarea{line-height:1.5}dialog .split{gap:12px}.extra-cost-row{background:#f6f9f9;border-color:#e2eaec}
 dialog form .actions{display:flex;position:sticky;bottom:-18px;border-top:1px solid #e6edef;margin-top:16px;padding:12px 0 0;background:#fff;gap:8px;z-index:2}
 dialog form .actions button{min-height:35px;font-size:12px}.error{line-height:1.4}.error:empty{display:none}
 #toast{max-width:480px;font-size:12px;padding:11px 17px;border-radius:9px;box-shadow:0 5px 20px #223d4520}
 .auth{box-shadow:0 10px 40px #263b4508}.auth button{margin-top:12px}.auth p{font-size:13px}.auth form button{margin-top:18px}
}
@media screen and (min-width:851px){aside#sidebar{height:100dvh;width:210px;padding:22px 12px}main{margin-left:210px}.brand-home{padding:0 10px 22px!important}aside .account button{font-size:11px}nav{flex:1;overflow-y:auto}nav button{padding:10px;margin-bottom:4px}.account{margin-top:16px}}
@media screen and (min-width:601px) and (max-width:1050px){.market-grid{grid-template-columns:1fr}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cards>.card:last-child:nth-child(odd){grid-column:1/-1}}
@media screen and (max-width:850px){
 main{padding:20px 16px;margin:0}.mobile-topbar{min-height:56px;padding:8px 12px;gap:12px;background:#f0f5f5;box-shadow:0 1px 6px #263b4504}
 .mobile-topbar>#menu-toggle{width:36px;height:36px;min-height:36px;font-size:20px;flex:none}
 .mobile-topbar>.mobile-brand{width:auto;height:36px;min-height:0;padding:0;background:transparent;font-size:17px;gap:7px;border:0;letter-spacing:1.2px;flex:0 0 auto}
 .mobile-topbar .mobile-brand img{width:29px;height:29px}.mobile-topbar>span{font-size:10px;max-width:32%}
 aside#sidebar .brand-home{width:185px;padding:2px 15px 18px 8px}aside#sidebar .account{margin-top:14px}
}
@media screen and (max-width:600px){
 main{padding:16px 12px}.eyebrow{font-size:9px;letter-spacing:.7px;margin-bottom:7px}h1{font-size:23px;letter-spacing:-.5px}h2{font-size:16px}
 header{flex-direction:row;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:14px}header>div{flex:1 1 190px}header p{font-size:12px;margin-top:5px}header>button{width:auto;min-height:36px;padding:8px 12px;font-size:12px}
 .warehouse-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:9px;gap:6px 8px;margin-bottom:14px}
 .warehouse-bar label{grid-column:1/-1;width:auto;font-size:10px}.warehouse-bar select{width:100%;min-width:0;min-height:36px;font-size:14px;padding:7px 9px}
 .warehouse-bar button{width:auto;min-height:36px;font-size:10px;padding:6px 9px;background:#f8fafb}
 .cards,.dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}.cards>.card{grid-column:auto;padding:12px;min-width:0}.cards>.card:last-child:nth-child(odd){grid-column:1/-1}
 .card strong,.dashboard-cards .card strong{font-size:22px;margin-top:6px}.card label{font-size:11px}.card small{font-size:10px;margin-top:5px}
 .toolbar{padding:10px;gap:7px}.toolbar input{flex:1 1 160px;min-width:0;font-size:16px;min-height:38px}.toolbar select{flex:1 1 150px;min-width:0;font-size:16px;min-height:38px}.toolbar button{flex:0 1 auto;min-height:36px;font-size:11px;padding:7px 10px}
 .toolbar .refresh{margin-left:auto}.foot{padding:10px 12px;font-size:10px}.hint{font-size:11px}
 .table-wrap:not(:has(#rows)){overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .table-wrap:not(:has(#rows)) table{display:table;width:100%;min-width:480px;white-space:normal}
 .table-wrap:not(:has(#rows)) thead{display:table-header-group}.table-wrap:not(:has(#rows)) tbody{display:table-row-group;padding:0}
 .table-wrap:not(:has(#rows)) tr{display:table-row;padding:0;border:0}
 .table-wrap:not(:has(#rows)) th,.table-wrap:not(:has(#rows)) td{display:table-cell;width:auto;min-width:0;max-width:none;padding:8px 10px;border-top:1px solid #e8edef;font-size:11px;vertical-align:middle}
 .table-wrap:not(:has(#rows)) th{font-size:9px;border-top:0}.table-wrap:not(:has(#rows)) td:before{display:none}
 .table-wrap:not(:has(#rows)) td button{width:auto;min-height:30px;padding:5px 8px;font-size:10px;white-space:nowrap;margin:1px}
 .cash-articles .table-wrap table{min-width:100%}.cash-articles .table-wrap th,.cash-articles .table-wrap td{padding:5px 7px}
 .cash-articles .table-wrap td:first-child{width:48%;min-width:110px}.cash-articles .table-wrap td:nth-child(2),.cash-articles .table-wrap td:nth-child(3){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
 .cash-articles .table-wrap td:last-child{width:34px}.cash-articles summary{font-size:11px;line-height:1.35;padding:3px 0}
 .cash-articles .table-wrap button[data-cash-add]{width:30px;min-height:30px;height:30px;padding:0;font-size:17px}.cash-articles .cash-articles-heading{padding:11px 12px;gap:8px}.cash-articles-heading h2{font-size:14px}
 .cash-entry strong{font-size:11px}.cash-entry small{font-size:10px}.cash-entry p{font-size:11px}.cash-entry{max-width:200px}
 .period-panel{padding:10px}.period-picker{display:grid;grid-template-columns:32px minmax(100px,1fr) minmax(75px,.7fr) 32px;gap:6px}
 .period-picker select{width:100%;min-width:0;font-size:16px;min-height:36px;padding:5px 7px}.period-picker button{min-height:34px;font-size:10px;padding:7px 6px}
 .period-picker [data-period-step]{min-height:36px;font-size:21px}.period-picker [data-period-today],.period-picker [data-period-previous],.period-picker [data-period-year-all],.period-picker [data-period-custom],.period-picker [data-period-all]{grid-column:span 2;font-size:11px}
 .custom-period{gap:8px}.custom-period label{font-size:11px;min-width:120px}.custom-period input{min-height:36px}
 .market-grid{grid-template-columns:1fr;gap:12px;margin-bottom:16px}.market-heading{padding:12px 13px 9px}.market-heading h2{font-size:15px}
 .market-account{padding:0 13px 10px}.market-account select{font-size:16px;min-height:35px}.market-meta{padding:8px 13px;font-size:10px}.market-refresh{width:34px;height:34px;min-height:34px}
 .ozon-posting summary{padding:11px 13px;min-height:40px}.market-info{padding:0 13px}.market-empty{padding:18px 13px}.posting-body{padding:0 13px 12px 28px}
 .task-card{padding:12px}.task-heading strong{font-size:13px}.task-heading .badge{font-size:10px;padding:4px 6px;flex-shrink:0;max-width:45%}.task-actions button{min-height:34px;font-size:11px}
 .task-list+.foot{border-top:1px solid #e7edef}.task-description,.task-result{font-size:12px}
 #rows .product-row td{font-size:12px;line-height:1.35;min-height:27px;padding:2px 0}#rows .product-row td:first-child strong{font-size:14px}
 #rows .product-row td:last-child button{min-height:34px}#rows .product-row .icon-action{color:#54727c}
 #rows .product-row .icon-sell{color:#32777b}#rows .product-row td:last-child .icon-action svg{width:17px;height:17px}
 .dashboard-heading{margin-bottom:12px}.dashboard-heading button{font-size:11px}.account-settings{padding:14px}.profile-actions button{font-size:11px;min-height:36px}
 .profile-heading h2{font-size:18px}.account-settings>p{font-size:12px}.account-avatar{width:62px;height:62px}
 dialog{width:calc(100% - 20px);padding:16px;max-height:calc(100dvh - 24px);border-radius:13px}
 dialog h2{font-size:19px}dialog form label{font-size:11px;margin:10px 0 4px}
 dialog form input,dialog form select,dialog form textarea{font-size:16px;min-height:38px;padding:7px 9px;max-width:100%}
 dialog form input[type=file]{font-size:12px}dialog form .actions{bottom:-16px;padding-top:10px;margin-top:14px}
 dialog form .actions button{min-height:38px;font-size:12px}.receipt-actions{gap:8px;flex-wrap:wrap}.receipt-actions button{flex:1;min-height:38px}
 #toast{bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px);font-size:12px}
 .auth{padding:23px 20px;margin:24px 12px}.auth .brand img{width:190px}.auth button{min-height:38px}.auth form input{min-height:42px}.auth h1{font-size:22px}
}
@media screen and (max-width:360px){.warehouse-bar{grid-template-columns:1fr}.warehouse-bar button{justify-self:start}.card strong,.dashboard-cards .card strong{font-size:19px}.cash-articles .table-wrap table{min-width:340px}.mobile-topbar>.mobile-brand{font-size:15px}}
@media(prefers-reduced-motion:reduce){button,.ozon-posting summary:before{transition:none}}
@media screen and (max-width:600px){
 #rows .icon-action::after{display:none}
 .cash-articles .table-wrap table{table-layout:fixed;width:100%;min-width:100%}
 .cash-articles .table-wrap th:first-child,.cash-articles .table-wrap td:first-child{width:42%;min-width:0}
 .cash-articles .table-wrap th:nth-child(2),.cash-articles .table-wrap td:nth-child(2),.cash-articles .table-wrap th:nth-child(3),.cash-articles .table-wrap td:nth-child(3){width:24%;font-size:10px;padding-left:4px;padding-right:4px}
 .cash-articles .table-wrap th:last-child,.cash-articles .table-wrap td:last-child{width:10%;padding-left:2px;padding-right:2px}
 .cash-articles summary{overflow-wrap:anywhere}.cash-entry{max-width:100%}.cash-entry strong{white-space:normal}
}
@media screen and (max-width:600px){
 .cash-articles .table-wrap:not(:has(#rows)) table{table-layout:fixed;min-width:0;width:100%}
 .cash-articles .table-wrap:not(:has(#rows)) th,.cash-articles .table-wrap:not(:has(#rows)) td{padding:5px 6px;min-width:0}
 .cash-articles .table-wrap:not(:has(#rows)) th:first-child,.cash-articles .table-wrap:not(:has(#rows)) td:first-child{width:42%}
 .cash-articles .table-wrap:not(:has(#rows)) th:nth-child(2),.cash-articles .table-wrap:not(:has(#rows)) td:nth-child(2),.cash-articles .table-wrap:not(:has(#rows)) th:nth-child(3),.cash-articles .table-wrap:not(:has(#rows)) td:nth-child(3){width:24%;padding:5px 3px;font-size:10px;text-align:right}
 .cash-articles .table-wrap:not(:has(#rows)) th:last-child,.cash-articles .table-wrap:not(:has(#rows)) td:last-child{width:10%;padding:4px 2px;text-align:center}
}
.daily-orders{margin:18px 0}.daily-orders .dashboard-heading{margin-bottom:10px}.daily-orders h2{margin:0}.daily-orders>.hint{margin:8px 0 10px}.daily-order-details{margin:0 0 18px;border:1px solid #dfe7e9;border-radius:9px;background:#fff;padding:0 12px}.daily-order-details>summary{font-size:11px;padding:10px 0}.daily-order-source{display:flex;flex-wrap:wrap;gap:5px 12px;padding:9px 0;border-top:1px solid #e7edef;font-size:12px}.daily-order-source>span{margin-left:auto}.daily-order-source small{width:100%;font-size:10px;margin:0}.daily-orders .cards{margin-bottom:8px}@media(max-width:600px){.daily-orders .dashboard-heading{flex-wrap:wrap;gap:5px}.daily-order-source>span{width:100%;margin:0}}

@media screen {
.row-order-controls{display:inline-flex;align-items:center;gap:4px;margin:0 10px 6px 0;vertical-align:middle}
.row-order-controls button{min-width:36px;min-height:36px;padding:4px 9px;line-height:1}
.row-drag-handle{font-size:24px;color:#7b9297;cursor:grab;padding:0 4px}
.product-row.ordering{cursor:grab}.product-row.row-dragging{opacity:.45}
.product-row.row-drop-target{outline:2px solid #397f84;outline-offset:-2px}
#row-order-toggle[aria-pressed="true"]{background:#dfefed;color:#286c71;border-color:#a9ccca}
}

.variant-fields{padding:12px;border:1px solid #d9e5e6;border-radius:10px;margin:14px 0;background:#f5f9f9}
.variant-edit-head,.variant-edit-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,.55fr) 36px;gap:8px;align-items:center}
.variant-edit-head{font-size:12px;color:#748991;margin:12px 0 6px}.variant-edit-row{margin-bottom:8px}.variant-edit-row input{min-width:0;width:100%;margin:0}.variant-edit-row button{padding:6px;min-width:32px}
.variant-editor-link{font-size:12px;color:#397b80;padding:2px 0;min-height:24px;border:0;background:none;display:block;text-align:left}.variant-summary{font-size:12px;color:#738991;max-width:260px;white-space:normal;margin-top:3px}

.product-photo-button{float:left;padding:0;margin:0 8px 0 0;border:0;background:transparent;cursor:zoom-in;line-height:0;border-radius:6px}.product-photo-button .product-thumb{float:none;margin:0}.product-photo-button:focus-visible{outline:3px solid #397b80;outline-offset:3px}
dialog.product-photo-viewer{width:min(1000px,94vw);max-width:94vw;max-height:92dvh;padding:16px;box-sizing:border-box}dialog.product-photo-viewer::backdrop{background:rgba(12,25,30,.8)}.photo-viewer-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.photo-viewer-heading h2{margin:0;font-size:20px;overflow-wrap:anywhere}.photo-viewer-heading button{flex-shrink:0;min-width:44px;min-height:44px}dialog.product-photo-viewer>img{display:block;width:100%;max-height:calc(92dvh - 120px);object-fit:contain;border-radius:6px}dialog.product-photo-viewer .hint:empty{display:none}
