@import url('https://cdn-uicons.flaticon.com/2.6.0/uicons-brands/css/uicons-brands.css');

body {
  font-family: Arial, sans-serif;
  background: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Fondo animado en el panel naranja */
@keyframes backgroundMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Paneles izquierdo (naranja) y derecho (blanco) — tamaños conservados 33% / 67% */
.left-panel,
.right-panel {
  position: fixed;
  top: 0;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
  transition: all 0.5s ease;
}

/* IZQUIERDA: ahora naranja animado (antes blanco) */
.left-panel {
  width: 33%;
  left: 0;
  background: linear-gradient(135deg, #FFA500, #FFB347, #FF8C00, #FFAA66, #FF7F24);
  background-size: 300% 300%;
  animation: backgroundMove 10s ease infinite;
}

/* DERECHA: ahora blanco (antes naranja) */
.right-panel {
  left: 33%;
  width: 67%;
  background: #f6f7fb;
}

/* Intercambiar lados cuando está activo el modo "Crear cuenta" (se mantiene) */
body.signup-active .left-panel { left: 67%; }
body.signup-active .right-panel { left: 0; }

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  transition: left 0.5s ease;
}

body:not(.signup-active) .container {
  left: 66%;
  transform: translate(-50%, -50%);
}

body.signup-active .container {
  left: 33%;
  transform: translate(-50%, -50%);
}

.login-box, .signup-box {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2rem;
  width: 100%;
  max-width: 25rem;
  margin-bottom: 1.25rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-sizing: border-box;
}

#form-container { width: 25rem; max-width: 100%; }

/* LOGO + TAGLINE */
.logotipo {
  text-align: center;
  z-index: 1;
  display: flex;               /* TAGLINE */
  flex-direction: column;      /* TAGLINE */
  align-items: center;         /* TAGLINE */
}

/* ---- LOGO PROPORCIONAL ---- */
.logotipo img {
  display: block;
  height: auto;
  width: clamp(180px, 22vw, 420px);
  margin: 0 auto;
}

/* ---- TAGLINE (misma anchura que el logo; font-size lo ajusta el JS) ---- */
.logotipo .tagline {           /* TAGLINE */
  display: block;
  width: clamp(180px, 22vw, 420px);
  margin-top: 10px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;         /* 1 sola línea; el JS ajusta el tamaño */
  overflow: hidden;
  color: #fff;                 /* contraste sobre panel naranja */
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

form[style*="display: none;"] { opacity: 0; visibility: hidden; }

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #dbdbdb;
  border-radius: 0.1875rem;
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus { border-color: #0095f6; }

button[type="submit"] {
  background-color: #0095f6;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  margin-bottom: 1rem;
  width: 100%;
  box-sizing: border-box;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

button[type="submit"]:hover {
  background-color: #FFA500;
  transform: scale(1.05);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

button[type="submit"]:active { transform: scale(0.95); }

.forgot-password {
  color: #385185;
  text-decoration: none;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
  width: 100%;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 1rem;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 1rem;
  color: black;
  position: fixed;
  bottom: 0;
  text-align: center;
}

.footer p {
  margin: 5px 0;
  font-size: 1rem;
  color: black;
  width: 100%;
}

.social-icons { margin-top: 10px; display: flex; justify-content: center; }

.social-link { margin: 0 5px; text-decoration: none; display: inline-block; }

.social-icon { font-size: 16px; color: black; transition: transform 0.3s, opacity 0.3s; }
.social-icon:hover { transform: scale(1.1); opacity: 0.8; }

.toggle-options a,
#toggleForm {
  color: #0095f6;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease-in-out;
}

.toggle-options a:hover,
#toggleForm:hover { color: #FFA500; }

.error-message {
  color: red;
  font-size: 12px;
  margin-top: -10px;
  margin-bottom: 1rem;
  text-align: left;
  width: 100%;
}

/* =====================  MÓVIL (<600px) COMPLETO  ===================== */
@media (max-width: 600px) {
  /* Base móvil */
  body {
    background: #f6f7fb;
    min-height: 100vh;
    height: auto;
    overflow-y: auto;
    padding: 16px 16px calc(env(safe-area-inset-bottom, 0) + 12px);
  }

  /* Panel del logo SIEMPRE arriba y fijo en estructura (no absolute/fixed) */
  .left-panel {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    display: block !important;
    padding-top: env(safe-area-inset-top, 0);
    margin-bottom: 8px;
    z-index: 1;
  }
  .logotipo { text-align: center; }

  /* En móvil, la tagline pasa a negro (el fondo es blanco) */
  .logotipo .tagline {          /* TAGLINE */
    color: #111;
    text-shadow: none;
    margin-top: 8px;
  }

  /* Panel derecho actúa solo como contenedor; sin gradiente llamativo */
  .right-panel {
    position: relative !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    animation: none !important;
    padding: 0 !important;
    display: block !important;
    z-index: 0;
  }

  /* Neutralizar por completo el “salto” de signup-active en móvil */
  body.signup-active .left-panel { left: 0 !important; }
  body.signup-active .right-panel { left: 0 !important; width: 100% !important; }
  body.signup-active .container { left: auto !important; transform: none !important; }

  /* Contenedor del formulario centrado */
  .container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
  }
  #form-container { width: 100% !important; }

  /* Tarjeta del formulario (login / signup) y caja del toggle */
  .login-box,
  .signup-box {
    width: 100%;
    margin: 0 auto 14px;
    padding: 18px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #eef0f4;
    box-shadow: 0 6px 18px rgba(16,24,40,.06);
    backdrop-filter: none;
  }

  /* Inputs accesibles en móvil */
  input[type="text"],
  input[type="password"],
  input[type="email"] {
    width: 100%;
    padding: 14px 12px;
    margin-bottom: 12px;
    border: 1.5px solid #e6e8ee;
    border-radius: 12px;
    background: #fff;
    font-size: 16px; /* evita zoom en iOS */
    line-height: 22px;
    box-shadow: inset 0 1px 0 rgba(16,24,40,.02);
  }
  input[type="text"]:focus,
  input[type="password"]:focus,
  input[type="email"]:focus {
    outline: none;
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255,138,0,.15);
  }

  /* Botón principal */
  button[type="submit"] {
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
    width: 100%;
    background: linear-gradient(180deg,#ff9e2f,#ff7f00);
    box-shadow: 0 6px 14px rgba(255,127,0,.25);
  }
  button[type="submit"]:hover { transform: translateY(-1px); }
  button[type="submit"]:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(255,127,0,.25); }

  /* Enlaces y errores */
  .forgot-password,
  #toggleForm {
    color: #ff7f00;
    font-weight: 600;
  }
  .error-message {
    font-size: 12px;
    color: #d11a2a;
    margin-top: -6px;
    margin-bottom: 10px;
  }

  /* Footer compacto */
  .footer {
    position: relative !important;
    bottom: auto !important;
    text-align: center;
    margin-top: 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    font-size: 13px;
    opacity: .85;
  }
  .social-icon { font-size: 18px; }

  /* Asegurar que no quedan restos de estilos de escritorio en móvil */
  .left-panel,
  .right-panel { justify-content: center; align-items: center; }
  form { opacity: 1; visibility: visible; }
}

/* === Access card: más contraste sobre el gris claro en escritorio === */
.login-box,
.signup-box {
  background: #ffffff !important;
  border-radius: 20px !important;
  padding: 1.5rem 1.25rem !important;

  /* borde un poco más oscuro para que se separe del fondo */
  border: 1px solid rgba(15, 23, 42, 0.16) !important;

  /* doble sombra: borde suave + sombra de profundidad */
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.04),
    0 18px 40px rgba(15, 23, 42, 0.18) !important;

  backdrop-filter: none !important;
}


