/* =========================================================
   4Body — Layout do app / telas (tela cheia, sem moldura)
   ========================================================= */

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

html,
body {
  height: 100%;
}

body {
  position: relative;
  font-family: var(--font-family);
  color: var(--on-surface);
  background:
    radial-gradient(1200px 700px at 100% 100%, rgba(37, 107, 255, 0.045), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(166, 111, 230, 0.04), transparent 60%),
    linear-gradient(200deg, #12161b, #0c0f13 45%, #08090c);
  min-height: 100vh;
  overflow: hidden;
}

/* Camada de cor primária: de baixo-direita para cima-esquerda */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to top left,
    rgba(37, 107, 255, 0.10),
    rgba(37, 107, 255, 0.03) 38%,
    transparent 60%
  );
}

/* ============ Iluminação de fundo (apenas background) ============ */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

/* primária — canto inferior direito (a "cor primária") */
.glow--1 {
  width: 68vmax;
  height: 68vmax;
  right: -20vmax;
  bottom: -26vmax;
  background: radial-gradient(circle at center, rgba(37, 107, 255, 0.55), rgba(37, 107, 255, 0) 70%);
  opacity: 0.35;
}

/* acento — canto superior esquerdo */
.glow--2 {
  width: 50vmax;
  height: 50vmax;
  left: -18vmax;
  top: -20vmax;
  background: radial-gradient(circle at center, rgba(166, 111, 230, 0.5), rgba(166, 111, 230, 0) 70%);
  opacity: 0.7;
}

/* ============ Header / Logo principal ============ */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 760px;
  padding: 16px var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center; /* barra só com a marca -> logo centralizado */
  z-index: 3;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(8, 9, 12, 0.85) 42%, rgba(8, 9, 12, 0));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent);
  mask-image: linear-gradient(to bottom, #000 58%, transparent);
}

.app-header.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
}

/* Caixa com a proporção real do conteúdo do logo (1090x236),
   recortando a margem transparente do PNG (object-fit: cover) */
.app-logo-wrap {
  display: block;
  height: 34px;
  aspect-ratio: 1090 / 236;
  overflow: hidden;
}

.app-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Botão do menu (canto superior esquerdo) */
.menu-btn {
  position: absolute;
  left: var(--sp-5);
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  cursor: pointer;
  color: var(--on-surface);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.menu-btn:hover {
  border-color: rgba(37, 107, 255, 0.6);
  box-shadow: var(--glow-primary);
}

.menu-btn:active {
  transform: translateY(-50%) scale(0.94);
}

.menu-btn svg {
  width: 22px;
  height: 22px;
}

/* Sino de notificações (canto superior direito) — sem contorno, branco */
.notif-btn {
  position: absolute;
  right: var(--sp-5);
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.18s ease;
}

.notif-btn:active {
  transform: translateY(-50%) scale(0.9);
}

.notif-btn svg {
  width: 24px;
  height: 24px;
}

/* com notificações: o sino balança (mantém a cor branca) */
.notif-btn.has-notif svg {
  transform-origin: 50% 15%;
  animation: bell-ring 2.4s ease-in-out infinite;
}

/* toque único ao receber (versão mais lenta, balanço ao longo de todo o tempo) */
.notif-btn.ring svg {
  animation: bell-ring-slow 2.2s ease-in-out;
}

/* badge: vermelho com número branco */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--error);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(248, 59, 70, 0.7);
  animation: badge-pop 0.3s ease;
}

.notif-badge[hidden] {
  display: none;
}

@keyframes bell-ring {
  0%, 60%, 100% { transform: rotate(0); }
  5% { transform: rotate(12deg); }
  10% { transform: rotate(-10deg); }
  15% { transform: rotate(8deg); }
  20% { transform: rotate(-6deg); }
  25% { transform: rotate(4deg); }
  30% { transform: rotate(0); }
}

/* balanço lento: o sino continua a oscilar durante toda a duração */
@keyframes bell-ring-slow {
  0% { transform: rotate(0); }
  8% { transform: rotate(14deg); }
  20% { transform: rotate(-12deg); }
  32% { transform: rotate(10deg); }
  44% { transform: rotate(-8deg); }
  56% { transform: rotate(6deg); }
  68% { transform: rotate(-4deg); }
  80% { transform: rotate(3deg); }
  92% { transform: rotate(-1deg); }
  100% { transform: rotate(0); }
}

@keyframes badge-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ============ Drawer / menu lateral ============ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(82vw, 330px);
  z-index: 20;
  transform: translateX(-102%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(160deg, rgba(30, 36, 44, 0.94), rgba(13, 16, 20, 0.97));
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 30px 0 60px rgba(0, 0, 0, 0.55);
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 8px 18px;
  cursor: pointer;
}

.drawer-profile .dp-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(to top left, rgba(37, 107, 255, 0.6), rgba(166, 111, 230, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--glow-primary);
  flex: 0 0 auto;
}

.drawer-profile .dp-icon svg {
  width: 26px;
  height: 26px;
}

.drawer-profile .dp-name {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.drawer-divider {
  height: 1px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.1);
}

.drawer-spacer {
  flex: 1 1 auto;
  min-height: 24px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 10px;
  color: var(--on-surface);
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, padding-left 0.2s ease, color 0.18s ease;
}

.drawer-item:hover {
  background: rgba(255, 255, 255, 0.06);
  padding-left: 16px;
}

.drawer-item .chev {
  margin-left: auto;
  font-size: 20px;
  color: var(--on-surface-muted);
}

.drawer-item.danger {
  color: var(--error);
}

.drawer-item.danger:hover {
  background: rgba(248, 59, 70, 0.1);
}

.drawer-socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 4px 2px;
}

.drawer-social {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--on-surface-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    transform 0.18s ease, box-shadow 0.2s ease;
}

.drawer-social:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.drawer-social:active {
  transform: translateY(-2px) scale(0.92);
}

.drawer-social svg {
  width: 22px;
  height: 22px;
}


/* ============ Tela (rolagem) ============ */
.screen {
  position: relative;
  z-index: 1;
  height: 100vh;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--sp-5) 108px;
  scrollbar-width: none;
}

.screen.with-header {
  padding-top: 78px;
}

.screen.screen-onb {
  padding-bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
}

.screen.screen-intro {
  padding: 0;
}

.screen::-webkit-scrollbar {
  display: none;
}

/* ============ Cabeçalho ============ */
.routine-hero {
  position: relative;
  margin: calc(var(--sp-2) * -1) calc(var(--sp-4) * -1) 0;
  height: 230px;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
}

.routine-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.routine-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,17,21,0.16) 0%, rgba(15,17,21,0.92) 100%);
}

.routine-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding: var(--sp-3) var(--sp-4) 0;
}

.routine-hero-content .routine-topbar {
  padding: var(--sp-3) 0 var(--sp-4);
}

.routine-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.routine-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  font-size: 22px;
  color: var(--on-surface);
  cursor: pointer;
  flex: 0 0 auto;
}

.routine-menu {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--on-surface);
  cursor: pointer;
  flex: 0 0 auto;
}

.routine-menu svg {
  width: 20px;
  height: 20px;
}

.routine-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.routine-title {
  font-weight: 700;
  font-size: var(--fs-lg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.routine-subtitle {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0 var(--sp-4);
}

.topbar .back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  font-size: 18px;
  color: var(--on-surface);
  cursor: pointer;
}

.topbar h1 {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.topbar .spacer {
  flex: 1;
}



.screen-subtitle {
  color: var(--on-surface-muted);
  margin: -4px var(--sp-4) var(--sp-2);
}



/* ============ Textos utilitários ============ */
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--on-surface-muted);
}

.title {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.15;
}

.subtitle {
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.muted {
  color: var(--on-surface-muted);
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }

.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }

/* ============ Splash ============ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.splash video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============ Onboarding ============ */
.onb-progress {
  display: flex;
  gap: 6px;
  margin: var(--sp-2) 0 var(--sp-6);
}

.onb-progress > i {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease;
}

.onb-progress > i.on {
  background: linear-gradient(to top left, var(--brand-primary), var(--accent-1));
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.choice {
  padding: var(--sp-4);
  text-align: center;
  transition: all 0.2s ease;
}

.choice img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-3);
}

.choice.active {
  border-color: rgba(37, 107, 255, 0.8);
  box-shadow: var(--glow-primary);
}

/* Slider de altura */
.ruler {
  position: relative;
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-3);
}

.ruler .value {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(to top left, #fff, #bcd2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ruler .unit {
  font-size: var(--fs-lg);
  color: var(--on-surface-muted);
  margin-left: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(to top left, var(--brand-primary), var(--accent-3));
  border: 2px solid #fff;
  box-shadow: var(--glow-primary);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 2px solid #fff;
  cursor: pointer;
}

.refimg {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius-md);
  opacity: 0.9;
}

/* Seletor de data estilo holo (dia / mês / ano) */
.holo-picker {
  --holo-h: 220px;
  --holo-item-h: 44px;
  position: relative;
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  height: var(--holo-h);
  margin: var(--sp-4) 0 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30%, #000 70%, transparent 100%);
}

.holo-col {
  flex: 1 1 0;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: calc((var(--holo-h) - var(--holo-item-h)) / 2) 0;
  text-align: center;
}

.holo-col[data-col="month"] { flex: 1.7 1 0; }
.holo-col::-webkit-scrollbar { display: none; }

.holo-item {
  height: var(--holo-item-h);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  color: var(--on-surface);
  font-size: var(--fs-md);
  font-weight: 600;
  opacity: 0.35;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.holo-item.active {
  opacity: 1;
  transform: scale(1.18);
  font-weight: 800;
}

.holo-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--holo-item-h);
  transform: translateY(-50%);
  border-top: 1px solid rgba(37, 107, 255, 0.7);
  border-bottom: 1px solid rgba(37, 107, 255, 0.7);
  pointer-events: none;
}

/* Boas-vindas (logo + fundo) */
.welcome {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  text-align: center;
}

.welcome-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.welcome-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 9, 12, 0.4) 0%,
    rgba(8, 9, 12, 0.55) 45%,
    rgba(8, 9, 12, 0.9) 100%
  );
}

.welcome-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-6) 0;
}

.welcome-logo {
  width: min(82%, 340px);
  height: auto;
  filter: drop-shadow(0 12px 46px rgba(37, 107, 255, 0.38));
}

