/*
#################################################################################
# Author      : Rodrigo Contreras (<mrdc.tech>)
# Copyright(c): 2026
# All Rights Reserved.
#
# This module is copyright property of the author mentioned above.
# You can`t redistribute it and/or modify it.
#
#################################################################################
*/

:root {
  --mrdc-reports-up: var(--mrdc-ok);
  --mrdc-reports-down: var(--mrdc-danger);
}

.mrdc-reports-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mrdc-block { display: block; font-weight: 400; }

.mrdc-reports-tabs { margin-bottom: 14px; }
.mrdc-reports-filterwrap { margin-bottom: 18px; }
.mrdc-reports-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; padding: 14px 16px; background: var(--mrdc-surface); border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); box-shadow: var(--mrdc-shadow-xs); }
.mrdc-reports-field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.mrdc-reports-field select { min-width: 150px; }
.mrdc-reports-dates { display: flex; gap: 10px; }
.mrdc-reports-dates label { display: flex; flex-direction: column; gap: 4px; }
.mrdc-reports-dates input { width: 156px; }
.mrdc-reports-compare { min-height: 42px; font-size: 14px; }
.mrdc-reports-reset { margin-left: auto; }
.mrdc-reports-sheet-btn { display: none; }

.mrdc-reports-multi { position: relative; }
.mrdc-reports-multi summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; min-width: 170px; max-width: 240px; padding: 9px 12px; border: 1px solid var(--mrdc-border-strong); border-radius: var(--mrdc-radius); background: var(--mrdc-surface); cursor: pointer; }
.mrdc-reports-multi summary::-webkit-details-marker { display: none; }
.mrdc-reports-multi summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrdc-reports-multi summary svg { width: 16px; height: 16px; color: var(--mrdc-muted); }
.mrdc-reports-multi summary:focus-visible { outline: 2px solid var(--mrdc-ink); outline-offset: 2px; }
.mrdc-reports-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; max-height: 320px; overflow-y: auto; background: var(--mrdc-surface); border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); box-shadow: var(--mrdc-shadow-md); padding: 8px; display: grid; gap: 2px; }
.mrdc-reports-pop > button { justify-content: flex-start; }
.mrdc-reports-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--mrdc-radius); cursor: pointer; font-size: 14px; min-height: 40px; }
.mrdc-reports-option:hover { background: var(--mrdc-surface-2); }
input[type=checkbox].mrdc-reports-check { appearance: auto; -webkit-appearance: checkbox; width: 18px; min-width: 18px; height: 18px; min-height: 18px; border-radius: var(--mrdc-radius-xs); background: none; accent-color: var(--mrdc-ink); }
input[type=checkbox].mrdc-reports-check::after { display: none; }

.mrdc-reports-kpiwrap { margin-bottom: 16px; }
.mrdc-reports-kpihead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mrdc-reports-kpihead p { margin-top: 3px; }
.mrdc-reports-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 14px; }
.mrdc-reports-kpi { display: flex; flex-direction: column; gap: 2px; }
.mrdc-reports-kpi .value { font-size: 28px; }
.mrdc-reports-kpi-hint { margin-top: auto; padding-top: 6px; line-height: 1.35; }
.mrdc-reports-delta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; margin-top: 4px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mrdc-reports-delta.mrdc-up { color: var(--mrdc-reports-up); }
.mrdc-reports-delta.mrdc-down { color: var(--mrdc-reports-down); }
.mrdc-reports-delta.mrdc-flat { color: var(--mrdc-muted); }
.mrdc-reports-prev { color: var(--mrdc-muted); font-weight: 500; }

.mrdc-reports-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mrdc-reports-grid > .card + .card { margin-top: 0; }
.mrdc-reports-widget.mrdc-full { grid-column: 1 / -1; }
.mrdc-reports-actions { gap: 8px; }
.mrdc-reports-body { min-height: 60px; }
.mrdc-reports-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--mrdc-muted); padding: 26px 12px; font-size: 14px; }
.mrdc-reports-empty svg { width: 26px; height: 26px; }
.mrdc-reports-skeleton { display: grid; gap: 10px; padding: 6px 0; }
.mrdc-reports-skeleton span { display: block; height: 14px; border-radius: var(--mrdc-radius-sm); background: linear-gradient(90deg, var(--mrdc-surface-2), color-mix(in srgb, var(--mrdc-surface-2) 40%, var(--mrdc-surface)), var(--mrdc-surface-2)); background-size: 200% 100%; animation: mrdc-reports-shine 1.2s linear infinite; }
.mrdc-reports-skeleton span:nth-child(2n) { width: 82%; }
.mrdc-reports-skeleton span:nth-child(3n) { width: 64%; }
@keyframes mrdc-reports-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.mrdc-reports-foot { margin-top: 10px; }
.mrdc-reports-sub { font-size: 14px; margin-bottom: 12px; }
.mrdc-reports-split { gap: 22px; }

