/* ============================================================
   PBX SM LOGIN
   ============================================================ */

* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    margin: 0;
    min-height: 100vh;

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

    background: #f4f7fb;
    color: #172033;

    -webkit-font-smoothing: antialiased;
}


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

.account-page {
    width: 100%;
    min-height: 100vh;

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

    padding: 32px 16px 48px;
}


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

.account-card {
    width: 100%;
    max-width: 430px;

    background: #ffffff;

    border: 1px solid #dce3ed;
    border-radius: 20px;

    padding: 28px 26px 24px;

    box-shadow:
        0 16px 40px rgba(30, 50, 80, 0.08);
}


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

.account-header {
    text-align: center;
}


.account-logo {
    width: 58px;
    height: 58px;

    margin: 0 auto 12px;

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

    border-radius: 15px;

    background: #172033;
    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    letter-spacing: -0.5px;

    box-shadow:
        0 8px 18px rgba(23, 32, 51, 0.18);
}


.account-brand {
    display: flex;
    flex-direction: column;

    align-items: center;

    margin-bottom: 20px;
}


.account-brand strong {
    font-size: 16px;
    line-height: 20px;

    color: #172033;
}


.account-brand span {
    margin-top: 2px;

    font-size: 11px;
    line-height: 16px;

    color: #8190a6;
}


.account-header h1 {
    margin: 0;

    font-size: 26px;
    line-height: 34px;

    font-weight: 700;

    letter-spacing: -0.4px;

    color: #172033;
}


.account-header > p {
    margin: 7px 0 22px;

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

    color: #66758c;
}


/* ============================================================
   BROWSER STATUS
   ============================================================ */