.welcome-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Etapa 2 — altura (boneco grande + régua vertical em canvas) */
.onb-root {
  min-height: calc(100vh - var(--sp-5));
}

.onb-actions {
  position: absolute;
  left: var(--sp-5);
  right: var(--sp-5);
  bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.hs-units {
  display: flex;
  width: fit-content;
  margin: calc(var(--sp-3) - var(--sp-4)) auto;
  padding: 4px;
  gap: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hs-unit-btn {
  border: none;
  background: transparent;
  color: var(--on-surface-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hs-unit-btn.active {
  color: #fff;
  background: linear-gradient(to top left, var(--accent-1), var(--brand-primary));
  box-shadow: var(--glow-primary);
}

.hs-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 calc(-1 * var(--sp-5)) 0;
  overflow: hidden;
  cursor: grab;
  outline: none;
  touch-action: none;
  user-select: none;
}

.hs-stage:active {
  cursor: grabbing;
}

.hs-stage:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(37, 107, 255, 0.5);
}

.hs-boneco {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 60%;
  width: auto;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 32px rgba(37, 107, 255, 0.3));
}

.hs-ruler-canvas {
  position: absolute;
  top: 0;
  right: 12px;
  width: 68px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hs-indicator {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-1) 16%,
    var(--brand-primary) 84%,
    transparent
  );
  box-shadow: 0 0 18px rgba(37, 107, 255, 0.55);
}

.hs-readout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(50% + 14px);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  z-index: 4;
  pointer-events: none;
}

.hs-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
  transform-origin: center bottom;
  color: #fff;
  text-shadow: 0 0 26px rgba(37, 107, 255, 0.5);
  background: linear-gradient(to bottom, #ffffff, #bcd2ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hs-unit {
  font-size: var(--fs-lg);
  color: var(--on-surface-muted);
}

/* Etapa 4 — peso (régua horizontal + cartão de IMC) */
.onb-weight {
  padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
}

.ws-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.ws-readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}

.ws-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
  transform-origin: center;
  color: #fff;
  text-shadow: 0 0 26px rgba(37, 107, 255, 0.5);
  background: linear-gradient(to bottom, #ffffff, #bcd2ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ws-unit {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--on-surface-muted);
}

.ws-ruler {
  position: relative;
  height: 68px;
  margin: var(--sp-1) calc(-1 * var(--sp-5)) 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.ws-ruler:active,
.ws-ruler.dragging {
  cursor: grabbing;
}

.ws-ruler:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(37, 107, 255, 0.5);
}

.ws-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ws-indicator {
  position: absolute;
  left: 50%;
  top: 22px;
  height: 34px;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--accent-1), var(--brand-primary));
  box-shadow: 0 0 18px rgba(37, 107, 255, 0.6);
  pointer-events: none;
}

.ws-imc {
  margin-top: 0;
  padding: var(--sp-3) var(--sp-4);
  border-color: color-mix(in srgb, var(--imc, var(--brand-primary)) 42%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--imc, var(--brand-primary)) 16%, transparent),
    rgba(255, 255, 255, 0.03)
  );
}

.ws-imc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.ws-imc-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--on-surface-muted);
}

.ws-imc-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

.ws-imc-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
  color: var(--imc, var(--brand-primary));
  background: color-mix(in srgb, var(--imc, var(--brand-primary)) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--imc, var(--brand-primary)) 45%, transparent);
}

.ws-imc-note {
  margin: var(--sp-2) 0 0;
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

/* Etapa 1 — idioma (carrossel infinito de bandeiras) */
.lang-stage {
  position: relative;
  height: 168px;
  margin: var(--sp-4) calc(-1 * var(--sp-5)) 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.lang-stage.dragging {
  cursor: grabbing;
}

.lang-track {
  position: absolute;
  inset: 0;
}

.lang-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 176px;
  height: 118px;
  transform: translate(-50%, -50%);
  border-radius: 24px;
  background: radial-gradient(
    50% 50% at 50% 50%,
    color-mix(in srgb, var(--brand-primary) 32%, transparent),
    transparent 72%
  );
  filter: blur(7px);
  pointer-events: none;
  z-index: 0;
}

.lang-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  cursor: pointer;
}

.lang-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.lang-item.active img {
  border-color: color-mix(in srgb, var(--brand-primary) 78%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 32%, transparent), var(--glow-primary);
}

.lang-selected {
  margin-top: var(--sp-3);
  text-align: center;
}

.lang-selected .ws-value {
  display: inline-block;
}

/* input date bonito */
input[type="date"] {
  color-scheme: dark;
}

/* ============ Home ============ */
.hero {
  padding: 4px var(--sp-5) 0;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.hero .avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.hero .hello {
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

.hero .name {
  font-size: var(--fs-lg);
  font-weight: 800;
}

.hero .name .wave {
  display: inline-block;
  transform-origin: 72% 72%;
  animation: wave 3s ease-in-out 1;
}

@keyframes wave {
  0% {
    transform: rotate(0deg);
  }
  12% {
    transform: rotate(15deg);
  }
  24% {
    transform: rotate(-6deg);
  }
  36% {
    transform: rotate(13deg);
  }
  48% {
    transform: rotate(-4deg);
  }
  60% {
    transform: rotate(9deg);
  }
  72% {
    transform: rotate(-2deg);
  }
  84% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .name .wave {
    animation: none;
  }
}

/* ---- Card de progresso de cadastro (home) ----
   Flutua sobre os demais componentes, logo abaixo do sino; não entra no
   fluxo da tela, então não empurra o conteúdo. Anel animado com a % das
   informações (anamnese) já preenchidas. */
.home-top {
  position: fixed;
  top: 78px;
  right: max(var(--sp-5), calc((100vw - 760px) / 2 + var(--sp-5)));
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.home-top > * {
  pointer-events: auto;
}

.profile-progress {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2);
  color: var(--on-surface);
  font-family: var(--font-family);
  text-align: left;
  cursor: pointer;
  /* Preenchimento opaco: o card flutua sobre o conteúdo, então não pode
     ser translúcido (evita misturar as informações com o fundo). */
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 60%),
    #262532;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  animation: pp-surge 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

/* surge ao aparecer (mesma estética da saída) */
@keyframes pp-surge {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* transição própria (sobrepõe a do .glass-card.interactive) p/ a saída */
.home-top .profile-progress {
  transition: opacity 0.45s ease, transform 0.45s ease,
    box-shadow 0.18s ease, border-color 0.18s ease;
}

.profile-progress.is-hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
  pointer-events: none;
}

.profile-progress .pp-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.profile-progress .pp-ring svg {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.profile-progress .pp-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 4;
}

.profile-progress .pp-fill {
  fill: none;
  stroke: url(#ppGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: var(--c);
  stroke-dashoffset: var(--c);
  animation: pp-fill 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.profile-progress.is-complete .pp-fill {
  stroke: var(--success);
}

@keyframes pp-fill {
  to {
    stroke-dashoffset: var(--off);
  }
}

.profile-progress .pp-pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: var(--on-surface);
}

.profile-progress .pp-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.12;
}

.profile-progress .pp-title {
  font-size: var(--fs-xs);
  font-weight: 700;
}

.profile-progress .pp-sub {
  font-size: 10px;
  color: var(--on-surface-muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .profile-progress .pp-fill {
    animation: none;
    stroke-dashoffset: var(--off);
  }
}

/* ---- Linha do tempo de datas (estilo date_picker_timeline) ---- */
.date-timeline {
  position: relative;
  margin: 0 calc(-1 * var(--sp-5)) 0;
  padding: 24px 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}

.date-timeline::-webkit-scrollbar {
  display: none;
}

.date-track {
  display: flex;
  gap: 6px;
  width: max-content;
  padding: 0 var(--sp-5);
}

/* efeito de vidro equivalente aos cards (.glass-card) */
.date-cell {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 56px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04) 55%,
    rgba(255, 255, 255, 0.02)
  );
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  color: var(--on-surface);
  font-family: var(--font-family);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.date-cell .dc-month {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--on-surface-muted);
  white-space: nowrap;
}

.date-cell .dc-dow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--on-surface-muted);
}

.date-cell .dc-day {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1;
}

.date-cell:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.20),
    rgba(255, 255, 255, 0.07) 55%,
    rgba(255, 255, 255, 0.03)
  );
  border-color: rgba(255, 255, 255, 0.28);
}

