:root {
  --bg: #05070b;
  --bg-alt: #0a1018;
  --panel: rgba(14, 19, 27, 0.78);
  --panel-strong: rgba(19, 25, 35, 0.9);
  --ink: #edf6ff;
  --muted: #93a8c1;
  --accent: #19ebff;
  --accent-2: #63a8ff;
  --accent-3: #76ffd8;
  --danger: #ff5f57;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --control-bg: linear-gradient(180deg, rgba(12, 17, 25, 0.96), rgba(15, 21, 30, 0.92));
  --control-bg-hover: linear-gradient(180deg, rgba(15, 20, 29, 0.98), rgba(18, 25, 35, 0.94));
  --control-border: rgba(142, 159, 180, 0.18);
  --control-border-strong: rgba(99, 168, 255, 0.24);
  --control-ring: 0 0 0 4px rgba(25, 235, 255, 0.14);
  --button-primary-bg: linear-gradient(180deg, #16466a 0%, #13618f 54%, #1084b6 100%);
  --button-primary-bg-hover: linear-gradient(180deg, #1a5078 0%, #156a9b 54%, #1092c9 100%);
  --button-secondary-bg: linear-gradient(180deg, rgba(32, 39, 51, 0.98), rgba(19, 24, 33, 0.96));
  --button-danger-bg: linear-gradient(180deg, #7a2d31 0%, #cf4f52 100%);
  --button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 22px rgba(4, 11, 19, 0.28),
    0 4px 14px rgba(16, 132, 182, 0.18);
  --button-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 28px rgba(4, 11, 19, 0.3),
    0 6px 18px rgba(16, 132, 182, 0.22);
  --button-shadow-active:
    inset 0 2px 6px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 14px rgba(4, 11, 19, 0.22),
    0 2px 8px rgba(16, 132, 182, 0.14);
  --table-row-hover: rgba(255, 255, 255, 0.032);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 38px 110px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

a,
button,
select,
input,
textarea {
  touch-action: manipulation;
}

button,
a,
select {
  -webkit-tap-highlight-color: rgba(20, 116, 102, 0.22);
}

body {
  margin: 0;
  font-family: "SF Pro Text", "SF Pro Display", "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 18%, rgba(25, 235, 255, 0.14), transparent 22%),
    radial-gradient(circle at 82% 6%, rgba(99, 168, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 110%, rgba(118, 255, 216, 0.08), transparent 24%),
    linear-gradient(180deg, #04060a 0%, var(--bg) 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

body.rebels-theme {
  --bg: #0b0806;
  --bg-alt: #17110c;
  --panel: rgba(28, 18, 11, 0.8);
  --panel-strong: rgba(39, 24, 15, 0.9);
  --ink: #fff4ea;
  --muted: #d0ad8e;
  --accent: #ffb347;
  --accent-2: #ff7e36;
  --accent-3: #ffd9a6;
  --line: rgba(255, 214, 170, 0.08);
  --line-strong: rgba(255, 214, 170, 0.16);
  --control-bg: linear-gradient(180deg, rgba(28, 18, 11, 0.96), rgba(37, 23, 14, 0.92));
  --control-bg-hover: linear-gradient(180deg, rgba(36, 22, 14, 0.98), rgba(46, 28, 17, 0.94));
  --control-border: rgba(253, 186, 116, 0.16);
  --control-border-strong: rgba(251, 146, 60, 0.26);
  --control-ring: 0 0 0 4px rgba(249, 115, 22, 0.14);
  --button-primary-bg: linear-gradient(180deg, #6d3411 0%, #ba5a1a 56%, #ec7d22 100%);
  --button-primary-bg-hover: linear-gradient(180deg, #7c3f16 0%, #cb6420 56%, #f28d31 100%);
  --button-secondary-bg: linear-gradient(180deg, rgba(55, 34, 20, 0.98), rgba(33, 20, 12, 0.96));
  --button-danger-bg: linear-gradient(180deg, #7b2b2e 0%, #ce4b4f 100%);
  --button-shadow:
    inset 0 1px 0 rgba(255, 244, 230, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 244, 230, 0.04),
    0 10px 22px rgba(20, 9, 3, 0.28),
    0 4px 14px rgba(236, 125, 34, 0.16);
  --button-shadow-hover:
    inset 0 1px 0 rgba(255, 244, 230, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 244, 230, 0.05),
    0 14px 28px rgba(20, 9, 3, 0.3),
    0 6px 18px rgba(236, 125, 34, 0.2);
  --button-shadow-active:
    inset 0 2px 6px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 244, 230, 0.05),
    0 6px 14px rgba(20, 9, 3, 0.22),
    0 2px 8px rgba(236, 125, 34, 0.12);
  --table-row-hover: rgba(255, 244, 230, 0.038);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --shadow-strong: 0 38px 110px rgba(0, 0, 0, 0.54);
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 126, 54, 0.16), transparent 24%),
    radial-gradient(circle at 82% 4%, rgba(255, 179, 71, 0.18), transparent 26%),
    linear-gradient(180deg, #090705 0%, var(--bg) 100%);
}

.bg-layer {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(99, 168, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 168, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, rgba(25, 235, 255, 0.045), transparent 55%);
  background-size: 38px 38px, 38px 38px, auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

body.rebels-theme .bg-layer {
  background-image:
    linear-gradient(to right, rgba(255, 179, 71, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 179, 71, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 126, 54, 0.06), transparent 55%);
}

.auth-page {
  position: fixed;
  inset: 0;
  z-index: 10;
  background:
    radial-gradient(circle at 18% 12%, rgba(25, 235, 255, 0.12), transparent 24%),
    radial-gradient(circle at 82% 2%, rgba(99, 168, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(3, 5, 8, 0.97), rgba(8, 12, 19, 0.95));
  display: grid;
  place-items: stretch;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)) 16px;
  overflow: auto;
}

body.rebels-theme .auth-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 179, 71, 0.12), transparent 24%),
    radial-gradient(circle at 82% 2%, rgba(255, 126, 54, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(8, 5, 3, 0.97), rgba(18, 11, 7, 0.95));
}

.auth-landing {
  position: relative;
  width: min(760px, 100%);
  min-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: 0 auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 28px 40px rgba(255, 255, 255, 0.015),
    var(--shadow-strong);
  background:
    radial-gradient(circle at 16% 18%, rgba(25, 235, 255, 0.18), transparent 24%),
    radial-gradient(circle at 86% 4%, rgba(99, 168, 255, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(8, 12, 18, 0.98), rgba(10, 15, 23, 0.95));
  backdrop-filter: blur(28px) saturate(130%);
}

body.rebels-theme .auth-landing {
  background:
    radial-gradient(circle at 18% 16%, rgba(249, 115, 22, 0.18), transparent 24%),
    radial-gradient(circle at 86% 4%, rgba(245, 158, 11, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(20, 12, 8, 0.97), rgba(49, 25, 11, 0.95));
}

.auth-landing::before,
.auth-landing::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.auth-landing::before {
  width: 240px;
  height: 240px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(25, 235, 255, 0.32), transparent 72%);
}

.auth-landing::after {
  width: 220px;
  height: 220px;
  bottom: -90px;
  left: -70px;
  background: radial-gradient(circle, rgba(99, 168, 255, 0.24), transparent 72%);
}

.auth-overlay-copy {
  position: relative;
  max-width: min(640px, 100%);
  color: #f2f8ff;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(10, 14, 21, 0.82), rgba(17, 27, 42, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(120%);
  text-align: center;
}

.auth-overlay-copy h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 0.98;
}

.auth-overlay-copy p {
  margin: 0;
  color: #aac0d8;
  font-size: 0.95rem;
}

.auth-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 62px);
  overflow: auto;
  position: relative;
  background: linear-gradient(180deg, rgba(19, 24, 33, 0.92), rgba(14, 19, 27, 0.84));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 44px 0 rgba(255, 255, 255, 0.018),
    var(--shadow-strong);
  padding: 58px 22px 22px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease, opacity 0.2s ease;
  backdrop-filter: blur(26px) saturate(130%);
  isolation: isolate;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 18px;
  width: 44px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 6px 6px, #ff5f57 0 4px, transparent 4.6px),
    radial-gradient(circle at 22px 6px, #ffbd2e 0 4px, transparent 4.6px),
    radial-gradient(circle at 38px 6px, #28c840 0 4px, transparent 4.6px);
  opacity: 0.92;
}

.floating-auth-card {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  backdrop-filter: blur(6px);
}

.portal-login-card {
  position: relative;
  z-index: 1;
}

.portal-login-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  pointer-events: none;
}

.portal-login-card > * {
  position: relative;
  z-index: 1;
}

.portal-badge-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 34px;
  margin: -12px -2px 16px;
  padding: 0 4px 14px 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(25, 235, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #9cefff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-title {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.portal-intro {
  margin: 10px 0 18px;
  color: #a5b9d1;
  font-size: 0.96rem;
  line-height: 1.55;
}

.portal-intro-tight {
  margin-bottom: 16px;
  max-width: 34ch;
}

.auth-card h2 {
  margin-top: 4px;
  letter-spacing: -0.03em;
}

.login-copy {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-copy a {
  color: var(--accent);
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 8px;
}

.portal-login-card .login-form label {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f96b2;
}

.portal-login-card .login-form input,
.portal-login-card .login-form select,
.portal-login-card .login-form textarea {
  min-height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 15, 22, 0.94), rgba(15, 22, 31, 0.9));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -14px 28px rgba(0, 0, 0, 0.16);
}

.portal-login-card .login-form > button {
  width: 100%;
  margin-top: 8px;
}

.hidden-form {
  display: none;
}

.auth-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-form-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.login-error {
  margin: 4px 0 0;
  min-height: 18px;
  color: #ff9d96;
  font-size: 0.83rem;
  font-weight: 700;
}

.auth-feedback {
  margin: 4px 0 0;
  min-height: 18px;
  font-size: 0.83rem;
  font-weight: 700;
}

.auth-feedback.is-error {
  color: #ff9d96;
}

.auth-feedback.is-success {
  color: var(--accent-3);
}

.auth-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.auth-helper-row-primary {
  margin-top: 12px;
}

.auth-helper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--control-bg);
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-helper-button:hover {
  background: var(--control-bg-hover);
  border-color: var(--control-border-strong);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.16);
}

.auth-helper-button:active,
.auth-switch-button:active,
.auth-inline-back:active {
  filter: none;
}

.auth-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-switch-copy {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-switch-button,
.auth-inline-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--control-bg);
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-inline-back {
  white-space: nowrap;
}

.auth-switch-button:hover,
.auth-inline-back:hover {
  filter: none;
  text-decoration: none;
  background: var(--control-bg-hover);
  border-color: var(--control-border-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.16);
}

.portal-login-card.auth-mode-create .auth-helper-row-primary,
.portal-login-card.auth-mode-create .auth-switch-row {
  display: none;
}

.auth-status-panel {
  display: grid;
  gap: 10px;
}

.auth-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-inline-actions > button {
  min-height: 42px;
}

body.app-locked {
  overflow: hidden;
}

body.app-locked .site-header,
body.app-locked .app,
body.app-locked .site-footer {
  display: none;
}

body:not(.app-locked) .auth-page {
  display: none;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-top: env(safe-area-inset-top);
  padding-bottom: 8px;
  backdrop-filter: blur(18px);
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

body.rebels-theme .site-header {
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(21, 27, 37, 0.9), rgba(12, 16, 23, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 24px 34px rgba(255, 255, 255, 0.015),
    0 20px 46px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(22px) saturate(135%);
  isolation: isolate;
}

.nav-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

body.rebels-theme .nav-wrap {
  background: linear-gradient(180deg, rgba(35, 21, 13, 0.92), rgba(23, 14, 8, 0.8));
  border-color: rgba(255, 214, 170, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 252px;
  min-width: 0;
  max-width: 252px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.brand span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.05;
}

body.rebels-theme .brand,
body.rebels-theme .site-nav a {
  color: #fff3e5;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 27, 37, 0.96), rgba(12, 16, 23, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

body.rebels-theme .brand-logo {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.92), rgba(255, 236, 213, 0.9));
  border-color: rgba(249, 115, 22, 0.22);
  box-shadow: 0 14px 28px rgba(124, 45, 18, 0.14);
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  margin-left: 0;
  padding: 4px 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.rebels-theme .site-nav {
  border-color: rgba(255, 214, 170, 0.1);
  background: rgba(255, 243, 229, 0.035);
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #b6c9df;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

.site-nav a:hover {
  color: #d8faff;
  background: linear-gradient(180deg, rgba(25, 235, 255, 0.1), rgba(99, 168, 255, 0.06));
  border-color: rgba(99, 168, 255, 0.18);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

body.rebels-theme .site-nav a:hover {
  background: linear-gradient(180deg, rgba(255, 179, 71, 0.16), rgba(255, 126, 54, 0.1));
  border-color: rgba(251, 146, 60, 0.16);
}

.site-nav a:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 5px 10px rgba(0, 0, 0, 0.12);
}

.nav-user-button {
  flex: 0 0 136px;
  margin-left: 8px;
  display: block;
  align-self: center;
  background: linear-gradient(180deg, rgba(28, 34, 45, 0.98), rgba(14, 18, 26, 0.96));
  color: #eef4ff;
  border-radius: 12px;
  padding: 6px 30px 6px 12px;
  min-height: 36px;
  height: 36px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 136px;
  width: 136px;
  max-width: 136px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(180deg, rgba(28, 34, 45, 0.98), rgba(14, 18, 26, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%23c7d6ea' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 10px center;
  background-size: auto, 10px 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.18);
  transition: border-color 0.16s ease, box-shadow 0.18s ease, background-color 0.16s ease, transform 0.14s ease;
}

body.rebels-theme .nav-user-button {
  background: linear-gradient(180deg, rgba(60, 31, 14, 0.98), rgba(38, 20, 9, 0.96));
  border-color: rgba(253, 186, 116, 0.18);
  background-image:
    linear-gradient(180deg, rgba(60, 31, 14, 0.98), rgba(38, 20, 9, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%23ffe7cc' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 10px center;
  background-size: auto, 10px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 230, 0.08),
    0 10px 20px rgba(124, 45, 18, 0.18);
}

.nav-user-button:hover,
.nav-user-button:focus-visible {
  border-color: rgba(99, 168, 255, 0.22);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 24px rgba(0, 0, 0, 0.18);
}

body.rebels-theme .nav-user-button:hover,
body.rebels-theme .nav-user-button:focus-visible {
  border-color: rgba(249, 115, 22, 0.22);
}

.nav-user-button:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.16),
    0 6px 12px rgba(0, 0, 0, 0.14);
}

@media (max-width: 1180px) and (min-width: 761px) {
  .nav-wrap {
    padding-left: 72px;
  }

  .brand {
    flex-basis: 230px;
    max-width: 230px;
  }

  .brand span {
    font-size: 0.88rem;
  }

  .site-nav a {
    font-size: 0.8rem;
    padding: 0 8px;
  }

  .nav-user-button {
    flex-basis: 128px;
    min-width: 128px;
    width: 128px;
    max-width: 128px;
    margin-left: 6px;
    font-size: 0.77rem;
  }
}

.user-management-overlay {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: rgba(8, 15, 31, 0.58);
  display: none;
  place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}

.user-management-card {
  width: min(860px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  padding: 18px;
  backdrop-filter: blur(24px) saturate(140%);
  display: grid;
  gap: 14px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, opacity 0.2s ease;
}

.user-management-head-copy {
  display: grid;
  gap: 4px;
}

.user-management-head-copy .login-copy {
  margin: 0;
}

.coach-section {
  display: grid;
  gap: 10px;
}

.admin-section {
  display: grid;
  gap: 10px;
}

.coach-panel h3 {
  margin: 0 0 8px;
}

.coach-sessions-view {
  display: grid;
  gap: 10px;
}

.coach-player-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(17, 22, 30, 0.9), rgba(12, 16, 24, 0.78));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.coach-player-card h4 {
  margin: 0 0 6px;
}

.coach-player-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.user-management-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-management-head h2 {
  margin: 0;
}

.user-management-form,
.user-management-section-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(17, 23, 33, 0.94), rgba(11, 16, 24, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.user-management-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.user-management-section-head .login-copy {
  margin: 4px 0 0;
}

.user-management-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(25, 235, 255, 0.24);
  background: linear-gradient(180deg, rgba(20, 43, 56, 0.92), rgba(11, 23, 31, 0.86));
  color: #bff7ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.user-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-management-field {
  display: grid;
  gap: 5px;
}

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

.user-management-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.user-management-form label,
.user-management-section-card label {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7f96b2;
}

.user-management-form input,
.user-management-form select,
.user-management-form textarea,
.user-management-section-card input,
.user-management-section-card select,
.user-management-section-card textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(10, 15, 22, 0.95), rgba(15, 22, 31, 0.92));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -14px 28px rgba(0, 0, 0, 0.16);
}

.user-management-form > button,
.user-management-section-card > button {
  width: 100%;
  margin-top: 4px;
}

.user-management-section-card.auth-status-panel {
  padding: 16px;
}

.user-management-section-card .auth-inline-actions {
  margin-top: 4px;
}

body.user-management-open .user-management-overlay {
  display: grid;
}

body.user-management-open .user-management-card {
  animation: panel-rise-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.app {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 calc(56px + env(safe-area-inset-bottom));
  display: grid;
  gap: 18px;
}

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
  padding: 22px;
  width: 100%;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease, background 0.24s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 72px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 82%);
  pointer-events: none;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  gap: 14px;
  background:
    radial-gradient(circle at 12% 18%, rgba(25, 235, 255, 0.16), transparent 22%),
    linear-gradient(135deg, #0a1018 0%, #0e1520 52%, #111d2e 100%);
  color: #eff6ff;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

body.rebels-theme .hero {
  background: linear-gradient(135deg, #130c08 0%, #3c1f0e 52%, #9a3412 100%);
}

.hero::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 235, 255, 0.28), transparent 70%);
  pointer-events: none;
}

body.rebels-theme .hero::before {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22), transparent 70%);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  opacity: 1;
  color: #88a0ba;
  font-weight: 800;
}

.hero .kicker {
  color: rgba(207, 223, 255, 0.8);
}

body.rebels-theme .hero .kicker {
  color: rgba(255, 225, 194, 0.76);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: "SF Pro Display", "Manrope", sans-serif;
  font-size: clamp(2.15rem, 4.6vw, 3.45rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

h2 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h3 {
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: #cfdbf5;
  max-width: 72ch;
}

body.rebels-theme .subtitle {
  color: #f9dbc1;
}

.hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-profile {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
}

body.rebels-theme .hero-badge {
  background: rgba(255, 247, 237, 0.1);
  border-color: rgba(253, 186, 116, 0.2);
}

.hero-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hero-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  backdrop-filter: blur(18px);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

body.rebels-theme .hero-card {
  background: rgba(255, 244, 230, 0.08);
  border-color: rgba(251, 146, 60, 0.16);
}

.hero-card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.hero-card p {
  margin: 0;
  color: #d6e5ff;
  font-size: 0.88rem;
}

body.rebels-theme .hero-card p {
  color: #fde6cf;
}

.timeline {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.timeline-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 24, 34, 0.88), rgba(12, 17, 24, 0.76));
  padding: 14px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.timeline article h3 {
  margin: 0 0 8px;
}

.timeline-date {
  margin: 0 0 5px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.timeline article p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.84rem;
}

.timeline-list li + li {
  margin-top: 6px;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(25, 235, 255, 0.1);
  color: #9cefff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.rebels-theme .timeline-badge,
body.rebels-theme .portal-status {
  background: rgba(249, 115, 22, 0.12);
  color: #ffd9b5;
}

.timeline-match {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(25, 235, 255, 0.12);
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.94), rgba(12, 17, 24, 0.82));
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.timeline-match + .timeline-match {
  margin-top: 10px;
}

.timeline-match-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.timeline-match-head strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.timeline-match-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(25, 235, 255, 0.16);
  background: rgba(25, 235, 255, 0.08);
  color: #9cefff;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.timeline-match-link:hover {
  background: rgba(25, 235, 255, 0.16);
}

body.rebels-theme .timeline-match-link:hover {
  background: rgba(249, 115, 22, 0.14);
}

.timeline-veo-label {
  color: #89a1bb;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-veo-input {
  width: 100%;
}

.timeline-veo-open {
  margin-top: 2px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.control-group {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

label {
  font-weight: 700;
  font-size: 0.87rem;
  color: #a4b7cb;
}

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

select,
input,
textarea {
  border: 1px solid var(--control-border);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--control-bg);
  min-height: 44px;
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -12px 24px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.16s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

select[multiple] {
  min-height: 130px;
  padding: 8px 10px;
}

select:not([multiple]):not(.nav-user-button) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(180deg, rgba(12, 17, 25, 0), rgba(12, 17, 25, 0)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%2393a8c1' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right 12px center;
  background-size: auto, 10px 10px;
}

input::placeholder,
textarea::placeholder {
  color: #7287a0;
}

select:hover,
input:hover,
textarea:hover {
  border-color: rgba(142, 159, 180, 0.24);
  background: var(--control-bg-hover);
}

button {
  position: relative;
  border: 1px solid rgba(25, 235, 255, 0.16);
  border-radius: 16px;
  padding: 10px 16px;
  background: var(--button-primary-bg);
  color: #effbff;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  min-height: 44px;
  box-shadow: var(--button-shadow);
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.16s ease, opacity 0.16s ease, background 0.18s ease, border-color 0.18s ease;
}

button.danger {
  background: var(--button-danger-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 22px rgba(63, 18, 18, 0.24),
    0 4px 14px rgba(255, 95, 87, 0.14);
}

button.secondary {
  background: var(--button-secondary-bg);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

#switchUser {
  display: none;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--control-ring), 0 14px 30px rgba(4, 11, 19, 0.16);
}

button:hover {
  transform: translateY(-1px);
  background: var(--button-primary-bg-hover);
  box-shadow: var(--button-shadow-hover);
  filter: saturate(1.05);
}

button:active,
button[data-busy="true"],
button[aria-busy="true"] {
  transform: translateY(1px);
  box-shadow: var(--button-shadow-active);
  filter: saturate(0.95);
}

button[data-busy="true"],
button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.96;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
  filter: saturate(0.84);
}

button[disabled]:hover {
  transform: none;
  background: inherit;
  box-shadow: inherit;
  filter: saturate(0.84);
}

button[data-busy="true"],
button[aria-busy="true"] {
  padding-right: 42px;
}

button[data-busy="true"]::after,
button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-top-color: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  animation: button-spin 0.8s linear infinite;
}

button.danger:active,
button.danger[data-busy="true"],
button.danger[aria-busy="true"] {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 14px rgba(63, 18, 18, 0.18),
    0 2px 8px rgba(255, 95, 87, 0.12);
}

button.secondary:active,
button.secondary[data-busy="true"],
button.secondary[aria-busy="true"] {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.16);
}

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

