:root {
  --bg-0: #050a1d;
  --bg-1: #0b1b46;
  --bg-2: #11265f;
  --card: rgba(13, 27, 69, 0.56);
  --card-border: rgba(255, 255, 255, 0.18);
  --txt-main: #f7f9ff;
  --txt-soft: #b7c3e6;
  --accent: #e9113a;
  --accent-2: #2ec6d6;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

*::selection {
  background: rgba(233, 17, 58, 0.35);
  color: #ffffff;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--txt-main);
  background: radial-gradient(circle at 8% 20%, rgba(52, 95, 196, 0.72) 0%, transparent 34%),
    radial-gradient(circle at 92% 76%, rgba(25, 161, 154, 0.6) 0%, transparent 33%),
    linear-gradient(125deg, var(--bg-0), var(--bg-1), var(--bg-2));
}

body.ui-lock-scroll {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  margin-bottom: 0.8rem;
}

p {
  color: var(--txt-soft);
}

.bg-orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  background: rgba(85, 167, 255, 0.18);
  left: -6rem;
  top: -5rem;
  animation: drift 12s ease-in-out infinite alternate;
}

.orb-2 {
  background: rgba(29, 182, 164, 0.22);
  right: -6rem;
  bottom: -4rem;
  animation: drift 15s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(30px, -30px) scale(1.12);
  }
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 94vw);
  margin: 2rem auto;
}

.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card {
  box-shadow: 0 20px 50px rgba(2, 8, 23, 0.42);
}

.dashboard > .glass {
  animation: fade-in-up 0.34s ease;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  max-width: 620px;
  margin: 8vh auto;
  padding: 2.5rem;
  text-align: center;
}

.auth-login-stack {
  margin-top: 1.35rem;
  display: grid;
  gap: 1rem;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
}

.auth-mode-hint {
  margin: 0;
  text-align: center;
}

.auth-password-hint {
  margin: -0.15rem 0 0;
  text-align: left;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
}

.auth-field span {
  font-size: 0.82rem;
  color: var(--txt-soft);
}

.auth-form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.auth-inline-link:hover {
  color: #ffffff;
}

.auth-verification {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 196, 92, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 196, 92, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 13, 24, 0.5);
  text-align: left;
}

.auth-verification strong {
  color: #ffd67a;
}

.auth-verification .helper-text {
  margin: 0;
}

.auth-verification-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(230, 237, 255, 0.66);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-google-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(66, 130, 176, 0.5);
  background:
    radial-gradient(circle at 50% -40%, rgba(62, 131, 177, 0.22), rgba(10, 18, 32, 0) 62%),
    linear-gradient(180deg, rgba(10, 25, 41, 0.92), rgba(6, 17, 31, 0.96));
  color: #eaf2ff;
  box-shadow: inset 0 1px 0 rgba(164, 214, 255, 0.14), 0 0 0 1px rgba(12, 50, 80, 0.35);
  padding: 0.6rem 0.95rem;
}

.auth-google-btn:hover {
  background:
    radial-gradient(circle at 50% -40%, rgba(96, 168, 218, 0.26), rgba(10, 18, 32, 0) 62%),
    linear-gradient(180deg, rgba(13, 31, 49, 0.96), rgba(8, 21, 37, 0.98));
  border-color: rgba(98, 166, 218, 0.7);
}

.auth-google-btn-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  font-size: 1.73rem;
}

.auth-google-mark {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  line-height: 1;
  font-size: 1.1rem;
  background: conic-gradient(
    #4285f4 0deg 104deg,
    #34a853 104deg 198deg,
    #fbbc05 198deg 276deg,
    #ea4335 276deg 360deg
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#googleLoginBtnLabel {
  font-size: 1.04rem;
  font-weight: 600;
}

/* ── Login splash (sl-*) ──────────────────────────────── */
.sl-login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 5% 18%, rgba(198, 15, 36, 0.62) 0%, rgba(128, 9, 24, 0.38) 18%, rgba(45, 8, 14, 0.18) 34%, transparent 54%),
    radial-gradient(circle at 20% 34%, rgba(147, 8, 26, 0.24) 0%, transparent 26%),
    radial-gradient(circle at 92% 58%, rgba(255, 255, 255, 0.16) 0%, rgba(161, 170, 181, 0.08) 16%, transparent 34%),
    linear-gradient(110deg, #2d050c 0%, #13070b 12%, #090c12 28%, #070b11 56%, #090d14 78%, #05080d 100%);
}

.sl-login.hidden {
  display: none;
}

.sl-card {
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  background:
    linear-gradient(145deg, rgba(18, 34, 47, 0.72), rgba(10, 18, 27, 0.82)),
    linear-gradient(90deg, rgba(255, 77, 95, 0.05), rgba(103, 230, 255, 0.04));
  border: 1px solid rgba(140, 210, 228, 0.2);
  box-shadow: 0 22px 62px rgba(1, 7, 12, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  border-radius: 26px;
  padding: 2.8rem 2.4rem 2.2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sl-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  gap: 0.9rem;
}

.sl-logo {
  display: block;
  width: 88px;
  max-width: 88px;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  filter: drop-shadow(0 6px 20px rgba(198, 15, 36, 0.35)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.sl-eyebrow {
  margin: 0 0 0.18rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.77rem;
  text-transform: uppercase;
  color: rgba(145, 191, 211, 0.84);
  letter-spacing: 0.18em;
}

.sl-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.2rem;
  background: linear-gradient(110deg, #ff4d5f 0%, #ffd2d8 24%, #67e6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sl-sub {
  margin: 0;
  color: #afc5d4;
  font-size: 0.95rem;
  line-height: 1.6;
}

.sl-switch {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.sl-tab {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(139, 201, 220, 0.26);
  background: linear-gradient(180deg, rgba(14, 26, 37, 0.78), rgba(8, 15, 22, 0.56));
  color: #afc5d4;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sl-tab.active {
  color: #fff8fa;
  border-color: rgba(255, 77, 95, 0.48);
  background: linear-gradient(120deg, rgba(94, 17, 31, 0.8), rgba(13, 54, 66, 0.72));
}

.sl-tab:focus-visible {
  outline: 2px solid rgba(103, 230, 255, 0.55);
  outline-offset: 2px;
}

.sl-form {
  width: 100%;
  display: grid;
  gap: 0.72rem;
}

.sl-mode-hint {
  margin: 0;
  color: #afc5d4;
  font-size: 0.85rem;
  text-align: center;
}

.sl-field {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  text-align: left;
  color: #afc5d4;
  font-size: 0.82rem;
}

.sl-input {
  border-radius: 12px;
  min-height: 42px;
  border: 1px solid rgba(139, 201, 220, 0.24);
  padding: 0.72rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: #eef8ff;
  background: linear-gradient(180deg, rgba(18, 31, 43, 0.82), rgba(10, 18, 26, 0.74));
}

.sl-input:focus-visible {
  outline: 2px solid rgba(103, 230, 255, 0.55);
  outline-offset: 2px;
}

.sl-password-hint {
  margin: -0.1rem 0 0;
  color: #afc5d4;
  font-size: 0.8rem;
  text-align: left;
  line-height: 1.45;
}

.sl-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(139, 201, 220, 0.24);
  padding: 0.72rem 0.9rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, opacity 0.16s ease;
}

.sl-btn:hover {
  transform: translateY(-1px);
}

.sl-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.sl-btn:focus-visible {
  outline: 2px solid rgba(103, 230, 255, 0.55);
  outline-offset: 2px;
}

.sl-btn-primary {
  color: #141318;
  border-color: rgba(255, 160, 184, 0.42);
  background: linear-gradient(90deg, #ff0f4b 0%, #e95f83 56%, #ead7de 100%);
  box-shadow: 0 8px 18px rgba(180, 46, 87, 0.28);
}

.sl-btn-ghost {
  color: rgba(245, 249, 252, 0.94);
  border-color: rgba(139, 201, 220, 0.22);
  background: linear-gradient(180deg, rgba(18, 31, 43, 0.82), rgba(10, 18, 26, 0.74));
}

.sl-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sl-hidden-toggle {
  display: none !important;
}

.sl-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: rgba(175, 197, 212, 0.84);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sl-divider::before,
.sl-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 201, 220, 0.24), transparent);
}

@media (max-width: 640px) {
  .sl-logo {
    width: 72px;
    max-width: 72px;
  }

  .sl-title {
    font-size: 1.8rem;
  }

  .sl-card {
    border-radius: 20px;
    padding: 2rem 1.2rem 1.35rem;
  }

  .sl-input,
  .sl-btn,
  .sl-tab {
    font-size: 16px;
  }
}
/* ───────────────────────────────────────────────────── */

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-logo-auth {
  width: min(220px, 58%);
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.32));
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
}

.topbar-subtitle {
  color: var(--txt-soft);
}

.btn {
  border: 0;
  border-radius: 0.85rem;
  padding: 0.72rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(46, 198, 214, 0.88);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(130deg, var(--accent), #ff4d6e 42%, var(--accent-2));
  color: #061022;
}

.btn-danger {
  background: linear-gradient(130deg, #ff5a6c, #ff2d50);
  color: #ffffff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--txt-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.btn-active {
  background: rgba(85, 167, 255, 0.35);
  color: var(--txt-main);
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  gap: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  min-height: 108px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-topbar {
  width: 126px;
  opacity: 0.98;
}

.topbar-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
  flex: 0 0 auto;
}

.user-avatar-hidden {
  display: none;
}

.user-badge {
  font-size: 0.85rem;
  color: var(--txt-soft);
}

.main-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 142px));
  gap: 0.68rem;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.55rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 34, 72, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 34px rgba(0, 0, 0, 0.2);
}

.mobile-bottom-nav {
  display: none;
}

.nav-app-btn-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(145deg, rgba(255, 56, 98, 0.26), rgba(104, 175, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 18px rgba(0, 0, 0, 0.24);
  flex: 0 0 auto;
}

.nav-app-btn-icon svg {
  width: 20px;
  height: 20px;
}

.nav-app-btn-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
  text-align: left;
}

.nav-app-btn-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.05;
  color: #ffffff;
}

.nav-app-btn-subtitle {
  font-size: 0.66rem;
  line-height: 1.1;
  color: rgba(224, 234, 255, 0.7);
}

.mobile-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-soft);
  padding: 0.42rem 0.45rem;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}

.mobile-nav-btn-active {
  color: #ffffff;
  background: linear-gradient(130deg, rgba(233, 17, 58, 0.28), rgba(46, 198, 214, 0.22));
  border-color: rgba(255, 110, 141, 0.52);
}

.mobile-nav-btn .nav-app-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.mobile-nav-btn .nav-app-btn-icon svg {
  width: 17px;
  height: 17px;
}

.mobile-nav-btn .nav-app-btn-copy {
  text-align: center;
}

.mobile-nav-btn .nav-app-btn-title {
  font-size: 0.68rem;
}

.tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 44, 82, 0.18), transparent 42%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  color: var(--txt-main);
  padding: 0.96rem 0.72rem 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 0.46rem;
  min-height: 118px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tab-btn.tab-active {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 44, 82, 0.28), transparent 42%),
    linear-gradient(130deg, rgba(233, 17, 58, 0.26), rgba(46, 198, 214, 0.2));
  border-color: rgba(255, 99, 133, 0.62);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.26);
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.26);
}

.tab-btn.tab-active .nav-app-btn-icon,
.mobile-nav-btn-active .nav-app-btn-icon {
  background: linear-gradient(145deg, rgba(255, 76, 111, 0.48), rgba(110, 190, 255, 0.32));
  border-color: rgba(255, 255, 255, 0.24);
}

.tab-btn .nav-app-btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 22px rgba(0, 0, 0, 0.26);
}

.tab-btn .nav-app-btn-icon svg {
  width: 24px;
  height: 24px;
}

.tab-btn .nav-app-btn-copy {
  justify-items: center;
  text-align: center;
  align-content: start;
  min-height: 1.1rem;
}

.tab-btn .nav-app-btn-title {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.tab-panel {
  padding: 1rem;
}

.tab-panel-active {
  display: block;
}

.account-menu-wrap {
  position: relative;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: 190px;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 16, 30, 0.94);
  z-index: 12;
}

.mobile-logout-btn {
  display: none;
}

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

.account-side-panel {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  position: sticky;
  top: 0.75rem;
}

.account-list-group {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.55rem;
}

.account-list-group-head {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
}

.account-list-group-head::-webkit-details-marker {
  display: none;
}

.account-list-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 22px;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
  color: #dbe8ff;
}

.side-panel,
.form-panel,
.stats-panel {
  padding: 1.1rem;
}

.side-panel h3 {
  margin-top: 0.35rem;
}

.stack {
  display: grid;
  gap: 0.55rem;
}

input,
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--txt-main);
  border-radius: 0.7rem;
  padding: 0.6rem;
}

select {
  color-scheme: dark;
}

select option,
select optgroup {
  background: #0f1422;
  color: #edf3ff;
}

input[type="range"] {
  accent-color: var(--accent);
  padding: 0;
}

.selectable-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 0.45rem;
}

.selectable-list-capped {
  max-height: 280px;
}

.selectable-list li {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.65rem;
  padding: 0.55rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease;
}

.selectable-list li:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
}

.selectable-list li.active {
  border-color: rgba(85, 167, 255, 0.7);
  background: rgba(85, 167, 255, 0.18);
}

.list-item-head {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 0.55rem;
}

.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.list-avatar-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.05);
}

.list-meta {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: #c7d6f7;
}

.list-empty {
  text-align: center;
  color: #d2def9;
  font-style: italic;
}

.questions-editor {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
}

.questions-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.helper-text {
  margin: 0;
  font-size: 0.82rem;
}

.questions-editor-list {
  display: grid;
  gap: 0.5rem;
}

.questions-editor-modal-card {
  width: min(760px, 96vw);
}

.account-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.65rem;
}

.account-tool-card {
  min-height: 132px;
  align-content: start;
}

.account-main-panel {
  display: grid;
  gap: 0.8rem;
}

.account-hero-strip {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.92rem;
  background: linear-gradient(120deg, rgba(89, 171, 255, 0.2), rgba(255, 90, 116, 0.14));
}