/* data de hoje (selecionada) — preenchida com a cor primária */
.date-cell.selected {
  background: var(--brand-primary);
  border-color: color-mix(in srgb, var(--brand-primary) 55%, white);
  box-shadow: 0 0 14px rgba(37, 107, 255, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.date-cell.selected .dc-month,
.date-cell.selected .dc-dow {
  color: rgba(255, 255, 255, 0.82);
}

.date-cell.selected .dc-day {
  color: #fff;
}

/* dias com treino na rotina: verde quando concluído, vermelho quando não realizado */
.date-cell.is-done {
  border-color: var(--success);
  box-shadow: 0 0 14px rgba(107, 189, 120, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.date-cell.is-missed {
  border-color: var(--error);
  box-shadow: 0 0 14px rgba(248, 59, 70, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.date-cell.selected.is-done {
  border-color: color-mix(in srgb, var(--success) 70%, white);
  box-shadow: 0 0 16px rgba(107, 189, 120, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.stat {
  padding: var(--sp-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat .k {
  font-size: var(--fs-xl);
  font-weight: 800;
}

.stat .l {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

/* treino do dia na home */
.home-today { margin-top: var(--sp-3); }
.home-today-row { display:flex; align-items:center; gap:var(--sp-3); padding:var(--sp-3) var(--sp-4); background:linear-gradient(135deg,rgba(255,255,255,0.14),rgba(255,255,255,0.04) 55%,rgba(255,255,255,0.02)); -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(150%); backdrop-filter:blur(var(--glass-blur)) saturate(150%); border:1px solid rgba(255,255,255,var(--glass-border-opacity)); border-radius:var(--radius-md); box-shadow:var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.10); }
.home-today-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.home-today-label { font-size:var(--fs-xs); color:var(--on-surface-muted); }
.home-today-name { font-weight:700; font-size:var(--fs-md); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.home-today-start { flex:0 0 auto; padding:10px 18px; font-size:var(--fs-sm); }

/* ---- Anel de consumo de água (card redondo de vidro + progresso) ---- */
.stat-water {
  --ring-color: var(--brand-primary);
  --ring-glow: rgba(37, 107, 255, 0.55);
  position: relative;
  padding: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.015));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.water-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.water-ring circle {
  fill: none;
  stroke-width: 7;
}

.water-ring .wr-track {
  stroke: rgba(255, 255, 255, 0.12);
}

.water-ring .wr-fill {
  stroke: var(--ring-color);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--ring-glow));
  transition: stroke-dashoffset 0.6s ease;
}

.ring-cal {
  --ring-color: var(--error);
  --ring-glow: rgba(248, 59, 70, 0.55);
}

.ring-warn {
  --ring-color: var(--warning);
  --ring-glow: rgba(236, 196, 75, 0.55);
}

.ring-ok {
  --ring-color: var(--success);
  --ring-glow: rgba(107, 189, 120, 0.55);
}

.water-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 72%;
  height: 72%;
  border-radius: 50%;
}

.stat-water .k {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.stat-water .w-ico {
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  display: inline-flex;
  width: 13px;
  height: 13px;
  margin-right: 2px;
  color: var(--ring-color);
}

.stat-water .w-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.stat-water .l {
  margin-top: 1px;
  text-transform: none;
  letter-spacing: 0.3px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--sp-6) 0 var(--sp-3);
}

.section-title h2 {
  font-size: var(--fs-md);
  font-weight: 700;
}

.section-title a {
  font-size: var(--fs-sm);
  color: var(--brand-primary);
  text-decoration: none;
  cursor: pointer;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.feature {
  position: relative;
  padding: var(--sp-4);
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature .icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-card);
}

.feature .feature-symbol {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), #5b8dff);
  box-shadow: var(--shadow-card);
}

.feature .feature-symbol svg {
  width: 28px;
  height: 28px;
}

.feature .fname {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-top: var(--sp-3);
}

.feature .fdesc {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  margin-top: 2px;
}

.feature .soon {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--warning);
  border: 1px solid rgba(236, 196, 75, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
}



.feature-personal {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-4);
  min-height: 0;
}

.feature-personal > div:last-child {
  flex: 1;
  min-width: 0;
}

.feature-personal .fname {
  margin-top: 0;
}

.feature-personal .personal-stack {
  display: flex;
  align-items: center;
}

.ps-avatar,
.ps-more {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(23, 26, 31, 0.85);
  box-sizing: border-box;
  flex: 0 0 auto;
}

.ps-avatar {
  margin-left: -16px;
  overflow: hidden;
  background: var(--glass-surface);
}

.ps-avatar:first-child {
  margin-left: 0;
}

.ps-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-more {
  margin-left: -16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-1));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.2px;
  box-shadow: 0 0 14px rgba(37, 107, 255, 0.45);
}

/* ============ Listas (GYM) ============ */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 107, 255, 0.5);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

.list-item .thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(to top left, rgba(37, 107, 255, 0.35), rgba(166, 111, 230, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
}

.list-item .meta {
  flex: 1;
  min-width: 0;
}

.list-item .meta .t {
  font-weight: 700;
  font-size: var(--fs-md);
}

.list-item .meta .s {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  margin-top: 2px;
}

.list-item .chev {
  color: var(--on-surface-muted);
  font-size: 18px;
}

/* linha de exercício do treino: miniatura de vídeo + alça de arrasto */
.we-item {
  gap: var(--sp-3);
  padding-right: var(--sp-2);
}

/* arrastar para a esquerda revela a ação "Remover" */
.we-swipe {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.we-remove {
  position: absolute;
  inset: 0 0 0 auto;
  width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--error);
  color: #fff;
  font: 700 var(--fs-sm) / 1 var(--font-family);
  letter-spacing: 0.2px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.we-swipe.is-open .we-remove,
.we-swipe.is-swiping .we-remove {
  opacity: 1;
  pointer-events: auto;
}

.we-remove:hover {
  filter: brightness(1.06);
}

.we-remove:active {
  filter: brightness(0.92);
}

.we-swipe .we-item {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  transition: transform 0.2s ease;
}

.we-swipe.is-open .we-item {
  transform: translateX(-96px);
}

/* durante a reordenação as linhas precisam sair dos limites do wrapper */
.list.we-dragging .we-swipe {
  overflow: visible;
}

.list.we-dragging .we-remove {
  opacity: 0;
  pointer-events: none;
}

.we-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 70%);
}

.we-thumb.is-empty {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 10px, rgba(255, 255, 255, 0.06) 10px 20px);
}

.we-thumb .lib-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.we-thumb .lib-play {
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.we-thumb .lib-play svg {
  width: 12px;
  height: 12px;
}

.we-grip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  color: var(--on-surface-muted);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.we-grip svg {
  width: 18px;
  height: 18px;
}

/* arrasto em andamento */
.list.we-dragging {
  user-select: none;
}

.list.we-dragging .we-item {
  transition: none;
}

.we-lift {
  position: relative;
  z-index: 3;
  border-color: rgba(37, 107, 255, 0.6);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

/* ============ Rotina de treinos em destaque ============ */
.featured-routine {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.featured-routine .fr-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
  pointer-events: none;
}

.featured-routine .fr-bg-ov {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 17, 21, 0.5) 0%, rgba(15, 17, 21, 0.82) 100%);
}

.featured-routine .fr-top,
.featured-routine .fr-grid {
  position: relative;
  z-index: 1;
}

.featured-routine:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 107, 255, 0.5);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

.featured-routine .fr-top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.featured-routine .fr-ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(to top left, rgba(37, 107, 255, 0.35), rgba(166, 111, 230, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.featured-routine .fr-name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-routine .chev {
  color: var(--on-surface-muted);
  font-size: 18px;
}

.featured-routine .fr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-4);
}

.featured-routine .fr-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.featured-routine .fr-k {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}

.featured-routine .fr-v {
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* ============ Lista de rotinas criadas ============ */
.routine-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.routine-item:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 107, 255, 0.5);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

.routine-item .ri-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px) saturate(0.85);
  opacity: 0.85;
}

.routine-item .ri-bg-ov {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 17, 21, 0.78) 0%, rgba(15, 17, 21, 0.93) 100%);
}

.routine-item .ri-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.routine-item .rt-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.routine-item .rt-name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-md);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-item .rt-badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--success);
  border: 1px solid rgba(107, 189, 120, 0.45);
  background: rgba(107, 189, 120, 0.14);
  padding: 3px 8px;
  border-radius: 999px;
}

.routine-item .ri-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.routine-item .ri-more:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.routine-item .ri-more svg {
  width: 18px;
  height: 18px;
  display: block;
}

.routine-item .ri-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) 0 var(--sp-1);
}

.routine-item .ri-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.routine-item .ri-k {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}

.routine-item .ri-v {
  font-size: var(--fs-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-item .rt-date {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.routine-item .rt-count {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.routine-item .rt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.routine-item .rt-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 999px;
}

.routine-item .ri-photos {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.routine-item .ri-photos:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.routine-item .ri-photos svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block;
}

/* ============ Modal de fotos da rotina (inicial x final) ============ */
.rp-card {
  max-width: 560px;
}

.rp-sub {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--on-surface);
}

.rp-card .subtitle {
  margin: 0;
}

.rp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.rp-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 16px);
  background: rgba(255, 255, 255, 0.06);
}

.rp-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  text-align: center;
}

.rp-shot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-shot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rp-shot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: var(--on-surface-muted);
}

.rp-shot-ico svg {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.8;
}

.rp-shot-txt {
  font-size: var(--fs-xs);
  font-weight: 600;
}

.rp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.rp-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-surface);
  font: 600 var(--fs-xs) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.15s ease;
}

.rp-act:hover {
  background: rgba(255, 255, 255, 0.18);
}

.rp-act.primary {
  border-color: transparent;
  background: linear-gradient(to top left, var(--brand-primary), var(--accent-3));
  color: #fff;
}

.rp-act.danger {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.14);
  color: var(--error);
}

.rp-act svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: block;
}

/* ============ Comparação antes/depois (fotos da rotina) ============ */
.ba-card {
  max-width: 560px;
}

.ba-frame {
  position: relative;
  margin-top: var(--sp-3);
  aspect-ratio: 3 / 4;
  max-height: 58vh;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: ew-resize;
  user-select: none;
}

.ba-frame.dragging {
  cursor: grabbing;
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ba-before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.ba-divider:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.92);
  color: #fff;
}

.ba-handle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ba-label {
  position: absolute;
  bottom: var(--sp-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 17, 21, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.ba-label-l {
  left: var(--sp-2);
}

.ba-label-r {
  right: var(--sp-2);
}

/* botão salvar desativado (sem alterações por guardar) */
.glass-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

/* ============ Card de treino (Detalhes da Rotina) ============ */
.workout-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.workout-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 107, 255, 0.5);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

.workout-card .wc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.workout-card .wc-name {
  font-size: var(--fs-md);
  font-weight: 700;
}

.workout-card .chev {
  color: var(--on-surface-muted);
  font-size: 18px;
  line-height: 1;
}

/* ícone de informação (abre o comentário do treino) */
.workout-card .wc-info {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--on-surface);
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.workout-card .wc-info svg {
  width: 18px;
  height: 18px;
}

.workout-card .wc-info:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.06);
}

.workout-card .wc-info:active {
  transform: scale(0.94);
}

/* grupo dos botões de ícone do card (comentário + menu) */
.workout-card .wc-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* botão kebab (⋮) -> editar / excluir treino */
.workout-card .wc-more {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--on-surface-muted);
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.workout-card .wc-more svg {
  width: 18px;
  height: 18px;
}

.workout-card .wc-more:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-surface);
  transform: scale(1.06);
}

.workout-card .wc-more:active {
  transform: scale(0.94);
}

