/* Medición y reportes · MOO CHUU */

.dash-sec { background: #f6f3f7; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h2 { margin: 0; font-size: 2.2rem; }
.range { display: inline-flex; padding: 4px; border-radius: 40px; background: var(--white); border: 1px solid var(--line); }
.range button { padding: 9px 18px; border: 0; border-radius: 40px; background: none; font-weight: 700; font-size: .86rem; color: var(--ink); cursor: pointer; }
.range button.is-active { background: var(--ink); color: var(--white); }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { padding: 18px 18px 16px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }
.tile span { display: block; font-size: .8rem; font-weight: 500; }
.tile b { display: block; margin: 6px 0 4px; font-family: var(--display); font-weight: 400; font-size: 1.85rem; line-height: 1; color: var(--ink); }
.tile small { font-size: .78rem; font-weight: 700; color: #16803c; }
.tile small.is-down { color: #b42318; }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: 22px 22px 18px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); min-width: 0; }
.panel--wide { grid-column: span 1; }
.panel header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.panel h3 { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 1rem; text-transform: none; letter-spacing: 0; }
.panel__sub { font-size: .8rem; }

.chart { position: relative; height: 220px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: rgba(20, 20, 22, .08); }
.chart .axis text { fill: #8a8690; font-size: 11px; font-family: var(--sans); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .cross { stroke: rgba(20, 20, 22, .35); stroke-width: 1; }
.chart .dot { fill: var(--pink-deep); stroke: var(--white); stroke-width: 2; }
.chart rect.bar { fill: var(--navy); transition: opacity .2s; }
.chart rect.bar.is-dim { opacity: .45; }

.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; font-size: .88rem; }
.hbar span { color: var(--ink); font-weight: 500; }
.hbar i { display: block; height: 14px; border-radius: 0 4px 4px 0; background: var(--pink-deep); transform-origin: left; animation: grow .7s var(--ease) both; }
#payments .hbar i { background: var(--navy); }
.hbar em { font-style: normal; text-align: right; color: var(--ink); font-weight: 700; }
.hbar em small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .74rem; }
@keyframes grow { from { transform: scaleX(0); } }

.funnel { display: grid; gap: 8px; }
.fstep { display: grid; grid-template-columns: 1fr 64px; gap: 10px; align-items: center; font-size: .86rem; }
.fstep div { position: relative; height: 34px; border-radius: 0 6px 6px 0; background: var(--blush); overflow: hidden; }
.fstep div i { position: absolute; inset: 0 auto 0 0; background: var(--pink); border-radius: 0 6px 6px 0; animation: grow .7s var(--ease) both; transform-origin: left; }
.fstep div span { position: relative; z-index: 1; display: flex; align-items: center; height: 100%; padding-left: 10px; color: var(--ink); font-weight: 500; }
.fstep b { text-align: right; color: var(--ink); }

.combos { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 8px; }
.combos li { counter-increment: t; display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink); }
.combos li:last-child { border-bottom: 0; }
.combos li::before { content: counter(t); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); font-family: var(--display); font-size: .85rem; }
.combos li small { display: block; color: var(--ink-soft); font-size: .76rem; }
.combos b { font-weight: 700; }

.table-view { margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.table-view summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.table-scroll { max-height: 320px; overflow: auto; margin-top: 12px; }
.table-view table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table-view th, .table-view td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view th { position: sticky; top: 0; background: var(--white); color: var(--ink); }

.tip { position: fixed; z-index: 50; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: var(--white); font-size: .8rem; line-height: 1.35; pointer-events: none; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.tip b { color: var(--yellow); }

.weekly { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.report { border-radius: 24px; overflow: hidden; background: #efe7dc; box-shadow: 0 30px 60px -36px rgba(20, 20, 22, .5); }
.report__head { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px 18px; background: #075e54; color: var(--white); font-size: .92rem; }
.report__head img { width: 32px; height: 32px; border-radius: 50%; }
.report__head span { margin-left: auto; font-size: .76rem; opacity: .8; }
.report__body { margin: 16px; padding: 16px 18px; border-radius: 0 14px 14px 14px; background: var(--white); font-size: .92rem; line-height: 1.55; color: #111; }
.report__body p:last-child { margin: 0; }

@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .panels, .weekly { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hbar { grid-template-columns: 90px 1fr 62px; gap: 8px; }
  .chart { height: 190px; }
}
