@media(max-width:767px){
 #main-content .orders-page>.catalog-view-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin:0 0 16px;padding:4px;box-sizing:border-box;gap:4px}
 #main-content .orders-page>.catalog-view-switch>button{width:100%;min-height:40px;font-size:11px}
 #main-content .orders-page .retail-statusbar{grid-template-columns:minmax(0,.65fr) minmax(0,.95fr) minmax(0,1.05fr) minmax(0,1.2fr)}
 #main-content .orders-page[data-view][data-type] .orders-table,#main-content .orders-page[data-view][data-type] .orders-table tbody{display:block;width:100%;min-width:0;max-width:100%}
 #main-content .orders-page[data-view][data-type] .orders-table thead{display:none}
 #main-content .orders-page[data-view][data-type] .orders-table tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto auto auto;width:100%;box-sizing:border-box;gap:14px 16px;padding:16px;margin:0;border:0;border-bottom:1px solid #e4ecf3;border-radius:0;background:#fff;align-items:start}
 #main-content .orders-page[data-view][data-type] .orders-table tbody>tr:last-child{border-bottom:0}
 #main-content .orders-page[data-view][data-type] .orders-table tbody>tr.is-selected{background:var(--order-soft)}
 #main-content .orders-page[data-view][data-type] .orders-table td{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:0;margin:0;min-width:0;max-width:100%;border:0;text-align:start;line-height:1.9;font-size:11px;white-space:normal;overflow-wrap:anywhere}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]::before{display:block;content:attr(data-label);font-size:10px;line-height:1.6;color:#8a9dac;margin:0;font-weight:400}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-identity{grid-column:1/-1;grid-row:1;padding-bottom:12px;border-bottom:1px solid #edf2f6}
 #main-content .orders-page[data-view][data-type] .order-identity>div{display:flex;align-items:center;gap:10px;width:100%;min-width:0}
 #main-content .orders-page[data-view][data-type] .order-identity>div>span{display:flex;flex:1;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:5px;min-width:0;width:auto;overflow:visible}
 #main-content .orders-page[data-view][data-type] .order-identity strong{display:block;width:100%;font-size:12px;line-height:1.9;text-align:start;white-space:normal;overflow:visible;text-overflow:clip}
 #main-content .orders-page[data-view][data-type] .order-id{display:inline-flex;align-items:center;gap:6px;font-size:11px;line-height:1.8}
 #main-content .orders-page[data-view][data-type] .order-unread-label{margin:0;font-size:9px;padding:1px 5px}
 #main-content .orders-page[data-view][data-type] .order-demo-label{margin-inline-start:6px}
 #main-content .orders-page[data-view][data-type] input[data-order-select]{flex:none;width:18px;height:18px;margin:0}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label="اقلام"]{grid-column:1;grid-row:2}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-deadline{grid-column:2;grid-row:2;align-items:flex-end;text-align:end;align-self:start}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-deadline::before{content:"موعد تحویل"}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label="وضعیت"]{grid-column:1;grid-row:3}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-amount{grid-column:2;grid-row:3;align-items:flex-end;text-align:end;align-self:start}
 #main-content .orders-page[data-view][data-type] .orders-table td>small{display:block;margin:0;font-size:10px;line-height:1.8}
 #main-content .orders-page[data-view][data-type] .order-status{font-size:10px;line-height:1.7;padding:3px 7px}
 #main-content .orders-page[data-view][data-type] .order-amount .money{display:inline-flex;align-items:baseline;justify-content:flex-end;flex-wrap:wrap;gap:4px;font-size:13px}
 #main-content .orders-page[data-view][data-type] .order-amount .money small{font-size:9px}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-actions{grid-column:1/-1;grid-row:4;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding-top:12px;margin:0;border-top:1px solid #edf2f6}
 #main-content .orders-page[data-view][data-type] .order-actions>.btn{min-height:40px;padding:8px 12px;font-size:11px;line-height:1.8;white-space:normal;max-width:100%;width:auto;flex:0 1 auto}
 #main-content .orders-page[data-view][data-type] .order-actions>.order-details-link{min-height:40px;font-size:10px;line-height:1.8;white-space:nowrap;flex:none}
 #main-content .orders-page[data-view][data-type] .order-actions>.order-view-link,#main-content .orders-page[data-view][data-type] .order-actions>.order-details-link:only-child{width:100%;min-height:40px;justify-content:space-between;font-size:11px}
 #main-content .orders-page[data-view=list][data-type] .orders-table-wrap{border:1px solid #e4ecf3;border-radius:10px;background:#fff;overflow:visible}
 #main-content .orders-page[data-view=list][data-type] .orders-table tbody>tr{padding:14px;gap:11px 16px}
 #main-content .orders-page[data-view=full][data-type] .orders-table-wrap{background:transparent;border:0;overflow:visible}
 #main-content .orders-page[data-view=full][data-type] .orders-table tbody>tr{border:1px solid #e4ecf3;border-radius:12px;margin-bottom:14px;padding:18px;gap:16px}
 #main-content .orders-page[data-view=list][data-type] .order-identity .product-thumb{width:32px;height:38px;flex:none}
 #main-content .orders-page[data-view=full][data-type] .order-identity .product-thumb{width:40px;height:46px;flex:none}
}