.workout-card .wc-desc {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.workout-card .wc-days {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.workout-card .wc-day {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  background: var(--c, var(--brand-primary));
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.workout-card .wc-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

/* seta do card (canto inferior direito): › fechado, ⌄ aberto */
.wc-arrow {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-surface-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.wc-arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-surface);
}

.wc-arrow.open {
  transform: rotate(90deg);
}

/* lista de exercícios expandida no card do treino:
   separada por linha em cima e embaixo (como a da aba Evolução) */
.wc-exercises {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--sp-3);
  margin: 0 var(--sp-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wc-exercises[hidden] {
  display: none;
}

/* durante a reordenação as linhas precisam sair dos limites do wrapper */
.wc-exercises.we-dragging .we-swipe {
  overflow: visible;
}

/* "+ Adicionar Exercícios" (treino vazio) */
.wc-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wc-add:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.wc-add svg {
  width: 18px;
  height: 18px;
}

/* ---- Card de treino + aba "Evolução" (um único componente) ----
   A superfície (opaca) fica no wrapper .workout-stack e cobre as duas partes;
   os cards internos são transparentes, sem emenda e sem deixar ver a camada
   de baixo através do topo. */
.workout-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0) 100%),
    #282733;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.workout-stack:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 107, 255, 0.5);
  box-shadow: var(--shadow-card), var(--glow-primary);
}

.workout-stack .workout-card,
.workout-stack .workout-subcard {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.workout-stack .workout-card {
  position: relative;
  z-index: 2;
}

.workout-stack .workout-subcard {
  border-top: 1px solid var(--line);
}

.workout-stack .workout-card:hover,
.workout-stack .workout-subcard:hover {
  transform: none;
  box-shadow: none;
}

.workout-stack .workout-subcard::after {
  display: none;
}

.workout-subcard {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--line);
  color: var(--on-surface);
  transition: background 0.16s ease;
}

.workout-stack .workout-subcard:hover {
  background: rgba(107, 189, 120, 0.10);
}

.workout-subcard .wsc-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--success);
}

.workout-subcard .wsc-ico svg {
  width: 18px;
  height: 18px;
}

.workout-subcard .wsc-label {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.workout-subcard .wsc-chev {
  color: var(--on-surface-muted);
  font-size: 18px;
  line-height: 1;
}

/* ============ Modal central de informação (comentário do treino) ============ */
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.info-modal.open {
  opacity: 1;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.info-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  padding: var(--sp-5);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}

.info-modal.open .info-modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.info-modal-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.info-modal-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent-3);
  background: rgba(66, 116, 234, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.info-modal-ico svg {
  width: 22px;
  height: 22px;
}

.info-modal-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 800;
}

.info-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--on-surface-muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.info-modal-close svg {
  width: 18px;
  height: 18px;
}

.info-modal-close:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.14);
}

.info-modal-text {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--on-surface-muted);
  white-space: pre-line;
}

/* ============ Seletor de exercícios (modal de busca) ============ */
.info-modal-card--tall {
  width: min(94vw, 460px);
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  padding-bottom: var(--sp-4);
  overflow-y: auto;
}

.ep-search {
  margin-top: var(--sp-3);
  flex: 0 0 auto;
}

/* painel de filtros (mesmo componente da Biblioteca: corpo anatômico + equipamentos) */
.ep-filter {
  flex: 0 0 auto;
}

/* seções recolhíveis: cabeçalho clicável com a seta de estado
   (para o lado quando aberta, para baixo quando recolhida) */
.ep-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.ep-sec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--on-surface-muted);
  font: 700 var(--fs-xs) / 1 var(--font-family);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ep-sec-toggle:hover {
  color: var(--on-surface);
}

.ep-arrow {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  transition: transform 0.22s ease;
}

.ep-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* recolhida: seta para baixo (gira +90°) */
.ep-sec-toggle[aria-expanded="false"] .ep-arrow {
  transform: rotate(90deg);
}

.ep-sec-body {
  margin-top: var(--sp-2);
}

.ep-sec-body[hidden] {
  display: none;
}

.ep-clear {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-3);
  font: 600 var(--fs-xs)/1 var(--font-family);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

/* palco anatômico menor dentro do modal */
.ep-anat-stage {
  height: min(30vh, 210px);
  min-height: 150px;
}

/* a lista não rola sozinha: acompanha o rolamento do card, para que —
   mesmo com as seções de músculos/equipamentos abertas — seja possível
   rolar e ver os exercícios que ficam embaixo delas */
.ep-pool {
  flex: 0 0 auto;
  margin-top: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-surface);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.ep-row.active {
  background: rgba(66, 116, 234, 0.16);
  border-color: var(--accent-3);
}

.ep-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ep-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 70%);
}

.ep-thumb.is-empty {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 10px, rgba(255, 255, 255, 0.06) 10px 20px);
}

.ep-thumb .lib-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-thumb .lib-play {
  width: 28px;
  height: 28px;
  opacity: 0.85;
}

.ep-thumb .lib-play:hover {
  background: rgba(37, 107, 255, 0.75);
  opacity: 1;
}

.ep-thumb .lib-play svg {
  width: 13px;
  height: 13px;
}

.ep-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ep-row-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.ep-row-check svg {
  width: 15px;
  height: 15px;
}

.ep-row.active .ep-row-check {
  background: var(--accent-3);
  border-color: var(--accent-3);
  color: #fff;
}

.ep-empty {
  padding: var(--sp-5) 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

/* botões fixos no rodapé do card (acompanham o rolamento da lista) */
.ep-actions {
  position: sticky;
  bottom: calc(-1 * var(--sp-4));
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-3) 0 var(--sp-4);
  flex: 0 0 auto;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(38, 45, 52, 0), #262D34 42%);
}

.ep-actions .glass-button {
  flex: 1;
  padding: 14px 16px;
  pointer-events: auto;
}

/* ============ Modal de criação de treino ============ */
.wm-field {
  display: block;
  margin-top: var(--sp-4);
}

.wm-label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--on-surface-muted);
}

.glass-input.pf-invalid {
  border-radius: var(--radius-md);
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

.wm-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.wm-actions .glass-button {
  flex: 1;
  padding: 14px 16px;
}

.wm-card {
  max-height: 86vh;
  overflow-y: auto;
}

.wm-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-1);
}

.wm-day {
  justify-content: center;
  padding: 9px 0;
  font-size: var(--fs-xs);
}

.wm-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

/* ============ Botão flutuante (criar treino) ============ */
.fab {
  position: fixed;
  right: max(var(--sp-5), calc((100vw - 760px) / 2 + var(--sp-5)));
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  background: linear-gradient(to top left, var(--brand-primary), var(--accent-3));
  color: #fff;
  font: 700 var(--fs-md) / 1 var(--font-family);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--glow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  animation: fab-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary), 0 10px 30px rgba(37, 107, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.fab:active {
  transform: translateY(0) scale(0.96);
}

.fab svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
}

@keyframes fab-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* espaço no fim da lista para o FAB não cobrir o último card */
.list--fab {
  padding-bottom: 64px;
}

/* ============ Personais ============ */
.trainer-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.14);
  flex: 0 0 auto;
  background: var(--glass-surface);
}

.trainer-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.trainer-rating svg {
  width: 14px;
  height: 14px;
  color: var(--warning);
}

.trainer-rating .tr-score {
  color: var(--on-surface);
  font-weight: 700;
}

/* redes sociais do personal (coluna ao lado da seta) */
.trainer-socials {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}

.ts-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ts-btn:hover {
  background: rgba(255, 255, 255, 0.11);
}

.ts-btn:active {
  transform: scale(0.92);
}

.ts-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ts-ig:hover {
  border-color: rgba(214, 41, 118, 0.6);
}

.ts-wa:hover {
  border-color: rgba(37, 211, 102, 0.6);
}

/* ---- busca + filtros ---- */
.search-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 46px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-pill);
}

.search-field .search-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--on-surface-muted);
}

.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--on-surface);
  font-family: inherit;
  font-size: var(--fs-sm);
  outline: none;
}

.search-field input::placeholder {
  color: var(--on-surface-muted);
}

.filter-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.filter-btn svg {
  width: 20px;
  height: 20px;
}

.filter-btn.active {
  color: var(--brand-primary);
  border-color: rgba(37, 107, 255, 0.5);
  background: rgba(37, 107, 255, 0.14);
}

.filter-panel {
  margin-top: var(--sp-3);
  padding: var(--sp-1) var(--sp-2) var(--sp-2);
  border-radius: var(--radius-md);
}

.filter-group + .filter-group {
  border-top: 1px solid var(--line);
}

.filter-group-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3);
  border: none;
  background: none;
  color: var(--on-surface);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.fgh-chev {
  color: var(--on-surface-muted);
  transition: transform 0.2s ease;
}

.filter-group.open .fgh-chev {
  transform: rotate(90deg);
}

.filter-group-body {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-3);
  padding: 0 var(--sp-3) var(--sp-3);
}

.filter-group-body[hidden] {
  display: none;
}

.gender-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 84px;
  padding: var(--sp-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--on-surface-muted);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.gender-opt img {
  width: 48px;
  height: 72px;
  object-fit: contain;
}

.gender-opt.selected {
  border-color: var(--brand-primary);
  color: var(--on-surface);
  background: rgba(37, 107, 255, 0.16);
}

.age-wrap {
  width: 100%;
}

.age-col-head {
  display: flex;
  gap: var(--sp-3);
  padding: 0 var(--sp-1) 2px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--on-surface-muted);
}

.age-col-head span {
  flex: 1 1 0;
  text-align: center;
}

.age-picker {
  --holo-h: 168px;
  --holo-item-h: 40px;
  margin: 0;
}

.filter-foot {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-2);
}

.empty {
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
  padding: var(--sp-6) 0;
}

/* ============ Exercício / vídeo ============ */
.player {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border: 1px solid var(--line);
}

.angle-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
}

.info-row + .info-row {
  margin-top: var(--sp-3);
}

.info-row .label {
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
}

.info-row .val {
  font-weight: 700;
}

.pill-num {
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--brand-primary);
}

/* ============ Barra inferior ============ */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: var(--sp-4);
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 8px;
}

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

/* pílula de seleção (desliza entre os itens) */
.nav-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(to top left, rgba(37, 107, 255, 0.5), rgba(66, 116, 234, 0.22));
  box-shadow: var(--glow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1),
    width 0.4s cubic-bezier(0.34, 1.4, 0.5, 1), opacity 0.25s ease;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--on-surface-muted);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.2s ease;
}

/* todos os ícones com uma única cor (monocromáticos) */
.nav-item .ni-icon {
  display: flex;
  color: var(--on-surface);
  transition: color 0.2s ease;
}

.nav-item .ni-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-item.active {
  color: #fff;
}

.nav-item.active .ni-icon {
  color: #fff;
  animation: navPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes navPop {
  0% { transform: scale(1) translateY(0); }
  45% { transform: scale(1.3) translateY(-4px); }
  100% { transform: scale(1) translateY(0); }
}

/* ============ Placeholder ============ */
.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 60vh;
  padding: var(--sp-8);
  gap: var(--sp-3);
}

