/* Overview page (item thumbnails: .ithumb in purchases.css) */
.ov { transition: opacity .2s; }
.ov.stale { opacity: .5; pointer-events: none; }

/* headline: one row of four equal cards (2x2 on phones); .ov-foot = quiet secondary line pinned to the bottom */
.grid.ov-hero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ov-hero .stat { display: flex; flex-direction: column; }
.ov-hero .stat .value { font-size: 28px; }
.stat.na .value { color: var(--faint); }
.ov-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; white-space: nowrap;
  margin-top: auto; padding-top: 14px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums;
}
.ov-foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ov-foot b { flex: none; color: var(--muted); font-weight: 500; }

/* "Needs attention": chips that open the page concerned */
.ov-attn { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ov-chip { padding: 3px 11px; transition: border-color .15s, color .15s; }
.ov-chip:hover { border-color: currentColor; }
.ov-chip:not(.warn):hover { color: var(--text); border-color: #353a40; }
.ov-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* stat cards open their page */
.ov-card { display: block; min-width: 0; border-radius: var(--radius); }
.ov-card > .card { height: 100%; transition: border-color .15s, transform .15s var(--ease), background .15s; }
.ov-card:hover > .card { border-color: #353a40; transform: translateY(-1px); }
.ov-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* "Last buy 43m ago · Arvis upload 1h ago" */
.ov-status { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; min-height: 21px; }
.ov-status time { color: var(--text); }
.ov-dot { width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.ov-status.warn .ov-dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(232, 176, 75, .15); }
.ov-status.warn time:first-of-type { color: var(--warn); }
.ov-off { color: var(--faint); font-size: 12px; }
.ov-off::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--warn); opacity: .7; vertical-align: 1px; }

/* 7-day spend sparkline in the "today" card */
.spark { display: block; width: 100%; height: 34px; margin-top: 10px; overflow: visible; }
.spark-area { fill: rgba(57, 135, 229, .12); }
.spark-line { fill: none; stroke: var(--viz-1-hi); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-hit { fill: transparent; }
.spark-hit:hover { fill: rgba(255, 255, 255, .04); }
.spark-cap { display: flex; justify-content: space-between; margin-top: 4px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* recent buys: image, name (whole words, 2 lines), price, ROI chip */
.ov-right { display: flex; align-items: center; gap: 14px; flex: none; }
.ov-recent .row { gap: 14px; padding: 10px 20px; color: inherit; }
.ov-recent .row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ov-all { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; transition: color .15s, background .15s; }
.ov-all:hover { color: var(--text); background: rgba(255, 255, 255, .02); }
.ov-all:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ov-recent .row .title {
  white-space: normal; overflow-wrap: break-word; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 1100px) {
  .grid.ov-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ov-hero .stat .value { font-size: 23px; }
  .ov-foot { flex-direction: column; gap: 0; padding-top: 10px; }
  .ov-chip { min-height: 40px; padding: 3px 14px; }
  /* image | name (2 lines) + one meta line | price over the ROI chip */
  .ov-recent .row { padding: 11px 14px; gap: 12px; }
  .ov-recent .row .meta { white-space: nowrap; }
  .ov-right { flex-direction: column; align-items: flex-end; gap: 5px; }
  .ov-right .end .meta { display: none; }
}
@media (max-width: 340px) {
  .grid.ov-hero { grid-template-columns: minmax(0, 1fr); }
}
