/* ==============================================================================
   JB SOLUTION TRAVELING S.A. - Auth & Login Portal Stylesheet (Single Viewport 100vh)
   Theme: Midnight Navy (#0C2340) + Royal Magenta (#93278F) + Rose Pink (#FF2A85) + Cyan (#00B4D8)
   ============================================================================== */

:root {
  --auth-navy-deep: #061426;
  --auth-navy-card: rgba(12, 35, 64, 0.94);
  --auth-glass-border: rgba(0, 180, 216, 0.32);
  --auth-glass-shadow: 0 20px 50px rgba(6, 20, 38, 0.7);
}

/* Base Layout Container - Locked to 100vh on Desktop */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.auth-page-wrapper {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  background: radial-gradient(circle at 15% 20%, #0c2547 0%, #061426 60%, #030a14 100%);
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #FFFFFF;
}

/* Ambient Neon Glows */
.auth-page-wrapper::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 42, 133, 0.22) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

.auth-page-wrapper::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.2) 0%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

/* 2-Column Grid Layout */
.auth-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* ==============================================================================
   LEFT SHOWCASE HERO PANEL
   ============================================================================== */
.auth-showcase-panel {
  position: relative;
  background: linear-gradient(135deg, rgba(6, 20, 38, 0.86) 0%, rgba(12, 35, 64, 0.78) 100%),
              url('https://images.unsplash.com/photo-1488646953014-85cb44e25828?auto=format&fit=crop&w=1600&q=85') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 40px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 21, 40, 0.65) 0%, rgba(12, 35, 64, 0.88) 65%, #061426 100%);
  pointer-events: none;
}

.auth-showcase-top,
.auth-showcase-center,
.auth-showcase-bottom {
  position: relative;
  z-index: 3;
}

.auth-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.auth-brand-logo-img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(255, 42, 133, 0.35));
}

.auth-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 180, 216, 0.12);
  border: 1px solid rgba(0, 180, 216, 0.4);
  color: var(--brand-cyan, #00B4D8);
  padding: 5px 12px;
  border-radius: 25px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.auth-live-dot {
  width: 7px;
  height: 7px;
  background-color: #25D366;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #25D366;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #25D366; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Showcase Center Content */
.auth-showcase-center {
  margin: 14px 0;
  max-width: 540px;
}

.auth-showcase-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.2), rgba(147, 39, 143, 0.25));
  border: 1px solid rgba(255, 42, 133, 0.4);
  color: #FF70AD;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.auth-showcase-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.auth-showcase-title span {
  background: linear-gradient(135deg, #FF2A85 0%, #00B4D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-showcase-desc {
  font-size: 0.88rem;
  color: #CBD5E1;
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Feature Pills in Showcase */
.auth-feature-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-feature-pill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 35, 64, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 14px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.auth-feature-pill-item:hover {
  border-color: rgba(0, 180, 216, 0.45);
  background: rgba(12, 35, 64, 0.85);
  transform: translateX(4px);
}

.auth-pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF2A85, #93278F);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255, 42, 133, 0.35);
}

.auth-pill-icon.cyan {
  background: linear-gradient(135deg, #00B4D8, #0C2340);
  box-shadow: 0 3px 10px rgba(0, 180, 216, 0.35);
}

.auth-pill-icon.green {
  background: linear-gradient(135deg, #25D366, #128C7E);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
}

.auth-pill-text strong {
  display: block;
  font-size: 0.84rem;
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
}

.auth-pill-text span {
  font-size: 0.72rem;
  color: #94A3B8;
}

/* Showcase Bottom Trust Bar */
.auth-showcase-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-trust-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-avatar-stack {
  display: flex;
  align-items: center;
}

.auth-avatar-stack img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #061426;
  margin-left: -7px;
  object-fit: cover;
}

.auth-avatar-stack img:first-child {
  margin-left: 0;
}

.auth-trust-info {
  font-size: 0.74rem;
  line-height: 1.25;
}

.auth-trust-info strong {
  display: block;
  color: #FFFFFF;
}

.auth-trust-info span {
  color: #94A3B8;
}

.auth-rating-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: #FFD166;
  font-weight: 700;
}

/* ==============================================================================
   RIGHT FORM PANEL (COMPACT SINGLE VIEWPORT)
   ============================================================================== */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 36px;
  position: relative;
  background: rgba(6, 20, 38, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
  scrollbar-width: none; /* Hide scrollbar */
}

.auth-form-panel::-webkit-scrollbar {
  display: none;
}

.auth-card-container {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
}

/* Top Navigation Bar Above Card (Prevents Any Overlapping) */
.auth-top-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  width: 100%;
}

.auth-brand-mini-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--brand-cyan, #00B4D8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-back-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.25s ease;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-back-nav:hover {
  color: #FFFFFF;
  background: rgba(0, 180, 216, 0.15);
  border-color: var(--brand-cyan, #00B4D8);
  transform: translateX(-3px);
}

/* Mobile Brand Header */
.auth-mobile-header {
  display: none;
  text-align: center;
  margin-bottom: 16px;
}

.auth-mobile-logo {
  height: 40px;
  width: auto;
}

/* Role Profile Selector (Client vs Advisor) */
.auth-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(12, 35, 64, 0.9);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 14px;
}

.auth-role-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 8px 12px;
  border-radius: 7px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.auth-role-btn.active {
  background: linear-gradient(135deg, #FF2A85, #93278F);
  color: #FFFFFF;
  box-shadow: 0 3px 12px rgba(255, 42, 133, 0.35);
}

.auth-role-btn:not(.active):hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

/* Main Form Card */
.auth-form-card {
  background: var(--auth-navy-card);
  border: 1.5px solid var(--auth-glass-border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--auth-glass-shadow);
  position: relative;
}

/* Header inside card */
.auth-form-header {
  margin-bottom: 14px;
}

.auth-form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 3px;
}

