/* Home: the vendor's dashboard (js/screens/home.js). Chart parts come from analytics.css. */
.home-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 4px 0 16px; }
.home-periods { display: flex; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: #e9e9e9; border-radius: 10px; padding: 3px; }
.home-periods::-webkit-scrollbar { display: none; }
.home-periods button { flex: none; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 7px; background: transparent; color: #4a4a4a; font-size: 13px; font-weight: 550; white-space: nowrap; }
.home-periods button[aria-pressed="true"] { background: #fff; color: #202020; box-shadow: 0 1px 3px #0000001f; }
.home-range { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.home-range span:first-child { color: #303030; font-weight: 550; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "sales sales" "attention listings" "best best"; gap: 16px; align-items: stretch; }
.home-sales { grid-area: sales; }
.home-attention { grid-area: attention; }
.home-listings { grid-area: listings; }
.home-best { grid-area: best; }
.panel.home-panel { padding: 0; margin: 0; overflow: hidden; }
.home-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.home-panel-heading h2 { font-size: 16px; }
.home-panel-heading .home-caption { padding: 2px 0 0; }
.home-link { flex: none; font-size: 13px; font-weight: 550; color: #005bd3; text-decoration: none; padding: 6px 0; }
.home-link:hover { text-decoration: underline; }
.home-caption { font-size: 12px; color: var(--muted); padding: 12px 20px 18px; }

.home-measures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid #ececec; }
.home-measures[aria-busy="true"] { opacity: .6; }
.home-measure { position: relative; display: grid; align-content: start; gap: 6px; min-height: 108px; padding: 16px 20px 18px; text-align: left; color: inherit; background: #fff; border: 0; border-right: 1px solid #ececec; border-radius: 0; }
.home-measure:last-child { border-right: 0; }
.home-measure:hover { background: #fafafa; }
.home-measure[aria-pressed="true"] { background: #f5f8fd; }
.home-measure[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #006aff; }
.home-measure:focus-visible { outline-offset: -3px; }
.home-measure-label { font-size: 12px; color: var(--muted); }
.home-measure strong { font-size: 24px; font-weight: 600; letter-spacing: -.5px; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-change { font-size: 12px; font-weight: 600; color: var(--muted); }
.home-change[data-direction="up"] { color: #18733d; }
.home-change[data-direction="down"] { color: #a33825; }
.home-chart-region { padding-top: 20px; }
.home-chart-region .analytics-chart-data { margin-top: 4px; }
.home-chart-caption { padding: 0 24px 12px; }
.home-chart-note { padding: 0 20px 22px; font-size: 13px; color: var(--muted); }

.home-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 20px; border-top: 1px solid #ececec; color: inherit; text-decoration: none; }
.home-row:hover { background: #fafafa; }
.home-row > .icon { color: #8a8a8a; }
.home-row-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #f1f1f1; }
.home-row-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.home-row-text strong { font-weight: 600; }
.home-row-text span { font-size: 12px; color: var(--muted); }
.home-orders { margin: 0; padding: 0 0 6px; list-style: none; }
.home-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 20px 8px 68px; color: inherit; text-decoration: none; font-size: 13px; }
a.home-order:hover { background: #fafafa; }
.home-order-text { display: grid; gap: 1px; min-width: 0; }
.home-order-text strong { font-weight: 550; overflow-wrap: anywhere; }
.home-order-text small { font-size: 12px; color: var(--muted); }
.home-order-total { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }

.home-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0 20px; list-style: none; }
.home-counts a { display: grid; gap: 2px; min-height: 64px; padding: 10px 14px; color: inherit; text-decoration: none; border: 1px solid #e3e3e3; border-radius: 10px; }
.home-counts a:hover { border-color: #b5b5b5; background: #fafafa; }
.home-counts strong { font-size: 22px; font-weight: 600; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.home-counts span { font-size: 12px; color: var(--muted); }
.home-counts a.is-warning strong { color: #a33825; }
.home-empty { display: grid; justify-items: start; gap: 12px; padding: 0 20px 20px; color: var(--muted); font-size: 13px; }
.home-empty .button { display: inline-flex; align-items: center; gap: 6px; }
.home-empty-text { padding: 2px 20px 22px; color: var(--muted); font-size: 13px; }

.home-top-list { margin: 0; padding: 0; list-style: none; }
.home-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 68px; padding: 12px 20px; border-top: 1px solid #ececec; color: inherit; text-decoration: none; }
a.home-top:hover { background: #fafafa; }
.home-top-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f1f1f1; }
.home-top-title { font-weight: 550; overflow-wrap: anywhere; }
.home-top-figures { display: grid; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.home-top-figures strong { font-weight: 600; }
.home-top-figures small { font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sales" "attention" "listings" "best"; }
}
@media (max-width: 700px) {
  .home-toolbar { margin-top: 0; }
  .home-periods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
  .home-periods button { min-height: 44px; padding: 6px 2px; }
  .home-measures { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
  .home-measure { min-height: 92px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid #ececec; }
  .home-measure:first-child { grid-column: 1 / -1; }
  .home-measure:nth-child(2n) { border-right: 1px solid #ececec; }
  .home-measure strong { font-size: 21px; }
  .home-panel-heading, .home-row, .home-top { padding-inline: 16px; }
  .home-order { padding: 8px 16px 8px 64px; }
  .home-counts { padding-inline: 16px; }
  .home-caption, .home-empty, .home-empty-text, .home-chart-note { padding-inline: 16px; }
  .home-chart-caption { padding-inline: 16px; }
}
