/* ========================================
   LOTTOSOFT - ESTILOS DE LOGIN
   ======================================== */

/* ========================================
   LOGIN PAGE BODY
   ======================================== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */
.login-container {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PANEL IZQUIERDO
   ======================================== */
.login-left {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 600px;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    opacity: 0.3;
}

.login-brand {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 3rem;
}

.logo-admin {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
    position: relative;
}

.logo-admin i {
    font-size: 2rem;
    color: white;
}

.floating-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.brand-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 300px;
    margin: 0 auto;
}

/* ========================================
   FEATURES GRID
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.feature-item {
    text-align: center;
    padding: 1rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.3);
}

.feature-icon i {
    font-size: 1.2rem;
    color: white;
}

.feature-content strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-content small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ========================================
   PANEL DERECHO - FORMULARIO
   ======================================== */
.login-right {
    padding: 3rem;
    position: relative;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
}

/* ========================================
   FORMULARIO
   ======================================== */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-500);
}

.input-group {
    display: flex;
    position: relative;
}

.input-group-icon {
    background: var(--gray-100);
    border: 2px solid #e5e7eb;
    border-right: none;
    color: var(--gray-600);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: all 0.3s ease;
}

.form-control-admin {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-left: none;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--gray-100);
    outline: none;
}

.form-control-admin:focus {
    border-color: var(--primary-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group:focus-within .input-group-icon {
    border-color: var(--primary-500);
    background: white;
}

.form-hint {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   BOTÓN PRINCIPAL
   ======================================== */
.btn-admin {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.btn-admin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-admin:hover::before {
    left: 100%;
}

.btn-admin:active {
    transform: translateY(0);
}

/* Loading state */
.btn-admin.btn-loading {
    pointer-events: none;
}

.btn-admin.btn-loading .btn-text {
    opacity: 0;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   ALERTAS
   ======================================== */
.alert-modern {
    border: none;
    border-radius: var(--radius-xl);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.alert-modern i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-modern strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* ========================================
   ENLACES Y AYUDA
   ======================================== */
.login-links {
    text-align: center;
    margin-bottom: 2rem;
}

.back-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary-500);
    transform: translateX(-3px);
}

.help-card {
    background: linear-gradient(135deg, var(--gray-100) 0%, #e5e7eb 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-500);
}

.help-title {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.help-title i {
    color: var(--primary-500);
}

.help-text {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 1rem;
    }
    
    .login-container {
        margin: 0;
    }
    
    .login-left, .login-right {
        padding: 2rem;
    }
    
    .login-left {
        min-height: auto;
        text-align: center;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .feature-item {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 0.5rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin: 0 1rem 0 0;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .login-left, .login-right {
        padding: 1.5rem;
    }
    
    .logo-admin {
        width: 60px;
        height: 60px;
    }
    
    .logo-admin i {
        font-size: 1.5rem;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }
    
    .input-group-icon {
        min-width: 45px;
        padding: 0.75rem;
    }
    
    .form-control-admin {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-admin {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */
.form-control-admin:focus {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.btn-admin:active {
    animation: buttonPress 0.1s ease;
}

@keyframes buttonPress {
    0% { transform: translateY(-2px) scale(1); }
    100% { transform: translateY(0) scale(0.98); }
}

/* ========================================
   ESTADOS ESPECIALES
   ======================================== */
.login-container.loading {
    pointer-events: none;
}

.login-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 1000;
}

/* Modo oscuro para futuro uso */
@media (prefers-color-scheme: dark) {
    .login-container {
        background: var(--gray-800);
        color: white;
    }
    
    .login-title {
        color: white;
    }
    
    .form-label {
        color: var(--gray-300);
    }
    
    .form-control-admin {
        background: var(--gray-700);
        border-color: var(--gray-600);
        color: white;
    }
}