.placeholder .big {
  font-size: 54px;
}

/* ============ Animação de entrada de tela ============ */
.fade-in {
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============ Configurações ============ */
.list-item .thumb svg {
  width: 22px;
  height: 22px;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.switch[aria-checked="true"] {
  background: var(--brand-primary);
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.switch[aria-checked="true"] .knob {
  transform: translateX(20px);
}

/* Cartão inferior de idiomas */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.sheet[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease both;
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom));
  background: var(--glass-surface);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  animation: sheetUp 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-grab {
  width: 42px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto var(--sp-3);
}

.sheet-title {
  font-weight: 800;
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-surface);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.lang-option:hover {
  border-color: rgba(37, 107, 255, 0.5);
}

.lang-option.selected {
  border-color: rgba(37, 107, 255, 0.6);
  background: rgba(37, 107, 255, 0.16);
}

.lang-option img {
  width: 30px;
  height: 21px;
  object-fit: cover;
  border-radius: 5px;
  flex: 0 0 auto;
}

.lang-option .lo-name {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.lang-option .lo-check {
  color: var(--brand-primary);
  font-weight: 800;
}

.settings-divider {
  height: 1px;
  background: var(--line);
  margin: var(--sp-6) 0 var(--sp-5);
}

.confirm-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.confirm-actions .glass-button {
  flex: 1;
}

/* ---- Ações do treino (bottom-sheet) ---- */
.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.sheet-action {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--on-surface);
  font: 600 var(--fs-md) / 1 var(--font-family);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.sheet-action svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--on-surface-muted);
}

.sheet-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(37, 107, 255, 0.5);
}

.sheet-action:active {
  transform: scale(0.98);
}

.sheet-action.danger {
  color: var(--error);
}

.sheet-action.danger svg {
  color: var(--error);
}

.sheet-action.danger:hover {
  border-color: var(--error);
  background: rgba(240, 64, 64, 0.1);
}

/* ============ Login ============ */
.login {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-2);
}

.login-lang {
  align-self: flex-end;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
  border-radius: 6px;
}