#focusBars {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.focus-row {
  display: grid;
  grid-template-columns: 118px 1fr 48px;
  gap: 8px;
  align-items: center;
}

.bar-wrap {
  background: rgba(255, 255, 255, 0.08);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

body.rebels-theme .output-link {
  background: linear-gradient(135deg, #2b1609, #ea580c);
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.24);
}

#todayCard {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.today-agent-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(25, 235, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 30, 42, 0.88), rgba(8, 18, 28, 0.82));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
}

.today-performance-box {
  border-color: rgba(110, 255, 195, 0.22);
  background: linear-gradient(180deg, rgba(14, 44, 38, 0.9), rgba(8, 23, 24, 0.84));
}

.elite-progress-box {
  border-color: rgba(255, 210, 106, 0.22);
  background: linear-gradient(180deg, rgba(45, 32, 15, 0.9), rgba(21, 16, 10, 0.84));
}

.elite-progress-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.elite-progress-grid strong {
  display: block;
  font-size: 1.3rem;
  color: #fff2c4;
}

.elite-progress-label,
.elite-progress-subtext,
.elite-progress-note,
.elite-progress-empty,
.elite-progress-row span {
  color: rgba(240, 244, 255, 0.8);
}

.elite-progress-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.elite-progress-subtext {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
}

