/* Shared order surfaces: one visual rhythm for the hall and order details. */
.main-content > .order-center-page,
.main-content > .external-orders-view,
.main-content > div:has(> .orders-table-wrap) {
  width: 100%;
  margin: 0;
}

.main-content > .order-center-page {
  padding-bottom: 24px;
}

.main-content > .order-center-page .toolbar-panel,
.main-content > div:has(> .orders-table-wrap) > .filter-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  border-color: #dfe6f1;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.main-content > .order-center-page .list-panel,
.main-content > div:has(> .orders-table-wrap) > .orders-table-wrap {
  border-color: #dfe6f1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.main-content > .order-center-page .order-table th,
.main-content > div:has(> .orders-table-wrap) .orders-table th {
  background: #f7f9fc;
  color: #475569;
}

.main-content > .order-center-page .detail-layout {
  align-items: stretch;
}

.main-content > .order-center-page .detail-left-panel,
.main-content > .order-center-page .detail-side-panel {
  border-color: #e2e8f0;
  background: #fff;
}

.canonical-order-hall {
  width: 100%;
  margin: 0;
  padding: 8px 0 24px;
  color: #172033;
}

.order-surface-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.order-surface-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.order-surface-heading h1 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.2;
}

.order-surface-heading p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
}

.order-surface-heading__actions,
.order-filter-actions,
.order-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.surface-button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #d7deea;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.surface-button:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
}

.surface-button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.surface-button--primary {
  border-color: #3157c8;
  background: #3157c8;
  color: #fff;
}

.surface-button--primary:hover:not(:disabled) {
  border-color: #2646a8;
  background: #2646a8;
}

.surface-button--block {
  width: 100%;
}

.order-filter-panel,
.order-table-shell,
.order-card,
.order-surface-toolbar,
.order-pagination {
  border: 1px solid #e1e7f0;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .045);
}

.order-filter-panel {
  padding: 16px;
  border-radius: 8px;
}

.order-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.order-filter-grid label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.order-filter-grid input,
.order-filter-grid select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d7deea;
  border-radius: 5px;
  background: #fff;
  color: #1e293b;
  outline: 0;
  font-size: 13px;
}

.order-filter-grid input:focus,
.order-filter-grid select:focus {
  border-color: #5272d3;
  box-shadow: 0 0 0 3px rgba(49, 87, 200, .12);
}

.order-surface-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 11px 14px;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.order-surface-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.order-surface-toolbar strong {
  color: #0f172a;
  font-size: 14px;
}

.order-surface-toolbar span {
  color: #94a3b8;
  font-size: 12px;
}

.order-view-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #d7deea;
  border-radius: 5px;
}

.order-view-switch button {
  min-width: 56px;
  height: 28px;
  border: 0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
}

.order-view-switch button + button {
  border-left: 1px solid #d7deea;
}

.order-view-switch button.is-active {
  background: #eef2ff;
  color: #3157c8;
  font-weight: 700;
}

.order-table-shell {
  overflow: auto;
  min-height: 520px;
  border-radius: 0 0 8px 8px;
}

.order-table {
  min-width: 980px;
}

.order-table th {
  height: 42px;
  padding: 0 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-table td {
  height: 58px;
  padding: 8px 12px;
  border-top: 1px solid #edf1f6;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.order-table tbody tr:hover {
  background: #fbfdff;
}

.order-id-cell {
  color: #3157c8;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.order-game,
.order-subline {
  display: block;
}

.order-game {
  color: #1e293b;
  font-weight: 700;
}

.order-subline {
  max-width: 240px;
  margin-top: 3px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-price {
  color: #b45309;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.order-date-cell {
  min-width: 104px;
}

.order-date-value {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.order-date-value strong {
  color: #334155;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.order-date-value small {
  color: #94a3b8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-status--warning { background: #fff7ed; color: #c2410c; }
.order-status--primary { background: #eff6ff; color: #1d4ed8; }
.order-status--success { background: #ecfdf5; color: #047857; }
.order-status--muted { background: #f1f5f9; color: #64748b; }

.order-surface-error {
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 13px;
}

.order-surface-empty {
  padding: 56px 20px !important;
  color: #94a3b8 !important;
  text-align: center;
}

.order-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
}

.order-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.order-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
}

.order-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-card h3 {
  margin: 0;
  color: #1e293b;
  font-size: 16px;
}

.order-card__content {
  min-height: 36px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.order-card__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.order-card__meta div {
  padding: 9px 10px;
  border-radius: 5px;
  background: #f8fafc;
}

.order-card__meta dt {
  color: #94a3b8;
  font-size: 11px;
}

.order-card__meta dd {
  margin: 5px 0 0;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 1000px) {
  .order-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filter-actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .order-surface-heading { display: block; }
  .order-surface-heading__actions { margin-top: 14px; }
  .order-filter-grid { grid-template-columns: 1fr; }
  .order-surface-toolbar, .order-pagination { align-items: flex-start; flex-direction: column; }
  .order-pagination { gap: 10px; }
  .order-table-shell { min-height: 430px; }
  .order-card__meta { grid-template-columns: 1fr; }
}

.main-content > .order-center-page .detail-left-panel {
  padding: 2px;
  border-radius: 14px;
}

.main-content > .order-center-page .detail-side-panel {
  box-shadow: 0 5px 16px rgba(15, 23, 42, .05);
}

.main-content > .order-center-page .detail-grid > div {
  border-color: #e6ebf2;
  background: #f8fafc;
}

.external-orders-view {
  display: flex;
  min-height: calc(100vh - 104px);
  flex-direction: column;
  gap: 14px;
}

.external-orders-view__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px 2px 0;
}

.external-orders-view__eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.external-orders-view h1 {
  margin: 5px 0 0;
  color: #172033;
  font-size: 24px;
  line-height: 1.2;
}

.external-orders-view p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.external-orders-view__frame {
  width: 100%;
  min-height: 720px;
  flex: 1;
  border: 1px solid #dfe6f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

@media (max-width: 900px) {
  .main-content > .order-center-page .toolbar-panel,
  .main-content > div:has(> .orders-table-wrap) > .filter-bar {
    position: static;
  }

  .external-orders-view__frame {
    min-height: 620px;
  }
}
