.orders-workspace { display:flex; flex-direction:column; gap:10px; min-height:0; color:var(--admin-ink); font-size:13px; }
.orders-workspace *, .orders-workspace *::before, .orders-workspace *::after { box-sizing:border-box; }
.orders-workspace :is(button,a) { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:34px; padding:6px 10px; border:1px solid var(--admin-line); border-radius:6px; color:var(--admin-ink); background:#fff; font-weight:650; font-size:12px; text-decoration:none; line-height:1.3; }
.orders-workspace :is(button,a):hover { border-color:var(--admin-accent); background:#f1edfa; }
.orders-workspace :is(button,a,input,select,textarea):focus-visible { outline:3px solid #7657c9; outline-offset:2px; }
.orders-workspace button.primary { color:#fff; background:var(--admin-accent); border-color:var(--admin-accent); }
.orders-workspace button:disabled { cursor:not-allowed; opacity:.5; }
.orders-workspace :is(input,select,textarea) { min-width:0; width:100%; min-height:34px; padding:6px 8px; border:1px solid var(--admin-line); border-radius:5px; background:#fff; color:var(--admin-ink); font:inherit; }
.orders-workspace textarea { resize:vertical; min-height:54px; }
.orders-workspace label { display:grid; gap:4px; color:var(--admin-muted); font-size:11px; font-weight:650; }
.orders-workspace small { font-size:11px; color:var(--admin-muted); }
.orders-workspace-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.orders-sections { display:flex; gap:4px; }
.orders-sections button { min-height:38px; }
.orders-sections button[aria-current] { color:#fff; background:var(--admin-accent); border-color:var(--admin-accent); }
.orders-sections span { padding:2px 6px; border-radius:10px; background:#0001; font-size:11px; }
.orders-search { flex:1; min-width:170px; }
.orders-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(115px,1fr)); gap:8px; align-items:end; padding:10px; background:#fff; border:1px solid var(--admin-line); border-radius:7px; }
.orders-bulk { max-height:200px; overflow:auto; }
.orders-master-detail { display:grid; grid-template-columns:245px minmax(0,1fr); flex:1; min-height:0; border:1px solid var(--admin-line); border-radius:9px; overflow:hidden; background:var(--admin-panel); }
.orders-records { display:flex; flex-direction:column; min-height:0; min-width:0; border-right:1px solid var(--admin-line); background:#f4f2f7; }
.orders-records > header { display:flex; justify-content:space-between; gap:8px; padding:12px; border-bottom:1px solid var(--admin-line); }
.orders-record-scroll { overflow:auto; min-height:0; }
.orders-record-scroll > button { display:flex; width:100%; justify-content:space-between; align-items:start; gap:8px; text-align:left; padding:11px 12px; border:0; border-bottom:1px solid var(--admin-line); border-radius:0; background:transparent; }
.orders-record-scroll > button.selected { box-shadow:inset 3px 0 var(--admin-accent); background:#e9e2f8; }
.orders-record-scroll > button > span { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.orders-record-scroll > button > span:last-child { text-align:right; flex:none; }
.orders-record-scroll b { font-variant-numeric:tabular-nums; }
.orders-detail { display:flex; flex-direction:column; min-width:0; min-height:0; }
.orders-detail-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 16px 8px; }
.orders-detail-heading h2 { font-size:19px; margin:2px 0 0; font-family:inherit; }
.orders-total { display:grid; gap:3px; text-align:right; }
.orders-total strong { font-size:21px; font-variant-numeric:tabular-nums; }
.orders-total span { font-size:11px; font-weight:750; }
.orders-total .paid { color:#27673f; }.orders-total .declined { color:#aa3830; }
.orders-customer { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:0 16px 10px; }
.orders-customer > div:first-child { display:grid; gap:2px; min-width:0; overflow-wrap:anywhere; }
.orders-customer > div:last-child { display:flex; gap:6px; align-items:center; flex-shrink:0; }
.orders-customer span { font-size:12px; color:var(--admin-muted); }
.orders-detail-tabs { display:flex; padding:0 12px; gap:4px; border-bottom:1px solid var(--admin-line); }
.orders-detail-tabs button { border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; min-height:37px; }
.orders-detail-tabs button[aria-current] { border-bottom-color:var(--admin-accent); color:var(--admin-accent); }
.orders-detail-scroll { overflow:auto; min-height:0; padding:12px; }
.orders-overview-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:10px; align-items:start; }
.orders-column { display:grid; gap:10px; min-width:0; }
.orders-card { min-width:0; padding:12px; border:1px solid var(--admin-line); border-radius:7px; background:#fff; }
.orders-card h3 { margin:0 0 10px; color:var(--admin-ink); font-family:inherit; font-size:13px; font-weight:750; line-height:1.3; }
.orders-card p { margin:8px 0; font-size:12px; line-height:1.45; overflow-wrap:anywhere; }
.orders-card label + label { margin-top:8px; }
.orders-card > button { margin-top:8px; }
.orders-item { display:flex; justify-content:space-between; gap:12px; padding:7px 0; border-bottom:1px solid #eeeaf2; }
.orders-item > div { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.orders-item strong { font-size:12px; }.orders-item b { flex:none; }
.orders-totals { display:grid; gap:4px; margin:9px 0 0; }
.orders-totals > div { display:flex; justify-content:space-between; gap:8px; font-size:12px; }
.orders-totals > div:last-child { padding-top:5px; border-top:1px solid var(--admin-line); font-weight:750; }
.orders-workspace dd { margin:0; }.orders-totals dt { color:var(--admin-muted); }
.orders-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; margin:0 0 8px; }
.orders-facts dt { color:var(--admin-muted); font-size:10px; margin-bottom:3px; }.orders-facts dd { font-size:12px; overflow-wrap:anywhere; }
.orders-inline-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:9px; }
.orders-security-actions { display:flex; flex-wrap:wrap; gap:6px; }
.orders-help { display:block; color:var(--admin-muted); font-size:11px !important; line-height:1.45; }
.orders-warning,.orders-feedback { margin:0 0 10px; padding:8px 10px; background:#fff0d5; color:#674611; border-radius:5px; font-size:12px; line-height:1.4; }
.orders-feedback { margin:8px 12px 0; background:#e7f3ed; color:#1c5b3a; }.orders-feedback.error { background:#fbe8e5; color:#852d24; }
.orders-empty { padding:22px; color:var(--admin-muted); line-height:1.5; }
.orders-reference { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-top:1px solid var(--admin-line); }
.orders-reference > span { display:grid; gap:3px; min-width:0; }.orders-reference code { overflow-wrap:anywhere; user-select:all; font-size:12px; }
.orders-reference button { flex-shrink:0; }
.orders-ticket { display:flex; justify-content:space-between; align-items:start; gap:12px; padding:10px 0; border-bottom:1px solid var(--admin-line); }
.orders-ticket > div { display:grid; min-width:0; gap:5px; }.orders-ticket > div:last-child { flex-shrink:0; }
.orders-ticket code { overflow-wrap:anywhere; font-size:11px; }
.orders-workspace .admin-order-characters { margin:0!important; padding:10px; }.orders-workspace .admin-order-characters h2 { font-size:14px; }
.orders-workspace .character-preview-list { background:#fff; min-width:0; border-radius:7px; }
.orders-workspace .character-preview-list > header { flex-wrap:nowrap; gap:6px; }
.orders-workspace .character-preview-list > header button { min-height:28px; padding:4px 7px; font-size:11px; }
.order-character-thumbnail { margin:10px 0 0; min-width:0; }
.orders-workspace .order-character-thumbnail > a { display:block; min-height:0; padding:0; border:0; background:#181020; border-radius:7px; overflow:hidden; }
.orders-workspace .order-character-thumbnail > a[hidden] { display:none; }
.order-character-thumbnail img { display:block; width:100%; height:264px; object-fit:contain; }
.order-character-thumbnail figcaption { display:grid; gap:3px; margin-top:7px; overflow-wrap:anywhere; }
.order-character-thumbnail figcaption strong { font-size:12px; }
.order-character-thumbnail figcaption span { color:var(--admin-muted); font-size:11px; }
.character-preview-empty { display:grid; min-height:110px; padding:14px; place-items:center; text-align:center; border-radius:7px; background:#f1edf7; color:var(--admin-muted); }
.player-assignment { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:7px; font-size:12px; }
.player-faction { padding:4px 7px; border-left:4px solid var(--player-color); border-radius:4px; color:#241d30; background:var(--player-paper); font-weight:700; }
.player-group-name { color:var(--admin-muted); overflow-wrap:anywhere; }
.order-character-thumbnail .player-assignment { display:grid; gap:4px; }
.player-assignment-dialog { margin:auto; width:min(480px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); overflow:auto; padding:20px; border:1px solid #c9bfd8; border-radius:12px; color:#241d30; background:#fff; box-shadow:0 20px 80px #0005; }
.player-assignment-dialog::backdrop { background:#11112499; }
.player-assignment-dialog header { display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:20px; }
.orders-workspace .player-assignment-dialog h2 { margin:0; font-family:inherit; font-size:21px; font-weight:700; line-height:1.3; }
.player-assignment-dialog p { margin:6px 0 16px; }
.player-assignment-dialog form { display:block; }
.player-assignment-dialog label { font-size:13px; }
.player-assignment-dialog select { min-height:42px; }
.player-assignment-dialog footer { display:flex; gap:8px; margin-top:20px; }
.player-assignment-dialog .assignment-help { color:#655d70; font-size:12px; line-height:1.5; }
.assignment-success { padding:10px; color:#155239; background:#e9f6ee; }
.assignment-error { padding:10px; color:#832a22; background:#fff0ed; }
.assignment-error button { margin-top:8px; }
.player-groups-workspace { display:flex; flex:1; flex-direction:column; min-height:0; gap:12px; padding:12px; background:#f9f8fc; border-radius:9px; }
.player-groups-workspace > header { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.player-groups-workspace > header > div { flex:1; }
.player-groups-workspace h2 { margin:0; font-size:19px; }
.player-groups-workspace p { margin:5px 0; color:var(--admin-muted); line-height:1.5; }
.player-groups-grid { display:grid; grid-template-columns:235px minmax(0,1fr); flex:1; min-height:0; border:1px solid var(--admin-line); border-radius:9px; overflow:hidden; background:#fff; }
.player-groups-sidebar { padding:12px; overflow:auto; background:#f4f2f7; border-right:1px solid var(--admin-line); }
.player-groups-sidebar form { display:grid; gap:8px; padding-bottom:14px; }
.player-groups-sidebar nav { display:grid; gap:4px; margin-top:8px; }
.player-groups-sidebar nav button { justify-content:space-between; text-align:left; min-height:42px; overflow-wrap:anywhere; }
.player-groups-sidebar nav button[aria-pressed=true] { color:#fff; background:var(--admin-accent); }
.player-roster { display:flex; flex-direction:column; min-height:0; min-width:0; }
.player-roster > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border-bottom:1px solid var(--admin-line); }
.player-roster-scroll { overflow:auto; min-height:0; }
.player-roster-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; border-bottom:1px solid var(--admin-line); }
.player-roster-row > div:first-child { display:grid; justify-items:start; min-width:0; gap:4px; overflow-wrap:anywhere; }
.player-roster-row .player-assignment { justify-content:end; max-width:70%; }
@media(min-width:1200px) { .order-character-thumbnail img { height:210px; } }
@media(max-width:760px) {
  .player-groups-workspace > header > div { flex-basis:100%; }.player-groups-workspace > header > label { flex:1; }
  .player-groups-grid { display:block; }.player-groups-sidebar { border-right:0; }.player-groups-sidebar nav { max-height:220px; overflow:auto; }
  .player-roster-row { align-items:start; }.player-roster-row .player-assignment { display:grid; max-width:56%; }
  .player-roster > header { flex-wrap:wrap; }.player-roster > header label { width:100%; }
}
@media(min-width:1200px) {
  .orders-overview-grid.with-characters { grid-template-columns:minmax(150px,.66fr) minmax(0,1fr) minmax(0,1fr); }
}
@media(min-width:761px) and (max-width:1199px) {
  .orders-overview-grid.with-characters > .character-preview-list { grid-column:1 / -1; display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:10px; }
  .orders-overview-grid.with-characters > .character-preview-list > header { grid-column:1 / -1; }
  .order-character-thumbnail img { height:210px; }
}
@media(min-width:1100px) {
  .module-orders .admin-console-main { height:100dvh; min-height:0; display:flex; flex-direction:column; }
  .module-orders .admin-console-content { flex:1; min-height:0; padding:12px; display:flex; flex-direction:column; }
  .orders-workspace { flex:1; min-height:0; }
}
@media(max-width:1099px) {
  .orders-master-detail { grid-template-columns:210px minmax(0,1fr); }
  .orders-overview-grid { grid-template-columns:minmax(0,1fr); }
  .orders-record-scroll { max-height:650px; }
}
@media(max-width:760px) {
  .orders-workspace :is(button,a,input,select) { min-height:44px; }
  .orders-master-detail { display:flex; flex-direction:column; }
  .orders-records { border-right:0; border-bottom:1px solid var(--admin-line); }
  .orders-record-scroll { max-height:180px; }
  .orders-sections { width:100%; }.orders-sections button { flex:1; }
  .orders-search { flex-basis:65%; }.orders-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .orders-detail-heading,.orders-customer { padding-inline:10px; }
  .orders-customer { flex-wrap:wrap; }.orders-detail-tabs { padding-inline:4px; gap:0; flex-wrap:wrap; }
  .orders-detail-tabs button { padding-inline:8px; }.orders-detail-scroll { padding:8px; }
  .orders-ticket { flex-direction:column; }.orders-ticket > div:last-child { display:flex; flex-wrap:wrap; }
  .orders-reference { flex-wrap:wrap; }.orders-reference button { flex-shrink:1; }
}