/* Inputs: solid white, soft border, larger radius */
input[type="text"],
input[type="password"],
input[type="email"]{
  background:#fff !important;
  border:1px solid #e6e8ec !important;
  border-radius: 14px !important;
  padding: 0.9rem 1rem !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02) inset !important;
}

/* Orange gradient CTA like in mobile */
button[type="submit"]{
  background: linear-gradient(180deg, #FFA500 0%, #ED7014 100%) !important;
  color:#fff !important;
  border:none !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 28px rgba(237,112,20,0.28) !important;
  font-weight: 700 !important;
}
button[type="submit"]:hover{
  filter: brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(237,112,20,0.32) !important;
}
button[type="submit"]:active{
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(237,112,20,0.24) !important;
}

/* Secondary box: keep white with subtle border */
.signup-box{ color:#111 !important; }

/* Links under card in orange (Forgot / Crear cuenta) */
.forgot-password,
.signup-box a, .login-box a{
  color:#ED7014 !important;
  text-decoration: none;
  font-weight: 600;
}
.forgot-password:hover,
.signup-box a:hover, .login-box a:hover{
  text-decoration: underline;
}

/* Mobile spacing and soft outer glow for the card area */
@media (max-width: 600px){

  /* ── NUEVO: ensanchar logo + tagline para que quepa la frase en 1 línea ── */
  .logotipo img,
  .logotipo .tagline{
    width: clamp(260px, 90vw, 520px);
  }
  .logotipo .tagline{
    margin-top: 10px;
    color:#111;      /* fondo blanco en móvil */
    text-shadow:none;
  }

  .login-box, .signup-box{
    margin: 0.5rem 1rem 1.25rem 1rem !important;
    border-radius: 20px !important;
    box-shadow:
      0 10px 24px rgba(16,24,40,.06),
      0 2px 0 rgba(255,255,255,0.6) inset;
  }
}


/* Desktop centering tweaks so the card still looks like mobile */
@media (min-width: 601px){
  #form-container{ max-width: 26rem !important; }
  .login-box, .signup-box{ padding: 2rem 1.75rem !important; }
}