.account-hero-strip h4 {
  margin: 0;
}

.account-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.account-hero-top .btn {
  white-space: nowrap;
}

.account-hero-strip .helper-text {
  color: #e4edff;
}

.account-quick-actions {
  display: grid;
  gap: 0.55rem;
}

#openAdminUsersBtn {
  width: 100%;
}

.admin-users-modal-card {
  width: min(1080px, 96vw);
  display: grid;
  gap: 0.7rem;
}

.admin-users-modal-head {
  align-items: flex-start;
}

.admin-users-table-wrap {
  max-height: min(68vh, 620px);
  overflow: auto;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
  text-align: left;
  padding: 0.58rem 0.62rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: middle;
  height: 56px;
}

.admin-users-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d3e0fb;
  background: rgba(8, 13, 22, 0.94);
}

.admin-users-limit-input {
  max-width: 110px;
  height: 38px;
  min-height: 38px;
  line-height: 1;
  padding: 0 0.68rem;
}

.admin-users-actions-cell {
  white-space: nowrap;
}

.admin-users-actions {
  display: flex;
  gap: 0.42rem;
  flex-wrap: nowrap;
  align-items: center;
}

.admin-users-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  line-height: 1;
  padding: 0 0.9rem;
  margin: 0;
}

.first-login-alerts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
  max-height: 240px;
  overflow-y: auto;
}

.account-danger-zone {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 60, 60, 0.35);
  border-radius: 0.82rem;
  background: rgba(255, 40, 40, 0.06);
}

.account-danger-zone-head h5 {
  margin: 0 0 0.15rem;
  color: #ffb1b4;
}

.account-danger-zone-head .helper-text {
  color: #e4a5a8;
}

.account-danger-zone {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  border: 1px solid rgba(255, 60, 60, 0.35);
  border-radius: 0.82rem;
  background: rgba(255, 40, 40, 0.06);
}

.account-danger-zone-head h5 {
  margin: 0 0 0.15rem;
  color: #ffb1b4;
}

.account-danger-zone-head .helper-text {
  color: #e4a5a8;
}

.first-login-alerts-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.first-login-alerts-info {
  display: grid;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.first-login-alerts-item strong {
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.first-login-alerts-item span {
  font-size: 0.75rem;
  color: #c8d5f6;
}

.first-login-delete-btn {
  flex-shrink: 0;
  padding: 0.22rem 0.52rem;
  font-size: 0.7rem;
  line-height: 1.4;
  border-radius: 0.35rem;
  background: rgba(255, 60, 60, 0.15);
  border: 1px solid rgba(255, 60, 60, 0.38);
  color: #ffa5a8;
  cursor: pointer;
  transition: background 0.15s;
}

.first-login-delete-btn:hover {
  background: rgba(255, 60, 60, 0.3);
}

@media (max-width: 760px) {
  .admin-users-table th,
  .admin-users-table td {
    padding: 0.48rem 0.42rem;
    font-size: 0.8rem;
  }

  .admin-users-actions {
    min-width: 150px;
  }
}

.account-collapsible {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.58rem;
}

.account-collapsible-title {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d3e0fb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-collapsible-title::-webkit-details-marker {
  display: none;
}

.account-collapsible-title::after {
  content: "+";
  font-size: 0.95rem;
  color: rgba(234, 241, 255, 0.9);
}

.account-collapsible[open] .account-collapsible-title::after {
  content: "-";
}

.account-collapsible-content {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.question-editor-item {
  display: grid;
  grid-template-columns: 1fr 90px auto;
  gap: 0.5rem;
  align-items: center;
}

.question-default {
  text-align: center;
}

.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.stats-current-selection {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
}

.stats-current-selection span {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  color: #dce8ff;
}

.stats-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.stats-filters::-webkit-scrollbar {
  height: 0;
}

.stats-filters label {
  flex: 0 0 180px;
}

.stats-hero {
  margin-bottom: 0;
}

.stats-dashboard {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  height: clamp(560px, calc(100dvh - 220px), 760px);
  overflow: hidden;
}

.stats-dashboard-sidebar {
  position: sticky;
  top: 0.75rem;
  height: 100%;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.stats-dashboard-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0.8rem;
  height: 100%;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.stats-dashboard-sidebar,
.stats-dashboard-main {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.04);
}

.stats-dashboard-sidebar::-webkit-scrollbar,
.stats-dashboard-main::-webkit-scrollbar {
  width: 10px;
}

.stats-dashboard-sidebar::-webkit-scrollbar-track,
.stats-dashboard-main::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.stats-dashboard-sidebar::-webkit-scrollbar-thumb,
.stats-dashboard-main::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 94, 120, 0.52), rgba(90, 174, 255, 0.42));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#statsMetricChartsGrid {
  display: none;
}

.stats-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
  height: 100%;
}

.stats-hero-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
  align-content: start;
}

.stats-hero-team,
.stats-hero-athlete {
  min-width: 0;
}

.stats-hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 30, 68, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 30px rgba(0, 0, 0, 0.28);
  padding: 0.95rem;
}

.stats-hero-card-compact {
  padding: 0.5rem;
  gap: 0.5rem;
  min-height: 82px;
}

.stats-hero-card-compact .stats-hero-title {
  font-size: 0.92rem;
}

.stats-hero-card-compact .stats-hero-subtitle {
  font-size: 0.68rem;
}

.stats-hero-card-compact .stats-hero-media {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.stats-hero-card-compact .stats-hero-athlete-media {
  width: 58px;
  height: 58px;
  border-radius: 16px;
}

.stats-hero-card-compact .stats-hero-eyebrow {
  font-size: 0.58rem;
}

.stats-hero-snapshot {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  align-items: stretch;
  position: sticky;
  top: 0.25rem;
  z-index: 3;
  padding: 0.48rem;
}

.stats-radar-card {
  display: grid;
  gap: 0.45rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 30, 68, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 30px rgba(0, 0, 0, 0.28);
  padding: 0.52rem;
  min-height: 0;
}

.stats-radar-head {
  display: grid;
  gap: 0.08rem;
}

#statsSpiderChart {
  width: 100% !important;
  height: clamp(270px, 38vh, 340px) !important;
}

.stats-hero-media {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.stats-hero-athlete-media {
  width: 88px;
  height: 88px;
  border-radius: 28px;
}

.stats-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-hero-image-empty {
  border-style: dashed;
  background-color: rgba(255, 255, 255, 0.04);
  background-image: var(--avatar-placeholder);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72% 72%;
}

.stats-hero-copy {
  display: grid;
  gap: 0.28rem;
}

.stats-hero-snapshot .stats-hero-copy {
  gap: 0.14rem;
}

.stats-hero-snapshot .stats-hero-eyebrow {
  font-size: 0.54rem;
}

.stats-hero-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.42rem;
  align-items: center;
}

.stats-hero-snapshot-main {
  display: grid;
  gap: 0.14rem;
}

.stats-hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(188, 210, 255, 0.7);
}

.stats-hero-title {
  margin: 0;
  font-size: 1.08rem;
  color: #f5f8ff;
}

.stats-hero-subtitle,
.stats-hero-note {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(220, 231, 255, 0.74);
}

.stats-hero-readiness-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.stats-hero-readiness-value {
  font-size: clamp(1.22rem, 2.05vw, 1.62rem);
  line-height: 0.95;
  color: #ffffff;
}

.stats-hero-readiness-max {
  font-size: 0.64rem;
  color: rgba(202, 216, 255, 0.72);
}

.stats-hero-chip-row,
.stats-metric-chart-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stats-hero-chip,
.stats-chart-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(154, 187, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.61rem;
  color: #e9f0ff;
}

.stats-hero-snapshot .stats-hero-chip-row {
  gap: 0.24rem;
}

.stats-hero-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.stats-hero-meta-item {
  margin: 0;
  font-size: 0.61rem;
  line-height: 1.1;
  color: rgba(220, 231, 255, 0.72);
}

.stats-snapshot-chip-positive {
  color: #a9ffd4;
  border-color: rgba(74, 255, 159, 0.22);
  background: rgba(74, 255, 159, 0.14);
}

.stats-snapshot-chip-warning {
  color: #ffe6a1;
  border-color: rgba(255, 214, 87, 0.22);
  background: rgba(255, 214, 87, 0.14);
}

.stats-snapshot-chip-risk {
  color: #ffafbc;
  border-color: rgba(255, 90, 122, 0.24);
  background: rgba(255, 90, 122, 0.14);
}

.stats-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.stats-chart-panel {
  position: relative;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 30, 68, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 30px rgba(0, 0, 0, 0.28);
  padding: 0.55rem;
}

.stats-filters label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--txt-soft);
}

.bodymap-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.82rem;
  align-items: start;
  --bodymap-stack-height: 248px;
}

.bodymap-filters {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.75rem;
}

.bodymap-model-card {
  margin: 0 0 0.82rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 56, 90, 0.1), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.bodymap-model-card summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: #eff5ff;
  padding: 0.58rem 0.72rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bodymap-model-card summary::-webkit-details-marker {
  display: none;
}

.bodymap-model-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.62rem 0.72rem 0;
}

.bodymap-model-presets span {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(224, 236, 255, 0.86);
  margin-right: 0.1rem;
}

.bodymap-model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.66rem 0.72rem;
}

.bodymap-model-grid label {
  display: grid;
  gap: 0.26rem;
  font-size: 0.74rem;
  color: rgba(218, 231, 255, 0.84);
}

.bodymap-model-actions {
  padding: 0 0.72rem 0.66rem;
  display: flex;
  justify-content: flex-end;
}

.bodymap-selection-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  margin-bottom: 0.9rem;
}

.bodymap-selection-card {
  margin: 0;
  min-height: 102px;
}

.bodymap-panel {
  display: grid;
  gap: 0.64rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 30, 68, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 26px rgba(0, 0, 0, 0.24);
  padding: 0.82rem;
  align-content: start;
  min-height: 260px;
}

.bodymap-panel-kpis {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 0;
  padding: 0.62rem;
}

.bodymap-panel-heatmap {
  grid-column: 1 / span 7;
  grid-row: 2 / span 2;
  min-height: calc((var(--bodymap-stack-height) * 2) + 0.82rem);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.bodymap-panel-alerts {
  grid-column: 8 / -1;
  grid-row: 2;
  min-height: var(--bodymap-stack-height);
  grid-template-rows: auto minmax(0, 1fr);
}

.bodymap-panel-ranking {
  grid-column: 8 / -1;
  grid-row: 3;
  min-height: var(--bodymap-stack-height);
  grid-template-rows: auto minmax(0, 1fr);
}

.bodymap-panel-total {
  grid-column: span 6;
  grid-row: 4;
  min-height: 314px;
}

.bodymap-panel-zone {
  grid-column: span 6;
  grid-row: 4;
  min-height: 314px;
}

.bodymap-panel-risk {
  grid-column: span 7;
  grid-row: 5;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  align-content: stretch;
}

.bodymap-panel-correlation {
  grid-column: span 5;
  grid-row: 5;
  align-self: stretch;
}

.bodymap-anatomy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 0.58rem;
  min-height: 0;
  align-items: start;
}

.bodymap-anatomy-card {
  margin: 0;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
}

.bodymap-anatomy-card figcaption {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(222, 235, 255, 0.78);
}

.bodymap-anatomy-canvas {
  position: relative;
  width: min(176px, 100%);
  border-radius: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 58, 90, 0.12), transparent 42%),
    linear-gradient(155deg, rgba(7, 13, 24, 0.7), rgba(7, 13, 24, 0.46));
  overflow: hidden;
}

.bodymap-anatomy-reference-image,
.bodymap-anatomy-overlay {
  display: block;
  width: 100%;
  height: auto;
}

.bodymap-anatomy-reference-image {
  opacity: 0.8;
}

.bodymap-anatomy-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: 0.95;
}

.bodymap-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.bodymap-panel-head-stack {
  display: grid;
  gap: 0.38rem;
}

.bodymap-panel-head h4 {
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: #f7fbff;
}

.bodymap-panel-head h5 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: rgba(236, 246, 255, 0.95);
}

.bodymap-panel-head select {
  min-width: 150px;
  max-width: 220px;
}

.bodymap-panel-head-inline {
  margin-bottom: 0.14rem;
}

.bodymap-panel-head-inline select {
  min-width: 164px;
}

.bodymap-correlation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.bodymap-correlation-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 0.46rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(240, 246, 255, 0.94);
}

.bodymap-correlation-chip-strong {
  border-color: rgba(255, 194, 201, 0.44);
  background: rgba(255, 92, 118, 0.18);
}

.bodymap-correlation-chip-moderate {
  border-color: rgba(255, 224, 164, 0.44);
  background: rgba(255, 198, 86, 0.18);
}

.bodymap-correlation-chip-weak {
  border-color: rgba(169, 238, 255, 0.4);
  background: rgba(84, 220, 255, 0.16);
}

.bodymap-correlation-insight-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.bodymap-correlation-outlier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bodymap-correlation-outlier-badge-high {
  color: rgba(255, 236, 239, 0.96);
  background: rgba(255, 94, 117, 0.3);
  border-color: rgba(255, 170, 184, 0.58);
}

.bodymap-correlation-outlier-badge-medium {
  color: rgba(255, 243, 221, 0.96);
  background: rgba(255, 194, 88, 0.3);
  border-color: rgba(255, 220, 155, 0.58);
}

.bodymap-correlation-outlier-badge-low {
  color: rgba(223, 244, 255, 0.94);
  background: rgba(97, 204, 243, 0.22);
  border-color: rgba(167, 230, 255, 0.52);
}

.bodymap-correlation-insight {
  margin: 0;
  min-width: 0;
  font-size: 0.66rem;
  line-height: 1.25;
  color: rgba(226, 236, 255, 0.86);
}

.bodymap-card-viewport {
  position: relative;
  min-height: 0;
  height: calc((var(--bodymap-stack-height) * 2) - 64px);
  overflow: hidden;
  border-radius: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 22, 0.26);
}

