/* Fondo de la página con degradado guinda suave */
body {
  background: linear-gradient(180deg, #4A0A1E 0%, #750D2F 50%, #4A0A1E 100%) !important;
  min-height: 300vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* evitar scroll horizontal */
  position: relative;
}

/* Eliminar cualquier padding o margin de Bootstrap */
.container-fluid {
  padding: 0 !important;
  margin: 0 !important;
}

/* Laterales con degradado para cubrir espacios en blanco */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 200vw;
  background: linear-gradient(180deg, #4A0A1E 0%, #750D2F 50%, #4A0A1E 100%);
  z-index: -1;
}

body::before {
  left: -50vw;
}

body::after {
  right: -50vw;
}

/* Fuente elegante para login */
body, .card, .header, .card-body, .form-label, .form-control, .btn, .footer-text, h1, h2, h3, h4, h5, h6, p, small, label {
  font-family: 'Roboto Condensed', Arial, sans-serif !important;
}

/* Contenedor principal centrado con fondo degradado */
main.container {
  background: transparent !important;
  padding: 3rem !important;
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 auto !important;
  position: relative;
  z-index: 1;
}

.row {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent;
}

.col-12 {
  padding: 0 !important; /* eliminar padding de columnas */
  margin: 0 !important;
  width: 100% !important;
}

/* Alertas con esquinas redondeadas */
.alert {
  border-radius: 12px !important;
}

/* Responsividad avanzada para login */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
    border-radius: 0;
  }
  .card {
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  }
  .card-body {
    padding: 1rem;
  }
  .header {
    padding: 3rem 0.5rem 1rem; /* espacio superior para logo flotante */
  }
  .imagen-container {
    min-width: 64px;
    min-height: 44px;
    padding: 0.25rem 0.4rem;
  }
  .header h1 {
    font-size: 1rem;
  }
  .header p, .header small {
    font-size: 0.65rem;
  }
  .form-label {
    font-size: 0.75rem;
  }
  .form-control {
    font-size: 0.8rem !important;
    padding: 0.6rem !important;
  }
  .btn.btn-sspcm {
    padding: 0.7rem !important;
    font-size: 0.95rem !important;
  }
  .footer-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .col-md-7, .col-lg-5 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .card {
    border-radius: 0 !important;
    box-shadow: none;
  }
  .header {
    padding: 2.75rem 0.5rem 0.9rem;
  }
  .imagen-container {
    min-width: 60px;
    min-height: 42px;
  }
}

/* Tarjeta principal centrada */
    .card {
      background: var(--color-white);
      border: 2px solid rgba(223, 215, 215, 0.9);
      border-radius: 24px !important; /* todas las esquinas redondeadas */
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
      overflow: hidden; /* mantener contenido dentro */
      width: 100%;
      max-width: 450px;
      margin: 0 auto;
      position: relative;
      z-index: 1;
    }

    /* Header con fondo guinda pero centrado */
    .header {
      background-color: var(--primary-color);
      background-image: linear-gradient(180deg, var(--primary-dark-color) 0%, var(--primary-color) 100%);
      color: var(--color-white);
      padding: 6.5rem 0rem 1.25rem; /* padding lateral restaurado */
      position: relative;
      border-bottom: 28px solid rgb(255, 255, 255);
      border-radius: 10px 40px 0 0; /* esquinas superiores redondeadas */
      width: 118%; /* ancho normal de la tarjeta */
      margin: -25px; /* sin extensión lateral */
    }
    .imagen-container {
      position: absolute;
      left: 50%;
      top: 0;
      transform: translate(-50%, 11%);
      display: inline-flex;
      justify-content: center;
      align-items: center;
      background-color: var(--color-white);
      border-radius: 18px; /* esquinas más redondeadas */
      padding: 0.35rem 0.5rem;
      min-width: 72px;
      min-height: 48px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.15);
      border: 2px solid #fff;
      z-index: 2;
      text-align: center;
    }
    .imagen-container img {
      display: block;
      margin: 0 auto;
      height: 48px;
      width: auto;
      max-height: 56px !important;
    }

    .header h1 {
      font-size: 1.3rem;
      margin: 0;
    }
    .header p {
      font-size: 0.75rem;
      margin-bottom: 0.2rem;
    }
    .header small {
      font-size: 0.7rem;
      color: var(--color-white);
    }

    /* Formulario con ancho limitado */
    .card-body {
      padding: 2rem;
      margin: 0 auto;
      color: var(--color-black);
      max-width: 500px;
    }
    .card-body h2 {
      font-size: 1.3rem;
      margin-bottom: 1rem;
      font-weight: 900;
      text-align: center;
    }

    .card-body p {
      font-size: 0.9rem;
      margin-bottom: 1.5rem;
      text-align: center;
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .form-control {
        border-radius: 15px !important; /* esquinas más redondeadas */
        padding: 0.8rem !important;
        border: 1.3px solid var(--color-gray) !important;
        font-size: 0.89rem !important;
    }

    .form-control:focus {
        border-color: var(--primary-color) !important;
        box-shadow: none !important;
    }

    .form-control:not(:placeholder-shown) {
      color: var(--color-gray) !important;
    }


    .btn.btn-sspcm {
    background-color: var(--primary-color) !important;
    border: none !important;
    border-radius: 15px !important;
    padding: 0.9rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    transition: all 0.3s ease-in-out !important;
    }
    .btn.btn-sspcm:hover {
    background-color: var(--primary-dark-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(117, 13, 47, 0.3);
    }



    /* Footer texto */
    .footer-text {
      font-size: 0.8rem;
      color: var(--color-black);
    }
.login-tabs {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem 0;
  border-bottom: 1px solid #E5E7EB;
  background: #fff;
  position: relative;
}
/* Formulario con ancho limitado */
.card-body {
  padding: 2rem;
  margin: 0 auto;
  color: var(--color-black);
}
.login-tab {
  background: transparent;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  border-radius: 12px 12px 0 0;
  cursor: pointer;
}
.login-tab:hover { 
  color: var(--primary-color); 
  background: rgba(117, 13, 47, 0.05);
}
.login-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(117, 13, 47, 0.08);
}

/* Inputs con iconos */
.input-with-icon {
  position: relative;
}
.input-with-icon .left-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
}
.input-with-icon .form-control {
  padding-left: 1rem !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6B7280;
  padding: 0.25rem 0.4rem;
  border-radius: 8px; /* esquinas redondeadas */
}
.toggle-password:hover {
  color: var(--primary-color);
  background: rgba(117, 13, 47, 0.1);
}

/* Botón principal con flecha a la derecha */
.btn.btn-sspcm {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.btn.btn-sspcm::after {
  content: "\2192"; /* flecha → */
  font-weight: 700;
}