.login-lang img {
  width: 34px;
  height: 24px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.login-lang:hover img {
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.login-logo {
  width: 88px;
  height: auto;
  margin-bottom: var(--sp-1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.login-field {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 2px 14px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04) 55%,
    rgba(255, 255, 255, 0.02)
  );
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-field:focus-within {
  border-color: rgba(37, 107, 255, 0.7);
  box-shadow: var(--glow-primary);
}

.login-field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--on-surface);
  font: 500 var(--fs-md) / 1.2 var(--font-family);
  padding: 13px 0;
}

.login-field input::placeholder {
  color: var(--on-surface-muted);
}

.login-field .lf-ico {
  color: var(--on-surface-muted);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.login-field .lf-ico svg {
  width: 20px;
  height: 20px;
}

.lf-toggle {
  background: none;
  border: none;
  color: var(--on-surface-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.lf-toggle:hover {
  color: var(--on-surface);
}

.lf-toggle svg {
  width: 20px;
  height: 20px;
}

.login-forgot {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--brand-primary);
  font: 600 var(--fs-xs) / 1 var(--font-family);
  cursor: pointer;
  padding: 0;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-or {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--on-surface-muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.login-or::before,
.login-or::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.login-socials {
  display: flex;
  gap: var(--sp-3);
}

.login-social-btn {
  flex: 1;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.16s ease, background 0.16s ease;
}

.login-social-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
}

.login-social-btn:active {
  transform: scale(0.98);
}

.login-social-btn svg {
  width: 22px;
  height: 22px;
}

.login-social-btn.is-apple svg {
  width: 25px;
  height: 25px;
}

.login-signup {
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
}

.login-signup button {
  background: none;
  border: none;
  color: var(--brand-primary);
  font: 700 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  padding: 0;
}

.login-signup button:hover {
  text-decoration: underline;
}

/* ---- Login: biometria ---- */
.login-bio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.login-bio-btn {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(37, 107, 255, 0.45);
  background: radial-gradient(circle at 50% 35%, rgba(37, 107, 255, 0.28), rgba(37, 107, 255, 0.08));
  color: var(--on-surface);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-bio-btn:hover {
  border-color: rgba(37, 107, 255, 0.85);
  box-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

.login-bio-btn:active {
  transform: scale(0.97);
}

.login-bio-btn svg {
  width: 30px;
  height: 30px;
}

.login-bio-label {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

/* ============ Criar conta ============ */
.signup {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.signup-back {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.signup-back:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.signup-back svg {
  width: 22px;
  height: 22px;
}

.signup-terms {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
  line-height: 1.4;
}

.signup-terms input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.signup-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.signup-check svg {
  width: 15px;
  height: 15px;
}

.signup-terms input:checked + .signup-check {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: var(--glow-primary);
}

.signup-terms input:focus-visible + .signup-check {
  border-color: rgba(37, 107, 255, 0.75);
  box-shadow: var(--glow-primary);
}

.signup-terms-text {
  padding-top: 1px;
}

.signup-terms-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.signup-terms-link:hover {
  text-decoration: underline;
}

/* ---- Criar conta: animações ---- */
.signup .signup-back,
.signup .login-brand,
.signup .login-signup {
  animation: signupRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signup .signup-back {
  animation-delay: 0.03s;
}

.signup .login-brand {
  animation-delay: 0.09s;
}

.signup .login-signup {
  animation-delay: 0.55s;
}

.signup-form > * {
  animation: signupRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signup-form > *:nth-child(1) { animation-delay: 0.14s; }
.signup-form > *:nth-child(2) { animation-delay: 0.19s; }
.signup-form > *:nth-child(3) { animation-delay: 0.24s; }
.signup-form > *:nth-child(4) { animation-delay: 0.29s; }
.signup-form > *:nth-child(5) { animation-delay: 0.34s; }
.signup-form > *:nth-child(6) { animation-delay: 0.39s; }
.signup-form > *:nth-child(7) { animation-delay: 0.45s; }
.signup-form > *:nth-child(8) { animation-delay: 0.51s; }

@keyframes signupRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signup .login-field {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.signup .login-field:focus-within {
  transform: translateY(-1px);
}

/* shake quando o envio falha na validação */
.signup-form.signup-shake {
  animation: signupShake 0.42s ease;
}

@keyframes signupShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* botão de envio: rótulo -> spinner -> check */
.signup-submit {
  position: relative;
}

.signup-submit:active {
  transform: scale(0.99);
}

.signup-submit .ss-label {
  display: inline-block;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.signup-submit .ss-spinner,
.signup-submit .ss-check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.signup-submit .ss-spinner {
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.signup-submit .ss-check svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.signup-submit.is-loading .ss-label,
.signup-submit.is-success .ss-label {
  opacity: 0;
  transform: translateY(-4px);
}

.signup-submit.is-loading .ss-spinner {
  opacity: 1;
  transform: scale(1);
  animation: ssSpin 0.7s linear infinite;
}

.signup-submit.is-success .ss-check {
  opacity: 1;
  transform: scale(1);
}

.signup-submit.is-success {
  box-shadow: var(--glow-primary);
}

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

/* check do termo com "pop" ao marcar */
.signup-terms input:checked + .signup-check {
  animation: checkPop 0.34s cubic-bezier(0.22, 1.4, 0.5, 1);
}

@keyframes checkPop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ============ GYM: seleção de músculos (boneco) ============ */
.gym-pick {
  display: flex;
  flex-direction: column;
}

.gym-viewtabs {
  display: inline-flex;
  align-self: center;
  gap: 4px;
  margin: var(--sp-4) 0 var(--sp-2);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  background: rgba(255, 255, 255, 0.05);
}

.gym-viewtab {
  border: none;
  background: none;
  color: var(--on-surface-muted);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.gym-viewtab.active {
  color: #fff;
  background: var(--brand-primary);
  box-shadow: var(--glow-primary);
}

/* alternância Grupo / Sub-músculo */
.gym-modeseg {
  display: inline-flex;
  align-self: center;
  gap: 4px;
  margin: 0 0 var(--sp-2);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
  background: rgba(255, 255, 255, 0.04);
}

.gym-modebtn {
  border: none;
  background: none;
  color: var(--on-surface-muted);
  font: 600 var(--fs-xs) / 1 var(--font-family);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.gym-modebtn.active {
  color: #fff;
  background: rgba(37, 107, 255, 0.85);
  box-shadow: var(--glow-primary);
}

/* Boneco anatômico (flutter_muscle_anatomy) — estilo da documentação:
   corpo branco, traço preto, músculo destacado com cor + opacidade */
.anat-stage {
  --anat-body: #ffffff;
  --anat-stroke: #000000;
  --anat-stroke-w: 0.1;          /* MuscleDecoration.strokeWidth padrão */
  --anat-hl: var(--error);       /* vermelho da paleta #F83B46 */
  --anat-hl-glow: rgba(248, 59, 70, 0.55);
  --anat-hl-opacity: 0.34;
  --anat-hl-opacity-peak: 0.44;
  --anat-hover: rgba(248, 59, 70, 0.14);
  --anat-hair: #9e9e9e;          /* Colors.grey (cabelo feminino padrão) */
  position: relative;
  height: min(62vh, 540px);
  min-height: 360px;
  margin-top: var(--sp-2);
  overflow: hidden;
  border-radius: var(--radius-md);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.anat-canvas {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.anat-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.anat-canvas[data-view="front"] .anat-svg[data-view="back"],
.anat-canvas[data-view="back"] .anat-svg[data-view="front"] {
  display: none;
}

.anat-outline {
  fill: var(--anat-body);
  stroke: var(--anat-stroke);
  stroke-width: var(--anat-stroke-w);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.anat-line {
  fill: none;
  stroke: var(--anat-stroke);
  stroke-width: var(--anat-stroke-w);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.anat-muscle {
  fill: var(--anat-body);
  fill-opacity: 0;
  stroke: var(--anat-stroke);
  stroke-width: var(--anat-stroke-w);
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: stroke fill;      /* _AnatomyPainter: traço, depois preenchimento */
  pointer-events: all;
  cursor: pointer;
  transition: fill 0.16s ease, fill-opacity 0.16s ease;
}

.anat-muscle.hover {
  fill: var(--anat-hover);
  fill-opacity: 1;
}

/* selecionado: vermelho fluorescente (preenchimento + brilho pulsante) */
.anat-muscle.selected {
  fill: var(--anat-hl);
  fill-opacity: var(--anat-hl-opacity);
  stroke: var(--anat-hl-glow);
  animation: anatGlowPulse 2.4s ease-in-out infinite;
}

.anat-svg[data-view="front"] .anat-muscle.selected {
  filter: url(#anatGlow-front);
}

.anat-svg[data-view="back"] .anat-muscle.selected {
  filter: url(#anatGlow-back);
}

/* sub-músculo selecionado (azul, distinto do vermelho do grupo) */
.anat-muscle.sub-selected {
  fill: var(--brand-primary);
  fill-opacity: 0.42;
  stroke: rgba(91, 157, 255, 0.85);
  animation: none;
}

@keyframes anatGlowPulse {
  0%, 100% { fill-opacity: var(--anat-hl-opacity); }
  50% { fill-opacity: var(--anat-hl-opacity-peak); }
}

/* versão fotográfica (masculino): a foto é o corpo; só os músculos são desenhados */
.anat-photo-img {
  pointer-events: none;
}

.anat-photo .anat-muscle {
  fill: #ffffff;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.anat-photo .anat-muscle.hover {
  fill: var(--anat-hover);
  stroke: rgba(255, 120, 128, 0.6);
}

.anat-photo .anat-muscle.selected {
  fill: var(--anat-hl);
  stroke: var(--anat-hl-glow);
  stroke-width: 1;
}

.anat-photo .anat-muscle.sub-selected {
  fill: #5b9dff;
  stroke: rgba(120, 180, 255, 0.95);
  stroke-width: 1;
}

@media (prefers-reduced-motion: reduce) {
  .anat-muscle.selected {
    animation: none;
  }
}

.anat-hair {
  fill: var(--anat-hair);
  stroke: var(--anat-stroke);
  stroke-width: var(--anat-stroke-w);
  pointer-events: none;
}

.anat-stage.is-zoomed {
  cursor: grab;
}

.anat-stage.is-zoomed:active {
  cursor: grabbing;
}

/* botões (zoom +/−, virar) — alinhados à direita como no MuscleInteractiveView */
.anat-controls {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.anat-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(38, 45, 52, 0.72);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease;
}

.anat-btn:hover {
  background: rgba(37, 107, 255, 0.35);
}

.anat-btn:active {
  transform: scale(0.92);
}

.anat-btn svg {
  width: 20px;
  height: 20px;
}

/* nome do músculo tocado */
.anat-toast {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -8px);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--error);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 0 24px rgba(248, 59, 70, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 3;
}

.anat-toast.off {
  background: rgba(38, 45, 52, 0.92);
  box-shadow: none;
}

.anat-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gym-selected {
  margin-top: var(--sp-4);
  min-height: 28px;
}

.gym-none {
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
}

.gym-count {
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--sp-2);
}

.gym-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
}

.gym-chip .x {
  opacity: 0.7;
  font-weight: 700;
}

.gym-cta {
  position: sticky;
  bottom: 0;
  margin-top: var(--sp-4);
  padding: var(--sp-3) 0 calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
  z-index: 2;
}

/* ============ GYM: editor da marcação muscular ============ */
.gym-selected.hidden,
.gym-cta.hidden,
.anat-hint.hidden {
  display: none !important;
}

/* em edição, todos os grupos aparecem no estilo padrão do componente
   (preenchimento de destaque + contorno) para conferir o encaixe */
.anat-stage.is-editing .anat-photo .anat-muscle {
  fill: var(--anat-hl);
  fill-opacity: 0.16;
  stroke: var(--anat-hl-glow);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}

.anat-stage.is-editing .anat-muscle {
  cursor: default;
}

.anat-hint {
  margin-top: var(--sp-2);
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-xs);
  line-height: 1.4;
}

.anat-edit-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.anat-editbox {
  position: absolute;
  border: 1.5px dashed rgba(248, 59, 70, 0.92);
  border-radius: 6px;
  background: rgba(248, 59, 70, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: move;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.anat-editname {
  position: absolute;
  top: 2px;
  left: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.anat-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  touch-action: none;
}

.anat-handle.sc {
  right: 2px;
  bottom: 2px;
  cursor: nwse-resize;
}

.anat-handle.rot {
  right: 2px;
  top: 2px;
  cursor: grab;
  background: var(--brand-primary);
}

.anat-handle.hz {
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
  background: #fff;
  border-color: var(--accent-3, var(--brand-primary));
}

.anat-handle.vt {
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  cursor: ns-resize;
  background: #fff;
  border-color: var(--accent-3, var(--brand-primary));
}

/* grupo escolhido para edição: destaque mais forte */
.anat-stage.is-editing .anat-group.is-picked .anat-muscle {
  fill-opacity: 0.34;
  stroke: var(--anat-hl);
  stroke-width: 0.9;
}

.gym-editbar {
  margin-top: var(--sp-3);
}

.edit-marking {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.edit-marking svg {
  width: 18px;
  height: 18px;
}

.gym-editbar .edit-marking-row {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.gym-editbar .edit-marking-row .glass-button {
  flex: 1;
}

/* ============ GYM: seleção de equipamentos ============ */
.equip-toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.equip-allbtn {
  gap: var(--sp-2);
}

.equip-allimg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.equip-count {
  margin-left: auto;
  padding-right: 2px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--on-surface-muted);
  white-space: nowrap;
}

.equip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.equip-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) var(--sp-4);
  text-align: center;
  min-height: 44px;
}

.equip-fig {
  width: 100%;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 70%);
}

.equip-img {
  max-width: 86%;
  max-height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
  pointer-events: none;
}

.equip-chip.interactive:hover .equip-img {
  transform: scale(1.05);
}

.equip-ico {
  color: var(--on-surface);
}

.equip-ico svg {
  width: 46px;
  height: 46px;
}

.equip-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.equip-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  color: #fff;
  background: var(--brand-primary);
  box-shadow: var(--glow-primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.equip-chip.selected {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-card), 0 0 22px rgba(255, 255, 255, 0.28);
}

.equip-chip.selected .equip-fig {
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 72%);
}

.equip-chip.selected .equip-check {
  opacity: 1;
  transform: scale(1);
  background: #fff;
  color: #1b2436;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}

.equip-allbtn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(to top left, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16));
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.28);
}

.equip-chip:focus-visible,
.equip-allbtn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

@media (min-width: 560px) {
  .equip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============ Telas de introdução (imagem / vídeo de fundo) ============ */
.intro-slide {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.intro-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 12, 18, 0.92) 0%,
    rgba(8, 12, 18, 0.35) 45%,
    rgba(8, 12, 18, 0.55) 100%
  );
}

.intro-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  max-width: 760px;
  margin: 0 auto;
}

.intro-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.intro-text .title {
  font-size: var(--fs-2xl);
}

.intro-text .subtitle {
  color: rgba(241, 244, 248, 0.82);
}

/* =========================================================
   EDITAR PERFIL
   ========================================================= */
.pf {
  padding-bottom: var(--sp-5);
}

/* seção "Dados do corpo" — acordeões no padrão do filtro de Personais */
.pf-body-panel .filter-group-head {
  font-size: var(--fs-md);
  font-weight: 700;
  gap: var(--sp-3);
}

.pf-body-panel .filter-group-head > span:first-child {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-group-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

.pf-group-val {
  color: var(--on-surface-muted);
  font-weight: 600;
  font-size: var(--fs-sm);
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.filter-group.open .pf-group-val {
  color: var(--brand-primary);
}

.pf-body-panel .filter-group-body {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 var(--sp-3) var(--sp-4);
}

/* gênero — mesmo componente do filtro de Personais, lado a lado e centralizado */
.gender-opts {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
  width: 100%;
}

.gender-opts .gender-opt {
  flex: 0 0 auto;
}

/* bonecos de gênero maiores */
.pf-body-panel .gender-opt {
  width: 108px;
  padding: var(--sp-3);
}

.pf-body-panel .gender-opt img {
  width: 68px;
  height: 102px;
}

/* remove anéis de foco nos componentes do painel */
.pf-body-panel .filter-group-head:focus,
.pf-body-panel .gender-opt:focus,
.pf-body-panel .filter-group-head:focus-visible,
.pf-body-panel .gender-opt:focus-visible {
  outline: none;
  box-shadow: none;
}

/* altura — sem contorno, responsivo e grande o bastante p/ toda a faixa */
.pf-body-panel .hs-stage {
  flex: none;
  margin: 0;
  width: 100%;
  height: max(480px, min(88vh, 600px));
}

.pf-body-panel .hs-stage:focus-visible {
  box-shadow: none;
  outline: none;
}

/* peso — mais espaço para a régua inteira */
.pf-body-panel .ws-ruler {
  height: 130px;
  margin: var(--sp-2) 0 0;
  border: none;
  background: none;
  padding: 0 var(--sp-4);
}

.pf-body-panel .ws-ruler .ws-readout {
  margin-top: var(--sp-3);
}

.pf-body-panel .ws-ruler:focus-visible {
  box-shadow: none;
  outline: none;
}

/* nascimento — colunas iguais ocupando todo o componente */
.pf-body-panel .pf-birth-picker {
  width: 100%;
  margin: 0 calc(-1 * var(--sp-3));
  padding: 0 var(--sp-2);
  -webkit-mask-image: none;
  mask-image: none;
}

.pf-body-panel .holo-col {
  flex: 1 1 0;
}

/* campos de texto no padrão Criar conta */
.pf-fields {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.pf-fields .login-field {
  background: rgba(38, 45, 52, 0.55);
}

.pf-invalid {
  outline: 1px solid var(--error);
  border-radius: 4px;
}

.pf-save {
  margin-top: var(--sp-5);
}

.pf-save .ss-check {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.pf-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}

.pf-avatar {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 0;
  overflow: visible;
  display: grid;
  place-items: center;
}

.pf-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.pf-avatar-cam {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--bg, #12161b);
  background: var(--brand-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--glow-primary);
}

.pf-avatar-cam svg {
  width: 22px;
  height: 22px;
}

/* campos dentro do padrão de lista da tela de Configurações */
.pf .list-item .meta .s {
  position: relative;
  color: var(--on-surface);
  font-size: var(--fs-md);
  margin-top: 4px;
  display: block;
}

.pf .list-item .meta .s .glass-input {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--on-surface);
  font-size: var(--fs-md);
  width: 100%;
}

.pf .list-item .meta .s .glass-input:focus {
  box-shadow: none;
  outline: none;
}

.pf-prefix {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--on-surface-muted);
  font-size: var(--fs-md);
  pointer-events: none;
}

.pf .list-item .meta .s .glass-input#pf_instagram {
  padding-left: 14px;
}

.pf-num {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pf-unit {
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
}

.pf-gender {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.pf-gbtn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface-muted);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: all 0.16s ease;
}

.pf-gbtn.active {
  background: var(--brand-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-primary);
}

.pf-invalid {
  outline: 1px solid var(--error);
  border-radius: 4px;
}

.pf-save {
  margin-top: var(--sp-5);
}

.pf-save .ss-check {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

/* =========================================================
   EDITOR DE IMAGEM (pro_image_editor)
   ========================================================= */
.imgedit {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: #0a0c0f;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.imgedit.open {
  transform: translateY(0);
}

.imgedit-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: calc(var(--sp-3) + env(safe-area-inset-top, 0px)) var(--sp-3) var(--sp-3);
  background: rgba(23, 26, 31, 0.9);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ie-title {
  flex: 1;
  font-weight: 700;
  font-size: var(--fs-md);
}

.ie-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ie-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.ie-ico:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ie-ico:disabled {
  opacity: 0.3;
  cursor: default;
}

.ie-ico svg {
  width: 22px;
  height: 22px;
}

.ie-done {
  margin-left: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  font: 700 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  box-shadow: var(--glow-primary);
}

.imgedit-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(37, 107, 255, 0.06), transparent 60%),
    #0a0c0f;
}

.ie-canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transform-origin: 0 0;
  will-change: transform;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.ie-zoombar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 4;
}

.ie-zbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(38, 45, 52, 0.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ie-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: var(--fs-sm);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 4;
}

.ie-hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* camada de corte */
.ie-crop {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.ie-crop-box {
  position: absolute;
  pointer-events: auto;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  outline: 1.5px solid rgba(255, 255, 255, 0.9);
  cursor: move;
}

.ie-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
  background-position: -1px -1px;
}

.ie-h {
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 2;
}

.ie-h::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.ie-h[data-h="nw"] { top: -11px; left: -11px; cursor: nwse-resize; }
.ie-h[data-h="ne"] { top: -11px; right: -11px; cursor: nesw-resize; }
.ie-h[data-h="sw"] { bottom: -11px; left: -11px; cursor: nesw-resize; }
.ie-h[data-h="se"] { bottom: -11px; right: -11px; cursor: nwse-resize; }
.ie-h[data-h="n"] { top: -11px; left: 50%; margin-left: -11px; width: 30px; height: 16px; cursor: ns-resize; }
.ie-h[data-h="s"] { bottom: -11px; left: 50%; margin-left: -11px; width: 30px; height: 16px; cursor: ns-resize; }
.ie-h[data-h="w"] { left: -11px; top: 50%; margin-top: -11px; width: 16px; height: 30px; cursor: ew-resize; }
.ie-h[data-h="e"] { right: -11px; top: 50%; margin-top: -11px; width: 16px; height: 30px; cursor: ew-resize; }

.ie-h[data-h="n"]::after, .ie-h[data-h="s"]::after,
.ie-h[data-h="w"]::after, .ie-h[data-h="e"]::after {
  inset: 7px 9px;
}

.ie-guides .ie-gide {
  position: absolute;
  background: rgba(37, 107, 255, 0.9);
}

/* caixa da camada selecionada */
.ie-layer-box {
  position: absolute;
  border: 1.5px dashed rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
}

/* painel inferior */
.imgedit-panel {
  padding: var(--sp-3) var(--sp-4) var(--sp-3);
  background: rgba(23, 26, 31, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 96px;
  max-height: 42vh;
  overflow-y: auto;
}

.imgedit-tabs {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 18, 22, 0.98);
}

.ie-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.ie-tab.active {
  color: var(--brand-primary);
  background: rgba(37, 107, 255, 0.1);
}

.ie-tab-ico svg,
.ie-tab-ico {
  width: 22px;
  height: 22px;
}

.ie-tab-lb {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* controles do painel */
.ie-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.ie-btn {
  flex: 1;
  min-width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 11px / 1 var(--font-family);
  cursor: pointer;
}

.ie-btn svg {
  width: 20px;
  height: 20px;
}

.ie-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ie-primary {
  width: 100%;
  margin-top: var(--sp-2);
  padding: 12px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  font: 700 var(--fs-md) / 1 var(--font-family);
  cursor: pointer;
  box-shadow: var(--glow-primary);
}

.ie-primary.ie-mini {
  width: auto;
  margin: 0;
  padding: 11px 18px;
  white-space: nowrap;
}

.ie-chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
}

.ie-chip.active {
  background: var(--brand-primary);
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.ie-aspects {
  margin-bottom: var(--sp-2);
}

.ie-slider {
  margin-top: var(--sp-3);
}

.ie-slider-top {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ie-slider-val {
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
}

.ie-slider input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.ie-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.ie-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.ie-filters {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: 4px;
}

.ie-filter {
  flex: none;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  white-space: nowrap;
}

.ie-filter.active {
  background: var(--brand-primary);
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.ie-tools {
  margin-bottom: var(--sp-2);
}

.ie-tool {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 11px / 1 var(--font-family);
  cursor: pointer;
}

.ie-tool svg {
  width: 20px;
  height: 20px;
}

.ie-tool.active {
  border-color: transparent;
  background: rgba(37, 107, 255, 0.9);
}

.ie-palette {
  gap: 10px;
}

.ie-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
}

.ie-swatch.active {
  border-color: #fff;
  transform: scale(1.12);
}

.ie-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: var(--fs-md) / 1.2 var(--font-family);
}

.ie-input:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.ie-stick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: var(--sp-2);
}

.ie-sticker {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.ie-sticker:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ie-sticker img {
  width: 60%;
  height: 60%;
}

.ie-emojis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 4px;
}

.ie-emoji {
  aspect-ratio: 1;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.ie-emoji:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============ Tela de IA (assistente / chat) ============ */
.ia {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 108px);
  height: calc(100dvh - 108px);
  min-height: 0;
}

.ia-topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 2px var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.ia-avatar,
.ia-msg-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-1));
  box-shadow: var(--glow-primary);
  flex-shrink: 0;
}

.ia-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  animation: iaPulse 3.6s ease-in-out infinite;
}

.ia-avatar svg {
  width: 22px;
  height: 22px;
}

.ia-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-self: flex-end;
}

.ia-msg-avatar svg {
  width: 15px;
  height: 15px;
}

.ia-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ia-name {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--on-surface);
}

.ia-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
}

.ia-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.ia-new {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.ia-new svg {
  width: 20px;
  height: 20px;
}

.ia-new:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ia-new:active {
  transform: scale(0.94);
}

.ia-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) 2px;
  scrollbar-width: none;
}

.ia-thread::-webkit-scrollbar {
  display: none;
}

.ia-msg {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  max-width: 90%;
  animation: iaIn 0.24s ease both;
}

.ia-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ia-msg.assistant {
  align-self: flex-start;
}

.ia-bubble {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--on-surface);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ia-msg.assistant .ia-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.ia-msg.user .ia-bubble {
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-3));
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 6px 18px rgba(37, 107, 255, 0.30);
}

/* indicador "digitando" */
.ia-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px;
}

