/* New Login Design Styles - Completely Restructured */
/* Color principal: #1F2C5B */

/* Reset and Base Styles */
body.pace-top.bg-white.pace-done {
    background: transparent;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    overflow-x: hidden;
}

/* Layout Wrapper - Flexbox approach */
.login-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Top Header Bar - NO FIXED POSITION */
.login-top-header {
    background: #394447;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 10;
}

.top-header-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.top-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-header-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.top-header-text {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: bold;
    line-height: normal;
}

/* Header Section - NO FIXED POSITION */
.login-new-header {
    background: #1F2C5B;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    z-index: 9;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left h1 {
    color: #FFF;
    font-family: Montserrat;
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.header-logo-salud {
    width: 300px;
    height: auto;
    max-width: 100%;
}

.header-right .header-logo {
    width: 200px;
    height: auto;
    max-width: 100%;
}

/* Main Container - Flexbox with Background */
.login-new-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 500px;
}

/* Background Image - Absolute within container */
.login-new-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

    .login-new-background::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 200px;
        background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.05) 10%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.35) 40%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.65) 60%, rgba(255, 255, 255, 0.8) 70%, rgba(255, 255, 255, 0.9) 80%, rgba(255, 255, 255, 0.95) 90%, rgba(255, 255, 255, 1) 100%);
        z-index: 2;
    }

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Login Form Container - Centered and Responsive */
.login-new-form-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 350px;
    background: #FFF;
    border-radius: 8px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
    padding: 30px;
    margin: 20px auto;
}

.login-new-form {
    width: 100%;
}

.form-title {
    text-align: center;
    color: #3D5C7C;
    font-family: Montserrat;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 25px;
    margin-top: 0;
}

/* Form Groups */
.form-group-new {
    margin-bottom: 20px;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 2;
}

.form-control-new {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

    .form-control-new:focus {
        outline: none;
        border-color: #1F2C5B;
        box-shadow: 0 0 0 2px rgba(31, 44, 91, 0.1);
    }

    .form-control-new::placeholder {
        color: #999;
        font-style: italic;
    }

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 16px;
}

    .toggle-password:hover {
        color: #1F2C5B;
    }

.btn-login-new {
    width: 100%;
    background: #1F2C5B;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn-login-new:hover {
        background: #2a4660;
    }

    .btn-login-new:active {
        transform: translateY(1px);
    }

.btn-text {
    display: block;
}

