:root {
    --orange: #f58220;
    --orange-dark: #df6f0b;

    --black: #111111;
    --black-soft: #1b1b1b;

    --text: #222222;
    --text-soft: #707070;

    --border: #e5e5e5;
    --background: #f4f4f4;

    --white: #ffffff;

    --danger: #c62828;
    --danger-bg: #fff1f1;

    --success: #237a3b;
    --success-bg: #eef9f1;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: var(--text);
    background: var(--background);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   PAGE
   ========================================================= */

.login-page {
    position: relative;

    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px 20px;

    background:
        radial-gradient(
            circle at 10% 15%,
            rgba(245, 130, 32, 0.12),
            transparent 27%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(0, 0, 0, 0.06),
            transparent 30%
        ),
        #f5f5f5;
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.login-card {
    width: 100%;
    max-width: 470px;

    overflow: hidden;

    background: var(--white);

    border-radius: 14px;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   HEADER
   ========================================================= */

.login-card__header {
    position: relative;

    padding: 38px 40px 34px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            #1c1c1c 0%,
            #080808 100%
        );

    border-bottom: 4px solid var(--orange);
}

.login-logo {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 24px;
}

.login-logo img {
    display: block;

    width: auto;
    max-width: 220px;
    max-height: 68px;
}

.login-card__heading h1 {
    margin: 0 0 7px;

    color: #ffffff;

    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.login-card__heading p {
    margin: 0;

    color: rgba(255, 255, 255, 0.65);

    font-size: 14px;
}


/* =========================================================
   BODY
   ========================================================= */

.login-card__body {
    padding: 36px 40px 30px;
}


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 21px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #333333;

    font-size: 13px;
    font-weight: 650;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.form-label-row label {
    margin-bottom: 8px;
}


/* =========================================================
   INPUT
   ========================================================= */

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 52px;

    padding:
        0
        48px
        0
        46px;

    color: var(--text);

    font-size: 15px;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 8px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #aaaaaa;
}

.input-wrapper input:focus {
    border-color: var(--orange);

    box-shadow:
        0 0 0 3px rgba(245, 130, 32, 0.12);
}

.input-icon {
    position: absolute;

    top: 50%;
    left: 16px;

    z-index: 2;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #888888;

    font-size: 18px;

    transform: translateY(-50%);

    pointer-events: none;
}

.input-wrapper:focus-within .input-icon {
    color: var(--orange);
}


/* =========================================================
   PASSWORD
   ========================================================= */

.password-toggle {
    position: absolute;

    top: 50%;
    right: 8px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #777777;

    font-size: 18px;

    background: transparent;

    border: 0;
    border-radius: 6px;

    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--orange);

    background: #f5f5f5;
}


/* =========================================================
   FORGOT LINK
   ========================================================= */

.forgot-link {
    padding: 0 0 8px;

    color: var(--orange);

    font-size: 12px;
    font-weight: 650;

    background: transparent;

    border: 0;
}

.forgot-link:hover {
    color: var(--orange-dark);
}


/* =========================================================
   BUTTON
   ========================================================= */

.login-button {
    width: 100%;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 6px;

    padding: 0 20px;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            var(--orange),
            var(--orange-dark)
        );

    border: 0;
    border-radius: 8px;

    box-shadow:
        0 7px 18px rgba(245, 130, 32, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(245, 130, 32, 0.28);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;

    opacity: 0.7;

    transform: none;
}

.login-button__loading {
    display: none;
}

.login-button.is-loading .login-button__text {
    display: none;
}

.login-button.is-loading .login-button__loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-button.is-loading .bi-arrow-repeat {
    animation: login-spin 0.8s linear infinite;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   REGISTER
   ========================================================= */

.register-section {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin-top: 26px;
    padding-top: 23px;

    color: var(--text-soft);

    font-size: 13px;

    border-top: 1px solid #eeeeee;
}

.register-section a {
    color: var(--orange);

    font-weight: 700;

    text-decoration: none;
}

.register-section a:hover {
    text-decoration: underline;
}


/* =========================================================
   ALERTS
   ========================================================= */

.login-alert {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-bottom: 22px;
    padding: 13px 15px;

    font-size: 13px;
    line-height: 1.5;

    border-radius: 7px;
}

.login-alert i {
    margin-top: 1px;

    font-size: 17px;
}

.login-alert--error {
    color: var(--danger);

    background: var(--danger-bg);

    border: 1px solid #f2cccc;
}

.login-alert--success {
    color: var(--success);

    background: var(--success-bg);

    border: 1px solid #cbe8d2;
}


/* =========================================================
   FOOTER
   ========================================================= */

.login-card__footer {
    min-height: 53px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 15px 20px;

    color: #888888;

    font-size: 11px;

    background: #fafafa;

    border-top: 1px solid #eeeeee;
}

.footer-divider {
    width: 3px;
    height: 3px;

    background: var(--orange);

    border-radius: 50%;
}


/* =========================================================
   MODAL
   ========================================================= */

.portal-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.portal-modal.is-open {
    display: flex;
}

.portal-modal__backdrop {
    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.62);

    backdrop-filter: blur(3px);
}

.portal-modal__dialog {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 430px;

    padding: 35px;

    background: #ffffff;

    border-radius: 12px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.28);
}

.portal-modal__close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #777777;

    background: #f4f4f4;

    border: 0;
    border-radius: 50%;
}

.portal-modal__close:hover {
    color: #ffffff;

    background: var(--orange);
}

.portal-modal__icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    color: var(--orange);

    font-size: 25px;

    background: rgba(245, 130, 32, 0.1);

    border-radius: 50%;
}

.portal-modal__content h2 {
    margin: 0 0 10px;

    color: var(--black);

    font-size: 21px;
}

.portal-modal__content > p {
    margin: 0 0 25px;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.6;
}

.forgot-message {
    display: none;

    margin-bottom: 15px;
    padding: 11px 13px;

    font-size: 12px;
    line-height: 1.5;

    border-radius: 6px;
}

.forgot-message.is-success {
    display: block;

    color: var(--success);

    background: var(--success-bg);
}

.forgot-message.is-error {
    display: block;

    color: var(--danger);

    background: var(--danger-bg);
}

body.modal-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

    .login-page {
        align-items: flex-start;

        padding:
            max(18px, env(safe-area-inset-top))
            14px
            max(18px, env(safe-area-inset-bottom));
    }

    .login-card {
        margin: auto 0;

        border-radius: 11px;
    }

    .login-card__header {
        padding: 31px 24px 27px;
    }

    .login-logo {
        margin-bottom: 20px;
    }

    .login-logo img {
        max-width: 190px;
        max-height: 60px;
    }

    .login-card__heading h1 {
        font-size: 21px;
    }

    .login-card__body {
        padding: 29px 23px 25px;
    }

    .input-wrapper input {
        height: 50px;

        font-size: 16px;
    }

    .login-button {
        height: 50px;
    }

    .register-section {
        flex-wrap: wrap;
    }

    .login-card__footer {
        flex-wrap: wrap;
    }

    .portal-modal {
        padding: 14px;
    }

    .portal-modal__dialog {
        padding: 30px 22px 24px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .login-card__body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .form-label-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 0;
    }

    .forgot-link {
        margin-top: -2px;
    }

}