:root{--ink:#173c39;--green:#226c65;--gold:#c8a05b;--bg:#f5f3ed;--paper:#fff;--line:#dce2df;--muted:#71807d;--soft:#edf5f2;--danger:#a34b4b;--radius:18px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Dana,Vazirmatn,Tahoma,Arial,sans-serif;font-size:14px}.topbar{height:76px;background:#123d3a;color:#fff;border-bottom:3px solid var(--gold);padding:0 max(18px,calc((100% - 1180px)/2));display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none}.brand>span{display:grid;place-items:center;width:43px;height:43px;border:1px solid #d9bd87;border-radius:50%;color:#e5cd9e;font-weight:bold}.brand b,.brand small{display:block}.brand small{opacity:.65;font-size:10px;margin-top:3px}.admin-link{color:#dce8e5;text-decoration:none;font-size:12px;border:1px solid #ffffff35;padding:8px 11px;border-radius:8px}.customer-main{max-width:1180px;margin:auto;padding:36px 22px 72px}.hero{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:27px}.hero small{color:#a27332;font-weight:bold}.hero h1{font-size:34px;margin:6px 0}.hero p{color:var(--muted);margin:0}.date-chip{background:#fff;border:1px solid var(--line);padding:10px 14px;border-radius:10px;font-size:12px;color:#516764}.panel{background:var(--paper);border:1px solid #e0e4e1;border-radius:var(--radius);padding:26px;margin-bottom:18px;box-shadow:0 7px 26px #153d3509}.panel-title{display:flex;gap:12px;align-items:center;margin-bottom:23px}.panel-title i{font-style:normal;display:grid;place-items:center;width:35px;height:35px;border-radius:50%;background:#e4f0ec;color:var(--green);font-weight:bold}.panel-title h2,.panel-title p{margin:0}.panel-title h2{font-size:18px}.panel-title p{font-size:11px;color:var(--muted);margin-top:3px}.form-grid{display:grid;gap:14px}.customer-fields{grid-template-columns:1.5fr 1fr 1fr}.product-fields{grid-template-columns:1.3fr 1fr 1fr .65fr}.text-lines{grid-template-columns:repeat(3,1fr);margin-bottom:18px}label{display:flex;flex-direction:column;gap:7px;color:#375451;font-size:12px;font-weight:bold}label em{color:#b45858;font-style:normal}label small{color:#889692;font-weight:normal}input,select,textarea{width:100%;min-height:44px;border:1px solid var(--line);border-radius:9px;background:#fbfcfb;padding:10px 11px;color:var(--ink);font:inherit;outline:none}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:#62a098;box-shadow:0 0 0 3px #e3f1ed}select:disabled{opacity:.65}.order-item{border:1px solid #d6dfdb;border-radius:14px;padding:20px;margin-bottom:16px;background:#fefefe}.item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.item-head>div{display:flex;align-items:center;gap:9px}.item-number{display:grid;place-items:center;width:28px;height:28px;border:1px solid #b9cfca;border-radius:7px;color:var(--green)}button{font:inherit}.remove{border:0;background:none;color:var(--danger);cursor:pointer}.separator{height:1px;background:#e8ecea;margin:22px 0}.section-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px;font-weight:bold}.copy-embro{border:1px solid #ccdad6;background:#f3f8f6;color:var(--green);border-radius:7px;padding:6px 9px;font-size:10px;cursor:pointer}.designer{display:grid;grid-template-columns:1.2fr .8fr;gap:24px}.design-controls{display:grid;gap:13px}.preview-wrap>small,.schematic-wrap>small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.text-preview{min-height:92px;border:1px dashed #9bbab5;border-radius:10px;background:#f1f7f5;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px;text-align:center;font-size:25px;line-height:1.45;word-break:break-word}.font-arial{font-family:Arial,sans-serif}.font-defore{font-family:Defore,'Brush Script MT',cursive}.font-bnazanin{font-family:BNazanin,'B Nazanin',Tahoma,serif;font-size:29px}.schematic{position:relative;max-width:310px;margin:auto;padding:5px 20px 35px}.garment{width:100%;display:none}.schematic[data-category="scrub"] .scrub-svg,.schematic[data-category="cap"] .cap-svg{display:block}.cloth{fill:#e6efec;stroke:#739994;stroke-width:2}.seam,.pocket{fill:none;stroke:#a7bfbb;stroke-width:1.4}.brim{fill:#dae8e4}.stitch-marker{position:absolute;display:none;width:36px;height:12px;border-radius:2px;background:repeating-linear-gradient(90deg,#b68437 0 3px,transparent 3px 5px);filter:drop-shadow(0 1px 1px #0003)}.placement-name{text-align:center;margin:4px 0;color:#49635f;font-size:11px}.schematic.has-place .stitch-marker{display:block}.schematic[data-place="chest-right"] .stitch-marker{top:34%;right:32%}.schematic[data-place="chest-left"] .stitch-marker{top:34%;left:32%}.schematic[data-place="sleeve-right"] .stitch-marker{top:38%;right:6%}.schematic[data-place="sleeve-left"] .stitch-marker{top:38%;left:6%}.schematic[data-place="cap-right"] .stitch-marker{top:45%;right:28%}.schematic[data-place="cap-left"] .stitch-marker{top:45%;left:28%}.schematic[data-place="sleeve-right"] .stitch-marker{top:38%;right:6%}.schematic[data-place="sleeve-left"] .stitch-marker{top:38%;left:6%}.schematic[data-place="cap-right"] .stitch-marker{top:45%;right:28%}.schematic[data-place="cap-left"] .stitch-marker{top:45%;left:28%}.schematic[data-place="cap-center"] .stitch-marker{top:42%;left:calc(50% - 18px)}.add-item{width:100%;border:1px dashed #78a7a0;background:#f0f8f5;color:var(--green);border-radius:10px;padding:13px;cursor:pointer}.final-panel{text-align:center}.agree{flex-direction:row;align-items:center;justify-content:center}.agree input{width:18px;min-height:18px;accent-color:var(--green)}.submit-btn{width:min(100%,480px);margin:20px auto 8px;border:0;border-radius:10px;background:var(--ink);color:#fff;padding:14px 18px;display:flex;justify-content:space-between;cursor:pointer}.final-panel>small{color:var(--muted)}.notice{padding:13px 16px;border-radius:10px;margin-bottom:16px;background:#e6f3ed;color:#245d51}.notice.error{background:#faeaea;color:#8d3838}
@media(max-width:850px){.customer-fields,.product-fields{grid-template-columns:1fr 1fr}.designer{grid-template-columns:1fr}.schematic-wrap{border-top:1px solid var(--line);padding-top:17px}}
@media(max-width:600px){body{font-size:13px}.topbar{height:66px}.admin-link{font-size:10px;padding:7px}.customer-main{padding:22px 11px 56px}.hero{align-items:flex-start}.hero h1{font-size:25px}.hero p{font-size:11px;max-width:250px}.date-chip{display:none}.panel{padding:16px 13px;border-radius:13px}.customer-fields,.product-fields,.text-lines{grid-template-columns:1fr}.order-item{padding:14px 11px}.section-label{align-items:flex-start;gap:8px}.copy-embro{max-width:145px}.text-preview{font-size:22px}.schematic{max-width:270px}.submit-btn{position:sticky;bottom:10px;box-shadow:0 8px 25px #0004}.brand small{display:none}#orderForm label{font-size:16px;line-height:1.55;gap:8px}#orderForm label small{font-size:12px}#orderForm input,#orderForm select,#orderForm textarea{font-size:14px;min-height:48px}#orderForm .preview-wrap>small,#orderForm .schematic-wrap>small{font-size:13px}}
.embroidery-item{border:1px solid #d7e2de;border-radius:12px;margin-top:15px;overflow:hidden;background:#fbfdfc}.embroidery-item>header{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;background:#edf5f2;border-bottom:1px solid #dce6e2}.embroidery-item>header>small{font-size:10px;color:var(--muted)}.embro-toggle{flex-direction:row;align-items:center;font-size:14px;color:var(--ink)}.embro-toggle input{width:18px;min-height:18px;accent-color:var(--green)}.embro-content{padding:17px}.logo-embroidery{border-color:#d9d5c9}.logo-embroidery>header{background:#f6f2e9}.logo-preview{min-height:92px;border:1px dashed #b8c9c5;border-radius:10px;background:#f4f8f6;display:grid;place-items:center;padding:10px;color:var(--muted);font-size:10px}.logo-preview img{display:block;max-width:180px;max-height:100px;object-fit:contain}.logo-preview img[hidden]{display:none}.logo-preview.has-logo>span{display:none}.logo-preview.has-logo img{display:block;margin:auto}.logo-schematic .stitch-marker{height:24px;width:24px;border-radius:4px;background:#226c65;color:#fff;font:bold 10px Arial;text-align:center;line-height:24px}.text-off .text-embroidery,.logo-off .logo-embroidery{opacity:.72}
.order-result{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#e8f8ee;border:1px solid #b9dfc5;border-radius:14px;padding:16px 18px;margin:0 0 18px;color:#175b34}.order-result[hidden]{display:none}.order-result b,.order-result small{display:block}.order-result small{margin-top:4px;color:#4e7460}.order-result-actions{display:flex;gap:8px;flex-wrap:wrap}.order-result a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:9px;padding:9px 14px;text-decoration:none;font-weight:700}.result-primary{background:#168fbe;color:#fff}.result-secondary{border:1px solid #7fc8e3;background:#fff;color:#0b739c}
@media(max-width:600px){.embro-content{padding:12px 9px}.embroidery-item>header{align-items:flex-start}.embroidery-item>header>small{max-width:110px;text-align:left}}
@media(max-width:600px){.order-result{display:block}.order-result-actions{margin-top:13px}.order-result a{width:100%}.schematic.has-custom .stitch-marker{width:22px;height:22px;border:3px solid #fff;border-radius:50%;background:#f28c6b;box-shadow:0 1px 7px #0005}.schematic.has-custom.logo-schematic .stitch-marker{width:24px;height:24px;line-height:18px}}
.top-actions{display:flex;gap:8px;align-items:center}.organization-link{display:inline-flex;align-items:center;gap:7px;margin-top:17px;padding:10px 14px;border-radius:9px;background:#eaf8fe;border:1px solid #a9dcef;color:#087ead;text-decoration:none;font-weight:700}.org-customer-fields{grid-template-columns:1.5fr 1fr}.org-product-fields{grid-template-columns:1.3fr 1fr 1fr .65fr}.org-entry-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.org-entry-heading b,.org-entry-heading small{display:block}.org-entry-heading small{font-size:10px;color:var(--muted);margin-top:4px}.entry-count{background:#eaf8fe;color:#087ead;border-radius:999px;padding:6px 10px;font-size:11px}.organization-entries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.organization-entry{padding:11px;border:1px solid #d7e8ef;border-radius:10px;background:#f9fdff}.organization-entry input{background:#fff}.organization-page .text-schematic .stitch-marker{width:22px;height:22px;border:3px solid #fff;border-radius:50%;background:#f28c6b;box-shadow:0 1px 7px #0005}.organization-page .final-panel{border-top:3px solid #29abe0}
@media(max-width:850px){.org-product-fields{grid-template-columns:1fr 1fr}.organization-entries{grid-template-columns:1fr}}
@media(max-width:600px){.top-actions{gap:5px}.top-actions .admin-link{padding:6px;font-size:9px}.org-customer-fields,.org-product-fields{grid-template-columns:1fr}.organization-page label{font-size:16px;line-height:1.55}.organization-page label small{font-size:12px}.organization-entry{padding:9px}.org-entry-heading{align-items:flex-start}.organization-link{width:100%;justify-content:center}}
.customer-fields{grid-template-columns:1.5fr 1fr}
.org-service-switches{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}.org-service-switches .embro-toggle{background:#eef9fd;border:1px solid #b9e2f2;border-radius:10px;padding:10px 14px}.org-text-section,.org-logo-section{border:1px solid #d6e8ef;border-radius:13px;padding:16px;margin-top:14px;background:#fcfeff}.organization-units,.organization-logos{display:grid;grid-template-columns:1fr;gap:14px}.organization-unit,.organization-logo{border:1px solid #cfe5ee;border-radius:12px;padding:14px;background:#fff}.organization-unit>header,.organization-logo>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.unit-size-tag{background:#fff0ea;color:#934f3c;border-radius:999px;padding:5px 9px;font-size:10px}.org-unit-controls{grid-template-columns:repeat(4,1fr);margin-bottom:13px}.org-three-lines{margin-bottom:12px}.unit-preview{min-height:74px;font-size:21px}.org-combined-map{margin-top:18px;padding-top:15px;border-top:1px dashed #9fd2e5}.marker-layer{position:absolute;inset:0;pointer-events:none}.placement-marker{position:absolute;width:22px;height:22px;border:3px solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 1px 7px #0005;background:#f28c6b}.placement-marker.logo{background:#29abe0}.org-logo-controls{grid-template-columns:1.3fr 1fr 1fr;margin-bottom:11px}.organization-logo .remove-logo{border:0;background:none;color:var(--danger);cursor:pointer;font-size:11px}.org-logo-preview{margin-bottom:11px;border-width:2px}.org-logo-preview img{max-width:230px;max-height:130px}.org-logo-preview.has-logo>span{display:none}.org-logo-preview.has-logo{min-height:150px}.org-logo-preview.has-logo img{display:block;margin:auto;width:82%;max-width:260px;max-height:135px;object-fit:contain}.organization-item .schematic{max-width:380px}.organization-item .custom-schematic{max-height:360px}.organization-page .org-entry-heading .tiny{white-space:nowrap}
@media(max-width:900px){.org-unit-controls{grid-template-columns:1fr 1fr}.org-logo-controls{grid-template-columns:1fr 1fr}.org-logo-controls label:first-child{grid-column:1/-1}}
@media(max-width:600px){.org-text-section,.org-logo-section{padding:11px 8px}.organization-unit,.organization-logo{padding:11px 8px}.org-unit-controls,.org-logo-controls{grid-template-columns:1fr}.org-logo-controls label:first-child{grid-column:auto}.organization-unit>header,.organization-logo>header{align-items:flex-start}.unit-size-tag{font-size:9px}.unit-preview{font-size:19px}.org-service-switches{display:grid;grid-template-columns:1fr 1fr}.organization-page .org-entry-heading{gap:10px}.organization-page .org-entry-heading .tiny{padding:6px;font-size:9px}}
.finance-cards{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important}.finance-card.pending{background:#eaf8fe}.quality-badge{display:inline-block;border-radius:999px;padding:4px 9px;font-size:9px;font-weight:700}.quality-badge.pending{background:#eaf8fe;color:#137da6}.quality-badge.accepted{background:#e3f4e8;color:#287044}.quality-badge.rejected{background:#f6d8df;color:#a52f4d;border:1px solid #e8a9b8}.review-actions{display:flex;gap:7px;align-items:end}.review-actions button{flex:1}.review-actions .reject{background:#f6d8df;color:#a52f4d;border-color:#e8a9b8}.locked-review{padding:10px;border-radius:9px;background:#f6d8df;color:#8f2943;font-size:10px;font-weight:700}
.attachment-panel{border-top:3px solid #f28c6b}.attachment-grid{display:grid;grid-template-columns:.85fr 1.15fr;gap:18px;align-items:start}.attachment-preview{margin-top:16px;padding:12px;border:1px dashed #8fcfe7;border-radius:12px;background:#f4fbfe;text-align:center}.attachment-preview img{display:block;max-width:100%;max-height:380px;margin:auto;border-radius:8px;object-fit:contain}.attachment-panel .existing-file{display:block;color:#168fbe;font-size:10px;font-weight:400;line-height:1.7}.attachment-panel textarea{min-height:132px}@media(max-width:700px){.attachment-grid{grid-template-columns:1fr}.attachment-preview img{max-height:300px}}
/* v1.9: رنگ سفارشی، نمونه رنگ و گلدوزی شلوار */
.color-select-row{display:grid;grid-template-columns:30px 1fr;gap:8px;align-items:center}.color-swatch{width:28px;height:28px;border:3px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #b8ddea;background:#eef7fa}.custom-color-fields{display:grid;grid-template-columns:1fr 52px auto;gap:7px;align-items:center;margin-top:7px;padding:8px;background:#f3fbfe;border:1px dashed #9dd9ef;border-radius:9px}.custom-color-fields input[type=color]{padding:2px;min-height:40px}.custom-color-fields code{direction:ltr;color:#0b3954}.pants-embroidery{border-color:#a9d5e5}.pants-embroidery[hidden]{display:none!important}.pants-service-select{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px}.pants-text-block,.pants-logo-block{border-top:1px dashed #b9dce8;padding-top:12px;margin-top:8px}.copy-garment-to-pants{display:inline-flex;align-items:center;justify-content:center;min-height:38px;margin:0 0 12px;padding:8px 12px;border:1px solid #7fc8e3;border-radius:9px;background:#eef9fd;color:#0b6f98;font-family:inherit;font-size:11px;font-weight:700;cursor:pointer}.copy-garment-to-pants[hidden]{display:none}.pants-svg{display:block}.schematic[data-category="pants"] .scrub-svg,.schematic[data-category="pants"] .cap-svg{display:none}.thread-map-box,.pants-admin-box{display:grid;gap:9px;border:1px solid #b9e2f2;background:#f5fbfd;border-radius:10px;padding:10px}.thread-map-box fieldset{display:flex;gap:9px;flex-wrap:wrap;border:1px solid #d5e8ef;border-radius:8px;margin:8px 0;padding:8px}.thread-map-box label{display:flex;align-items:center;gap:4px;font-size:10px}.thread-map-box input[type=checkbox]{width:17px;min-height:0;margin:0}.order-total-form{display:flex;align-items:end;gap:6px;padding:8px;background:#eef9fd;border-radius:8px}.order-total-form label{font-size:9px}.order-total-form input{min-height:34px;padding:6px}.tiny.danger{color:#9b3030;border-color:#e0aaaa;background:#fff1f1}.user-admin-row{display:grid;grid-template-columns:1fr 1.3fr 1.3fr auto auto;gap:8px;align-items:end;padding:10px 0;border-bottom:1px solid #d9eaf1}.user-admin-row small{display:block;color:#6b818b}.user-admin-row label{font-size:9px}@media(max-width:720px){.custom-color-fields{grid-template-columns:1fr 52px}.custom-color-fields code{grid-column:1/-1}.pants-service-select{display:grid}.copy-garment-to-pants{width:100%}.user-admin-row{grid-template-columns:1fr}.order-total-form{display:grid;grid-template-columns:1fr auto}}
.temporary-edit-note{margin-top:14px;padding:12px 14px;border-right:4px solid #e0a514;border-radius:9px;background:#fff7d9;color:#74590c}.order-result-actions[hidden]{display:none!important}
.text-preview span{display:block;width:100%;unicode-bidi:plaintext;text-align:center}
.bale-bots-editor{display:grid;gap:12px}.bale-bot-row{border:1px solid #cfe8f3;border-radius:12px;padding:12px;background:#f7fcfe}.bale-bot-row>header,.bale-bot-tools-list>article{display:flex;justify-content:space-between;align-items:center;gap:10px}.bale-bot-fields{display:grid;grid-template-columns:1fr 1.3fr 1fr auto;gap:10px;align-items:end;margin-top:10px}.bale-active{flex-direction:row;align-items:center;min-height:44px}.bale-active input{width:18px;min-height:18px;margin:0;accent-color:#29abe0}.add-bale-bot{justify-self:start}.bale-bot-tools-list{display:grid;gap:8px;margin-top:15px}.bale-bot-tools-list>article{border:1px solid #d7eaf1;border-radius:10px;padding:10px}.bale-bot-tools-list small{display:block;color:#637f8d;margin-top:3px}@media(max-width:850px){.bale-bot-fields{grid-template-columns:1fr 1fr}.bale-bot-tools-list>article{align-items:flex-start}}@media(max-width:540px){.bale-bot-fields{grid-template-columns:1fr}.bale-bot-row>header,.bale-bot-tools-list>article{align-items:flex-start;flex-direction:column}.bale-active{flex-direction:row}.bale-bot-tools-list .bale-tools{margin:4px 0}}
.customer-fields{grid-template-columns:1.5fr 1fr}.admin-edit-mode .customer-fields{grid-template-columns:1.5fr 1fr 1fr}#orderForm input,#orderForm select,#orderForm textarea{background:#fff;border-color:#d9eff7;box-shadow:inset 0 0 0 1px #f4fbfe}#orderForm input::placeholder,#orderForm textarea::placeholder{color:#9eb5bf;opacity:.72}@media(max-width:600px){.customer-fields,.admin-edit-mode .customer-fields{grid-template-columns:1fr}}
.logo-entries{display:grid;gap:14px}.logo-entry{padding:14px;border:1px solid #cfe8f3;border-radius:12px;background:#f8fcfe}.logo-entry-title{grid-column:1/-1;margin:0 0 6px;font-size:16px;color:#0b3954}.logo-entry-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:12px}.logo-entry-actions button{min-height:38px;padding:8px 12px;border-radius:8px;border:1px solid #9ed5eb;background:#eaf8fe;color:#087ead;font:700 12px Dana,Vazirmatn,Arial,sans-serif;cursor:pointer}.logo-entry-actions .remove-logo{background:#fff4f4;border-color:#efc1c1;color:#a24444}.logo-entry-actions small{color:#557785}.logo-entry-actions [hidden]{display:none!important}.logo-entry .stitch-marker{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:12px;font-weight:700;color:#fff}