.auth-form-subtitle {
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.35;
}

/* Mode Tabs: Iniciar Sesión / Registrarse / Recuperar */
.auth-tab-row {
  display: flex;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.auth-tab-link {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94A3B8;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-link.active {
  color: var(--brand-pink, #FF2A85);
  border-bottom-color: var(--brand-pink, #FF2A85);
}

.auth-tab-link:not(.active):hover {
  color: #FFFFFF;
}

/* Form Groups & Inputs */
.auth-form-group {
  margin-bottom: 12px;
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 4px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  color: #64748B;
  font-size: 0.85rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-input {
  width: 100%;
  background: rgba(6, 20, 38, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.82rem;
  padding: 9px 12px 9px 36px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--brand-cyan, #00B4D8);
  background: rgba(6, 20, 38, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

.auth-input:focus ~ .auth-input-icon {
  color: var(--brand-cyan, #00B4D8);
}

.auth-input::placeholder {
  color: #64748B;
  font-size: 0.76rem;
}

.auth-phone-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.auth-prefix-select {
  flex: 0 0 148px;
  max-width: 46%;
  background: rgba(6, 20, 38, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  padding: 8px 6px;
  outline: none;
}

.auth-prefix-select:focus {
  border-color: var(--brand-cyan, #00B4D8);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18);
}

.auth-phone-row .auth-input-wrap {
  flex: 1;
  min-width: 0;
}

.auth-password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.auth-password-rules li {
  font-size: 0.68rem;
  color: rgba(203, 213, 225, 0.55);
}

.auth-password-rules li::before {
  content: '○ ';
}

.auth-password-rules li.is-met {
  color: #67E8F9;
}

.auth-password-rules li.is-met::before {
  content: '● ';
}

/* Password Toggle Eye Button */
.btn-toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 4px;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

/* Remember me & Forgot row */
.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 0.74rem;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
  accent-color: var(--brand-pink, #FF2A85);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.auth-consent {
  margin: 2px 0 16px;
}

.auth-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #E2E8F0;
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
}

.auth-consent-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 16px;
  accent-color: #C4A35A;
  cursor: pointer;
}

.auth-consent-links {
  margin: 8px 0 0 26px;
  color: #94A3B8;
  font-size: 0.78rem;
  line-height: 1.5;
}

.auth-consent-links button {
  background: none;
  border: none;
  padding: 0;
  color: #7DD3FC;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-consent-links button:hover {
  color: #FFFFFF;
}

.auth-forgot-link {
  color: var(--brand-cyan, #00B4D8);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.auth-forgot-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Submit CTA Button */
.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #FF2A85 0%, #93278F 100%);
  border: none;
  color: #FFFFFF;
  padding: 11px 18px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(255, 42, 133, 0.4);
  transition: all 0.25s ease;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, #FF4D9B 0%, #B83280 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 42, 133, 0.55);
}

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

/* Demo Credentials Quick Fill Bar */
.auth-demo-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: center;
}

.auth-demo-title {
  font-size: 0.68rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 700;
}

.auth-demo-pills {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.btn-demo-pill {
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.3);
  color: var(--brand-cyan, #00B4D8);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-demo-pill:hover {
  background: var(--brand-cyan, #00B4D8);
  color: #061426;
}

/* Security Trust Footer on Form */
.auth-security-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 0.68rem;
  color: #64748B;
}

.auth-security-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-security-footer span i {
  color: #25D366;
}

/* Feedback Toast Notification */
.auth-toast-alert {
  display: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 12px;
  animation: fadeInAlert 0.3s ease forwards;
}

@keyframes fadeInAlert {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-toast-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.auth-toast-alert.success {
  display: block;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #86EFAC;
}

.auth-toast-alert.info {
  display: block;
  background: rgba(196, 163, 90, 0.16);
  border: 1px solid rgba(196, 163, 90, 0.55);
  color: #F6E7C1;
}

/* Hidden Form Views */
.auth-form-view {
  display: none;
}

.auth-form-view.active {
  display: block;
  animation: fadeInView 0.3s ease forwards;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==============================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ============================================================================== */
@media (max-width: 992px) {
  .auth-page-wrapper {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .auth-grid-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .auth-showcase-panel {
    display: none; /* Focus completely on the high-converting login experience on mobile */
  }

  .auth-mobile-header {
    display: block;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 30px 20px;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .auth-form-panel {
    padding: 24px 14px;
  }

  .auth-form-card {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .auth-form-title {
    font-size: 1.3rem;
  }

}

.auth-totp-qr {
  width: 196px;
  height: 196px;
  margin: 0 auto 14px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
}

.auth-totp-qr img,
.auth-totp-qr canvas {
  display: block;
  width: 180px;
  height: 180px;
}

.auth-totp-secret {
  font-family: Consolas, monospace;
  letter-spacing: 0.08em;
  text-align: center;
  color: #F6E7C1;
  margin: 0 0 8px;
}

.auth-totp-input {
  letter-spacing: 0.18em;
  text-align: center;
}

.auth-totp-skip {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 0;
  color: #9FB3C8;
  cursor: pointer;
  font: inherit;
}

.auth-totp-recovery {
  margin-top: 8px;
}

.auth-totp-recovery ul {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-totp-recovery li {
  font-family: Consolas, monospace;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 8px;
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: 8px;
}
