/* TuGymCRM — estilos locales (sin fuentes de internet). Nombre de archivo heredado. */
:root {
  --rp-bg: #080808;
  --rp-surface: #111111;
  --rp-surface-2: #1a1a1a;
  --rp-border: rgba(255, 255, 255, 0.08);
  --rp-red: #E63946;
  --rp-red-hover: #C42733;
  --rp-red-strong: #D7303D; /* fondo de botones con texto blanco normal (4.79:1, AA) */
  --rp-gold: #FFD700;
  --rp-text: #f4f4f5;
  --rp-muted: #9ca3af;
  --rp-dim: #6b7280;
  --rp-radius: 16px;
  --rp-radius-lg: 24px;
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-glow: 0 0 80px rgba(230, 57, 70, 0.15);
}

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

html { scroll-behavior: smooth; }

body.rp-body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--rp-bg);
  color: var(--rp-text);
  -webkit-font-smoothing: antialiased;
}

.rp-display { font-family: var(--font-display); }

/* Mesh background */
.rp-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(230, 57, 70, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 215, 0, 0.06), transparent),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(230, 57, 70, 0.08), transparent);
}

.rp-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}

/* Nav */
.rp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(8, 8, 8, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rp-border);
}

.rp-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rp-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.rp-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rp-red), #b91c2c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.35);
}

.rp-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.rp-nav-links {
  display: none;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .rp-nav-links { display: flex; }
}

.rp-nav-links a {
  color: var(--rp-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.rp-nav-links a:hover { color: var(--rp-text); }

.rp-nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Buttons */
.rp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.rp-btn-primary {
  background: var(--rp-red);
  color: white;
  box-shadow: 0 4px 24px rgba(230, 57, 70, 0.35);
}

.rp-btn-primary:hover {
  background: var(--rp-red-hover);
  box-shadow: 0 6px 32px rgba(230, 57, 70, 0.45);
}

.rp-btn-ghost {
  background: transparent;
  color: var(--rp-muted);
  border: 1px solid var(--rp-border);
}

.rp-btn-ghost:hover {
  color: var(--rp-text);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.rp-btn-gold {
  background: linear-gradient(135deg, #FFD700, #e6c200);
  color: #0a0a0a;
  font-weight: 700;
}

.rp-btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 14px;
}

/* Cards */
.rp-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  padding: 1.5rem;
}

.rp-card-glass {
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
}

.rp-card-featured {
  border-color: rgba(230, 57, 70, 0.4);
  box-shadow: var(--shadow-glow);
}

/* Badge */
.rp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(230, 57, 70, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(230, 57, 70, 0.25);
}

.rp-badge-gold {
  background: rgba(255, 215, 0, 0.1);
  color: var(--rp-gold);
  border-color: rgba(255, 215, 0, 0.25);
}

/* Section */
.rp-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.rp-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 0.75rem;
}

.rp-section-sub {
  text-align: center;
  color: var(--rp-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* Input */
.rp-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--rp-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rp-input:focus {
  outline: none;
  border-color: rgba(230, 57, 70, 0.5);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

.rp-input-wrap { position: relative; }

.rp-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rp-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Animations */
@keyframes rp-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.rp-animate { animation: rp-fade-up 0.6s ease forwards; }
.rp-delay-1 { animation-delay: 0.1s; }
.rp-delay-2 { animation-delay: 0.2s; }
.rp-delay-3 { animation-delay: 0.3s; }

/* Footer */
.rp-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rp-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--rp-dim);
  font-size: 0.85rem;
}

.rp-footer a { color: var(--rp-muted); text-decoration: none; }
.rp-footer a:hover { color: var(--rp-gold); }

/* ─── Motion tokens ─── */
:root {
  --rp-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --rp-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --rp-dur-fast: 0.2s;
  --rp-dur-med: 0.4s;
  --rp-dur-slow: 0.7s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rp-reveal { opacity: 1; transform: none; }
}

/* Scroll reveal — content always visible */
.rp-reveal { opacity: 1; transform: none; }
.rp-reveal.rp-visible { transform: none; }

/* ─── Animated backgrounds ─── */
.rp-mesh-animated {
  animation: rp-mesh-drift 18s ease-in-out infinite alternate;
}
@keyframes rp-mesh-drift {
  0% { filter: hue-rotate(0deg) brightness(1); transform: scale(1); }
  100% { filter: hue-rotate(8deg) brightness(1.05); transform: scale(1.02); }
}

.rp-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.45;
  animation: rp-orb-float 12s ease-in-out infinite;
}
.rp-orb-red {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(230,57,70,0.35), transparent 70%);
  top: 10%; left: -5%;
}
.rp-orb-gold {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,215,0,0.15), transparent 70%);
  bottom: 20%; right: 10%;
  animation-delay: -4s;
}
@keyframes rp-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.08); }
}

