/* Performance scope is isolated from the legacy and other V2 dashboards. */
.pe-performance {
  --ppe-text: #11213d;
  --ppe-muted: #596b88;
  --ppe-subtle: #8794ad;
  --ppe-card: #ffffff;
  --ppe-soft: #f5f7fc;
  --ppe-line: #dfe6f2;
  --ppe-blue: #1a55b9;
  --ppe-blue-soft: #eef4ff;
  --ppe-critical: #c64350;
  --ppe-attention: #a96612;
  --ppe-good: #16805b;
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  min-width: 0;
  color: var(--ppe-text);
  font-family: inherit;
  line-height: 1.5;
}
.pe-v2[data-theme="dark"] .pe-performance,
[data-theme="dark"] .pe-performance,
.pe-performance[data-theme="dark"] {
  --ppe-text: #edf3ff;
  --ppe-muted: #a8b7d0;
  --ppe-subtle: #899ab7;
  --ppe-card: #17243b;
  --ppe-soft: #122036;
  --ppe-line: #2d405e;
  --ppe-blue: #96b9ff;
  --ppe-blue-soft: #21385e;
  --ppe-critical: #ff9ba4;
  --ppe-attention: #ffd086;
  --ppe-good: #76d9b2;
}
.pe-performance *, .pe-performance *::before, .pe-performance *::after { box-sizing: border-box; }
.pe-performance h1, .pe-performance h2, .pe-performance h3, .pe-performance p, .pe-performance ul { margin: 0; }
.pe-performance h1 { font-size: clamp(27px, 3vw, 34px); line-height: 1.2; font-weight: 850; letter-spacing: -.8px; }
.pe-performance h2 { font-size: 19px; line-height: 1.35; font-weight: 800; letter-spacing: -.25px; }
.pe-performance h3 { font-size: 14px; line-height: 1.4; font-weight: 750; }
.pe-performance button, .pe-performance input, .pe-performance select { font: inherit; }
.pe-performance button { cursor: pointer; }
.pe-performance button:disabled { cursor: default; opacity: .55; }
.pe-performance button:focus-visible, .pe-performance input:focus-visible, .pe-performance select:focus-visible, .pe-performance summary:focus-visible, .pe-performance h2:focus-visible {
  outline: 3px solid #6b9cf0;
  outline-offset: 4px;
}
.pe-performance button, .pe-performance input, .pe-performance select { -webkit-tap-highlight-color: transparent; }
.pe-performance .ppe-card { background: var(--ppe-card); border: 1px solid var(--ppe-line); border-radius: 19px; padding: 24px; min-width: 0; box-shadow: 0 2px 4px #172d4a03; }
.pe-performance .ppe-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.pe-performance .ppe-eyebrow { font-size: 11px; letter-spacing: .75px; text-transform: uppercase; font-weight: 750; color: var(--ppe-subtle); }
.pe-performance .ppe-page-kicker { margin-bottom: 7px; color: var(--ppe-blue); }
.pe-performance .ppe-subtitle { font-size: 14px; color: var(--ppe-muted); margin-top: 9px; max-width: 720px; }
.pe-performance .ppe-page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.pe-performance .ppe-periods { padding: 4px; border-radius: 13px; display: inline-flex; flex-wrap: wrap; background: var(--ppe-soft); border: 1px solid var(--ppe-line); gap: 3px; }
.pe-performance .ppe-periods button { border: 0; color: var(--ppe-muted); font-size: 12px; font-weight: 700; background: transparent; padding: 10px 14px; border-radius: 9px; min-height: 40px; }
.pe-performance .ppe-periods button[aria-pressed="true"] { color: #fff; background: #1a55b9; box-shadow: 0 2px 4px #1351b41c; }
.pe-performance .ppe-periods button:hover:not([aria-pressed="true"]) { background: var(--ppe-card); }
.pe-performance .ppe-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 17px; border: 1px solid var(--ppe-line); border-radius: 11px; font-size: 13px; font-weight: 750; color: var(--ppe-text); background: var(--ppe-card); line-height: 1.35; text-decoration: none; }
.pe-performance .ppe-button:hover:not(:disabled) { border-color: var(--ppe-blue); color: var(--ppe-blue); }
.pe-performance .ppe-button-primary { background: #1a55b9; border-color: #1a55b9; color: #fff; box-shadow: 0 3px 0 #143f8b; }
.pe-performance .ppe-button-primary:hover:not(:disabled) { color: #fff; background: #144aab; }
.pe-performance .ppe-export { white-space: nowrap; }
.pe-performance .ppe-export > span { font-size: 19px; line-height: 1; }
.pe-performance .ppe-caption { font-size: 12px; color: var(--ppe-muted); line-height: 1.6; margin-top: 5px; }
.pe-performance .ppe-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ppe-blue-soft); border: 1px solid var(--ppe-line); color: var(--ppe-text); border-radius: 13px; padding: 13px 16px; font-size: 13px; }
.pe-performance .ppe-status-attention { border-color: color-mix(in srgb, var(--ppe-attention) 40%, var(--ppe-line)); }
.pe-performance .ppe-status-attention > span { flex: 1; min-width: 210px; }
.pe-performance .ppe-status-error { color: var(--ppe-critical); border-color: color-mix(in srgb, var(--ppe-critical) 40%, var(--ppe-line)); }
.pe-performance .ppe-spinner { border: 2px solid var(--ppe-line); border-top-color: var(--ppe-blue); width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px; animation: ppe-spin .8s linear infinite; }
@keyframes ppe-spin { to { transform: rotate(360deg); } }
.pe-performance .ppe-custom-period { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 17px 20px; border: 1px solid var(--ppe-line); border-radius: 15px; background: var(--ppe-card); }
.pe-performance .ppe-custom-period label, .pe-performance .ppe-search-sort label { display: flex; flex-direction: column; gap: 6px; color: var(--ppe-muted); font-size: 12px; font-weight: 700; }
.pe-performance .ppe-custom-period input, .pe-performance .ppe-search-sort input, .pe-performance .ppe-search-sort select { min-height: 41px; border: 1px solid var(--ppe-line); border-radius: 9px; padding: 9px 12px; color: var(--ppe-text); background: var(--ppe-card); min-width: 0; width: 100%; }
.pe-performance .ppe-custom-period input { min-width: 165px; }
.pe-performance .ppe-custom-period > .ppe-caption { align-self: center; margin-left: 5px; }
.pe-performance .ppe-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pe-performance .ppe-kpi { min-height: 143px; padding: 22px 24px; }
.pe-performance .ppe-kpi-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: clamp(24px, 3.2vw, 31px); line-height: 1.15; font-weight: 850; letter-spacing: -.6px; margin: 14px 0 9px; }
.pe-performance .ppe-kpi small { color: var(--ppe-muted); font-size: 11px; }
.pe-performance .ppe-comparison { font-size: 11px; color: var(--ppe-muted); letter-spacing: normal; font-weight: 750; }
.pe-performance .ppe-comparison.is-positive { color: var(--ppe-good); }
.pe-performance .ppe-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pe-performance .ppe-chart { padding: 21px 23px; }
.pe-performance .ppe-chart h2 { font-size: 16px; }
.pe-performance .ppe-chart .ppe-caption { min-height: 37px; font-size: 11px; }
.pe-performance .ppe-bars { display: flex; gap: 16px; align-items: flex-end; height: 154px; margin-top: 14px; padding: 0 5px; }
.pe-performance .ppe-bar-column { display: flex; flex-direction: column; flex: 1; min-width: 0; align-items: center; height: 100%; }
.pe-performance .ppe-bar-track { height: 125px; width: 100%; max-width: 37px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-top: 22px; }
.pe-performance .ppe-bar-value { font-size: 10px; font-weight: 800; color: var(--ppe-text); margin-bottom: 7px; white-space: nowrap; }
.pe-performance .ppe-bar { min-height: 3px; width: 100%; background: var(--ppe-chart-color); border-radius: 9px 9px 3px 3px; flex-shrink: 1; max-height: 103px; }
.pe-performance .ppe-bar-column.is-empty .ppe-bar { background: var(--ppe-line); height: 3px; }
.pe-performance .ppe-bar-label { font-size: 10px; color: var(--ppe-muted); margin-top: 8px; white-space: nowrap; }
.pe-performance .ppe-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.pe-performance .ppe-scope { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--ppe-soft); border: 1px solid var(--ppe-line); border-radius: 8px; font-size: 11px; color: var(--ppe-muted); font-weight: 650; }
.pe-performance .ppe-subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 16px; }
.pe-performance .ppe-subject-card { padding: 20px 17px 15px; color: var(--ppe-text); border: 1px solid var(--ppe-line); background: linear-gradient(155deg, var(--ppe-soft), var(--ppe-card) 67%); border-radius: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; position: relative; transition: border-color .16s, transform .16s, box-shadow .16s; }
.pe-performance .ppe-subject-card:hover { transform: translateY(-2px); border-color: var(--ppe-subject-color); box-shadow: 0 6px 18px #132e5610; }
.pe-performance .ppe-subject-card.is-selected { border-color: var(--ppe-subject-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ppe-subject-color) 25%, transparent); }
.pe-performance .ppe-subject-name { display: block; font-weight: 800; font-size: 15px; min-height: 23px; overflow-wrap: anywhere; }
.pe-performance .ppe-donut { width: 122px; height: 122px; display: grid; place-items: center; position: relative; margin: 14px 0 8px; }
.pe-performance .ppe-donut svg { width: 100%; height: 100%; position: absolute; inset: 0; transform: rotate(-90deg); }
.pe-performance .ppe-donut-track { stroke: var(--ppe-line); fill: none; stroke-width: 11; }
.pe-performance .ppe-donut-value { stroke: var(--ppe-subject-color); fill: none; stroke-width: 11; stroke-linecap: round; }
.pe-performance .ppe-donut-text { font-size: 25px; font-weight: 850; letter-spacing: -.4px; }
.pe-performance .ppe-donut-text.is-empty { color: var(--ppe-subtle); }
.pe-performance .ppe-subject-result { font-size: 12px; color: var(--ppe-muted); font-weight: 650; }
.pe-performance .ppe-subject-topic-count { font-size: 11px; color: var(--ppe-subtle); margin-top: 4px; }
.pe-performance .ppe-subject-link { font-size: 12px; margin-top: 14px; font-weight: 800; color: var(--ppe-blue); }
.pe-performance .ppe-subject-link > span { margin-left: 7px; }
.pe-performance .ppe-reconciliation { border-top: 1px solid var(--ppe-line); margin-top: 22px; padding-top: 15px; font-size: 12px; color: var(--ppe-muted); }
.pe-performance .ppe-history-notes { padding-top: 12px; color: var(--ppe-muted); font-size: 12px; }
.pe-performance .ppe-history-notes summary { cursor: pointer; font-weight: 750; color: var(--ppe-blue); }
.pe-performance .ppe-history-notes ul { padding-left: 20px; margin-top: 9px; }
.pe-performance .ppe-history-notes li + li { margin-top: 6px; }
.pe-performance .ppe-topics { scroll-margin-top: 24px; }
.pe-performance .ppe-back { margin-bottom: 20px; color: var(--ppe-blue); background: var(--ppe-blue-soft); border-color: transparent; }
.pe-performance .ppe-subject-summary { font-size: 21px; font-weight: 850; color: var(--ppe-blue); text-align: right; }
.pe-performance .ppe-subject-summary small { display: block; font-size: 11px; color: var(--ppe-muted); font-weight: 600; margin-top: 3px; }
.pe-performance .ppe-topic-tools { padding: 18px 0 20px; border-top: 1px solid var(--ppe-line); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pe-performance .ppe-filters { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 2px; }
.pe-performance .ppe-filters button { min-height: 36px; padding: 8px 12px; font-size: 11px; font-weight: 750; color: var(--ppe-muted); border: 1px solid var(--ppe-line); border-radius: 22px; background: var(--ppe-card); }
.pe-performance .ppe-filters button[aria-pressed="true"] { background: #1a55b9; color: #fff; border-color: #1a55b9; }
.pe-performance .ppe-filters button:hover:not([aria-pressed="true"]) { background: var(--ppe-soft); color: var(--ppe-blue); }
.pe-performance .ppe-search-sort { display: flex; gap: 12px; flex: 1; max-width: 480px; min-width: min(100%, 310px); }
.pe-performance .ppe-search { flex: 1; }
.pe-performance .ppe-sort { width: 150px; }
.pe-performance .ppe-search-sort input::placeholder { color: var(--ppe-subtle); }
.pe-performance .ppe-topic-grid { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 14px; }
.pe-performance .ppe-topic-card { border: 1px solid var(--ppe-line); border-radius: 14px; padding: 17px; min-height: 175px; display: flex; flex-direction: column; align-items: flex-start; background: var(--ppe-card); overflow: hidden; }
.pe-performance .ppe-topic-title { width: 100%; margin-bottom: 15px; flex: 1; }
.pe-performance .ppe-topic-title h3 { font-size: 12px; font-weight: 750; overflow-wrap: anywhere; color: var(--ppe-text); }
.pe-performance .ppe-topic-subject { font-size: 10px; color: var(--ppe-subtle); margin-top: 4px; display: block; }
.pe-performance .ppe-topic-pct { font-size: 26px; font-weight: 850; line-height: 1.2; letter-spacing: -.5px; }
.pe-performance .ppe-topic-count { color: var(--ppe-muted); font-size: 10px; margin-top: 5px; line-height: 1.5; }
.pe-performance .ppe-topic-track { display: block; width: 100%; height: 5px; border-radius: 6px; background: var(--ppe-soft); overflow: hidden; margin-top: 15px; }
.pe-performance .ppe-topic-track > span { display: block; height: 100%; border-radius: 6px; background: var(--ppe-blue); }
.pe-performance .ppe-topic-card.is-critical .ppe-topic-pct { color: var(--ppe-critical); }
.pe-performance .ppe-topic-card.is-critical .ppe-topic-track > span { background: var(--ppe-critical); }
.pe-performance .ppe-topic-card.is-attention .ppe-topic-pct { color: var(--ppe-attention); }
.pe-performance .ppe-topic-card.is-attention .ppe-topic-track > span { background: var(--ppe-attention); }
.pe-performance .ppe-topic-card.is-good .ppe-topic-pct { color: var(--ppe-good); }
.pe-performance .ppe-topic-card.is-good .ppe-topic-track > span { background: var(--ppe-good); }
.pe-performance .ppe-topic-card.is-empty { background: var(--ppe-soft); border-style: dashed; }
.pe-performance .ppe-topic-card.is-empty .ppe-topic-pct { color: var(--ppe-muted); font-size: 20px; letter-spacing: -.2px; }
.pe-performance .ppe-topic-card.is-empty .ppe-topic-track { background: var(--ppe-line); }
.pe-performance .ppe-show-all { display: flex; justify-content: center; margin-top: 22px; }
.pe-performance .ppe-empty { border: 1px dashed var(--ppe-line); background: var(--ppe-soft); border-radius: 14px; padding: 35px 20px; text-align: center; color: var(--ppe-muted); }
.pe-performance .ppe-empty p { margin: 7px 0 16px; font-size: 13px; }
.pe-performance .ppe-empty h3 { color: var(--ppe-text); font-size: 16px; }
.pe-performance .ppe-empty-inline { padding: 20px 0; font-size: 13px; color: var(--ppe-muted); }
.pe-performance .ppe-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: 4px 2px 15px; }
.pe-performance .ppe-footer h2 { font-size: 17px; }
.pe-performance .ppe-footer p { max-width: 820px; font-size: 12px; color: var(--ppe-muted); margin-top: 7px; }
@media (max-width: 1100px) {
  .pe-performance .ppe-charts { gap: 14px; }
  .pe-performance .ppe-chart { padding: 19px 17px; }
  .pe-performance .ppe-bars { gap: 10px; }
  .pe-performance .ppe-kpi { padding: 19px; }
  .pe-performance .ppe-kpi-value { font-size: 28px; }
  .pe-performance .ppe-subject-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
}
@media (max-width: 760px) {
  .pe-performance { gap: 18px; }
  .pe-performance .ppe-card { padding: 20px; border-radius: 16px; }
  .pe-performance .ppe-page-actions { padding-top: 0; width: 100%; }
  .pe-performance .ppe-periods { flex: 1; }
  .pe-performance .ppe-periods button { padding: 9px 12px; }
  .pe-performance .ppe-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pe-performance .ppe-kpi { min-height: 128px; padding: 19px; }
  .pe-performance .ppe-charts { grid-template-columns: 1fr; }
  .pe-performance .ppe-chart .ppe-caption { min-height: 0; }
  .pe-performance .ppe-chart { padding: 19px 22px; }
  .pe-performance .ppe-bars { gap: 16px; }
  .pe-performance .ppe-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pe-performance .ppe-subject-card { padding: 17px 10px 14px; }
  .pe-performance .ppe-donut { height: 110px; width: 110px; }
  .pe-performance .ppe-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .pe-performance .ppe-topic-card { padding: 14px; min-height: 175px; }
  .pe-performance .ppe-section-head { margin-bottom: 18px; }
  .pe-performance .ppe-section-head h2 { font-size: 18px; }
  .pe-performance .ppe-search-sort { max-width: none; width: 100%; min-width: 0; }
  .pe-performance .ppe-topic-tools { gap: 16px; }
  .pe-performance .ppe-topic-title h3 { font-size: 11.5px; }
  .pe-performance .ppe-subject-name { font-size: 14px; }
}
@media (max-width: 430px) {
  .pe-performance .ppe-card { padding: 17px; }
  .pe-performance .ppe-page-head { gap: 17px; }
  .pe-performance .ppe-page-actions { gap: 9px; }
  .pe-performance .ppe-export { width: 100%; }
  .pe-performance .ppe-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pe-performance .ppe-periods button { min-height: 39px; padding: 8px 6px; white-space: nowrap; }
  .pe-performance .ppe-kpis { gap: 10px; }
  .pe-performance .ppe-kpi { padding: 17px 14px; }
  .pe-performance .ppe-kpi-value { font-size: 26px; gap: 8px; }
  .pe-performance .ppe-eyebrow { font-size: 9px; }
  .pe-performance .ppe-subject-grid { gap: 10px; }
  .pe-performance .ppe-donut { width: 101px; height: 101px; }
  .pe-performance .ppe-subject-card { padding: 15px 8px 13px; }
  .pe-performance .ppe-subject-result { font-size: 11px; }
  .pe-performance .ppe-filters { gap: 5px; }
  .pe-performance .ppe-filters button { padding: 8px 10px; font-size: 10px; }
  .pe-performance .ppe-sort { width: 133px; }
  .pe-performance .ppe-topic-grid { gap: 9px; }
  .pe-performance .ppe-topic-card { padding: 12px; }
  .pe-performance .ppe-topic-pct { font-size: 25px; }
  .pe-performance .ppe-custom-period > label { width: 100%; }
  .pe-performance .ppe-custom-period input { min-width: 0; }
  .pe-performance .ppe-custom-period > .ppe-caption { margin-left: 0; }
  .pe-performance .ppe-subject-summary { text-align: left; font-size: 20px; }
  .pe-performance .ppe-button-primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pe-performance *, .pe-performance *::before, .pe-performance *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .pe-performance .ppe-page-actions, .pe-performance .ppe-topic-tools, .pe-performance .ppe-back, .pe-performance .ppe-show-all, .pe-performance .ppe-footer > button { display: none; }
  .pe-performance { color: #11213d; }
  .pe-performance .ppe-card, .pe-performance .ppe-subject-card, .pe-performance .ppe-topic-card { break-inside: avoid; box-shadow: none; }
}
