.bad-spare-page { gap:24px; color:#14213d; }
.bds-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.bds-heading h1 { font-size:30px; font-weight:600; line-height:1.3; margin:0 0 6px; letter-spacing:-.025em; }
.bds-heading p,.bds-panel-heading p { font-size:14px; color:#64748b; margin:0; line-height:1.6; }
.bds-refresh.mud-icon-button { border:1px solid #ccd6e5; border-radius:8px; color:#2455a5; background:var(--mud-palette-surface,#fff); }
.bds-surface { min-width:0; background:var(--mud-palette-surface,#fff); border:1px solid #e0e6ef; border-radius:8px; overflow:hidden; }
.bds-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.bds-stat { display:flex; align-items:center; gap:20px; padding:22px; }
.bds-stat-icon { display:grid; place-items:center; width:56px; height:56px; border-radius:12px; background:#eaf2ff; color:#2455a5; flex-shrink:0; }
.bds-stat-icon .mud-icon-root { font-size:28px; }
.bds-stat-icon.bds-amber { background:#fff4df; color:#b16b00; }
.bds-stat > div { display:flex; flex-direction:column; gap:5px; }
.bds-stat > div > span { font-size:14px; color:#64748b; }
.bds-stat strong { font-size:25px; line-height:1.2; }
.bds-workspace { display:grid; grid-template-columns:minmax(0,2.6fr) minmax(280px,1fr); gap:20px; align-items:start; }
.bad-spare-page h2 { font-size:18px; font-weight:600; margin:0; }
.bds-panel-heading { display:flex; justify-content:space-between; align-items:start; gap:16px; padding:24px 24px 0; }
.bds-panel-heading p { margin-top:5px; font-size:13px; }
.bds-count { color:#64748b; font-size:12px; white-space:nowrap; }
.bds-search { padding:20px 24px; }
.bds-search .mud-input-control { margin:0; }
.bds-search .mud-input-outlined,.bds-summary .mud-input-outlined { border-radius:7px; }
.bad-spare-page .mud-table-head .mud-table-cell { background:#f8fafc; font-size:12px; font-weight:600; }
.bad-spare-page .mud-table-body .mud-table-cell { font-size:13px; padding-top:20px; padding-bottom:20px; }
.bad-spare-page .mud-table-row-selected .mud-table-cell { background:#edf4ff; }
.bad-spare-page .mud-table-pagination { border-top:1px solid #e5eaf1; }
.bds-spare { display:flex; flex-direction:column; gap:5px; min-width:140px; max-width:380px; overflow-wrap:anywhere; }
.bds-spare small { color:#64748b; font-size:12px; }
.bds-selection { display:flex; align-items:center; justify-content:space-between; gap:16px; background:#edf4ff; margin:0 24px 24px; padding:8px 16px; border-radius:6px; font-size:13px; }
.bds-selection .mud-button { text-transform:none; text-decoration:underline; }
.bds-summary { padding:24px; }
.bds-summary > .mud-input-control { margin-top:28px; }
.bds-summary dl { margin:28px 0 24px; padding-top:24px; border-top:1px solid #e5eaf1; display:grid; gap:16px; }
.bds-summary dl > div { display:flex; justify-content:space-between; gap:16px; font-size:14px; }
.bds-summary dt { font-weight:400; color:#64748b; }
.bds-summary dd { margin:0; font-weight:600; }
.bds-note,.bds-confirm-note { font-size:12px; line-height:1.7; color:#64748b; }
.bds-note { margin:0 0 32px; }
.bds-summary > .mud-button { text-transform:none; min-height:46px; box-shadow:none; }
.bds-confirm-note { margin:12px 0 0; text-align:center; }
@media(max-width:1100px) { .bds-workspace { grid-template-columns:minmax(0,1fr); } .bds-summary { max-width:100%; } }
@media(max-width:600px) { .bad-spare-page { gap:16px; } .bds-heading h1 { font-size:25px; } .bds-heading p { font-size:12px; } .bds-stats { gap:8px; } .bds-stat { flex-direction:column; align-items:flex-start; gap:10px; padding:12px 8px; } .bds-stat-icon { width:36px; height:36px; } .bds-stat-icon .mud-icon-root { font-size:22px; } .bds-stat > div > span { font-size:11px; } .bds-stat strong { font-size:21px; } .bds-panel-heading { padding:20px 16px 0; flex-wrap:wrap; gap:8px; } .bds-search { padding:18px 16px; } .bds-selection { margin:0 16px 16px; padding:8px 12px; gap:8px; } .bds-selection .mud-button { font-size:12px; } .bds-summary { padding:20px 16px; } .bds-spare { max-width:100%; min-width:0; } }

/* Bad-spare dispatch review */
.bds-review-dialog.mud-dialog {
    --bds-review-tint: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    --bds-review-subtle: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
    max-width: 820px;
    border-radius: 12px;
}

.bds-review-dialog .mud-dialog-title { padding: 24px 28px 20px; }
.bds-review-dialog .mud-dialog-content { padding: 0 28px 20px; }
.bds-review-heading { display: flex; align-items: center; gap: 14px; }
.bds-review-heading > div { flex: 1; }
.bds-review-heading > .mud-icon-button { align-self: flex-start; margin: -4px -7px 0 0; }
.bds-review-heading h2 { margin: 0 0 5px; font-size: 24px; font-weight: 650; line-height: 1.2; }
.bds-review-heading p { margin: 0; color: var(--mud-palette-text-secondary); font-size: 14px; }

.bds-review-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bds-review-tint);
    color: var(--mud-palette-primary);
}

.bds-review-body { display: grid; gap: 15px; }
.bds-review-destination {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 14px;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--bds-review-tint);
}

.bds-review-destination > div + div { border-inline-start: 1px solid var(--mud-palette-lines-default); padding-inline-start: 14px; }
.bds-review-destination dt { margin-bottom: 4px; color: var(--mud-palette-text-secondary); font-size: 12px; }
.bds-review-destination dd { margin: 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }

.bds-review-items { min-width: 0; overflow: hidden; border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; }
.bds-review-items table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bds-review-items th, .bds-review-items td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    text-align: start;
}

.bds-review-items thead { background: var(--bds-review-tint); }
.bds-review-items thead th { font-size: 13px; font-weight: 600; }
.bds-review-items tr > :nth-child(2) { text-align: end; white-space: nowrap; }
.bds-review-items tbody td:first-child { overflow-wrap: anywhere; }
.bds-review-items td strong { display: block; font-weight: 600; }
.bds-review-items td small { display: block; margin-top: 3px; color: var(--mud-palette-text-secondary); font-size: 12px; }
.bds-review-complaint { background: var(--bds-review-subtle); color: var(--mud-palette-primary); }
.bds-review-complaint th { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.bds-review-items tfoot { background: var(--bds-review-subtle); font-weight: 650; }
.bds-review-items tfoot th, .bds-review-items tfoot td { border-bottom: 0; }

.bds-review-note { display: flex; align-items: center; gap: 8px; color: var(--mud-palette-text-secondary); font-size: 13px; }
.bds-review-note .mud-icon-root { flex: none; color: var(--mud-palette-primary); }
.bds-review-dialog .mud-dialog-actions {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 28px;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--bds-review-subtle);
}

.bds-review-dialog .mud-dialog-actions .mud-button-root { min-height: 39px; margin: 0; text-transform: none; letter-spacing: normal; }
.bds-review-dialog .mud-dialog-actions .mud-button-filled { box-shadow: none; }

@media (max-width: 600px) {
    .bds-review-dialog.mud-dialog { margin: 12px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
    .bds-review-dialog :is(.mud-dialog-title, .mud-dialog-content, .mud-dialog-actions) { padding-inline: 16px; }
    .bds-review-heading { gap: 10px; }
    .bds-review-heading h2 { font-size: 20px; }
    .bds-review-icon { width: 36px; height: 36px; }
    .bds-review-items th, .bds-review-items td { padding-inline: 10px; }
}