.bodymap-card-carousel {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.bodymap-card-carousel::-webkit-scrollbar {
  display: none;
}

.bodymap-card-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  overflow-y: hidden;
  padding: 0.56rem;
}

.bodymap-card-slide-heatmap {
  display: grid;
  align-content: start;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bodymap-card-slide-heatmap::-webkit-scrollbar {
  display: none;
}

.bodymap-card-slide-explain {
  display: grid;
  align-content: start;
  gap: 0.28rem;
}

.bodymap-card-slide-anatomy {
  display: grid;
  align-content: start;
  gap: 0.44rem;
}

.bodymap-card-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.32rem;
  padding: 0.18rem 0.1rem 0.05rem;
}

.bodymap-card-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(218, 232, 255, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.bodymap-card-dot-active {
  background: rgba(255, 122, 145, 0.95);
  transform: scale(1.18);
}

.bodymap-risk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.bodymap-risk-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 20px;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(240, 246, 255, 0.92);
  background: rgba(255, 255, 255, 0.05);
}

.bodymap-risk-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(8, 12, 20, 0.4);
}

.bodymap-risk-legend-chip-severity {
  color: #ff9dac;
}

.bodymap-risk-legend-chip-frequency {
  color: #7ce7ff;
}

.bodymap-risk-legend-chip-recency {
  color: #ffd87b;
}

.bodymap-risk-scroll {
  min-height: 0;
  height: 100%;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.24rem;
}

.bodymap-risk-scroll::-webkit-scrollbar {
  width: 8px;
}

.bodymap-risk-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.bodymap-risk-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 108, 132, 0.55), rgba(255, 206, 97, 0.55));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.bodymap-kpi-item {
  display: grid;
  gap: 0.18rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.56rem 0.58rem;
}

.bodymap-kpi-item span {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: rgba(214, 229, 255, 0.78);
}

.bodymap-kpi-item strong {
  font-size: 1.12rem;
  line-height: 1.15;
  color: #ffffff;
}

.bodymap-kpi-item-severity-low,
.bodymap-kpi-item-risk-low {
  border-color: rgba(108, 239, 161, 0.35);
  background: linear-gradient(145deg, rgba(76, 214, 132, 0.12), rgba(255, 255, 255, 0.03));
}

.bodymap-kpi-item-severity-medium,
.bodymap-kpi-item-risk-medium {
  border-color: rgba(255, 218, 139, 0.36);
  background: linear-gradient(145deg, rgba(255, 198, 90, 0.14), rgba(255, 255, 255, 0.03));
}

.bodymap-kpi-item-severity-high,
.bodymap-kpi-item-risk-high {
  border-color: rgba(255, 151, 167, 0.4);
  background: linear-gradient(145deg, rgba(255, 94, 118, 0.16), rgba(255, 255, 255, 0.03));
}

.bodymap-kpi-item-risk-distribution {
  border-color: rgba(139, 92, 246, 0.32) !important;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.09), rgba(162, 155, 254, 0.05)) !important;
}

.bodymap-kpi-risk-bars {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.28rem 0;
}

.bodymap-kpi-risk-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  flex: 1;
  padding: 0.32rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.bodymap-kpi-risk-bar:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.bodymap-kpi-risk-bar-label {
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

.bodymap-kpi-risk-bar-high {
  color: #fca5a5;
}

.bodymap-kpi-risk-bar-medium {
  color: #fcd34d;
}

.bodymap-kpi-risk-bar-low {
  color: #86efac;
}

.bodymap-kpi-risk-bar-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #a9b5ff, #ffc4d6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bodymap-kpi-risk-summary {
  font-size: 0.66rem;
  color: rgba(206, 211, 255, 0.75) !important;
  margin-top: 0.2rem;
}

.bodymap-tone-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 0.35rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  vertical-align: middle;
}

.bodymap-tone-chip-severity-low,
.bodymap-tone-chip-risk-low {
  color: #bdffd8;
  background: rgba(76, 214, 132, 0.18);
  border-color: rgba(108, 239, 161, 0.45);
}

.bodymap-tone-chip-severity-medium,
.bodymap-tone-chip-risk-medium {
  color: #fff0c6;
  background: rgba(255, 198, 90, 0.2);
  border-color: rgba(255, 218, 139, 0.5);
}

.bodymap-tone-chip-severity-high,
.bodymap-tone-chip-risk-high {
  color: #ffd6dd;
  background: rgba(255, 94, 118, 0.2);
  border-color: rgba(255, 151, 167, 0.5);
}

.bodymap-tone-chip-quality-high {
  color: #bfffe2;
  background: rgba(42, 201, 130, 0.2);
  border-color: rgba(104, 242, 184, 0.54);
}

.bodymap-tone-chip-quality-medium {
  color: #fff3cb;
  background: rgba(255, 189, 74, 0.22);
  border-color: rgba(255, 222, 145, 0.52);
}

.bodymap-tone-chip-quality-low {
  color: #ffdbe3;
  background: rgba(255, 92, 130, 0.22);
  border-color: rgba(255, 160, 188, 0.54);
}

.bodymap-explain-content {
  display: grid;
  gap: 0.22rem;
}

.bodymap-explain-top {
  display: grid;
  gap: 0.16rem;
}

.bodymap-explain-chip-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.bodymap-explain-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.bodymap-explain-chip:not(.bodymap-tone-chip) {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(236, 244, 255, 0.92);
}

.bodymap-explain-chip-bootstrap {
  border: 1.2px solid rgba(162, 155, 254, 0.45) !important;
  background: linear-gradient(135deg, rgba(162, 155, 254, 0.08), rgba(168, 85, 247, 0.06)) !important;
  color: rgba(196, 181, 253, 0.96) !important;
}

.bodymap-explain-chip.bodymap-tone-chip {
  margin-left: 0;
  min-height: 22px;
  padding: 0.12rem 0.45rem;
}

.bodymap-explain-sub {
  margin: 0;
  font-size: 0.66rem;
  color: rgba(214, 229, 255, 0.78);
  line-height: 1.35;
}

.bodymap-explain-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.24rem;
}

.bodymap-explain-metric {
  display: grid;
  gap: 0.08rem;
  border-radius: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.24rem 0.28rem;
}

.bodymap-explain-metric-band-good {
  border-color: rgba(104, 242, 184, 0.46);
  background: linear-gradient(145deg, rgba(42, 201, 130, 0.16), rgba(255, 255, 255, 0.03));
}

.bodymap-explain-metric-band-medium {
  border-color: rgba(255, 222, 145, 0.46);
  background: linear-gradient(145deg, rgba(255, 189, 74, 0.16), rgba(255, 255, 255, 0.03));
}

.bodymap-explain-metric-band-bad {
  border-color: rgba(255, 160, 188, 0.46);
  background: linear-gradient(145deg, rgba(255, 92, 130, 0.16), rgba(255, 255, 255, 0.03));
}

.bodymap-explain-metric span {
  font-size: 0.58rem;
  color: rgba(218, 232, 255, 0.82);
}

.bodymap-explain-metric strong {
  font-size: 0.72rem;
  color: #ffffff;
}

.bodymap-explain-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bodymap-explain-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #58beff, #8dffcf);
}

.bodymap-explain-bar-band-good i {
  background: linear-gradient(90deg, #2ac982, #8df0c3);
}

.bodymap-explain-bar-band-medium i {
  background: linear-gradient(90deg, #ffbd4a, #ffe091);
}

.bodymap-explain-bar-band-bad i {
  background: linear-gradient(90deg, #ff5c82, #ff9db7);
}

/* Semáforo de acciones */
.bodymap-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1.5px solid;
  min-height: 26px;
  backdrop-filter: blur(2px);
}

.bodymap-action-chip-icon {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1;
}

.bodymap-action-chip-label {
  white-space: nowrap;
}

.bodymap-action-chip-monitor {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.bodymap-action-chip-intervene {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.bodymap-action-chip-intervene_urgent {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  color: #fed7aa;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.3);
  animation: bodymap-pulse-warning 2s infinite;
}

@keyframes bodymap-pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.bodymap-action-chip-refer {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  animation: bodymap-pulse-danger 1.5s infinite;
}

@keyframes bodymap-pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Panel de texto clínico */
.bodymap-clinical-panel {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.07));
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 0.6rem;
  padding: 0.38rem 0.48rem;
  margin: 0;
  backdrop-filter: blur(1px);
}

.bodymap-clinical-text {
  font-size: 0.62rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.95);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
}

/* ── Protocolo de intervención ──────────────────────────────────── */
.bodymap-protocol-panel {
  border-radius: 0.6rem;
  padding: 0.38rem 0.48rem;
  margin: 0;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 27, 75, 0.5));
}
.bodymap-protocol-panel.bodymap-protocol-action-monitor {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(6, 78, 59, 0.25));
}
.bodymap-protocol-panel.bodymap-protocol-action-intervene {
  border-color: rgba(234, 179, 8, 0.35);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(78, 62, 6, 0.25));
}
.bodymap-protocol-panel.bodymap-protocol-action-intervene_urgent {
  border-color: rgba(249, 115, 22, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(78, 30, 6, 0.3));
}
.bodymap-protocol-panel.bodymap-protocol-action-refer {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(78, 6, 6, 0.3));
}

.bodymap-protocol-header {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.9);
  margin-bottom: 0.28rem;
}

.bodymap-protocol-context-note {
  font-size: 0.68rem;
  color: rgba(253, 224, 71, 0.9);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 0.4rem;
  padding: 0.24rem 0.4rem;
  margin-bottom: 0.28rem;
  line-height: 1.35;
}

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

.bodymap-protocol-step {
  display: flex;
  align-items: flex-start;
  gap: 0.32rem;
  padding: 0.24rem 0.32rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.45rem;
}

.bodymap-protocol-step-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 0.02rem;
  line-height: 1;
}

.bodymap-protocol-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bodymap-protocol-step-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(165, 180, 252, 0.9);
}

.bodymap-protocol-step-text {
  font-size: 0.7rem;
  color: rgba(203, 213, 225, 0.92);
  line-height: 1.4;
  word-break: break-word;
}

.bodymap-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
  width: 100%;
  min-width: 0;
}

.bodymap-heatmap-column {
  display: grid;
  gap: 0.38rem;
  width: 100%;
  min-width: 0;
}

.bodymap-heatmap-column h5 {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(217, 231, 255, 0.9);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bodymap-heatmap-row {
  display: grid;
  gap: 0.28rem;
  padding: 0.28rem 0.34rem;
  border-radius: 0.66rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bodymap-heatmap-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.7rem;
}

.bodymap-heatmap-meta span {
  color: rgba(223, 235, 255, 0.78);
}

.bodymap-heatmap-spark {
  height: 28px;
  border-radius: 0.52rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  --heatmap-spark-color: #8cf5c3;
}

.bodymap-heatmap-spark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bodymap-heatmap-spark-line {
  fill: none;
  stroke: var(--heatmap-spark-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bodymap-heatmap-spark-dot {
  fill: #f7fbff;
  stroke: var(--heatmap-spark-color);
  stroke-width: 1.2;
}

.bodymap-heatmap-spark-low {
  --heatmap-spark-color: #67e7ae;
}

.bodymap-heatmap-spark-medium {
  --heatmap-spark-color: #ffd27d;
}

.bodymap-heatmap-spark-high {
  --heatmap-spark-color: #ff8ea7;
}

.bodymap-heatmap-spark-empty {
  opacity: 0.3;
}

.bodymap-heatbar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bodymap-heatbar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2fd27a, #ffc83d 58%, #ff5a5f);
}

.bodymap-list,
.bodymap-alerts {
  display: grid;
  gap: 0.52rem;
}

.bodymap-alerts {
  grid-template-columns: 1fr;
  max-height: calc(var(--bodymap-stack-height) - 56px);
  overflow-y: auto;
  padding-right: 0.24rem;
  align-content: start;
}

.bodymap-alert-group {
  display: grid;
  gap: 0.42rem;
}

.bodymap-alert-adaptive {
  display: grid;
  gap: 0.16rem;
  padding: 0.3rem 0.36rem;
  border-radius: 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.bodymap-alert-adaptive span {
  font-size: 0.68rem;
  color: rgba(218, 231, 255, 0.84);
}

.bodymap-alert-group h5 {
  margin: 0;
  padding: 0.08rem 0.12rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(228, 237, 255, 0.82);
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(11, 18, 34, 0.96), rgba(11, 18, 34, 0.78));
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bodymap-alert-group-list {
  display: grid;
  gap: 0.52rem;
}

.bodymap-alerts::-webkit-scrollbar {
  width: 8px;
}

.bodymap-alerts::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.bodymap-alerts::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 108, 132, 0.55), rgba(255, 206, 97, 0.55));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.bodymap-list-item,
.bodymap-alert-item {
  display: grid;
  gap: 0.24rem;
  border-radius: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.56rem;
}

.bodymap-list-item strong,
.bodymap-alert-item strong {
  font-size: 0.82rem;
}

.bodymap-list-item span,
.bodymap-alert-item span {
  font-size: 0.72rem;
  color: rgba(220, 233, 255, 0.82);
}

.bodymap-alert-item strong .bodymap-tone-chip {
  margin-left: 0.38rem;
}

.bodymap-alert-item {
  border-color: rgba(255, 137, 95, 0.45);
  background: linear-gradient(140deg, rgba(255, 119, 92, 0.16), rgba(255, 195, 108, 0.08));
}

.bodymap-alert-item-low {
  border-color: rgba(87, 219, 145, 0.42);
  background: linear-gradient(140deg, rgba(66, 202, 126, 0.16), rgba(103, 220, 166, 0.08));
}

.bodymap-alert-item-medium {
  border-color: rgba(255, 201, 102, 0.45);
  background: linear-gradient(140deg, rgba(255, 188, 76, 0.16), rgba(255, 216, 128, 0.08));
}

.bodymap-alert-item-high {
  border-color: rgba(255, 123, 143, 0.5);
  background: linear-gradient(140deg, rgba(255, 96, 122, 0.2), rgba(255, 147, 108, 0.1));
}

.bodymap-empty {
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 0.82rem;
  padding: 0.9rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(219, 232, 255, 0.75);
}

.bodymap-panel canvas {
  margin-top: 0.1rem;
  border-radius: 0.72rem;
}

#bodyMapRankingChart,
#bodyMapTotalTrendChart,
#bodyMapZoneTrendChart,
#bodyMapCorrelationChart {
  width: 100% !important;
  height: 224px !important;
}