.elite-progress-bar-shell {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.elite-progress-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd166, #ef4444 120%);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18);
}

.elite-progress-note {
  margin: 0;
}

.elite-progress-history {
  display: grid;
  gap: 8px;
}

.elite-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.elite-progress-row strong {
  color: #fff7dc;
  font-size: 0.92rem;
}

.today-agent-box p {
  margin: 0;
}

.today-focus,
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(25, 235, 255, 0.1);
  color: #9cefff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.testing-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.testing-header p {
  margin: 0;
  color: var(--muted);
}

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

.metric-row {
  display: grid;
  gap: 4px;
}

.metric-summary {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 9px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.78));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.summary-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 23, 32, 0.9), rgba(11, 16, 24, 0.82));
  padding: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 22px 28px rgba(255, 255, 255, 0.01),
    0 16px 34px rgba(0, 0, 0, 0.16);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
}

th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e95af;
  background: rgba(255, 255, 255, 0.035);
}

tbody tr {
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease;
}

tbody tr:hover td {
  background: var(--table-row-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

thead th:first-child {
  border-top-left-radius: 14px;
}

thead th:last-child {
  border-top-right-radius: 14px;
}

.session-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.session-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.94), rgba(12, 17, 24, 0.8));
  display: grid;
  gap: 9px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.session-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.session-day {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.session-phase {
  margin: 2px 0 0;
  color: #89a1bb;
  font-size: 0.82rem;
  font-weight: 700;
}

.session-week {
  background: rgba(25, 235, 255, 0.1);
  color: #a8f6ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  height: fit-content;
}

.session-objective {
  margin: 0;
  color: #d7e8f9;
}

.drill-list {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.drill-list li {
  line-height: 1.3;
}

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

.drill-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.76));
  padding: 12px;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.18s ease, background 0.22s ease;
}

