.order-form{display:flex;flex-direction:column;gap:18px}
.order-form h2{display:flex;align-items:center;gap:10px;font-size:17px;margin:0 0 6px;color:#3f2a24}
.order-form h2>span,.order-shared h3>span{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#792d30;color:#fff;font-size:13px;flex:none}
.order-shared h3{display:flex;align-items:center;gap:10px}
.order-restored{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-radius:10px;background:#fcf6ea;border:1px solid #efdcbc;color:#6c4f2c;font-size:14px}
.order-restored>span{display:flex;align-items:center;gap:8px}
.order-restored svg{width:18px;height:18px;flex:none}
.order-layout{display:grid;grid-template-columns:minmax(230px,320px) minmax(0,1fr);gap:18px;align-items:start}
.order-types-panel,.order-editor,.order-basket{background:#fff;border:1px solid #e6ded5;border-radius:14px;padding:18px;min-width:0}
.order-types-panel{position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:auto}
.order-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.order-type{position:relative;display:flex;flex-direction:column;gap:6px;padding:8px;border:1px solid #e4d4c9;border-radius:10px;background:#fff;color:#5f4a3f;text-align:left;cursor:pointer;min-width:0;font:inherit}
.order-type img,.order-type .type-placeholder,.order-item-thumb img,.order-item-thumb .type-placeholder{width:100%;height:78px;object-fit:contain;background:#faf6f1;border-radius:6px}
.order-type .type-placeholder,.order-item-thumb .type-placeholder{display:flex;align-items:center;justify-content:center;color:#af9280}
.order-type .type-placeholder svg{width:28px;height:28px}
.order-type-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.order-type-copy strong{font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.order-type-copy small{font-size:11px;color:#806a5c}
.order-type:hover{border-color:#c9a596}
.order-type:focus-visible{outline:2px solid #a74651;outline-offset:2px}
.order-type.active{border-color:#792d30;background:#fbefeb;box-shadow:inset 0 0 0 1px #792d30;color:#792d30}
.order-type-count{position:absolute;top:6px;right:6px;display:inline-flex;align-items:center;gap:2px;min-width:24px;height:24px;padding:0 6px;border-radius:12px;background:#2f7d4f;color:#fff;font-size:12px;justify-content:center;box-shadow:0 0 0 2px #fff}
.order-type-count svg{width:13px;height:13px}
.order-editor{display:flex;flex-direction:column;min-height:460px;padding:0;overflow:hidden}
.order-editor-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px;padding:40px 24px;color:#7a6458;background:#faf7f3}
.order-editor-empty svg{width:44px;height:44px;color:#b99886}
.order-editor-empty strong{font-size:16px;color:#4b3027}
.order-editor-empty p{max-width:360px;margin:0;line-height:1.6}
.order-editor-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid #eee3db;background:#fffaf6}
.order-editor-head small{color:#8b6f60;font-size:12px}
.order-editor-head h2{margin:0;font-size:18px;color:#792d30}
.order-editor-head h2:focus{outline:none}
.order-close{flex:none}
.order-editor-body{padding:18px;flex:1;min-height:0}
.order-editor-foot{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:12px 18px;border-top:1px solid #eee3db;background:#fffdfb;z-index:1}
.order-block{border:0;padding:0;margin:0 0 22px;min-width:0}
.order-block>legend{font-weight:700;font-size:15px;color:#3f2a24;margin-bottom:10px;padding:0}
.order-block .request-design-options{margin-bottom:12px}
.order-block .form-grid{margin-top:4px}
.order-gallery-wrap{margin-top:4px}
.order-gallery{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.order-gallery .template-card img{height:210px}
.order-file-list{font-size:13px;color:#6d564a;margin:8px 0 0;overflow-wrap:anywhere}
.order-file-list:empty{display:none}
.order-basket-empty{margin:8px 0 0;padding:16px;border-radius:10px;background:#faf7f3;color:#6f5a4e;line-height:1.6}
.order-items{display:flex;flex-direction:column;margin-top:8px}
.order-item{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:14px;align-items:start;padding:14px 0;border-top:1px solid #eee3db}
.order-item:first-child{border-top:0}
.order-item-thumb img,.order-item-thumb .type-placeholder{height:76px}
.order-item-info{min-width:0}
.order-item-info strong{display:block;font-size:15px;color:#3f2a24;overflow-wrap:anywhere}
.order-item-info p{margin:3px 0 0;font-size:13px;color:#6d564a;overflow-wrap:anywhere}
.order-item-info small{display:inline-flex;align-items:center;gap:5px;margin-top:4px;color:#7d6557}
.order-item-info small svg{width:14px;height:14px}
.order-item-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#85695b!important}
.order-item-actions{display:flex;gap:8px}
.order-item-actions .button{display:inline-flex;align-items:center;gap:6px}
.order-item-actions svg{width:15px;height:15px}
.order-actions{justify-content:flex-end}
.order-actions .save-state{flex:1;text-align:left;font-size:13px;color:#7d6557}
.order-chip{color:#792d30;font-weight:600}
.order-note{margin:0 0 10px;line-height:1.6}
.order-siblings{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.order-siblings li{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 0;border-top:1px solid #eee3db}
.order-siblings li:first-child{border-top:0}
.order-siblings li>span{color:#7d6557;font-size:13px;margin-right:auto}
.order-siblings li.current small{color:#792d30;font-size:12px}
@media(max-width:900px){
 .order-layout{grid-template-columns:1fr}
 .order-types-panel{position:static;max-height:none}
 .order-types{grid-template-columns:repeat(3,minmax(0,1fr))}
 .order-editor:not(.is-open){display:none}
 .order-editor.is-open{position:fixed;inset:0;z-index:150;border:0;border-radius:0;min-height:0}
 html:has(.order-editor.is-open){overflow:hidden}
 .order-editor-body{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .order-editor-foot{padding:10px 16px max(12px,env(safe-area-inset-bottom))}
 .order-editor-foot .button{flex:1;justify-content:center}
}
@media(max-width:600px){
 .order-types-panel,.order-basket{padding:14px}
 .order-types{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .order-type img,.order-type .type-placeholder{height:70px}
 .order-editor-head{padding:12px 14px}
 .order-editor-body{padding:14px}
 .order-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
 .order-gallery .template-card img{height:180px}
 .order-item{grid-template-columns:60px minmax(0,1fr)}
 .order-item-thumb img,.order-item-thumb .type-placeholder{height:60px}
 .order-item-actions{grid-column:1/-1}
 .order-item-actions .button{flex:1;justify-content:center}
 .order-restored .button{width:100%}
}
