/* VIS Athlete 360 — Design System v2 */

:root {
  --vis-navy: #0b233f;
  --vis-blue: #002c76;
  --vis-gold: #f8981d;
  --vis-green: #1f9d6b;
  --vis-red: #d8504d;
  --vis-gold-light: rgba(248, 152, 29, 0.14);
  --vis-green-light: rgba(31, 157, 107, 0.12);
  --vis-red-light: rgba(216, 80, 77, 0.12);
  --vis-blue-light: rgba(0, 44, 118, 0.08);

  --bg: #f6f7f9;
  --bg-app: #eef1f5;
  --bg-card: #ffffff;
  --bg-sub: #f4f6f9;
  --bg-hover: #f8f9fb;

  --text-primary: #1a1a2e;
  --text-secondary: #5d6b7e;
  --text-tertiary: #8a98a9;
  --text-muted: #97a1b0;
  --text-inverse: #ffffff;

  --border: #e4e9f0;
  --border-light: #f1f4f7;

  --radius-card: 16px;
  --radius-md: 14px;
  --radius-sm: 7px;
  --radius-xs: 4px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-nav: 2px 0 8px rgba(0, 0, 0, 0.12);

  --nav-width: 78px;
  --topbar-height: 64px;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --transition: 150ms ease;
  --transition-slow: 250ms ease;
}

/* ── Reset ── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  overflow-x: hidden;
}

a {
  color: var(--vis-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ── Accessibility ── */

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--vis-navy);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── App Shell Layout ── */

.app-root {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.app-body {
  flex: 1;
  margin-left: var(--nav-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 28px 32px 40px;
  overflow-y: auto;
  max-width: 1400px;
  width: 100%;
}

/* ── Side Nav (Rail) ── */

.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--nav-width);
  background: var(--vis-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 16px;
  z-index: 200;
  box-shadow: var(--shadow-nav);
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(248, 152, 29, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo svg {
  width: 24px;
  height: 24px;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--vis-gold);
  letter-spacing: 0.5px;
}

.nav-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  flex: 1;
}

.nav-spacer {
  flex: 1;
  min-height: 8px;
}

.nav-item {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
  background: none;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.nav-item--active {
  color: var(--vis-gold);
  background: rgba(248, 152, 29, 0.14);
}

.nav-item--active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--vis-gold);
  border-radius: 0 3px 3px 0;
}

.nav-item--disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.nav-item__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  font-size: 8px;
  font-weight: 700;
  color: var(--vis-navy);
  background: var(--vis-gold);
  border-radius: 6px;
  padding: 1px 4px;
  line-height: 1.2;
}

.nav-item__tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--vis-navy);
  color: var(--text-inverse);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 300;
  pointer-events: none;
}

.nav-item:hover .nav-item__tooltip {
  display: block;
}

.nav-account {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 10px;
}

.nav-account__button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
}

.nav-account__button:hover,
.nav-account__button:focus-visible,
.nav-account--open .nav-account__button {
  background: rgba(248, 152, 29, 0.16);
  border-color: rgba(248, 152, 29, 0.38);
  outline: none;
}

.nav-account__avatar,
.account-menu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vis-gold);
  color: var(--vis-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-account__hover-card {
  display: none;
  position: fixed;
  left: calc(var(--nav-width) + 12px);
  bottom: 18px;
  width: 196px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-elevated);
  z-index: 420;
  pointer-events: none;
  text-align: left;
}

.nav-account__button:hover .nav-account__hover-card,
.nav-account__button:focus-visible .nav-account__hover-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
}

.nav-account--open .nav-account__hover-card {
  display: none;
}

.nav-account__hover-card strong {
  font-size: 13px;
  line-height: 1.2;
}

.nav-account__hover-card small {
  color: var(--text-tertiary);
  font-size: 11px;
}

.nav-account__chevron {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--text-tertiary);
  font-size: 12px;
}

.account-menu {
  position: fixed;
  left: calc(var(--nav-width) + 12px);
  bottom: 16px;
  width: min(292px, calc(100vw - var(--nav-width) - 28px));
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-elevated);
  z-index: 430;
}

.account-menu__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border-light);
}

.account-menu__header span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-menu__header strong {
  font-size: 14px;
  line-height: 1.25;
}

.account-menu__header small {
  color: var(--text-tertiary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px;
}

.account-menu__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}

.account-menu__meta dt {
  color: var(--text-tertiary);
}

.account-menu__meta dd {
  color: var(--text-secondary);
  font-weight: 600;
  text-align: right;
}

.account-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--border-light);
}

.account-menu__item {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.account-menu__item:hover {
  background: var(--bg-sub);
  color: var(--text-primary);
  text-decoration: none;
}

.account-menu__item--disabled,
.account-menu__item--disabled:hover {
  color: var(--text-tertiary);
  cursor: default;
  background: transparent;
}

/* ── Top Bar ── */

.top-bar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
  flex-shrink: 0;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
}

.top-bar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.top-bar__breadcrumb a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-weight: 500;
}

.top-bar__breadcrumb a:hover {
  color: var(--vis-blue);
  text-decoration: none;
}

.top-bar__breadcrumb .breadcrumb-sep {
  color: var(--text-tertiary);
  font-size: 12px;
}

.top-bar__breadcrumb .breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0;
}

.welcome-text {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.2;
}

.global-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.global-search__icon {
  position: absolute;
  left: 12px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.global-search input {
  width: 100%;
  height: 38px;
  padding: 0 16px 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-sub);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.global-search input::placeholder {
  color: var(--text-tertiary);
}

.global-search input:focus {
  outline: none;
  border-color: var(--vis-blue);
  box-shadow: 0 0 0 3px rgba(0, 44, 118, 0.10);
  background: var(--bg-card);
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 5px 12px;
  background: var(--vis-green-light);
  border-radius: 20px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vis-green);
  animation: a360pulse 2s ease-in-out infinite;
}

.sync-label {
  font-weight: 500;
  color: #136b49;
  font-size: 12px;
}

.top-bar__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition);
  position: relative;
}

.top-bar__icon-btn:hover:not(:disabled) {
  background: var(--bg-sub);
}

.top-bar__icon-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.notify-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vis-gold);
}

/* ── Utility Panel (hidden in redesign, kept for test contract) ── */

.utility-panel {
  display: none;
}

/* ── Typography ── */

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; font-weight: 600; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