.session-agent-list-item {
  list-style: none;
}

.session-agent-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(25, 235, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 30, 42, 0.88), rgba(8, 18, 28, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 32px rgba(0, 0, 0, 0.18);
}

.session-performance-section {
  border-color: rgba(110, 255, 195, 0.2);
  background: linear-gradient(180deg, rgba(14, 44, 38, 0.9), rgba(8, 23, 24, 0.84));
}

.session-performance-section h4 {
  color: #b9ffd6;
}

.session-agent-section h4 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fe9ff;
}

.session-agent-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.session-agent-card p,
.session-agent-card strong {
  margin: 0;
}

.session-agent-meta,
.session-agent-note {
  color: #8ca6c4;
  font-size: 0.82rem;
}

.session-agent-link {
  width: fit-content;
  margin-top: 4px;
  color: #9cefff;
  font-weight: 700;
  text-decoration: none;
}

.session-agent-link:hover {
  color: #d6fbff;
}

.drill-toggle {
  width: 100%;
  text-align: left;
  background: rgba(25, 235, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(25, 235, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.14);
}

.drill-toggle:hover {
  background: rgba(25, 235, 255, 0.14);
}

.drill-meta {
  color: #84a0bf;
  font-weight: 600;
}

.drill-detail {
  display: grid;
  margin-top: 0;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, transform 0.18s ease, margin-top 0.18s ease;
}

.drill-detail.is-open {
  max-height: 520px;
  opacity: 1;
  margin-top: 8px;
  transform: translateY(0);
  pointer-events: auto;
}

.drill-detail p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.drill-video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(25, 235, 255, 0.18);
  background: rgba(25, 235, 255, 0.08);
  color: #aef6ff;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 0 rgba(4, 10, 16, 0.4),
    0 18px 32px rgba(25, 235, 255, 0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.drill-video-link:hover {
  background: rgba(25, 235, 255, 0.14);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 7px 0 rgba(4, 10, 16, 0.42),
    0 20px 34px rgba(25, 235, 255, 0.16);
}

.drill-video-link:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 3px 0 rgba(4, 10, 16, 0.42),
    0 8px 16px rgba(25, 235, 255, 0.1);
}

.drill-video-note {
  font-size: 0.78rem;
}

.drill-instruction-input {
  width: 100%;
}

.match-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px dashed var(--line);
  padding-top: 9px;
}

.match-meta label {
  display: grid;
  gap: 4px;
}

.veo-open-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: underline;
}

.session-log {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px dashed var(--line);
  padding-top: 9px;
}

.session-log label {
  display: grid;
  gap: 4px;
}

.session-log textarea {
  resize: vertical;
  min-height: 44px;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 14px 0 28px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.output-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.output-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 16px;
  padding: 10px 14px;
  background: var(--button-primary-bg);
  color: #eefbff;
  font-weight: 700;
  border: 1px solid rgba(25, 235, 255, 0.16);
  box-shadow: var(--button-shadow);
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.16s ease, background 0.18s ease, border-color 0.18s ease;
}

.output-link:hover {
  transform: translateY(-1px);
  background: var(--button-primary-bg-hover);
  box-shadow: var(--button-shadow-hover);
}

.output-link:active {
  transform: translateY(1px);
  box-shadow: var(--button-shadow-active);
}

.output-shell {
  width: calc(100% - 32px);
  max-width: 1440px;
}

.output-head {
  display: grid;
  gap: 10px;
}

.output-head h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.output-head > p:not(.kicker) {
  max-width: 72ch;
  color: #a4b7cd;
}

.output-head .kicker {
  margin-bottom: -2px;
}

.admin-shell {
  gap: 16px;
}

.admin-grid {
  display: grid;
  gap: 16px;
}

.admin-panel-stack {
  display: grid;
  gap: 14px;
}

.admin-team-directory {
  display: grid;
  gap: 10px;
}

.admin-club-directory-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-club-directory-controls label {
  display: grid;
  gap: 4px;
}

.admin-suggestion-section {
  display: grid;
  gap: 10px;
}

.admin-suggestion-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.admin-account-grid > div {
  display: grid;
  gap: 4px;
}

.admin-shell .panel,
.coach-shell .panel,
.performance-shell .panel,
.output-shell > .panel {
  overflow: hidden;
}

.admin-panel-stack > h2,
.coach-panel-stack > h2,
#metricsContent > h2,
#gainsContent > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.admin-panel-stack > h2::after,
.coach-panel-stack > h2::after,
#metricsContent > h2::after,
#gainsContent > h2::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 168, 255, 0.3), rgba(99, 168, 255, 0));
}

.admin-panel-stack > h3,
.coach-panel-stack > h3,
.performance-panel-head h2,
.performance-analysis-card h3 {
  letter-spacing: -0.03em;
}

.admin-shell .recovery-note,
.coach-shell .recovery-note,
.performance-shell .recovery-note,
.output-shell .recovery-note {
  color: #97abc2;
  line-height: 1.55;
}

.admin-shell .login-form,
.coach-shell .login-form,
.performance-event-form {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(15, 21, 30, 0.92), rgba(10, 15, 22, 0.8)),
    radial-gradient(circle at top right, rgba(25, 235, 255, 0.06), transparent 46%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 36px rgba(0, 0, 0, 0.16);
}

.admin-shell .login-form label,
.coach-shell .login-form label,
.performance-event-form label {
  color: #b8cadf;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.admin-shell .login-copy,
.coach-shell .login-copy,
.performance-shell .login-copy {
  color: #8ea4be;
  line-height: 1.55;
}

.admin-shell select[multiple],
.coach-shell select[multiple] {
  min-height: 124px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-table-actions button {
  min-height: 38px;
  padding: 6px 9px;
  font-size: 0.78rem;
}

.admin-suggestion-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: underline;
}

.admin-suggestion-link:hover {
  color: var(--accent);
}

.admin-repository-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.admin-roster-drilldown {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.admin-roster-drilldown:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  text-decoration: underline;
}

.admin-team-drilldown {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.admin-team-drilldown:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  text-decoration: underline;
}

.admin-club-name {
  font-weight: 800;
  color: var(--ink);
}

.admin-club-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.admin-club-logo-thumb,
.admin-club-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(123, 147, 171, 0.2);
  background: rgba(12, 18, 27, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-club-logo-thumb {
  object-fit: contain;
  padding: 6px;
}

.admin-club-logo-fallback {
  color: #bff7ff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.roster-player-section {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.86), rgba(12, 17, 24, 0.72));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.roster-player-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.roster-player-helper {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.roster-player-grid,
.roster-parent-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.roster-player-grid label,
.roster-parent-card label {
  display: grid;
  gap: 4px;
}

.roster-player-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(8, 12, 18, 0.56);
  color: var(--muted);
  font-size: 0.88rem;
}

.roster-player-detail-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.8));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.roster-parent-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 21, 30, 0.82), rgba(10, 14, 21, 0.72));
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.roster-parent-card h5 {
  margin: 0;
  font-size: 0.92rem;
}

.roster-player-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.roster-player-link:hover {
  transform: none;
  box-shadow: none;
  filter: none;
  text-decoration: underline;
}

.roster-player-row.is-active td {
  background: rgba(25, 235, 255, 0.08);
}

.roster-player-meta {
  width: 100%;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.coach-shell {
  gap: 16px;
}

.coach-dashboard-grid {
  display: grid;
  gap: 16px;
}

.coach-panel-stack {
  display: grid;
  gap: 14px;
}

.coach-progress-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.coach-progress-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.76));
  padding: 14px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.coach-progress-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.coach-progress-card p {
  margin: 4px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

#coachInviteCredentialsPage {
  overflow-wrap: anywhere;
}

.output-head p {
  margin: 4px 0 0;
}

.output-nav {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gains-grid {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gain-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.76));
  padding: 14px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.summary-card,
.gain-card,
.coach-progress-card,
.performance-event-card,
.performance-analysis-card,
.roster-player-section,
.roster-player-detail-card,
.roster-parent-card,
.performance-filter-panel,
.performance-form-panel,
.performance-library-panel,
.performance-detail-panel {
  position: relative;
  overflow: hidden;
}