#bodyMapRiskChart {
  width: 100% !important;
  height: auto !important;
  min-height: 224px;
}

#bodyMapRankingChart {
  height: calc(var(--bodymap-stack-height) - 56px) !important;
}

#bodyMapCorrelationChart {
  height: 244px !important;
}

#bodyMapTotalTrendChart,
#bodyMapZoneTrendChart {
  height: 236px !important;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0;
  height: 100%;
  min-height: 0;
  align-content: stretch;
}

.stats-summary-card {
  display: grid;
  gap: 0.48rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 30, 68, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 0.72rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.stats-summary-card-scroll {
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
}

.stats-card-viewport {
  position: relative;
  overflow: hidden;
  height: auto;
  min-height: 0;
}

.stats-card-carousel {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stats-card-carousel::-webkit-scrollbar {
  display: none;
}

.stats-card-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  padding: 0.72rem;
  display: grid;
  gap: 0.48rem;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
}

.stats-card-slide::-webkit-scrollbar {
  width: 6px;
}

.stats-card-slide::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.stats-card-slide::-webkit-scrollbar-thumb {
  background: rgba(255, 134, 154, 0.38);
  border-radius: 999px;
}

.stats-card-slide-summary {
  position: relative;
  overflow-y: hidden;
}

.stats-card-slide-chart {
  padding: 0.62rem;
  align-content: stretch;
}

.stats-card-slide-chart .stats-metric-chart-card-embed {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stats-card-slide-chart .stats-metric-chart-card-embed canvas {
  flex: 1;
  min-height: 0;
  height: auto !important;
  width: 100% !important;
}

.stats-card-slide-intervention {
  padding: 0.62rem;
}

.stats-intervention-panel {
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
  min-height: 0;
}

.stats-intervention-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stats-intervention-head strong {
  font-size: 0.82rem;
  color: rgba(246, 249, 255, 0.96);
}

.stats-intervention-focus {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.34;
  color: rgba(218, 230, 252, 0.84);
}

.stats-intervention-list {
  display: grid;
  gap: 0.42rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.16rem;
}

@media (max-width: 860px) {
  .stats-card-viewport {
    height: 332px;
  }
}

@media (max-width: 720px) {
  .stats-card-viewport {
    height: 324px;
  }
}

.stats-intervention-list::-webkit-scrollbar {
  width: 6px;
}

.stats-intervention-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.stats-intervention-list::-webkit-scrollbar-thumb {
  background: rgba(255, 134, 154, 0.52);
  border-radius: 999px;
}

.stats-intervention-item {
  padding: 0.48rem 0.54rem;
}

.stats-intervention-item strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.stats-intervention-why-btn {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(246, 251, 255, 0.4);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0;
  line-height: 1;
  opacity: 0.3;
  cursor: pointer;
}

.stats-intervention-why-btn:hover {
  opacity: 0.62;
  border-color: rgba(255, 170, 184, 0.34);
  background: rgba(255, 120, 145, 0.08);
  color: rgba(255, 225, 232, 0.8);
}

.stats-intervention-why-btn:focus-visible {
  opacity: 0.8;
  outline: 1px solid rgba(255, 170, 184, 0.5);
  outline-offset: 1px;
}

.stats-priority-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 8, 20, 0.62);
  backdrop-filter: blur(8px);
}

.stats-priority-popup {
  width: min(520px, 94vw);
  max-height: 84dvh;
  overflow: auto;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(155deg, rgba(11, 20, 40, 0.95), rgba(26, 10, 24, 0.9));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  padding: 0.9rem;
  display: grid;
  gap: 0.55rem;
}

.stats-priority-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stats-priority-popup-head h4 {
  margin: 0;
  font-size: 0.92rem;
}

.stats-priority-popup-close {
  min-height: 30px;
}

.stats-priority-popup-metric,
.stats-priority-popup-summary {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(228, 236, 255, 0.9);
}

.stats-priority-popup-list {
  display: grid;
  gap: 0.34rem;
}

.stats-priority-popup-list p {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(214, 225, 248, 0.88);
  border-radius: 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.44rem 0.5rem;
}

.stats-intervention-item span {
  line-height: 1.28;
}

.stats-card-nav-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  border: 0;
  background: transparent;
  cursor: default;
  z-index: 2;
  pointer-events: none;
}

.stats-card-nav-hit-prev {
  left: 0;
}

.stats-card-nav-hit-next {
  right: 0;
}

.stats-card-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.45rem 0.3rem;
}

.stats-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(216, 228, 255, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.stats-card-dot-active {
  background: rgba(255, 122, 145, 0.95);
  transform: scale(1.18);
}

@media (max-width: 860px) {
  .stats-card-nav-hit {
    pointer-events: auto;
    cursor: pointer;
  }
}

.stats-summary-head h4 {
  margin: 0;
  font-size: 0.94rem;
}

.stats-summary-head {
  display: grid;
  gap: 0.18rem;
}

.stats-summary-kicker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.stats-summary-kicker-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.66rem;
  color: #edf2fb;
}

.stats-summary-kicker-chip.stats-chip-positive {
  color: #afffd7;
  border-color: rgba(74, 255, 159, 0.22);
  background: rgba(74, 255, 159, 0.14);
}

.stats-summary-kicker-chip.stats-chip-warning {
  color: #ffe8af;
  border-color: rgba(255, 214, 87, 0.24);
  background: rgba(255, 214, 87, 0.14);
}

.stats-summary-kicker-chip.stats-chip-risk {
  color: #ffb4c3;
  border-color: rgba(255, 90, 122, 0.24);
  background: rgba(255, 90, 122, 0.14);
}

.stats-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-status-elite,
.stats-status-optimo {
  color: #9affc8;
  background: rgba(74, 255, 159, 0.14);
}

.stats-status-atencion {
  color: #ffe99a;
  background: rgba(255, 214, 87, 0.14);
}

.stats-status-riesgo {
  color: #ff97aa;
  background: rgba(255, 90, 122, 0.16);
}

.stats-summary-readiness {
  font-size: 0.74rem;
  color: #ececec;
  opacity: 0.94;
}

.stats-summary-subtitle {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(216, 216, 216, 0.82);
}

.stats-summary-value-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.stats-summary-value-group {
  display: grid;
  gap: 0.14rem;
}

.stats-summary-current-value {
  font-size: 1.45rem;
  line-height: 0.95;
  color: #ffffff;
}

.stats-summary-current-label {
  font-size: 0.66rem;
  color: rgba(216, 216, 216, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.stats-summary-select {
  min-height: 38px;
  border-radius: 0.65rem;
}

.stats-summary-progress-wrap {
  display: block;
}

.stats-summary-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.stats-summary-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, #54a8ff, #73f4ff);
}

.stats-mini-chart {
  position: relative;
  height: 42px;
  border-radius: 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 8, 0.28);
  --spark-line: #ff5a7a;
  --spark-area: rgba(255, 40, 74, 0.22);
  --spark-dot-stroke: #ff2a56;
  display: grid;
  place-items: center;
  color: #cfcfcf;
  font-size: 0.75rem;
}

.stats-mini-chart-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  margin-top: -4px;
  padding: 0.2rem 0.38rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 14, 28, 0.95);
  color: #f2f7ff;
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.12s ease;
}

.stats-mini-chart-tooltip-ok {
  border-color: rgba(130, 255, 184, 0.62);
  background: rgba(9, 40, 28, 0.95);
  color: #ceffe0;
}

.stats-mini-chart-tooltip-normal {
  border-color: rgba(255, 215, 140, 0.62);
  background: rgba(44, 33, 12, 0.95);
  color: #ffe7bf;
}

.stats-mini-chart-tooltip-caution {
  border-color: rgba(255, 150, 170, 0.64);
  background: rgba(46, 14, 22, 0.95);
  color: #ffd7de;
}

.stats-mini-chart-tooltip-no-data {
  border-color: rgba(201, 212, 232, 0.52);
  background: rgba(16, 22, 34, 0.95);
  color: #e5edff;
}

.stats-mini-chart-up {
  --spark-line: #69f2a9;
  --spark-area: rgba(105, 242, 169, 0.2);
  --spark-dot-stroke: #2bcf87;
}

.stats-mini-chart-down {
  --spark-line: #ff6b87;
  --spark-area: rgba(255, 107, 135, 0.2);
  --spark-dot-stroke: #ff385f;
}

.stats-mini-chart-neutral {
  --spark-line: #d5d5d5;
  --spark-area: rgba(213, 213, 213, 0.18);
  --spark-dot-stroke: #b8b8b8;
}

.stats-mini-chart-svg {
  width: 100%;
  height: 100%;
}

.stats-mini-chart-area {
  fill: var(--spark-area);
}

.stats-mini-chart-line {
  fill: none;
  stroke: var(--spark-line);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stats-mini-chart-dot {
  fill: #ffffff;
  stroke: var(--spark-dot-stroke);
  stroke-width: 2;
}

.stats-mini-chart-point {
  stroke: rgba(4, 8, 18, 0.78);
  stroke-width: 1.35;
}

.stats-mini-chart-point-ok {
  fill: #39f29a;
}

.stats-mini-chart-point-caution {
  fill: #ff4f72;
}

.stats-mini-chart-point-normal {
  fill: #ffcf55;
}

.stats-mini-chart-point-no-data {
  fill: #b9c3d8;
}

.stats-zscore-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  width: fit-content;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.62rem;
  font-weight: 700;
}

.stats-zscore-chip-ok {
  color: #beffd9;
  background: rgba(73, 224, 140, 0.2);
  border-color: rgba(106, 244, 167, 0.45);
}

.stats-zscore-chip-caution {
  color: #ffd0d8;
  background: rgba(255, 95, 120, 0.2);
  border-color: rgba(255, 144, 163, 0.45);
}

.stats-zscore-chip-normal {
  color: #fff0c4;
  background: rgba(255, 201, 102, 0.2);
  border-color: rgba(255, 218, 139, 0.45);
}

.stats-zscore-chip-no-data {
  color: #dde6f8;
  background: rgba(195, 209, 235, 0.18);
  border-color: rgba(195, 209, 235, 0.42);
}

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

.stats-summary-meta-item {
  display: grid;
  gap: 0.12rem;
  padding: 0.34rem 0.42rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-summary-meta-item.stats-change-positive {
  border-color: rgba(74, 255, 159, 0.22);
  background: rgba(74, 255, 159, 0.1);
}

.stats-summary-meta-item.stats-change-negative {
  border-color: rgba(255, 90, 122, 0.22);
  background: rgba(255, 90, 122, 0.1);
}

.stats-summary-meta-item.stats-change-neutral {
  border-color: rgba(255, 214, 87, 0.2);
  background: rgba(255, 214, 87, 0.08);
}

.stats-summary-meta-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(223, 229, 241, 0.62);
}

.stats-summary-meta-value {
  font-size: 0.76rem;
  color: #f4f6fb;
}

.stats-summary-change {
  font-weight: 700;
}

.stats-change-positive {
  color: #78ffb2;
}

.stats-change-negative {
  color: #ff768e;
}

.stats-change-neutral {
  color: #f2f2f2;
}

.stats-acwr-block {
  display: grid;
  gap: 0.28rem;
  padding: 0.52rem 0.58rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(157, 184, 255, 0.12);
  background: rgba(5, 13, 32, 0.36);
}


.stats-metric-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.stats-metric-chart-card {
  display: grid;
  gap: 0.55rem;
  min-height: 286px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 30, 68, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 30px rgba(0, 0, 0, 0.28);
  padding: 0.7rem;
}

.stats-metric-chart-card-embed {
  min-height: 248px;
  border-radius: 0.82rem;
  padding: 0.62rem;
  margin: 0;
}

.stats-metric-chart-card canvas {
  width: 100% !important;
  height: 205px !important;
}

.stats-metric-chart-card-embed canvas {
  height: 192px !important;
}

.stats-metric-chart-head {
  display: block;
}

.stats-metric-chart-head h4 {
  margin: 0;
  font-size: 0.9rem;
}

.stats-metric-chart-head p {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  color: rgba(214, 226, 255, 0.7);
}

.stats-metric-chart-card-empty {
  min-height: 180px;
  align-content: center;
}

.stats-acwr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.stats-acwr-head strong {
  font-size: 0.8rem;
}

.stats-acwr-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-acwr-optimal {
  color: #a6ffd3;
  background: rgba(68, 255, 152, 0.16);
}

.stats-acwr-risk {
  color: #ff9aac;
  background: rgba(255, 89, 121, 0.18);
}

.stats-acwr-low {
  color: #ffe7a4;
  background: rgba(255, 211, 94, 0.16);
}

.stats-acwr-value,
.stats-acwr-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.25;
}

.stats-acwr-value {
  color: #f2f2f2;
  font-weight: 700;
}

.stats-acwr-note {
  color: #dadada;
}

.kpi {
  display: grid;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  padding: 0.65rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.26);
}

.kpi span {
  font-size: 0.76rem;
  color: var(--txt-soft);
}

.kpi strong {
  font-size: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
}

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

#wellnessChart,
#wellnessPolarChart {
  display: block;
  width: 100% !important;
  height: clamp(250px, 38vh, 360px) !important;
  margin: 0;
}

#wellnessPolarChart {
  height: clamp(280px, 44vh, 420px) !important;
}

.polar-center-value {
  display: none; /* center circle is drawn directly on canvas */
}

.polar-center-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8d8d8;
}

.polar-center-value strong {
  font-size: 1.45rem;
  line-height: 1;
  color: #ffffff;
}

.polar-center-sub {
  font-size: 0.66rem;
  color: #cfcfcf;
}

