.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: calc(100vh - 40px);
}

.side_a {
  color: #fff;
  background: linear-gradient(135deg, #152338 0%, #2c394c 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 50%;
  padding: 40px;
  position: relative;
}

.side_a .content_a {
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.side_a h2 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  color: #cbeef3;
  text-transform: uppercase;
}

.side_a h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.3;
}

.side_a p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 30px;
}

/* Features modernas */
.features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: left;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(5px);
}

.feature-item .icon {
  width: 24px;
  height: 24px;
  background: #cbeef3;
  color: #152338;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.feature-item span {
  font-size: 0.9rem;
  font-weight: 500;
}

.side_a .lettering_top {
  margin-bottom: 10px;
  letter-spacing: 10px;
}

.lettering_top h2 {
  text-decoration: underline;
}

.side_a .title {
  margin: 0 0 6px 0;
}

.side_a .text {
  justify-content: center;
}

.side_b {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
}

.side_b .content_b {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  width: 420px;
  background: white;
  border: none;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
}

.card .card_top {
  background: linear-gradient(135deg, #152338 0%, #2c394c 100%);
  border-radius: 0;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.card_top::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 30px;
  background: white;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.card_top .logo {
  width: 150px;
  height: 150px;
  /* background: white; */
  border-radius: 50%;
  /* padding: 12px; */
  /* box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); */
  z-index: 1;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card_content {
  margin: 30px auto;
  width: 80%;
}

div.form {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

form h4 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #152338;
  font-weight: 700;
  text-align: center;
}

form label {
  display: block;
  margin: 0 0 6px;
  color: #152338;
  font-weight: 600;
  font-size: 0.85rem;
}

form input {
  display: block;
  font-size: 0.9rem;
  margin: 0 0 16px;
  padding: 12px 14px;
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

form input:focus {
  outline: none;
  border-color: #152338;
  background: white;
  box-shadow: 0 0 0 3px rgba(21, 35, 56, 0.08);
}

.enviar {
  width: 100%;
  padding: 13px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #152338 0%, #2c394c 100%);
  box-shadow: 0 4px 12px rgba(21, 35, 56, 0.25);
  margin-top: 8px;
}

.enviar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21, 35, 56, 0.35);
}

.enviar:focus {
  outline: none !important;
  background: linear-gradient(135deg, #152338 0%, #2c394c 100%) !important;
  box-shadow: 0 4px 12px rgba(21, 35, 56, 0.25),
    0 0 0 3px rgba(203, 238, 243, 0.3) !important;
  color: white !important;
}

.enviar:active {
  transform: translateY(1px) !important;
  background: linear-gradient(135deg, #0f1a2e 0%, #1f2a3a 100%) !important;
  box-shadow: 0 2px 8px rgba(21, 35, 56, 0.25) !important;
  color: white !important;
}

.login_links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.login_links a {
  text-decoration: none;
  font-size: 0.85rem;
  color: #152338;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.login_links a:hover {
  color: #2c394c;
}

.login_links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #152338, #cbeef3);
  transition: width 0.3s ease;
}

.login_links a:hover::after {
  width: 100%;
}

.error-message {
  background: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
  color: #dc3545;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .login_container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .side_a,
  .side_b {
    width: 100%;
    min-height: 50vh;
  }

  .side_a h1 {
    font-size: 1.5rem;
  }

  .side_a h2 {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .card {
    width: 90%;
    margin: 20px;
  }

  .card_content {
    width: 85%;
  }

  form input {
    width: 100%;
  }

  .features {
    gap: 10px;
  }

  .feature-item {
    padding: 10px 14px;
  }

  .side_a h1 {
    font-size: 1.4rem;
  }

  .side_a h2 {
    font-size: 0.8rem;
  }

  .side_a p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .side_a h1 {
    font-size: 1.2rem;
  }

  .side_a h2 {
    font-size: 0.75rem;
  }

  .side_a p {
    font-size: 0.85rem;
  }

  .features .feature-item:last-child {
    display: none;
  }

  .card {
    width: 95%;
    margin: 10px;
    border-radius: 12px;
  }

  .card_top {
    height: 80px;
  }

  .card_top .logo {
    width: 70px;
    height: 70px;
  }
}

/* Estilos generales del footer */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #152338;
  background: linear-gradient(135deg, #e8e9eb 0%, #d0d3d7 100%);
  height: 40px;
  width: 100%;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
}

footer p {
  font-size: 0.75rem;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* MEDIA QUERIES */
@media (max-width: 960px) {

  /* Oculta scrollbar (override del 10px de general.css) —
     el scroll sigue funcionando normalmente */
  html::-webkit-scrollbar,
  body::-webkit-scrollbar { display: none; }
  html, body { scrollbar-width: none; }

  html, body {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    background: #ffffff;
    padding-bottom: 40px;
  }

  /* height:auto cancela el height fijo del desktop */
  .container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  /* ── Barra de marca superior ── */
  .side_a {
    width: 100%;
    height: 52px;
    min-height: 52px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #152338 0%, #2c394c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
  }

  .side_a .content_a { text-align: center; }

  .side_a h2 {
    font-size: 0.72rem;
    margin: 0;
    letter-spacing: 2.5px;
    color: #cbeef3;
    font-weight: 700;
    text-transform: uppercase;
  }

  .side_a .content_a p,
  .side_a .content_a h1 { display: none; }

  /* ── Área del formulario — card centrada ── */
  .side_b {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px 16px;
    background: #ffffff;
  }

  .content_b {
    width: 100%;
    max-width: 400px;
  }

  /* ── Card ── */
  .card {
    width: 100%;
    margin: 0;
    border-radius: 16px;
    box-shadow:
      0 2px 4px rgba(21, 35, 56, 0.04),
      0 8px 24px rgba(21, 35, 56, 0.10),
      0 24px 48px rgba(21, 35, 56, 0.06);
    border: 1px solid rgba(21, 35, 56, 0.06);
  }

  .card:hover {
    transform: none;
    box-shadow:
      0 2px 4px rgba(21, 35, 56, 0.04),
      0 8px 24px rgba(21, 35, 56, 0.10),
      0 24px 48px rgba(21, 35, 56, 0.06);
  }

  .card .card_top {
    height: 88px;
    border-radius: 16px 16px 0 0;
  }

  .card_top .logo {
    width: 106px;
    height: 106px;
  }

  .card_content {
    margin: 20px auto 24px;
    width: 88%;
  }

  form h4 {
    font-size: 1.18rem;
    margin-bottom: 18px;
  }

  /* 1rem (16px) previene zoom automático en iOS */
  form input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .enviar {
    padding: 13px 0;
    font-size: 1rem;
    touch-action: manipulation;
  }

  .login_links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
  }

  .login_links a {
    font-size: 0.88rem;
    touch-action: manipulation;
  }

  /* Footer — estilo claro, coherente con fondo blanco */
  footer {
    background: linear-gradient(135deg, #e8e9eb 0%, #d0d3d7 100%);
    color: #152338;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.07);
  }

  footer p {
    font-size: 0.7rem;
    padding: 0 12px;
  }
}

/* ── Pantallas muy pequeñas (< 480px) ── */
@media (max-width: 480px) {
  .side_a {
    height: 46px;
    min-height: 46px;
  }

  .side_a h2 {
    font-size: 0.68rem;
    letter-spacing: 2px;
  }

  .side_b {
    padding: 16px 14px 12px;
  }

  .card .card_top { height: 80px; }

  .card_top .logo {
    width: 92px;
    height: 92px;
  }

  .card_content {
    margin: 18px auto 20px;
    width: 90%;
  }

  footer p { font-size: 0.65rem; }
}
