@import url('../fonts/gf_addc6f2a.css');

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

/* ───── Body / fondo ───── */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(145deg, #0f2c6f 0%, #1a56db 55%, #0891b2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow-x: hidden;
}

/* Círculo decorativo arriba-izquierda */
body::before {
  content: '';
  position: fixed;
  width: 480px;
  height: 480px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  top: -200px;
  left: -180px;
  pointer-events: none;
  animation: float 20s infinite ease-in-out;
}

/* Círculo decorativo abajo-derecha */
body::after {
  content: '';
  position: fixed;
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  bottom: -130px;
  right: -100px;
  pointer-events: none;
  animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(40px, 40px) scale(1.08); }
}

/* ───── Contenedor ───── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

/* ───── Tarjeta ───── */
.login-card {
  width: 100%;
  margin: auto 0;
  background: #ffffff;
  border-radius: 20px;
  padding: 48px 40px 40px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ───── Logo / cabecera ───── */
.logo-container {
  text-align: center;
  margin-bottom: 36px;
}

.logo-container img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #eef2ff, #dbeafe);
  border: 1.5px solid #bfdbfe;
  border-radius: 20px;
}

/* Badge pill encima del título */
.logo-container::after {
  content: 'Vivotel SG';
  display: inline-block;
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.logo-container h5 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 0;
}

.logo-container p {
  font-size: 13.5px;
  color: #64748b;
  font-weight: 400;
  margin-top: 5px;
}

/* ───── Labels ───── */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.03em;
  margin-bottom: 7px;
}

/* ───── Inputs ───── */
.form-control {
  width: 100%;
  height: 50px;
  border: 1.5px solid #e5e7eb;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-control:focus {
  border-color: #1a56db;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* ───── Input group (contraseña) ───── */
.input-group {
  position: relative;
}

.input-group .form-control {
  padding-right: 52px;
}

/* ───── Toggle contraseña ───── */
.toggle-password {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 42px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.toggle-password:hover {
  color: #374151;
  background: #f3f4f6;
}

.toggle-password:active {
  background: #e5e7eb;
}

.toggle-password i {
  font-size: 17px;
}

/* ───── Botón login ───── */
.btn-login {
  width: 100%;
  height: 50px;
  margin-top: 28px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #1e40af 0%, #1a56db 50%, #0891b2 100%);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(26, 86, 219, 0.4);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.13) 0%, transparent 100%);
  pointer-events: none;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(26, 86, 219, 0.45);
}

.btn-login:active {
  transform: scale(0.98);
  opacity: 0.95;
}

/* ───── Footer ───── */
.footer-text {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: #9ca3af;
}

.footer-text a {
  color: #1a56db;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.footer-text a:hover {
  color: #1e40af;
}

/* ───── Espaciado ───── */
.mb-3 {
  margin-bottom: 20px;
}

/* ───── Tablet ───── */
@media (max-width: 768px) {
  .login-card {
    padding: 44px 32px 36px;
  }
}

/* ───── Mobile 480px ───── */
@media (max-width: 480px) {
  body {
    padding: 24px 16px;
    align-items: center;
  }

  .login-container {
    min-height: auto;
    display: block;
    padding: 0;
  }

  .login-card {
    margin: 0;
    padding: 36px 24px 32px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  }

  .logo-container {
    margin-bottom: 28px;
  }

  .logo-container img {
    width: 76px;
    height: 76px;
    padding: 12px;
    border-radius: 17px;
    margin-bottom: 14px;
  }

  .logo-container h5 {
    font-size: 20px;
  }

  .logo-container p {
    font-size: 13px;
  }

  .form-control {
    height: 48px;
    font-size: 16px;
  }

  .btn-login {
    height: 48px;
    margin-top: 24px;
    font-size: 15px;
  }

  .footer-text {
    margin-top: 24px;
    font-size: 11.5px;
  }

  .mb-3 {
    margin-bottom: 18px;
  }
}

/* ───── Mobile pequeño 360px ───── */
@media (max-width: 360px) {
  body {
    padding: 20px 12px;
  }

  .login-card {
    padding: 32px 20px 28px;
    border-radius: 16px;
  }

  .logo-container img {
    width: 68px;
    height: 68px;
    padding: 10px;
    border-radius: 15px;
  }

  .logo-container h5 {
    font-size: 19px;
  }

  .form-control {
    height: 46px;
    font-size: 15px;
  }

  .btn-login {
    height: 46px;
    font-size: 14px;
  }

  .footer-text {
    font-size: 11px;
    margin-top: 20px;
  }

  .mb-3 {
    margin-bottom: 16px;
  }
}

/* ───── Landscape móvil ───── */
@media (max-height: 650px) and (orientation: landscape) {
  body {
    padding: 12px 16px;
  }

  .login-card {
    padding: 28px 32px 22px;
    border-radius: 16px;
  }

  .logo-container {
    margin-bottom: 20px;
  }

  .logo-container img {
    width: 60px;
    height: 60px;
    padding: 9px;
    margin-bottom: 10px;
  }

  .logo-container h5 {
    font-size: 18px;
  }

  .logo-container p {
    font-size: 12px;
  }

  .form-control {
    height: 44px;
  }

  .btn-login {
    height: 44px;
    margin-top: 16px;
  }

  .footer-text {
    margin-top: 16px;
  }

  .mb-3 {
    margin-bottom: 14px;
  }
}

/* ───── Dispositivos táctiles ───── */
@media (hover: none) and (pointer: coarse) {
  .btn-login:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.4);
  }

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

  .toggle-password:hover {
    background: transparent;
    color: #9ca3af;
  }

  .toggle-password:active {
    background: #f3f4f6;
    color: #374151;
  }
}