.report-shell { min-width: 0; }
.report-shell .report-toolbar { display: contents; }
.report-toolbar .page-description { width: 100%; max-width: none; }
.report-shell .report-inquiry { min-width: 0; width: 100%; display: flex; align-items: end; gap: 10px; }
.report-filter-grid { min-width: 0; flex: 1; display: grid; grid-template-columns: minmax(230px, 1.6fr) repeat(4, minmax(145px, 1fr)); gap: 8px; align-items: end; }
.report-filter-grid > * { width: 100%; min-width: 0; }
.report-keyword { width: 100%; }
.report-date-filter { display: grid; gap: 4px; color: #64748b; font-size: 10px; }
.report-date-filter .compact-input { min-height: 42px; }
.report-toolbar-actions { min-width: 0; display: flex; flex: 0 0 auto; align-items: center; }
.report-toolbar-actions .action-button { min-height: 42px; white-space: nowrap; }
.btn-excel { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 15px; border: 1px solid #15803d; background: #16843d; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.btn-excel:hover { background: #126c33; }
.btn-excel:disabled { border-color: #94a3b8; background: #cbd5e1; cursor: not-allowed; }
.report-summary { margin: 0 0 14px; }
.report-summary .metric-card { min-height: 88px; }
.report-summary .metric-value { font-size: 18px; overflow-wrap: anywhere; }
.report-table { max-height: calc(100vh - 326px); background: #fff; }
.report-table table { min-width: 1040px; }
.report-table .wrap-cell { min-width: 120px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.report-dialog { width: min(1060px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.report-modal-body { min-height: 0; padding: 18px 22px; overflow: auto; }
.report-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-detail-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid #dbe2ea; background: #f8fafc; }
.report-detail-grid span, .report-detail-grid strong { display: block; }
.report-detail-grid span { margin-bottom: 4px; color: #64748b; font-size: 10px; text-transform: uppercase; }
.report-detail-grid strong { font-size: 12px; overflow-wrap: anywhere; }
.financial-results { min-height: 0; overflow: auto; }
.financial-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.financial-meta > div { min-width: 0; padding: 10px 12px; border: 1px solid #dbe2ea; background: #f8fafc; }
.financial-meta span,.financial-meta strong { display: block; }
.financial-meta span { color: #64748b; font-size: 10px; text-transform: uppercase; }
.financial-meta strong { margin-top: 3px; color: #0f172a; font-size: 12px; overflow-wrap: anywhere; }
.financial-tabs { display: flex; gap: 0; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid #cbd5e1; }
.financial-tabs button { min-height: 38px; padding: 8px 15px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #64748b; font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.financial-tabs button.active { border-bottom-color: #2563eb; color: #1d4ed8; }
.financial-panel h2 { margin: 0 0 12px; font-size: 15px; }
.financial-panel h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; }
.financial-balance-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.financial-table { min-width: 560px!important; }
.financial-row-section td { background: #eaf1f8; font-weight: 700; }
.financial-row-subtotal td { border-bottom: 1px solid #475569; font-weight: 700; }
.financial-row-total td { border-top: 1px solid #475569; border-bottom: 3px double #475569; font-weight: 800; }
.financial-validation { padding: 10px 12px; border-left: 3px solid #15803d; background: #f0fdf4; color: #166534; font-size: 12px; }
.financial-validation.error { border-left-color: #dc2626; background: #fef2f2; color: #b91c1c; }
@media (max-width: 1280px) {
  .report-shell .report-inquiry { align-items: stretch; flex-direction: column; }
  .report-filter-grid { width: 100%; grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .report-keyword { grid-column: span 2; }
  .report-toolbar-actions { justify-content: flex-end; }
}
@media (max-width: 900px) {
  .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-keyword { grid-column: 1 / -1; }
  .report-table { max-height: none; }
  .report-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-balance-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .report-shell { height: auto; overflow: visible; }
  .report-shell .report-inquiry { gap: 8px; }
  .report-table table { min-width: 820px; }
  .financial-results { overflow: visible; }
}
@media (max-width: 640px) {
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-keyword { grid-column: auto; }
  .report-toolbar-actions { display: grid; grid-template-columns: 1fr; }
  .report-toolbar-actions .action-button { width: 100%; }
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-summary .metric-card { min-height: 82px; padding: 12px; }
  .report-summary .metric-icon { width: 40px; height: 40px; flex-basis: 40px; margin-right: 10px; }
  .report-dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .report-detail-grid { grid-template-columns: 1fr; }
  .financial-meta { grid-template-columns: 1fr; }
}
@media (max-width: 390px) { .report-summary { grid-template-columns: 1fr; } }
