/* Phase 2 area F5 styles — owned by agent F5 (Analytics · Performance + Data quality). */

.view-performance {
  --f5-c-planned: #D0D5DD;
  --f5-c-late:    #F97066;
  --f5-m-multi:   #667085;
}

/* ── filter bar ───────────────────────────────────────────────────────── */
.view-performance .f5-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px;
  margin-top: 20px; padding: 14px 16px; border: 1px solid var(--anx-line, #EAECF0);
  border-radius: 12px; background: var(--anx-surface, #fff);
}
.view-performance .f5-fgrp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.view-performance .f5-fgrp-wide { flex: 1 1 320px; }
.view-performance .f5-flbl {
  font: 600 11px/16px var(--anx-mono, ui-monospace, monospace); letter-spacing: .07em;
  text-transform: uppercase; color: var(--anx-fg-4, #667085);
}
.view-performance .f5-seg {
  display: inline-flex; border: 1px solid var(--anx-line-2, #D0D5DD); border-radius: 8px; overflow: hidden;
}
.view-performance .f5-seg-b {
  border: 0; background: var(--anx-surface, #fff); padding: 6px 12px; font-size: 13px; cursor: pointer;
  color: var(--anx-fg-2, #344054); border-left: 1px solid var(--anx-line-2, #D0D5DD);
}
.view-performance .f5-seg-b:first-child { border-left: 0; }
.view-performance .f5-seg-b.on { background: var(--anx-brand, #6941C6); color: #fff; }
.view-performance .f5-clear { align-self: flex-end; }
.view-performance .f5-none { font-size: 13px; color: var(--anx-fg-4, #667085); }
.view-performance .f5-tabcnt:empty { display: none; }
.view-performance .f5-tabcnt {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--anx-brand-bg, #F4EBFF); color: var(--anx-brand, #6941C6);
}

/* ── KPI tiles: six compact tiles ─────────────────────────────────────── */
.view-performance [hidden] { display: none !important; }
.view-performance .f5-metrics {
  display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 20px;
}
.view-performance .f5-metric { min-width: 0 !important; gap: 10px; padding: 16px !important; }
.view-performance .f5-metric .anx-m-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .view-performance .f5-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .view-performance .f5-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.view-performance #anxStatusBody .anx-legend, .view-performance #anxStatusBody [class*="legend"] { min-width: 190px; }
.view-performance .f5-lg { white-space: nowrap; }
.view-performance .f5-metric.click { cursor: pointer; }
.view-performance .f5-metric.click:hover { border-color: var(--anx-brand, #6941C6); }
.view-performance .f5-metric .anx-m-num { font-size: 30px; }
.view-performance .f5-metric.good .anx-m-num { color: var(--anx-ontime, #17B26A); }
.view-performance .f5-metric.warn .anx-m-num { color: var(--anx-c-atrisk, #F79009); }
.view-performance .f5-metric.bad  .anx-m-num { color: var(--anx-c-delayed, #D43A3A); }
.view-performance .f5-metric .anx-spark { height: 40px; }

/* ── legends as buttons ───────────────────────────────────────────────── */
.view-performance .f5-lg {
  border: 0; background: transparent; padding: 2px 4px; margin: 0 -4px; border-radius: 6px;
  cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%;
}
.view-performance .f5-lg:hover { background: var(--anx-surface-2, #F9FAFB); }

/* ── delay causes ─────────────────────────────────────────────────────── */
.view-performance .f5-causes { display: flex; flex-direction: column; gap: 10px; }
.view-performance .f5-cause {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--anx-line, #EAECF0); border-radius: 10px; background: var(--anx-surface, #fff); font: inherit; color: inherit;
}
.view-performance .f5-cause:hover { border-color: var(--anx-brand, #6941C6); }
.view-performance .f5-cause-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.view-performance .f5-cause-top .nm { font-weight: 500; color: var(--anx-ink, #101828); }
.view-performance .f5-cause-top .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.view-performance .f5-cause-sub { font-size: 12px; color: var(--anx-fg-4, #667085); }
.view-performance .f5-cause .anx-bar i { background: var(--anx-c-delayed, #D43A3A); }

/* ── table header actions + watchlist ─────────────────────────────────── */
.view-performance .f5-ch-actions { display: flex; gap: 8px; align-items: center; }
.view-performance .f5-watch td { vertical-align: top; }
.view-performance .f5-mode {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px;
  background: var(--anx-surface-2, #F2F4F7); color: var(--anx-fg-3, #475467);
}
.view-performance .f5-alert { max-width: 280px; font-size: 13px; color: var(--anx-fg-3, #475467); }
.view-performance .f5-drow { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.view-performance .f5-drow:hover { background: var(--anx-surface-2, #F9FAFB); }
.view-performance .f5-drawer-acts { margin-top: 16px; display: flex; justify-content: flex-end; }

@media (max-width: 900px) {
  .view-performance .f5-ch-actions { flex-wrap: wrap; }
}
