@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2');font-weight:400;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-arabic-500-normal.woff2') format('woff2');font-weight:500;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-arabic-600-normal.woff2') format('woff2');font-weight:600;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-arabic-700-normal.woff2') format('woff2');font-weight:700;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFF;font-display:swap}@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}@font-face{font-family:Vazirmatn;src:url('/assets/fonts/vazirmatn-latin-700-normal.woff2') format('woff2');font-weight:700;font-display:swap}
:root{--ink:#101d37;--muted:#758094;--green:#00977b;--green-dark:#007b65;--soft:#e9f6f2;--line:#e5eaf0;--paper:#f8fafb;--orange:#e58416;--danger:#c44754}*{box-sizing:border-box}body{margin:0;background:#e3e9e5;color:var(--ink);font:400 16px/1.65 Vazirmatn,Tahoma,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button,a,input,select{ -webkit-tap-highlight-color:transparent}button{border:0;background:none}a{color:inherit;text-decoration:none}input,select{min-width:0;width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);min-height:46px;padding:10px 12px;outline:none}input:focus,select:focus{border-color:var(--green);box-shadow:0 0 0 3px #00977b12}input::placeholder{color:#99a2b1}button:focus-visible,a:focus-visible{outline:3px solid #6cbaa9;outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}svg.feather{width:21px;height:21px;stroke-width:1.7;flex-shrink:0;vertical-align:middle}[hidden]{display:none!important}.workspace{max-width:1600px;margin:28px auto;min-height:calc(100vh - 56px);background:white;border-radius:19px;display:grid;grid-template-columns:210px minmax(0,1fr);overflow:clip;box-shadow:0 14px 48px #24382d0a}.sidebar{background:#f9fbfc;border-left:1px solid var(--line);padding:25px 17px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:calc(100vh - 56px);min-height:600px}.brand{display:flex;align-items:center;flex-direction:column;margin-bottom:37px;gap:3px}.brand-mark{display:grid;place-items:center;width:54px;height:54px;background:var(--green);border-radius:11px;color:#fff;font:700 41px/1 Arial,sans-serif;box-shadow:inset 0 0 0 1px #ffffff30}.brand>strong{font-size:28px;line-height:1.7}.brand-caption{color:#93a1ab;font-size:10px;letter-spacing:1px;direction:ltr}.desktop-nav{display:grid;gap:9px}.desktop-nav button,.add-side{display:flex;align-items:center;gap:15px;border-radius:8px;padding:12px 15px;text-align:right;font-size:16px;min-height:49px}.desktop-nav svg{color:#69788c}.desktop-nav button.active{background:#e3f2ed;color:var(--green-dark);font-weight:700}.desktop-nav button.active svg{color:var(--green)}.desktop-nav button:hover,.add-side:hover{background:#eef4f2}.add-side{margin-top:20px;color:var(--green);font-size:14px}.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding-top:21px;display:flex;align-items:center;gap:10px}.avatar{background:#e8edef;color:#71818d;width:37px;height:37px;border-radius:50%;display:grid;place-items:center;font-weight:700}.sidebar-footer strong{font-size:13px}.sidebar-footer small{display:block;font-size:12px;color:var(--muted)}.main-content{min-width:0;padding:25px 25px 30px}.page-header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:26px}.page-header h1{font-size:26px;margin:0;font-weight:700}.page-header p{font-size:13px;margin:4px 0 0;color:var(--muted)}.header-actions{display:flex;gap:10px}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:47px;padding:10px 19px;border-radius:9px;background:var(--green);color:white;font-weight:600;font-size:15px;white-space:nowrap;transition:background .15s}.button:hover{background:var(--green-dark)}.button.secondary{background:#f0f7f4;color:var(--green-dark);border:1px solid #dfede7}.button.secondary:hover{background:#e0f0e9}.button.full{width:100%}.button.small{font-size:14px;min-height:42px;padding:8px 13px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:23px}.stat{border:1px solid var(--line);border-radius:10px;min-height:112px;padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:8px}.stat div>span{font-size:15px;color:#57657d;display:block}.stat strong{display:inline-block;font-size:27px;line-height:1.6;font-weight:700;margin-top:3px}.stat small{font-size:13px;color:var(--muted);margin-right:6px}.stat>svg{width:33px;height:33px;color:var(--green);stroke-width:1.6}.stat.blue>svg{color:#2879dc}.stat.orange>svg{color:var(--orange)}.sales-stat strong{font-size:23px}.page{display:none}.page.active{display:block}.inventory-toolbar{display:flex;gap:15px;margin-bottom:18px}.segmented{display:flex;border:1px solid var(--line);padding:4px;border-radius:10px;flex-shrink:0;gap:2px}.segmented button{padding:8px 17px;font-size:14px;border-radius:7px;color:var(--muted);white-space:nowrap;min-height:40px}.segmented button.active{background:var(--soft);font-weight:700;color:var(--green-dark)}.search-box{display:flex;position:relative;flex:1;min-width:0}.search-box input{padding-left:45px;background:#fafbfc;min-height:49px;font-size:14px}.search-box svg{position:absolute;left:16px;top:14px;color:#69778d;pointer-events:none}.inventory-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}.catalog{min-width:0}.table-heading,.product-row{display:grid;grid-template-columns:minmax(150px,1fr) 65px 122px 99px 15px;gap:9px;align-items:center;padding:9px 14px}.table-heading{color:#637087;background:#fafbfc;border:1px solid var(--line);border-radius:10px;min-height:49px;font-size:13px}.table-heading button{font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0;color:inherit}.table-heading button svg{width:12px;height:12px}.table-heading>span:not(:first-child){text-align:center}.product-row{width:100%;text-align:right;border:1px solid var(--line);border-radius:10px;margin-top:7px;min-height:86px;transition:background .12s,border-color .12s}.product-row:hover{background:#f7fbf9}.product-row.selected{background:#edf8f4;border-color:#b7e5d8}.product-cell{display:flex;align-items:center;gap:12px;min-width:0}.product-cell strong{font-size:15px;display:block;overflow-wrap:anywhere}.product-cell small{display:block;font-size:13px;color:var(--muted);direction:rtl}.product-thumb{width:61px;height:64px;flex:0 0 61px;border-radius:8px;object-fit:cover;background:#f1f4f3}.product-thumb.no-photo{display:grid;place-items:center;color:#9baba7}.product-thumb svg{width:24px;height:24px}.quantity-cell{text-align:center;font-size:17px;font-weight:600}.price-cell{text-align:center;font-size:14px;font-weight:600;white-space:nowrap}.price-cell small{font-weight:400;display:block;font-size:12px;color:var(--muted)}.status-cell{text-align:center}.badge{font-size:12px;font-weight:500;display:inline-block;padding:3px 12px;border-radius:7px;white-space:nowrap;color:var(--green-dark);background:#ddf3eb}.badge.low{background:#fff0df;color:#c37116}.badge.zero{color:#b5535d;background:#fff0f1}.row-chevron{width:17px!important;height:17px!important;color:#76869a}.mobile-product-meta{display:none}.list-count{font-size:12px;color:var(--muted);margin:12px 3px}.detail-panel{border:1px solid var(--line);border-radius:12px;padding:16px;position:sticky;top:18px}.detail-top{display:grid;grid-template-columns:minmax(0,1fr) 125px;gap:13px}.detail-top h2{font-size:19px;margin:0 0 3px;line-height:1.6}.detail-top .sku{font-size:13px;color:var(--muted);margin-bottom:15px;overflow-wrap:anywhere}.detail-image{width:100%;height:185px;object-fit:cover;border-radius:8px}.detail-image-button{width:125px;border-radius:8px;background:#f2f5f3;padding:0;align-self:start;position:relative;overflow:hidden;display:block}.detail-image-button .image-edit{position:absolute;bottom:0;left:0;right:0;background:#ffffffdf;color:#526e61;padding:3px;font-size:11px}.detail-image-button.no-photo{min-height:185px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#81938b;font-size:12px}.detail-image-button.no-photo svg{width:32px;height:32px}.detail-label{display:block;font-size:14px;font-weight:500;margin:12px 0 7px}.color-options{display:flex;gap:7px;flex-wrap:wrap}.color-option{width:30px;height:30px;border:1px solid #d8e0dd;border-radius:50%;padding:3px;background:white}.color-option span{display:block;width:22px;height:22px;border-radius:50%;background:var(--swatch,#cdd9d5);border:1px solid #00000010}.color-option.active{outline:2px solid var(--green);outline-offset:2px}.color-name{font-size:12px;color:var(--muted);margin-top:6px}.size-options{display:flex;gap:7px;flex-wrap:wrap}.size-option{border:1px solid #dce4eb;border-radius:7px;min-width:36px;min-height:37px;padding:4px 8px;font:500 14px/1.4 Vazirmatn,sans-serif;background:#fff}.size-option.active{border-color:var(--green);background:#edf9f4;color:var(--green-dark)}.size-option:disabled{opacity:.4;text-decoration:line-through}.stock-size-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:7px 0 12px}.size-stock{border:1px solid var(--line);border-radius:8px;text-align:center;padding:7px 2px;min-width:0}.size-stock.active{border-color:#b5dbcc;background:#f5fcf8}.size-stock span{display:block;font-size:12px;color:var(--muted)}.size-stock strong{display:block;font-size:17px;font-weight:500}.detail-price{display:flex;justify-content:space-between;font-size:14px;margin:12px 0}.text-button{display:inline-flex;align-items:center;gap:5px;color:var(--green-dark);font-size:13px;padding:7px 0}.text-button svg{width:16px;height:16px}.danger-text{color:var(--danger)}.all-stock{border-top:1px solid var(--line);margin-top:15px;padding-top:10px}.all-stock summary{cursor:pointer;font-size:13px;color:var(--muted)}.stock-table{border-collapse:collapse;width:100%;font-size:13px;margin-top:8px}.stock-table th,.stock-table td{padding:7px 3px;text-align:right;border-bottom:1px solid var(--line)}.stock-table th{font-weight:400;color:var(--muted)}.stock-table .icon-button{width:30px;min-height:32px;color:#b46d74}.empty{padding:35px 18px;text-align:center;color:var(--muted)}.empty svg{width:40px;height:40px;color:#a7bbb2;margin-bottom:14px}.empty h3{font-size:16px;font-weight:600;margin:0 0 6px;color:#4c5e71}.empty p{font-size:13px;margin:0 0 17px}.panel{border:1px solid var(--line);border-radius:12px;padding:22px;min-width:0}.panel h2{font-size:18px;margin:0 0 15px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.panel-heading h2{margin:0}.step-label,.count-chip{font-size:13px;color:var(--muted);background:#f4f7f8;padding:3px 9px;border-radius:6px}.form-layout,.sale-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.field{display:block;position:relative;font-size:14px;color:#55647a}.field input,.field select{display:block;margin-top:7px;font-size:16px}.optional{color:#95a0ad;font-size:12px;margin-right:4px}.divider{height:1px;background:var(--line);margin:25px 0}.variant-row{display:grid;grid-template-columns:1fr 1fr 80px 33px;gap:10px;margin-bottom:14px;align-items:end}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:40px;min-height:42px;border-radius:8px;color:#6d7b8e;flex-shrink:0}.icon-button:hover{background:#f0f4f6}.variant-row>.icon-button{color:#b56b72;width:33px}.allocation{display:flex;justify-content:space-between;gap:10px;margin-top:22px;font-size:14px;border-radius:9px;background:#f4f8f6;padding:12px}.allocation strong{color:var(--green);margin-right:8px}.allocation.valid{background:var(--soft);color:var(--green-dark)}.helper{font-size:13px;color:var(--muted);margin:10px 0 17px;line-height:1.9}.photo-panel h2{margin-bottom:4px}.photo-picker{display:block;cursor:pointer}.photo-picker input{position:absolute;opacity:0;width:1px;height:1px;padding:0}.photo-picker:focus-within{outline:2px solid var(--green);outline-offset:4px;border-radius:8px}#photoPreview{background:#f7f9f8;border:1px dashed #ccdcd5;border-radius:9px;min-height:255px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#7f9389}#photoPreview svg{width:37px;height:37px;margin-bottom:7px}#photoPreview strong{font-size:14px}#photoPreview small{font-size:12px}#photoPreview img{width:100%;max-height:300px;object-fit:contain;border-radius:8px}.sale-line{position:relative;border:1px solid var(--line);border-radius:10px;padding:17px;background:#fcfdfd;margin-bottom:14px}.sale-line-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.sale-line-heading>span{color:var(--muted);font-size:13px}.sale-fields{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(155px,1fr) 75px;gap:12px}.order-summary{position:sticky;top:20px}.order-summary .field{margin:20px 0}.summary-line{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin:15px 0;color:#6b788a}.summary-line strong{color:var(--ink);font-weight:500}.summary-total{border-top:1px solid var(--line);padding-top:19px;margin:22px 0;display:flex;flex-direction:column;gap:7px}.summary-total>span{font-size:14px;color:var(--muted)}.summary-total>strong{font-size:23px;color:var(--green-dark)}.home-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:18px}.invoice-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 0;border-bottom:1px solid var(--line)}.invoice-row:last-child{border:0}.invoice-label{display:flex;align-items:center;gap:14px;min-width:0}.invoice-icon{display:grid;place-items:center;width:42px;height:48px;background:#f1f7f4;color:var(--green);border-radius:9px;flex-shrink:0}.invoice-label strong{font-size:15px}.invoice-label small{display:block;font-size:12px;color:var(--muted)}.invoice-items{font-size:13px;color:var(--muted);margin-top:4px}.invoice-price{display:flex;flex-direction:column;align-items:end;gap:4px;flex-shrink:0;font-size:14px}.invoice-price button{font-size:13px;display:flex;gap:7px;align-items:center;color:var(--green-dark);padding:3px}.invoice-price svg{width:16px;height:16px}.home-low-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:15px 0;border-bottom:1px solid var(--line);text-align:right;width:100%;font-size:14px}.home-low-row svg{width:17px;height:17px;color:var(--muted)}.home-low-row small{display:block;font-size:12px;color:var(--muted)}.home-low-row:last-child{border:0}.mobile-header,.bottom-nav{display:none}.toast{position:fixed;left:25px;bottom:25px;background:#153a30;color:#fff;box-shadow:0 10px 35px #12312822;border-radius:10px;padding:13px 20px;z-index:100;opacity:0;transform:translateY(10px);pointer-events:none;font-size:14px;max-width:calc(100vw - 40px);transition:.2s}.toast.show{opacity:1;transform:none}.error-banner{padding:12px 17px;background:#fff0f1;color:#a9424f;border-radius:10px;font-size:14px;margin-bottom:20px}dialog{border:1px solid var(--line);border-radius:16px;padding:0;color:var(--ink);box-shadow:0 25px 100px #152a2944;max-height:88dvh;overflow:auto;font:inherit}dialog::backdrop{background:#0e263969;backdrop-filter:blur(3px)}.detail-dialog{width:420px;max-width:calc(100% - 24px)}.dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:2}.dialog-bar strong{font-size:16px}#mobileDetailContent{padding:18px}.invoice-dialog{width:740px;max-width:calc(100% - 28px)}.invoice-actions{display:flex;gap:10px;justify-content:flex-end;padding:16px 22px;border-top:1px solid var(--line);position:sticky;bottom:0;background:white}.invoice-document{padding:25px}.invoice-document header{display:flex;justify-content:space-between;gap:18px;border-bottom:2px solid var(--green);padding-bottom:17px;margin-bottom:20px}.invoice-document h2{font-size:23px;margin:0 0 5px}.invoice-document header p{font-size:13px;color:var(--muted);margin:0}.invoice-document .invoice-date{font-size:13px;line-height:2}.invoice-table-wrap{overflow:auto}.invoice-table{width:100%;border-collapse:collapse;font-size:14px}.invoice-table th{background:#f4f8f6;color:#65776d;font-weight:500}.invoice-table th,.invoice-table td{text-align:right;padding:12px 8px;border-bottom:1px solid var(--line);white-space:nowrap}.invoice-sum{width:280px;max-width:100%;margin:25px auto 25px 0}.invoice-sum>div{display:flex;justify-content:space-between;gap:15px;padding:8px 0;font-size:14px}.invoice-sum .final{border-top:1px solid var(--line);font-size:17px;color:var(--green-dark);font-weight:700}.invoice-thanks{text-align:center;color:var(--muted);font-size:13px;margin-top:30px}.print-sheet{display:none}
@media(min-width:1650px){.workspace{margin-top:40px}.sidebar{height:calc(100vh - 80px)}}
@media(min-width:901px) and (max-width:1350px){.workspace{margin:18px;grid-template-columns:185px minmax(0,1fr)}.main-content{padding:22px 18px}.sidebar{height:calc(100vh - 36px);padding:23px 12px}.stats{gap:12px}.stat{padding:15px 13px}.stat strong{font-size:24px}.sales-stat strong{font-size:20px}.inventory-layout{grid-template-columns:minmax(0,1fr) 285px;gap:12px}.table-heading,.product-row{grid-template-columns:minmax(140px,1fr) 48px 98px 78px 12px;padding:9px;gap:6px}.product-thumb{width:45px;height:55px;flex-basis:45px}.product-cell{gap:8px}.product-cell strong{font-size:14px}.badge{padding:3px 8px}.detail-panel{padding:13px}.detail-top{grid-template-columns:minmax(0,1fr) 105px;gap:10px}.detail-image-button{width:105px}.detail-image,.detail-image-button.no-photo{height:160px;min-height:160px}.detail-top h2{font-size:17px}.segmented button{padding:8px 12px}.header-actions .button{padding:9px 12px;font-size:14px}.form-layout,.sale-layout{grid-template-columns:minmax(0,1fr) 260px}.sale-fields{grid-template-columns:1fr 1fr}.sale-fields>.field:last-child{max-width:100px}}
@media(max-width:1100px) and (min-width:901px){.inventory-layout{grid-template-columns:1fr}.detail-panel{position:static}.detail-top{grid-template-columns:1fr 150px}.detail-image-button{width:150px}.detail-image{height:190px}.stats{grid-template-columns:repeat(2,1fr)}.form-layout,.sale-layout,.home-grid{grid-template-columns:1fr}.photo-panel{max-width:400px}.page-header{align-items:flex-start}.page-header h1{font-size:22px}.header-actions{flex-direction:column}}
@media(max-width:900px){body{background:white}.workspace{display:block;margin:0;min-height:100dvh;max-width:100%;border-radius:0;box-shadow:none;overflow:visible}.sidebar{display:none}.main-content{padding:0 16px calc(99px + env(safe-area-inset-bottom))}.mobile-header{display:flex;position:relative;justify-content:space-between;align-items:center;height:75px;gap:15px}.mobile-header .brand-mark{width:36px;height:36px;border-radius:6px;font-size:29px}.mobile-header>strong{font-size:22px}.mobile-header>.icon-button{width:36px;color:var(--ink)}.mobile-menu{position:absolute;top:65px;left:0;width:210px;background:#fff;box-shadow:0 12px 40px #182c3520;border:1px solid var(--line);border-radius:10px;padding:6px;z-index:20}.mobile-menu button{display:flex;align-items:center;gap:10px;width:100%;text-align:right;min-height:45px;padding:10px;font-size:14px}.page-header{margin:9px 0 20px}.page-header h1{font-size:22px}.page-header p{display:none}.header-actions{display:none}body[data-page=stock] .page-header,body[data-page=home] .page-header{display:none}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}.stat{min-height:99px;padding:13px 15px;border-radius:9px}.stat>svg{width:24px;height:24px}.stat div>span{font-size:13px}.stat strong{font-size:23px;line-height:1.7}.sales-stat{grid-column:2;grid-row:1}.sales-stat strong{font-size:19px}.sales-stat small{display:block;margin:0;font-size:11px;text-align:right}.stat.blue{grid-column:1;grid-row:2}.stat.orange{grid-column:2;grid-row:2}.inventory-toolbar{flex-direction:column;gap:10px;margin-bottom:12px}.segmented{width:100%;order:1;gap:2px;padding:3px}.segmented button{flex:1;min-width:0;padding:6px 3px;font-size:12px;min-height:32px}.search-box{flex:auto}.search-box input{min-height:42px;font-size:13px;padding-top:8px;padding-bottom:8px}.search-box svg{top:11px;width:19px;height:19px}.inventory-layout{display:block}.detail-panel,.table-heading{display:none}.product-row{grid-template-columns:minmax(0,1fr) auto 14px;gap:8px;padding:10px;min-height:94px;margin-top:7px;border-radius:10px}.product-row.selected{background:white;border-color:var(--line)}.product-cell{gap:11px}.product-thumb{width:63px;height:69px;flex-basis:63px;border-radius:7px}.product-cell strong{font-size:15px}.product-cell .product-sku,.quantity-cell,.price-cell{display:none}.mobile-product-meta{display:block;font-size:12px;color:var(--muted);line-height:1.9;margin-top:1px}.mobile-product-meta b{font-size:13px;font-weight:500;color:var(--ink)}.status-cell .badge{font-size:11px;padding:3px 8px}.bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;bottom:0;left:0;right:0;background:#fffffff7;backdrop-filter:blur(12px);border-top:1px solid var(--line);z-index:30;padding:8px 8px calc(8px + env(safe-area-inset-bottom));min-height:69px}.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:50px;color:#768396;font-size:12px}.bottom-nav svg{width:23px;height:23px;stroke-width:1.9}.bottom-nav button.active{color:var(--green);font-weight:600}.bottom-nav button.active svg{fill:#00977b10}.form-layout,.sale-layout,.home-grid{grid-template-columns:1fr;gap:15px}.panel{padding:17px;border-radius:11px}.panel h2{font-size:17px}.panel-heading{margin-bottom:17px}.field-grid{gap:15px}.field{font-size:13px}.variant-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 61px 29px;gap:7px}.variant-row .icon-button{width:29px}.variant-row input{padding:10px 8px}.photo-panel{order:-1}.photo-panel .helper{margin:2px 0 12px}#photoPreview{min-height:100px;padding:14px;gap:4px}#photoPreview svg{margin:0;width:25px;height:25px}#photoPreview img{max-height:150px}.sale-fields{grid-template-columns:minmax(0,1fr) 75px;gap:11px}.sale-fields>.field:first-child{grid-column:1/-1}.sale-line{padding:12px}.order-summary{position:static}.summary-total{flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center}.summary-total>strong{font-size:22px}.invoice-row{align-items:flex-start;gap:10px}.invoice-label{gap:10px}.invoice-icon{display:none}.invoice-price{font-size:13px}.invoice-price button{font-size:12px}.toast{bottom:90px;left:16px;right:16px;text-align:center;max-width:none}.detail-dialog{margin:auto 0 0;max-width:100%;width:100%;border-radius:18px 18px 0 0;max-height:91dvh;padding-bottom:env(safe-area-inset-bottom)}.detail-top{grid-template-columns:minmax(0,1fr) 150px}.detail-image-button{width:150px}.detail-image{height:215px}.detail-image-button.no-photo{min-height:215px}.detail-top h2{font-size:21px}.invoice-document{padding:17px}.invoice-document h2{font-size:19px}.invoice-actions{padding:13px;justify-content:center}.invoice-actions .button{font-size:13px}.invoice-document header{flex-direction:column;gap:9px}.empty{padding:30px 16px}.home-grid .badge{font-size:11px}.allocation{font-size:12px}}
@media(max-width:370px){.main-content{padding-left:11px;padding-right:11px}.stat{padding:11px;gap:5px}.stat div>span{font-size:12px}.stat>svg{width:21px;height:21px}.sales-stat strong{font-size:17px}.product-thumb{width:48px;flex-basis:48px;height:64px}.product-cell{gap:8px}.product-cell strong{font-size:13px}.product-row{padding:8px;gap:5px}.mobile-product-meta{font-size:11px}.mobile-product-meta b{font-size:12px}.status-cell .badge{font-size:10px;padding:3px 6px}.field-grid{grid-template-columns:1fr}.detail-top{grid-template-columns:minmax(0,1fr) 120px}.detail-image-button{width:120px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media print{@page{size:A4;margin:14mm}body{background:white}body>*:not(.print-sheet){display:none!important}.print-sheet{display:block!important}.print-sheet .invoice-document{padding:0}.print-sheet .invoice-document header{display:flex;flex-direction:row}.print-sheet .invoice-table-wrap{overflow:visible}.print-sheet .invoice-table{font-size:12px}.print-sheet tr{break-inside:avoid}.print-sheet .invoice-sum{break-inside:avoid}.print-sheet .invoice-thanks{color:#555}.print-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.product-row>.feather{width:17px;height:17px;color:#76869a}
@media(min-width:1351px){.workspace{width:calc(100% - 48px)}.inventory-layout{grid-template-columns:minmax(0,1fr) 350px}.detail-top{grid-template-columns:minmax(0,1fr) 125px}}
@media(min-width:901px) and (max-width:1350px){.detail-top .size-options{gap:5px}.detail-top .size-option{min-width:31px;padding:4px 5px}}
@media(max-width:900px){.workspace{width:100%}}
.search-controls{display:flex;gap:8px;flex:1;min-width:0}.mobile-filter-button{display:none}
@media(max-width:900px){.mobile-filter-button{display:inline-flex;min-height:43px;width:40px;border:1px solid var(--line);color:var(--green);background:#f6faf8}.inventory-toolbar .segmented{display:none}.inventory-toolbar.filters-open .segmented{display:flex}.search-controls>.search-box{flex:1}.bottom-nav{direction:ltr}.bottom-nav button{direction:rtl}}

/* Repfit logo and scoped stock/payment dialogs. */
.brand-logo{width:90px;height:90px;object-fit:contain;border-radius:12px}.brand-avatar{object-fit:contain}.mobile-header .brand-logo{width:50px;height:50px;border-radius:8px}.invoice-logo{width:70px;height:70px;object-fit:contain;border-radius:8px;margin-bottom:8px}.restock-button{margin-top:10px}.action-dialog{width:480px;max-width:calc(100% - 24px)}.action-form{padding:20px}.action-form>.field,.action-form .field-grid,.action-form #partialPaymentFields{margin:16px 0}.action-buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.action-buttons .button{flex:1}.form-error{color:var(--danger);background:#fff0f1;padding:10px;border-radius:8px;font-size:13px}.invoice-payment{border-top:1px solid var(--line);padding-top:12px;font-size:14px;break-inside:avoid}.invoice-payment>div{display:flex;justify-content:space-between;gap:15px;margin:8px 0}.invoice-payment p{margin:0 0 10px}

/* Sales only: touch-friendly mobile checkout and invoice receipt. */
.invoice-mobile-items,.sale-mobile-amount{display:none}.quantity-stepper{display:flex;align-items:center;gap:4px}.quantity-stepper>button{display:none}.sale-line-total{display:flex;justify-content:space-between;gap:12px;margin-top:14px;font-size:13px;color:var(--muted)}.sale-line-total strong{color:var(--ink)}
@media screen and (max-width:900px){
 body[data-page=sale] .main-content{padding-bottom:calc(190px + env(safe-area-inset-bottom))}
 #sale .sale-layout{gap:16px}#sale .panel{padding:16px;min-width:0}#sale .sale-line{padding:12px;background:#f8faf9}#sale .sale-line-heading{margin-bottom:4px}#sale .sale-line-heading>.icon-button{min-width:44px;min-height:44px}
 #sale .sale-fields{display:flex;flex-direction:column;gap:12px}#sale .sale-fields>.field{width:100%;max-width:none;min-width:0}#sale select{width:100%;min-width:0;max-width:100%;text-overflow:ellipsis;padding-left:24px;min-height:50px}#sale input{min-height:50px}
 #sale .sale-quantity{display:flex;justify-content:space-between;align-items:center;gap:12px}#sale .quantity-stepper{display:flex;flex:0 1 180px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:white}#sale .quantity-stepper button{display:flex;align-items:center;justify-content:center;flex:0 0 46px;min-height:48px;color:var(--green)}#sale .quantity-stepper input{width:60px;min-width:0;flex:1;margin:0;text-align:center;border:0;border-radius:0;padding:6px;min-height:48px}
 #sale .sale-line-total{border-top:1px solid var(--line);padding-top:12px;align-items:center;flex-wrap:wrap}#sale #addSaleLine{width:100%;min-height:48px;border-style:dashed}#sale .order-summary .field{margin:14px 0}#sale .summary-total{margin:16px 0}#sale .summary-total>strong{font-size:20px}#sale .summary-line{flex-wrap:wrap}#sale .summary-line strong,#sale .summary-total strong{overflow-wrap:anywhere}
 #sale .sale-checkout{position:fixed;bottom:calc(69px + env(safe-area-inset-bottom));left:0;right:0;z-index:29;display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fff;border-top:1px solid var(--line);box-shadow:0 -6px 20px #182c3508}#sale .sale-checkout .button{flex:1;min-width:0;min-height:50px;white-space:normal;font-size:14px;padding:10px}#sale .sale-mobile-amount{display:flex;flex-direction:column;flex:1;min-width:0;font-size:11px;color:var(--muted)}#sale .sale-mobile-amount strong{font-size:15px;color:var(--green-dark);overflow-wrap:anywhere}
 #paymentDialog{width:100%;max-width:100%;margin:auto 0 0;border-radius:18px 18px 0 0;max-height:95dvh}#paymentDialog .action-form{padding:16px 20px calc(20px + env(safe-area-inset-bottom))}#paymentDialog input,#paymentDialog select{min-height:52px;font-size:16px}#paymentDialog .action-buttons{position:sticky;bottom:0;background:white;padding:12px 0 0;display:grid;grid-template-columns:1fr}#paymentDialog .action-buttons .button{min-height:50px;white-space:normal}#paymentDialog .summary-line{gap:8px;flex-wrap:wrap}
 #invoiceDialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}#invoiceDialog[open]{display:flex;flex-direction:column}#invoiceDialog>.dialog-bar{flex-shrink:0;position:static;padding:10px 16px}#invoicePreview{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}#invoiceDialog .invoice-document{padding:16px;overflow-wrap:anywhere}#invoiceDialog .invoice-document header{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:16px;padding-bottom:16px}#invoiceDialog .invoice-document header>div:first-child{display:grid;grid-template-columns:48px minmax(0,1fr);gap:2px 10px;align-items:center}#invoiceDialog .invoice-logo{width:48px;height:48px;margin:0;grid-row:1/3}#invoiceDialog .invoice-document h2{font-size:17px;margin:0}#invoiceDialog .invoice-document header p{font-size:10px}#invoiceDialog .invoice-date{font-size:12px}
 #invoiceDialog .invoice-table-wrap{display:none}#invoiceDialog .invoice-mobile-items{display:grid;gap:12px}#invoiceDialog .invoice-item-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fcfdfc}#invoiceDialog .invoice-item-card h3{font-size:15px;line-height:1.9;margin:0;overflow-wrap:anywhere}#invoiceDialog .invoice-item-card p{font-size:13px;color:var(--muted);margin:4px 0 12px}#invoiceDialog .invoice-item-card dl{margin:0}#invoiceDialog .invoice-item-card dl>div{display:flex;justify-content:space-between;gap:16px;margin-top:8px;font-size:13px}#invoiceDialog .invoice-item-card dt{color:var(--muted);flex-shrink:0}#invoiceDialog .invoice-item-card dd{margin:0;text-align:left;overflow-wrap:anywhere}#invoiceDialog .item-final{border-top:1px solid var(--line);padding-top:10px;font-weight:700}#invoiceDialog .invoice-sum{width:100%;margin:18px 0;padding:12px 14px;border-radius:12px;background:var(--soft)}#invoiceDialog .invoice-sum .final{font-size:16px}#invoiceDialog .invoice-sum>div{flex-wrap:wrap}#invoiceDialog .invoice-payment{padding:14px;border:1px solid var(--line);border-radius:12px}#invoiceDialog .invoice-payment>div{flex-wrap:wrap}#invoiceDialog .invoice-thanks{margin:20px 0 5px}#invoiceDialog .invoice-actions{position:static;flex-shrink:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr) 70px}#invoiceDialog .invoice-actions .button{min-height:48px;white-space:normal}
}

.login-screen{min-height:100dvh;display:grid;place-items:center;padding:20px}.login-panel{width:380px;max-width:100%;background:white}.login-panel .field{margin:15px 0}.login-panel h1{font-size:23px}.server-busy{position:fixed;inset:0;background:#ffffffde;z-index:1000;display:grid;place-items:center;color:var(--green);font-weight:bold}.server-tools{margin-bottom:20px;font-size:13px;color:var(--muted)}.server-tools summary{cursor:pointer}.server-tools>div{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.server-tools label{cursor:pointer}

.customer-request{border:1px solid var(--line);border-radius:12px;padding:15px;margin:12px 0}.customer-request.is-new{border-color:#9edac7;background:#fbfffd}.customer-request header{display:flex;justify-content:space-between;gap:10px;align-items:center}.customer-request header strong,.customer-request header small{display:block}.customer-request header small{color:var(--muted);font-size:12px}.customer-request header a{direction:ltr;unicode-bidi:embed}.customer-request ul{list-style:none;padding:0;margin:13px 0}.customer-request li{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid var(--line);font-size:13px}.customer-request li span{overflow-wrap:anywhere}.customer-request li b{flex:none}.request-status{font-size:12px;color:var(--orange);background:#fff4e7;border-radius:7px;padding:4px 9px;flex:none}.request-status.done{color:var(--green-dark);background:var(--soft)}.request-actions{display:flex;justify-content:flex-start}.shop-inbox-shortcut{margin-top:15px;display:flex;align-items:center;justify-content:space-between;gap:15px}.shop-inbox-shortcut h2{margin:0 0 4px}.shop-inbox-shortcut .helper{margin:0}
@media(max-width:900px){.shop-inbox-shortcut{align-items:flex-start;flex-direction:column}.customer-request{padding:12px}.customer-request li{font-size:12px}}

.audit-row,.backup-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 2px;border-bottom:1px solid var(--line)}.audit-row:last-child,.backup-row:last-child{border-bottom:0}.audit-row>div,.backup-row>span{min-width:0}.audit-row strong,.audit-row small,.backup-row strong,.backup-row small{display:block}.audit-row small,.backup-row small{font-size:12px;color:var(--muted);margin-top:4px}.audit-row p{margin:6px 0 0;font-size:13px;overflow-wrap:anywhere}.audit-row code{font-size:12px;color:var(--muted);flex:none}.server-backup-list{max-height:300px;overflow:auto;border-block:1px solid var(--line);margin:12px 0;padding:4px 8px}.backup-row .button{flex:none}
@media(max-width:900px){.audit-row{align-items:flex-start}.audit-row code{font-size:10px}.audit-row p{font-size:12px}.server-backup-list{max-height:40dvh}}