.orders-open-filters{display:none}
.orders-filter-overlay .modal{max-width:480px}
.order-filter-hint{font-size:11px;line-height:1.9;color:#7a91a5;margin:0 0 20px}
.order-filter-fields{display:grid;gap:18px}
.order-filter-fields .field{margin:0}
.order-filter-dates{border:0;padding:0;margin:22px 0 0;min-width:0}
.order-filter-dates legend{font-size:12px;color:#48677e;margin-bottom:12px}
.order-filter-dates>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.order-filter-dates .field{min-width:0;margin:0}
.order-filter-dates input{min-width:0;width:100%;box-sizing:border-box}
.order-filter-error{color:#b24e4e;font-size:12px;line-height:1.9;margin-top:16px}
.orders-filter-overlay .modal-footer{display:flex;gap:12px}
.orders-filter-overlay .modal-footer .btn-primary{flex:1}
@media(max-width:767px){
 #main-content .orders-page{display:flex;flex-direction:column}
 #main-content .orders-page>.orders-catalog-tabs{order:0}
 #main-content .orders-page>.orders-controls{order:1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:14px}
 #main-content .orders-page .orders-controls>.search-field{grid-column:1;min-width:0;width:100%;margin:0}
 #main-content .orders-page .orders-controls>.search-field input{width:100%;min-width:0;font-size:12px}
 #main-content .orders-page .orders-open-filters{grid-column:2;display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:8px 10px;font-size:11px;white-space:nowrap}
 #main-content .orders-page .orders-open-filters .icon{width:15px;height:15px}
 #main-content .orders-page .orders-open-filters b{display:grid;place-items:center;min-width:19px;height:19px;border-radius:6px;background:var(--order-soft,#edf5fc);color:var(--order-accent,#286cae);font-size:10px}
 #main-content .orders-page .orders-filter-row,#main-content .orders-page .retail-statusbar>.field{display:none}
 #main-content .orders-page .orders-filter-chips{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px;margin:0}
 #main-content .orders-page>.retail-statusbar{order:2;display:block;padding-bottom:0;margin-bottom:8px}
 #main-content .orders-page .retail-status-shortcuts{display:flex;flex-wrap:nowrap;gap:6px}
 #main-content .orders-page .retail-status-shortcuts button{flex:1;min-width:0;min-height:40px;padding:8px 6px;font-size:11px;gap:5px}
 #main-content .orders-page>.catalog-view-switch{order:3}
 #main-content .orders-page>.orders-list-heading{order:4}
 #main-content .orders-page>.orders-bulk{order:5}
 #main-content .orders-page>.orders-table-wrap,#main-content .orders-page>section.panel{order:6}
 #main-content .orders-page>.orders-pagination{order:7}
 .orders-filter-overlay{padding:0;align-items:flex-end}
 .orders-filter-overlay .modal{width:100%;max-width:none;max-height:90dvh;border-radius:18px 18px 0 0;display:flex;flex-direction:column;overflow:hidden}
 .orders-filter-overlay .modal-header{flex:none;padding:18px}
 .orders-filter-overlay .modal-header .eyebrow{display:none}
 .orders-filter-overlay .modal-body{min-height:0;overflow-y:auto;padding:8px 18px 22px;overscroll-behavior:contain}
 .orders-filter-overlay .modal-footer{flex:none;padding:14px 18px calc(14px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4ecf3}
 .orders-filter-overlay .field select,.orders-filter-overlay .field input{font-size:16px;min-height:44px}
}

.orders-top-controls{display:contents}
@media(max-width:767px){
 #main-content .orders-page>.orders-top-controls{order:0;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;margin-bottom:16px;border-bottom:1px solid #e1e9f1}
 #main-content .orders-page .orders-top-controls>.orders-catalog-tabs{display:flex;flex:1;min-width:0;gap:12px;margin:0;border:0}
 #main-content .orders-page .orders-catalog-tabs>a{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:9px 1px 12px;white-space:nowrap;font-size:11px;border:0;color:#8195a6}
 #main-content .orders-page .orders-catalog-tabs>a.active{color:var(--order-accent);font-weight:650}
 #main-content .orders-page .orders-catalog-tabs>a.active::after{content:"";position:absolute;inset-inline:0;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--order-accent)}
 #main-content .orders-page .orders-catalog-tabs .orders-unread-count{min-width:16px;height:17px;padding:0 3px;font-size:9px}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch{display:flex;flex:none;width:auto;gap:2px;margin:0 0 6px;padding:3px;border-radius:7px}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch>button{width:32px;min-height:32px;padding:6px;gap:0}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch>button>span{display:none}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch .icon{width:15px;height:15px}
 #main-content .orders-page[data-view][data-type] .orders-table tbody>tr{grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:10px;padding:14px}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-identity{grid-column:1;grid-row:1;padding-bottom:10px}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]{display:grid;grid-template-columns:76px minmax(0,1fr);column-gap:12px;row-gap:2px;align-items:center;text-align:end;width:100%;align-self:start}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]::before{grid-column:1;grid-row:1;text-align:start;align-self:center;line-height:1.9}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]>*{grid-column:2;justify-self:end;text-align:end;max-width:100%;min-width:0;margin:0}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]>:first-child{grid-row:1}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label="اقلام"]{grid-column:1;grid-row:2}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-deadline{grid-column:1;grid-row:3}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label="وضعیت"]{grid-column:1;grid-row:4}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-amount{grid-column:1;grid-row:5}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-actions{grid-column:1;grid-row:6;padding-top:10px}
 #main-content .orders-page[data-view=full][data-type] .orders-table tbody>tr{padding:18px;gap:13px}
}

@media(min-width:768px){
 #main-content .orders-page{display:flex;flex-direction:column}
 #main-content .orders-page .orders-top-controls>.orders-catalog-tabs{order:0}
 #main-content .orders-page>.retail-statusbar{order:1}
 #main-content .orders-page>.orders-controls{order:2}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch{order:3;display:flex;width:max-content;margin:0 0 12px;margin-inline-start:auto}
 #main-content .orders-page>.orders-list-heading{order:4}
 #main-content .orders-page>.orders-bulk{order:5}
 #main-content .orders-page>.orders-table-wrap,#main-content .orders-page>section.panel{order:6}
 #main-content .orders-page>.orders-pagination{order:7}
}

.orders-clear-row{display:contents}
@media(max-width:767px){
 #main-content .orders-page .orders-filter-chips>.orders-clear-row{display:flex;flex-basis:100%;width:100%;justify-content:flex-start;margin-top:3px}
 #main-content .orders-page .orders-clear-row>[data-action="orders-clear"]{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 12px;border:1px solid #eed4cf;border-radius:7px;background:#fff2ef;color:#a25c50;font:inherit;font-size:11px;line-height:1.8;cursor:pointer}
 #main-content .orders-page .orders-clear-row>[data-action="orders-clear"]:hover{background:#fae5df;border-color:#dfb4aa}
 #main-content .orders-page .orders-clear-row>[data-action="orders-clear"]:focus-visible{outline:2px solid #b96e60;outline-offset:3px}
}

.order-field-value{display:contents}
@media(max-width:767px){
 #main-content .orders-page[data-view][data-type] .orders-table tbody>tr{padding:12px;gap:6px}
 #main-content .orders-page[data-view=full][data-type] .orders-table tbody>tr{padding:14px;gap:8px;margin-bottom:10px}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-identity{padding-bottom:8px;margin-bottom:2px}
 #main-content .orders-page[data-view][data-type] .order-identity>div>span{gap:2px}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]{grid-template-columns:68px minmax(0,1fr);column-gap:10px;row-gap:0;min-height:25px}
 #main-content .orders-page[data-view][data-type] .orders-table td[data-label]>.order-field-value{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:3px 7px;line-height:1.8}
 #main-content .orders-page[data-view][data-type] .order-field-value>strong{font-size:11px;font-weight:550}
 #main-content .orders-page[data-view][data-type] .order-field-value>small{display:inline;margin:0;font-size:10px;line-height:1.8}
 #main-content .orders-page[data-view][data-type] .orders-table td.order-actions{padding-top:8px;margin-top:3px;gap:8px}
 #main-content .orders-page[data-view][data-type] .order-actions>.btn{min-height:38px;padding:7px 10px}
 #main-content .orders-page[data-view][data-type] .order-actions>.order-details-link{min-height:38px}
}

@media(min-width:768px){.orders-page .order-field-value>small{display:block;font-size:10px;color:#8499aa;margin-top:2px}}

.orders-active-chips{display:contents}
@media(max-width:767px){
 #main-content .orders-page .orders-controls>.search-field{grid-row:1}
 #main-content .orders-page .orders-open-filters{grid-row:1}
 #main-content .orders-page .orders-filter-chips{display:contents}
 #main-content .orders-page .orders-active-chips{display:flex;flex-wrap:wrap;align-items:flex-start;align-self:start;grid-column:1;grid-row:2;min-width:0;gap:7px}
 #main-content .orders-page .orders-filter-chips>.orders-clear-row{display:flex;grid-column:2;grid-row:2;align-self:start;justify-content:stretch;flex-basis:auto;width:100%;margin:0}
 #main-content .orders-page .orders-clear-row>[data-action="orders-clear"]{width:100%;box-sizing:border-box;white-space:nowrap;min-height:34px;padding:6px 8px;font-size:10.5px}
}

@media(max-width:767px){
 #main-content .orders-page .retail-status-shortcuts button{position:relative;border:0;border-radius:0;background:transparent;color:#7a8fa1}
 #main-content .orders-page .retail-status-shortcuts button[aria-pressed=true]{background:transparent;border-color:transparent;color:var(--order-accent,#286cae);font-weight:600}
 #main-content .orders-page .retail-status-shortcuts button[aria-pressed=true]::after{content:"";position:absolute;bottom:0;inset-inline:6px;height:2px;border-radius:2px;background:var(--order-accent,#286cae)}
}

@media(min-width:768px){
 #main-content .orders-page .order-identity>div{align-items:center;gap:10px}
 #main-content .orders-page .order-identity>div>input[type=checkbox]{flex:none;align-self:center;margin:0}
 #main-content .orders-page .order-identity>div>span{align-items:flex-start;min-width:0;gap:5px}
 #main-content .orders-page .order-id{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;width:max-content;max-width:100%;direction:rtl;line-height:1.8}
 #main-content .orders-page .order-id .order-unread-label{margin:0}
 #main-content .orders-page>.orders-controls{padding:16px;border:1px solid #dfe8f1;border-radius:12px;background:#f8fafc}
 #main-content .orders-controls>.search-field{max-width:none;width:100%;margin:0 0 14px;min-height:42px;box-sizing:border-box}
 #main-content .orders-filter-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
 #main-content .orders-filter-row>.field{min-width:0;max-width:none;margin:0}
 #main-content .orders-filter-row>.field>span{position:static;width:auto;height:auto;margin:0 0 6px;overflow:visible;clip-path:none;font-size:11px;color:#617d94}
 #main-content .orders-filter-row .select-trigger{width:100%;background:#fff;min-height:42px}
 #main-content .orders-dates>summary{min-height:42px;white-space:nowrap;justify-content:space-between;box-sizing:border-box}
 #main-content .orders-filter-chips{margin-top:14px;padding-top:12px;border-top:1px solid #e5edf4;align-items:center;gap:8px}
 #main-content .orders-clear-row>[data-action=orders-clear]{background:#fff0ed;color:#a45b50;border:1px solid #efd8d2}
}

@media(min-width:768px){
 #main-content .orders-page{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:start}
 #main-content .orders-page>:not(.orders-top-controls){grid-column:1/-1}
 #main-content .orders-page .orders-top-controls>.orders-catalog-tabs{grid-column:1/-1;grid-row:1}
 #main-content .orders-page>.retail-statusbar{grid-column:1;grid-row:2;min-width:0;margin-bottom:12px;padding-bottom:0;border-bottom:0}
 #main-content .orders-page .orders-top-controls>.catalog-view-switch{grid-column:2;grid-row:2;align-self:start;margin:0;order:1}
 #main-content .orders-page>.orders-controls{grid-row:3}
 #main-content .orders-page>.orders-list-heading{grid-row:4}
 #main-content .orders-page>.orders-bulk{grid-row:5}
 #main-content .orders-page>.orders-table-wrap,#main-content .orders-page>section.panel{grid-row:6}
 #main-content .orders-page>.orders-pagination{grid-row:7}
}
