body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #82A1B5 0%, #5D7A8C 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
}

.login-container {

    overflow: hidden;
    width: 100%;
    max-width: 450px;
    position: relative;
    border-radius: 12px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
    -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
    box-shadow: 0 2px 2px rgba(0,0,0,0.2),
        0 1px 5px rgba(0,0,0,0.2),
        0 0 0 12px rgba(255,255,255,0.4);
}


/* Franja superior - debajo del header */
.top-border {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, #167ebf, #0c64a6, #ffffff, #167ebf);
    background-size: 200% 100%;
    animation: borderAnimation 3s linear infinite;
}

/* Franja inferior - al final del contenido */
.bottom-border {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #ffffff, #167ebf, #0c64a6, #ffffff);
    background-size: 200% 100%;
    animation: borderAnimation 4s linear infinite;
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.login-header {
    padding: 20px 10px;
    text-align: center;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
        url(/SIC/img/Back_03.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;

}

.login-body {
    background: white;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border-radius: 8px;
    border: 2px solid #e1e5eb;
    transition: all 0.3s;
    box-sizing: border-box;
    font-size: 16px;
}

.form-control:focus {
    border-color: #167ebf; /* Azul original */
    box-shadow: 0 0 0 0.25rem rgba(22, 126, 191, 0.25); /* Azul atenuado */
}

.form-control:focus + .input-icon {
    color: #167ebf;
}
    
.toggle-password {
    position: absolute;
    right: 40px;
    top: 12px;
    color: #6c757d;
    cursor: pointer;
    transition: opacity 0.3s;
    opacity: 0; /* Inicialmente oculto */
}

.toggle-password:hover {
    color: #167ebf;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #6c757d;
    transition: color 0.3s;
}

.clear-input {
    position: absolute;
    right: 15px;
    top: 12px;
    color: #6c757d;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

/* Mostrar ambos íconos cuando hay texto */
.form-control:not(:placeholder-shown) ~ .toggle-password,
.form-control:not(:placeholder-shown) ~ .clear-input {
    opacity: 1;
}

.form-check-label {
    font-size: 0.9rem;
}

.forget-link-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
        }

.forget-link {
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forget-link:hover {
    color: #AA0000;
    text-decoration: underline;
}

/* Estilos para ALERTAS */
.alert {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 18px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Estilos para los botones */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Utilidades para reemplazar Bootstrap */
.d-none {
    display: none !important;
}

.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-2 { margin-left: 8px; }

.text-danger {
    color: #dc3545 !important;
}

/* Spinner para reemplazar Bootstrap */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.8rem;
    height: 0.8rem;
    border-width: 1px;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
        
.btn-login {
    background: linear-gradient(135deg, #167ebf, #0c64a6);
    border: none;
    color: lightgray;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.btn-recupera {
    background: linear-gradient(135deg, #167ebf, #0c64a6);
    border: none;
    color: lightgray;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.btn-login:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(22, 126, 191, 0.6);
}

.btn-recupera:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 126, 191, 0.4);
}

.login-footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    background: linear-gradient(135deg, #0c64a6, #0771b6, #167ebf, #0d68a1);
}

/* Estilos para el formulario de recuperación */
#recoveryForm {
    display: none;
}

.back-to-login {
    cursor: pointer;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.back-to-login:hover {
    color: #AA0000;
    /*text-decoration: none;*/
}

/* Responsive */
@media (max-width: 576px) {
    .login-body {
        padding: 10px;
        padding-top: 90px;
    }

    .remember-forgot {
        color: #43c83c;
        flex-direction: column;
        align-items: flex-start;
    }

    .remember-forgot a {
        margin-top: 5px;
    }
}

.system-label {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;

}

.login-title {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Estado de carga del botón */
.btn-loading {
    color: white;
    pointer-events: none;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}

/* Spinner personalizado */
.custom-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* para mejorar la resposividad */
@media (max-width: 576px) {
    .login-container {
        margin: 10px;
        max-width: none;
    }
    
    .form-control {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
    }
    
    .input-icon, .clear-input {
        top: 10px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
}