#reportes-view,
.api-content,
.report-printable {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.api-content > *,
.report-printable > * {
  min-width: 0;
}
.report-options {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.report-segment {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 4px;
}
.report-segment button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
}
.report-segment button:hover {
  color: var(--brand);
}
.report-segment button[aria-pressed="true"] {
  color: var(--brand-hover);
  border-color: var(--line);
  background: var(--paper);
  box-shadow: 0 1px 2px var(--shadow-light);
}
.report-range {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.report-range > svg {
  position: absolute;
  pointer-events: none;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.report-range > select {
  appearance: auto;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px 0 34px;
  color: var(--muted);
  background: var(--paper);
  font: inherit;
  font-size: .82rem;
}
.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.report-metric {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 17px;
}
.report-metric strong {
  font-size: clamp(1.12rem, 1.8vw, 1.6rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.report-period {
  margin: 0 0 12px;
  font-size: .8rem;
}
.report-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: .75rem;
}
.report-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.report-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
#reportes-view .bar-part-0,
.report-mark-auto,
.report-legend span:first-child i {
  background: var(--brand);
}
#reportes-view .bar-part-1,
.report-mark-manual,
.report-legend span:last-child i {
  background: var(--chart-manual);
}
.report-ranked {
  display: grid;
  gap: 9px;
}
.report-ranked-row {
  display: grid;
  gap: 12px;
  align-items: center;
  grid-template-columns: minmax(120px, 1fr) 4fr 42px;
  font-size: .8rem;
}
.report-ranked-row > span {
  justify-self: end;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.report-ranked-track {
  display: flex;
  border-radius: 4px;
  background: var(--surface-muted);
  height: 9px;
  overflow: hidden;
}
.report-row-bank {
  display: flex;
  gap: 8px;
  align-items: center;
}
.report-row-bank small {
  display: block;
}
.report-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-print-title {
  display: none;
}
.api-flow {
  margin: 0;
  position: relative;
}
.api-flow-track {
  position: absolute;
  inset: 18px 0 auto;
  width: 100%;
  height: 10px;
  pointer-events: none;
}
.api-flow-track-mobile {
  display: none;
}
.api-flow-base,
.api-flow-motion {
  fill: none;
  stroke-width: 2;
}
.api-flow-base {
  stroke: var(--line);
}
.api-flow-motion {
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-dasharray: 6 22;
  animation: api-flow-motion 1.5s linear infinite;
}
@keyframes api-flow-motion {
  to { stroke-dashoffset: -28; }
}
.api-flow-stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}
.api-flow-stages li {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: .84rem;
  text-align: center;
}
.api-flow-stages small {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
}
.api-flow-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}
.api-flow-icon svg {
  width: 20px;
  height: 20px;
}
.api-key-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.api-secret {
  display: inline-block;
  border-radius: 7px;
  padding: 9px 12px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: .84rem;
  overflow-wrap: anywhere;
}
.api-content button svg {
  width: 15px;
  height: 15px;
}
.api-docs {
  display: grid;
  justify-items: start;
  gap: 12px;
}
.api-docs p {
  margin: -4px 0 0;
  font-size: .84rem;
}
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.api-method {
  border-radius: 5px;
  background: var(--success-soft);
  color: var(--success-ink);
  padding: 4px 8px;
  font-size: .72rem;
  font-weight: 750;
}
.api-method-get {
  background: var(--navy-soft);
  color: var(--navy);
}
.api-method-evento {
  background: var(--brand-soft);
  color: var(--brand-hover);
}
.api-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 12px;
}
.api-code {
  color: var(--ink);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  min-width: 0;
}
.api-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: .76rem;
}
.api-copy {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 5px 7px;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.api-copy:hover { background: var(--brand-soft); color: var(--brand-hover); }
.api-code pre {
  padding: 12px;
  margin: 0;
  overflow: auto;
  font-size: .76rem;
  line-height: 1.5;
}
.api-code .syntax-string { color: var(--success-ink); }
.api-code .syntax-keyword { color: var(--brand-hover); }
.api-code .syntax-numeric { color: var(--pending-ink); }
.api-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .api-flow-motion { animation: none; }
}
@media (max-width: 720px) {
  .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metric { padding: 12px; }
  .api-code-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .report-ranked-row { grid-template-columns: minmax(96px, 1.15fr) 1.4fr 30px; gap: 8px; }
  .api-flow-track { display: none; }
  .api-flow-track-mobile {
    display: block;
    inset: 0 auto 0 17px;
    width: 10px;
    height: 100%;
  }
  .api-flow-stages { grid-template-columns: 1fr; gap: 12px; }
  .api-flow-stages li {
    grid-template-columns: 45px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
    text-align: left;
  }
  .api-docs .report-segment button { padding-inline: 8px; }
}
@media print {
  body:has(#reportes-view) {
    background: var(--paper);
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body:has(#reportes-view) :is(.sidebar, .topbar, .sidebar-overlay, .skip-link, #toast, .report-options, #main-content > :not(#reportes-view)) {
    display: none !important;
  }
  body:has(#reportes-view) :is(#app, .app-shell, .workspace, #main-content, #reportes-view, .report-printable) {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .report-print-title { display: block; }
  .report-print-brand { display: grid; justify-items: start; gap: 3pt; margin-bottom: 8pt; color: var(--muted); }
  .report-print-brand img { width: 99pt; height: auto; }
  .report-printable > * { margin-bottom: 12pt; }
  .report-printable .panel { box-shadow: none; }
  .report-printable .table-wrap { overflow: visible; }
  .report-printable table { width: 100%; min-width: 0; font-size: 8pt; }
  .report-printable th,
  .report-printable td { padding: 5pt 3pt; }
  .report-printable tr { break-inside: avoid; }
}
