html {
    height: 100%;
    overflow-y: visible; 
}
body {
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Ubuntu', 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    position: relative;
}

/* Efecto de partículas/círculos en fondo */
body:before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
}

@keyframes floatParticles {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

body:after {
    width: 100%;
    position: static;
    content: normal;
}

h3 {
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.page-back {
    padding: 50px 0;
    min-height: 100%;
    overflow: hidden;
    background-size: cover;
    position: relative;
}

/* Logo container centrado arriba del formulario */
.page-back > .text-center {
    position: relative;
    z-index: 10;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.page-back > .text-center img {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

.login-page .login-form-div {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.login-page .login-content,
.login-page .reg-content {
    background-color: white;
    padding: 40px 30px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Efecto glassmorphism */
.login-page .login-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.login-page .div-title {
    margin: 0 0 30px 0;
    text-align: center;
}

.login-page .div-title h3 {
    font-size: 24px;
    line-height: 1.5;
    color: #1e293b;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 5px 0;
}

/* Inputs modernos */
.login-page .textbox-wrap {
    margin-bottom: 20px;
}

.login-page .input-group {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.login-page .input-group:focus-within {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.login-page .input-group .input-group-addon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 14px 15px;
    border-radius: 0 !important;
    
    align-items: center;
    min-height: 48px;
}

.login-page .input-group .input-group-addon i {
    font-size: 18px;
    width: auto;
    padding: 0;
    line-height: 1;
}

.login-page .input-group .input-group-addon button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0 0 0 8px;
    transition: all 0.2s;
}

.login-page .input-group .input-group-addon button:hover {
    transform: scale(1.1);
}

.login-page .form-control {
    border: none;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    height: auto;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    outline: none;
    box-shadow: none;
    background: #f8fafc;
}

.login-page .form-control::placeholder {
    color: #94a3b8;
    line-height: 1.5;
}

/* Checkbox moderno */
.login-page .custom-checkbox {
    float: left;
}

.login-page .checkbox {
    display: inline-block;
    margin-bottom: 0;
    margin-top: 6px;
    padding-left: 1px;
}

.login-page .checkbox-text {
    line-height: 22px;
    margin-left: 8px;
}

.login-page .checkbox label {
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
    padding-left: 0px;
    margin-top: 0;
    color: #64748b;
    font-size: 14px;
    transition: color 0.2s;
}

.login-page .checkbox label:hover {
    color: #667eea;
}

.login-page input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Botones modernos */
.login-page .btn {
    border-radius: 12px !important;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    min-height: 48px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-page .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.login-page .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.login-page .btn-success:active {
    transform: translateY(0);
}

.login-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Alertas mejoradas */
.login-page .alert {
    border-radius: 12px;
    border: none;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.4s ease-out;
}

.login-page .alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid #10b981;
}

.login-page .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.login-page .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

/* Links de formulario */
.login-page .login-form-links {
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: white;
    border-radius: 12px;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.login-page .login-form-links h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-page .login-form-links span {
    color: #64748b;
    font-size: 14px;
}

.login-page .login-form-links a {
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.login-page .login-form-links a:hover {
    transform: scale(1.05);
}

/* Formulario de registro */
.login-page .registration-form-div {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.login-page .reg-content {
    padding: 40px 30px 30px;
}

.login-page .reg-content .form-group label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    display: block;
    line-height: 1.5;
    font-size: 14px;
}

.login-page .reg-content .help-block {
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    margin-top: 5px;
}

.login-page .registration-form-action {
    background-color: white;
    padding: 20px;
}

.login-page .registration-left-div {
    padding-left: 0;
    padding-right: 15px;
}

.login-page .registration-right-div {
    padding-left: 15px;
    padding-right: 0;
}

/* Captcha */
.div-captcha-left {
    padding-right: 0;
}

.div-captcha-right {
    padding-left: 0;
}

.captcha-image img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reload-captcha {
    color: white !important;
    transition: all 0.2s;
}

.reload-captcha:hover {
    transform: rotate(180deg);
}

/* Form action */
.form-action {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 767px) {
    .page-back {
        padding: 30px 15px;
    }
    
    .login-page .login-form-div {
        max-width: 100%;
    }
    
    .login-page .login-content,
    .login-page .reg-content {
        padding: 30px 20px;
    }
    
    .login-page .registration-left-div {
        padding-right: 0px;
    }
    
    .login-page .registration-right-div {
        padding-left: 0px;
        margin-top: 15px;
    }
    
    .div-captcha-left {
        width: 50%;
        float: left;
    }
    
    .div-captcha-left img {
        width: 100%;
        height: 34px;
    }
    
    .div-captcha-right {
        width: 50%;
        float: left;
    }
    
    .login-page .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .form-action .pull-left,
    .form-action .pull-right {
        float: none !important;
        display: block;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-page .div-title h3 {
        font-size: 20px;
    }
    
    body:before {
        display: none;
    }
}

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

.login-page .btn i.fa-spin {
    animation: spin 1s linear infinite;
}

/* Accesibilidad */
.login-page .form-control:focus,
.login-page .btn:focus,
.login-page input[type="checkbox"]:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
