/* =========================================================
   M.G HEALTH PARTNERS · Hoja del informe mensual
   Tamaño fijo A4 apaisado (1123 × 794 px a 96 ppp).
   ========================================================= */
.rp-frame { position: relative; width: 100%; }
.rp-sheet {
  --rp-navy: #102B46; --rp-deep: #091B2C; --rp-teal: #52BAC5; --rp-teal-s: #12A0AE; --rp-blue: #2B5FA6;
  --rp-ink: #0F1F33; --rp-gray: #64748B; --rp-line: #E3E8EF; --rp-bg: #F5F7FA; --rp-good: #0E8F7E; --rp-bad: #D2554B;
  position: absolute; top: 0; left: 0; width: 1123px; height: 794px; transform-origin: top left;
  display: flex; flex-direction: column; gap: 10px; padding: 0 26px 0; overflow: hidden;
  background: #fff; color: var(--rp-ink); font-family: "Inter", system-ui, sans-serif; font-size: 12px; line-height: 1.4;
  border-radius: 14px; box-sizing: border-box;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rp-sheet *, .rp-sheet *::before, .rp-sheet *::after { box-sizing: border-box; }
.rp-sheet ul, .rp-sheet ol { list-style: none; margin: 0; padding: 0; }
.rp-sheet strong, .rp-sheet .rp-month, .rp-sheet .rp-kv { font-family: "Manrope", system-ui, sans-serif; }

/* Cabecera */
.rp-head {
  display: flex; justify-content: space-between; align-items: center; margin: 0 -26px; padding: 14px 26px;
  background: linear-gradient(115deg, var(--rp-deep) 0%, var(--rp-navy) 60%, #14405f 100%); color: #fff; position: relative; overflow: hidden;
}
.rp-head::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%); }
.rp-head::after { content: ""; position: absolute; right: -40px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(82,186,197,.35), transparent 65%); }
.rp-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.rp-kicker { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rp-teal); }
.rp-lab { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.rp-period { text-align: right; position: relative; z-index: 1; display: grid; justify-items: end; gap: 2px; }
.rp-month { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.rp-vs { font-size: 11px; color: rgba(255,255,255,.6); }
.rp-demo { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(82,186,197,.18); color: var(--rp-teal); border: 1px solid rgba(82,186,197,.4); margin-bottom: 3px; }

/* KPIs */
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rp-kpi { padding: 11px 15px; border-radius: 12px; border: 1px solid var(--rp-line); background: #fff; box-shadow: 0 1px 2px rgba(16,43,70,.04); }
.rp-kpi-accent { background: linear-gradient(140deg, #eef8f9, #e2f4f6); border-color: #cfe7ea; }
.rp-kl { display: block; font-size: 11px; font-weight: 600; color: var(--rp-gray); text-transform: uppercase; letter-spacing: .06em; }
.rp-kv { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--rp-navy); margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.rp-kf { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 28px; }
.rp-kx { font-size: 11px; color: var(--rp-gray); }
.rp-mix { display: flex; width: 96px; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; }
.rp-mix i { display: block; height: 100%; min-width: 2px; }
.mx-0 { background: var(--rp-navy); } .mx-1 { background: var(--rp-teal-s); } .mx-2 { background: var(--rp-teal); } .mx-3 { background: var(--rp-blue); } .mx-4 { background: #9FB3C8; }

.rp-chip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-chip.is-good { background: #e3f5f1; color: var(--rp-good); }
.rp-chip.is-bad { background: #fbe9e7; color: var(--rp-bad); }
.rp-chip.is-flat { background: var(--rp-bg); color: var(--rp-gray); }

.rp-spark .sp-line { fill: none; stroke: var(--rp-teal-s); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rp-spark .sp-area { fill: rgba(18,160,174,.12); }
.rp-spark .sp-dot { fill: #fff; stroke: var(--rp-teal-s); stroke-width: 2; }
.rp-spark.is-alt .sp-line, .rp-spark.is-alt .sp-dot { stroke: var(--rp-blue); }
.rp-spark.is-alt .sp-area { fill: rgba(43,95,166,.1); }

/* Tarjetas */
.rp-card { border: 1px solid var(--rp-line); border-radius: 12px; padding: 11px 15px; background: #fff; overflow: hidden; }
.rp-ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.rp-ct { font-family: "Manrope", system-ui, sans-serif; font-size: 12.5px; font-weight: 700; color: var(--rp-navy); }
.rp-sub { font-size: 10.5px; color: var(--rp-gray); }
.rp-legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--rp-gray); }
.rp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rp-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.lg-fac { background: var(--rp-teal-s); } .lg-gas { background: #B7C6D8; } .lg-mar { background: var(--rp-navy); border-radius: 50% !important; }

.rp-mid { display: grid; grid-template-columns: 620fr 440fr; gap: 12px; height: 214px; }
.rp-chart { display: block; }
.ch-grid { stroke: var(--rp-line); stroke-width: 1; }
.ch-axis { font-size: 10px; fill: var(--rp-gray); font-family: "Inter", sans-serif; }
.ch-axis.is-cur { fill: var(--rp-navy); font-weight: 700; }
.ch-fac { fill: rgba(18,160,174,.5); } .ch-fac.is-cur { fill: var(--rp-teal-s); }
.ch-gas { fill: #D5DFEA; } .ch-gas.is-cur { fill: #9FB3C8; }
.ch-line { fill: none; stroke: var(--rp-navy); stroke-width: 2; stroke-linejoin: round; }
.ch-dot { fill: #fff; stroke: var(--rp-navy); stroke-width: 2; }
.ch-mval { font-size: 9.5px; font-weight: 700; fill: var(--rp-navy); font-family: "Inter", sans-serif; }

.rp-lrows { display: grid; gap: 9px; margin-top: 4px; }
.rp-lrows li { display: grid; grid-template-columns: 84px 1fr 52px 72px; align-items: center; gap: 10px; }
.rp-ln { font-weight: 600; font-size: 12px; }
.rp-lb { position: relative; height: 14px; border-radius: 99px; background: var(--rp-bg); overflow: hidden; }
.rp-lb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.rp-lb .prev { background: #D5DFEA; }
.rp-lb .cur { background: linear-gradient(90deg, var(--rp-navy), var(--rp-teal-s)); height: 8px; top: 3px; }
.rp-lv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-lrows .rp-chip { justify-self: end; }

.rp-bot { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 12px; height: 160px; }
.rp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-tiles div { padding: 8px 11px; border-radius: 10px; background: var(--rp-bg); }
.rp-tiles strong { display: block; font-size: 20px; font-weight: 800; color: var(--rp-navy); letter-spacing: -.02em; line-height: 1.15; }
.rp-tiles span { font-size: 10.5px; color: var(--rp-gray); }
.rp-srv-in { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; height: 112px; }
.rp-srv-item { display: grid; justify-items: center; gap: 3px; text-align: center; }
.rp-srv-item > span:not(.rp-chip) { font-size: 10.5px; color: var(--rp-gray); }
.rp-ring .rg-bg { fill: none; stroke: var(--rp-bg); stroke-width: 9; }
.rp-ring .rg-fg { fill: none; stroke: var(--rp-teal-s); stroke-width: 9; stroke-linecap: round; }
.rp-ring .rg-val { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 17px; fill: var(--rp-navy); }
.rp-plazo strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--rp-navy); line-height: 1; padding-top: 14px; }
.rp-plazo small { font-size: 13px; font-weight: 700; color: var(--rp-gray); letter-spacing: 0; }
.rp-plazo { align-content: center; min-height: 104px; }
.rp-trows { display: grid; gap: 7px; }
.rp-trows li { display: grid; grid-template-columns: 1fr 90px 36px; align-items: center; gap: 10px; }
.rp-tn { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-tn b { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--rp-navy); color: var(--rp-teal); font-size: 9.5px; margin-right: 7px; }
.rp-tb { height: 6px; border-radius: 99px; background: var(--rp-bg); overflow: hidden; }
.rp-tb i { display: block; height: 100%; border-radius: 99px; background: var(--rp-teal-s); }
.rp-tv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11.5px; }

.rp-foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; flex: 1; min-height: 0; }
.rp-fcol { padding: 10px 15px; border-radius: 12px; background: var(--rp-bg); overflow: hidden; }
.rp-sum { background: linear-gradient(140deg, var(--rp-navy), #14405f); color: rgba(255,255,255,.85); }
.rp-ft { display: block; font-family: "Manrope", sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rp-teal-s); margin-bottom: 5px; }
.rp-sum .rp-ft { color: var(--rp-teal); }
.rp-fcol li { position: relative; padding-left: 13px; font-size: 11px; line-height: 1.4; margin-bottom: 2px; }
.rp-fcol li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--rp-teal-s); }
.rp-sum li::before { background: var(--rp-teal); }
.rp-sum b { color: #fff; }
.rp-bar { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--rp-gray); padding: 0 0 10px; letter-spacing: .02em; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  .rp-sheet { position: relative; transform: none !important; border-radius: 0; width: 297mm; height: 210mm; }
}
