﻿:root {
  --bg: #eef2f1;
  --panel: #ffffff;
  --surface: #f7f9f8;
  --text: #111827;
  --muted: #61707d;
  --line: #d7dfdd;
  --accent: #00a878;
  --accent-dark: #007f62;
  --signal: #c7f000;
  --blue: #2563eb;
  --warning: #d98622;
  --danger: #b4232f;
  --topbar: #101820;
  --shadow: 0 16px 34px rgba(17, 24, 39, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #e9efed 0%, var(--bg) 260px);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #11b7a3);
  color: #fff;
  cursor: pointer;
  padding: 0.62rem 0.9rem;
  font-weight: 700;
}

button:hover {
  background: linear-gradient(135deg, var(--accent-dark), #0a8d80);
}

button.secondary {
  background: #e7eceb;
  color: var(--text);
}

.topbar {
  align-items: center;
  background: var(--topbar);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1,
.panel h2,
.test-domain h3 {
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.topbar h1 { color: #fff; }
.topbar .eyebrow { color: var(--signal); }
.topbar .muted, .topbar .coach-identity { color: #b7c2c8; }

.header-actions {
  display: flex;
  gap: 0.7rem;
}

.layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 300px minmax(0, 1fr);
  padding: 1rem;
}

.sidebar,
.content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel,
.metric {
  background: var(--panel);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 1rem;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.badge {
  background: #e8f8f3;
  border: 1px solid #afe5d7;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.list.compact {
  margin-bottom: 0.8rem;
}

.list-item {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem;
  text-align: left;
}

.list-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.list-item.active {
  background: #e8f8f3;
  border-color: #9bd4c4;
}

.full {
  width: 100%;
}

.grid-form {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-form label {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 0.35rem;
}

.grid-form .wide {
  grid-column: span 2;
}

.grid-form input,
.grid-form select,
.test-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-width: 0;
  padding: 0.58rem 0.65rem;
}

.grid-form button {
  align-self: end;
}

.form-status {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  min-height: 1.1rem;
}

.dashboard {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  padding: 1rem;
}

.metric span {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.metric strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.3rem;
}

.split {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

canvas {
  display: block;
  max-width: 100%;
}

.priority-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.priority-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
}

.priority-list span {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tests-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.test-domain {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.test-domain h3 {
  background: #f2f6f8;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
}

.test-row {
  align-items: start;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) 112px;
  padding: 0.75rem;
}

.test-row > span {
  align-self: start;
  padding-top: .1rem;
}

.test-row + .test-row {
  border-top: 1px solid var(--line);
}


.test-result-controls {
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.test-recorded-at {
  display: grid;
  gap: .2rem;
}

.test-recorded-at span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.test-recorded-at input {
  font-size: .76rem;
  padding: .42rem .48rem;
}

.test-variable-fields .test-recorded-at {
  grid-column: 1 / -1;
}

.test-row small,
.test-row em {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  margin-top: 0.18rem;
}

.empty {
  color: var(--muted);
}

.print-area {
  display: none;
}

@media (max-width: 1080px) {
  .layout,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-row: 2;
  }

  .grid-form,
  .dashboard,
  .tests-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .composition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-form,
  .dashboard,
  .tests-grid,
  .composition-grid {
    grid-template-columns: 1fr;
  }

  .grid-form .wide {
    grid-column: auto;
  }

  .home-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-actions {
    flex-wrap: wrap;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .layout,
  .home-view,
  .auth-view {
    display: none;
  }

  .print-area {
    display: block;
    padding: 1rem;
  }

  .print-metrics {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, 1fr);
  }
}
.auth-view {
  align-items: center;
  background: radial-gradient(circle at top left, rgba(0,168,120,.18), transparent 34%), #eef2f1;
  display: flex;
  min-height: 100vh;
  padding: 1.25rem;
}

.auth-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 430px;
  padding: 1.6rem;
  width: 100%;
}

.auth-panel h1 { margin: 0 0 .55rem; }
.auth-form { display: grid; gap: 1rem; margin-top: 1.3rem; }
.auth-form label { color: var(--muted); display: grid; font-size: .86rem; font-weight: 700; gap: .35rem; }
.auth-form input { border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: .7rem; width: 100%; }
.auth-form button { width: 100%; }
.auth-toggle { margin-top: .75rem; width: 100%; }
.auth-message { color: var(--muted); font-size: .86rem; margin: 0; min-height: 1.2rem; }
.auth-message.error { color: var(--danger); font-weight: 700; }
.auth-caveat { border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; line-height: 1.45; margin: 1.2rem 0 0; padding-top: 1rem; }
.coach-identity { align-self: center; color: var(--muted); font-size: .82rem; font-weight: 700; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 680px) { .coach-identity { max-width: none; } }
@media print { .auth-view { display: none; } }


.role-selector {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr 1fr;
  padding: .45rem;
}

.role-selector label {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: .45rem;
  justify-content: center;
  padding: .6rem;
}

.role-selector input {
  accent-color: var(--accent);
}

.athlete-portal {
  display: grid;
  gap: 1rem;
}

@media (max-width: 680px) {
  .role-selector {
    grid-template-columns: 1fr;
  }
}
/* Performance skin v0.4 */
:root {
  --bg: #081018;
  --panel: #f8fafc;
  --surface: #eef3f5;
  --text: #101820;
  --muted: #647684;
  --line: #d8e1e5;
  --accent: #c7f000;
  --accent-dark: #8fb800;
  --signal: #00e0a4;
  --blue: #2f80ed;
  --warning: #ffb020;
  --danger: #e5484d;
  --topbar: #070d13;
  --shadow: 0 20px 46px rgba(3, 8, 13, 0.2);
}

body {
  background:
    radial-gradient(circle at 18% -12%, rgba(0, 224, 164, .22), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(199, 240, 0, .16), transparent 28%),
    linear-gradient(180deg, #081018 0%, #0d1721 42%, #101820 100%);
}

.topbar {
  background: rgba(7, 13, 19, .96);
  border-bottom: 1px solid rgba(199, 240, 0, .22);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .25);
  backdrop-filter: blur(14px);
}

.topbar h1,
.home-heading h2 {
  color: #f7fbff;
}

.eyebrow,
.topbar .eyebrow {
  color: var(--accent);
}

button {
  background: linear-gradient(135deg, var(--accent), var(--signal));
  box-shadow: 0 10px 22px rgba(0, 224, 164, .18);
  color: #071016;
}

button:hover {
  background: linear-gradient(135deg, #d9ff2f, #00f0b0);
}

button.secondary {
  background: #16222e;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: none;
  color: #edf7fb;
}

button.secondary:hover {
  background: #213241;
}

button.danger {
  background: #ffe6e8;
  border: 1px solid #ffc9ce;
  color: #a71924;
}

.panel {
  background: rgba(248, 250, 252, .97);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 18px 42px rgba(3, 8, 13, .18);
}

.sidebar .panel {
  background: linear-gradient(180deg, rgba(248, 250, 252, .98), rgba(238, 244, 246, .98));
}

.metric {
  background: linear-gradient(150deg, #101820 0%, #172636 65%, #203342 100%);
  border: 1px solid rgba(199, 240, 0, .22);
  box-shadow: 0 20px 38px rgba(0, 0, 0, .22);
  color: #f7fbff;
  overflow: hidden;
  position: relative;
}

.metric::before {
  background: linear-gradient(180deg, var(--accent), var(--signal));
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.metric span,
.metric small {
  color: #9fb1bd;
}

.metric strong {
  color: var(--accent);
  letter-spacing: 0;
}

.list-item {
  background: #ffffff;
  border-color: #dce6ea;
}

.list-item.active,
.athlete-card:hover {
  background: #effff9;
  border-color: var(--signal);
}

.athlete-card {
  background: linear-gradient(150deg, #111c26, #172636);
  border: 1px solid rgba(199, 240, 0, .2);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .22);
  color: #f7fbff;
}

.athlete-card span,
.athlete-card small {
  color: #a8bac6;
}

.grid-form input,
.grid-form select,
.test-row input,
.auth-form input {
  background: #ffffff;
  border: 1px solid #cbd8de;
}

.grid-form input:focus,
.grid-form select:focus,
.test-row input:focus,
.auth-form input:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(0, 224, 164, .16);
  outline: none;
}

.badge {
  background: #10251f;
  border-color: rgba(0, 224, 164, .35);
  color: var(--signal);
}

.composition-item {
  background: linear-gradient(180deg, #ffffff, #f4f8f7);
  border-color: #dbe5e8;
}

.range-track .ideal-zone {
  background: linear-gradient(90deg, var(--signal), var(--accent));
}

.auth-view {
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 224, 164, .25), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(199, 240, 0, .18), transparent 28%),
    #081018;
}

.auth-panel {
  background: linear-gradient(180deg, rgba(17, 28, 38, .98), rgba(9, 16, 24, .98));
  border: 1px solid rgba(199, 240, 0, .18);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
  color: #f7fbff;
}

.auth-panel h1,
.auth-panel .muted {
  color: #f7fbff;
}

.auth-form label,
.auth-message,
.auth-caveat {
  color: #a8bac6;
}

.role-selector {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
}

.role-selector label {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: #f7fbff;
}

.role-selector label:has(input:checked) {
  background: rgba(199, 240, 0, .14);
  border-color: var(--accent);
}

.test-domain {
  border-top: 3px solid var(--signal);
}
/* Brand assets */
.brand-logo {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.auth-logo {
  filter: drop-shadow(0 12px 28px rgba(0, 224, 164, .18));
  margin: 0 auto 1.2rem;
  max-height: 96px;
  width: min(100%, 360px);
}

.brand-heading {
  align-items: center;
  display: flex;
  gap: .85rem;
  min-width: 0;
}

.brand-mark {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(199, 240, 0, .22);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
  height: 58px;
  object-fit: cover;
  object-position: center top;
  padding: .15rem;
  width: 58px;
}

.brand-heading h1,
.brand-heading .eyebrow {
  white-space: nowrap;
}

.print-brand {
  align-items: center;
  border-bottom: 1px solid #d8e1e5;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .8rem;
}

.print-brand img {
  height: 54px;
  object-fit: contain;
  width: 220px;
}

.print-brand h1 {
  margin: 0;
}

@media (max-width: 680px) {
  .brand-heading {
    align-items: flex-start;
  }

  .brand-mark {
    height: 48px;
    width: 48px;
  }

  .brand-heading h1,
  .brand-heading .eyebrow {
    white-space: normal;
  }

  .auth-logo {
    max-height: 78px;
  }
}

@media print {
  .print-brand img {
    filter: grayscale(1);
  }
}
/* Visibility and access polish */
[hidden],
.is-hidden {
  display: none !important;
}

.auth-title {
  color: #f7fbff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .95;
  margin: .2rem 0 .75rem;
  text-transform: uppercase;
}
.priority-uncertainty {
  background: rgba(0, 224, 164, .08);
  border: 1px solid rgba(0, 224, 164, .2);
  border-radius: 8px;
  color: #24413c;
  font-size: .9rem;
  line-height: 1.45;
  margin: .35rem 0 1rem;
  padding: .75rem .85rem;
}

.composition-grid.compact {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.composition-grid.compact .composition-item {
  border: 1px solid #dbe5e8;
  border-left-width: 4px;
  border-radius: 8px;
  min-height: 136px;
  padding: 1rem;
}

.composition-top {
  align-items: center;
  display: flex;
  gap: .6rem;
  justify-content: space-between;
  margin-bottom: .55rem;
}

.composition-top span {
  color: #556474;
  font-size: .84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.composition-top b {
  border-radius: 999px;
  font-size: .72rem;
  padding: .22rem .5rem;
  white-space: nowrap;
}

.composition-item strong {
  color: #101923;
  display: block;
  font-size: 1.65rem;
  line-height: 1.1;
  margin-bottom: .55rem;
}

.composition-item small {
  color: #657386;
  display: block;
  line-height: 1.4;
}

.composition-item.in-range { border-left-color: var(--signal); }
.composition-item.in-range .composition-top b { background: rgba(0, 224, 164, .14); color: #087158; }
.composition-item.near-range { border-left-color: #f3b23c; }
.composition-item.near-range .composition-top b { background: rgba(243, 178, 60, .18); color: #7a4d00; }
.composition-item.out-range { border-left-color: #ef6351; }
.composition-item.out-range .composition-top b { background: rgba(239, 99, 81, .14); color: #8d2f24; }
.composition-item.missing { border-left-color: #a8b4c0; }
.composition-item.missing .composition-top b,
.composition-item.neutral .composition-top b { background: #edf2f5; color: #556474; }

@media (max-width: 980px) {
  .composition-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .composition-grid.compact { grid-template-columns: 1fr; }
}
.button-link {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 1rem;
  text-decoration: none;
}

.header-actions .button-link {
  white-space: nowrap;
}
a.button-link.secondary {
  background: #16222e;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: none;
  color: #dce8ef;
}

a.button-link.secondary:hover {
  background: #213241;
}

.protocol-actions a.button-link,
.protocol-actions a.secondary {
  padding: 0 1rem;
}

/* PP brand identity v1 theme */
:root {
  --bg: #111111;
  --panel: #ffffff;
  --surface: #f5f5f5;
  --text: #111111;
  --muted: #646464;
  --line: #e2e2e2;
  --accent: #2D7FF9;
  --accent-dark: #1e5fbf;
  --signal: #404040;
  --blue: #2D7FF9;
  --warning: #b7791f;
  --danger: #b4232f;
  --topbar: #111111;
  --shadow: 0 14px 34px rgba(17, 17, 17, .12);
}

body {
  background: #111111;
  color: var(--text);
}

.topbar {
  background: #111111;
  border-bottom: 1px solid #2a2a2a;
  box-shadow: none;
}

.layout,
.home-view,
.athlete-portal { background: transparent; }

.panel,
.metric {
  border-radius: 8px;
}

.panel {
  background: #ffffff;
  border: 1px solid #e7e7e7;
  box-shadow: var(--shadow);
}

.sidebar .panel {
  background: #181818;
  border-color: #2a2a2a;
  color: #ffffff;
}
.sidebar .panel h2, .sidebar .panel .section-title h2 { color: #ffffff; }
.sidebar .list-item { background: #202020; border-color: #303030; color: #ffffff; }
.sidebar .list-item span { color: #b8b8b8; }
.sidebar .list-item.active { background: #111111; border-color: var(--accent); }

button,
.button-link {
  background: #2D7FF9;
  box-shadow: none;
  color: #ffffff;
}
button:hover,
.button-link:hover { background: #1e5fbf; }
button.secondary, a.button-link.secondary { background: #222222; border: 1px solid #3a3a3a; color: #ffffff; }
button.secondary:hover, a.button-link.secondary:hover { background: #303030; border-color: #505050; }
button.danger { background: #ffffff; border: 1px solid #d9b3b7; color: #9f1d28; }
button.danger:hover { background: #fff2f3; }

.eyebrow,
.topbar .eyebrow { color: #2D7FF9; }
.badge { background: #f3f7ff; border-color: #c9ddff; color: #1e5fbf; }

.metric { background: #111111; border: 1px solid #2d2d2d; color: #ffffff; box-shadow: none; }
.metric::before { background: #2D7FF9; }
.metric strong { color: #ffffff; }
.metric span, .metric small { color: #b8b8b8; }

.grid-form input, .grid-form select, .test-row input, .auth-form input { background: #ffffff; border-color: #d7d7d7; }
.grid-form input:focus, .grid-form select:focus, .test-row input:focus, .auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,127,249,.12); }
.list-item, .test-row, .composition-item { background: #ffffff; border-color: #e2e2e2; }
.list-item.active, .athlete-card:hover { background: #f3f7ff; border-color: var(--accent); }

.athlete-card { background: #181818; border: 1px solid #2d2d2d; box-shadow: none; }
.athlete-card::before { background: #2D7FF9; content: ""; display: block; height: 3px; margin: -1rem -1rem 1rem; }
.athlete-card span, .athlete-card small { color: #b8b8b8; }

.auth-view { background: #111111; }
.auth-panel { background: #181818; border-color: #2d2d2d; box-shadow: none; }
.auth-panel h1, .auth-panel .muted { color: #ffffff; }
.auth-form label, .auth-message, .auth-caveat { color: #cfcfcf; }
.role-selector label:has(input:checked) { background: rgba(45,127,249,.12); border-color: var(--accent); }
.test-domain { border-top-color: var(--accent); }
.range-track .ideal-zone { background: #2D7FF9; }
.priority-uncertainty { background: #f3f7ff; border-color: #c9ddff; color: #173b6c; }

.composition-item.in-range { border-left-color: #404040; }
.composition-item.near-range { border-left-color: var(--accent); }
.composition-item.out-range { border-left-color: var(--danger); }
.composition-item.in-range .composition-top b { background: #eeeeee; color: #404040; }
.composition-item.near-range .composition-top b { background: #edf4ff; color: #1e5fbf; }
.composition-item.out-range .composition-top b { background: #fff2f3; color: #9f1d28; }

.auth-logo { aspect-ratio: 980 / 250; height: auto; max-height: none; object-fit: contain; width: min(100%, 440px); }
.protocol-logo { aspect-ratio: 980 / 250; height: auto; max-width: 460px; object-fit: contain; width: min(76vw, 460px); }
.brand-mark { background: transparent; border: 0; box-shadow: none; height: 58px; object-fit: contain; object-position: center; padding: 0; width: 58px; }
.print-brand img { aspect-ratio: 980 / 250; height: auto; object-fit: contain; width: 280px; }
.test-domain-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  padding: .85rem 1rem 1rem;
}

.test-domain-actions button {
  font-size: .84rem;
  min-height: 38px;
  padding: .55rem .9rem;
  white-space: nowrap;
}

.test-domain-actions span {
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 640px) {
  .test-domain-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .test-domain-actions button {
    width: 100%;
  }
}

.athlete-card-meta {
  display: block;
  margin-top: .65rem;
}

.test-row-modular {
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
}

.test-variable-fields {
  display: grid;
  gap: .55rem;
}

.test-variable {
  align-items: center;
  display: grid;
  gap: .4rem;
}

.test-variable span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .test-row-modular {
    grid-template-columns: 1fr;
  }
}

.priority-uncertainty {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1rem;
  font-weight: 400;
  margin: .7rem 0 1rem;
  padding: 0;
  text-transform: none;
}

.confidence-card {
  border: 1px solid #dce5ef;
  border-left: 4px solid #2D7FF9;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  padding: .95rem;
}

.confidence-card span {
  color: var(--muted);
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.confidence-card strong {
  color: var(--text);
  display: block;
  font-size: 1rem;
  margin-top: .15rem;
}

.confidence-card small {
  color: var(--muted);
  display: block;
  line-height: 1.45;
  margin-top: .3rem;
}

.confidence-stats {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.confidence-stats span {
  background: #fff;
  border: 1px solid #e2e7ee;
  border-radius: 7px;
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
  padding: .6rem;
  text-transform: none;
}

.confidence-stats b {
  color: var(--muted);
  display: block;
  font-size: .68rem;
  font-weight: 800;
  margin-bottom: .2rem;
  text-transform: uppercase;
}

.confidence-bajo {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #f97316;
}

.confidence-medio {
  background: #f8fbff;
  border-color: #c9ddff;
  border-left-color: #2D7FF9;
}

.confidence-alto {
  background: #f0fdf7;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}

@media (max-width: 760px) {
  .confidence-card {
    grid-template-columns: 1fr;
  }
}

.test-variable input[type="checkbox"] {
  height: 20px;
  justify-self: start;
  width: 20px;
}

.test-variable:has(input[type="checkbox"]) {
  align-items: center;
  background: #f6f9fc;
  border: 1px solid #e0e7ee;
  border-radius: 7px;
  grid-template-columns: 1fr auto;
  padding: .55rem .65rem;
}

.test-variable:has(input[type="checkbox"]) span {
  color: var(--text);
  font-size: .84rem;
  text-transform: none;
}

.test-variable-choice {
  align-items: center;
  background: #f6f9fc;
  border: 1px solid #e0e7ee;
  border-radius: 7px;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .55rem .65rem;
}

.test-variable-choice > span {
  color: var(--text);
  font-size: .84rem;
  text-transform: none;
}

.test-choice {
  display: inline-grid;
  gap: .35rem;
  grid-template-columns: 1fr 1fr;
}

.test-choice label {
  cursor: pointer;
  display: block;
}

.test-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.test-choice b {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 7px;
  color: #657386;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.test-choice input[value="true"]:checked + b {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}

.test-choice input[value="false"]:checked + b {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

@media (max-width: 640px) {
  .test-variable-choice {
    grid-template-columns: 1fr;
  }

  .test-choice {
    justify-self: start;
  }
}

.test-guide-link {
  align-items: center;
  border: 1px solid #c9ddff;
  border-radius: 7px;
  color: #1e5fbf;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  margin-top: .55rem;
  min-height: 32px;
  padding: .35rem .6rem;
  text-decoration: none;
  width: fit-content;
}

.test-guide-link:hover {
  background: #f3f7ff;
  border-color: #2D7FF9;
}

.profile-insight-title {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  list-style: none;
  margin-top: .25rem;
  text-transform: uppercase;
}

.profile-insight {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #2D7FF9;
  border-radius: 8px;
  list-style: none;
  padding: .7rem .8rem;
}

.profile-insight.profile-strength { border-left-color: #138b70; }
.profile-insight.profile-weakness { border-left-color: var(--danger); }
.profile-insight.muted { color: var(--muted); }

.automatic-report {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
}

.automatic-report h3 {
  margin: 0 0 .8rem;
}

.report-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem;
}

.report-grid h4 {
  margin: 0 0 .5rem;
}

.report-grid ul {
  margin: 0;
  padding-left: 1.1rem;
}

.report-grid li,
.report-grid p {
  color: var(--muted);
  line-height: 1.45;
  margin: .25rem 0;
}

@media (max-width: 760px) {
  .report-grid { grid-template-columns: 1fr; }
}

.test-variable select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .62rem;
  width: 100%;
}



.split > .panel {
  width: 100%;
}




.domain-profile-table {
  margin-top: .85rem;
}

.domain-profile-table table {
  font-size: .84rem;
}

.domain-profile-table th,
.domain-profile-table td {
  padding: .45rem .5rem;
}

.test-row-inactive {
  opacity: 0.42;
  border-style: dashed;
  filter: grayscale(1);
}

.test-row-inactive input,
.test-row-inactive select {
  cursor: not-allowed;
}



.admin-view {
  display: grid;
  gap: 1rem;
}

.admin-metrics {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-metric {
  min-height: 118px;
}

.admin-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-list,
.admin-notes {
  display: grid;
  gap: .65rem;
}

.admin-list article,
.admin-notes article {
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: .25rem;
  padding: .8rem;
}

.admin-list strong,
.admin-notes strong {
  color: var(--text);
}

.admin-list span,
.admin-list small,
.admin-notes span {
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .admin-metrics { grid-template-columns: 1fr; }
}


/* Login cover background */
.auth-view {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .44) 42%, rgba(0, 0, 0, .68)),
    radial-gradient(circle at 50% 85%, rgba(45, 127, 249, .16), transparent 34%),
    url('../assets/pp-login-bg.png') center center / cover no-repeat;
  min-height: 100vh;
  position: relative;
}

.auth-panel {
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(13, 15, 18, .88), rgba(8, 10, 13, .94));
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.auth-logo {
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .55));
}


/* Coach home cover background */
#homeView.home-view {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .46) 48%, rgba(0, 0, 0, .78)),
    radial-gradient(circle at 52% 82%, rgba(45, 127, 249, .14), transparent 36%),
    url('../assets/pp-login-bg.png') center center / cover no-repeat;
  border-top: 1px solid rgba(255, 255, 255, .08);
  min-height: calc(100vh - 82px);
  position: relative;
}

#homeView .home-heading {
  background: linear-gradient(180deg, rgba(12, 14, 17, .72), rgba(12, 14, 17, .44));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
  padding: 1rem;
}

#homeView .athlete-card {
  backdrop-filter: blur(10px);
  background: linear-gradient(150deg, rgba(18, 20, 24, .9), rgba(10, 12, 15, .84));
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 24px 68px rgba(0, 0, 0, .36);
}

#homeView .athlete-card:hover {
  background: linear-gradient(150deg, rgba(28, 32, 38, .94), rgba(16, 19, 24, .9));
  border-color: var(--accent);
}


.admin-inline-control {
  display: grid;
  gap: .25rem;
  margin-top: .5rem;
}

.admin-inline-control span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-inline-control select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  padding: .5rem .55rem;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}

.admin-row-actions button {
  min-height: 34px;
  padding: .35rem .6rem;
}


.panel-switch {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
}

.panel-switch button {
  border-radius: 6px;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
}

.panel-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

@media (max-width: 760px) {
  .panel-switch {
    width: 100%;
  }

  .panel-switch button {
    flex: 1;
  }
}


.entry-mode-switch {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
}

.entry-mode-switch button {
  border-radius: 6px;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
}

.entry-mode-switch button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compact-tests {
  margin-top: 1rem;
  max-height: 62vh;
  overflow: auto;
  padding-right: 0.25rem;
}

.single-test-fields {
  margin-top: 0.4rem;
}

.athlete-entry-panel .test-domain {
  margin-bottom: 0.9rem;
}

@media (max-width: 760px) {
  .entry-mode-switch {
    width: 100%;
  }

  .entry-mode-switch button {
    flex: 1;
  }
}


.data-window-panel {
  border-left: 3px solid var(--accent);
}

.compact-select {
  display: grid;
  gap: 0.35rem;
  min-width: 220px;
}

.data-window-alert {
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
}

.data-window-alert strong {
  font-size: 0.82rem;
  text-transform: uppercase;
}

.data-window-alert span {
  color: inherit;
  line-height: 1.35;
}

.data-window-alert.info {
  background: rgba(45, 127, 249, 0.1);
  border: 1px solid rgba(45, 127, 249, 0.26);
}

.data-window-alert.warning {
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid rgba(255, 176, 32, 0.35);
}

.data-window-alert.danger {
  background: rgba(229, 72, 77, 0.12);
  border: 1px solid rgba(229, 72, 77, 0.35);
}


.athlete-profile-dashboard {
  display: grid;
  gap: 1rem;
}

.athlete-dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.athlete-profile-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
}

.radar-panel,
.profile-summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

.radar-panel canvas {
  display: block;
  max-width: 100%;
  width: 100%;
}

.profile-summary-panel h3,
.athlete-profile-insights h4 {
  margin: 0 0 .75rem;
}

.athlete-profile-insights {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.athlete-profile-insights > div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .9rem;
}

.athlete-profile-insights p {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  margin: .4rem 0 0;
}

.athlete-profile-insights span {
  color: var(--muted);
  text-align: right;
}

@media (max-width: 980px) {
  .athlete-dashboard-metrics,
  .athlete-profile-grid,
  .athlete-profile-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .athlete-dashboard-metrics,
  .athlete-profile-grid,
  .athlete-profile-insights {
    grid-template-columns: 1fr;
  }
}


.welcome-modal {
  align-items: center;
  background: rgba(0, 0, 0, .72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 1000;
}

.welcome-modal.is-hidden { display: none; }

.welcome-card {
  background: linear-gradient(145deg, #0d1117 0%, #171b22 55%, #050607 100%);
  border: 1px solid rgba(45, 127, 249, .35);
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
  color: #fff;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 780px;
  overflow: hidden;
  padding: 1.2rem;
  width: min(94vw, 780px);
}

.welcome-visual {
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.72)), url("../assets/pp-login-bg.png") center / cover, #050607;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  display: grid;
  min-height: 220px;
  place-items: center;
  position: relative;
}

.welcome-visual span {
  background: linear-gradient(110deg, #f5f7fa 0 46%, #b8bec7 47% 58%, #d4a90a 59% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.74));
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 5.8rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0;
  line-height: .82;
  transform: skew(-7deg);
}
.welcome-visual i {
  background: #d4a90a;
  bottom: 54px;
  box-shadow: 0 0 24px rgba(212,169,10,.34);
  height: 4px;
  opacity: .95;
  position: absolute;
  transform: skew(-26deg);
  width: 98px;
}

.welcome-copy { align-self: center; }
.welcome-copy h2 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: .95; margin: .3rem 0 1rem; }
.welcome-copy p { color: #cbd5e1; font-size: 1rem; line-height: 1.55; }
.welcome-copy button { margin-top: 1rem; }

.coach-directory-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: .85rem; }
.coach-directory-list { display: grid; gap: .65rem; margin-bottom: .85rem; }
.coach-directory-item { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 1rem; justify-content: space-between; padding: .85rem; }
.coach-directory-item strong { display: block; }
.coach-directory-item span { color: var(--muted); font-size: .85rem; }
.request-actions { display: flex; gap: .5rem; margin-top: .8rem; }
.request-actions button { min-height: 34px; padding: .45rem .7rem; }
.athlete-card-meta.request { color: #2D7FF9; font-weight: 800; }

@media (max-width: 640px) {
  .welcome-card { grid-template-columns: 1fr; }
  .welcome-visual { min-height: 150px; }
  .coach-directory-item { align-items: stretch; flex-direction: column; }
}



.merge-panel {
  margin-top: 1rem;
}

.merge-panel .compact-link-form {
  align-items: end;
}

.merge-panel select {
  min-width: 0;
}

.contact-panel {
  border-left: 3px solid var(--accent);
}

.contact-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
}

.contact-actions span {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.test-execution-note {
  background: #111111;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: #ffffff;
  margin-top: .75rem;
  padding: .75rem .85rem;
}

.test-execution-note strong {
  color: var(--accent);
  display: block;
  font-size: .78rem;
  letter-spacing: .03em;
  margin-bottom: .35rem;
  text-transform: uppercase;
}

.test-execution-note p {
  color: #f2f2f2;
  font-size: .88rem;
  line-height: 1.45;
  margin: 0;
}

.test-variable-fields .test-execution-note {
  grid-column: 1 / -1;
}

/* PP lime performance theme trial */
:root {
  --accent: #c7f000;
  --accent-dark: #8fb800;
  --signal: #d7ff2f;
  --blue: #c7f000;
  --topbar: #050607;
}

body {
  background: #f4f6f7;
  color: #101418;
}

.topbar {
  background: linear-gradient(135deg, #050607, #111418);
  border-bottom: 1px solid rgba(199, 240, 0, .24);
}

.topbar .eyebrow,
.topbar .coach-identity,
.eyebrow,
.profile-insight-title strong {
  color: var(--accent);
}

button,
.button-link {
  background: linear-gradient(135deg, #c7f000, #d7ff2f);
  border-color: rgba(199, 240, 0, .82);
  box-shadow: 0 12px 28px rgba(199, 240, 0, .18);
  color: #050607;
}

button:hover,
.button-link:hover {
  background: linear-gradient(135deg, #d7ff2f, #f0ff72);
}

button.secondary,
.button-link.secondary {
  background: #ffffff;
  border-color: #d4d9de;
  box-shadow: none;
  color: #111418;
}

button.danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.badge,
.role-selector label:has(input:checked),
.priority-uncertainty,
.data-window-alert.warning {
  background: rgba(199, 240, 0, .12);
  border-color: rgba(199, 240, 0, .42);
  color: #4e6500;
}

.metric::before,
.athlete-card::before,
.range-track .ideal-zone,
.composition-item::before {
  background: #c7f000;
}

.metric {
  background: #111418;
  border-color: #252a31;
}

.metric strong,
.metric span,
.metric small {
  color: #ffffff;
}

.grid-form input:focus,
.grid-form select:focus,
.test-row input:focus,
.test-row select:focus,
.auth-form input:focus {
  border-color: #c7f000;
  box-shadow: 0 0 0 3px rgba(199, 240, 0, .18);
}

.list-item.active,
.athlete-card:hover,
.coach-directory-item:hover {
  background: #f8ffe2;
  border-color: #c7f000;
}

.test-domain,
.pilot-card,
.profile-insight-title,
.contact-panel,
.data-window-panel,
.test-execution-note {
  border-left-color: #c7f000;
  border-top-color: #c7f000;
}

.test-guide-link {
  border-color: rgba(199, 240, 0, .48);
  color: #5f7800;
}

.test-guide-link:hover {
  background: #f8ffe2;
  border-color: #c7f000;
}

.auth-view {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .46) 42%, rgba(0, 0, 0, .72)),
    radial-gradient(circle at 50% 85%, rgba(199, 240, 0, .16), transparent 34%),
    url('../assets/pp-login-bg.png') center center / cover no-repeat;
}

#homeView.home-view {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .50) 48%, rgba(0, 0, 0, .80)),
    radial-gradient(circle at 52% 82%, rgba(199, 240, 0, .16), transparent 36%),
    url('../assets/pp-login-bg.png') center center / cover no-repeat;
}

.welcome-card,
#homeView .home-heading,
#homeView .athlete-card {
  border-color: rgba(199, 240, 0, .22);
}

.athlete-card-meta.request {
  color: #c7f000;
}

.test-execution-note strong {
  color: #c7f000;
}