th,
td {
  text-align: left;
  padding: 0.52rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.86rem;
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  background: rgba(6, 15, 39, 0.96);
  backdrop-filter: blur(8px);
  z-index: 1;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.table-empty {
  text-align: center;
  color: #c8d7ff;
  font-style: italic;
  padding: 1rem 0.7rem;
}

.db-manager {
  margin-top: 0;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  display: grid;
  gap: 0.8rem;
}

.db-helper {
  color: #d7e2ff;
  text-align: center;
}

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

.db-kpis span {
  font-size: 0.82rem;
  color: #e4edff;
  padding: 0.48rem 0.6rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
}

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

.db-actions-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
}

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

.db-preview-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.db-preview-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c4d5fb;
}

.db-preview-body {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 0.5rem;
}

.db-preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.db-preview-avatar-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.05);
}

.db-preview-body span {
  font-size: 0.82rem;
  color: #e8f0ff;
}

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

.db-action-group {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: 0.55rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

.db-action-group-title {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #c8d7fb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.db-action-group-title::-webkit-details-marker {
  display: none;
}

.db-action-group-title::after {
  content: "+";
  font-size: 0.92rem;
  color: #d9e4ff;
  opacity: 0.85;
}

.db-action-group[open] .db-action-group-title::after {
  content: "-";
}

.db-action-content {
  display: grid;
  gap: 0.45rem;
}

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

.db-action-group .btn {
  min-height: 38px;
}

.db-action-group-danger {
  border-color: rgba(255, 90, 108, 0.35);
  background: rgba(255, 90, 108, 0.09);
}

@media (min-width: 721px) {
  .db-action-group-title {
    cursor: default;
    pointer-events: none;
  }

  .db-action-group-title::after {
    content: "";
  }
}

.db-export-format {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--txt-soft);
}

.db-entries-wrap {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 12, 33, 0.35);
}

.db-import-modal-card {
  width: min(840px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
}

.form-popup-card.db-import-modal-card {
  overflow-x: visible;
  overflow-y: auto;
}

.db-import-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.db-import-source-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  min-width: 0;
}

#dbImportFileWrap,
#dbImportSheetUrlWrap {
  min-width: 0;
}

.db-import-modal-card .ui-modal-actions {
  flex-wrap: wrap;
}

.db-import-modal-card .ui-modal-actions .btn {
  min-width: 0;
  max-width: 100%;
}

.db-import-mapper {
  display: grid;
  gap: 0.62rem;
  padding: 0.65rem;
  border-radius: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  min-width: 0;
}

.db-import-team-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.db-import-team-target-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.db-import-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.db-import-map-grid label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.db-import-map-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.db-import-map-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.2s ease;
}

.db-import-map-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.db-import-map-row input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: #00d084;
}

.db-import-map-row span {
  font-size: 0.8rem;
  color: #d9e4ff;
  overflow-wrap: anywhere;
}

.db-import-map-row select {
  min-height: 38px;
  min-width: 0;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.375rem;
  color: #d9e4ff;
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
}

.db-import-map-row select:focus {
  outline: none;
  border-color: rgba(0, 208, 132, 0.5);
  background-color: rgba(0, 208, 132, 0.1);
}

.db-import-athletes-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.db-import-athlete-buttons {
  display: flex;
  gap: 0.5rem;
  padding: 0 0 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.db-import-athlete-buttons .btn-sm {
  flex: 1;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
}

.db-import-question-row {
  grid-template-columns: minmax(180px, 1fr) minmax(0, 1fr);
}

.db-entries-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.db-entries-head h5 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
}

.db-inline-input,
.db-inline-select {
  min-width: 74px;
  padding: 0.36rem 0.45rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
}

.db-inline-actions {
  display: flex;
  gap: 0.4rem;
}

.db-pain-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.db-pain-zone-chip {
  font-size: 0.68rem;
  padding: 0.18rem 0.48rem;
  border-radius: 99px;
  background: rgba(255, 90, 95, 0.15);
  color: #ff8a8e;
  border: 1px solid rgba(255, 90, 95, 0.28);
  white-space: nowrap;
}

.db-pain-zone-chip-level-1 {
  background: rgba(47, 210, 122, 0.16);
  color: #92f4bb;
  border-color: rgba(47, 210, 122, 0.3);
}

.db-pain-zone-chip-level-2 {
  background: rgba(255, 200, 61, 0.16);
  color: #ffe08d;
  border-color: rgba(255, 200, 61, 0.3);
}

.db-pain-zone-chip-level-3 {
  background: rgba(255, 90, 95, 0.16);
  color: #ffb1b4;
  border-color: rgba(255, 90, 95, 0.3);
}

.db-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0 0.25rem;
  justify-content: center;
}

.db-pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted, #8f9bba);
  min-width: 6rem;
  text-align: center;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: grid;
  gap: 0.55rem;
  width: min(360px, 90vw);
}

.toast {
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(8, 17, 41, 0.9);
  color: #edf3ff;
  font-size: 0.85rem;
  box-shadow: 0 12px 28px rgba(2, 8, 24, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-warning {
  border-color: rgba(255, 184, 77, 0.52);
}

.toast-danger {
  border-color: rgba(255, 90, 108, 0.62);
}

.toast-success {
  border-color: rgba(46, 198, 214, 0.56);
}

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 10, 24, 0.68);
  backdrop-filter: blur(4px);
}

.ui-modal-card {
  width: min(460px, 95vw);
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.ui-modal-card.admin-users-modal-card {
  width: min(1080px, 96vw);
}

.form-popup-card {
  max-height: min(92vh, 860px);
  overflow: auto;
}

.form-popup-card form > label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--txt-soft);
}

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

.form-image-preview {
  width: min(220px, 100%);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: cover;
  max-height: 220px;
}

.form-image-actions {
  display: flex;
  justify-content: flex-start;
}

.file-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe6ff;
  padding: 0.35rem;
}

.file-input::file-selector-button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.5rem 0.8rem;
  margin-right: 0.6rem;
  min-width: 136px;
  white-space: nowrap;
  font-weight: 700;
  color: #071223;
  background: linear-gradient(130deg, #e9113a, #2ec6d6);
  cursor: pointer;
}

.file-input::-webkit-file-upload-button {
  border: 0;
  border-radius: 0.55rem;
  padding: 0.5rem 0.8rem;
  margin-right: 0.6rem;
  min-width: 136px;
  white-space: nowrap;
  font-weight: 700;
  color: #071223;
  background: linear-gradient(130deg, #e9113a, #2ec6d6);
  cursor: pointer;
}

.ui-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 10, 20, 0.62);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.onboarding-card {
  width: min(560px, 96vw);
  padding: 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.onboarding-progress {
  display: flex;
  align-items: center;
}

#onboardingStepBadge {
  background: rgba(85, 167, 255, 0.2);
  border: 1px solid rgba(85, 167, 255, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  color: #dceaff;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}

.checkin-card {
  width: min(920px, 96vw);
  max-height: min(92vh, 860px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.checkin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
}

.wizard-progress {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.35rem;
}

.wizard-progress-track {
  width: min(320px, 74vw);
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.wizard-progress-bar {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, #e9113a, #2ec6d6);
  transition: width 0.24s ease;
}

.wellness-form {
  display: grid;
  gap: 1rem;
}

.wizard-form {
  margin-top: 0.6rem;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}

.wizard-step {
  display: grid;
  gap: 0.8rem;
  min-height: 0;
  overflow: auto;
  padding-right: 0.2rem;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.75rem;
  background: linear-gradient(180deg, rgba(15, 24, 44, 0), rgba(15, 24, 44, 0.92) 36%, rgba(15, 24, 44, 0.98));
}

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

.wizard-selection-grid label {
  display: grid;
  gap: 0.35rem;
}

.wizard-metrics-grid {
  grid-template-columns: 1fr;
}

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

.metrics-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.metric-input {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  touch-action: pan-y;
}

.metric-input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 30, 68, 0.46));
}

.metric-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: #ff214b;
  box-shadow: 0 0 0 5px rgba(255, 33, 75, 0.2);
}

.metric-input::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 30, 68, 0.46));
}

.metric-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: #ff214b;
  box-shadow: 0 0 0 5px rgba(255, 33, 75, 0.2);
}

.metric-question {
  padding: 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.metric-question-title {
  font-weight: 700;
  color: #f3f3f3;
}

.metric-scale-hint {
  margin: 0;
  font-size: 0.79rem;
  color: #d9d9d9;
}

.metric-scale-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.metric-scale-edge {
  font-size: 0.73rem;
  color: #d2d2d2;
}

.metric-scale-row .metric-scale-edge:last-child {
  text-align: right;
}

.metric-scale-value {
  min-width: 2.25rem;
  text-align: center;
  font-size: 0.92rem;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 30, 68, 0.24);
}

.pain-map-wrapper {
  display: grid;
  gap: 0.6rem;
}