.summary-card::before,
.gain-card::before,
.coach-progress-card::before,
.performance-event-card::before,
.performance-analysis-card::before,
.roster-player-section::before,
.roster-player-detail-card::before,
.roster-parent-card::before,
.performance-filter-panel::before,
.performance-form-panel::before,
.performance-library-panel::before,
.performance-detail-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(25, 235, 255, 0.38), rgba(99, 168, 255, 0.12) 46%, rgba(99, 168, 255, 0));
  opacity: 0.9;
  pointer-events: none;
}

.summary-card > *,
.gain-card > *,
.coach-progress-card > *,
.performance-event-card > *,
.performance-analysis-card > *,
.roster-player-section > *,
.roster-player-detail-card > *,
.roster-parent-card > *,
.performance-filter-panel > *,
.performance-form-panel > *,
.performance-library-panel > *,
.performance-detail-panel > * {
  position: relative;
  z-index: 1;
}

.gain-card p {
  margin: 4px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.gain-bar-wrap {
  margin-top: 6px;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.gain-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

.gain-percent {
  font-weight: 800;
  color: var(--accent-2);
}

.recovery-note {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(25, 235, 255, 0.18);
  background: linear-gradient(180deg, rgba(12, 22, 33, 0.88), rgba(10, 16, 24, 0.76));
  color: #b7f9ff;
  font-size: 0.9rem;
}

.recovery-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.recovery-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 22, 31, 0.92), rgba(12, 17, 24, 0.76));
  padding: 14px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.18s ease, background 0.22s ease;
}

.recovery-card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.recovery-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.recovery-card p {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.running-week-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.running-week-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.running-week-card li {
  color: var(--ink);
  line-height: 1.45;
}

.running-phase-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-card:hover,
.timeline article:hover,
.timeline-match:hover,
.coach-player-card:hover,
.summary-card:hover,
.session-card:hover,
.drill-item:hover,
.roster-player-section:hover,
.roster-player-detail-card:hover,
.roster-parent-card:hover,
.coach-progress-card:hover,
.gain-card:hover,
.recovery-card:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 168, 255, 0.22);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(99, 168, 255, 0.06);
}

.panel:focus-within,
.auth-card:focus-within,
.user-management-card:focus-within,
.timeline article:focus-within,
.session-card:focus-within,
.drill-item:focus-within,
.roster-player-detail-card:focus-within {
  border-color: rgba(99, 168, 255, 0.24);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(99, 168, 255, 0.08);
}

.timeline article:has(:active),
.timeline-match:has(:active),
.session-card:has(:active),
.drill-item:has(:active),
.coach-player-card:has(:active),
.summary-card:has(:active),
.roster-player-section:has(:active),
.roster-player-detail-card:has(:active),
.roster-parent-card:has(:active),
.coach-progress-card:has(:active),
.gain-card:has(:active),
.recovery-card:has(:active) {
  transform: translateY(1px) scale(0.998);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.ghost-button {
  border: 1px solid rgba(123, 147, 171, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(17, 26, 38, 0.92), rgba(11, 17, 25, 0.88));
  color: var(--ink);
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(25, 235, 255, 0.24);
  background: linear-gradient(180deg, rgba(19, 29, 42, 0.96), rgba(12, 19, 28, 0.9));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

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

.ghost-button:active {
  transform: translateY(3px);
}

.performance-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
}

.performance-hero-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.performance-hero-stat {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 15px 16px;
  border: 1px solid rgba(123, 147, 171, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(14, 22, 32, 0.94), rgba(10, 16, 24, 0.82)),
    radial-gradient(circle at top right, rgba(25, 235, 255, 0.08), transparent 54%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 34px rgba(0, 0, 0, 0.16);
}

.performance-hero-stat span,
.performance-event-kpi span {
  color: #94aac3;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-panel-summary {
  margin: 6px 0 0;
  color: #9bb0c8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.performance-hero-stat strong {
  color: #eef7ff;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.performance-hero-stat small {
  color: #a0b3c9;
  font-size: 0.82rem;
  line-height: 1.45;
}

.performance-shell .output-head {
  margin-bottom: 16px;
}

.performance-filter-panel {
  grid-column: 1 / -1;
  padding: 20px 22px;
}

.performance-panel-head--compact {
  align-items: flex-end;
}

.performance-inline-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.performance-inline-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 168, 255, 0.18);
  background: linear-gradient(180deg, rgba(17, 39, 55, 0.76), rgba(11, 20, 31, 0.74));
  color: #d3ecff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.performance-filter-grid,
.performance-form-grid {
  display: grid;
  gap: 14px;
}

.performance-filter-grid > div,
.performance-form-grid > div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.performance-filter-grid > div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 21, 30, 0.84), rgba(10, 15, 22, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.performance-form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.performance-form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.performance-form-grid--player {
  grid-template-columns: minmax(0, 2.25fr) minmax(150px, 0.75fr);
}

.performance-form-grid--identity {
  grid-template-columns: minmax(0, 1.8fr) minmax(170px, 0.72fr);
}

.performance-form-grid--match {
  grid-template-columns: minmax(160px, 0.85fr) minmax(0, 1.15fr);
}

.performance-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.performance-panel-head h2 {
  margin: 2px 0 0;
}

.performance-event-form textarea {
  min-height: 96px;
}

.performance-event-form {
  gap: 14px;
}

.performance-library-panel,
.performance-detail-panel,
.performance-form-panel {
  padding: 20px 22px 22px;
}

.performance-form-panel .recovery-note {
  line-height: 1.45;
}

.performance-notes-label {
  margin-top: 2px;
}

.performance-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #d8f7ff;
  font-weight: 700;
}

.performance-inline-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.performance-toggle-note {
  margin-top: 0;
}

.performance-section-label {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #c8f4ff;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.performance-metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.performance-metric-grid > div,
.performance-upload-grid > div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.performance-upload-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.performance-upload-grid input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 16px;
  border-color: rgba(123, 147, 171, 0.22);
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.94), rgba(10, 16, 24, 0.86));
  color: #bfd8ea;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -12px 24px rgba(0, 0, 0, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease, background 0.18s ease;
}

.performance-upload-grid input[type="file"]:hover {
  border-color: rgba(25, 235, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -12px 24px rgba(0, 0, 0, 0.12),
    0 14px 28px rgba(0, 0, 0, 0.16);
}

.performance-upload-grid input[type="file"]:active {
  transform: translateY(1px);
}

.performance-upload-grid input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(25, 235, 255, 0.18);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(18, 38, 57, 0.96), rgba(14, 125, 170, 0.92));
  color: #effbff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 5px 0 rgba(5, 12, 18, 0.34),
    0 12px 20px rgba(12, 125, 170, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.performance-upload-grid input[type="file"]::file-selector-button:hover {
  filter: saturate(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 0 rgba(5, 12, 18, 0.34),
    0 14px 22px rgba(12, 125, 170, 0.22);
}

.performance-upload-grid input[type="file"]::file-selector-button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 0 rgba(5, 12, 18, 0.34),
    0 8px 14px rgba(12, 125, 170, 0.14);
}

.performance-upload-grid input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(25, 235, 255, 0.18);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(18, 38, 57, 0.96), rgba(14, 125, 170, 0.92));
  color: #effbff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 5px 0 rgba(5, 12, 18, 0.34),
    0 12px 20px rgba(12, 125, 170, 0.18);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.performance-upload-preview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.performance-upload-preview:empty {
  display: none;
}

.performance-upload-item,
.performance-map-item {
  margin: 0;
  border: 1px solid rgba(123, 147, 171, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 22, 33, 0.92), rgba(10, 16, 24, 0.8));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.performance-upload-item.is-pending {
  border-color: rgba(25, 235, 255, 0.26);
}

.performance-map-item.is-pending {
  border-color: rgba(25, 235, 255, 0.26);
}

.performance-upload-item img,
.performance-map-item img {
  display: block;
  width: 100%;
  aspect-ratio: 0.8;
  object-fit: cover;
  background: rgba(4, 8, 14, 0.85);
}

.performance-upload-item figcaption,
.performance-map-item figcaption {
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.performance-file-item {
  display: grid;
}

.performance-file-shell {
  display: grid;
  gap: 10px;
  min-height: 180px;
  align-content: center;
  justify-items: start;
  padding: 18px 16px 8px;
  background:
    linear-gradient(180deg, rgba(14, 21, 31, 0.94), rgba(10, 16, 24, 0.82)),
    radial-gradient(circle at top right, rgba(25, 235, 255, 0.08), transparent 46%);
}

.performance-file-shell strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.performance-file-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(25, 235, 255, 0.18);
  background: rgba(15, 61, 95, 0.46);
  color: #bff7ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.performance-event-list {
  display: grid;
  gap: 12px;
}

