/* ===================================================
   LOGIN PAGE — Academia de Idiomas — v4
   Palette: #0A36CF (blue), #FFFFFF (white)
   =================================================== */

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

body {
  font-family: 'Inter', sans-serif;
  color: #1a1f3a;
  min-height: 100vh;
  overflow: hidden;
}

/* ========================
   WRAPPER
   ======================== */
.login-wrapper {
  display: flex;
  flex-flow: row nowrap;
  width: 100vw;
  min-height: 100vh;
}

/* ========================
   LEFT PANEL
   ======================== */
.login-panel-left {
  position: relative;
  flex: 1.1;
  background: linear-gradient(145deg, #061f7a 0%, #0A36CF 55%, #1a4ee8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  overflow: hidden;
  min-height: 100vh;
}

/* Background floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: floatOrb 9s ease-in-out infinite;
}
.orb-1 { width: 340px; height: 340px; top: -90px; left: -90px; animation-delay: 0s; }
.orb-2 { width: 220px; height: 220px; bottom: 50px; right: -60px; animation-delay: 3.5s; }
.orb-3 { width: 130px; height: 130px; bottom: 28%; left: 8%; animation-delay: 6s; }



@keyframes floatOrb {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* Home logo */
.hero-logo-home {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 320px;
  margin-bottom: 8px;
  animation: floatIllus 7s ease-in-out infinite;
}
#imglogin {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,0.28)) brightness(1.05);
}

/* Hero SVG decoration (language bubbles) */
.hero-illustration {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin-top: 4px;
}
.hero-svg {
  width: 100%;
  height: auto;
}

@keyframes floatIllus {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Brand tagline */
.brand-tagline {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  margin-top: 12px;
}
.brand-tagline h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.brand-tagline p {
  font-size: 0.85rem;
  font-weight: 300;
  opacity: 0.8;
  margin-top: 5px;
}

/* Flag chips */
.flag-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.flag-chip {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 100px;
  padding: 5px 14px;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, transform 0.2s ease, border-color 0.25s;
}
.flag-chip:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

/* ========================
   RIGHT PANEL
   ======================== */
.login-panel-right {
  flex: 0.9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  min-height: 100vh;
  position: relative;
}

/* Subtle background radial hints */
.login-panel-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 88% 8%,  rgba(10, 54, 207, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 5%  92%, rgba(10, 54, 207, 0.04) 0%, transparent 48%);
  pointer-events: none;
}

/* Accent bar on top edge */
.login-panel-right::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #F71919, #0A36CF 50%, #F71919);
  border-radius: 0 0 4px 4px;
}

.login-form-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  animation: slideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}

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

/* Dark logo in form */
.form-logo {
  margin-bottom: 26px;
  text-align: left;
}
#logo_dark {
  height: 54px;
  width: auto;
  object-fit: contain;
}

/* Greeting */
.form-greeting {
  margin-bottom: 30px;
}
.form-greeting h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #0a1240;
  line-height: 1.2;
}
.form-greeting h1 span {
  display: inline-block;
  animation: wave 1.8s ease-in-out 0.8s;
}
@keyframes wave {
  0%,  60%, 100% { transform: rotate(0deg); }
  10%, 30%       { transform: rotate(20deg); }
  20%            { transform: rotate(-8deg); }
}
.form-greeting p {
  font-size: 0.88rem;
  color: #6b7db3;
  margin-top: 6px;
  font-weight: 400;
}

/* ========================
   FORM FIELDS
   ======================== */
.field-group {
  margin-bottom: 20px;
}
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2d3a6e;
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field-icon {
  position: absolute;
  left: 14px;
  color: #0A36CF;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.field-input {
  width: 100%;
  height: 50px;
  padding: 0 44px 0 44px;
  border: 1.8px solid #d4dcf5;
  border-radius: 12px;
  font-size: 0.94rem;
  font-family: 'Inter', sans-serif;
  color: #1a1f3a;
  background: #f5f7fe;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  outline: none;
}
.field-input::placeholder { color: #a8b4d8; }
.field-input:focus {
  border-color: #0A36CF;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 54, 207, 0.1);
}

/* Toggle password button */
.toggle-pw {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: #a8b4d8;
  font-size: 0.88rem;
  padding: 4px;
  transition: color 0.2s;
}
.toggle-pw:hover { color: #0A36CF; }

/* ========================
   LOGIN BUTTON
   ======================== */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 10px;
  background: linear-gradient(135deg, #0A36CF, #1a4ee8);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 24px rgba(10, 54, 207, 0.35);
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(10, 54, 207, 0.42);
}
.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(10, 54, 207, 0.25);
}
.btn-login svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.btn-login:hover svg { transform: translateX(4px); }

/* ========================
   FOOTER
   ======================== */
.form-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  font-size: 0.69rem;
  color: #a8b4d8;
  border-top: 1px solid #edf0fa;
  padding-top: 18px;
  letter-spacing: 0.01em;
}

/* ========================
   FLASH MESSAGES
   ======================== */
.alert {
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.alert-danger {
  background: rgba(10, 54, 207, 0.07);
  border-color: rgba(10, 54, 207, 0.25);
  color: #0a1f6e;
}

/* ========================
   RESPONSIVE — Tablet / Mobile
   ======================== */
@media screen and (max-width: 820px) {
  body { overflow: auto; }

  .login-wrapper {
    flex-direction: column;
    min-height: 100svh;
  }

  .login-panel-left {
    flex: none;
    min-height: auto;
    padding: 32px 24px 24px;
  }

  .hero-logo-home {
    max-width: 220px;
    margin-bottom: 4px;
  }

  .hero-illustration {
    display: none;
  }

  .brand-tagline h2 { font-size: 1.05rem; }

  .login-panel-right {
    flex: none;
    padding: 32px 24px 48px;
    min-height: auto;
  }

  .login-form-container {
    max-width: 100%;
  }

  .form-greeting h1 { font-size: 1.6rem; }

  .login-panel-right::after { display: none; }
  .login-panel-right::before {
    top: 0; left: 0; right: 0; bottom: auto;
    height: 3px;
    background: linear-gradient(90deg, #061f7a, #0A36CF);
    border-radius: 0;
  }
}

@media screen and (max-width: 480px) {
  .flag-row { gap: 6px; }
  .flag-chip { font-size: 0.71rem; padding: 4px 10px; }
}