.mrdc-reports-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.mrdc-reports-mode { width: auto; }
.mrdc-reports-grain { width: auto; min-width: 190px; margin-left: auto; }
.mrdc-reports-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.mrdc-static-legend { margin-top: 8px; }
.mrdc-reports-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 12px; border-radius: var(--mrdc-radius-full); font-size: 13px; font-weight: 600; border: 1px solid var(--mrdc-border); background: var(--mrdc-surface); color: var(--mrdc-muted); }
.mrdc-reports-chip i { width: 10px; height: 10px; border-radius: 3px; opacity: .35; }
.mrdc-reports-chip.on { color: var(--mrdc-text); border-color: var(--mrdc-border-strong); }
.mrdc-reports-chip.on i { opacity: 1; }
.mrdc-reports-chip:not(.on) { text-decoration: line-through; }
.mrdc-reports-chip.mrdc-static { cursor: default; text-decoration: none; }

.mrdc-reports-chart { position: relative; }
.mrdc-reports-plot { width: 100%; border-radius: var(--mrdc-radius); touch-action: pan-y; }
.mrdc-reports-plot:focus-visible { outline: 2px solid var(--mrdc-ink); outline-offset: 4px; }
.mrdc-reports-svg { display: block; overflow: visible; }
.mrdc-reports-grid line, .mrdc-reports-svg .mrdc-reports-grid { stroke: var(--mrdc-border); stroke-width: 1; }
.mrdc-reports-svg .mrdc-reports-base { stroke: var(--mrdc-border-strong); stroke-width: 1; }
.mrdc-reports-svg .mrdc-reports-axis { fill: var(--mrdc-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mrdc-reports-svg .mrdc-reports-cross { stroke: var(--mrdc-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.mrdc-reports-svg .mrdc-reports-dot { stroke: var(--mrdc-surface); stroke-width: 2; }
.mrdc-reports-svg .mrdc-reports-dot.mrdc-hot { r: 5.5px; }
.mrdc-reports-svg .mrdc-reports-dot.mrdc-partial { stroke-width: 2; }
.mrdc-reports-svg .mrdc-reports-bar.mrdc-hot { filter: brightness(1.15); }
.mrdc-reports-svg .mrdc-pick { cursor: pointer; }
.mrdc-reports-tip { top: -8px; bottom: auto; transform: translate(-50%, -100%); }
.mrdc-reports-tip-hint { opacity: .7; font-size: 11.5px; margin-top: 2px; }
.mrdc-reports-data { margin-top: 12px; }
.mrdc-reports-data summary { cursor: pointer; font-size: 13.5px; color: var(--mrdc-muted); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.mrdc-reports-data[open] summary { margin-bottom: 8px; }

.mrdc-reports-table th { padding: 0; }
.mrdc-reports-table th:not(:has(button)) { padding: 8px 10px; }
.mrdc-reports-sort { border: 0; background: transparent; min-height: 34px; padding: 6px 10px; width: 100%; justify-content: inherit; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; gap: 4px; border-radius: var(--mrdc-radius); }
.mrdc-reports-table th.mrdc-num .mrdc-reports-sort { justify-content: flex-end; }
.mrdc-reports-table th:not(.mrdc-num) .mrdc-reports-sort { justify-content: flex-start; }
.mrdc-reports-sort:hover { background: var(--mrdc-surface-2); }
.mrdc-reports-sort-mark { display: inline-flex; align-items: center; opacity: .45; }
.mrdc-reports-sort-mark.on { opacity: .9; }
.mrdc-reports-sort-mark svg { width: 12px; height: 12px; }
.mrdc-reports-table.mrdc-compact td { padding: 8px 10px; }
.mrdc-reports-scroll { -webkit-overflow-scrolling: touch; }
.mrdc-reports-barcell { white-space: nowrap; }
.mrdc-reports-barcell > span:last-child { display: inline-block; min-width: 52px; }
.mrdc-reports-inline-bar { display: inline-block; vertical-align: middle; width: 110px; height: 8px; margin-right: 10px; border-radius: var(--mrdc-radius-full); background: var(--mrdc-surface-2); overflow: hidden; }
.mrdc-reports-inline-bar i { display: block; height: 100%; border-radius: var(--mrdc-radius-full); background: var(--mrdc-series-1); }
.mrdc-reports-clip { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mrdc-reports-cohort, .mrdc-reports-heat { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.mrdc-reports-cohort th, .mrdc-reports-heat th { font-size: 12px; font-weight: 600; color: var(--mrdc-muted); padding: 4px 6px; white-space: nowrap; text-align: left; }
.mrdc-reports-cohort thead th.mrdc-num { text-align: center; }
.mrdc-reports-cohort td { min-width: 52px; height: 34px; padding: 4px 6px; border-radius: var(--mrdc-radius-sm); text-align: center; font-size: 12.5px; font-weight: 600; }
.mrdc-reports-cohort td.mrdc-num:nth-child(2) { background: transparent; text-align: right; font-weight: 500; }
.mrdc-reports-cohort-none { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--mrdc-surface-2) 4px 6px); }
.mrdc-reports-heat th { text-align: center; padding: 2px; font-size: 11px; }
.mrdc-reports-heat tbody th { text-align: left; padding-right: 8px; }
.mrdc-reports-heat td { width: 34px; min-width: 30px; height: 30px; border-radius: var(--mrdc-radius-sm); text-align: center; font-size: 11px; font-weight: 600; padding: 0; }

.mrdc-reports-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.mrdc-reports-facts.mrdc-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mrdc-reports-fact { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--mrdc-radius-lg); background: var(--mrdc-surface-2); min-width: 0; }
.mrdc-reports-fact strong { font-family: var(--mrdc-display); font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mrdc-reports-dist .barlist { gap: 10px; }

.mrdc-reports-downloads { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.mrdc-reports-types { display: grid; gap: 8px; }
.mrdc-reports-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; white-space: normal; padding: 12px 14px; border-radius: var(--mrdc-radius-lg); border: 1px solid var(--mrdc-border); background: var(--mrdc-surface); min-height: 0; }
.mrdc-reports-type strong { font-size: 14.5px; }
.mrdc-reports-type .small { font-weight: 400; line-height: 1.4; }
.mrdc-reports-type .pill { margin-top: 4px; }
.mrdc-reports-type.on { border-color: var(--mrdc-ink); box-shadow: 0 0 0 1px var(--mrdc-ink) inset; }
.mrdc-reports-special { margin-bottom: 14px; max-width: 420px; }
.mrdc-reports-kinds { border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); padding: 8px 10px 10px; display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; }
.mrdc-reports-kinds legend { padding: 0 6px; font-weight: 600; }
.mrdc-reports-buttons { margin-bottom: 14px; }
.mrdc-reports-warn { display: flex; gap: 8px; align-items: center; color: var(--mrdc-warn); margin-bottom: 8px; }
.mrdc-reports-warn svg { width: 16px; height: 16px; }
.mrdc-reports-preview-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--mrdc-border); border-radius: var(--mrdc-radius-lg); margin: 8px 0 0; padding: 0; }
.mrdc-reports-preview th { position: sticky; top: 0; background: var(--mrdc-surface); z-index: 1; }
.mrdc-reports-preview td { white-space: nowrap; font-size: 13px; }
.mrdc-reports-owners { font-size: 14px; overflow-wrap: anywhere; }
.mrdc-reports-list { margin: 10px 0 14px; padding-left: 20px; line-height: 1.7; font-size: 14px; }
.mrdc-reports-printhead { display: none; }
.mrdc-reports-type-field { display: none; }

@media (max-width: 1080px) {
  .mrdc-reports-downloads { grid-template-columns: minmax(0, 1fr); }
  .mrdc-reports-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mrdc-reports-facts.mrdc-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .mrdc-reports-filters { display: none; }
  .mrdc-reports-sheet-btn { display: flex; width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px 14px; min-height: 56px; border-radius: var(--mrdc-radius-lg); }
  .mrdc-reports-sheet-btn .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .mrdc-reports-sheet-btn .small { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mrdc-reports-sheet .mrdc-reports-field, .mrdc-reports-sheet .mrdc-reports-field select { min-width: 0; width: 100%; }
  .mrdc-reports-sheet .mrdc-reports-multi summary { max-width: none; }
  .mrdc-reports-sheet .mrdc-reports-pop { position: static; box-shadow: none; margin-top: 6px; max-height: none; }
  .mrdc-reports-sheet .mrdc-reports-dates { display: grid; grid-template-columns: 1fr 1fr; }
  .mrdc-reports-sheet .mrdc-reports-dates.hidden { display: none; }
  .mrdc-reports-sheet .mrdc-reports-dates input { width: 100%; }
  .mrdc-reports-tabs { width: 100%; }
  .mrdc-reports-grid { grid-template-columns: minmax(0, 1fr); }
  .mrdc-reports-widget > .card-head { flex-wrap: nowrap; align-items: flex-start; }
  .mrdc-reports-widget > .card-head > .row { flex: none; }
  .mrdc-reports-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mrdc-reports-kpi .value { font-size: 22px; }
  .mrdc-reports-kpi-hint { display: none; }
  .mrdc-reports-grain { margin-left: 0; width: 100%; }
  .mrdc-reports-mode { width: 100%; }
  .mrdc-reports-types { display: none; }
  .mrdc-reports-type-field { display: flex; margin-bottom: 14px; }
  .mrdc-reports-buttons > button { flex: 1 1 140px; }
  .mrdc-reports-inline-bar { width: 56px; }
  .mrdc-reports-head-actions { width: 100%; }
}

@media (max-width: 400px) {
  .mrdc-reports-kpis { gap: 8px; }
  .mrdc-reports-kpi { padding: 12px; }
}

@media print {
  :root:has(body.mrdc-reports-printing) {
    color-scheme: light;
    --mrdc-bg: #ffffff;
    --mrdc-surface: #ffffff;
    --mrdc-surface-2: #f3f3f3;
    --mrdc-border: #d9d9d9;
    --mrdc-text: #171717;
    --mrdc-muted: #525252;
    --mrdc-ok: #157f3c;
    --mrdc-danger: #c4271f;
    --mrdc-border-strong: #c7c7c7;
    --mrdc-series-1: #2a78d6;
    --mrdc-series-2: #eb6834;
    --mrdc-series-3: #1baf7a;
  }
  body.mrdc-reports-printing { background: #fff; color: #111; }
  body.mrdc-reports-printing .main { padding: 0; max-width: none; }
  body.mrdc-reports-printing .head, body.mrdc-reports-printing .mrdc-reports-tabs, body.mrdc-reports-printing .mrdc-reports-filterwrap,
  body.mrdc-reports-printing .mrdc-reports-csv, body.mrdc-reports-printing .mrdc-reports-toolbar select, body.mrdc-reports-printing .mrdc-reports-mode,
  body.mrdc-reports-printing .mrdc-reports-data, body.mrdc-reports-printing .mrdc-notice, body.mrdc-reports-printing .mrdc-sandbox-stripe,
  body.mrdc-reports-printing .mrdc-guide-fab, body.mrdc-reports-printing .mrdc-reports-tip, body.mrdc-reports-printing .mrdc-reports-kpi-hint { display: none !important; }
  body.mrdc-reports-printing .main > :not(.mrdc-reports-root), body.mrdc-reports-printing .mrdc-reports-sort-mark { display: none !important; }
  body.mrdc-reports-printing .mrdc-reports-printhead { display: block; margin-bottom: 14px; border-bottom: 2px solid #111; padding-bottom: 8px; }
  body.mrdc-reports-printing .mrdc-reports-printhead h1 { font-size: 20px; }
  body.mrdc-reports-printing .card { box-shadow: none; border-color: #ccc; break-inside: avoid; page-break-inside: avoid; }
  body.mrdc-reports-printing .mrdc-reports-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.mrdc-reports-printing .mrdc-reports-grid { display: block; }
  body.mrdc-reports-printing .mrdc-reports-grid > .card { margin-top: 12px; }
  body.mrdc-reports-printing .table-wrap { overflow: visible; }
  body.mrdc-reports-printing .mrdc-reports-svg { width: 100%; height: auto; }
  body.mrdc-reports-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