.pain-question {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.pain-question-text {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: #eef4ff;
}

.pain-question-helper {
  margin-top: 0.3rem;
}

.pain-question-buttons {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(10, 18, 36, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pain-map-container {
  display: grid;
  gap: 1rem;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid rgba(96, 146, 224, 0.28);
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 200, 61, 0.1), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(47, 210, 122, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(18, 33, 66, 0.9), rgba(18, 31, 57, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 22px 42px rgba(2, 10, 24, 0.22);
}

.pain-map-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.pain-map-header h4 {
  margin-bottom: 0.2rem;
}

.pain-map-helper {
  max-width: 44rem;
}

.pain-map-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  background: rgba(7, 14, 28, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pain-level-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pain-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.pain-level-pill-1 {
  background: rgba(47, 210, 122, 0.16);
  color: #9cf5c1;
  border-color: rgba(47, 210, 122, 0.28);
}

.pain-level-pill-2 {
  background: rgba(255, 200, 61, 0.16);
  color: #ffe08d;
  border-color: rgba(255, 200, 61, 0.28);
}

.pain-level-pill-3 {
  background: rgba(255, 90, 95, 0.16);
  color: #ffb0b3;
  border-color: rgba(255, 90, 95, 0.28);
}

.pain-map-kpis {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.pain-map-kpi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f6ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.pain-map-kpi-view {
  background: rgba(10, 18, 36, 0.48);
  border-color: rgba(255, 255, 255, 0.15);
}

.pain-map-kpi-view-active {
  background: linear-gradient(130deg, rgba(255, 90, 95, 0.25), rgba(255, 200, 61, 0.25));
  border-color: rgba(255, 200, 61, 0.46);
  color: #fff4cf;
  box-shadow: 0 0 0 1px rgba(255, 200, 61, 0.2) inset;
}

.pain-marker-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eef4ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.pain-view-controls {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(7, 15, 30, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pain-view-controls .btn {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

.pain-map-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(112, 156, 227, 0.18);
  border-radius: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(86, 129, 213, 0.22), transparent 42%),
    radial-gradient(circle at 78% 85%, rgba(40, 151, 154, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(39, 56, 94, 0.98), rgba(28, 41, 72, 0.98));
}

.body-figure {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.2rem;
  min-height: 100%;
  position: relative;
}

.body-figure-active {
  background: linear-gradient(180deg, rgba(102, 154, 255, 0.08), rgba(255, 255, 255, 0));
}

.body-figure + .body-figure {
  border-left: 1px solid rgba(102, 154, 255, 0.35);
}

.body-figure-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8f0ff;
  opacity: 0.95;
}

.body-canvas {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: min(230px, 100%);
  padding: 0.2rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.body-canvas-front {
  max-width: 195px;
}

.body-canvas-back {
  max-width: 210px;
}

.body-reference-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.body-svg {
  width: 100%;
  height: auto;
  pointer-events: auto;
  cursor: crosshair;
}

.body-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pain-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.pain-map-actions .btn {
  flex: 0 1 auto;
}

.pain-marker {
  filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.35));
}

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

.pain-selection-item,
.pain-selection-empty {
  min-height: 56px;
  padding: 0.68rem 0.78rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 26, 0.46);
}

.pain-selection-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
}

.pain-selection-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.pain-selection-copy {
  display: grid;
  gap: 0.14rem;
}

.pain-selection-copy strong {
  font-size: 0.8rem;
  color: #f6f8ff;
}

.pain-selection-copy span,
.pain-selection-empty {
  font-size: 0.73rem;
  color: rgba(235, 240, 255, 0.78);
}

.pain-selection-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  grid-column: 1 / -1;
  border-style: dashed;
}

.body-map-tooltip {
  background: rgba(20, 20, 20, 0.92);
  color: #ffffff;
  padding: 0.52rem 0.82rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

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

  .account-side-panel {
    position: static;
    top: auto;
  }

  .account-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-tools-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
  }

  .stats-overview-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .stats-hero-stack {
    grid-template-columns: 1fr;
  }

  .stats-dashboard {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .stats-dashboard-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .stats-hero-snapshot {
    position: static;
  }

  .stats-hero-snapshot-grid {
    grid-template-columns: 1fr;
    gap: 0.24rem;
  }

  .stats-hero-meta-row {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .stats-dashboard-main {
    grid-template-rows: auto;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .stats-summary-card-scroll {
    height: auto;
    grid-template-rows: none;
  }

  .stats-radar-head {
    display: grid;
  }

  .stats-card-slide {
    padding: 0.66rem;
  }

  .stats-metric-chart-card-embed canvas {
    height: 186px !important;
  }

  .stats-summary-meta {
    grid-template-columns: 1fr;
  }

  .stats-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .stats-filters label {
    flex: initial;
  }

  .stats-head {
    display: grid;
  }

  .stats-current-selection {
    justify-items: start;
  }

  .stats-metric-charts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .db-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .db-selection-preview {
    grid-template-columns: 1fr;
  }

  .question-editor-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  h2 {
    font-size: clamp(1.2rem, 5.8vw, 1.55rem);
    line-height: 1.2;
  }

  .app-shell {
    width: 95vw;
    margin: 1rem auto;
  }

  .auth-card {
    margin-top: 3rem;
    padding: 1.3rem;
  }

  .brand-logo-auth {
    width: min(190px, 70%);
    margin-bottom: 0.9rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: initial;
    padding: 0.9rem 0.95rem;
  }

  .topbar-brand {
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.78rem;
  }

  .brand-logo-topbar {
    width: 80px;
    flex: 0 0 auto;
  }

  .topbar-brand h2 {
    margin: 0;
    font-size: clamp(1.08rem, 5vw, 1.3rem);
  }

  .topbar-brand .eyebrow {
    margin-bottom: 0.35rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .user-badge {
    flex: 1;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .dashboard {
    padding-bottom: calc(5.8rem + env(safe-area-inset-bottom));
  }

  .main-tabs {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0.65rem;
    right: 0.65rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.38rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 12, 30, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 30px rgba(2, 8, 24, 0.52);
  }

  .mobile-nav-btn {
    min-height: 44px;
    padding: 0.42rem 0.34rem;
    font-size: 0.76rem;
    line-height: 1.05;
    text-align: center;
    border-radius: 0.95rem;
  }

  .mobile-nav-btn .nav-app-btn-icon {
    width: 32px;
    height: 32px;
  }

  .mobile-nav-btn .nav-app-btn-title {
    font-size: 0.66rem;
  }

  .tab-panel {
    padding: 0.82rem;
  }

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

  .bodymap-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bodymap-model-grid {
    grid-template-columns: 1fr;
  }

  .bodymap-model-presets {
    align-items: stretch;
  }

  .bodymap-model-presets span {
    width: 100%;
  }

  .bodymap-model-presets .btn {
    flex: 1 1 0;
  }

  .bodymap-model-actions {
    justify-content: stretch;
  }

  .bodymap-model-actions .btn {
    width: 100%;
  }

  .bodymap-selection-cards {
    grid-template-columns: 1fr;
  }

  .bodymap-panel-heatmap,
  .bodymap-panel-ranking,
  .bodymap-panel-total,
  .bodymap-panel-zone,
  .bodymap-panel-risk,
  .bodymap-panel-correlation,
  .bodymap-panel-alerts {
    grid-column: span 2;
  }

  .bodymap-alerts {
    grid-template-columns: 1fr;
  }

  .bodymap-panel-kpis {
    padding: 0.62rem;
  }

  .bodymap-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bodymap-heatmap-grid {
    grid-template-columns: 1fr;
  }

  .bodymap-anatomy-grid {
    grid-template-columns: 1fr;
  }

  .bodymap-anatomy-canvas {
    width: min(168px, 100%);
  }

  .bodymap-card-viewport {
    height: 362px;
  }

  .bodymap-panel-head-inline select {
    min-width: 136px;
  }

  #bodyMapRankingChart,
  #bodyMapTotalTrendChart,
  #bodyMapZoneTrendChart,
  #bodyMapRiskChart,
  #bodyMapCorrelationChart {
    height: 210px !important;
  }
}

@media (max-width: 860px) {
  .bodymap-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.72rem;
    --bodymap-stack-height: 236px;
  }

  .bodymap-filters {
    grid-template-columns: 1fr;
  }

  .bodymap-panel-heatmap,
  .bodymap-panel-alerts,
  .bodymap-panel-ranking,
  .bodymap-panel-total,
  .bodymap-panel-zone,
  .bodymap-panel-risk,
  .bodymap-panel-correlation {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }

  .bodymap-panel {
    padding: 0.72rem;
    border-radius: 0.95rem;
    gap: 0.52rem;
  }

  .bodymap-panel-head {
    gap: 0.42rem;
  }

  .bodymap-panel-head h4 {
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .bodymap-panel-head select {
    min-width: 120px;
    max-width: 160px;
    min-height: 42px;
  }

  .bodymap-alerts {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  #bodyMapRankingChart {
    height: 210px !important;
  }
}

@media (max-width: 640px) {
  .bodymap-dashboard-grid {
    --bodymap-stack-height: 220px;
    gap: 0.62rem;
  }

  .bodymap-filters {
    margin-bottom: 0.62rem;
    gap: 0.5rem;
  }

  .bodymap-model-card {
    margin-bottom: 0.64rem;
  }

  .bodymap-selection-cards {
    gap: 0.52rem;
    margin-bottom: 0.68rem;
  }

  .bodymap-selection-card {
    min-height: 82px;
  }

  .bodymap-kpi-grid {
    grid-template-columns: 1fr;
  }

  .bodymap-kpi-item strong {
    font-size: 1.04rem;
  }

  .bodymap-heatmap-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .bodymap-heatmap-row {
    padding: 0.26rem 0.3rem;
  }

  .bodymap-alert-item,
  .bodymap-list-item {
    padding: 0.5rem;
  }

  #bodyMapRankingChart,
  #bodyMapTotalTrendChart,
  #bodyMapZoneTrendChart,
  #bodyMapRiskChart,
  #bodyMapCorrelationChart {
    height: 196px !important;
  }

  .bodymap-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .bodymap-panel-head select {
    width: 100%;
    max-width: none;
  }

  .bodymap-model-presets .btn {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 720px) {
  .stats-head {
    margin-bottom: 0.55rem;
  }

  .stats-head h3 {
    margin: 0;
    font-size: 1.05rem;
  }

  .stats-filters label {
    gap: 0.24rem;
    font-size: 0.76rem;
  }

  .stats-filters select {
    min-height: 44px;
    font-size: 0.94rem;
  }

  .db-entries-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .selectable-list-capped {
    max-height: 232px;
  }

  .db-actions-inline {
    grid-template-columns: 1fr;
  }

  .db-import-source-grid,
  .db-import-team-target-grid,
  .db-import-map-grid {
    grid-template-columns: 1fr;
  }

  .db-import-map-row {
    grid-template-columns: 1fr;
  }

  .db-action-group {
    padding: 0.48rem;
  }

  .db-action-group-title {
    font-size: 0.7rem;
  }

  .db-action-group-grid {
    grid-template-columns: 1fr;
  }

  .db-entries-wrap {
    padding: 0.55rem;
  }

  .db-inline-actions {
    flex-direction: column;
    min-width: 118px;
  }

  .onboarding-actions {
    flex-direction: column;
  }

  .onboarding-modal {
    padding: 0.55rem;
  }

  #checkinModal {
    padding: 0;
  }

  #checkinModal .checkin-card {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

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

  .checkin-head .btn {
    width: 100%;
  }

  .wizard-actions {
    justify-content: stretch;
    gap: 0.45rem;
    padding-top: 0.6rem;
  }

  .wizard-actions .btn {
    flex: 1;
    min-height: 42px;
  }

  .wizard-progress-track {
    width: 100%;
  }

  .wizard-step {
    padding-bottom: 0.4rem;
  }

  .wizard-selection-grid,
  .metrics-grid,
  .pain-map-stage,
  .pain-question,
  .ui-modal-actions {
    grid-template-columns: 1fr;
  }

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

  .stats-summary-grid {
    grid-template-columns: 1fr;
  }

  .stats-filters {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .stats-filters label {
    flex: initial;
  }

  .stats-dashboard {
    gap: 0.6rem;
    height: auto;
    overflow: visible;
  }

  .stats-radar-head,
  .stats-metric-chart-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .stats-hero-stack {
    gap: 0.45rem;
  }

  .stats-hero-card {
    padding: 0.72rem;
  }

  .stats-hero-card-compact {
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 74px;
    padding: 0.44rem;
    gap: 0.44rem;
  }

  .stats-hero-card-compact .stats-hero-title {
    font-size: 0.86rem;
  }

  .stats-hero-card-compact .stats-hero-subtitle {
    font-size: 0.64rem;
    line-height: 1.15;
  }

  .stats-hero-snapshot {
    padding: 0.5rem;
  }

  .stats-hero-snapshot .stats-hero-copy {
    gap: 0.18rem;
  }

  .stats-hero-readiness-value {
    font-size: 1.18rem;
  }

  .stats-hero-chip,
  .stats-chart-chip {
    min-height: 22px;
    padding: 0.12rem 0.42rem;
  }

  .stats-radar-card {
    gap: 0.38rem;
    padding: 0.48rem;
  }

  .stats-card-slide {
    padding: 0.56rem;
    gap: 0.42rem;
    height: 100%;
    overflow-y: auto;
  }

  .stats-card-viewport {
    height: 372px;
  }

  .stats-card-carousel {
    height: 100%;
  }

  .stats-mini-chart {
    height: 102px;
  }

  .stats-card-slide-chart {
    padding: 0.54rem;
  }

  .stats-card-slide-intervention .stats-intervention-panel {
    height: 100%;
    min-height: 0;
  }

  .stats-card-slide-intervention .stats-intervention-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.08rem;
    padding-bottom: 0;
  }

  .stats-summary-card {
    gap: 0.42rem;
    padding: 0.64rem;
  }

  .stats-summary-head h4 {
    font-size: 0.92rem;
  }

  .stats-summary-kicker {
    justify-content: flex-start;
    gap: 0.24rem;
  }

  .stats-summary-kicker-chip,
  .stats-status-badge {
    min-height: 21px;
    font-size: 0.61rem;
  }

  .stats-zscore-chip {
    min-height: 18px;
    font-size: 0.6rem;
    padding: 0.06rem 0.34rem;
  }

  .stats-summary-value-row {
    align-items: flex-start;
    gap: 0.3rem;
  }

  .stats-summary-current-value {
    font-size: 1.28rem;
  }

  .stats-summary-current-label {
    font-size: 0.64rem;
  }

  .stats-summary-subtitle,
  .stats-summary-readiness {
    font-size: 0.69rem;
  }

  .stats-summary-progress-track {
    height: 6px;
  }

  .stats-summary-meta-item {
    padding: 0.4rem 0.46rem;
    min-height: 56px;
  }

  .stats-summary-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
  }

  .stats-summary-meta-label {
    font-size: 0.63rem;
  }

  .stats-summary-meta-value {
    font-size: 0.8rem;
  }

  .stats-card-slide-intervention .stats-intervention-item {
    padding: 0.42rem 0.46rem;
  }

  .stats-metric-chart-card-embed canvas {
    height: 166px !important;
  }

  .stats-overview-grid {
    grid-template-columns: 1fr;
  }

  .stats-dashboard-main {
    gap: 0.7rem;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .stats-metric-charts-grid {
    grid-template-columns: 1fr;
  }

  .stats-hero-media,
  .stats-hero-athlete-media {
    width: 62px;
    height: 62px;
  }

  #statsSpiderChart {
    height: 238px !important;
  }

  th,
  td {
    font-size: 0.8rem;
    padding: 0.44rem;
  }
}

@media (max-width: 560px) {
  .bodymap-card-viewport {
    height: 328px;
  }

  .app-shell {
    width: 96vw;
    margin: 0.55rem auto;
  }

  .glass {
    border-radius: 1rem;
  }

  .topbar {
    padding: 0.78rem 0.82rem;
  }

  .topbar-brand {
    gap: 0.62rem;
  }

  .brand-logo-topbar {
    width: 72px;
  }

  .topbar-brand h2 {
    font-size: 1rem;
  }

  .topbar-actions {
    gap: 0.45rem;
  }

  .mobile-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.38rem 0.62rem;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .account-menu {
    position: fixed;
    top: calc(0.75rem + env(safe-area-inset-top));
    right: 0.55rem;
    left: 0.55rem;
    width: auto;
    z-index: 80;
  }

  .btn,
  .mobile-nav-btn {
    min-height: 44px;
  }

  .auth-card {
    margin-top: 1.4rem;
    padding: 1rem;
  }

  .toast-stack {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    bottom: calc(5.2rem + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    left: 0.5rem;
    right: 0.5rem;
    gap: 0.28rem;
    padding: 0.32rem;
  }

  .mobile-nav-btn {
    font-size: 0.72rem;
    padding: 0.38rem 0.22rem;
  }

  .mobile-nav-btn .nav-app-btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .mobile-nav-btn .nav-app-btn-icon svg {
    width: 15px;
    height: 15px;
  }

  .mobile-nav-btn .nav-app-btn-title {
    font-size: 0.62rem;
  }

  .tab-panel {
    padding: 0.72rem;
  }

  .stats-head {
    margin-bottom: 0.48rem;
  }

  .stats-filters {
    gap: 0.55rem;
    margin-bottom: 0.65rem;
  }

  .stats-dashboard {
    gap: 0.55rem;
  }

  .stats-hero-card {
    padding: 0.6rem;
  }

  .stats-hero-card-compact {
    min-height: 68px;
    padding: 0.4rem;
    gap: 0.38rem;
  }

  .stats-hero-card-compact .stats-hero-title {
    font-size: 0.82rem;
  }

  .stats-hero-card-compact .stats-hero-subtitle {
    font-size: 0.61rem;
  }

  .stats-hero-media,
  .stats-hero-athlete-media {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .stats-hero-snapshot {
    padding: 0.46rem;
  }

  .stats-hero-snapshot-grid {
    gap: 0.2rem;
  }

  .stats-hero-readiness-value {
    font-size: 1.08rem;
  }

  .stats-hero-chip,
  .stats-chart-chip {
    font-size: 0.58rem;
  }

  .stats-hero-meta-item {
    font-size: 0.58rem;
  }

  .stats-radar-card {
    gap: 0.32rem;
    padding: 0.42rem;
  }

  #statsSpiderChart {
    height: 220px !important;
  }

  .stats-summary-card {
    padding: 0.58rem;
    border-radius: 0.88rem;
  }

  .stats-card-slide,
  .stats-card-slide-chart {
    padding: 0.5rem;
  }

  .stats-card-viewport {
    height: 388px;
  }

  .stats-card-carousel,
  .stats-card-slide {
    height: 100%;
  }

  .stats-mini-chart {
    height: 94px;
  }

  .stats-summary-head h4 {
    font-size: 0.88rem;
  }

  .stats-summary-kicker-chip,
  .stats-status-badge {
    min-height: 20px;
    font-size: 0.58rem;
  }

  .stats-zscore-chip {
    min-height: 17px;
    font-size: 0.58rem;
    padding: 0.05rem 0.3rem;
  }

  .stats-summary-value-row {
    grid-template-columns: 1fr;
    display: grid;
    gap: 0.26rem;
  }

  .stats-summary-current-value {
    font-size: 1.2rem;
  }

  .stats-summary-current-label {
    font-size: 0.6rem;
  }

  .stats-summary-subtitle,
  .stats-summary-readiness {
    font-size: 0.66rem;
  }

  .stats-summary-progress-track {
    height: 5px;
  }

  .stats-summary-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.24rem;
  }

  .stats-summary-meta-item {
    padding: 0.34rem 0.38rem;
    min-height: 50px;
  }

  .stats-summary-meta-label {
    font-size: 0.6rem;
  }

  .stats-summary-meta-value {
    font-size: 0.72rem;
  }

  .stats-metric-chart-card-embed {
    padding: 0.5rem;
  }

  .stats-metric-chart-card-embed canvas {
    height: 154px !important;
  }

  .ui-modal {
    padding: 0.75rem;
  }

  .ui-modal-actions {
    flex-direction: column;
  }

  .popup-grid-two {
    grid-template-columns: 1fr;
  }

  .form-popup-card {
    max-height: 94vh;
  }

  .pain-question-buttons {
    width: 100%;
    justify-content: stretch;
  }

  .pain-question-buttons .btn {
    flex: 1;
  }

  .pain-map-container {
    padding: 0.75rem;
  }

  .pain-map-insights {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 0.68rem 0.72rem;
  }

  .pain-map-kpis {
    justify-content: flex-start;
  }

  .pain-map-kpi-view {
    min-width: 108px;
  }

  .pain-map-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pain-marker-count {
    min-width: initial;
  }

  .body-canvas-front {
    max-width: 170px;
  }

  .body-canvas-back {
    max-width: 180px;
  }

  .pain-selection-summary {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .stats-summary-card {
    padding: 0.62rem;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .stats-summary-card-scroll {
    height: auto;
  }

  .stats-card-viewport {
    height: min(308px, 72vh);
  }

  .stats-card-carousel,
  .stats-card-slide {
    height: 100%;
  }

  .stats-card-slide {
    overflow-y: auto;
  }

  .stats-card-slide-summary {
    overflow-y: auto;
  }

  .stats-mini-chart {
    height: 86px;
  }

  .stats-summary-meta-item {
    min-height: 44px;
    padding: 0.26rem 0.3rem;
  }
}

@media (max-width: 860px) {
  .bodymap-card-viewport {
    height: 304px;
  }

  .bodymap-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .bodymap-panel-head-stack {
    width: 100%;
  }

  .bodymap-panel-head select {
    width: 100%;
    max-width: none;
    min-height: 44px;
    font-size: 0.95rem;
  }

  .bodymap-risk-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    margin-right: -0.1rem;
  }

  .bodymap-risk-legend-chip {
    white-space: nowrap;
  }

  .bodymap-correlation-chip {
    font-size: 0.64rem;
  }

  .bodymap-correlation-insight-row {
    flex-wrap: wrap;
    gap: 0.36rem;
  }

  .bodymap-correlation-outlier-badge {
    font-size: 0.62rem;
  }

  .bodymap-correlation-insight {
    font-size: 0.67rem;
  }

  .bodymap-explain-metrics {
    grid-template-columns: 1fr;
  }

  .bodymap-explain-chip {
    font-size: 0.62rem;
  }

  .bodymap-risk-legend::-webkit-scrollbar {
    height: 6px;
  }

  .bodymap-risk-legend::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
  }

  .bodymap-risk-legend::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 999px;
  }

  .bodymap-alerts {
    max-height: 44vh;
    overflow-y: auto;
    padding-right: 0.22rem;
  }

  .bodymap-risk-scroll {
    max-height: 44vh;
  }
}

@media (max-width: 640px) {
  .bodymap-panel {
    padding: 0.68rem;
    gap: 0.5rem;
  }

  .bodymap-panel-head h4 {
    font-size: 0.84rem;
    line-height: 1.2;
  }

  .bodymap-risk-scroll,
  .bodymap-alerts {
    max-height: 46vh;
  }

  #bodyMapTotalTrendChart,
  #bodyMapZoneTrendChart,
  #bodyMapCorrelationChart {
    height: 216px !important;
  }
}

/* Global black/red/white glassmorphism theme override */
:root {
  --bg-0: #030303;
  --bg-1: #0a0a0a;
  --bg-2: #151515;
  --card: rgba(10, 10, 10, 0.58);
  --card-border: rgba(255, 255, 255, 0.16);
  --txt-main: #fbfbfb;
  --txt-soft: #d0d0d0;
  --accent: #ff1e44;
  --accent-2: #ffffff;
  --danger: #ff3a5d;
  --avatar-placeholder: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='31' fill='%23212121'/%3E%3Ccircle cx='32' cy='25' r='12' fill='%239a9a9a'/%3E%3Cpath d='M12 55c2.7-10 10.8-16 20-16s17.3 6 20 16' fill='%239a9a9a'/%3E%3C/svg%3E");
}

html,
body {
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 30, 68, 0.28) 0%, transparent 38%),
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.12) 0%, transparent 32%),
    linear-gradient(120deg, #010101, #080808, #121212);
}

