:root {
  --evo-red: #E63946;
  --evo-red-hover: #D62839;
  --evo-dark-bg: #0B0E14;
  --evo-card-bg: #121620;
  --evo-border: rgba(255, 255, 255, 0.09);
  --evo-text-main: #F8FAFC;
  --evo-text-muted: #94A3B8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--evo-dark-bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--evo-text-main);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.main-wrapper {
  flex: 1;
  display: flex;
  min-height: 100vh;
  position: relative;
}

.login-screen {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Panel izquierdo (Escritorio) */
.login-brand-side {
  flex: 1.2;
  position: relative;
  background: #0A0D14 url('/img/gym-interior.png') center center / cover no-repeat;
  display: none;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.login-brand-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.12) 0%, rgba(11, 14, 20, 0.82) 100%);
  pointer-events: none;
}

.login-brand-caption {
  position: relative;
  z-index: 2;
  padding: 36px 42px;
  width: 100%;
}

.brand-caption-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-caption-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: cover;
}

.brand-caption-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #FFFFFF;
}

.brand-caption-sub {
  font-size: 0.88rem;
  color: #CBD5E1;
  margin-top: 2px;
}

/* Panel derecho */
.login-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--evo-dark-bg);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--evo-card-bg);
  border: 1px solid var(--evo-border);
  border-radius: 14px;
  padding: 38px 34px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* Encabezado móvil */
.login-header-mobile {
  text-align: center;
  margin-bottom: 24px;
  display: block;
}

.login-header-mobile .mobile-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 10px;
  object-fit: cover;
}

.login-header-mobile h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: 1.2px;
}

.login-title {
  margin-bottom: 24px;
  text-align: left;
}

.login-title h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.login-title p {
  color: var(--evo-text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.45;
}

/* Espaciado UX conectado: 8px label->input, 20px entre campos, 26px antes de submit */
.form-group {
  margin-bottom: 20px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #E2E8F0;
}

.label-row label {
  margin-bottom: 0;
}

.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.inline-link-btn:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.input-icon {
  position: relative;
}

.input-icon i.input-lead-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  font-size: 0.95rem;
  transition: color 0.15s ease;
  z-index: 10;
  pointer-events: none;
}

.input-icon input {
  width: 100%;
  height: 48px;
  padding: 10px 16px 10px 44px !important;
  background: #0B0E14 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  color: #F8FAFC !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  outline: none !important;
  position: relative;
  z-index: 1;
}

.input-icon input.pwd-input {
  padding-right: 46px !important;
}

.input-icon input::placeholder {
  color: #475569;
}

.input-icon:focus-within i.input-lead-icon {
  color: #CBD5E1;
}

.input-icon input:focus {
  border-color: var(--evo-red) !important;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.16) !important;
}

.toggle-password-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 8px;
  font-size: 0.95rem;
  z-index: 12;
  border-radius: 6px;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-btn i {
  position: static !important;
  transform: none !important;
  pointer-events: none;
}

.toggle-password-btn:hover {
  color: #E2E8F0;
}

/* Autocompletado */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #0B0E14 inset !important;
  -webkit-text-fill-color: #F8FAFC !important;
  caret-color: #F8FAFC !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Botón principal de acento plano */
.btn-submit {
  width: 100%;
  height: 48px;
  background: var(--evo-red);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--evo-red-hover);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Avisos informativos limpios */
.auth-notice-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #CBD5E1;
  margin-bottom: 18px;
}

.auth-notice-box.success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
  color: #E2E8F0;
}

/* Acciones secundarias */
.auth-secondary-actions {
  margin-top: 18px;
  text-align: center;
}

.secondary-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #CBD5E1;
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 9px 14px;
  width: 100%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.secondary-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.back-home-wrap {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--evo-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.back-home-link:hover {
  color: #FFFFFF;
}

@media (max-width: 991px) {
  .login-form-side {
    background: linear-gradient(180deg, rgba(11, 14, 20, 0.82) 0%, rgba(11, 14, 20, 0.94) 100%),
                url('/img/gym-interior.png') center/cover no-repeat;
  }
}

@media (min-width: 992px) {
  .login-brand-side {
    display: flex;
  }
  .login-form-side {
    flex: 0 0 520px;
    padding: 40px;
  }
  .login-header-mobile {
    display: none;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 26px 20px;
    border-radius: 12px;
  }
  .login-title {
    margin-bottom: 18px;
  }
  .login-title h2 {
    font-size: 1.45rem;
  }
  .form-group {
    margin-bottom: 16px;
  }
}