/* ─── Nav scroll shrink ─── */
.rp-nav {
  transition: padding var(--rp-dur-med) var(--rp-ease-out),
              background var(--rp-dur-med) var(--rp-ease-out),
              box-shadow var(--rp-dur-med) var(--rp-ease-out);
}
.rp-nav-scrolled {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  background: rgba(8, 8, 8, 0.92);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.rp-nav-links a {
  position: relative;
}
.rp-nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--rp-red);
  border-radius: 2px;
  transition: width var(--rp-dur-fast) var(--rp-ease-out);
}
.rp-nav-links a:hover::after { width: 100%; }

/* ─── Button polish ─── */
.rp-btn {
  position: relative;
  overflow: hidden;
}
.rp-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.12) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.rp-btn-primary:hover::before { transform: translateX(120%); }

/* ─── Card hover glow ─── */
.rp-card, .rp-card-glass {
  transition: transform var(--rp-dur-fast) var(--rp-ease-out),
              border-color var(--rp-dur-fast) ease,
              box-shadow var(--rp-dur-med) var(--rp-ease-out);
}
.rp-card:hover, .rp-card-glass:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.rp-card-featured {
  animation: rp-glow-pulse 4s ease-in-out infinite;
}
@keyframes rp-glow-pulse {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: 0 0 100px rgba(230, 57, 70, 0.22); }
}

/* ─── Landing extras ─── */
.mockup-float {
  animation: rp-mockup-float 7s ease-in-out infinite;
}
@keyframes rp-mockup-float {
  0%, 100% { transform: perspective(1200px) rotateY(-4deg) rotateX(2deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-2deg) rotateX(1deg) translateY(-8px); }
}
.mockup-bar-col {
  animation: rp-bar-grow 1.2s var(--rp-ease-out) forwards;
  transform-origin: bottom;
  transform: scaleY(0);
}
.mockup-bar-col:nth-child(1) { animation-delay: 0.1s; }
.mockup-bar-col:nth-child(2) { animation-delay: 0.2s; }
.mockup-bar-col:nth-child(3) { animation-delay: 0.3s; }
.mockup-bar-col:nth-child(4) { animation-delay: 0.4s; }
.mockup-bar-col:nth-child(5) { animation-delay: 0.5s; }
.mockup-bar-col:nth-child(6) { animation-delay: 0.6s; }
.mockup-bar-col:nth-child(7) { animation-delay: 0.7s; }
@keyframes rp-bar-grow {
  to { transform: scaleY(1); }
}

.stat-item {
  transition: transform var(--rp-dur-fast) var(--rp-ease-out),
              border-color var(--rp-dur-fast) ease;
}
.stat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.25);
}
.stat-item strong {
  transition: color var(--rp-dur-fast) ease;
}
.stat-item:hover strong { color: var(--rp-gold); }

.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,57,70,0.06), transparent 60%);
  opacity: 0;
  transition: opacity var(--rp-dur-med) ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  transition: transform var(--rp-dur-fast) var(--rp-ease-spring),
              background var(--rp-dur-fast) ease;
}
.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  background: rgba(230, 57, 70, 0.2);
}

.faq-item {
  transition: padding-left var(--rp-dur-fast) ease;
}
.faq-item:hover { padding-left: 0.5rem; }

.cta-band {
  overflow: hidden;
  position: relative;
}
.cta-band > * { position: relative; z-index: 1; }

/* ─── Auth page ─── */
.auth-brand { position: relative; }
.auth-form-enter:not(.hidden) {
  animation: rp-form-in 0.4s var(--rp-ease-out) forwards;
}
@keyframes rp-form-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.tab-bar { position: relative; }
.tab-btn { position: relative; z-index: 1; }
.tab-indicator {
  position: absolute;
  top: 0.35rem; bottom: 0.35rem;
  left: 0.35rem;
  width: calc(50% - 0.35rem);
  background: var(--rp-red);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(230,57,70,0.3);
  transition: transform 0.35s var(--rp-ease-spring);
  z-index: 0;
}
.tab-bar[data-tab="register"] .tab-indicator {
  transform: translateX(100%);
}
.tab-active { background: transparent !important; box-shadow: none !important; }

