.order-builder-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex-shrink:0}
.order-builder-section-title .order-preorder-toggle{display:flex;align-items:center;align-self:center;gap:8px;margin:0;flex-shrink:0;white-space:nowrap;font-size:12px;font-weight:600;color:#243b64;cursor:pointer;border:1px solid #dce5f3;background:#f8faff;border-radius:9px;padding:10px 12px;height:40px}
.order-preorder-toggle input,.preorder-list-toggle input{width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:#2563eb;cursor:pointer;flex-shrink:0}
.order-builder-section-title .order-preorder-toggle+.order-ai-assist-button{margin:0;align-self:center;height:40px}
.order-preorder-toggle:has(:checked){background:#eef3ff;border-color:#a7c1fc;color:#1d4ed8}
.order-preorder-toggle:focus-within{outline:2px solid #2563eb;outline-offset:2px}
.preorder-stats{display:flex;gap:14px;margin:0 0 22px;flex-wrap:wrap}
.preorder-stats>div{display:flex;flex-direction:column;gap:9px;min-width:180px;flex:1;max-width:280px;padding:20px 22px;background:#fff;border:1px solid #dce5f3;border-radius:13px}
.preorder-stats span{font-size:12px;color:var(--muted)}
.preorder-stats strong{font-size:23px;color:#203760}
.preorder-panel .orders-product-previews{min-width:210px}
.preorder-list-toggle{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-size:12px;color:#38517b;cursor:pointer}
.badge.preorder{color:#6d28d9;background:#f2ecff}
.preorder-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.preorder-stat{display:flex;align-items:center;gap:13px;min-width:0;text-align:left;border:1px solid #e0e7f2;border-radius:14px;padding:20px;background:#fff;box-shadow:0 3px 12px #182b4903;color:#223452}
.preorder-stat>span:nth-child(2){flex:1;display:grid;gap:5px}
.preorder-stat small{font-size:11px;color:#73819a}
.preorder-stat strong{font-size:27px;line-height:1.2;font-weight:650}
.preorder-stat>span:last-child{font-size:18px;color:#a1acc0}
.preorder-stat-icon{width:38px;height:38px;border-radius:11px;background:#eff4ff;color:#3d67b6;display:grid;place-items:center;font-size:19px;flex-shrink:0}
.preorder-stat.today .preorder-stat-icon{background:#fff2df;color:#bf7b16}
.preorder-stat.tomorrow .preorder-stat-icon{background:#eeeafe;color:#7a59bd}
.preorder-stat.overdue .preorder-stat-icon{background:#fff0ed;color:#ca4c3e}
.preorder-stat:hover,.preorder-stat.is-current{border-color:#b0c5ee;box-shadow:0 0 0 2px #3b6fe20a}
.preorder-alerts{display:flex;align-items:center;gap:14px;border:1px solid #dae8df;background:#f3faf6;padding:19px 21px;border-radius:13px;margin-bottom:24px;color:#315b45}
.preorder-alerts.has-alerts{background:#fffbf1;border-color:#f1dfb8;color:#735420}
.preorder-alert-symbol{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:50%;font-weight:700;background:#e3f1e8;color:#287349}
.has-alerts .preorder-alert-symbol{background:#fff0cc;color:#a77617}
.preorder-alerts>div:nth-child(2){flex:1;min-width:0}
.preorder-alerts strong{font-size:13px;font-weight:600}
.preorder-alerts p{font-size:12px;margin:5px 0 3px;line-height:1.6}
.preorder-alerts small{font-size:10px;opacity:.8}
.preorder-alerts .btn{background:#fffdf8;border-color:#eedfc1;color:#76541e;white-space:nowrap}
.preorder-missing-note{font-size:12px;background:#f3f5fc;padding:12px 16px;border-radius:9px;color:#65728d;margin-bottom:20px}
.preorder-tabs{display:flex;gap:6px;border-bottom:1px solid #dfe6f1;margin-bottom:20px;overflow:auto}
.preorder-tabs button{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:12px 15px;background:transparent;border:0;border-bottom:2px solid transparent;color:#7a869e;font-size:12px}
.preorder-tabs button.selected{border-bottom-color:#275ce0;color:#275ce0;font-weight:600}
.preorder-tabs button span{background:#eaf0f8;border-radius:6px;padding:1px 6px;font-size:10px;color:#6580a7}
.preorder-tabs button.selected span{background:#e6efff;color:#275ce0}
.preorder-tools{display:flex;gap:12px;align-items:center;margin-bottom:22px}
.preorder-tools .toolbar{flex:1;margin:0;min-width:0;gap:12px}
.preorder-tools #table-search{flex:1;width:100%;min-width:0;max-width:460px;background:#fff}
.preorder-tools select{width:auto;max-width:250px;margin:0;min-height:42px;font-size:12px;border-color:#dce4f1;border-radius:8px}
.preorder-list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.preorder-list-heading h2{font-size:15px;letter-spacing:-.2px;margin:0;color:#243553}
.preorder-list-heading>span{font-size:11px;color:#8b97ad}
.preorder-list{display:grid;gap:14px}
.preorder-card{border:1px solid #dfe6f1;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 3px 12px #1e315403}
.preorder-card.overdue{border-color:#efd6d1}
.preorder-card-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid #f0f3f8}
.preorder-card-top>div{display:flex;align-items:center;gap:10px}
.preorder-card-top strong{font-size:13px;color:#243c6b}
.preorder-reminder{font-size:10px;line-height:1.5;font-weight:600;padding:4px 9px;border-radius:6px;background:#eff4ff;color:#4167aa;white-space:nowrap}
.preorder-reminder.today{color:#a36b16;background:#fff4df}.preorder-reminder.tomorrow{color:#7650b5;background:#f1edfc}.preorder-reminder.overdue{color:#bb493f;background:#fff0ed}.preorder-reminder.completed{color:#388363;background:#edf7f0}.preorder-reminder.missing{color:#6c7489;background:#f1f3f7}
.preorder-card-body{display:grid;grid-template-columns:minmax(140px,1fr) minmax(210px,1.35fr) minmax(160px,1.1fr) auto;gap:22px;padding:20px;align-items:start}
.preorder-customer,.preorder-delivery,.preorder-amount{display:flex;flex-direction:column;gap:6px;min-width:0}
.preorder-customer>strong{font-size:12px;color:#253755;overflow-wrap:anywhere}
.preorder-customer a{font-size:12px}.preorder-customer small{font-size:10px;color:#8b97ad;line-height:1.6}
.preorder-products{min-width:0}.preorder-panel .orders-product-previews{min-width:0}.preorder-products .orders-product-preview{min-width:0;max-width:none}.preorder-products .orders-product-preview>div{min-width:0}.preorder-products .orders-product-preview strong{white-space:normal}
.preorder-field-label{font-size:8px;letter-spacing:1.2px;color:#8a97ae}
.preorder-delivery>strong{font-size:13px;color:#253b63}
.preorder-delivery>span:not(.preorder-field-label){font-size:11px;color:#6d7d97;line-height:1.6}
.preorder-delivery p{font-size:11px;color:#7a8699;line-height:1.6;overflow-wrap:anywhere;margin:0;white-space:pre-wrap}
.preorder-amount{text-align:right}.preorder-amount strong{font-size:13px;white-space:nowrap;color:#243752}.preorder-amount small{font-size:10px;color:#8a97ad}
.preorder-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;background:#fcfdff;border-top:1px solid #f0f3f8}
.preorder-card-footer>div{display:flex;gap:8px}.preorder-card-footer .btn{font-size:10px;border-color:#dce4f2;color:#657792}.preorder-card-footer .preorder-open{color:#285ac1;background:#f6f9ff}
.preorder-card-footer .preorder-list-toggle{margin:0;font-size:11px}
.preorder-panel .table-footer{background:transparent;border:0;margin-top:8px;padding:14px 0}
#preorder-draft-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f7f5ff;border:1px solid #e8e1fa;border-radius:10px;padding:12px 14px;margin:-5px 0 22px}
#preorder-draft-summary>div{display:flex;align-items:center;gap:10px;min-width:0}
#preorder-draft-summary strong{display:block;font-size:11px;font-weight:600;color:#65518d}
#preorder-draft-summary small{display:block;font-size:10px;line-height:1.5;color:#8a7c9f;margin-top:4px}
.preorder-summary-icon{color:#8c6ab8;font-size:22px}
.preorder-dialog{width:min(480px,calc(100vw - 28px));max-height:90dvh;padding:0;border:1px solid #e0e5f0;border-radius:18px;color:#203454;box-shadow:0 24px 90px #16284630;overflow:auto}
.preorder-dialog::backdrop{background:#18253f66;backdrop-filter:blur(3px)}
.preorder-dialog>header{padding:24px 26px 21px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eaf0f7;background:#fafbff}
.preorder-dialog-kicker{font-size:9px;letter-spacing:1.7px;color:#8091b3}
.preorder-dialog h2{font-size:22px;letter-spacing:-.6px;margin:7px 0 0;font-weight:650}
.preorder-dialog .close-button{border:1px solid #e3e9f4;border-radius:50%;background:#fff;width:30px;height:30px;font-size:22px;color:#8390a9;display:grid;place-items:center;padding:0;line-height:1}
.preorder-dialog form{padding:22px 26px 24px}
.preorder-dialog form>p:first-child{font-size:12px;color:#7b89a2;line-height:1.7;margin-bottom:22px}
.preorder-dialog label{font-size:12px;color:#435673;margin-bottom:18px}
.preorder-dialog input,.preorder-dialog select,.preorder-dialog textarea{border:1px solid #dce4f1;border-radius:9px;background:#fafcff;font-size:12px;padding:12px;color:#253d61;margin-top:8px;min-width:0;width:100%;box-sizing:border-box}
.preorder-dialog input:focus,.preorder-dialog select:focus,.preorder-dialog textarea:focus{outline:2px solid #94b5ee;outline-offset:1px;background:#fff}
.preorder-dialog-reminder{display:flex;align-items:flex-start;gap:10px;border:1px solid #e1e9f7;background:#f5f8ff;padding:13px;border-radius:10px;color:#7889a6;font-size:10px;line-height:1.7}
.preorder-dialog-reminder>span:first-child{font-size:20px;color:#6482bd;line-height:1.2}
.preorder-dialog-reminder strong{font-weight:600;color:#4d6d9d}
.preorder-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.preorder-dialog footer .primary{background:#244f9d;border-color:#244f9d;min-width:135px}
.preorder-dialog .form-error{margin:13px 0 0}.preorder-dialog .form-error:empty{display:none}
.preorder-alert-button{display:flex;align-items:center;justify-content:center;position:relative;width:36px;height:36px;border:1px solid #f2dec0;background:#fffbf2;border-radius:9px;color:#a87723;flex-shrink:0}
.preorder-alert-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.preorder-alert-button b{position:absolute;right:-5px;top:-6px;border:2px solid #fff;border-radius:12px;background:#d78c29;color:white;min-width:18px;height:18px;font-size:9px;display:grid;place-items:center;padding:0 3px}
@media(max-width:750px){.preorder-tools .toolbar{display:grid;grid-template-columns:minmax(0,1fr)}.preorder-tools #table-search{max-width:none}.preorder-tools .toolbar-group,.preorder-tools #table-filter{width:100%}}
@media(max-width:1200px){.preorder-card-body{grid-template-columns:1fr 1.2fr;gap:18px}.preorder-amount{text-align:left}.preorder-stat{padding:16px;gap:10px}.preorder-stat-icon{width:32px;height:32px}.preorder-stat>span:last-child{display:none}}
@media(max-width:750px){.preorder-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.preorder-stat{padding:15px}.preorder-stat strong{font-size:23px}.preorder-alerts{padding:16px;align-items:flex-start;flex-wrap:wrap;gap:10px}.preorder-alerts>div:nth-child(2){flex-basis:calc(100% - 50px)}.preorder-alerts .btn{margin-left:44px}.preorder-alerts p{font-size:11px}.preorder-tools{flex-wrap:wrap}.preorder-tools .toolbar{flex-basis:100%;flex-wrap:nowrap}.preorder-tools #preorder-reason-filter{max-width:none;width:100%}.preorder-tools .toolbar-group{margin-left:0}.preorder-list-heading{align-items:flex-start;flex-direction:column;gap:5px}.preorder-tabs{margin-bottom:16px}.preorder-tabs button{padding:11px 10px;font-size:11px}.preorder-card-top,.preorder-card-body{padding:15px}.preorder-card-body{grid-template-columns:minmax(0,1fr);gap:16px}.preorder-card-footer{padding:12px 15px;flex-wrap:wrap}.preorder-card-footer>div{margin-left:auto}.preorder-card-footer .btn{padding:7px 10px}.preorder-products .orders-product-preview{max-width:none}.preorder-amount{flex-direction:row;align-items:center;gap:10px}.preorder-dialog>header{padding:20px}.preorder-dialog form{padding:20px}.preorder-dialog h2{font-size:20px}}
@media(max-width:1000px){.order-builder-section-title:has(.order-preorder-toggle){flex-wrap:wrap}.order-builder-actions{margin-left:0}.preorder-stats>div{min-width:140px;max-width:none}}
@media(max-width:550px){
  .order-builder-section-title:has(.order-builder-actions){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
  .order-builder-section-title:has(.order-builder-actions)>span{display:none}
  .order-builder-section-title:has(.order-builder-actions)>div:not(.order-builder-actions){min-width:0}
  .order-builder-section-title:has(.order-builder-actions) h3{font-size:12px;line-height:1.35;margin:0}
  .order-builder-section-title:has(.order-builder-actions) p{display:none}
  .order-builder-actions{gap:6px;margin-left:0}
  .order-builder-actions .order-preorder-toggle{padding:8px;font-size:10px;gap:5px}
  .order-builder-actions .order-preorder-toggle input{width:13px;height:13px;min-height:13px;margin:0}
  .order-builder-actions .order-ai-assist-button{padding:8px;font-size:10px;gap:5px;white-space:nowrap}
  .order-builder-actions .order-ai-assist-button small{display:none}
}