.ia-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--on-surface-muted);
  opacity: 0.5;
  animation: iaBlink 1.2s ease-in-out infinite;
}

.ia-typing span:nth-child(2) {
  animation-delay: 0.18s;
}

.ia-typing span:nth-child(3) {
  animation-delay: 0.36s;
}

/* chips de sugestão */
.ia-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-2) 2px var(--sp-3);
}

.ia-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 107, 255, 0.42);
  background: rgba(37, 107, 255, 0.12);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ia-chip svg {
  width: 15px;
  height: 15px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.ia-chip:hover {
  background: rgba(37, 107, 255, 0.22);
  border-color: var(--brand-primary);
}

.ia-chip:active {
  transform: scale(0.97);
}

/* composer */
.ia-composer {
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.ia-field {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-lg);
}

.ia-input {
  flex: 1;
  min-width: 0;
  max-height: 140px;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--on-surface);
  font: var(--fs-md) / 1.4 var(--font-family);
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
}

.ia-input::-webkit-scrollbar {
  display: none;
}

.ia-input:focus {
  outline: none;
}

.ia-input::placeholder {
  color: var(--on-surface-muted);
}

.ia-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-1));
  color: #fff;
  cursor: pointer;
  box-shadow: var(--glow-primary);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.ia-send svg {
  width: 20px;
  height: 20px;
}

.ia-send:active {
  transform: scale(0.94);
}

.ia-send:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.ia-disclaimer {
  margin: var(--sp-2) 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: var(--on-surface-muted);
  opacity: 0.75;
}

@keyframes iaIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes iaBlink {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes iaPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 107, 255, 0.35), var(--glow-primary);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 107, 255, 0), var(--glow-primary);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ia-avatar,
  .ia-typing span,
  .ia-msg {
    animation: none;
  }
}

/* =========================================================
   IA — atalhos (foto/galeria/anamnese), cartões e plano
   ========================================================= */

.ia-quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.ia-quickbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ia-quickbtn svg {
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.ia-quickbtn:hover {
  background: rgba(37, 107, 255, 0.18);
  border-color: rgba(37, 107, 255, 0.6);
}

.ia-quickbtn:active {
  transform: scale(0.97);
}

/* foto enviada */
.ia-bubble-photo {
  padding: 6px;
  overflow: hidden;
}

.ia-bubble-photo img {
  display: block;
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius-sm);
}

.ia-photo-cap {
  padding: 6px 4px 2px;
  font-size: var(--fs-sm);
}

/* cartões dentro do chat */
.ia-card {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}

.ia-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.ia-card-ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 107, 255, 0.16);
  color: var(--brand-primary);
}

.ia-card-ico svg {
  width: 18px;
  height: 18px;
}

.ia-card-title {
  font: 700 var(--fs-md) / 1.2 var(--font-family);
  color: var(--on-surface);
}

.ia-card-sub {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  margin-top: 2px;
}

