.modal-backdrop{position:fixed;inset:0;background:rgba(8,28,59,.48);display:grid;place-items:center;padding:18px;z-index:20}
.modal{position:relative;width:min(520px,100%);max-height:90vh;overflow:auto;background:#fff;padding:27px;border-radius:14px;box-shadow:0 22px 60px rgba(0,0,0,.25)}
.modal h3{font-size:21px;margin:0 35px 8px 0}.close-modal{position:absolute;right:15px;top:13px;width:32px;height:32px;border-radius:50%;background:#edf2f8;color:#244568;font-size:24px;line-height:1}.modal-form{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.modal-form label{margin:13px 0 0}.modal-form input,.modal-form select{width:100%;padding:10px;margin-top:6px;border:1px solid #e3e8f0;border-radius:7px;background:#fff}.modal-form button{grid-column:1/-1;margin-top:20px}.rule-group{grid-column:1/-1;border-top:1px solid #e3e8f0;padding-top:15px;margin-top:4px}.rule-group>b{font-size:13px}.discount-rule,.customer-order-line{display:grid;grid-template-columns:1fr 150px;gap:14px}.discount-rule label,.customer-order-line label{margin:10px 0 0}.rule-group .small-button,.order-customer-choice .small-button{margin-top:11px;background:#e8f0fb;color:#0f4c97;font-weight:750;border-radius:7px;padding:7px 10px;font-size:12px}.order-customer-choice{grid-column:1/-1;display:flex;align-items:end;gap:10px}.order-customer-choice label{flex:1}
@media(max-width:520px){.modal{padding:22px}.modal-form{grid-template-columns:1fr}}

.modal:has(.promotion-form){width:min(760px,calc(100vw - 28px))}.promotion-filter-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.promotion-checkbox{display:flex!important;align-items:center!important;gap:9px;margin:0!important;padding:9px 10px!important;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer;min-width:0}.promotion-checkbox:hover{background:#f5f9ff;border-color:#bcd8f4}.promotion-checkbox input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px;margin:0!important;padding:0!important;accent-color:#0f4c97;flex:0 0 18px}.promotion-checkbox span{min-width:0;line-height:1.25}.promotion-checkbox span b,.promotion-checkbox span small{display:block}.promotion-checkbox span small{font-weight:400;color:#61708a;margin-top:2px}.promotion-targets>#promotion-product-search{margin:11px 0 0}.promotion-product-results{display:grid;gap:9px;max-height:340px;overflow:auto;margin-top:10px;padding-right:3px}.promotion-product-group{border:1px solid #dce6f1;border-radius:9px;overflow:hidden}.promotion-product-group-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 11px;background:#f5f9ff}.promotion-product-group-head b,.promotion-product-group-head small{display:block}.promotion-product-group-head small{font-size:11px;color:#61708a;margin-top:2px}.promotion-product-group-head .small-button{margin:0;white-space:nowrap}.promotion-variant-choice{border:0;border-radius:0;border-top:1px solid #e7edf5}.promotion-variant-choice strong{margin-left:auto;color:#0f4c97;white-space:nowrap}.promotion-selected-products{margin-top:11px;font-size:12px}.promotion-selected-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.promotion-selected-list button{margin:0;border:1px solid #c5dbf3;border-radius:999px;background:#edf5ff;color:#174a83;padding:5px 8px;font-size:11px}.promotion-selected-list span{color:#61708a;align-self:center}.promotion-form>p.product-meta{align-self:end;margin:0 0 3px}@media(max-width:600px){.modal:has(.promotion-form){width:calc(100vw - 18px)}.promotion-filter-list{grid-template-columns:1fr}.promotion-product-group-head{align-items:flex-start;flex-direction:column}.promotion-variant-choice strong{font-size:12px}}

.product-editor{display:grid;gap:16px}.product-editor-card{border:1px solid #e3e8f0;border-radius:12px;padding:16px;background:#fff;display:grid;gap:12px}.product-editor-card h3{margin:0;font-size:1rem}.product-editor-card textarea{resize:vertical;min-height:110px}.product-editor label{display:grid;gap:6px;font-weight:600}.product-editor label small,.product-editor-card p{font-weight:400;color:#61708a}.product-editor input,.product-editor textarea{width:100%;padding:10px 11px;border:1px solid #d9e0ea;border-radius:8px;background:#fff;font:inherit}.product-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.product-variant-entry{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px;border:1px solid #e3e8f0;border-radius:10px;background:#f9fbfd;align-items:end}.product-variant-entry .danger{grid-column:3;justify-self:end}.product-save{justify-self:start}.modal:has(.product-editor){max-width:960px;width:min(960px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto}.modal:has(.product-editor) .close-modal{position:sticky;top:0;float:right;z-index:2}
@media(max-width:700px){.product-editor-grid,.product-variant-entry{grid-template-columns:1fr}.product-variant-entry .danger{grid-column:auto;justify-self:start}.modal:has(.product-editor){width:calc(100vw - 18px);max-height:calc(100vh - 18px)}}

.order-create-options{display:grid;gap:12px;margin-top:18px}.order-create-option{text-align:left;display:grid;gap:5px;padding:17px;border:1px solid #d7e4f3;border-radius:10px;background:#f8fbff;color:#173b65}.order-create-option:hover{background:#eaf4ff;border-color:#9fc2e9}.order-create-option span{font-size:.88rem;color:#61708a;font-weight:400}.email-reader-body{grid-column:1/-1}.email-reader-body textarea{width:100%;min-height:170px;padding:10px;margin-top:6px;border:1px solid #e3e8f0;border-radius:7px;font:inherit}.email-reader-result{display:grid;gap:14px;margin-top:12px}.email-reader-result h3{margin:0}.email-reader-result .primary{margin-top:4px}