.orb-1 {
  background: rgba(255, 40, 72, 0.28);
}

.orb-2 {
  background: rgba(255, 255, 255, 0.16);
}

.glass {
  background: rgba(10, 10, 10, 0.58);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-primary {
  background: linear-gradient(130deg, #ff123f, #ff4f6f 46%, #ffffff);
  color: #080808;
}

.btn-danger {
  background: linear-gradient(130deg, #ff1d46, #ff3358);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f5f5f5;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: rgba(255, 30, 68, 0.9);
}

.tab-btn.tab-active,
.mobile-nav-btn-active,
.btn-active {
  background: linear-gradient(130deg, rgba(255, 24, 64, 0.42), rgba(255, 255, 255, 0.26));
  border-color: rgba(255, 120, 140, 0.64);
  color: #ffffff;
}

.selectable-list li.active,
.body-figure-active {
  border-color: rgba(255, 92, 120, 0.66);
  background: rgba(255, 35, 72, 0.18);
}

.kpi,
.questions-editor,
.db-manager,
.db-entries-wrap,
.db-preview-card,
.db-action-group,
#wellnessChart {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.db-action-group-danger {
  border-color: rgba(255, 76, 106, 0.44);
  background: rgba(255, 42, 78, 0.14);
}

.table-empty,
.list-meta,
.db-preview-title,
.db-helper,
.helper-text,
.stats-current-selection span,
.db-kpis span,
#onboardingStepBadge {
  color: #e7e7e7;
}

thead th {
  background: rgba(4, 4, 4, 0.96);
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.onboarding-modal,
.ui-modal {
  background: rgba(2, 2, 2, 0.72);
}

#checkinModal {
  z-index: 70;
  background: rgba(1, 1, 1, 0.82);
}

#confirmModal,
#promptModal {
  z-index: 80;
}

#dbImportModal {
  z-index: 50;
}

.wizard-progress-bar,
.file-input::file-selector-button,
.file-input::-webkit-file-upload-button {
  background: linear-gradient(120deg, #ff1642, #ffffff);
  color: #080808;
}

.pain-map-container,
.pain-map-stage,
.pain-view-controls,
.pain-question {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(14, 14, 14, 0.7);
}

.list-avatar-empty,
.db-preview-avatar-empty {
  border-style: dashed;
  background-color: rgba(255, 255, 255, 0.05);
  background-image: var(--avatar-placeholder);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72% 72%;
}

@media (max-width: 720px) {
  #checkinModal {
    padding: 0;
    align-items: stretch;
  }

  #checkinModal .checkin-card {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: max(0.72rem, env(safe-area-inset-top)) 0.85rem calc(0.9rem + env(safe-area-inset-bottom));
  }

  .checkin-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-bottom: 0.5rem;
    background: linear-gradient(180deg, rgba(8, 8, 8, 0.96), rgba(8, 8, 8, 0.86), rgba(8, 8, 8, 0));
  }

  .checkin-head .btn {
    min-height: 44px;
    width: auto;
    min-width: 102px;
    margin-left: auto;
  }

  .wizard-form {
    margin-top: 0.22rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 0.5rem;
  }

  .wizard-step {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 0;
    padding-bottom: 0.45rem;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-selection-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .wizard-selection-grid select {
    min-height: 46px;
    font-size: 0.95rem;
  }

  .wizard-actions {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.45rem;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.95rem;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  }

  .wizard-actions .btn {
    min-height: 48px;
    font-size: 0.95rem;
    width: 100%;
  }

  #wizardPrevBtn,
  #wizardNextBtn:not(.hidden),
  #wizardSaveBtn:not(.hidden) {
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .metric-question {
    padding: 0.7rem;
  }

  .metric-scale-edge {
    font-size: 0.7rem;
  }

  .pain-question {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.8rem;
  }

  .pain-question-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    border-radius: 0.8rem;
    padding: 0.35rem;
  }

  .pain-question-buttons .btn {
    min-height: 44px;
  }

  .pain-view-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    border-radius: 0.85rem;
    padding: 0.35rem;
  }

  .pain-view-controls .btn {
    min-height: 44px;
    font-size: 0.88rem;
  }

  .pain-map-stage {
    grid-template-columns: 1fr;
    padding: 0.35rem;
  }

  .pain-map-stage .body-figure {
    display: none;
  }

  .pain-map-stage .body-figure.body-figure-active {
    display: grid;
  }

  .body-figure + .body-figure {
    border-left: 0;
  }

  .body-canvas-front,
  .body-canvas-back {
    max-width: min(220px, 84vw);
  }

  .pain-map-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .pain-map-actions .btn {
    min-height: 44px;
  }
}

@media (max-width: 720px) {
  .auth-card {
    margin: 2.4rem auto 0;
    width: min(92vw, 560px);
    padding: 1.25rem;
  }

  .auth-card p {
    margin-bottom: 0.4rem;
  }

  .auth-form-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-verification-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #googleLoginBtn,
  #emailAuthSubmitBtn {
    min-height: 46px;
    width: 100%;
    margin-inline: auto;
  }
}

/* Mobile refinement pass: centered cards + cleaner step 7 pain map */
@media (max-width: 720px) {
  #checkinModal .wizard-step > * {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  #wizardQuestionCounter {
    text-align: center;
    opacity: 0.92;
  }

  .metric-question,
  .pain-question,
  .pain-map-container {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .pain-question {
    padding: 0.72rem;
    gap: 0.5rem;
  }

  .pain-question-text {
    font-size: 0.95rem;
    line-height: 1.2;
  }

  #wizardPainStep .pain-question-helper,
  #wizardPainStep .pain-map-helper {
    font-size: 0.74rem;
    line-height: 1.25;
    opacity: 0.86;
  }

  #wizardPainStep .pain-map-header {
    gap: 0.45rem;
  }

  #wizardPainStep .pain-map-insights {
    gap: 0.55rem;
    padding: 0.62rem;
  }

  #wizardPainStep .pain-level-pill,
  #wizardPainStep .pain-map-kpi {
    min-height: 32px;
    font-size: 0.74rem;
  }

  #wizardPainStep .pain-map-stage {
    padding: 0.25rem;
    border-radius: 0.75rem;
  }

  #wizardPainStep .body-figure {
    justify-items: center;
    align-content: start;
    padding: 0.25rem 0.2rem 0;
  }

  #wizardPainStep .body-figure-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  #wizardPainStep .body-canvas-front,
  #wizardPainStep .body-canvas-back {
    width: min(100%, 190px);
    max-width: 190px;
  }

  #wizardPainStep .body-reference-image,
  #wizardPainStep .body-svg {
    max-height: 44vh;
    object-fit: contain;
  }

  #wizardPainStep .pain-selection-item,
  #wizardPainStep .pain-selection-empty {
    min-height: 50px;
    padding: 0.58rem 0.65rem;
  }
}

@media (max-width: 430px) {
  #checkinModal .checkin-card {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .checkin-head {
    padding-bottom: 0.35rem;
  }

  #wizardStepTitle {
    font-size: 1.25rem;
    line-height: 1.1;
  }

  #wizardStepDescription {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  #wizardPainStep .pain-question,
  #wizardPainStep .pain-map-container {
    border-radius: 0.72rem;
  }

  #wizardPainStep .pain-question {
    padding: 0.62rem;
  }

  #wizardPainStep .pain-question-helper,
  #wizardPainStep .pain-map-helper {
    font-size: 0.71rem;
    line-height: 1.2;
  }

  #wizardPainStep .pain-marker-count {
    padding: 0.38rem 0.58rem;
    font-size: 0.75rem;
  }

  #wizardPainStep .pain-level-pill,
  #wizardPainStep .pain-map-kpi {
    min-height: 30px;
    font-size: 0.7rem;
    padding-inline: 0.55rem;
  }

  #wizardPainStep .pain-view-controls .btn,
  #wizardPainStep .pain-question-buttons .btn,
  #wizardPainStep .pain-map-actions .btn {
    min-height: 41px;
    font-size: 0.84rem;
  }

  #wizardPainStep .body-canvas-front,
  #wizardPainStep .body-canvas-back {
    width: min(100%, 172px);
    max-width: 172px;
  }

  #wizardPainStep .body-reference-image,
  #wizardPainStep .body-svg {
    max-height: 40vh;
  }

  #wizardPainStep .pain-selection-copy strong {
    font-size: 0.76rem;
  }

  #wizardPainStep .pain-selection-copy span,
  #wizardPainStep .pain-selection-empty {
    font-size: 0.69rem;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 430px) {
    #wizardPainStep .body-reference-image,
    #wizardPainStep .body-svg {
      max-height: 38vh;
    }
  }
}

@media (max-width: 430px) {
  #checkinModal .checkin-head {
    padding-bottom: 0.28rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #checkinModal .checkin-head > div {
    display: grid;
    gap: 0.22rem;
  }

  #checkinModal .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    margin-bottom: 0.15rem;
  }

  #wizardStepTitle {
    margin: 0;
    font-size: 1.17rem;
    line-height: 1.08;
  }

  #wizardStepDescription {
    margin: 0;
    font-size: 0.79rem;
    line-height: 1.22;
  }

  .wizard-progress {
    margin-top: 0.18rem;
    gap: 0.2rem;
  }

  #wizardProgressText {
    font-size: 0.74rem;
  }

  .wizard-progress-track {
    height: 6px;
  }

  .wizard-form {
    gap: 0.35rem;
  }

  #wizardQuestionCounter {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
  }

  .metric-question,
  #wizardPainStep .pain-question,
  #wizardPainStep .pain-map-container {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  }

  .wizard-actions {
    padding: 0.35rem;
    gap: 0.38rem;
  }

  .wizard-actions .btn {
    min-height: 46px;
  }
}