/* ── Cards ── */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card--padded {
  padding: 20px 24px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
}

.card__header h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.card__header span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.card__body {
  padding: 18px 22px;
}

.card__body--flush {
  padding: 0;
}

/* ── Page Header ── */

.page-head {
  margin-bottom: 24px;
}

.page-head__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.page-head p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.page-head p .attention-count {
  color: var(--vis-red);
  font-weight: 700;
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Buttons ── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--vis-navy);
  color: var(--text-inverse);
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.button:hover { background: #0d2b4d; }

.button:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.button--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.button--secondary:hover { background: var(--bg-sub); }

.button--danger {
  background: var(--vis-red);
  color: var(--text-inverse);
}

.button--danger:hover { background: #c0403d; }

.button--gold {
  background: var(--vis-gold);
  color: var(--vis-navy);
}

.button--gold:hover { background: #e68a15; }

.button--sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.table-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vis-blue);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.table-action:hover { background: var(--vis-blue-light); }
.table-action--danger {
  color: #b42318;
}
.table-action--danger:hover {
  background: #fff1f0;
}

/* Bulk-action bar above the candidate-matches table. */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sub);
}
.bulk-bar__count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #667085);
}
.bulk-bar__actions {
  display: flex;
  gap: 8px;
}

/* Checkbox column in selectable tables. */
.admin-table .col-select {
  width: 36px;
  text-align: center;
  padding-right: 0;
}
.admin-table .col-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--vis-blue);
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-technical-detail {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.admin-technical-detail summary {
  cursor: pointer;
  font-weight: 600;
}
.admin-technical-detail dl {
  margin: 6px 0 0;
  display: grid;
  gap: 4px;
}
.admin-technical-detail div {
  display: flex;
  gap: 6px;
}
.admin-technical-detail dt {
  margin: 0;
  font-weight: 600;
}
.admin-technical-detail dd {
  margin: 0;
}

/* ── Inputs / Fields ── */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field input,
.field select,
.field textarea {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 60px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--vis-blue);
  box-shadow: 0 0 0 3px rgba(0, 44, 118, 0.08);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235a6070' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.field--wide { grid-column: 1 / -1; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

/* ── Badges & Pills ── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-sub);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge--future {
  background: var(--vis-gold-light);
  color: #8b5e00;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-good,
.status-available {
  background: var(--vis-green-light);
  color: #136b49;
}

.status-good::before,
.status-available::before { background: var(--vis-green); }

.status-monitor,
.status-modified-training {
  background: var(--vis-gold-light);
  color: #8b5e00;
}

.status-monitor::before,
.status-modified-training::before { background: var(--vis-gold); }

.status-alert,
.status-unavailable,
.status-injured {
  background: var(--vis-red-light);
  color: #a33b39;
}

.status-alert::before,
.status-unavailable::before,
.status-injured::before { background: var(--vis-red); }

.status-neutral,
.status-not-set {
  background: var(--bg-sub);
  color: var(--text-secondary);
}

.status-neutral::before,
.status-not-set::before { background: var(--text-tertiary); }

/* AMS lifecycle status badges (Active / Transitioning / Archived). */
.status-active {
  background: var(--vis-green-light);
  color: #136b49;
}
.status-active::before { background: var(--vis-green); }

.status-transitioning {
  background: var(--vis-gold-light);
  color: #8b5e00;
}
.status-transitioning::before { background: var(--vis-gold); }

.status-archived {
  background: var(--bg-sub);
  color: var(--text-secondary);
}
.status-archived::before { background: var(--text-tertiary); }

/* Para-athlete indicator pills. */
.para-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.para-badge--yes {
  background: var(--vis-gold-light);
  color: #8b5e00;
}
.para-badge--no {
  background: var(--bg-sub);
  color: var(--text-secondary);
}

.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.flag-badge--normal { background: var(--vis-green-light); color: #136b49; }
.flag-badge--watch { background: var(--vis-gold-light); color: #8b5e00; }
.flag-badge--alert { background: var(--vis-red-light); color: #a33b39; }
.flag-badge--insufficient,
.flag-badge--not-enough-data { background: var(--bg-sub); color: var(--text-tertiary); }

.readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.readiness-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.readiness-good,
.readiness-ready { background: var(--vis-green-light); color: #136b49; }
.readiness-good::before,
.readiness-ready::before { background: var(--vis-green); }
.readiness-watch,
.readiness-monitor { background: var(--vis-gold-light); color: #8b5e00; }
.readiness-watch::before,
.readiness-monitor::before { background: var(--vis-gold); }
.readiness-alert,
.readiness-action { background: var(--vis-red-light); color: #a33b39; }
.readiness-alert::before,
.readiness-action::before { background: var(--vis-red); }
.readiness-none,
.readiness-empty { background: var(--bg-sub); color: var(--text-tertiary); }
.readiness-none::before,
.readiness-empty::before { background: var(--text-tertiary); }

.role-badge {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  background: var(--vis-blue-light);
  color: var(--vis-blue);
}

.source-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--bg-sub);
  color: var(--text-tertiary);
}

/* ── KPI Strip (Dashboard) ── */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-card__label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.summary-card__value {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.summary-card__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.summary-card__sub .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.summary-card__sub .dot--green { background: var(--vis-green); }
.summary-card__sub .dot--red { background: var(--vis-red); }
.summary-card__sub .dot--gold { background: var(--vis-gold); }
.summary-card__sub .dot--blue { background: var(--vis-blue); }

.summary-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.summary-card__icon--blue { background: var(--vis-blue-light); color: var(--vis-blue); }
.summary-card__icon--red { background: var(--vis-red-light); color: var(--vis-red); }
.summary-card__icon--gold { background: var(--vis-gold-light); color: #b06800; }
.summary-card__icon--green { background: var(--vis-green-light); color: var(--vis-green); }

.home-source-notice {
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--vis-gold);
  border-radius: var(--radius-md);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: -4px 0 24px;
  padding: 16px 18px;
}

.home-source-notice strong {
  color: var(--text-primary);
  display: block;
  font-family: var(--font-heading);
  font-size: 18px;
  margin-top: 2px;
}

.home-source-notice p {
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* ── Dashboard two-column layout ── */

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

/* ── Attention Required List ── */

.attention-list {
  display: flex;
  flex-direction: column;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.attention-row:last-child { border-bottom: none; }
.attention-row:hover { background: var(--bg-hover); text-decoration: none; }

.attention-row__info {
  flex: 1;
  min-width: 0;
}

.attention-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.attention-row__meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.attention-row__flags {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Squad Readiness ── */

.squad-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-light);
}

.squad-row:last-child { border-bottom: none; }

.squad-row__info {
  flex: 1;
  min-width: 0;
}

.squad-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.squad-row__count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.squad-row__bar {
  width: 120px;
  flex-shrink: 0;
}

/* ── Today's Testing / Live Feed ── */

.testing-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-light);
}

.testing-item:last-child { border-bottom: none; }

.testing-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  min-width: 48px;
  flex-shrink: 0;
  padding-top: 2px;
}

.testing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.testing-dot--blue { background: var(--vis-blue); }
.testing-dot--gold { background: var(--vis-gold); }
.testing-dot--green { background: var(--vis-green); }

.testing-info { flex: 1; min-width: 0; }

.testing-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.testing-detail {
  font-size: 12px;
  color: var(--text-tertiary);
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border-light);
}

.feed-item:last-child { border-bottom: none; }

.feed-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  color: var(--text-inverse);
}

.feed-icon--blue { background: var(--vis-blue); }
.feed-icon--gold { background: var(--vis-gold); }
.feed-icon--green { background: var(--vis-green); }
.feed-icon--red { background: var(--vis-red); }

.feed-body { flex: 1; min-width: 0; }

.feed-body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.feed-body span {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
}

.feed-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Overview Table ── */

.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.overview-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.overview-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.overview-table tr:last-child td { border-bottom: none; }
.overview-table tr:hover td { background: var(--bg-hover); }

.overview-table .athlete-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-table .athlete-cell a {
  font-weight: 600;
  color: var(--text-primary);
}

.overview-table .athlete-cell a:hover { color: var(--vis-blue); }

/* ── Athlete Cards ── */

.attention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.athlete-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.athlete-card:hover {
  box-shadow: var(--shadow-elevated);
  border-color: var(--border);
  text-decoration: none;
}

.athlete-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vis-navy) 0%, var(--vis-blue) 100%);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.athlete-avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.athlete-avatar--lg {
  width: 76px;
  height: 76px;
  font-size: 26px;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(248, 152, 29, 0.35);
}

