body {
    background: linear-gradient(135deg, var(--coloroscuro), var(--colorclaro));
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    overflow: hidden; /* sin scroll visual, el canvas ocupa toda la pantalla */
}
.login-container {
    max-width: 950px;
    width: 100%;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    background: #fff;
    animation: fadeInUp 600ms ease-out;
}
.login-left {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 20px;
    animation: slideInLeft 600ms ease-out;
}
.login-left img {
    max-width: 80%;
    height: auto;
    animation: pulse 2s infinite alternate;
}
.login-right {
    flex: 1;
    padding: 40px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInRight 600ms ease-out;
}
.login-right h3 {
    font-weight: 700;
    color: var(--coloroscuro);
    margin-bottom: 25px;
}
.login-right .form-control {
    border-radius: 50px;
    padding: 12px 20px;
    border: 1px solid var(--colorclaro);
    transition: transform 0.15s ease-in-out, box-shadow 0.25s;
}
.login-right .form-control:focus {
    box-shadow: 0 0 10px var(--colorclaro);
    transform: scale(1.02);
}
.login-right button {
    border-radius: 50px;
    background: var(--coloroscuro);
    color: #fff;
    font-weight: bold;
    transition: background 0.25s ease-in-out, transform 0.15s;
}
.login-right button:hover {
    background: var(--colorclaro);
    transform: translateY(-1px);
}
.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.btn-sininternet {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--colorclaro);
    border-radius: 50px;
    color: #fff;
    font-weight: bold;
    padding: 6px 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.15s;
}
.btn-sininternet:hover { transform: scale(1.05); background: var(--coloroscuro); }

@keyframes fadeInUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.03); } }

/* Responsivo */
@media (max-width: 768px) {
    body { padding: 10px; height: auto; overflow-y: auto; }
    .login-container { flex-direction: column; max-width: 100%; box-shadow: none; border-radius: 12px; }
    .login-left { padding: 16px; }
    .login-left img { max-width: 60%; }
    .login-right { padding: 24px; }
    .login-right h3 { font-size: 1.4rem; text-align: center; }
    .login-right .form-control { font-size: 14px; padding: 10px; }
    .btn-sininternet { top: 10px; right: 10px; padding: 4px 8px; font-size: 12px; }
}
@media (max-width: 480px) {
    .login-left img { max-width: 70%; }
    .login-right h3 { font-size: 1.2rem; }
    .login-right button { font-size: 14px; padding: 10px; }
    .login-footer { font-size: 12px; }
}

/* Mini logo del sistema en el login */
.brand-mini img{
    max-width: 100px;    /* tamaño cómodo en desktop */
    height: auto;
    opacity: .95;
}
@media (max-width: 576px){
    .brand-mini img{
        max-width: 80px; /* un poco más pequeño en móvil */
    }
}

/* Grupo con icono + animación al enfocar (afecta icono e input juntos) */
.stylish-input{
  border-radius: 50px;
  overflow: hidden; /* escalamos el wrapper, no el input */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .15s ease-in-out, box-shadow .25s ease;
}
.stylish-input:focus-within{
  transform: scale(1.02);
  box-shadow: 0 0 12px var(--colorclaro);
}

.stylish-input .input-group-text{
  background: var(--coloroscuro);
  border: none;
  color: #fff;
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
  font-size: 1.1rem;
}

.stylish-input .form-control{
  border: 1px solid transparent;  /* evita saltos */
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
  box-shadow: none;
  padding-left: 15px;
}
.stylish-input .form-control:focus{
  outline: 0;
  border-color: transparent;
  box-shadow: none; /* el glow lo da el wrapper */
}

/* Aviso de CapsLock alineado */
#capsNotice{ margin-left: 54px; }

/* Estado “cargando” del botón de login */
#btnLogin.loading{ pointer-events: none; opacity: .85; }
#btnLogin.loading i{ animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mini logo: tamaño, sombra y look consistente */
.login-header .brand-mini{
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* Ajustes responsivos */
@media (max-width: 768px){
    .login-header .brand-mini{
        width: 80px; height: 80px;
    }
    .login-header h3{
        font-size: 1.35rem;
    }
}
@media (max-width: 480px){
    .login-header .brand-mini{
        width: 70px; height: 70px;
    }
    .login-header h3{
        font-size: 1.2rem;
    }
}