.performance-empty-list,
.performance-detail-empty {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(123, 147, 171, 0.22);
  color: var(--muted);
  background: rgba(10, 16, 24, 0.48);
}

.performance-event-card {
  width: 100%;
  border: 1px solid rgba(123, 147, 171, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.96), rgba(10, 16, 24, 0.84));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.performance-event-card:hover,
.performance-event-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(25, 235, 255, 0.24);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.performance-event-card:active {
  transform: translateY(3px);
}

.performance-event-card.is-selected {
  border-color: rgba(25, 235, 255, 0.4);
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(25, 235, 255, 0.08);
}

.performance-event-card h3,
.performance-detail-header h3 {
  margin: 4px 0 6px;
}

.performance-event-card p,
.performance-detail-header p,
.performance-detail-note,
.performance-analysis-card p {
  margin: 0;
}

.performance-event-card-head,
.performance-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.performance-event-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.performance-event-foot {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.performance-event-kpi {
  display: grid;
  gap: 4px;
}

.performance-event-kpi strong {
  color: #eef7ff;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
}

.performance-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.performance-brief-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.28fr) repeat(2, minmax(0, 0.86fr));
  margin-top: 14px;
}

.performance-brief-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid rgba(123, 147, 171, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(14, 22, 32, 0.96), rgba(10, 16, 24, 0.82)),
    radial-gradient(circle at top right, rgba(99, 168, 255, 0.06), transparent 54%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.performance-brief-card--primary {
  background:
    linear-gradient(180deg, rgba(16, 27, 40, 0.98), rgba(10, 17, 25, 0.84)),
    radial-gradient(circle at top right, rgba(25, 235, 255, 0.1), transparent 52%);
  border-color: rgba(99, 168, 255, 0.22);
}

.performance-brief-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.performance-brief-card strong {
  color: #eef7ff;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.performance-brief-copy {
  margin: 0;
  color: #a6b9cf;
  line-height: 1.6;
  font-size: 0.9rem;
}

.performance-brief-card .performance-tag-row {
  margin-top: auto;
}

.performance-summary-card {
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(123, 147, 171, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(14, 22, 32, 0.94), rgba(10, 16, 24, 0.8)),
    radial-gradient(circle at top right, rgba(25, 235, 255, 0.06), transparent 52%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 32px rgba(0, 0, 0, 0.18);
}

.performance-summary-card p,
.performance-summary-card span {
  color: #97abc2;
}

.performance-summary-card strong {
  color: #bff7ff;
}

.performance-analysis-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.performance-analysis-card {
  border: 1px solid rgba(123, 147, 171, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.96), rgba(10, 16, 24, 0.84));
  padding: 18px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.performance-elite-card {
  margin-top: 14px;
}

.performance-elite-card .elite-progress-history {
  margin-top: 10px;
}

.performance-elite-card .elite-progress-bar-shell {
  margin-top: 10px;
}

.performance-elite-card .elite-progress-note {
  margin-top: 10px;
}

.performance-subhead {
  margin-bottom: 10px;
}

.performance-vision-card > p {
  color: var(--muted);
  line-height: 1.5;
}

.performance-vision-metric-grid {
  margin-top: 12px;
}

.performance-vision-metric-card {
  gap: 6px;
}

.performance-vision-metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.performance-vision-tag-row {
  margin-top: 12px;
}

.performance-vision-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.performance-empty-inline {
  margin: 0;
  padding: 16px 18px;
  border: 1px dashed rgba(123, 147, 171, 0.22);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(10, 16, 24, 0.42);
}

.performance-map-card {
  margin-top: 14px;
}

.performance-map-gallery {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.performance-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.performance-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 147, 171, 0.2);
  background: rgba(14, 21, 31, 0.78);
  color: #d9faff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.performance-badge.game {
  border-color: rgba(71, 223, 122, 0.28);
  background: rgba(20, 56, 31, 0.56);
  color: #8ff5a5;
}

.performance-badge.practice {
  border-color: rgba(25, 235, 255, 0.28);
  background: rgba(17, 39, 55, 0.62);
  color: #8cefff;
}

.performance-badge.neutral {
  color: var(--ink);
}

.performance-detail-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 1080px) {
  .performance-detail-panel {
    align-self: start;
  }

  .performance-library-panel {
    align-self: start;
  }
}

.admin-shell .table-wrap,
.coach-shell .table-wrap,
.performance-shell .table-wrap,
.output-shell .table-wrap {
  margin-top: 10px;
  padding: 0;
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 44px rgba(0, 0, 0, 0.18);
}

.admin-shell .table-wrap table,
.coach-shell .table-wrap table,
.performance-shell .table-wrap table,
.output-shell .table-wrap table {
  min-width: 720px;
}

.admin-shell .table-wrap th,
.coach-shell .table-wrap th,
.performance-shell .table-wrap th,
.output-shell .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(28, 35, 46, 0.98), rgba(18, 24, 33, 0.96));
  color: #90a7c1;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.admin-shell .table-wrap td,
.coach-shell .table-wrap td,
.performance-shell .table-wrap td,
.output-shell .table-wrap td {
  padding: 12px 14px;
  vertical-align: top;
}

.admin-shell .table-wrap tbody td:first-child,
.coach-shell .table-wrap tbody td:first-child,
.performance-shell .table-wrap tbody td:first-child,
.output-shell .table-wrap tbody td:first-child {
  color: #eef6ff;
  font-weight: 700;
}

.admin-shell .table-wrap tbody tr:hover td,
.coach-shell .table-wrap tbody tr:hover td,
.performance-shell .table-wrap tbody tr:hover td,
.output-shell .table-wrap tbody tr:hover td {
  background: linear-gradient(180deg, rgba(25, 235, 255, 0.052), rgba(99, 168, 255, 0.038));
}