.athlete-card__info {
  flex: 1;
  min-width: 0;
}

.athlete-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.athlete-card__meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.athlete-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.athlete-card__fav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  opacity: 0.3;
  transition: opacity var(--transition);
}

.athlete-card__fav:hover,
.athlete-card__fav--active { opacity: 1; }

/* ── Quick Actions ── */

.quick-action {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition);
}

.quick-action:hover {
  box-shadow: var(--shadow-elevated);
  text-decoration: none;
}

.quick-action__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  background: var(--bg-sub);
}

.quick-action__body { flex: 1; }

.quick-action__body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.quick-action__body small {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ── Activity Feed ── */

.activity-list { list-style: none; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vis-blue);
  flex-shrink: 0;
  margin-top: 6px;
}

.activity-item__body { flex: 1; min-width: 0; }

.activity-item__text {
  font-size: 13px;
  color: var(--text-primary);
}

.activity-item__time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Grid Layouts ── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.content-2col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* ── Metric Cards ── */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.metric-card:hover {
  box-shadow: var(--shadow-elevated);
  text-decoration: none;
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-card__name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-card__value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-card__value {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.5px;
}

.metric-card__unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.metric-card__change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.metric-card__change--positive { color: var(--vis-green); }
.metric-card__change--negative { color: var(--vis-red); }
.metric-card__change--neutral { color: var(--text-tertiary); }

.metric-card__change-label {
  color: var(--text-tertiary);
  font-weight: 400;
}

.metric-card__detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 12px;
  background: var(--bg-sub);
  border-radius: 10px;
  font-size: 12px;
}

.metric-card__detail dt {
  color: var(--text-tertiary);
  font-weight: 500;
}

.metric-card__detail dd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.metric-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
  padding-top: 4px;
  border-top: 1px solid var(--border-light);
}

/* ── Athlete Profile Hero ── */

.profile-hero {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin-bottom: 20px;
}

.profile-hero__top {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.profile-hero__info { flex: 1; min-width: 0; }

.profile-hero__name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profile-hero__status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-hero__sport {
  font-size: 14px;
  color: var(--text-secondary);
}

.profile-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.profile-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-hero__meta-item dt {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.profile-hero__meta-item dd {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-hero__kpis {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.profile-hero__kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  border-left: 1px solid var(--border);
}

.profile-hero__kpi:first-child { border-left: none; }

.profile-hero__kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.profile-hero__kpi-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.3px;
}

.profile-hero__kpi-value--gold { color: var(--vis-gold); }
.profile-hero__kpi-value--green { color: var(--vis-green); }
.profile-hero__kpi-value--red { color: var(--vis-red); }
.profile-hero__kpi-value--muted { color: var(--text-tertiary); }

.profile-hero__kpi-unit {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.profile-hero__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.profile-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin: 18px 0 20px;
  overflow-x: auto;
}

.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #8a98a9;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.profile-tab:hover {
  color: var(--vis-navy);
  text-decoration: none;
}

.profile-tab--active {
  color: var(--vis-navy);
  border-bottom-color: var(--vis-gold);
}

.profile-tab--disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Asymmetry ── */

.asymmetry-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}

