/* Importar fuente Poppins desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset global */
*,
*:before,
*:after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Configuración del body */
body {
    background-color: #080710;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Alineación vertical */
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
}

#generalMessages {
    width: 400px;
    max-width: 90%;
    z-index: 2;
}

/* Círculos decorativos del fondo */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.background .shape {
    height: 200px;
    width: 200px;
    position: absolute;
    border-radius: 50%;
}

/* Círculo azul superior izquierdo */
.shape:first-child {
    background: linear-gradient(#1845ad, #23a2f6);
    left: calc(50% - 280px);
    top: calc(50% - 260px);
}

/* Círculo naranja inferior derecho */
.shape:last-child {
    background: linear-gradient(to right, #ff512f, #f09819);
    right: calc(50% - 280px);
    bottom: calc(50% - 260px);
}

/* Contenedor principal sin estilos duplicados */
.login-box {
    /* Solo actúa como contenedor, sin estilos visuales */
    position: relative;
    z-index: 2;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenedor para el formulario cuando no hay .login-box */
#login-view {
    position: relative;
    z-index: 2;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Formulario principal con efecto glassmorphism OPTIMIZADO */
form {
    height: 520px;
    width: 400px;
    /* Background optimizado con base negra menos transparente */
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.20) 50%,
        rgba(0, 0, 0, 0.15) 100%);
    position: relative;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(8, 7, 16, 0.6);
    padding: 50px 35px;
    z-index: 2;
    margin: 0 auto;
    /* Agregar aceleración por hardware */
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Estilos para todos los elementos del formulario */
form * {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    letter-spacing: 0.5px;
    outline: none;
    border: none;
}

/* Título KHARMA dentro del formulario */
form h3 {
    font-size: 36px;
    font-weight: 600;
    line-height: 42px;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3rem;
    text-transform: uppercase;
}

/* Título del formulario (legacy) */
.login-box h2 {
    font-size: 32px;
    font-weight: 500;
    line-height: 42px;
    text-align: center;
    margin-bottom: 30px;
}

/* Labels */
label {
    display: block;
    margin-top: 30px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Inputs */
input[type="email"],
input[type="password"],
input[type="text"],
.form-control {
    display: block;
    height: 50px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    padding: 0 10px;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 300;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    outline: none;
    transition: border-color 0.3s ease;
}

/* Placeholder de los inputs */
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder,
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Focus de los inputs */
input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
.form-control:focus {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Botón de envío */
button[type="submit"],
.btn {
    margin-top: 50px;
    width: 100%;
    height: 50px;
    background-color: #f75000;
    color: #ffffff;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(247, 80, 0, 0.3);
}

/* Efectos hover tipo React */
button[type="submit"]:hover,
.btn:hover {
    background-color: #e64500;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(247, 80, 0, 0.4);
    color: #ffffff;
}

/* Efecto de presión */
button[type="submit"]:active,
.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(247, 80, 0, 0.3);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de ondas al hacer clic */
button[type="submit"]::before,
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:active::before,
.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Enlaces */
a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* Texto centrado */
.text-center {
    text-align: center;
}

/* Checkbox personalizado */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    color: #ffffff;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #ffffff;
}

/* Alertas */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #ffffff;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.5);
}

/* Vistas de recuperación de contraseña */
.reset-email-view,
.reset-code-view,
.reset-password-view {
    display: none;
}

.reset-email-view.active,
.reset-code-view.active,
.reset-password-view.active {
    display: block;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 20px;
}

/* Input groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-text {
    position: absolute;
    right: 15px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 3;
    pointer-events: none;
}

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

/* Requisitos de contraseña */
#password-requirements-reset {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

#password-requirements-reset ul {
    list-style: none;
    padding-left: 0;
}

#password-requirements-reset li {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .login-box,
    form {
        width: 90%;
        height: auto;
        padding: 30px 25px;
    }
    
    .background {
        width: 100%;
        height: 100%;
    }
    
    .shape {
        width: 150px !important;
        height: 150px !important;
    }
}

/* Estilos específicos para el card de AdminLTE */
.card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.card-header {
    background: transparent !important;
    border: none !important;
}

.card-body {
    background: transparent !important;
    padding: 0 !important;
}

/* Ocultar elementos innecesarios */
.login-logo {
    display: none;
}

/* Ajustes para mantener compatibilidad */
.login-box-msg {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 20px;
}