/* =========================================
   Worksorted login page
========================================= */

.ws-login-page {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding-top: 70px !important;
    padding-bottom: 70px !important;
    overflow: hidden;
    box-sizing: border-box;

    background:
        radial-gradient(circle at 12% 18%,
            rgba(29, 146, 189, 0.14) 0,
            rgba(29, 146, 189, 0) 28%),
        radial-gradient(circle at 88% 82%,
            rgba(69, 188, 220, 0.14) 0,
            rgba(69, 188, 220, 0) 30%),
        linear-gradient(135deg,
            #f7fbfd 0%,
            #eef8fc 48%,
            #f9fcfd 100%);
}
.ws-login-page>.row {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
}
.ws-login-page::before,
.ws-login-page::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    pointer-events: none;
}

.ws-login-page::before {
    top: 80px;
    left: 8%;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(29, 146, 189, 0.14);
}

.ws-login-page::after {
    right: 7%;
    bottom: 60px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(29, 146, 189, 0.12);
}

.ws-login-column {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
    flex: 0 0 500px;
}

.ws-login-card {
    padding: 48px 44px !important;
    border: 1px solid rgba(21, 67, 86, 0.09) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 28px 70px rgba(24, 73, 94, 0.12),
        0 8px 24px rgba(24, 73, 94, 0.06);
    backdrop-filter: blur(12px);
}

/* Header */

.ws-login-header {
    margin-bottom: 32px !important;
}

.ws-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    border-radius: 16px;
    color: #1d92bd;
    background: rgba(29, 146, 189, 0.11);
    font-size: 20px;
}

.ws-login-header h1,
.ws-2fa-header h2 {
    margin: 0 0 10px;
    color: #162b36;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.ws-login-header p,
.ws-2fa-header p {
    margin: 0;
    color: #6b7b84;
    font-size: 0.98rem;
    line-height: 1.65;
}

/* Form */

#login_form {
    padding-top: 5px !important;
    padding-bottom: 0 !important;
}

.ws-login-field label {
    display: block;
    margin-bottom: 9px;
    color: #263c47;
    font-size: 0.88rem;
    font-weight: 600;
}

.ws-login-card .input-group {
    border-radius: 12px;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.ws-login-card .input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(29, 146, 189, 0.12);
}

.ws-login-card .input-group-text {
    width: 50px !important;
    min-height: 52px;
    justify-content: center;
    border-color: #dce7eb !important;
    border-radius: 12px 0 0 12px !important;
    color: #758891 !important;
    background: #f8fbfc !important;
}

.ws-login-card .form-control {
    min-height: 52px;
    border-color: #dce7eb !important;
    border-left: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    color: #1c313b !important;
    font-size: 0.95rem;
    background: #ffffff !important;
    box-shadow: none !important;
}

.ws-login-card .form-control::placeholder {
    color: #a2afb5;
}

.ws-login-card .form-control:focus {
    border-color: #1d92bd !important;
}

.ws-login-card .input-group:focus-within .input-group-text {
    border-color: #1d92bd !important;
    color: #1d92bd !important;
    background: #f3fbfe !important;
}

/* Links */

.ws-login-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
    margin-bottom: 28px;
}

.ws-login-links a,
.ws-login-card a {
    color: #1d92bd;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ws-login-links a:hover,
.ws-login-card a:hover {
    color: #126f91;
    text-decoration: none;
}

/* Button */

.ws-login-button {
    min-height: 52px;
    border: 0 !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 700;
    background:
        linear-gradient(135deg,
            #1d92bd 0%,
            #147ba2 100%) !important;
    box-shadow: 0 12px 24px rgba(29, 146, 189, 0.24);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.ws-login-button:hover,
.ws-login-button:focus {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(29, 146, 189, 0.3);
}

.ws-login-button:active {
    transform: translateY(0);
}

/* Two-factor authentication */

.ws-2fa-header {
    margin-bottom: 30px;
    text-align: center;
}

#google2fa_form {
    padding-top: 5px;
}

#google2fa_form input[type="number"] {
    letter-spacing: 0.16em;
}

/* Error alert */

.ws-login-card .alert {
    margin: 4px 0 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 12px !important;
    color: #9b2c2c !important;
    background: #fff1f1 !important;
}

.ws-login-card .alert .close {
    color: #9b2c2c !important;
    opacity: 0.7;
}

#errorDialog {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

/* Modal */

#errorDialog .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(17, 44, 57, 0.2);
}

#errorDialog .modal-header {
    padding: 22px 24px;
    border-bottom-color: #edf2f4;
}

#errorDialog .modal-title {
    color: #1c313b;
    font-weight: 700;
}

#errorDialog .modal-body {
    padding: 24px;
    color: #5e7079;
    line-height: 1.7;
}

#errorDialog .modal-footer {
    padding: 18px 24px;
    border-top-color: #edf2f4;
}

#errorDialog .btn {
    border-radius: 9px;
}

/* Forgot password page */

.ws-password-back {
    margin-top: 18px;
}

.ws-password-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d92bd;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.ws-password-back a:hover {
    color: #126f91;
    text-decoration: none;
}

.ws-password-back i {
    font-size: 0.78rem;
}

/* Responsive */

@media (max-width: 767px) {
    .ws-login-column {
            flex: 0 0 100%;
            max-width: 500px;
        }
    .ws-login-page {
        min-height: auto;
        padding: 70px 16px !important;
    }

    .ws-login-card {
        padding: 38px 26px !important;
        border-radius: 20px !important;
    }

    .ws-login-header h1,
    .ws-2fa-header h2 {
        font-size: 1.75rem;
    }

    .ws-login-links {
        align-items: flex-start;
        flex-direction: column-reverse;
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .ws-login-page {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .ws-login-card {
        padding: 32px 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ws-login-card *,
    .ws-login-button {
        transition: none !important;
    }
}