.asymmetry-bar__left {
  background: var(--vis-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.asymmetry-bar__right {
  background: var(--vis-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vis-navy);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
}

.asymmetry-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}

.asymmetry-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sub-metric-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.sub-metric-box {
  background: var(--bg-sub);
  border-radius: 10px;
  padding: 12px 14px;
}

.sub-metric-box__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.sub-metric-box__value {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.sub-metric-box__unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ── Speed & Power Bars ── */

.power-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.power-bar-label {
  width: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.power-bar-track {
  flex: 1;
  height: 8px;
  background: #eceff3;
  border-radius: 5px;
  overflow: hidden;
}

.power-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width var(--transition-slow);
}

.power-bar-fill--blue { background: var(--vis-blue); }
.power-bar-fill--gold { background: var(--vis-gold); }
.power-bar-fill--green { background: var(--vis-green); }

.power-bar-value {
  width: 60px;
  text-align: right;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* ── Charts ── */

.chart-container {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.chart-container canvas {
  max-height: 320px;
  width: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--vis-blue);
  stroke-width: 2;
}

.chart-svg {
  width: 100%;
  overflow: visible;
}

.chart-svg .chart-baseline {
  stroke: var(--vis-gold);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.chart-svg .chart-area {
  fill: rgba(0, 44, 118, 0.06);
}

.chart-svg .chart-point {
  fill: var(--vis-blue);
}

.chart-svg .chart-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-tertiary);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend__swatch {
  width: 12px;
  height: 4px;
  border-radius: 2px;
}

.chart-legend__swatch--solid { background: var(--vis-blue); }
.chart-legend__swatch--gold { background: var(--vis-gold); }
.chart-legend__swatch--dashed {
  background: none;
  border-bottom: 2px dashed var(--vis-gold);
  height: 0;
}

/* ── Sparkline ── */

.sparkline-container {
  position: relative;
  padding: 12px 0;
}

.sparkline-svg {
  width: 100%;
  height: 60px;
}

.sparkline-line {
  fill: none;
  stroke: var(--vis-gold);
  stroke-width: 2;
}

.sparkline-area {
  fill: rgba(248, 152, 29, 0.12);
}

/* ── Wellness Items ── */

.wellness-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.wellness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.wellness-item__label {
  color: var(--text-secondary);
}

.wellness-item__value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.wellness-item__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ── Tables ── */

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.data-table .bold-value {
  font-family: var(--font-heading);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.empty-row {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Data Source Cards ── */

.source-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.source-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.source-icon--blue { background: var(--vis-blue); color: var(--text-inverse); }
.source-icon--green { background: var(--vis-green); color: var(--text-inverse); }
.source-icon--gold { background: var(--vis-gold); color: var(--vis-navy); }
.source-icon--grey { background: var(--bg-sub); color: var(--text-tertiary); }

.source-card__info { flex: 1; }

.source-card__info strong {
  display: block;
  font-size: 14px;
}

.source-card__info span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.source-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.source-card--disabled { opacity: 0.6; }
.source-card--quiet { background: #fbfcfd; }

.source-card dl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-card dl > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.source-card dt { color: var(--text-tertiary); }

.source-card dd {
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12px;
}

.source-card dd .readiness-badge,
.source-card dd .status-badge {
  font-family: var(--font-body);
}

.source-card-grid--integrations {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.integration-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.integration-summary-strip > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.integration-summary-strip span {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.integration-summary-strip strong {
  font-size: 18px;
  font-family: var(--font-heading);
}

.integration-card {
  min-height: 250px;
}

.integration-card--selected {
  border-color: rgba(0, 44, 118, 0.32);
  box-shadow: 0 0 0 3px rgba(0, 44, 118, 0.06);
}

.integration-card__description {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 42px;
}

.integration-card__message {
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.add-source-flow {
  margin-bottom: 16px;
}

.add-source-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.provider-template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.provider-template {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.provider-template:hover,
.provider-template:focus-visible {
  border-color: rgba(0, 44, 118, 0.32);
  box-shadow: 0 0 0 3px rgba(0, 44, 118, 0.06);
  outline: none;
}

.provider-template strong,
.provider-template span,
.provider-template small {
  display: block;
}

.provider-template strong {
  font-size: 13px;
}

.provider-template span,
.provider-template small {
  font-size: 12px;
  color: var(--text-tertiary);
}

.config-fieldsets {
  display: grid;
  gap: 12px;
}

.config-fieldset {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fbfcfd;
}

.config-fieldset legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.integration-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.integration-detail__head h3 {
  font-size: 18px;
  margin: 2px 0;
}

.integration-detail__head p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 640px;
}

.integration-detail__badges,
.integration-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.integration-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.integration-meta-panel,
.integration-setup-panel,
.vald-state-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fbfcfd;
}

.integration-meta-panel h3,
.integration-setup-panel h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.integration-meta-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.integration-meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 7px;
}

.integration-meta-list > div:last-child { border-bottom: none; }

.integration-meta-list dt { color: var(--text-tertiary); }

.integration-meta-list dd {
  font-weight: 600;
  text-align: right;
}

.integration-meta-list--compact {
  margin-top: 10px;
}

.setup-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.setup-step {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.setup-step > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-sub);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.setup-step strong { font-size: 12px; }

.setup-step small {
  font-size: 11px;
  color: var(--text-tertiary);
}

.setup-step--complete > span {
  background: var(--vis-green-light);
  color: #136b49;
}

.setup-step--current > span {
  background: var(--vis-blue-light);
  color: var(--vis-blue);
}

.setup-step--blocked > span {
  background: var(--vis-gold-light);
  color: #8b5e00;
}

.integration-placeholder {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.vald-state-panel {
  margin-bottom: 16px;
}

.integration-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.integration-metric-row > div {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  padding: 12px;
}

.integration-metric-row span {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
}

.integration-metric-row strong {
  font-size: 18px;
  font-family: var(--font-heading);
}

/* ── Timeline ── */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-event {
  position: relative;
  margin-bottom: 16px;
}

.timeline-event::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--vis-blue);
  border: 2px solid var(--bg-app);
}

.timeline-event__card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px 20px;
}

.timeline-event__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline-event__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-event__date {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.timeline-event__body {
  font-size: 13px;
  color: var(--text-secondary);
}

.timeline-event__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.timeline-event__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ── State Panels ── */

.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
}

.state-panel strong {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.state-panel span {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 400px;
}

.state-panel--loading strong::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--vis-blue);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.state-panel--error strong { color: var(--vis-red); }

.inline-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 16px;
  text-align: center;
}

.inline-state strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.inline-state span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.inline-state--error strong { color: var(--vis-red); }

.inline-state__errors {
  margin: 8px 0 4px;
  padding: 12px 16px;
  list-style: disc inside;
  text-align: left;
  font-size: 12px;
  color: var(--vis-red);
  background: var(--surface-muted, rgba(200, 30, 30, 0.06));
  border-radius: 8px;
}

.inline-state__errors li { margin: 2px 0; }

/* ── Results sync: source list + per-source outcomes ── */
.src-list-wrap { margin: 12px 0; }
.src-list-title {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.src-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.src-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.src-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.src-badge--live { background: rgba(46, 160, 67, 0.16); color: #217a33; }
.src-badge--pending { background: rgba(120, 130, 145, 0.16); color: var(--text-tertiary); }

.src-result-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; }
.src-result-list li { margin: 2px 0; }
.src-result--ok { color: var(--text-secondary); }
.src-result--bad { color: var(--vis-red); }

/* ── Toast ── */

.toast-region {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  pointer-events: auto;
  animation: toast-in 0.25s ease;
  max-width: 420px;
}

.toast--success { background: var(--vis-green); color: var(--text-inverse); }
.toast--error { background: var(--vis-red); color: var(--text-inverse); }
.toast--info { background: var(--vis-navy); color: var(--text-inverse); }

/* ── Section Panels ── */

.section-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.section-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
}

.section-panel__head h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.section-panel__head span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.section-panel__body {
  padding: 18px 22px;
}

/* ── Progress Bar ── */

.progress-bar {
  width: 100%;
  height: 8px;
  background: #eceff3;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 5px;
  transition: width var(--transition-slow);
}

.progress-bar__fill--green { background: var(--vis-green); }
.progress-bar__fill--gold { background: var(--vis-gold); }
.progress-bar__fill--red { background: var(--vis-red); }
.progress-bar__fill--blue { background: var(--vis-blue); }

/* ── No-data placeholder ── */

.placeholder-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

.placeholder-message strong {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Compact List ── */

.compact-list {
  display: flex;
  flex-direction: column;
}

.list-button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.list-button:last-child { border-bottom: none; }

.list-button:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.list-button--active {
  background: var(--vis-blue-light);
  border-left: 3px solid var(--vis-blue);
}

.list-button strong { font-size: 13px; font-weight: 600; }
.list-button span { font-size: 11px; color: var(--text-tertiary); }

/* ── Admin Shell ── */

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 20px;
  align-items: start;
}

.admin-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 20px;
}

.module-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 8px 14px 6px;
}

.admin-nav-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: background var(--transition);
}

.admin-nav-link:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.admin-nav-link--active {
  background: var(--vis-blue-light);
  color: var(--vis-blue);
}

.admin-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.admin-nav-link--active .admin-nav-icon {
  background: var(--vis-blue);
  color: var(--text-inverse);
}

.admin-nav-link strong { display: block; font-size: 13px; font-weight: 600; }
.admin-nav-link small { display: block; font-size: 11px; color: var(--text-tertiary); }

.admin-main-panel { min-width: 0; }

.admin-context-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 20px;
}

