/* Modern Login Screen Styles v2 */

@font-face {
    font-family: Poppins;
    src: url('../../fonts/Poppins/Light/Poppins-Light.woff2') format('woff2'),
         url('../../fonts/Poppins/Light/Poppins-Light.woff') format('woff'),
         url('../../fonts/Poppins/Light/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: Poppins;
    src: url('../../fonts/Poppins/Regular/Poppins-Regular.woff2') format('woff2'),
         url('../../fonts/Poppins/Regular/Poppins-Regular.woff') format('woff'),
         url('../../fonts/Poppins/Regular/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: Poppins;
    src: url('../../fonts/Poppins/SemiBold/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: Poppins;
    src: url('../../fonts/Poppins/Bold/Poppins-Bold.woff2') format('woff2'),
         url('../../fonts/Poppins/Bold/Poppins-Bold.woff') format('woff'),
         url('../../fonts/Poppins/Bold/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #ffffff;
    color: #1d1d1f;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #e5007e;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

.login-wrapper {
    min-height: 100vh;
    width: 100%;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.login-form-panel {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    justify-content: center;
    padding: 60px 48px 100px;
    background: #f3f3f3;
    position: relative;
}

.login-content {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 160px);
    padding-bottom: 48px;
}

.login-header {
    margin-top: 40px;
    margin-bottom: 32px;
    text-align: center;
}

.autowork-logo {
    width: 210px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-heading {
    font-size: 20px;
    line-height: 1.4;
    font-weight: 400;
    color: #404040;
    text-align: center;
    margin-bottom: 32px;
}

.login-form {
    width: 100%;
}

.form-section {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
    color: #404040;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #9d9d9d;
    background: transparent;
    border-radius: 0;
    padding: 9px 0 10px;
    font-size: 15px;
    color: #141414;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-bottom-color: #1d1d1f;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 34px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
}

.password-toggle::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    margin: 2px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23191919' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.password-toggle.is-visible::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23191919' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a21.77 21.77 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A10.94 10.94 0 0 1 12 5c7 0 11 7 11 7a21.72 21.72 0 0 1-3.16 4.19'/%3E%3Cpath d='M1 1l22 22'/%3E%3C/svg%3E");
}

.form-error {
    display: block;
    font-size: 12px;
    color: #d12b2b;
    margin-top: 6px;
}

.validation-messages {
    margin-bottom: 14px;
}

.validation-summary {
    padding: 10px 12px;
    font-size: 12px;
    border: 1px solid #ef5350;
    background: #ffebee;
    color: #c62828;
}

.validation-summary ul {
    padding-left: 16px;
}

.login-footer {
    margin-top: 4px;
}

.btn-login {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: #e5007e;
    color: #ffffff;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
}

.btn-login:hover {
    background: #c6006c;
}

.btn-login:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

.btn-login.loading {
    color: transparent;
    position: relative;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer-branding {
    position: absolute;
    left: 48px;
    bottom: 24px;
    margin-top: 0;
    padding-top: 0;
}

.powered-by-logo {
    width: 160px;
    max-width: 100%;
    height: auto;
    display: block;
}

.login-image-panel {
    flex: 0 0 60%;
    max-width: 60%;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 1200px) {
    .login-form-panel {
        padding: 48px 34px 80px;
    }

    .login-header {
        margin-top: 24px;
        margin-bottom: 32px;
    }

    .login-footer-branding {
        left: 34px;
        bottom: 20px;
    }
}

@media (max-height: 800px) {
    .login-form-panel {
        padding-top: 32px;
        padding-bottom: 80px;
    }

    .login-header {
        margin-top: 16px;
        margin-bottom: 24px;
    }

    .login-heading {
        margin-bottom: 24px;
    }

    .login-content {
        min-height: 0;
        padding-bottom: 24px;
    }
}

@media (max-height: 700px) {
    .login-form-panel {
        padding-top: 24px;
        padding-bottom: 64px;
    }

    .login-header {
        margin-top: 8px;
        margin-bottom: 16px;
    }

    .login-heading {
        margin-bottom: 16px;
        font-size: 18px;
    }

    .autowork-logo {
        width: 160px;
    }
}

@media (max-width: 960px) {
    .login-container {
        display: block;
    }

    .login-image-panel {
        display: none;
    }

    .login-form-panel {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 100vh;
        padding: 60px 34px 24px;
    }

    .login-content {
        min-height: 0;
        padding-bottom: 32px;
    }

    .login-footer-branding {
        position: static;
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 34px 22px 20px;
    }

    .login-content {
        max-width: none;
        padding-bottom: 24px;
    }

    .login-footer-branding {
        margin-top: 24px;
    }

    .btn-login {
        font-size: 16px;
    }
}
