dialog::backdrop { background: #2b2b2bbb; }
.report-builder { width: min(760px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow: auto; }
.report-builder h2 { margin-bottom: 24px; }
.report-builder fieldset { margin: 0 0 18px; padding: 17px; border: 1px solid var(--line); }
.report-builder legend { padding: 0 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.choice-row label, .select-all { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.custom-range { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.custom-range label { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.custom-range input { display: block; width: 100%; margin-top: 5px; padding: 9px; border: 1px solid var(--line); background: white; }
.product-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; max-height: 250px; overflow: auto; }
.product-options label { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 9px; border: 1px solid var(--line); font-size: 12px; }
.product-options input { grid-row: 1 / 3; }
.product-options small, .loading-note { color: var(--muted); font-size: 9px; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.report-history-link { text-decoration: none; text-align: center; }
.form-message { min-height: 20px; color: var(--orange); font-size: 12px; }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.reports-layout { display: grid; grid-template-columns: minmax(260px, .35fr) minmax(560px, 1fr); gap: 12px; }
.report-history, .report-view { border: 1px solid var(--line); background: var(--card); }
.report-history h2 { margin: 0; padding: 18px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; }
.report-history button { display: block; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.report-history button:hover, .report-history button.active { background: var(--acid); }
.report-history small { display: block; margin-top: 5px; color: var(--muted); }
.report-title, .report-group, .report-total, .report-notice { padding: 22px; border-bottom: 1px solid var(--line); }
.report-title h2 { margin: 0 0 8px; }
.report-title p { color: var(--muted); }
.report-group-head, .report-row, .report-total { display: grid; grid-template-columns: 1fr auto auto; gap: 25px; }
.report-group-head { align-items: center; margin-bottom: 10px; }
.report-group-head h3 { margin: 0; text-transform: uppercase; }
.report-row { padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.report-row small { display: block; color: var(--muted); margin-top: 3px; }
.report-total { font-size: 20px; text-transform: uppercase; }
.report-id { padding: 0 22px; color: var(--muted); font-size: 9px; }
.empty.compact { padding: 25px; }
.secondary-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 46px; padding-top: 18px; border-top: 1px solid var(--line); }
.secondary-tools span { margin-right: auto; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.secondary-tools a { padding: 10px 12px; border: 1px solid var(--line); color: var(--ink); background: var(--card); font-size: 10px; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.secondary-tools a:hover { background: var(--acid); border-color: var(--ink); }
.workflow button:disabled { cursor: not-allowed; opacity: .5; }
.reference-only { padding: 14px; border: 1px solid var(--line); background: var(--paper); }
.reference-only strong { font-size: 10px; text-transform: uppercase; }
.reference-only p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.fulfillment-history { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.fulfillment-history h4 { margin: 0 0 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.fulfillment-history > p { color: var(--muted); font-size: 11px; }
.fulfillment-event { display: grid; gap: 3px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 11px; }
.fulfillment-event span, .fulfillment-event small { color: var(--muted); }
@media (max-width: 800px) { .custom-range, .product-options { grid-template-columns: 1fr 1fr; } .dialog-actions { align-items: stretch; flex-direction: column-reverse; } .reports-layout { grid-template-columns: 1fr; } .report-page-heading { align-items: flex-start; } .report-page-heading h1 { font-size: 48px; } }