.utility-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px 20px;
}

.utility-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 6px;
}

.utility-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.utility-card--quiet {
  background: var(--bg-sub);
  border-color: transparent;
}

/* ── Admin Components ── */

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-section-head h2 { font-size: 18px; }

.admin-section-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-section-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-overview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition);
}

.admin-overview-card:hover {
  box-shadow: var(--shadow-elevated);
  text-decoration: none;
}

.admin-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--vis-blue-light);
  color: var(--vis-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.admin-overview-card strong { font-size: 14px; }
.admin-overview-card small { font-size: 11px; color: var(--text-tertiary); }

.admin-card-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: auto;
  white-space: nowrap;
}

.admin-card-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.admin-filter-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-filter-strip .field { min-width: 160px; }
.admin-filter-strip .field--wide { flex: 1; min-width: 200px; }

.admin-drawer {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.admin-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  user-select: none;
}

.admin-drawer > summary::-webkit-details-marker { display: none; }

.admin-drawer > summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 300;
  color: var(--text-tertiary);
  transition: transform var(--transition);
}

.admin-drawer[open] > summary::after { content: "\2212"; }

.admin-drawer > summary span { font-weight: 600; }

.admin-drawer > summary small {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: 8px;
}

.admin-drawer__body { padding: 0 20px 20px; }

.admin-expander {
  margin-top: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.admin-expander > summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--vis-blue);
  cursor: pointer;
  padding: 4px 0;
}

.admin-table { width: 100%; }

.admin-table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  padding: 10px 0;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.admin-table-row:last-child { border-bottom: none; }

.admin-table-row--head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.admin-table--users .admin-table-row { grid-template-columns: 1.7fr 1.8fr 1.3fr 0.8fr 1.5fr 0.8fr; }
.admin-table--athletes .admin-table-row { grid-template-columns: 2fr 1fr 1fr 0.8fr 0.8fr; }
.admin-table--squads .admin-table-row { grid-template-columns: 2fr 1fr 1fr 1fr; }
.admin-table--metrics .admin-table-row { grid-template-columns: 2fr 1fr 0.8fr 1fr 0.8fr; }

.admin-table-row--details {
  display: block;
  cursor: pointer;
}

.admin-table-row--details > summary {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 1fr 0.8fr;
  gap: 8px;
  padding: 10px 0;
  align-items: center;
  list-style: none;
}

.admin-table-row--details > summary::-webkit-details-marker { display: none; }

.admin-table-row--details > p {
  padding: 8px 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.athlete-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.athlete-cell span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.athlete-cell strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.athlete-cell span span {
  font-size: 11px;
  color: var(--text-tertiary);
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.access-summary {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-sub);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.access-scope-form {
  margin-bottom: 14px;
}

.access-scope-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-scope-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
}

.access-scope-item span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.access-scope-item strong {
  font-size: 13px;
  font-weight: 600;
}

.access-scope-item small {
  font-size: 11px;
  color: var(--text-tertiary);
}

.admin-safe-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-sub);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.admin-safe-card strong { font-size: 14px; }

