/* Performance (v1.19.2) — technical monitoring of the service, styles scoped under #tab-performance (test-enforced, like dashboard.css).
   The chart (ec-*) and click-log table (log-table…) rules are the ones the Dashboard uses (they used to live under #tab-dashboard only:
   the Log tab moved here), re-scoped; the monitoring layout (perf-*) is new. */
@media (max-width: 760px) { #tab-performance .funnel {flex-wrap:wrap; row-gap:8px;} #tab-performance .funnel-stage {flex:1 1 90px;} }
#tab-performance .log-table {width:100%; border-collapse:collapse; font-size:12.5px; background:var(--surface); border:1px solid var(--line); border-radius:10px; overflow:hidden;}
#tab-performance .log-table th {text-align:left; font-family:'Outfit',sans-serif; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--gray); font-weight:700; padding:9px 12px; border-bottom:1px solid var(--line); white-space:nowrap;}
#tab-performance .log-table td {padding:9px 12px; border-bottom:1px solid var(--line); vertical-align:top;}
#tab-performance .log-table tr:last-child td {border-bottom:none;}
#tab-performance .log-table tr:hover td {background:var(--bg);}
#tab-performance .log-table .params-cell {font-size:11.5px; color:var(--text); max-width:420px; cursor:help;}
#tab-performance .params-line {white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
#tab-performance .params-k {color:var(--gray);}
#tab-performance .params-link {color:var(--accent); text-decoration:none;}
#tab-performance .params-link:hover {text-decoration:underline;}
#tab-performance .log-table .duration-cell {font-family:'Outfit',sans-serif; font-weight:700; white-space:nowrap;}
#tab-performance .click-id-cell {display:flex; align-items:center; gap:6px; white-space:nowrap;}
#tab-performance .click-id-cell code {font-family:monospace; font-size:11px; color:var(--text);}
#tab-performance .copy-btn {display:flex; align-items:center; justify-content:center; width:22px; height:22px; flex-shrink:0; background:none; border:1px solid var(--line); border-radius:5px; cursor:pointer; color:var(--gray);}
#tab-performance .copy-btn:hover {border-color:var(--accent); color:var(--text);}
#tab-performance .copy-btn svg {width:11px; height:11px;}
#tab-performance .copy-btn.copied {border-color:#2f9e5c; color:#2f9e5c;}
#tab-performance .path-badge {font-family:'Outfit',sans-serif; font-size:10px; font-weight:700; letter-spacing:.04em; padding:2px 7px; border-radius:4px; white-space:nowrap;}
#tab-performance .path-badge.legacy {background:rgba(255,255,255,.08); color:var(--gray);}
#tab-performance .path-badge.redirect {background:rgba(120,214,156,.16); color:#2f9e5c;}
#tab-performance .path-badge.card {background:rgba(120,160,230,.18); color:#4a74c9;}
#tab-performance .log-host {display:block; max-width:340px; overflow-wrap:anywhere; font-weight:600; font-size:12px;}

/* ---- layout ---- */
#tab-performance .perf-head {display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:12px 24px; margin-bottom:6px;}
#tab-performance .perf-head h2 {margin:0 0 4px;}
#tab-performance .perf-intro {font-size:12.5px; color:var(--gray); margin:0; max-width:640px;}
#tab-performance .perf-controls {display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
#tab-performance .perf-period {display:flex; align-items:center; gap:8px; font-size:12px; color:var(--gray);}
#tab-performance .perf-tabs {display:flex; gap:6px; margin:14px 0 20px; border-bottom:1px solid var(--line); overflow-x:auto;}
#tab-performance .perf-tab {font-family:'Outfit',sans-serif; font-size:13.5px; font-weight:600; color:var(--gray); background:none; border:none; padding:10px 4px; cursor:pointer; border-bottom:2px solid transparent; margin-right:18px; white-space:nowrap;}
#tab-performance .perf-tab.active {color:var(--text); border-bottom-color:var(--gold);}
#tab-performance .perf-panel {display:none;}
#tab-performance .perf-panel.active {display:block;}
#tab-performance .perf-h {font-family:'Outfit',sans-serif; font-size:14px; margin:26px 0 4px;}
#tab-performance .perf-h:first-of-type {margin-top:4px;}
#tab-performance .perf-h code {font-size:12px; font-weight:500;}
#tab-performance .perf-sub {font-size:12.5px; color:var(--gray); margin:0 0 12px; max-width:880px;}
#tab-performance .perf-notice {font-size:12.5px; padding:9px 12px; border:1px solid var(--line); border-left:3px solid var(--taste); border-radius:8px; background:var(--surface); margin-bottom:14px;}
#tab-performance .perf-card {background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:16px; min-width:0;}
#tab-performance .perf-card h4 {font-family:'Outfit',sans-serif; font-size:13px; margin:0 0 10px;}
#tab-performance .perf-hint {font-weight:400; font-size:11.5px; color:var(--gray); margin-left:6px;}
#tab-performance .perf-grid {display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:16px;}
#tab-performance .perf-scroll {overflow-x:auto;}
#tab-performance .perf-error {color:var(--red);}
#tab-performance .empty-note {font-size:13px; color:var(--gray); padding:14px 4px;}

/* KPI tiles */
#tab-performance .perf-kpis {display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:12px; margin-bottom:14px;}
#tab-performance .perf-kpi {background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 14px; min-width:0;}
#tab-performance .perf-kpi .k {font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--gray); font-weight:700;}
#tab-performance .perf-kpi .v {font-family:'Fraunces',serif; font-size:24px; font-weight:600; line-height:1.15; margin-top:4px; color:var(--text);}
#tab-performance .perf-kpi .v small {font-family:'Outfit',sans-serif; font-size:12px; font-weight:500; color:var(--gray); margin-left:2px;}
#tab-performance .perf-kpi .s {font-size:11.5px; color:var(--gray); margin-top:3px;}
#tab-performance .perf-kpi.ok {border-left:3px solid var(--ec-hit);}
#tab-performance .perf-kpi.warn {border-left:3px solid var(--ec-stale);}
#tab-performance .perf-kpi.bad {border-left:3px solid var(--ec-miss);}

/* compact tables inside cards */
#tab-performance .mon-table {width:100%; border-collapse:collapse; font-size:12.5px;}
#tab-performance .mon-table th {text-align:left; font-family:'Outfit',sans-serif; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--gray); font-weight:700; padding:6px 8px; border-bottom:1px solid var(--line); white-space:nowrap;}
#tab-performance .mon-table td {padding:7px 8px; border-bottom:1px solid var(--line); vertical-align:middle;}
#tab-performance .mon-table tr:last-child td {border-bottom:none;}
#tab-performance .mon-table .num, #tab-performance .log-table .num {text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums;}
#tab-performance .mon-table .name {max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
#tab-performance .mon-bar {display:inline-block; height:6px; border-radius:3px; background:var(--c, var(--ec-load)); vertical-align:middle; margin-right:6px; min-width:2px;}
#tab-performance .mon-bar.hit {--c:var(--ec-hit);} #tab-performance .mon-bar.stale {--c:var(--ec-stale);} #tab-performance .mon-bar.miss {--c:var(--ec-miss);}
#tab-performance .tone-ok {color:var(--ec-hit);} #tab-performance .tone-warn {color:var(--ec-stale);} #tab-performance .tone-bad {color:var(--ec-miss);}
#tab-performance .cache-pill {font-family:'Outfit',sans-serif; font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 7px; border-radius:4px; white-space:nowrap;}
#tab-performance .cache-pill.hit {background:color-mix(in srgb, var(--ec-hit) 16%, transparent); color:var(--ec-hit);}
#tab-performance .cache-pill.stale {background:color-mix(in srgb, var(--ec-stale) 16%, transparent); color:var(--ec-stale);}
#tab-performance .cache-pill.miss {background:color-mix(in srgb, var(--ec-miss) 16%, transparent); color:var(--ec-miss);}
#tab-performance .log-table code {font-family:monospace; font-size:11px;}
#tab-performance .log-table .muted, #tab-performance .mon-table .muted {color:var(--gray);}
#tab-performance .log-table .sub {font-size:11px; color:var(--gray);}
@media (max-width: 760px) { #tab-performance .perf-grid {grid-template-columns:1fr;} #tab-performance .perf-kpis {grid-template-columns:repeat(2, 1fr);} }
#tab-performance .log-table td:first-child {white-space:nowrap;}
/* v1.55.0 — "Requests received": a day with pages served but no impression recorded */
#tab-performance .perf-req-warn td {background:rgba(255,184,77,.10);}
#tab-performance .perf-req-warn td:last-child {color:#d98a00; font-weight:600;}
