/* ============================================
   PÁGINA DE LOGIN - ESTILOS COMPLETOS
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url("/img/ka.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   CONTENEDOR PRINCIPAL DE AUTENTICACIÓN
   ============================================ */
.auth-container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HEADER DEL LOGIN
   ============================================ */
.login-header {
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}


.logo-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    font-weight: bold;
}

.login-header h2 {
    font-size: 28px;
    margin: 0;
    font-weight: 600;
}

/* ============================================
   FORMULARIO DE LOGIN
   ============================================ */
.login-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.auth-container input[type="email"],
.auth-container input[type="password"],
.auth-container input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.auth-container input:focus {
    outline: none;
    border-color: #e53935;
    background: white;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.form-group input::placeholder,
.auth-container input::placeholder {
    color: #999;
}

/* ============================================
   BOTONES
   ============================================ */
button[type="submit"],
.auth-container button,
.auth-container .btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button[type="submit"]:hover,
.auth-container button:hover,
.auth-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.3);
}

button[type="submit"]:active,
.auth-container button:active {
    transform: translateY(0);
}

/* Botón secundario */
.auth-container .btn-secondary-custom {
    background-color: #007bff !important;
    color: #fff !important;
}

.auth-container .btn-secondary-custom:hover {
    background-color: #0056b3 !important;
}

/* ============================================
   ENLACES
   ============================================ */
.forgot-password-link,
.auth-container a {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #e53935;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link:hover,
.auth-container a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

/* ============================================
   DIVISOR
   ============================================ */
.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

/* ============================================
   PÁGINA DE RECUPERACIÓN DE CONTRASEÑA
   ============================================ */
.dojo-background {
    background-color: #3f3f3f;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.login-container-dojo {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card-dojo {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.header-dojo h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #3f3f3f;
}

.body-dojo {
    padding: 20px 0;
}

.login-message {
    margin-bottom: 20px;
    color: #6c757d;
    line-height: 1.6;
}

/* Ajustes para el botón de recuperación */
.btn-primary.btn-block {
    background-color: #e53935;
    border-color: #e53935;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary.btn-block:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.3);
}

/* ============================================
   INPUT GROUPS (AdminLTE)
   ============================================ */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group .form-control {
    padding-right: 45px;
}

.input-group-append {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.input-group-text {
    background: transparent;
    border: none;
    padding: 0 15px;
    color: #999;
}

/* ============================================
   MENSAJES DE ERROR
   ============================================ */
.invalid-feedback {
    display: block;
    color: #e53935;
    font-size: 13px;
    margin-top: 5px;
}

.is-invalid {
    border-color: #e53935 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .auth-container {
        border-radius: 15px;
        padding: 0;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-form {
        padding: 30px 20px;
    }

    .logo-container {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    button[type="submit"],
    .auth-container button {
        padding: 14px;
        font-size: 15px;
    }

    .login-card-dojo {
        padding: 25px 20px;
    }

    .header-dojo h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-container .form-group {
    animation: slideInRight 0.4s ease-out;
}

.auth-container .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.auth-container .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.auth-container button {
    animation: slideInRight 0.4s ease-out 0.3s both;
}

/* ============================================
   PRELOADER (para formularios)
   ============================================ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

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

.text-primary {
    color: #e53935 !important;
}