/* Histórico e relatórios V14. */
#adminReportsView.reports-professional > section:not(.admin-report-filters):not(#professionalReports),
#adminReportsView.reports-professional > .admin-auto-update-note { display: none; }
.reports-professional .admin-report-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; align-items: end; }
.reports-professional .report-search-filter { grid-column: span 2; }
.report-feedback { margin: 10px 0 18px; padding: 12px 16px; color: #635271; background: #f1edf8; border: 1px solid #e2d8ed; border-radius: 10px; font-size: 12px; }
.report-feedback.report-error { color: #a52b40; background: #fff0f2; border-color: #edb8c2; }
.report-period-note { font-size: 12px; line-height: 1.6; color: #717583; margin: 0 0 16px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.report-metric, .report-panel { background: #fff; border: 1px solid #e5e2eb; border-radius: 12px; padding: 18px; min-width: 0; }
.report-metric > span { display: block; color: #73727e; font-size: 12px; margin-bottom: 9px; }
.report-metric > strong { display: block; color: #382745; font-size: clamp(17px, 1.8vw, 24px); line-height: 1.3; overflow-wrap: anywhere; }
.report-metric > small { display: block; font-size: 11px; line-height: 1.5; margin-top: 10px; color: #777580; }
.report-metric .report-growth { color: #197344; }
.report-metric .report-decline { color: #a93248; }
.report-metric .report-neutral { color: #777580; }
.report-two-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.report-panel { margin-bottom: 18px; }
.report-two-columns .report-panel { margin-bottom: 0; }
.report-panel h2 { margin: 0 0 8px; font-size: 16px; color: #3a2e46; }
.report-panel > p, .report-section-header p { margin: 0 0 14px; font-size: 12px; color: #7e7b88; line-height: 1.5; }
.report-chart { position: relative; height: 300px; margin-bottom: 14px; }
.report-ranking, .report-status-list { list-style: none; margin: 0; padding: 0; }
.report-ranking { counter-reset: ranking; }
.report-ranking li, .report-status-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eeeaf2; font-size: 12px; }
.report-ranking li:last-child, .report-status-list li:last-child { border: 0; }
.report-ranking li > span { flex: 1; overflow-wrap: anywhere; }
.report-ranking li::before { counter-increment: ranking; content: counter(ranking); background: #f0e9f8; color: #6d28b7; border-radius: 6px; padding: 5px 8px; font-weight: 700; }
.report-ranking li strong { white-space: nowrap; color: #6d28b7; }
.report-hourly { display: grid; grid-template-columns: repeat(24, minmax(30px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.report-hour { text-align: center; font-size: 10px; color: #706e7a; }
.report-hour > strong, .report-hour > span { display: block; }
.report-hour > div { height: 96px; display: flex; align-items: flex-end; justify-content: center; margin: 6px 0; background: #f6f2fa; border-radius: 5px; }
.report-hour i { display: block; width: 75%; background: #8c54bd; border-radius: 4px 4px 0 0; min-height: 0; }
.report-status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.report-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.report-table th, .report-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #eeeaf2; vertical-align: top; }
.report-table th { color: #635670; background: #faf8fc; white-space: nowrap; font-weight: 600; }
.report-table td { color: #55515e; }
.report-table td small { display: block; margin-top: 5px; color: #86808d; font-size: 11px; }
.report-table td:last-child { white-space: nowrap; font-weight: 600; }
.report-table .report-items { min-width: 140px; max-width: 280px; overflow-wrap: anywhere; }
.report-table details p { font-size: 11px; margin: 8px 0; }
.report-section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.report-button { padding: 10px 14px; background: #fff; border: 1px solid #d9d1e2; border-radius: 7px; color: #674284; font: inherit; font-size: 12px; cursor: pointer; }
.report-button:hover { background: #f4eff8; }
.report-button:disabled { cursor: default; opacity: .45; }
.report-button:focus-visible, .report-pagination select:focus-visible { outline: 3px solid #c5a9e1; outline-offset: 2px; }
.report-export { background: #6d28b7; border-color: #6d28b7; color: #fff; }
.report-export:hover { background: #5b1f9c; }
.report-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0 6px; font-size: 12px; color: #777081; }
.report-pagination label { display: flex; gap: 8px; align-items: center; }
.report-pagination select { height: 36px; border: 1px solid #d9d1e2; border-radius: 6px; padding: 0 10px; font: inherit; background: white; }
.report-pagination small { flex-basis: 100%; font-size: 11px; }
#professionalReports summary, .history-details summary { cursor: pointer; color: #6d28b7; font-size: 12px; margin-top: 10px; }
.history-details { grid-column: 1 / -1; font-size: 12px; }
.history-details p { margin: 8px 0; color: #67606e; line-height: 1.5; overflow-wrap: anywhere; }
.history-details summary { margin-top: 0; }
.history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.history-search { grid-column: span 2; }
.history-order-number span { font-size: 10px; }
#historyPage .history-stat-card span, #historyPage .history-filter label, #historyPage .history-search label { font-size: 11px; }
#historyPage .history-filter input, #historyPage .history-filter select, #historyPage .history-search input { font-size: 12px; height: 38px; }
#historyPage .history-customer strong, #historyPage .history-product, #historyPage .history-customer span, #historyPage .history-total, #historyPage .history-order-number strong { font-size: 12px; }
#historyPage .history-header h1 { font-size: 22px; }
#historyPage .history-header p, #historyPage .history-list-header span, #historyPage .clear-filter-button, #historyPage .back-orders-button { font-size: 12px; }
#historyPage .history-stat-card strong { font-size: 20px; }
@media (max-width: 1100px) {
    .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-two-columns { grid-template-columns: minmax(0, 1fr); }
    .reports-professional .admin-report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .report-panel, .report-metric { padding: 14px; }
    .report-chart { height: 250px; }
    .report-status-list { grid-template-columns: 1fr; }
    .report-section-header { align-items: flex-start; flex-direction: column; }
    .report-panel .report-table { min-width: 760px; }
    #reportDailyDetails .report-table { min-width: 280px; }
    .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
    .report-metrics, .reports-professional .admin-report-filters, .history-filters { grid-template-columns: minmax(0, 1fr); }
    .reports-professional .report-search-filter, .history-search { grid-column: auto; }
    .report-pagination { gap: 8px; }
}
