/* === VARIABLES & RESET === */
:root {
  /* Lamine Yamal Style Overhaul */
  --bg-dark: #0B0F19;
  /* Darker navy background */
  --card-bg: rgba(11, 15, 26, 0.85);
  /* Pure Navy/Slate background, no green tint */
  --primary: #34D399;
  /* Emerald Green */
  --primary-glow: rgba(52, 211, 153, 0.4);

  --text-main: #FFFFFF;
  /* Pure White Headers */
  --text-muted: #94A3B8;
  /* Silver Slate Body */
  --border-color: #1E293B;
  /* Subtle slate blue borders */
  --input-bg: rgba(255, 255, 255, 0.03);

  --danger: #F87171;
  --success: #34D399;

  --font-main: 'Inter', system-ui, sans-serif;
  --radius: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark) !important;
  /* Dark Grid Pattern Overlay */
  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: 40px 40px;
  background-position: center;
  color: var(--text-main) !important;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === FONDO TÉCNICO === */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.glow-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* === CARD LOGIN === */
.wrap {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.card {
  width: 100%;
  max-width: 850px;
  min-height: auto;

  display: grid;
  grid-template-columns: 1fr 1fr;

  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  z-index: 10;
  /* Asegura que esté por encima del fondo */
}

/* Columna Izquierda */
.left {
  position: relative;
  padding: 40px;
  border-right: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Escudos ocultos */
.crestWall {
  display: none;
}

.left-content {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 5px;
}

.brandLogo {
  width: 100px;
  /* Tamaño grande mantenido */
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.2));
}

.brandText h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 5px;
}

.brandText p {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}

.pitch h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: white;
}

.description {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 25px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

.check-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 30px;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.tag.active {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.tag.disabled {
  opacity: 0.5;
}

.footnote {
  margin-top: auto;
}

.status-badge {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Columna Derecha (Form) */
.right {
  padding: 40px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header {
  margin-bottom: 25px;
}

.login-header h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 8px;
  text-transform: uppercase;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: var(--transition);
}

.input-wrapper input {
  width: 100%;
  height: 48px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 14px 0 44px;
  color: white;
  font-size: 14px;
  transition: var(--transition);
  font-family: var(--font-main);
}

.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.input-wrapper input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.15);
  outline: none;
}

.input-wrapper input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary);
}

.eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
}

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

.eye-btn:hover {
  color: white;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -5px;
}

.link-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.link-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.btn-primary {
  height: 48px;
  background: var(--primary);
  color: #00331a;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
  margin-top: 5px;
}

.btn-primary:hover {
  background: #00e67a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.btn-primary:hover .arrow-icon {
  transform: translateX(4px);
}

.msg {
  min-height: 18px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-top: 5px;
}

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

.msg.success {
  color: var(--success);
}

.legal {
  margin-top: 25px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

/* =========================================
   📱 RESPONSIVE PARA MACBOOKS Y CELULARES
   ========================================= */

/* Para celulares o ventanas angostas: Oculta la parte izquierda */
@media (max-width: 850px) {
  .card {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .left {
    display: none;
  }

  .right {
    padding: 30px;
  }
}

/* Para pantallas con menos altura (ej: MacBooks) achicamos todo con Zoom */
@media screen and (max-height: 800px) {
  .card {
    transform: scale(0.85);
    /* Achica toda la caja un 15% */
    transform-origin: center center;
    /* Se asegura de que se achique desde el centro */
  }
}

/* Para pantallas con menos altura AÚN (ej: Notebooks viejas con barras de tareas grandes) */
@media screen and (max-height: 650px) {
  .card {
    transform: scale(0.75);
    /* Achica un 25% */
  }
}

/* =========================================
   PANTALLA DE CARGA (LOADER)
   ========================================= */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-color: var(--bg-dark);
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.loader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.5s ease forwards;
}

.loader-logo {
  width: 250px;
  height: auto;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.25));
  image-rendering: -webkit-optimize-contrast;
}

.loader-text p {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 30px 0;
}

.progress-track {
  width: 250px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  border-radius: 10px;
  box-shadow: 0 0 10px var(--primary);
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.loading-status {
  margin-top: 15px;
  font-size: 11px;
  color: var(--text-muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}