.device-status {
    width: 100%;

    min-height: 40px;

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

    padding: 9px 12px;

    border: 1px solid #dce3ed;
    border-radius: 9px;

    background: #f7f9fc;

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

    color: #66758c;

    text-align: center;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


.device-status.browser-ready {
    background: #effdf5;
    border-color: #bcebd0;
    color: #087a42;
}


.device-status.browser-error {
    background: #fff2f2;
    border-color: #ffcaca;
    color: #d92323;
}


/* ============================================================
   BROWSER REQUIRED
   ============================================================ */

.browser-required {
    margin-top: 14px;

    padding: 20px 18px;

    text-align: center;

    border: 1px solid #ffc4c4;
    border-radius: 13px;

    background: #fff4f4;
}


.browser-required-icon {
    width: 34px;
    height: 34px;

    margin: 0 auto 10px;

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

    border-radius: 50%;

    background: #ffe2e2;
    color: #d92323;

    font-size: 18px;
    font-weight: 800;
}


.browser-required h2 {
    margin: 0 0 8px;

    font-size: 17px;
    line-height: 23px;

    color: #d92323;
}


.browser-required p {
    margin: 6px 0;

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

    color: #b32a2a;
}


/* ============================================================
   LOGIN SECTION
   ============================================================ */

.login-section {
    margin-top: 20px;
}


.login-section[hidden],
.browser-required[hidden],
.create-account-section[hidden],
.form-message[hidden] {
    display: none;
}


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

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


.form-group label {
    display: block;

    margin-bottom: 7px;

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

    font-weight: 600;

    color: #172033;
}


.form-group input {
    width: 100%;
    height: 44px;

    display: block;

    padding: 0 13px;

    border: 1px solid #d3dce8;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
    color: #172033;

    font-family: inherit;
    font-size: 13px;

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


.form-group input::placeholder {
    color: #98a6ba;
}


.form-group input:focus {
    border-color: #2c65e8;

    box-shadow:
        0 0 0 3px rgba(44, 101, 232, 0.10);
}


.form-group input.input-error {
    border-color: #ef5350;

    background: #fffafa;
}


.password-wrapper {
    position: relative;
}


.password-wrapper input {
    padding-right: 70px;
}


.password-toggle {
    position: absolute;

    top: 50%;
    right: 10px;

    transform: translateY(-50%);

    border: 0;
    background: transparent;

    padding: 6px 4px;

    color: #1260ed;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


.password-toggle:hover {
    color: #084bc4;
}


.password-toggle:focus-visible {
    outline: 2px solid #2c65e8;
    outline-offset: 2px;
    border-radius: 4px;
}


/* ============================================================
   FIELD ERROR
   ============================================================ */

.field-error {
    display: block;

    min-height: 0;

    margin-top: 5px;

    color: #dc2626;

    font-size: 11px;
    line-height: 16px;
}


/* ============================================================
   LOGIN OPTIONS
   ============================================================ */

.login-options {
    display: flex;
    justify-content: flex-end;

    margin-top: -2px;
    margin-bottom: 14px;
}


.forgot-password-link {
    color: #1260ed;

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

    font-weight: 600;

    text-decoration: none;
}


.forgot-password-link:hover {
    text-decoration: underline;
}


/* ============================================================
   SERVER MESSAGE
   ============================================================ */

.form-message {
    width: 100%;

    margin-bottom: 12px;

    padding: 10px 12px;

    border: 1px solid #ffcaca;
    border-radius: 8px;

    background: #fff2f2;

    color: #dc2626;

    text-align: center;

    font-size: 12px;
    line-height: 17px;
}


.form-message.success {
    border-color: #bcebd0;
    background: #effdf5;
    color: #087a42;
}


.form-message.error {
    border-color: #ffcaca;
    background: #fff2f2;
    color: #dc2626;
}


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

.primary-button {
    width: 100%;
    height: 44px;

    border: 0;
    border-radius: 9px;

    background: #2463e8;
    color: #ffffff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.1s ease,
        opacity 0.15s ease;
}


.primary-button:hover {
    background: #1c56d0;
}


.primary-button:active {
    transform: translateY(1px);
}


.primary-button:disabled {
    opacity: 0.65;
    cursor: wait;
}


/* ============================================================
   DIVIDER
   ============================================================ */

.account-divider {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 12px;

    margin: 24px 0 20px;
}


.account-divider::before,
.account-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #dce3ed;
}


.account-divider span {
    flex: 0 0 auto;

    color: #8090a6;

    font-size: 9px;
    line-height: 14px;

    font-weight: 600;

    letter-spacing: 0.5px;
}


/* ============================================================
   CREATE ACCOUNT
   ============================================================ */

.create-account {
    text-align: center;
}


.create-account h2 {
    margin: 0 0 6px;

    color: #172033;

    font-size: 15px;
    line-height: 21px;

    font-weight: 700;
}


.create-account p {
    margin: 0 0 14px;

    color: #66758c;

    font-size: 11px;
    line-height: 18px;
}


.secondary-button {
    width: 100%;
    min-height: 44px;

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

    border: 1px solid #d3dce8;
    border-radius: 9px;

    background: #ffffff;
    color: #172033;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.secondary-button:hover {
    border-color: #aebbd0;
    background: #f8fafc;
}


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

.account-footer {
    margin-top: 18px;
    padding-top: 16px;

    border-top: 1px solid #e4e9f0;

    text-align: center;
}


.account-footer p {
    margin: 0;

    color: #8b98aa;

    font-size: 10px;
    line-height: 16px;
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.visually-hidden {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


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

@media (max-width: 480px) {

    .account-page {
        min-height: 100vh;

        padding:
            20px 14px 36px;
    }


    .account-card {
        max-width: 100%;

        padding:
            25px 18px 20px;

        border-radius: 16px;
    }


    .account-logo {
        width: 56px;
        height: 56px;
    }


    .account-header h1 {
        font-size: 24px;
        line-height: 31px;
    }


    .account-header > p {
        margin-bottom: 20px;
    }


    .browser-required {
        padding:
            18px 14px;
    }

}


/* ============================================================
   VERY SMALL SCREENS
   ============================================================ */

@media (max-width: 360px) {

    .account-page {
        padding:
            12px 10px 28px;
    }


    .account-card {
        padding:
            22px 15px 18px;
    }


    .account-header h1 {
        font-size: 22px;
    }


    .form-group input,
    .primary-button,
    .secondary-button {
        height: 43px;
    }

}