.admin-safe-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.sport-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--vis-blue-light);
  color: var(--vis-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.admin-list-item span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.admin-list-item strong { font-size: 13px; }
.admin-list-item small { font-size: 11px; color: var(--text-tertiary); }

/* ── Threshold Cards ── */

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.threshold-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.threshold-card .eyebrow { margin-bottom: 2px; }

.threshold-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.threshold-card dl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.threshold-card dl > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.threshold-card dt { color: var(--text-tertiary); }

.threshold-card dd {
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ── System Settings ── */

.system-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Action Menu ── */

.action-menu { position: relative; }

.action-menu > summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--vis-blue);
  cursor: pointer;
  list-style: none;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary:hover { background: var(--vis-blue-light); }

.action-menu > span {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  white-space: nowrap;
  box-shadow: var(--shadow-elevated);
}

/* ── Help Text ── */

.help-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── Animations ── */

@keyframes a360pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */

@media (max-width: 1240px) {
  .admin-shell { grid-template-columns: 200px 1fr; }
  .admin-context-panel { display: none; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-columns { grid-template-columns: 1fr; }
  .source-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .side-nav { width: 60px; }
  .nav-account__hover-card,
  .account-menu {
    left: 72px;
    width: min(292px, calc(100vw - 84px));
  }
  .nav-item { width: 40px; height: 40px; }
  .app-body { margin-left: 60px; }
  .main-content { padding: 20px; }
  .top-bar { padding: 0 16px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-settings-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }
  .admin-nav-link {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 12px;
    min-width: 80px;
  }
  .admin-nav-link small { display: none; }
  .admin-split { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .integration-detail-grid { grid-template-columns: 1fr; }
  .integration-summary-strip { grid-template-columns: repeat(2, 1fr); }
  .sync-label { display: none; }
}

@media (max-width: 720px) {
  .side-nav { width: 56px; display: flex; }
  .nav-logo { width: 38px; height: 38px; margin-bottom: 16px; }
  .nav-logo-text { font-size: 12px; }
  .nav-items { gap: 0; }
  .nav-item { width: 38px; height: 38px; border-radius: 10px; }
  .nav-item svg { width: 19px; height: 19px; }
  .nav-account__button { width: 40px; height: 40px; border-radius: 12px; }
  .nav-account__avatar,
  .account-menu__avatar { width: 30px; height: 30px; font-size: 11px; }
  .nav-account__hover-card { display: none !important; }
  .account-menu {
    left: 64px;
    right: 8px;
    bottom: 10px;
    width: auto;
    max-width: calc(100vw - 72px);
  }
  .app-body { margin-left: 56px; min-width: 0; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .home-source-notice {
    align-items: flex-start;
    flex-direction: column;
  }
  .metrics-grid { grid-template-columns: 1fr; }
  .attention-grid { grid-template-columns: 1fr; }
  .source-card-grid { grid-template-columns: 1fr; }
  .integration-summary-strip,
  .integration-metric-row { grid-template-columns: 1fr; }
  .profile-hero__top { flex-direction: column; }
  .profile-hero__kpis { flex-wrap: wrap; }

  .admin-table-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
    padding: 12px 0;
  }
  .admin-table-row--head { display: none; }

  .top-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }
  .top-bar__right { gap: 8px; }
  .sync-indicator { padding: 5px 9px; }
  .top-bar__icon-btn { width: 34px; height: 34px; }
  .global-search {
    order: 10;
    max-width: 100%;
    width: 100%;
  }
}

/* ── Product sections (VALD metric cards) ── */

.product-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.product-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.product-section__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.product-section__count {
  font-size: 13px;
  color: var(--text-tertiary);
}

.product-section__cards {
  display: flex;
  flex-direction: column;
}

.product-metric-card {
  border-bottom: 1px solid var(--border);
}

.product-metric-card:last-child {
  border-bottom: none;
}

.product-metric-card__summary {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.product-metric-card__summary:hover {
  background: var(--surface-raised);
}

.product-metric-card__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-metric-card__name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-metric-card__right {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-metric-card__value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.product-metric-card__unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
}

.product-metric-card__trend {
  font-size: 18px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.product-metric-card__date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.product-metric-card__expand {
  font-size: 12px;
  color: var(--text-tertiary);
  transition: transform 0.2s;
}

.product-metric-card--open .product-metric-card__expand {
  transform: rotate(90deg);
}

.product-metric-card__chart {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  min-height: 220px;
}

.product-metric-card__chart canvas {
  width: 100% !important;
  max-height: 220px;
}

.product-metric-card__chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

@media (max-width: 768px) {
  .product-metric-card__summary {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 12px 14px;
  }
  .product-metric-card__date {
    grid-column: 1 / -1;
    font-size: 12px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Platform explorer (test-history view) — mirrors Athlete Profile.dc.html
   ────────────────────────────────────────────────────────────────────────── */

.px-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--vis-navy);
}

/* Profile header */
.px-profile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.px-avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 18px;
  background: linear-gradient(150deg, #0b233f, #19365a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.5px;
  box-shadow: inset 0 0 0 2px rgba(248, 152, 29, 0.5);
}
.px-profile-id {
  min-width: 0;
}
.px-profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.px-profile-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.3px;
}
.px-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-sub);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
}
.px-status--ok {
  background: var(--vis-green-light);
  color: var(--vis-green);
}
.px-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.px-profile-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.px-meta-strong {
  font-weight: 600;
  color: var(--vis-blue);
}
.px-meta-dot {
  color: #c4ccd6;
}
.px-profile-stats {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  gap: 14px;
}
.px-stat {
  text-align: right;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}
.px-stat:last-child {
  padding-right: 0;
  border-right: none;
}
.px-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
}
.px-stat-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 28px;
  color: var(--vis-navy);
  line-height: 1.1;
}
.px-stat-value--green {
  color: var(--vis-green);
}

/* Body grid */
.px-body {
  display: grid;
  grid-template-columns: 288px 1fr;
  gap: 18px;
  align-items: start;
}

/* Left rail */
.px-rail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
}
.px-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 12px;
}
.px-rail-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
}
.px-rail-count {
  font-size: 11px;
  color: var(--text-muted);
}
.px-rail-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 6px 8px;
}
.px-rail-group-label:first-of-type {
  padding-top: 6px;
}
.px-rail-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.px-rail-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  position: relative;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: background var(--transition);
}
.px-rail-row:hover:not(.px-rail-row--muted) {
  background: rgba(11, 35, 63, 0.04);
}
.px-rail-row--active {
  background: rgba(11, 35, 63, 0.05);
}
.px-rail-row--muted {
  opacity: 0.55;
  cursor: default;
}
.px-rail-bar {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
}
.px-rail-abbr {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
}
.px-rail-meta {
  min-width: 0;
  flex: 1;
}
.px-rail-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--vis-navy);
}
.px-rail-row--muted .px-rail-name {
  color: var(--text-tertiary);
}
.px-rail-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.px-rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vis-green);
}

