/* Visits & Samples page — re-uses the cockpit's design tokens via
   rep-dashboard.css. Layout-only here. */

.vp-main {
    max-width: 1280px; margin: 0 auto; padding: 18px 22px 80px;
    display: flex; flex-direction: column; gap: 16px;
}

/* ── Filters bar ─────────────────────────────────────────────── */
.vp-filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); padding: 12px 14px;
}
.vp-filter-group {
    display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.vp-filter-group label {
    font-size: 10px; font-weight: 700; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.vp-pills { display: flex; gap: 4px; }
.vp-pill {
    background: var(--surface-2); color: var(--ink-2);
    border: 1px solid var(--hairline); border-radius: 999px;
    padding: 5px 11px; font-size: 11px; font-weight: 600; cursor: pointer;
}
.vp-pill:hover { border-color: var(--ink-3); }
.vp-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.vp-select {
    padding: 6px 10px; border: 1px solid var(--hairline); border-radius: 6px;
    background: var(--surface-2); color: var(--ink); font-size: 12px;
    min-width: 140px;
}
.vp-clear {
    margin-left: auto; align-self: flex-end;
    background: transparent; color: var(--ink-3); border: 1px solid var(--hairline);
    padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.vp-clear:hover { color: var(--bad); border-color: var(--bad); }

/* ── KPI strip ───────────────────────────────────────────────── */
.vp-kpis {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.vp-kpi {
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); padding: 12px 14px;
    display: flex; flex-direction: column; gap: 4px;
}
.vp-kpi-lbl {
    font-size: 10px; font-weight: 700; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.vp-kpi-val {
    font-size: 22px; font-weight: 700; color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* ── Cards ───────────────────────────────────────────────────── */
.vp-card {
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: var(--radius-sm); overflow: hidden;
}
.vp-card > header {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 12px 16px; border-bottom: 1px solid var(--hairline);
}
.vp-card > header h3 { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0; text-transform: uppercase; letter-spacing: 0.04em; }
.vp-card-meta { font-size: 11px; color: var(--ink-mute); }

/* ── Weekly chart ────────────────────────────────────────────── */
.vp-week-chart {
    display: grid; grid-template-columns: repeat(13, 1fr);
    align-items: end; gap: 6px;
    padding: 18px 16px 12px; height: 180px;
}
.vp-week-bar-wrap {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 6px; height: 100%; min-width: 0;
}
.vp-week-bar {
    width: 100%; background: var(--accent); border-radius: 4px 4px 0 0;
    min-height: 2px; transition: background 120ms ease;
    position: relative;
}
.vp-week-bar:hover { background: var(--accent-ink, var(--ink)); }
.vp-week-bar-num {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    font-size: 10px; font-weight: 700; color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.vp-week-bar-lbl {
    font-size: 9px; color: var(--ink-mute); text-align: center;
    font-variant-numeric: tabular-nums; line-height: 1.2;
    white-space: nowrap;
}

/* ── Tables ──────────────────────────────────────────────────── */
.vp-table-wrap { overflow-x: auto; }
.vp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vp-table thead th {
    text-align: left; font-size: 10px; font-weight: 700; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 10px 12px; border-bottom: 1px solid var(--hairline);
    background: var(--surface-2); cursor: pointer; white-space: nowrap;
    user-select: none;
}
.vp-table thead th.num { text-align: right; }
.vp-table thead th.sort-active { color: var(--ink); }
.vp-table thead th:hover { color: var(--ink); }
.vp-table tbody tr { border-bottom: 1px solid var(--hairline); }
.vp-table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
.vp-table tbody td {
    padding: 10px 12px; color: var(--ink-2); vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.vp-table tbody td.num { text-align: right; }
.vp-table tbody td.name { color: var(--ink); font-weight: 600; }
.vp-table .vp-empty {
    text-align: center; color: var(--ink-faint); font-style: italic;
    padding: 28px 12px;
}

/* Outcome chip mix in the SKU table */
.vp-mix { display: inline-flex; gap: 4px; }
.vp-mix-chip {
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
    background: var(--surface-2); color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.02em;
}
.vp-mix-chip.ordered  { background: var(--good-bg);   color: var(--good); }
.vp-mix-chip.sampled  { background: var(--accent-bg); color: var(--accent-ink); }
.vp-mix-chip.declined { background: var(--bad-bg);    color: var(--bad); }
.vp-mix-chip.follow_up{ background: var(--warn-bg);   color: var(--warn); }

/* Conversion % colors */
.vp-conv-pct.high { color: var(--good); font-weight: 700; }
.vp-conv-pct.mid  { color: var(--ink-2); font-weight: 600; }
.vp-conv-pct.zero { color: var(--ink-faint); }

/* Responsive */
@media (max-width: 900px) {
    .vp-kpis { grid-template-columns: repeat(3, 1fr); }
    .vp-week-chart { grid-template-columns: repeat(13, 1fr); height: 140px; }
}
@media (max-width: 600px) {
    .vp-kpis { grid-template-columns: repeat(2, 1fr); }
    .vp-filters { padding: 10px; gap: 10px; }
}
