/* Quotewright console — Insights (reporting) page.
   Chrome (top bar, subnav, login card, stat tiles, empty states) is inherited from
   console-views.css; this file only adds the reporting-specific layer: the chart grid,
   hand-rolled SVG chart marks, the shared tooltip, and a couple of local tweaks.
   Charts are pure inline SVG — no chart library (site CSP is script-src 'self'). */

/* header actions ---------------------------------------------------------- */
.in-head-actions { display: flex; align-items: center; gap: 10px; }
.qc-subnav a.in-back { color: var(--soft); font-weight: 600; }
.qc-subnav a.in-back:hover { color: var(--ink); }

/* stat tiles: a small "vs" delta line under the value */
.qc-tile .in-delta { font-size: 11.5px; font-family: var(--mono); margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; }
.qc-tile .in-delta.up { color: #16803a; }
.qc-tile .in-delta.down { color: #b4432f; }
.qc-tile .in-delta.flat { color: var(--soft); }
.qc-tile.accent .in-delta.up, .qc-tile.accent .in-delta.down, .qc-tile.accent .in-delta.flat { color: rgba(0,0,0,.62); }

/* chart grid -------------------------------------------------------------- */
.in-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 6px; }
.in-card { background: #fff; border: 1px solid var(--hair); border-radius: var(--r-md); padding: 18px 20px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03); min-width: 0; }
.in-card.wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .in-grid { grid-template-columns: 1fr; } .in-card.wide { grid-column: auto; } }

.in-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 2px; }
.in-card h3 { font-family: var(--font); font-weight: 600; font-size: 16px; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.in-sub { font-size: 12px; color: var(--soft); margin: 3px 0 14px; line-height: 1.45; }

.in-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--soft); font-family: var(--mono); flex-wrap: wrap; }
.in-legend span { display: inline-flex; align-items: center; gap: 6px; }
.in-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.in-legend i.dot { border-radius: 50%; }

/* the plot host */
.in-plot { position: relative; }
.in-plot svg { width: 100%; height: auto; display: block; overflow: visible; }

/* shared SVG mark styling (fills that need brand tokens; status hues set inline from JS) */
.in-plot .grid { stroke: var(--hair); stroke-width: 1; }
.in-plot .axis { stroke: var(--line-strong); stroke-width: 1; }
/* SVG text: fill + family only — font-size is set per-element (user units) in JS,
   so it must NOT be pinned here (a CSS font-size would override the attribute). */
.in-plot .lbl { fill: var(--grey); font-family: var(--mono); }
.in-plot .lbl.mid { fill: var(--soft); }
.in-plot .val { fill: var(--ink); font-family: var(--font); font-weight: 600; font-variant-numeric: tabular-nums; }
.in-plot .val.soft { fill: var(--soft); font-weight: 500; }
.in-plot .bar-neutral { fill: var(--line-strong); }
.in-plot .bar-lime { fill: var(--lime); }
.in-plot .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.in-plot .area { fill: var(--lime-dim); }
.in-plot .dot { fill: var(--lime); stroke: #fff; stroke-width: 2; }
.in-plot .track { fill: var(--row); }
.in-plot .hit { fill: transparent; cursor: default; }
.in-plot .hit:hover ~ * , .in-plot .mk { transition: opacity .12s; }
.in-plot .mk.dim { opacity: .38; }

/* per-card empty state (a card that has no data yet) */
.in-empty { text-align: center; color: var(--soft); font-size: 13px; padding: 30px 12px; }
.in-empty .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--row); border: 1px solid var(--hair); display: grid; place-items: center; margin: 0 auto 12px; color: var(--grey); }
.in-empty strong { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }

/* tooltip ----------------------------------------------------------------- */
.in-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #fff; font-family: var(--font); font-size: 12px; line-height: 1.5; padding: 8px 11px; border-radius: 10px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); max-width: 240px; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s; }
.in-tip.show { opacity: 1; }
.in-tip b { font-weight: 600; }
.in-tip .k { color: rgba(255,255,255,.62); }
.in-tip .v { color: #fff; font-variant-numeric: tabular-nums; }
.in-tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* skeleton while loading */
.in-skel { background: linear-gradient(90deg, var(--row) 0%, #efefef 50%, var(--row) 100%); background-size: 200% 100%; animation: inShimmer 1.3s ease-in-out infinite; border-radius: 10px; }
.in-skel-h { height: 220px; }
@keyframes inShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .in-skel { animation: none; } .in-plot .mk { transition: none; } }