/* ─── Billing ─── */
.plan-card .rp-card {
  transition: transform var(--rp-dur-med) var(--rp-ease-out),
              box-shadow var(--rp-dur-med) var(--rp-ease-out),
              border-color var(--rp-dur-fast) ease;
}
.plan-card:hover .rp-card {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.plan-card .rp-card-featured {
  transform: scale(1.02);
}
.plan-card:hover .rp-card-featured {
  transform: scale(1.02) translateY(-6px);
}

/* ─── CRM App ─── */
.crm-shell {
  position: relative;
  background: var(--rp-bg);
}
.crm-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(230, 57, 70, 0.08), transparent),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(255, 215, 0, 0.04), transparent);
}

.crm-sidebar {
  position: relative;
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--rp-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.crm-sidebar-brand {
  border-bottom: 1px solid var(--rp-border);
  background: linear-gradient(180deg, rgba(230,57,70,0.04), transparent);
}

.crm-nav {
  position: relative;
}
.crm-nav .nav-item {
  transition: background var(--rp-dur-fast) ease, color var(--rp-dur-fast) ease, transform var(--rp-dur-fast) var(--rp-ease-out);
}
.crm-nav .nav-item:not(.nav-active):hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
}
.crm-nav .nav-active {
  background: var(--rp-red) !important;
  color: white !important;
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.35);
}

.crm-sidebar-btn {
  transition: all var(--rp-dur-fast) var(--rp-ease-out);
}
.crm-sidebar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.crm-main {
  position: relative;
  z-index: 1;
}

.crm-topbar {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rp-border);
  transition: box-shadow var(--rp-dur-med) ease;
}

.crm-live-dot {
  animation: rp-pulse-live 2s ease-in-out infinite;
}
@keyframes rp-pulse-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { opacity: 0.85; box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.crm-content {
  background: linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,1) 100%);
}

.crm-stat-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.crm-cta-scan {
  position: relative;
  overflow: hidden;
  transition: transform var(--rp-dur-fast) var(--rp-ease-out),
              box-shadow var(--rp-dur-med) ease;
}
.crm-cta-scan::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: rp-scan-shine 3s ease-in-out infinite;
}
@keyframes rp-scan-shine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
.crm-cta-scan:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.35);
}

.crm-btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform var(--rp-dur-fast) ease, box-shadow var(--rp-dur-fast) ease;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
}
.crm-btn-primary:hover {
  box-shadow: 0 8px 28px rgba(230, 57, 70, 0.45);
  transform: translateY(-1px);
}

.section { display: none; }
.section.active { display: block; }

.premium-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.crm-stat-accent-gold { border-left: 4px solid var(--rp-gold); }
.crm-stat-accent-green { border-left: 4px solid #22c55e; }
.crm-stat-accent-red { border-left: 4px solid #ef4444; }
.crm-stat-accent-emerald { border-left: 4px solid #34d399; }

.modal {
  animation: crm-modal-in 0.35s var(--rp-ease-spring) forwards;
}
@keyframes crm-modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-backdrop {
  animation: crm-backdrop-in 0.25s ease forwards;
}
@keyframes crm-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.student-row {
  transition: background-color var(--rp-dur-fast) ease,
              transform var(--rp-dur-fast) ease,
              box-shadow var(--rp-dur-fast) ease;
}
.student-row:hover {
  background-color: rgba(31, 41, 55, 0.8);
  transform: translateX(4px);
}

.status-pill {
  transition: transform var(--rp-dur-fast) var(--rp-ease-spring);
}
.student-row:hover .status-pill {
  transform: scale(1.05);
}

.crm-table-wrap {
  border: 1px solid var(--rp-border);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(17, 17, 17, 0.5);
}

.rp-delay-4 { animation-delay: 0.4s; opacity: 0; }
.rp-delay-5 { animation-delay: 0.5s; opacity: 0; }

@keyframes rp-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.rp-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: rp-shimmer 1.5s ease infinite;
}
/* Contraste AA (kit Grafik v1): botones rojos con texto blanco. Clases no incluidas en tailwind.css precompilado. */
.bg-\[\#D7303D\] { background-color: var(--rp-red-strong); }
.hover\:bg-\[\#C42733\]:hover { background-color: var(--rp-red-hover); }