/* Detail pane */
.px-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.px-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.px-plat-head {
  padding: 18px 22px;
}
.px-plat-id {
  display: flex;
  align-items: center;
  gap: 14px;
}
.px-plat-abbr {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
}
.px-plat-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.px-plat-name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.px-vendor {
  font-size: 11px;
  font-weight: 600;
  color: var(--vis-blue);
  background: rgba(0, 44, 118, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}
.px-plat-tagline {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.px-sync-ok {
  color: var(--vis-green);
  font-weight: 600;
}
.px-ranges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-sub);
  border: 1px solid #e9edf2;
  border-radius: 9px;
  padding: 3px;
}
.px-range {
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-tertiary);
  border: none;
  font-family: var(--font-body);
}
.px-range--active {
  background: #fff;
  color: var(--vis-navy);
  box-shadow: 0 1px 3px rgba(11, 35, 63, 0.12);
}
.px-tabs {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.px-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-family: var(--font-body);
}
.px-tab--active {
  background: var(--vis-navy);
  color: #fff;
  border-color: var(--vis-navy);
}
.px-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #b3bdc9;
}
.px-tab--active .px-tab-count {
  color: rgba(255, 255, 255, 0.6);
}

/* Chart card */
.px-chart-card {
  padding: 20px 22px;
}
.px-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.px-chart-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}
.px-chart-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.px-chart-latest {
  text-align: right;
}
.px-chart-latest-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: flex-end;
}
.px-chart-latest-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  color: var(--vis-navy);
  line-height: 1;
}
.px-chart-latest-unit {
  font-size: 13px;
  color: var(--text-muted);
}
.px-chart-latest-delta {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
}
.px-over {
  color: var(--text-muted);
  font-weight: 500;
}
.px-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.px-chip {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-sub);
  color: var(--text-tertiary);
  border: none;
  font-family: var(--font-body);
}
.px-chip--active {
  background: rgba(0, 44, 118, 0.1);
  color: var(--vis-blue);
}
.px-chart-wrap {
  margin-top: 14px;
  height: 250px;
  position: relative;
}

/* Metric cards */
.px-mcards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.px-mcard {
  flex: 1 1 150px;
  min-width: 150px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 15px 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color var(--transition);
}
.px-mcard--active {
  border-color: var(--vis-blue);
}
.px-mcard-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  min-height: 32px;
}
.px-mcard-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.px-mcard-value-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.px-mcard-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.4px;
}
.px-mcard-unit {
  font-size: 11.5px;
  color: var(--text-muted);
}
.px-mcard-delta {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
}
.px-spark {
  width: 64px;
  height: 22px;
  overflow: visible;
  flex: none;
}

/* History table */
.px-history {
  padding: 20px 22px 10px;
}
.px-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.px-history-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}
.px-history-note {
  font-size: 12px;
  color: var(--text-tertiary);
}
.px-table-scroll {
  overflow-x: auto;
}
.px-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.px-table thead tr {
  text-align: left;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.px-table th {
  padding: 11px 8px;
  font-weight: 600;
}
.px-th-num {
  text-align: right;
}
.px-th-star {
  text-align: center;
}
.px-table tbody tr {
  border-top: 1px solid var(--border-light);
}
.px-td-date {
  padding: 12px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.px-td-num {
  padding: 12px 8px;
  text-align: right;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--vis-navy);
}
.px-td-star {
  padding: 12px 8px;
  text-align: center;
  color: var(--vis-gold);
  font-size: 14px;
}
.px-td-empty {
  padding: 18px 8px;
  text-align: center;
  color: var(--text-muted);
}

/* Empty platform pane */
.px-empty {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.px-empty-abbr {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
}
.px-empty-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
}
.px-empty-text {
  margin: 0;
  max-width: 380px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Responsive: collapse rail above the detail */
@media (max-width: 980px) {
  .px-body {
    grid-template-columns: 1fr;
  }
  .px-profile {
    flex-wrap: wrap;
  }
  .px-profile-stats {
    margin-left: 0;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Athlete profile v2 (tabbed record page) — literal design tokens
   ═══════════════════════════════════════════════════════════════════════ */

.apv2-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 16px;
  padding: 20px 24px;
}
.apv2-hero__avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 18px;
  background: linear-gradient(150deg, #0b233f, #19365a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  box-shadow: inset 0 0 0 2px rgba(248, 152, 29, 0.5);
}
.apv2-hero__body {
  flex: 1;
  min-width: 0;
}
.apv2-hero__namerow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.apv2-hero__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.3px;
  color: #0b233f;
}
.apv2-hero__meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #5d6b7e;
  font-size: 13.5px;
}
.apv2-hero__meta-sport {
  font-weight: 600;
  color: #002c76;
}
.apv2-hero__meta-dot {
  color: #c4ccd6;
}
.apv2-hero__roles {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.apv2-hero__role dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #97a1b0;
}
.apv2-hero__role dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #0b233f;
}
.apv2-hero__stats {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex: none;
}
.apv2-hero__stat {
  text-align: right;
  padding-right: 14px;
  border-right: 1px solid #e4e9f0;
}
.apv2-hero__stat--last {
  padding-right: 0;
  border-right: none;
}
.apv2-hero__stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #97a1b0;
  font-weight: 600;
}
.apv2-hero__stat-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  color: #0b233f;
}
.apv2-hero__stat-value--gold {
  color: #f8981d;
}
.apv2-hero__stat-value--green {
  color: #1f9d6b;
}
.apv2-hero__stat-value--red {
  color: #d8504d;
}
.apv2-hero__stat-value--sm {
  font-size: 20px;
  margin-top: 4px;
}

/* Layout scaffolding */
.apv2-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.apv2-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.apv2-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: start;
}
.apv2-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.apv2-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 20px 22px;
}
.apv2-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: #0b233f;
}
.apv2-card__sub {
  margin: 4px 0 6px;
  font-size: 12.5px;
  color: #8a98a9;
}

/* Categorisation pathway */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--vis-gold-light);
  color: #c97a12;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.cat-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vis-gold);
}
/* Solid variant used inside the pathway card header. */
.cat-pill--solid {
  height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--vis-gold);
  color: var(--vis-navy);
  font-size: 12.5px;
}
.cat-pill--solid .cat-pill__dot {
  background: var(--vis-navy);
}

.cat-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.cat-card__current {
  text-align: right;
  max-width: 320px;
}
.cat-card__desc {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #8a98a9;
}

.cat-track {
  position: relative;
  margin-top: 22px;
}
.cat-track__line {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 16px;
  height: 3px;
  border-radius: 2px;
  background: #eef1f5;
}
.cat-track__fill {
  position: absolute;
  left: 10%;
  top: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--vis-gold);
}
.cat-track__nodes {
  position: relative;
  display: flex;
}