@keyframes panel-rise-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .auth-page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-wrap {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-left: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-wrap::before {
    display: none;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    margin-left: 0;
    justify-content: stretch;
  }

  .brand {
    width: 100%;
  }

  .site-nav a {
    min-height: 44px;
    font-size: 0.85rem;
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .nav-user-button {
    min-height: 46px;
    font-size: 0.82rem;
    padding: 8px 10px;
    flex-basis: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    grid-column: 1 / -1;
  }

  .grid,
  .hero-grid,
  .timeline,
  .metrics-form,
  .metric-summary,
  .gains-grid,
  .recovery-grid,
  .admin-grid,
  .coach-dashboard-grid,
  .coach-progress-grid {
    grid-template-columns: 1fr;
  }

  .output-nav,
  .output-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-club-directory-controls {
    grid-template-columns: 1fr;
  }

  .user-management-grid,
  .user-management-secondary-grid {
    grid-template-columns: 1fr;
  }

  .user-management-section-head {
    flex-direction: column;
  }

  .output-link {
    min-height: 46px;
    width: 100%;
  }

  .admin-shell .panel,
  .coach-shell .panel {
    padding: 18px 16px;
  }

  .admin-shell .login-form,
  .coach-shell .login-form {
    gap: 10px;
  }

  .admin-shell select[multiple],
  .coach-shell select[multiple] {
    min-height: 148px;
  }

  .session-card header {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-wrap {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .table-wrap table[data-responsive-table="ready"] {
    min-width: 0;
  }

  .table-wrap table[data-responsive-table="ready"] thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  .table-wrap table[data-responsive-table="ready"],
  .table-wrap table[data-responsive-table="ready"] tbody,
  .table-wrap table[data-responsive-table="ready"] tr,
  .table-wrap table[data-responsive-table="ready"] td {
    display: block;
    width: 100%;
  }

  .table-wrap table[data-responsive-table="ready"] tr {
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 22, 31, 0.94), rgba(12, 17, 24, 0.8));
    box-shadow: var(--shadow);
  }

  .table-wrap table[data-responsive-table="ready"] td {
    border: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(96px, 0.9fr) minmax(0, 1.2fr);
    gap: 12px;
    align-items: start;
    font-size: 0.84rem;
  }

  .admin-shell .table-wrap table[data-responsive-table="ready"] tr,
  .coach-shell .table-wrap table[data-responsive-table="ready"] tr {
    margin-bottom: 12px;
    padding: 18px 16px;
    border-radius: 20px;
  }

  .admin-shell .table-wrap table[data-responsive-table="ready"] td,
  .coach-shell .table-wrap table[data-responsive-table="ready"] td {
    gap: 8px;
  }

  .table-wrap table[data-responsive-table="ready"] td + td {
    margin-top: 10px;
  }

  .table-wrap table[data-responsive-table="ready"] td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .table-wrap table[data-responsive-table="ready"] .admin-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .auth-page {
    padding: calc(10px + env(safe-area-inset-top)) 10px calc(14px + env(safe-area-inset-bottom));
  }

  .auth-landing {
    min-height: auto;
    padding: 12px;
    background:
      radial-gradient(circle at 16% 18%, rgba(25, 235, 255, 0.14), transparent 22%),
      radial-gradient(circle at 86% 4%, rgba(99, 168, 255, 0.16), transparent 26%),
      linear-gradient(180deg, rgba(8, 12, 18, 0.98), rgba(10, 15, 23, 0.95));
  }

  body.rebels-theme .auth-landing {
    background:
      radial-gradient(circle at 18% 16%, rgba(249, 115, 22, 0.14), transparent 22%),
      radial-gradient(circle at 86% 4%, rgba(245, 158, 11, 0.16), transparent 26%),
      linear-gradient(180deg, rgba(20, 12, 8, 0.97), rgba(49, 25, 11, 0.95));
  }

  .floating-auth-card {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-height: none;
  }

  .auth-card {
    max-height: none;
    padding: 54px 14px 16px;
    border-radius: 24px;
  }

  .portal-badge-row {
    margin: -8px 0 14px;
    padding: 0 0 12px 54px;
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-title {
    font-size: 2rem;
  }

  .portal-intro {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .elite-progress-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .elite-progress-row strong {
    font-size: 0.88rem;
  }

  .portal-login-card .login-form {
    gap: 10px;
  }

  .portal-login-card .login-form input,
  .portal-login-card .login-form select,
  .portal-login-card .login-form textarea {
    min-height: 48px;
  }

  .auth-helper-row,
  .auth-switch-row,
  .auth-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-helper-button,
  .auth-switch-button,
  .auth-inline-back,
  .auth-inline-actions > button {
    width: 100%;
    min-height: 44px;
  }

  .auth-switch-row {
    align-items: stretch;
  }

  .portal-status {
    min-height: 30px;
  }

  .nav-user-button {
    min-height: 48px;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .control-group {
    min-width: 0;
  }

  .match-meta,
  .session-log,
  .admin-account-grid,
  .roster-player-grid,
  .roster-parent-grid {
    grid-template-columns: 1fr;
  }

  .timeline-match-head {
    flex-direction: column;
    align-items: stretch;
  }

  .app {
    width: calc(100% - 24px);
    margin: 0 auto;
    padding: 12px 0 calc(30px + env(safe-area-inset-bottom));
  }

  .panel {
    padding: 16px 14px;
  }

  .admin-shell .panel,
  .coach-shell .panel {
    padding: 16px 14px 18px;
  }

  .admin-panel-stack,
  .coach-panel-stack {
    gap: 14px;
  }

  .admin-shell .login-form,
  .coach-shell .login-form {
    gap: 12px;
  }

  .admin-shell .recovery-note,
  .coach-shell .recovery-note {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .admin-shell select[multiple],
  .coach-shell select[multiple] {
    min-height: 136px;
  }

  .admin-shell .login-form > button,
  .coach-shell .login-form > button,
  .admin-actions > button,
  .admin-table-actions > button {
    width: 100%;
    min-height: 46px;
  }

  .admin-table-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-roster-drilldown,
  .roster-player-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 4px 0;
  }

  .user-management-overlay {
    padding:
      calc(10px + env(safe-area-inset-top))
      10px
      calc(14px + env(safe-area-inset-bottom));
  }

  .user-management-card {
    width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
    border-radius: 24px;
  }

  .table-wrap table[data-responsive-table="ready"] td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .admin-shell .table-wrap table[data-responsive-table="ready"] tr,
  .coach-shell .table-wrap table[data-responsive-table="ready"] tr {
    padding: 16px 14px;
  }

  .output-nav,
  .output-links {
    grid-template-columns: 1fr;
  }

  .focus-row {
    grid-template-columns: 88px 1fr 40px;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .admin-shell .output-head h1,
  .coach-shell .output-head h1 {
    font-size: 1.72rem;
  }

  .portal-title {
    font-size: 1.72rem;
  }

  .portal-intro {
    font-size: 0.88rem;
  }

  .container {
    width: calc(100% - 20px);
    margin: 0 10px;
  }

  .app {
    width: calc(100% - 20px);
    margin: 0 auto;
  }

  .site-nav {
    grid-template-columns: 1fr;
  }

  .output-nav,
  .output-links {
    grid-template-columns: 1fr;
  }

  .focus-row {
    grid-template-columns: 74px 1fr 32px;
    gap: 6px;
  }

  .auth-card {
    padding: 52px 12px 14px;
    border-radius: 24px;
  }

  .user-management-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-match {
    padding: 10px;
  }

  .admin-shell .recovery-note,
  .coach-shell .recovery-note {
    padding: 12px;
  }

  .admin-shell .table-wrap table[data-responsive-table="ready"] tr,
  .coach-shell .table-wrap table[data-responsive-table="ready"] tr {
    padding: 14px 12px;
  }

  .table-wrap table[data-responsive-table="ready"] td {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

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

  .performance-hero-stats,
  .performance-brief-grid,
  .performance-form-grid.two-col,
  .performance-form-grid.three-col,
  .performance-metric-grid,
  .performance-upload-grid,
  .performance-analysis-grid,
  .performance-summary-grid,
  .performance-filter-grid {
    grid-template-columns: 1fr;
  }

  .performance-event-card-head,
  .performance-detail-header,
  .performance-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .performance-vision-columns {
    grid-template-columns: 1fr;
  }

  .performance-inline-summary {
    display: grid;
    width: 100%;
    justify-content: stretch;
  }

  .performance-event-foot {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .performance-detail-actions,
  .performance-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .performance-upload-preview,
  .performance-map-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .performance-hero-stat {
    min-height: 96px;
  }

  .performance-inline-pill {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .performance-upload-preview,
  .performance-map-gallery {
    grid-template-columns: 1fr;
  }

  .performance-analysis-card,
  .performance-event-card,
  .performance-filter-panel,
  .performance-form-panel,
  .performance-library-panel,
  .performance-detail-panel {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.iphone-app-body {
  min-height: 100vh;
  min-height: 100dvh;
}

.iphone-app-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)) 16px;
}

body.iphone-dock-enabled .app,
body.iphone-dock-enabled .iphone-app-shell {
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.iphone-app-window {
  display: grid;
  gap: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.iphone-app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: min(100%, 320px);
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(19, 26, 36, 0.92), rgba(10, 15, 22, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.iphone-app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.iphone-app-brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
}

.iphone-app-brand h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.iphone-app-topbar .kicker,
.iphone-app-subhead {
  display: none;
}

.iphone-app-status-cluster {
  display: none;
}

.iphone-status-pill,
.iphone-app-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(17, 25, 35, 0.92), rgba(12, 18, 27, 0.88));
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.iphone-app-chip--muted {
  color: var(--muted);
}

.iphone-install-panel,
.iphone-app-panel {
  padding: 20px;
}

.iphone-install-steps {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.iphone-install-steps li + li {
  margin-top: 8px;
}

.iphone-login-form {
  margin-top: 12px;
}

.iphone-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.iphone-home-view {
  display: grid;
  gap: 18px;
}

body.iphone-app-authenticated .iphone-home-view {
  display: block;
  min-height: 0;
}

body.iphone-app-authenticated .iphone-home-view .iphone-app-panel {
  display: none;
}

.iphone-app-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.iphone-app-hero h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1;
}

.iphone-profile-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 280px;
}

.iphone-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.iphone-track-button {
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 24, 34, 0.96), rgba(10, 15, 22, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 18px rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.iphone-track-button:hover,
.iphone-track-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(25, 235, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 24px rgba(0, 0, 0, 0.24);
}

.iphone-track-button:active,
.iphone-track-button.is-active {
  transform: translateY(2px);
  background: linear-gradient(180deg, rgba(25, 235, 255, 0.24), rgba(10, 32, 44, 0.98));
  border-color: rgba(25, 235, 255, 0.48);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, 0.22), 0 6px 12px rgba(0, 0, 0, 0.18);
}

.iphone-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.iphone-action-card {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 22, 32, 0.98), rgba(9, 13, 20, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 36px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.iphone-action-card:hover,
.iphone-action-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(25, 235, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 26px 44px rgba(0, 0, 0, 0.28);
}

.iphone-action-card:active {
  transform: translateY(2px);
  box-shadow: inset 0 8px 18px rgba(0, 0, 0, 0.24), 0 12px 18px rgba(0, 0, 0, 0.18);
}

.iphone-action-card--primary {
  background:
    radial-gradient(circle at 16% 14%, rgba(25, 235, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(18, 48, 67, 0.96), rgba(10, 17, 25, 0.94));
  border-color: rgba(25, 235, 255, 0.26);
}

.iphone-action-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.iphone-action-card p {
  margin: 0;
  color: var(--muted);
}

.iphone-action-card .kicker {
  color: rgba(237, 246, 255, 0.76);
}

.iphone-link-list {
  margin: 0;
}

.iphone-bottom-dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: min(100%, 430px);
  max-width: calc(100vw - 24px);
  padding: 8px 10px 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(22, 30, 42, 0.94), rgba(11, 17, 25, 0.9)),
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.08), transparent 58%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
}

.iphone-dock-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  gap: 5px;
  padding: 2px 0 0;
  border-radius: 16px;
  text-decoration: none;
  color: #dcecff;
  border: 1px solid transparent;
  background: transparent;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.iphone-dock-item:hover,
.iphone-dock-item:focus-visible {
  transform: translateY(-1px);
  color: #f3fbff;
  background: rgba(255, 255, 255, 0.03);
}

.iphone-dock-item:active {
  transform: translateY(1px) scale(0.985);
}

.iphone-bottom-dock.is-touch-engaged .iphone-dock-item {
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.iphone-dock-item--primary {
  color: #ffffff;
}

.iphone-dock-icon {
  position: relative;
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  isolation: isolate;
  background: linear-gradient(180deg, #2f3948, #1b2430);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -10px 18px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease,
    border-color 0.22s ease,
    filter 0.22s ease;
  will-change: transform, box-shadow, filter;
}

.iphone-dock-icon::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 13px;
  background: radial-gradient(circle at 50% 40%, rgba(147, 221, 255, 0.48), rgba(67, 144, 255, 0.18) 52%, transparent 74%);
  opacity: 0;
  transform: scale(0.88);
  filter: blur(8px);
  transition: opacity 0.24s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.iphone-dock-icon::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08) 34%, transparent 60%);
  opacity: 0.72;
  pointer-events: none;
}

.iphone-dock-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

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

.iphone-dock-item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.iphone-dock-item.is-active::after {
  opacity: 1;
  transform: translateY(0);
  background: #ffffff;
}

.iphone-dock-item.is-active .iphone-dock-icon {
  transform: translateY(-1px) scale(1.07);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -12px 18px rgba(0, 0, 0, 0.1),
    0 10px 18px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(118, 191, 255, 0.16);
  animation: iphoneDockActiveSettle 0.42s cubic-bezier(0.18, 0.9, 0.32, 1.18);
}

.iphone-dock-item.is-touch-target .iphone-dock-icon {
  transform: translateY(-3px) scale(1.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -12px 18px rgba(0, 0, 0, 0.12),
    0 16px 22px rgba(0, 0, 0, 0.2),
    0 0 22px rgba(118, 191, 255, 0.2);
}

.iphone-dock-item.is-touch-neighbor .iphone-dock-icon {
  transform: translateY(-1px) scale(1.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -10px 16px rgba(0, 0, 0, 0.1),
    0 10px 18px rgba(0, 0, 0, 0.18),
    0 0 12px rgba(118, 191, 255, 0.1);
}

.iphone-dock-item.is-touch-target .iphone-dock-icon::before {
  opacity: 1;
  transform: scale(1.12);
}

.iphone-dock-item.is-touch-neighbor .iphone-dock-icon::before {
  opacity: 0.7;
  transform: scale(1.02);
}

.iphone-dock-item.is-active .iphone-dock-icon::before,
.iphone-dock-item:hover .iphone-dock-icon::before,
.iphone-dock-item:focus-visible .iphone-dock-icon::before {
  opacity: 1;
  transform: scale(1);
}

.iphone-dock-item:active .iphone-dock-icon {
  animation: iphoneDockTapBounce 0.34s cubic-bezier(0.2, 0.9, 0.24, 1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -12px 18px rgba(0, 0, 0, 0.14),
    0 12px 18px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(118, 191, 255, 0.22);
}

.iphone-dock-item:active .iphone-dock-icon::before {
  opacity: 1;
  transform: scale(1.06);
}

.iphone-dock-item[data-dock-key="plan"] .iphone-dock-icon {
  background: linear-gradient(180deg, #40c4ff, #1367ff);
}

.iphone-dock-item[data-dock-key="performance"] .iphone-dock-icon {
  background: linear-gradient(180deg, #7be7ff, #12a8d4);
}

.iphone-dock-item[data-dock-key="outputs"] .iphone-dock-icon {
  background: linear-gradient(180deg, #7aa2ff, #365eff);
}

.iphone-dock-item[data-dock-key="recovery"] .iphone-dock-icon {
  background: linear-gradient(180deg, #ffb36b, #ff7a45);
}

.iphone-dock-item[data-dock-key="running"] .iphone-dock-icon {
  background: linear-gradient(180deg, #7cf5b4, #24b36b);
}

.iphone-dock-item[data-dock-key="coach"] .iphone-dock-icon {
  background: linear-gradient(180deg, #b3bcff, #6d7cff);
}

.iphone-dock-item[data-dock-key="admin"] .iphone-dock-icon {
  background: linear-gradient(180deg, #d0d6df, #7f8b9a);
}

@keyframes iphoneDockActiveSettle {
  0% {
    transform: translateY(2px) scale(0.94);
  }

  55% {
    transform: translateY(-2px) scale(1.1);
  }

  100% {
    transform: translateY(-1px) scale(1.07);
  }
}

@keyframes iphoneDockTapBounce {
  0% {
    transform: translateY(-1px) scale(1.02);
  }

  38% {
    transform: translateY(1px) scale(0.94);
  }

  76% {
    transform: translateY(-2px) scale(1.06);
  }

  100% {
    transform: translateY(-1px) scale(1);
  }
}

body.standalone-app .iphone-app-shell {
  padding-top: calc(10px + env(safe-area-inset-top));
}

@media (max-width: 860px) {
  body.iphone-dock-enabled .site-header {
    padding-top: env(safe-area-inset-top);
    padding-bottom: 4px;
  }

  body.iphone-dock-enabled .site-header .container {
    width: min(100%, calc(100% - 24px));
    display: flex;
    justify-content: flex-start;
  }

  body.iphone-dock-enabled .nav-wrap {
    width: fit-content;
    min-height: 58px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-top: 6px;
    padding: 10px 14px;
    border-radius: 20px;
  }

  body.iphone-dock-enabled .site-nav,
  body.iphone-dock-enabled .nav-user-button {
    display: none;
  }

  body.iphone-dock-enabled .brand {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    gap: 10px;
  }

  body.iphone-dock-enabled .brand span {
    font-size: 0.92rem;
    line-height: 1.02;
  }

  body.iphone-dock-enabled .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
}

@media (max-width: 760px) {
  .iphone-app-window {
    padding: 0;
  }

  .iphone-app-hero {
    flex-direction: column;
  }

  .iphone-app-status-cluster,
  .iphone-profile-stack {
    align-items: flex-start;
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .iphone-app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .iphone-app-brand {
    align-items: center;
  }

  .iphone-app-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .iphone-track-grid,
  .iphone-action-grid {
    grid-template-columns: 1fr;
  }

  .iphone-action-card {
    min-height: 148px;
  }

  .iphone-login-actions {
    flex-direction: column;
  }

  .iphone-login-actions .output-link {
    width: 100%;
    justify-content: center;
  }

  .iphone-bottom-dock {
    max-width: calc(100vw - 14px);
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 430px) {
  .iphone-bottom-dock {
    bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 2px;
    max-width: calc(100vw - 10px);
    padding: 7px 6px 8px;
    border-radius: 22px;
  }

  .iphone-dock-item {
    gap: 4px;
    padding-top: 1px;
    border-radius: 14px;
  }

  .iphone-dock-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .iphone-dock-icon svg {
    width: 14px;
    height: 14px;
  }

  .iphone-dock-item::after {
    width: 4px;
    height: 4px;
  }

  .iphone-dock-item.is-active .iphone-dock-icon {
    transform: translateY(-1px) scale(1.05);
  }

  .iphone-dock-item.is-touch-target .iphone-dock-icon {
    transform: translateY(-2px) scale(1.08);
  }

  .iphone-dock-item.is-touch-neighbor .iphone-dock-icon {
    transform: translateY(-1px) scale(1.03);
  }
}

@media (max-width: 390px) {
  .iphone-bottom-dock {
    gap: 1px;
    max-width: calc(100vw - 8px);
    padding: 6px 5px 7px;
  }

  .iphone-dock-item {
    gap: 3px;
  }

  .iphone-dock-icon {
    width: 26px;
    height: 26px;
  }

  .iphone-dock-icon svg {
    width: 13px;
    height: 13px;
  }
}
