/* Modern Login Styles - Portal Comunidad ManpowerGroup */

:root {
    --primary-color: #466da4;
    --secondary-color: #E47C32;
    --accent-color: #919191;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --transition: all 0.3s ease;
    /* Nuevos colores más claros */
    --bg-primary-light: #e3f2fd;
    --bg-secondary-light: #fff3e0;
    --bg-accent-light: #f3e5f5;
    --bg-gradient-light: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 50%, #fff3e0 100%);
    --bg-gradient-soft: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    background: var(--bg-gradient-light);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../Images/login_bg_left_new.jpg) no-repeat left top,
                url(../Images/login_bg_right_new.jpg) no-repeat right top;
    background-size: contain;
    opacity: 0.05;
    z-index: -1;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    margin: 0 4px;
    animation: loader 1.4s infinite ease-in-out both;
}

.loader span:nth-child(1) { animation-delay: -0.32s; }
.loader span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loader {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Main Container */
.main {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.wrapper {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Logo */
.logo {
    width: 180px;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Typography */
h1 {
    color: var(--gray-700);
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.login-title {
    color: var(--gray-700);
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.maintenance-title {
    color: var(--secondary-color);
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.parrafo {
    color: var(--gray-600);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Maintenance Mode Styles */
.maintenance-container {
    text-align: center;
}

.maintenance-content {
    margin-top: 2rem;
}

.maintenance-text {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.contact-info {
    margin: 1rem 0;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    display: inline-block;
    transition: var(--transition);
    background: var(--white);
}

.contact-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-600);
    text-align: center;
    white-space: nowrap;
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    height: 3rem;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    height: 3rem;
}

.input-group .form-control:focus {
    border-left: none;
}

.password-toggle {
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-left: none;
    color: var(--gray-600);
    transition: var(--transition);
    height: 3rem;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    height: 3rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-700);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(70, 109, 164, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #5a7bc8);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #5a7bc8, var(--primary-color));
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.w-100 {
    width: 100%;
}

/* Submit Button */
input[type="submit"] {
    width: 100%;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), #5a7bc8);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #5a7bc8, var(--primary-color));
}

/* Actions */
.actions {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links {
    margin-top: 1rem;
}

.login-links .btn-link {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

.alert i {
    margin-right: 0.5rem;
}

/* Captcha Styles */
.captcha-container {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-300);
    text-align: center;
}

.captcha-container label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: center;
}

.captcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
}

.g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
}

/* Footer */
.footer {
    background: var(--bg-gradient-soft);
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    min-height: 100px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apps {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.apps img {
    height: 35px;
    transition: var(--transition);
}

.apps img:hover {
    transform: scale(1.05);
}

.copy {
    color: var(--gray-600);
    font-size: 0.875rem;
    text-align: center;
}

.legal-links {
    margin-top: 0.5rem;
}

.legal-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--secondary-color);
}

.social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    color: var(--gray-600);
    font-size: 1.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.modal-header {
    background: var(--bg-gradient-soft);
    color: var(--gray-700);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    border: none;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    color: var(--gray-700);
    font-weight: 600;
}

.modal-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.modal-body {
    background: var(--white);
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    background: var(--gray-100);
}

.btn-aceptar {
    background: linear-gradient(135deg, var(--primary-color), #5a7bc8);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-aceptar:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #5a7bc8, var(--primary-color));
}

.btn-cancelar {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancelar:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
    border-color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-width: 100%;
    }
    
    .logo {
        width: 150px;
        margin-bottom: 1.5rem;
    }
    
    h1, .login-title, .maintenance-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .social {
        justify-content: center;
    }
    
    .apps {
        justify-content: center;
    }
    
    .g-recaptcha {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0.5rem;
    }
    
    .wrapper {
        padding: 1.5rem 1rem;
    }
    
    .logo {
        width: 120px;
    }
    
    h1, .login-title, .maintenance-title {
        font-size: 1.25rem;
    }
    
    .parrafo {
        font-size: 0.875rem;
    }
    
    .form-control, .input-group .form-control, .input-group-text, .password-toggle {
        height: 2.75rem;
    }
    
    input[type="submit"] {
        height: 2.75rem;
    }
    
    .g-recaptcha {
        transform: scale(0.7);
    }
}

@media (max-width: 320px) {
    .wrapper {
        padding: 1rem 0.75rem;
    }
    
    .logo {
        width: 100px;
    }
    
    h1, .login-title, .maintenance-title {
        font-size: 1.125rem;
    }
    
    .g-recaptcha {
        transform: scale(0.6);
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wrapper > * {
    animation: fadeInUp 0.6s ease-out;
}

.wrapper > *:nth-child(1) { animation-delay: 0.1s; }
.wrapper > *:nth-child(2) { animation-delay: 0.2s; }
.wrapper > *:nth-child(3) { animation-delay: 0.3s; }
.wrapper > *:nth-child(4) { animation-delay: 0.4s; }
.wrapper > *:nth-child(5) { animation-delay: 0.5s; }

/* Focus states for accessibility */
.form-control:focus,
.btn:focus,
input[type="submit"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading state for buttons */
.btn.loading,
input[type="submit"].loading {
    position: relative;
    color: transparent;
}

.btn.loading::after,
input[type="submit"].loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text validation styles */
.text-danger {
    color: var(--danger-color) !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Bootstrap overrides */
.btn-close {
    background: transparent;
    border: 0;
    color: var(--white);
    opacity: 0.8;
    transition: var(--transition);
}

.btn-close:hover {
    opacity: 1;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

@media (min-width: 576px) {
    .modal-dialog-centered {
        min-height: calc(100% - 3.5rem);
    }
}