/* iOS full-wizard preset */
@media (max-width: 430px) {
  #checkinModal .checkin-card {
    border-radius: 0;
    padding-top: max(0.7rem, env(safe-area-inset-top));
    padding-left: 0.6rem;
    padding-right: 0.6rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
  }

  #checkinModal .checkin-head {
    gap: 0.45rem;
  }

  #checkinModal .checkin-head .btn {
    min-height: 42px;
    min-width: 98px;
    padding: 0.52rem 0.9rem;
    border-radius: 0.8rem;
  }

  #checkinModal .wizard-step {
    gap: 0.55rem;
    padding-bottom: 0.55rem;
  }

  #checkinModal .wizard-selection-grid {
    gap: 0.5rem;
  }

  #checkinModal .wizard-selection-grid label,
  #checkinModal .metric-question {
    font-size: 0.9rem;
  }

  #checkinModal .wizard-selection-grid select,
  #checkinModal .wizard-selection-grid input,
  #checkinModal .metric-input {
    min-height: 44px;
  }

  #checkinModal .metric-question {
    padding: 0.62rem;
    border-radius: 0.75rem;
  }

  #checkinModal .metric-question-title {
    font-size: 0.99rem;
    line-height: 1.15;
  }

  #checkinModal .metric-scale-hint {
    font-size: 0.72rem;
  }

  #checkinModal .metric-scale-value {
    min-width: 2.1rem;
    font-size: 0.86rem;
    padding: 0.17rem 0.48rem;
  }

  #checkinModal .pain-question,
  #checkinModal .pain-map-container {
    padding: 0.62rem;
    border-radius: 0.72rem;
  }

  #checkinModal .pain-question-text,
  #checkinModal .pain-map-header h4 {
    font-size: 1rem;
  }

  #checkinModal .pain-question-helper,
  #checkinModal .pain-map-helper {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  #checkinModal .pain-view-controls,
  #checkinModal .pain-question-buttons,
  #checkinModal .pain-map-actions {
    gap: 0.38rem;
    padding: 0.28rem;
    border-radius: 0.72rem;
  }

  #checkinModal .pain-view-controls .btn,
  #checkinModal .pain-question-buttons .btn,
  #checkinModal .pain-map-actions .btn {
    min-height: 40px;
    font-size: 0.83rem;
    border-radius: 0.68rem;
  }

  #checkinModal .body-canvas-front,
  #checkinModal .body-canvas-back {
    width: min(100%, 170px);
    max-width: 170px;
  }

  #checkinModal .body-reference-image,
  #checkinModal .body-svg {
    max-height: 38vh;
  }

  #checkinModal .wizard-actions {
    gap: 0.35rem;
    padding: 0.32rem;
    border-radius: 0.82rem;
  }

  #checkinModal .wizard-actions .btn {
    min-height: 45px;
    font-size: 0.92rem;
    border-radius: 0.72rem;
  }
}

/* Final mobile polish */
@media (max-width: 430px) {
  #checkinModal .wizard-progress-track {
    margin-inline: auto;
  }

  #checkinModal .wizard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #checkinModal .wizard-actions .btn:only-child {
    grid-column: 1 / -1;
  }

  #checkinModal .wizard-step {
    scroll-padding-bottom: 6rem;
  }

  #checkinModal .metric-scale-row {
    gap: 0.35rem;
  }

  #checkinModal .metric-scale-edge {
    font-size: 0.68rem;
  }

  #checkinModal .pain-map-header {
    align-items: center;
  }
}

@media (max-width: 860px) and (orientation: landscape) {
  #checkinModal .checkin-card {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
  }

  #checkinModal .checkin-head {
    padding-bottom: 0.2rem;
  }

  #checkinModal .wizard-step {
    padding-bottom: 0.4rem;
  }

  #checkinModal .body-reference-image,
  #checkinModal .body-svg {
    max-height: 56vh;
  }
}

/* Emergency mobile override to guarantee wizard rendering on iPhone/Safari */
@media (max-width: 720px) {
  #checkinModal {
    padding: 0 !important;
    z-index: 90 !important;
  }

  #checkinModal .checkin-card {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
  }

  #checkinModal .wizard-form {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #checkinModal .wizard-step {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: auto !important;
  }


/* Body Map responsive optimization pass */
@media (max-width: 1024px) {
  .bodymap-panel,
  .bodymap-panel * {
    min-width: 0;
  }

  .bodymap-dashboard-grid {
    gap: 0.68rem;
  }

  .bodymap-panel {
    padding: 0.7rem;
    gap: 0.5rem;
    min-height: 0;
  }

  .bodymap-panel-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .bodymap-panel-head h4 {
    line-height: 1.18;
  }

  .bodymap-panel-head h5 {
    line-height: 1.18;
  }

  .bodymap-panel-head select,
  .bodymap-panel-head-inline select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

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

  .bodymap-kpi-item {
    padding: 0.5rem;
  }

  .bodymap-kpi-item span {
    line-height: 1.24;
  }

  .bodymap-kpi-item strong {
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-word;
  }

  .bodymap-kpi-risk-bars {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .bodymap-kpi-risk-bar {
    min-width: 86px;
  }

  .bodymap-card-viewport {
    height: clamp(300px, 48vh, 360px);
    min-height: 0;
  }

  .bodymap-card-slide {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bodymap-card-slide-heatmap {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bodymap-card-slide-heatmap::-webkit-scrollbar {
    display: none;
  }

  .bodymap-explain-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bodymap-protocol-steps {
    grid-template-columns: 1fr;
  }

  .bodymap-heatmap-row {
    padding: 0.3rem 0.34rem;
  }

  .bodymap-heatmap-meta {
    gap: 0.2rem;
  }

  .bodymap-heatmap-meta span:first-child {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .bodymap-heatmap-meta span:last-child {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .bodymap-risk-scroll,
  .bodymap-alerts {
    max-height: clamp(210px, 36vh, 300px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .bodymap-risk-scroll::-webkit-scrollbar,
  .bodymap-alerts::-webkit-scrollbar {
    display: none;
  }

  #bodyMapRankingChart,
  #bodyMapTotalTrendChart,
  #bodyMapZoneTrendChart,
  #bodyMapRiskChart,
  #bodyMapCorrelationChart {
    height: clamp(190px, 36vh, 250px) !important;
  }
}

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

  .bodymap-kpi-item {
    border-radius: 0.8rem;
  }

  .bodymap-explain-metrics {
    grid-template-columns: 1fr;
  }

  .bodymap-anatomy-grid {
    grid-template-columns: 1fr;
  }

  .bodymap-anatomy-canvas {
    width: min(208px, 88vw);
  }

  .bodymap-card-viewport {
    height: clamp(276px, 50vh, 332px);
    min-height: 0;
  }

  .bodymap-card-slide {
    padding: 0.48rem;
  }

  .bodymap-panel-head h4 {
    font-size: 0.82rem;
  }

  .bodymap-panel-head h5 {
    font-size: 0.76rem;
  }

  .bodymap-risk-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.18rem;
  }

  .bodymap-risk-scroll,
  .bodymap-alerts {
    max-height: clamp(190px, 34vh, 260px);
  }

  .bodymap-risk-legend-chip {
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .bodymap-dashboard-grid {
    gap: 0.56rem;
  }

  .bodymap-panel {
    padding: 0.6rem;
    border-radius: 0.86rem;
  }

  .bodymap-kpi-item span {
    font-size: 0.65rem;
  }

  .bodymap-kpi-item strong {
    font-size: 0.94rem;
  }

  .bodymap-heatmap-row {
    padding: 0.26rem 0.3rem;
  }

  .bodymap-alert-item,
  .bodymap-list-item {
    padding: 0.46rem;
  }

  #bodyMapRankingChart,
  #bodyMapTotalTrendChart,
  #bodyMapZoneTrendChart,
  #bodyMapRiskChart,
  #bodyMapCorrelationChart {
    height: clamp(176px, 34vh, 228px) !important;
  }
}

/* Anatomy slide: compact side-by-side view without scroll */
@media (max-width: 1024px) {
  .bodymap-card-slide-anatomy {
    overflow: hidden !important;
    align-content: start;
    gap: 0.24rem;
    padding: 0.42rem 0.36rem;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.2rem;
    align-items: start;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-card {
    gap: 0.16rem;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-card figcaption {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-canvas {
    width: clamp(108px, 40vw, 148px);
    border-radius: 0.62rem;
  }
}

@media (max-width: 430px) {
  .bodymap-card-slide-anatomy {
    padding: 0.36rem 0.3rem;
    gap: 0.18rem;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-grid {
    gap: 0.14rem;
  }

  .bodymap-card-slide-anatomy .bodymap-anatomy-canvas {
    width: clamp(100px, 38vw, 132px);
  }
}
  #checkinModal .wizard-step > * {
    width: min(100%, 520px) !important;
    margin-inline: auto !important;
  }

  #checkinModal .wizard-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 12 !important;
    margin-top: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    background: rgba(8, 8, 8, 0.98) !important;
  }

  #checkinModal .wizard-actions .btn:not(.hidden) {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 46px !important;
  }

  #checkinModal .wizard-actions .btn:only-child:not(.hidden) {
    grid-column: 1 / -1 !important;
  }

  #checkinModal .pain-map-stage {
    grid-template-columns: 1fr !important;
  }

  #checkinModal .pain-map-stage .body-figure {
    display: none !important;
  }

  #checkinModal .pain-map-stage .body-figure.body-figure-active {
    display: grid !important;
  }

  #checkinModal .body-canvas-front,
  #checkinModal .body-canvas-back {
    width: min(100%, 180px) !important;
    max-width: 180px !important;
  }

  #checkinModal .pain-map-controls {
    width: min(100%, 180px) !important;
  }
}

/* ============================================================================
   MEMBERSHIP BLOCKED SCREEN
   ============================================================================ */

.membership-blocked {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 4% 18%, rgba(198, 15, 36, 0.64) 0%, rgba(128, 9, 24, 0.36) 18%, rgba(45, 8, 14, 0.18) 36%, transparent 58%),
    radial-gradient(circle at 90% 72%, rgba(103, 230, 255, 0.22) 0%, transparent 38%),
    linear-gradient(110deg, #2d050c 0%, #13070b 16%, #090c12 38%, #070b11 66%, #05080d 100%);
}

.membership-blocked-card {
  width: min(100%, 620px);
  border-radius: 30px;
  border: 1px solid rgba(148, 212, 229, 0.28);
  backdrop-filter: blur(18px) saturate(132%);
  -webkit-backdrop-filter: blur(18px) saturate(132%);
  background:
    linear-gradient(145deg, rgba(18, 34, 47, 0.74), rgba(10, 18, 27, 0.86)),
    linear-gradient(90deg, rgba(255, 77, 95, 0.07), rgba(103, 230, 255, 0.05));
  box-shadow: 0 34px 88px rgba(1, 7, 12, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: clamp(1.7rem, 3.2vw, 2.55rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: membershipFadeInUp 0.34s ease both;
}

.membership-blocked-card::before {
  content: "";
  position: absolute;
  inset: -22% auto auto -35%;
  width: 68%;
  height: 68%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 106, 134, 0.2) 0%, rgba(255, 106, 134, 0) 68%);
  pointer-events: none;
  z-index: -1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.95rem;
  text-align: left;
}

.brand-lockup-splash {
  margin-bottom: 0.9rem;
}

.brand-logo-splash {
  width: 84px;
  max-width: 84px;
  border-radius: 14px;
  filter: drop-shadow(0 6px 20px rgba(198, 15, 36, 0.34)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.42));
}

.membership-blocked-card .eyebrow {
  margin: 0 0 0.2rem;
  color: rgba(145, 191, 211, 0.9);
  letter-spacing: 0.18em;
}

.membership-blocked-card h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  background: linear-gradient(110deg, #ff4d5f 0%, #ffd2d8 24%, #67e6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.membership-blocked-card h2 {
  margin: 0.24rem 0 0.82rem;
  font-size: clamp(1.62rem, 4vw, 2.26rem);
  line-height: 1.08;
  color: #ffe4ea;
}

.membership-blocked-message {
  margin: 0 auto 0.74rem;
  max-width: 520px;
  font-size: clamp(1.04rem, 2.6vw, 1.22rem);
  color: #e6f1ff;
  line-height: 1.48;
}

.membership-blocked-message strong {
  color: #ffd3de;
}

.membership-blocked-hint {
  margin: 0 auto;
  max-width: 560px;
  color: #bfd0eb;
  font-size: clamp(0.96rem, 2vw, 1.08rem);
  line-height: 1.52;
}

.membership-blocked-hint a {
  color: #67e6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.membership-blocked-hint a:hover {
  color: #9ef0ff;
}

.btn-lg {
  min-height: 46px;
  padding: 0.86rem 2.2rem;
  font-size: 1.02rem;
}

#membershipLogoutBtn {
  margin-top: 1.5rem;
  min-width: 160px;
  border-radius: 14px;
  font-weight: 700;
  background: linear-gradient(90deg, #ff1d5f 0%, #ff6f94 56%, #ffd7e2 100%);
  color: #1f0b16;
  box-shadow: 0 15px 32px rgba(255, 21, 84, 0.36), 0 0 0 1px rgba(255, 236, 242, 0.26) inset;
}

#membershipLogoutBtn:hover {
  box-shadow: 0 18px 38px rgba(255, 21, 84, 0.45), 0 0 0 1px rgba(255, 236, 242, 0.3) inset;
}

@keyframes membershipFadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .membership-blocked-card {
    border-radius: 22px;
    padding: 1.5rem 1.15rem 1.25rem;
  }

  .brand-lockup {
    flex-direction: column;
    text-align: center;
    gap: 0.45rem;
  }

  .brand-logo-splash {
    width: 72px;
    max-width: 72px;
  }

  #membershipLogoutBtn {
    width: 100%;
  }
}