.btn-login-new .loader {
    /*display: none;*/
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

    /*.btn-login-new .loader.spinner-small-custom {
        display: block;
        width: 20px;
        height: 20px;
        border: 2px solid #ffffff;
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }*/

    /*.btn-login-new .loader.spinner-small-custom {
        background-image: url("../images/spinner-small.gif");
        width: 14px;
        height: 14px;
        border-style: none;
        float: left;
        margin: 3px 0 0 5px;
    }*/

@keyframes spin {
    to {
        transform: rotate(360deg) translateY(-50%);
    }
}

/* Footer Section - NO FIXED POSITION */
.login-new-footer {
    background: linear-gradient(to bottom, transparent 0%, transparent 5%, rgba(255, 255, 255, 0.1) 10%, rgba(255, 255, 255, 0.2) 15%, rgba(255, 255, 255, 0.4) 25%, rgba(255, 255, 255, 0.6) 35%, rgba(255, 255, 255, 0.8) 45%, rgba(255, 255, 255, 0.9) 55%, rgba(255, 255, 255, 0.95) 65%, rgba(255, 255, 255, 1) 75%, rgba(255, 255, 255, 1) 100%);
    padding: 30px 20px 30px 20px;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.footer-link-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    text-align: center;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: none;
    min-width: 0;
}

    .footer-link:hover {
        transform: none;
    }

.footer-icon-svg {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.footer-text {
    text-align: center;
}

.footer-question {
    display: block;
    color: #3D5C7C;
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.footer-action {
    color: #1F2C5B;
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
}

    .footer-action:hover {
        color: #2a4660;
    }

/* Bottom Footer */
.login-bottom-footer {
    background: #1F2C5B;
    height: 60px;
    flex-shrink: 0;
}

/* Validation Errors */
.text-danger {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* RESPONSIVE DESIGN - Mobile First Approach */

/* Tablets and Small Desktops: 768px - 1024px */
@media (max-width: 1024px) {
    .header-content {
        /* flex-direction: column; */
        padding-left: 20px;
        padding-right: 20px;
        text-align: center;
    }

    .header-left h1 {
        font-size: 28px;
    }

    .header-logo-salud {
        width: 250px;
    }

    .header-right .header-logo {
        width: 160px;
    }

    .login-new-form-container {
        max-width: 350px;
        padding: 25px;
    }

    .footer-link-container {
        gap: 30px;
    }
}

/* Tablets: 768px and below */
@media (max-width: 768px) {
    .top-header-content {
        padding: 0 15px;
    }

    .top-header-text {
        font-size: 12px;
    }

    .login-new-header {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 12px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .header-logo-salud {
        width: 200px;
    }

    .header-right .header-logo {
        width: 140px;
    }

    .login-new-container {
        padding: 20px 15px;
    }

    .login-new-form-container {
        max-width: 90%;
        padding: 20px;
        margin: 10px auto;
    }

    .form-title {
        font-size: 18px;
    }

    .form-control-new {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }

    .input-icon {
        font-size: 14px;
        left: 12px;
    }

    .toggle-password {
        font-size: 14px;
        right: 12px;
    }

    .btn-login-new {
        padding: 12px 15px;
        font-size: 14px;
    }

    .footer-link-container {
        flex-direction: column;
        gap: 25px;
    }

    .login-new-footer {
        padding: 50px 15px 25px 15px;
    }

    .footer-link {
        flex-direction: row;
        text-align: left;
        padding: 0;
        width: 100%;
        max-width: 300px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .footer-icon-svg {
        width: 40px;
        height: 40px;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .footer-text {
        text-align: left;
        flex: 1;
    }

    .footer-question {
        font-size: 14px;
    }

    .footer-action {
        font-size: 14px;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .top-header-icon {
        width: 16px;
        height: 16px;
    }

    .top-header-text {
        font-size: 11px;
    }

    .header-left h1 {
        font-size: 20px;
    }

    .header-logo-salud {
        width: 150px;
    }

    .header-right .header-logo {
        width: 120px;
    }

    .login-new-form-container {
        max-width: 95%;
        padding: 15px;
    }

    .form-title {
        font-size: 16px;
    }

    .form-control-new {
        padding: 10px 12px 10px 35px;
        font-size: 14px;
    }

    .input-icon {
        font-size: 12px;
        left: 10px;
    }

    .toggle-password {
        font-size: 12px;
        right: 10px;
    }

    .btn-login-new {
        padding: 10px 12px;
        font-size: 14px;
    }

    .footer-link {
        padding: 0;
        max-width: 280px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .footer-icon-svg {
        width: 35px;
        height: 35px;
    }

    .footer-question {
        font-size: 13px;
    }

    .footer-action {
        font-size: 13px;
    }

    .login-new-footer {
        padding: 45px 10px 20px 10px;
    }
}

/* Hide original navbar and override layouts */
.navbar.navbar-fixed-top {
    display: none !important;
}

.responsive.fade.page-sidebar-fixed.page-header-fixed.in {
    padding-top: 0 !important;
}

/* Override container styles */
.container.body-content {
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100%;
}

/* Disable any existing login styles that might conflict */
.login, .login-v2, .login-cover, .login-cover-image {
    display: none !important;
}

/* Ensure our new design takes precedence */
.login-new-header,
.login-new-container,
.login-new-form-container,
.login-new-footer {
    display: block !important;
    visibility: visible !important;
}

/* Bottom Footer */
.login-bottom-footer {
    background: #1F2C5B;
    height: 60px;
    flex-shrink: 0;
}
