/* Native lists retain the compact legacy column layout and wrap controls at narrow widths. */
.local-orders{padding:18px 24px;color:#333}
.local-orders h3{font-size:22px;font-weight:400;line-height:30px;margin:0 0 15px}
.list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.list-heading h3{margin:0}
.list-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 14px}
.list-filters,.list-actions,.list-search{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.list-actions{margin-left:auto}
.list-search{margin-left:auto}
.list-toolbar input,.list-toolbar select{margin:0;height:30px;box-sizing:border-box}
.list-toolbar input[type=search]{width:180px}
.list-toolbar .btn{margin:0;min-height:30px;box-sizing:border-box}
.list-filters .btn.active{background:#147bab;color:#fff;text-shadow:none;border-color:#126d98;box-shadow:none}
.list-dealer{display:inline-block;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 9px;border:1px solid #ccc;border-radius:3px;background:#fff;font-size:12px}
.list-table-scroll{width:100%;overflow:auto;border:1px solid #ddd;border-radius:3px;background:#fff}
.parity-table{font-size:12px;line-height:18px;border:0;margin:0;width:100%;min-width:1040px;border-collapse:collapse}
.parity-table th{background:#dedede;font-weight:600;white-space:nowrap;text-align:left;border-top:0;color:#333}
.parity-table th,.parity-table td{padding:7px 8px;vertical-align:middle;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc}
.parity-table tbody tr:last-child td{border-bottom:0}
.parity-table input[type=checkbox]{margin:0;vertical-align:middle;width:15px;height:15px;accent-color:#147bab}
.parity-table .btn-link{font-size:12px;line-height:18px;margin:0;padding:0;text-align:left;color:#1475a4;white-space:normal}
.list-status{display:inline-block;border-radius:3px;padding:2px 6px;font-size:11px;line-height:15px;font-weight:600;background:#e9edf0;color:#39444b;white-space:nowrap;margin:2px 3px 2px 0}
.status-status_new{background:#468847;color:#fff}
.status-status_complete,.status-pending{background:#b85f00;color:#fff}
.status-status_complete_viewed{background:#25384b;color:#fff}
.status-active,.status-approved{background:#468847;color:#fff}
.status-status_complete_closed,.status-inactive{background:#e7e7e7;color:#555}
.status-status_rejected{background:#f8dddd;color:#892b2b}
.status-status_complete_sms_sent,.status-status_complete_email_sent,.status-status_complete_sms_email_sent,.status-status_sent{background:#666;color:#fff}
.list-row-actions{min-width:105px}
.list-row-actions .btn{font-size:11px;margin:2px 3px 2px 0;white-space:nowrap}
.list-unavailable{color:#777}
.list-pagination{margin:12px 0;justify-content:flex-end;display:flex;align-items:center;gap:6px;font-size:12px}
.list-pagination>span{margin-right:auto;color:#666}
.list-empty{padding:18px;text-align:center;background:#fafafa;color:#666}
.user-editor .form-horizontal{max-width:760px}
.status-confirmed{background:#377d22;color:#fff}.status-unconfirmed{background:#c62828;color:#fff}.status-approved{background:#888;color:#fff}
.user-status-tabs{display:flex;gap:0}.user-status-tabs .btn{border-radius:0}.user-status-tabs .btn.active{background:#e5e5e5;color:#333;border-color:#ccc;box-shadow:inset 0 1px 3px #0002}.list-filters select[hidden]{display:none}
.assignment-editor{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:24px}.assignment-editor legend{grid-column:1/-1;margin-bottom:0}.assignment-group input[type=search]{width:100%;box-sizing:border-box;height:32px}.assignment-choices{max-height:200px;overflow:auto;border:1px solid #ccc;padding:10px}.assignment-choices label{display:block}.assignment-choices label[hidden]{display:none}.user-role-help{grid-column:1/-1;background:#f0f0f0;border-radius:4px;padding:12px}.user-role-help summary{cursor:pointer;font-weight:bold}.user-role-help p{margin:10px 0 0}@media(max-width:600px){.assignment-editor{grid-template-columns:1fr}}
.user-editor .controls{margin-left:0}
.user-editor fieldset{margin:20px 0;padding:16px;border:1px solid #ddd;border-radius:3px}
.user-editor legend{font-size:16px;width:auto;padding:0 6px;margin:0;border:0}
.user-editor fieldset>div{display:inline-block;vertical-align:top;min-width:230px;max-width:100%;padding:0 12px 0 0;box-sizing:border-box}
.user-editor fieldset h4{font-size:14px}
.user-editor .control-group{display:grid;grid-template-columns:160px minmax(180px,400px);gap:14px}
.user-editor .control-label{padding-top:5px;text-align:right}
.user-editor .controls input{width:100%;height:32px;box-sizing:border-box}
@media(max-width:767px){.local-orders{padding:14px 12px}.list-actions,.list-search{margin-left:0}.list-toolbar{align-items:flex-start}.list-filters{width:100%}.list-heading h3{font-size:20px}.user-editor .control-group{display:block}.user-editor .control-label{text-align:left}.user-editor .controls{width:100%}}

.order-date-filter{flex-basis:100%;margin:8px 0}.order-date-filter summary{cursor:pointer}.order-date-fields{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:10px 0}.order-date-fields label{display:block}.order-date-fields .control-group{margin:0}
/* RC order-list geometry; scoped so user tables, RO details and editors are unchanged. */
.local-orders.order-list-mode{box-sizing:border-box;width:calc(100% - 40px);max-width:1170px;margin:0 auto;padding:10px 0 0;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px}
.order-list-mode .list-toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:0;margin:0;min-height:32px}
.order-list-mode .list-toolbar h3{flex:0 0 168px;font-size:20px;font-weight:700;line-height:28px;margin:0 16px 0 0;white-space:nowrap}
.order-list-mode .list-filters{display:flex;flex-wrap:nowrap;gap:0}
.order-list-mode .list-filters>.btn{border-radius:0;min-height:32px;padding:5px 12px;font-size:14px;line-height:20px;border:1px solid #ccc;background:#f5f5f5;color:#333;box-shadow:none;text-shadow:none;margin-left:-1px;white-space:nowrap}
.order-list-mode .list-filters>.btn:first-child{margin-left:0}
.order-list-mode .list-filters>.btn.active{background:#e5e5e5;color:#333;box-shadow:inset 0 1px 3px #0002;border-color:#ccc}
.order-list-mode .list-dealer{margin-left:16px;padding:5px 8px;min-height:30px;max-width:170px;box-sizing:border-box;font-size:14px;line-height:20px;border-radius:4px}
.order-list-mode .list-actions{flex-wrap:nowrap;gap:10px;margin-left:auto;padding-left:12px}
.order-list-mode .list-actions .btn{white-space:nowrap;font-size:14px;line-height:20px;padding:5px 12px;min-height:32px}
.order-list-mode .order-result-count{font-size:14px;line-height:20px;margin:15px 0 4px;color:#333}
.order-list-mode .list-table-scroll{border:0;border-radius:0}
.order-list-mode .parity-table{font-size:14px;line-height:20px;min-width:1100px;border:1px solid #ccc;margin:0}
.order-list-mode .parity-table th{height:42px;box-sizing:border-box;padding:10px 5px;background:#e8e8e8;font-weight:700}
.order-list-mode .parity-table td{padding:5px;line-height:20px;vertical-align:middle;box-sizing:border-box;height:31px}
.order-list-mode .parity-table th,.order-list-mode .parity-table td{border:1px solid #ccc}
.order-list-mode .parity-table td:nth-child(2){white-space:nowrap}
.order-list-mode .parity-table .btn-link{font-size:14px;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}
.order-list-mode .parity-table .btn-link:hover{text-decoration:underline}
.order-list-mode .parity-table input[type=checkbox]{width:13px;height:13px;vertical-align:middle}
.order-list-mode .list-status{padding:2px 4px;margin:0 2px 0 0;font-size:11px;line-height:14px}
.order-list-mode .list-product-status{display:flex;align-items:center;gap:2px;flex-wrap:wrap}
.order-list-mode .list-pagination{margin-top:12px;font-size:14px}
.order-list-mode .order-advanced-panel[hidden]{display:none!important}
.order-list-mode .order-advanced-panel{margin:12px 0;padding:12px 16px;border:1px solid #ccc;border-radius:4px;background:#fff}
.order-list-mode .order-advanced-panel h4{margin:0 0 12px;font-size:16px}
.order-list-mode .order-extra-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.order-list-mode .order-advanced-form .list-search{margin:0;justify-content:flex-start}
.order-list-mode .order-advanced-form input[type=search]{width:min(100%,420px);box-sizing:border-box;height:30px}
.order-list-mode .order-date-filter{margin:12px 0}
@media(max-width:1199px){.local-orders.order-list-mode{width:calc(100% - 40px)}.order-list-mode .list-toolbar{flex-wrap:wrap;row-gap:10px}.order-list-mode .list-toolbar h3{flex-basis:auto}.order-list-mode .list-actions{margin-left:auto}}
@media(max-width:767px){.local-orders.order-list-mode{width:calc(100% - 24px)}.order-list-mode .list-toolbar{align-items:flex-start}.order-list-mode .list-filters{width:auto;flex-wrap:wrap}.order-list-mode .list-dealer{margin-left:8px}.order-list-mode .list-actions{margin-left:0;padding-left:0}.order-list-mode .parity-table{min-width:1040px}}
/* Advanced search belongs to the global header, overlaid without reflowing result rows. */
.order-list-mode .order-advanced-panel{position:fixed;top:5px;right:72px;width:min(368px,calc(100vw - 24px));max-height:calc(100vh - 20px);overflow:auto;box-sizing:border-box;z-index:1100;margin:0;padding:12px;background:#9e9fa1;color:#fff;border:1px solid #929395;border-radius:4px;box-shadow:0 2px 5px #0003}
.order-list-mode .order-advanced-panel h4{font-size:14px;margin:0 0 8px}
.order-list-mode .order-advanced-panel .order-date-filter{margin:8px 0}
.order-list-mode .order-advanced-panel .order-date-fields{gap:6px;padding:6px 0}
.order-list-mode .order-advanced-panel .order-date-fields .control-group{width:calc(50% - 3px)}
.order-list-mode .order-advanced-panel .order-date-fields input{width:100%;height:28px;box-sizing:border-box}
.order-list-mode .order-advanced-panel .order-extra-filters{gap:4px;margin-bottom:6px}
.order-list-mode .order-advanced-panel .list-search{gap:4px;flex-wrap:nowrap}
.order-list-mode .order-advanced-panel .list-search input{min-width:0;flex:1}
.order-list-mode .order-advanced-panel .btn{font-size:12px;padding:3px 7px;line-height:20px}
.order-list-mode .order-advanced-panel select{max-width:235px;font-size:12px;height:28px;margin:0}
.order-list-mode .order-advanced-panel summary{color:#fff}
@media(max-width:767px){.order-list-mode .order-advanced-panel{right:12px}}

/* Keep wide results inside the viewport, with a reachable scrollbar and pager. */
.local-orders.order-list-mode{min-width:0;max-width:calc(100vw - 40px);width:calc(100% - 40px)}
.order-list-mode .list-table-scroll{max-width:100%;min-width:0;max-height:calc(100vh - 240px);overflow:auto;scrollbar-gutter:stable}
.order-list-mode .parity-table th{position:sticky;top:0;z-index:1}
.order-list-mode .parity-table td{overflow-wrap:anywhere}
.order-list-mode .parity-table td:nth-child(4) .btn-link{white-space:normal;overflow-wrap:anywhere}
.order-list-mode .list-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin:8px 0}

.order-list-mode .order-visible-date-filter{display:flex;justify-content:flex-end;margin:8px 0;padding:0;border:0;background:none}
.order-visible-date-filter .order-date-fields{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.order-visible-date-filter .order-date-fields label{display:flex;align-items:center;gap:5px;margin:0;font-size:12px}
.order-visible-date-filter input[type=date]{width:135px;height:28px;box-sizing:border-box;margin:0}
.order-list-mode:has(.order-visible-date-filter) .list-table-scroll{max-height:calc(100vh - 280px)}

/* Compact date controls share the existing status toolbar. */
.order-list-mode .list-toolbar .order-visible-date-filter{display:flex;flex:0 0 auto;margin:0 0 0 16px;padding:0}
.order-list-mode .list-toolbar .order-date-fields{gap:6px;flex-wrap:nowrap;align-items:center}
.order-list-mode .list-toolbar .order-date-fields .control-group{display:flex;align-items:center;gap:4px;margin:0}
.order-list-mode .list-toolbar .order-date-fields label{display:inline;margin:0;font-size:12px}
.order-list-mode .list-toolbar .order-date-fields input[type=date]{width:125px;height:28px;margin:0}
.order-list-mode:has(.order-visible-date-filter) .list-table-scroll{max-height:calc(100vh - 240px)}