.cat-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cat-node__marker-wrap {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-node__marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd4de;
  background: #fff;
  position: relative;
  z-index: 1;
}
.cat-node__marker--achieved {
  background: var(--vis-navy);
  border-color: var(--vis-navy);
}
.cat-node__marker--current {
  width: 30px;
  height: 30px;
  background: var(--vis-gold);
  border-color: var(--vis-gold);
  box-shadow: 0 0 0 5px rgba(248, 152, 29, 0.18);
}
.cat-node__stage {
  margin-top: 9px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #b3bdc9;
}
.cat-node__stage--current {
  color: #c97a12;
}
.cat-node__name {
  margin-top: 3px;
  font-size: 12.5px;
  text-align: center;
  font-weight: 600;
  color: #97a1b0;
}
.cat-node__name--achieved {
  color: #5d6b7e;
}
.cat-node__name--current {
  color: var(--vis-navy);
  font-weight: 700;
}

/* Categorisation tab — trajectory chart */
.cat-traj__scroll {
  margin-top: 14px;
  overflow-x: auto;
}
.cat-traj {
  width: 100%;
  min-width: 520px;
  height: auto;
  display: block;
}
.cat-traj__grid {
  stroke: #eef1f5;
  stroke-width: 1;
}
.cat-traj__ylabel {
  fill: #8a98a9;
  font-size: 11px;
  text-anchor: end;
}
.cat-traj__xlabel {
  fill: #97a1b0;
  font-size: 10.5px;
  text-anchor: middle;
}
.cat-traj__line {
  stroke: var(--vis-navy);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.cat-traj__dot {
  stroke: #fff;
  stroke-width: 1.5;
}

/* Categorisation tab — review history table */
.cat-move {
  font-weight: 700;
  margin-right: 4px;
}
.cat-history-table td {
  vertical-align: top;
}
.cat-evidence {
  color: #5d6b7e;
  font-size: 12px;
  line-height: 1.5;
  min-width: 240px;
  max-width: 420px;
}

/* KPI cards */
.apv2-kpi {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 18px;
}
.apv2-kpi--empty {
  grid-column: 1 / -1;
  padding: 0;
  border: none;
  background: transparent;
}
.apv2-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.apv2-kpi__label {
  font-size: 12px;
  color: #8a98a9;
}
.apv2-kpi__source {
  font-size: 10.5px;
  font-weight: 600;
  color: #97a1b0;
  background: #f4f6f9;
  border: 1px solid #e9edf2;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.apv2-kpi__value-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.apv2-kpi__value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 29px;
  letter-spacing: -0.5px;
  color: #0b233f;
}
.apv2-kpi__unit {
  font-size: 13px;
  color: #97a1b0;
}
.apv2-kpi__change {
  margin-top: 7px;
  font-size: 12px;
  font-weight: 600;
}
.apv2-kpi__change-base {
  color: #97a1b0;
  font-weight: 500;
}

/* Tables */
.apv2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}
.apv2-table-scroll {
  overflow-x: auto;
}
.apv2-results-table {
  min-width: 980px;
}
.apv2-table thead th {
  text-align: left;
  color: #97a1b0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  padding: 11px 8px;
}
.apv2-table .apv2-th-num {
  text-align: right;
}
.apv2-table tbody tr {
  border-top: 1px solid #f1f4f7;
}
.apv2-table td {
  padding: 12px 8px;
  color: #0b233f;
}
.apv2-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8a98a9;
}
.apv2-td-strong {
  font-weight: 600;
}
.apv2-source-link {
  color: #002c76;
  font-weight: 600;
  text-decoration: none;
}
.apv2-source-link:hover {
  text-decoration: underline;
}
.apv2-td-muted {
  color: #5d6b7e;
  font-size: 12.5px;
}
.apv2-td-num {
  text-align: right;
  font-family: var(--font-heading);
  font-weight: 700;
}
.apv2-empty-row {
  padding: 22px 8px;
  text-align: center;
  color: #97a1b0;
}

/* Flags & watch items */
.apv2-flags {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.apv2-flag {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
}
.apv2-flag__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
}
.apv2-flag__title {
  font-size: 13px;
  font-weight: 600;
  color: #0b233f;
}
.apv2-flag__detail {
  font-size: 11.5px;
  color: #8a98a9;
}

@media (max-width: 1100px) {
  .apv2-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .apv2-cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .apv2-hero {
    flex-wrap: wrap;
  }
  .apv2-hero__stats {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .apv2-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Athlete profile v2 · Results tab ── */
.apv2-seg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.apv2-seg {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 9px;
  padding: 3px;
}
.apv2-seg__btn {
  padding: 7px 16px;
  border: none;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #8a98a9;
  transition: background var(--transition), color var(--transition);
}
.apv2-seg__btn--active {
  background: #0b233f;
  color: #fff;
}
.apv2-seg-caption {
  font-size: 12.5px;
  color: #97a1b0;
}

.apv2-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* PB / SB cards */
.apv2-pb {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 18px 20px;
}
.apv2-pb__tag {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}
.apv2-pb__event {
  font-size: 12.5px;
  color: #8a98a9;
  font-weight: 600;
}
.apv2-pb__mark {
  margin-top: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: #0b233f;
}
.apv2-pb__meet {
  margin-top: 6px;
  font-size: 12px;
  color: #97a1b0;
}

/* Card header with right-aligned stat (season progression) */
.apv2-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.apv2-card__head-stat {
  text-align: right;
}
.apv2-card__head-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  color: #0b233f;
  line-height: 1;
}
.apv2-card__head-delta {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
}
.apv2-chart {
  height: 230px;
  margin-top: 14px;
  position: relative;
}

/* Results table extras */
.apv2-th-center {
  text-align: center !important;
}
.apv2-center {
  text-align: center;
}
.apv2-td-right {
  text-align: right;
}
.apv2-res-badge {
  font-size: 10px;
  font-weight: 700;
}
.apv2-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.apv2-table .apv2-mono.apv2-td-right,
.apv2-table td.apv2-mono.apv2-td-right {
  color: #5d6b7e;
}

/* Team stat cards + result chip */
.apv2-tstat {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 18px;
}
.apv2-tstat__label {
  font-size: 12px;
  color: #8a98a9;
}
.apv2-tstat__value {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 29px;
  letter-spacing: -0.5px;
}
.apv2-reschip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .apv2-grid-3 {
    grid-template-columns: 1fr;
  }
}
