.hf-sag-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: none;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: inherit;
}

.hf-sag-modal.is-open {
    display: flex;
}

.hf-sag-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 14, 22, .72);
    cursor: default;
}

.hf-sag-modal__card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(100%, 520px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 31px 30px 25px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-top: 5px solid #ff6600;
    border-radius: 19px;
    background: #fff;
    color: #1f2937;
    box-shadow: 0 24px 65px rgba(0, 0, 0, .32);
    animation: hfSagModalIn .18s ease-out;
}

.hf-sag-modal__close {
    position: absolute;
    top: 11px;
    right: 13px;
    display: grid;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font: 500 25px/1 Arial, sans-serif;
    cursor: pointer;
}

.hf-sag-modal__logo {
    display: block;
    width: 175px;
    max-width: 70%;
    height: auto;
    margin: 0 auto 23px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.hf-sag-modal__eyebrow {
    margin: 0 0 7px !important;
    color: #ff6600;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .14em;
    text-align: center;
    text-transform: uppercase;
}

.hf-sag-modal h2 {
    margin: 0 0 10px !important;
    color: #111827;
    font-size: 28px;
    font-weight: 950;
    line-height: 1.2;
    text-align: center;
    letter-spacing: -.025em;
}

.hf-sag-modal__copy {
    margin: 0 0 21px !important;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
    text-align: center;
}

.hf-sag-modal__label {
    display: block;
    margin: 0 0 15px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 850;
}

.hf-sag-modal__label input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 7px;
    padding: 12px 13px;
    border: 1px solid #9ca3af;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #111;
    font: 500 16px/1.3 inherit;
    box-shadow: none;
}

.hf-sag-modal__label input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, .14);
}

.hf-sag-modal__password-field {
    position: relative;
    display: block;
}

.hf-sag-modal__password-field input {
    padding-right: 66px;
}

.hf-sag-modal__password-field button {
    position: absolute;
    top: 50%;
    right: 12px;
    margin: 0 !important;
    padding: 4px !important;
    transform: translateY(-50%);
    border: 0 !important;
    background: transparent !important;
    color: #0066cc !important;
    font: 800 12px/1 inherit !important;
    cursor: pointer;
    box-shadow: none !important;
}

.hf-sag-modal__submit,
.hf-sag-modal__done {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    min-height: 51px;
    margin: 6px 0 0 !important;
    padding: 14px 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #ff6600 !important;
    color: #fff !important;
    font: 900 15px/1.3 inherit !important;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 102, 0, .2) !important;
}

.hf-sag-modal__submit:disabled {
    cursor: wait;
    opacity: .68;
}

.hf-sag-modal__done {
    margin-top: 18px !important;
}

.hf-sag-modal__notice {
    margin: 0 0 15px;
    padding: 12px 13px;
    border-left: 4px solid;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.hf-sag-modal__notice.is-error {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.hf-sag-modal__wait {
    margin: 10px 0 0 !important;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.hf-sag-modal__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 15px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.hf-sag-modal__password-links {
    margin: 14px 0 0 !important;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

.hf-sag-modal__password-links a,
.hf-sag-modal__password-links button {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #0066cc !important;
    font: inherit !important;
    text-decoration: underline;
    cursor: pointer;
    box-shadow: none !important;
}

.hf-sag-modal__text-button {
    display: block;
    margin: 13px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #0066cc !important;
    font: 700 12px/1.5 inherit !important;
    text-decoration: underline;
    cursor: pointer;
    box-shadow: none !important;
}

.hf-sag-modal__security {
    margin: 18px 0 0 !important;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.5;
    text-align: center;
}

body.hf-sag-modal-open {
    overflow: hidden !important;
}

@keyframes hfSagModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 520px) {
    .hf-sag-modal {
        align-items: flex-start;
        padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    }

    .hf-sag-modal__card {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 28px 18px 22px;
        border-radius: 16px;
    }

    .hf-sag-modal h2 {
        font-size: 25px;
    }

    .hf-sag-modal__logo {
        margin-bottom: 19px;
    }
}
