/* Global Partnership Intelligence — Analytics (Track D). Prefix: gp-ax- */
.gp-ax { --gp-ax-bar: #c9a227; --gp-ax-bar-hover: #e9c46a; --gp-ax-track: rgba(255, 255, 255, 0.06); --gp-ax-grid: rgba(255, 255, 255, 0.07); --gp-ax-ref: #d8d3c6; }

.gp-ax-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.gp-ax-presets { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.gp-ax-preset { background: transparent; color: var(--gp-text); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.gp-ax-preset[aria-pressed="true"] { background: var(--gp-gold-soft); border-color: var(--gp-border-strong); color: var(--gp-gold-2); font-weight: 600; }
.gp-ax-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gp-ax-field > span { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gp-muted); }
.gp-ax-field .gp-input { padding: 8px 10px; font-size: 14px; min-width: 0; }
.gp-ax-field-date .gp-input { width: 150px; }
.gp-ax-field-sel .gp-input { width: 190px; }
.gp-ax-actions { display: inline-flex; gap: 8px; }
.gp-ax-actions .gp-btn { padding: 8px 14px; }

.gp-ax-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 12.5px; color: var(--gp-muted); }
.gp-ax-meta strong { color: var(--gp-text); font-weight: 600; }
.gp-ax-warn { color: var(--gp-warn); }

.gp-ax-body { transition: none; }
.gp-ax-body.is-busy { opacity: 0.55; }

.gp-ax-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 4px; }
.gp-ax-section-head .gp-h3 { margin: 0; }
.gp-ax-links { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.gp-ax-sub { font-size: 12.5px; color: var(--gp-muted); margin: 2px 0 14px; max-width: 80ch; }
.gp-ax-applied { font-size: 12px; color: var(--gp-muted); border: 1px solid var(--gp-border); border-radius: 8px; padding: 6px 10px; margin: 0 0 12px; }

.gp-ax-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gp-ax-kpi { background: linear-gradient(180deg, #17171a, #111113); border: 1px solid var(--gp-border); border-radius: 12px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gp-ax-kpi-value { font-size: 26px; line-height: 1.05; font-weight: 600; color: var(--gp-text); }
.gp-ax-kpi-label { font-size: 12.5px; color: var(--gp-muted); }
.gp-ax-kpi-hint { font-size: 11.5px; color: var(--gp-faint); }

.gp-ax-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gp-ax-block { min-width: 0; }
.gp-ax-block .gp-h4 { margin-top: 6px; }

.gp-ax-bars { margin: 0; padding: 0; list-style: none; }
.gp-ax-bar-row { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
.gp-ax-bar-label { font-size: 13px; color: #d8d3c6; overflow-wrap: anywhere; }
.gp-ax-bar-track { height: 10px; background: var(--gp-ax-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.gp-ax-bar-fill { display: block; height: 100%; width: 100%; background: var(--gp-ax-bar); border-radius: 0 4px 4px 0; transform-origin: left center; }
.gp-ax-bar-row:hover .gp-ax-bar-fill, .gp-ax-bar-row:focus-within .gp-ax-bar-fill { background: var(--gp-ax-bar-hover); }
.gp-ax-bar-value { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--gp-text); }
.gp-ax-bar-value small { color: var(--gp-muted); font-size: 11.5px; margin-left: 6px; }
.gp-ax-bar-row a { color: inherit; text-decoration: none; }
.gp-ax-bar-row a:hover, .gp-ax-bar-row a:focus-visible { color: var(--gp-gold-2); text-decoration: underline; }

.gp-ax-chart { position: relative; width: 100%; }
.gp-ax-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.gp-ax-chart .gp-ax-gridline { stroke: var(--gp-ax-grid); stroke-width: 1; }
.gp-ax-chart .gp-ax-axis { fill: var(--gp-muted); font-size: 11px; font-family: var(--gp-font); font-variant-numeric: tabular-nums; }
.gp-ax-chart .gp-ax-col { fill: var(--gp-ax-bar); }
.gp-ax-chart .gp-ax-col.is-hot { fill: var(--gp-ax-bar-hover); }
.gp-ax-chart .gp-ax-hit { fill: transparent; cursor: default; }
.gp-ax-chart .gp-ax-hit:focus { outline: none; }
.gp-ax-chart .gp-ax-ref { stroke: var(--gp-ax-ref); stroke-width: 1.5; }
.gp-ax-chart .gp-ax-ref-label { fill: var(--gp-ax-ref); font-size: 11px; font-family: var(--gp-font); }
.gp-ax-tip { position: absolute; z-index: 5; pointer-events: none; background: #0b0b0d; border: 1px solid var(--gp-border-strong); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: var(--gp-text); white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.gp-ax-tip strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.gp-ax-tip span { color: var(--gp-muted); }

.gp-ax-meter { margin: 6px 0 12px; }
.gp-ax-meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 5px; }
.gp-ax-meter-head span:last-child { font-variant-numeric: tabular-nums; color: var(--gp-muted); }
.gp-ax-meter-track { height: 8px; border-radius: 999px; background: rgba(76, 195, 138, 0.14); overflow: hidden; }
.gp-ax-meter-fill { display: block; height: 100%; width: 100%; border-radius: 999px; background: var(--gp-ok); transform-origin: left center; }
.gp-ax-meter.is-warn .gp-ax-meter-track { background: rgba(224, 164, 58, 0.16); }
.gp-ax-meter.is-warn .gp-ax-meter-fill { background: var(--gp-warn); }
.gp-ax-meter.is-over .gp-ax-meter-track { background: rgba(229, 96, 90, 0.16); }
.gp-ax-meter.is-over .gp-ax-meter-fill { background: var(--gp-danger); }
.gp-ax-status { font-size: 12px; margin-top: 4px; color: var(--gp-muted); }

.gp-ax-table td.gp-ax-num, .gp-ax-table th.gp-ax-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-ax-table caption { text-align: left; }
.gp-ax-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gp-ax-empty { font-size: 13px; color: var(--gp-muted); border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 14px; margin: 4px 0 8px; }
.gp-ax-hidden { font-size: 13px; color: var(--gp-muted); margin: 0; }
.gp-ax-def { font-size: 12px; color: var(--gp-faint); margin: 10px 0 0; }
.gp-ax-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 0 0 10px; }
.gp-ax-dl div { min-width: 0; }
.gp-ax-dl dt { font-size: 12px; color: var(--gp-muted); }
.gp-ax-dl dd { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; }

@media (max-width: 1080px) {
  .gp-ax-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .gp-ax-filters { flex-direction: column; align-items: stretch; }
  .gp-ax-field-date .gp-input, .gp-ax-field-sel .gp-input { width: 100%; }
  .gp-ax-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .gp-ax-actions .gp-btn { flex: 1; }
  .gp-ax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-ax-kpi-value { font-size: 22px; }
  .gp-ax-bar-row { grid-template-columns: minmax(80px, 40%) minmax(0, 1fr) auto; gap: 8px; }
  .gp-ax-chart svg { height: 160px; }
}

@media (prefers-reduced-motion: no-preference) {
  .gp-ax-body { transition: opacity 0.15s ease; }
  .gp-ax-bar-fill, .gp-ax-meter-fill { transition: transform 0.24s ease-out; }
  .gp-ax-preset { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
}
@media (forced-colors: active) {
  .gp-ax-bar-fill, .gp-ax-meter-fill, .gp-ax-chart .gp-ax-col { forced-color-adjust: none; background: CanvasText; fill: CanvasText; }
}