.ia-card-note {
  margin: var(--sp-2) 0 var(--sp-3);
  font-size: 11px;
  line-height: 1.4;
  color: var(--on-surface-muted);
  opacity: 0.8;
}

.ia-card-btn {
  margin-top: var(--sp-3);
}

.ia-card-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* chips de equipamentos reconhecidos */
.ia-eqchips,
.body-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.ia-eqchip {
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ia-eqchip.active {
  background: rgba(37, 107, 255, 0.22);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px rgba(37, 107, 255, 0.5);
}

.ia-eqchip:active {
  transform: scale(0.97);
}

/* plano de treino */
.ia-plan-days {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.ia-plan-day {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.ia-plan-dayname {
  font: 700 var(--fs-sm) / 1.2 var(--font-family);
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.ia-plan-groups,
.ia-plan-equips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ia-plan-equips {
  margin-top: 6px;
}

.ia-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(37, 107, 255, 0.16);
  color: var(--on-surface);
  font: 600 12px / 1.3 var(--font-family);
}

.ia-tag.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-surface-muted);
}

/* =========================================================
   Anamnese — formulário compartilhado (onboarding/IA/Corpo)
   ========================================================= */

.an-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.an-field-title {
  font: 700 var(--fs-md) / 1.25 var(--font-family);
  color: var(--on-surface);
}

.an-field-sub {
  margin: 4px 0 var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

.an-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.an-chip {
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface);
  font: 600 var(--fs-sm) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.an-chip.active {
  background: rgba(37, 107, 255, 0.22);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 1px rgba(37, 107, 255, 0.5);
}

.an-chip:active {
  transform: scale(0.97);
}

/* resumo (tela Corpo) */
.an-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--sp-3);
}

.an-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.an-summary-label {
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

.an-summary-value {
  font: 600 var(--fs-md) / 1.2 var(--font-family);
  color: var(--on-surface);
  text-align: right;
}

.an-summary-row.is-empty .an-summary-value {
  color: var(--on-surface-muted);
  opacity: 0.7;
  font-weight: 500;
}

.an-warn {
  margin: 0 0 var(--sp-3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(37, 107, 255, 0.10);
  border: 1px solid rgba(37, 107, 255, 0.28);
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--on-surface);
}

/* =========================================================
   Tela Corpo
   ========================================================= */

.body-card {
  padding: var(--sp-4);
}

.body-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.body-card-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 107, 255, 0.16);
  color: var(--brand-primary);
}

.body-card-ico svg {
  width: 19px;
  height: 19px;
}

.body-card-title {
  font: 700 var(--fs-md) / 1.2 var(--font-family);
  color: var(--on-surface);
}

.body-card-sub {
  font-size: var(--fs-xs);
  color: var(--on-surface-muted);
  margin-top: 2px;
}

.body-empty {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

.body-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* =========================================================
   BIBLIOTECA DE EXERCÍCIOS
   ========================================================= */
.lib-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.lib-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px var(--sp-4);
  margin-top: var(--sp-3);
  cursor: text;
}

.lib-search > svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--on-surface-muted);
}

.lib-search input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--on-surface);
  font: 500 var(--fs-sm)/1.3 var(--font-family);
  -webkit-appearance: none;
  appearance: none;
}

.lib-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.lib-search input::placeholder {
  color: var(--on-surface-muted);
}

.lib-filterbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lib-filterbtn svg {
  width: 17px;
  height: 17px;
}

.lib-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.lib-clear {
  margin-left: auto;
}

.lib-active {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--sp-3);
}

.lib-active:empty {
  display: none;
}

.lib-ac {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 107, 255, 0.4);
  border-radius: var(--radius-pill);
  background: rgba(37, 107, 255, 0.14);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}

.lib-ac.lib-ac-eq {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.lib-ac .x {
  opacity: 0.75;
  font-size: 14px;
  line-height: 1;
}

.lib-panel {
  margin-top: var(--sp-3);
  padding: var(--sp-4);
}

.lib-panel[hidden] {
  display: none;
}

.lib-panel-head {
  font: 700 var(--fs-xs) / 1 var(--font-family);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  margin: var(--sp-4) 0 var(--sp-2);
}

.lib-panel-head:first-child {
  margin-top: 0;
}

.lib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lib-chip {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface-muted);
  font: 600 var(--fs-xs) / 1 var(--font-family);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lib-chip.active {
  border-color: transparent;
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0 14px rgba(37, 107, 255, 0.4);
}

/* corpo anatômico dentro do painel de filtros */
.lib-anat {
  display: flex;
  flex-direction: column;
}

.lib-anat .gym-viewtabs {
  margin-top: 0;
}

.lib-anat-stage {
  height: min(46vh, 400px);
  min-height: 280px;
}

.lib-anat-stage .anat-canvas {
  transform-origin: center center;
  transition: transform 0.12s ease;
}

/* equipamentos: imagens pequenas, em linha */
.lib-eqrow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lib-eqitem {
  flex: 0 0 auto;
  width: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lib-eqitem:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lib-eqfig {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 70%);
}

.lib-eqimg {
  max-width: 84%;
  max-height: 40px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.lib-eqfig .equip-ico svg {
  width: 26px;
  height: 26px;
}

.lib-eqname {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  color: var(--on-surface-muted);
}

.lib-eqitem.active {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(37, 107, 255, 0.16);
}

.lib-eqitem.active .lib-eqname {
  color: #fff;
}

.lib-eqitem.active .lib-eqfig {
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 72%);
}

.lib-count {
  margin: var(--sp-4) 0 var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--on-surface-muted);
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.lib-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.lib-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 70%);
}

.lib-media.is-empty {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 10px, rgba(255, 255, 255, 0.06) 10px 20px);
}

.lib-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.lib-media-ov {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
}

.lib-play {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.lib-play:hover {
  background: rgba(37, 107, 255, 0.75);
  opacity: 1;
  transform: scale(1.08);
}

.lib-play:active {
  transform: scale(0.96);
}

.lib-play.is-pending {
  opacity: 0.5;
  border-style: dashed;
}

.lib-play svg {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

.lib-novid {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--on-surface-muted);
  text-align: center;
}

.lib-media > .lib-novid {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  white-space: nowrap;
}

.lib-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--sp-3);
}

.lib-name {
  font: 600 var(--fs-sm) / 1.25 var(--font-family);
  color: var(--on-surface);
}

.lib-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lib-tag {
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-surface-muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.lib-tag-eq {
  background: rgba(37, 107, 255, 0.16);
  color: #9fc0ff;
}

.lib-empty {
  grid-column: 1 / -1;
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  color: var(--on-surface-muted);
  font-size: var(--fs-sm);
}

.lib-player-empty {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(255, 255, 255, 0.06) 12px 24px);
  margin-top: var(--sp-2);
}

.lib-instr-card {
  padding: var(--sp-4);
}

.lib-instr-title {
  font: 700 var(--fs-sm) / 1.2 var(--font-family);
  color: var(--on-surface);
  margin: 0 0 var(--sp-3);
}

.lib-instr {
  margin: 0;
  padding-left: 1.35em;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--on-surface-muted);
}

.lib-instr li {
  padding-left: 2px;
}

.lib-instr li + li {
  margin-top: var(--sp-2);
}

.lib-instr li::marker {
  color: var(--brand-primary);
  font-weight: 700;
}

.lib-instr-card .body-empty {
  line-height: 1.5;
}

/* equipamentos com imagem ao lado do nome (tela de detalhe) */
.lib-eqval {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.lib-eqtag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 4px;
  border-radius: var(--radius-pill);
  background: rgba(37, 107, 255, 0.16);
  color: #9fc0ff;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.lib-eqtag-fig {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(120% 90% at 50% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.08) 72%);
}

.lib-eqtag-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.lib-eqtag-fig .equip-ico {
  display: grid;
  place-items: center;
  color: #fff;
}

.lib-eqtag-fig .equip-ico svg {
  width: 15px;
  height: 15px;
}

/* ---- Visualização rápida (player em camada) ---- */
.lib-quick {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}

.lib-quick[hidden] {
  display: none;
}

.lib-quick-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease both;
}

.lib-quick-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  animation: libQuickIn 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes libQuickIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lib-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.lib-quick-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}

.lib-quick-name {
  font: 700 var(--fs-lg) / 1.2 var(--font-family);
  color: var(--on-surface);
}

.lib-quick-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.lib-quick-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--on-surface);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.lib-quick-btn svg {
  width: 18px;
  height: 18px;
}

.lib-quick-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.lib-quick-stage {
  position: relative;
}

.lib-quick-video {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lib-quick-video[hidden] {
  display: none;
}

.lib-quick-empty {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 12px, rgba(255, 255, 255, 0.06) 12px 24px);
  border: 1px solid var(--line);
}

.lib-quick-empty[hidden] {
  display: none;
}

.lib-quick-empty .lib-novid {
  color: #fff;
}

.lib-quick .angle-tabs:empty {
  display: none;
}

.lib-quick-foot {
  margin-top: var(--sp-3);
}

/* ---- Fullscreen ---- */
.lib-quick-panel:fullscreen,
.lib-quick-panel:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: none;
  padding: var(--sp-5);
  border-radius: 0;
  background: #06080f;
}

.lib-quick-panel:fullscreen .lib-quick-stage,
.lib-quick-panel:-webkit-full-screen .lib-quick-stage {
  flex: 1;
  min-height: 0;
}

.lib-quick-panel:fullscreen .lib-quick-video,
.lib-quick-panel:-webkit-full-screen .lib-quick-video {
  height: 100%;
  aspect-ratio: auto;
  border: none;
}

.lib-quick-panel:fullscreen .lib-quick-empty,
.lib-quick-panel:-webkit-full-screen .lib-quick-empty {
  height: 100%;
  aspect-ratio: auto;
}

@media (min-width: 560px) {
  .lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- Erros de login/cadastro (integração Supabase) ---- */
.login-err {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(248, 59, 70, 0.12);
  border: 1px solid rgba(248, 59, 70, 0.35);
  color: #f8838b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.login-err.show { display: block; }

/* ---- Botão Adicionar rotina (Home, sem rotina salva) ---- */
.home-add-routine { margin-top: 4px; }

/* ---- Mensagem de sucesso (recuperação de senha etc.) ---- */
.login-ok {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.35);
  color: #7ee2a8;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.login-ok.show { display: block; }
