.model-group-heading { grid-column: 1 / -1; padding: 14px 4px 5px; color: var(--text, inherit); }
.model-group-heading strong { font-size: 14px; font-weight: 650; }
.model-group-heading p { margin: 5px 0 0; color: var(--muted, #737b87); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.model-sort-group { border-top: 1px solid var(--border, #7b849733); padding: 12px 0; }
.model-sort-group-heading { display: flex; height: auto; min-height: 36px; margin: 0; border: 0; align-items: center; gap: 8px; padding: 0 2px 8px; }
.model-sort-group-heading strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.model-sort-group-heading span { color: var(--muted, #737b87); font-size: 12px; }
.model-sort-group-items { display: grid; gap: 6px; }
.model-sort-group .model-order-item { cursor: default; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
#modelGroupDialog textarea { resize: vertical; }
#modelOrderDialog { width:min(960px,calc(100vw - 32px)); max-width:960px; padding:0; }
#modelOrderDialog .dialog-heading { padding:18px 22px; margin:0; gap:14px; border-bottom:1px solid var(--border); }
#modelOrderDialog .dialog-heading h2 { margin:0; flex:1; font-size:18px; }
.model-order-header-actions { display:flex; gap:8px; flex-wrap:wrap; }
.model-order-workspace { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); min-height:360px; }
#modelOrderList { display:block; padding:0 18px; margin:0; max-height:65vh; overflow:auto; }
#modelOrderDetails { padding:22px; border-left:1px solid var(--border); min-width:0; }
#modelOrderDetails h3 { font-size:16px; margin:6px 0; overflow-wrap:anywhere; }
#modelOrderDetails p { overflow-wrap:anywhere; margin:0; }
.model-order-detail-prices { display:grid; gap:20px; padding:24px 0; }
.model-order-detail-prices strong { white-space:pre-wrap; overflow-wrap:anywhere; }
#modelOrderDetails .model-order-price { border:0; border-radius:0; padding:0; background:transparent; }
#modelOrderDialog .model-order-item { display:grid; grid-template-columns:28px minmax(0,1fr) 18px; gap:8px; padding:7px; margin:0; border:0; border-radius:4px; background:transparent; cursor:grab; }
#modelOrderDialog .model-order-item.selected { background:var(--soft,#edf7f5); box-shadow:inset 3px 0 var(--green,#168b80); }
.model-order-select { min-width:0; text-align:left; border:0; background:transparent; color:inherit; padding:6px 0; }
.model-order-select strong,.model-order-select small { display:block; overflow-wrap:anywhere; }
.model-order-select small { color:var(--muted); margin-top:3px; }
#modelOrderDialog .model-order-index { color:var(--muted); font-size:12px; }
#modelOrderDialog svg { width:16px; height:16px; }
#modelOrderPositionForm { margin-top:22px; }
#modelOrderPositionForm label { display:block; margin-bottom:8px; }
#modelOrderPositionForm>div { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#modelOrderPosition { width:72px; padding:7px; }
.model-order-status { border-top:1px solid var(--border); color:var(--muted); padding:12px 22px; font-size:12px; }
html.theme-dark #modelOrderDialog .model-order-item.selected { background:#243c39; }
@media(max-width:650px) { .model-order-workspace { grid-template-columns:1fr; } #modelOrderList { max-height:34vh; } #modelOrderDetails { border-left:0; border-top:1px solid var(--border); padding:16px; } .model-order-detail-prices { padding:14px 0; gap:12px; } #modelOrderDialog .dialog-heading { flex-wrap:wrap; padding:14px; } }
@media (max-width: 600px) { .model-sort-group .model-order-item { grid-template-columns: minmax(0, 1fr) auto; } .model-sort-group .model-order-prices { grid-column: 1 / -1; grid-row: 2; } }
#modelOrderDialog .dialog-heading { padding:12px 16px; flex-wrap:wrap; }
#modelOrderDialog .dialog-heading h2 { font-size:16px; min-width:80px; }
#modelOrderDialog .model-order-header-actions { gap:6px; align-items:center; }
#modelOrderDialog .model-order-header-actions button { min-height:32px; padding:5px 10px; }
#modelOrderDialog .model-order-header-actions .icon-button { width:32px; padding:6px; }
#modelOrderSelection { padding:8px 16px; background:var(--panel-2,#f3f6f8); color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
html.theme-dark #modelOrderSelection { background:#253238; }
#modelOrderDialog #modelOrderList { padding:0 16px 12px; max-height:65vh; }
#modelOrderDialog .model-sort-group { padding:10px 0 0; border:0; }
#modelOrderDialog .model-sort-group-heading { min-height:30px; padding:0; margin-bottom:5px; }
.model-order-group-select { display:flex; align-items:center; gap:8px; max-width:100%; min-width:0; padding:3px 6px; border:1px solid transparent; border-radius:4px; color:inherit; background:transparent; text-align:left; }
.model-order-group-select[aria-pressed="true"] { border-color:var(--green,#168b80); background:#edf8f4; }
html.theme-dark .model-order-group-select[aria-pressed="true"] { background:#243c39; }
#modelOrderDialog .model-sort-group-items { gap:0; }
#modelOrderDialog .model-order-item { display:block; padding:0; border-bottom:1px solid var(--border); border-radius:0; }
#modelOrderDialog .model-order-select { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.1fr); align-items:center; gap:12px; width:100%; padding:10px 8px; }
.model-order-identity { display:flex; align-items:baseline; gap:8px; min-width:0; }
#modelOrderDialog .model-order-identity strong { font-size:13px; }
.model-order-spec { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.model-order-row-prices { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:12px; min-width:0; }
.model-order-row-prices b { font-weight:500; color:var(--text,inherit); white-space:pre-wrap; overflow-wrap:anywhere; }
.model-order-row-prices .user-price b { color:var(--green,#168b80); }
#modelOrderDialog .model-order-status { padding:9px 16px; }
@media(max-width:600px) { #modelOrderDialog .model-order-select { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:5px 10px; } .model-order-identity { grid-column:1 / -1; } #modelOrderDialog .model-order-header-actions { margin-left:auto; } }
@media(pointer:coarse) { #modelOrderDialog .model-order-header-actions button { min-height:44px; } #modelOrderDialog .model-order-header-actions .icon-button { width:44px; } .model-order-group-select { min-height:44px; } }
#modelOrderDialog .model-order-group-select { width:100%; max-width:none; padding:6px 9px; background:#e9f0fb; color:#274f85; border-color:#cfddf1; }
#modelOrderDialog .model-sort-group-heading span { color:#47678f; }
#modelOrderDialog .model-order-item:nth-child(even) { background:#f4f7fb; }
#modelOrderDialog .model-order-item:hover { background:#eaf1fa; }
#modelOrderDialog .model-order-spec { color:#4a6077; }
#modelOrderDialog .model-order-row-prices > span { color:#52647a; }
#modelOrderDialog .model-order-row-prices b { color:#8a4b14; font-weight:600; }
#modelOrderDialog .model-order-row-prices .user-price b { color:#08785c; }
#modelOrderDialog .model-order-item.selected { background:#e0f4eb; box-shadow:inset 3px 0 #098260; }
#modelOrderDialog .model-order-group-select[aria-pressed="true"] { background:#d6eee5; border-color:#098260; color:#075c45; }
#modelOrderDialog .model-order-select:focus-visible, #modelOrderDialog .model-order-group-select:focus-visible { outline:2px solid #2975bd; outline-offset:-2px; }
html.theme-dark #modelOrderDialog .model-order-group-select { background:#293b53; color:#c3dbff; border-color:#405a7c; }
html.theme-dark #modelOrderDialog .model-sort-group-heading span { color:#b3c9e6; }
html.theme-dark #modelOrderDialog .model-order-item:nth-child(even) { background:#242e3a; }
html.theme-dark #modelOrderDialog .model-order-item:hover { background:#2d3c4d; }
html.theme-dark #modelOrderDialog .model-order-spec, html.theme-dark #modelOrderDialog .model-order-row-prices > span { color:#b6c5d7; }
html.theme-dark #modelOrderDialog .model-order-row-prices b { color:#f3c38d; }
html.theme-dark #modelOrderDialog .model-order-row-prices .user-price b { color:#7bdfb7; }
html.theme-dark #modelOrderDialog .model-order-item.selected, html.theme-dark #modelOrderDialog .model-order-group-select[aria-pressed="true"] { background:#203f37; color:#b1f1d6; box-shadow:inset 3px 0 #50c59a; }
