/* ============================================================
   PBX ACCOUNT PAGES
   Login / Signup
   ============================================================ */


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

* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    min-height: 100%;

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

    background: #f5f7fb;

    color: #1f2937;
}


body {
    min-height: 100vh;
}


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

.account-page {

    width: 100%;

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 32px 16px;
}


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

.account-card {

    width: 100%;

    max-width: 460px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 16px;

    padding: 32px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06);
}


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

.account-header {

    text-align: center;

    margin-bottom: 28px;
}


.account-logo {

    width: 58px;

    height: 58px;

    margin: 0 auto 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 14px;

    background: #111827;

    color: #ffffff;

    font-size: 18px;

    font-weight: 700;

    letter-spacing: 1px;
}


.account-header h1 {

    margin: 0 0 8px;

    font-size: 26px;

    line-height: 1.25;

    font-weight: 700;

    color: #111827;
}


.account-header p {

    margin: 0;

    font-size: 14px;

    line-height: 1.5;

    color: #6b7280;
}


/* ============================================================
   DEVICE STATUS
   ============================================================ */

.device-status {

    width: 100%;

    margin-bottom: 20px;

    padding: 11px 13px;

    border-radius: 8px;

    background: #f3f4f6;

    color: #6b7280;

    font-size: 13px;

    line-height: 1.4;

    text-align: center;
}


.device-status.success {

    background: #ecfdf5;

    color: #047857;
}


.device-status.error {

    background: #fef2f2;

    color: #b91c1c;
}


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

form {

    width: 100%;
}


.form-group {

    width: 100%;

    margin-bottom: 18px;
}


.form-group label {

    display: block;

    margin-bottom: 7px;

    font-size: 14px;

    font-weight: 600;

    color: #374151;
}


.form-group small {

    display: block;

    margin-top: 6px;

    font-size: 12px;

    line-height: 1.4;

    color: #6b7280;
}


/* ============================================================
   INPUTS
   ============================================================ */

input,
select {

    width: 100%;

    height: 46px;

    padding: 0 13px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;

    color: #111827;

    font-size: 15px;

    outline: none;

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


input::placeholder {

    color: #9ca3af;
}


input:focus,
select:focus {

    border-color: #4b5563;

    box-shadow:
        0 0 0 3px rgba(75, 85, 99, 0.12);
}


input:disabled,
select:disabled {

    background: #f3f4f6;

    color: #9ca3af;

    cursor: not-allowed;
}



/* ============================================================
   ACCOUNT SELECTOR - USE ANOTHER ACCOUNT
   ============================================================ */

.account-use-another {

    width: 100%;

    min-height: 40px;

    padding: 8px 12px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #ffffff;

    color: #4b5563;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

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


.account-use-another:hover {

    background: #f3f4f6;

    border-color: #9ca3af;

    color: #111827;
}


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

.password-wrapper {

    position: relative;

    width: 100%;
}


.password-wrapper input {

    padding-right: 70px;
}


.password-toggle {

    position: absolute;

    top: 50%;

    right: 8px;

    transform: translateY(-50%);

    height: 34px;

    padding: 0 9px;

    border: none;

    background: transparent;

    color: #4b5563;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}


.password-toggle:hover {

    color: #111827;
}


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

.field-error {

    min-height: 0;

    margin-top: 5px !important;

    color: #dc2626 !important;

    font-size: 12px !important;
}


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

.form-message {

    display: none;

    width: 100%;

    margin-bottom: 16px;

    padding: 11px 13px;

    border-radius: 8px;

    font-size: 13px;

    line-height: 1.45;
}


.form-message:not(:empty) {

    display: block;
}


.form-message.error {

    background: #fef2f2;

    color: #b91c1c;

    border: 1px solid #fecaca;
}


.form-message.success {

    background: #ecfdf5;

    color: #047857;

    border: 1px solid #a7f3d0;
}


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

.primary-button {

    width: 100%;

    height: 46px;

    border: none;

    border-radius: 9px;

    background: #111827;

    color: #ffffff;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

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


.primary-button:hover {

    background: #1f2937;
}


.primary-button:active {

    transform: translateY(1px);
}


.primary-button:disabled {

    opacity: 0.55;

    cursor: not-allowed;
}


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

.secondary-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding: 0 16px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #ffffff;

    color: #374151;

    font-size: 14px;

    font-weight: 600;

    text-decoration: none;

    cursor: pointer;

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


.secondary-button:hover {

    background: #f9fafb;

    border-color: #9ca3af;
}


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

.forgot-password {

    display: flex;

    justify-content: flex-end;

    margin-top: -5px;

    margin-bottom: 18px;
}


.forgot-password a {

    color: #4b5563;

    font-size: 13px;

    text-decoration: none;
}


.forgot-password a:hover {

    color: #111827;

    text-decoration: underline;
}


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

.account-divider {

    display: flex;

    align-items: center;

    gap: 12px;

    margin: 24px 0;

    color: #9ca3af;

    font-size: 12px;
}


.account-divider::before,
.account-divider::after {

    content: "";

    flex: 1;

    height: 1px;

    background: #e5e7eb;
}


.account-divider span {

    flex-shrink: 0;
}


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

.create-account {

    text-align: center;
}


.create-account p {

    margin: 0 0 12px;

    color: #6b7280;

    font-size: 13px;
}


.create-account .secondary-button {

    width: 100%;
}


/* ============================================================
   ACCOUNT SELECTOR
   ============================================================ */

.account-selector {

    margin-bottom: 24px;

    padding: 16px;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    background: #f9fafb;
}


.account-selector-header {

    margin-bottom: 14px;
}


.account-selector-header h2 {

    margin: 0 0 5px;

    font-size: 17px;

    color: #111827;
}


.account-selector-header p {

    margin: 0;

    font-size: 12px;

    line-height: 1.45;

    color: #6b7280;
}


/* ============================================================
   ACCOUNT LIST
   ============================================================ */

.account-list {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-bottom: 12px;
}


/* ============================================================
   ACCOUNT OPTION
   ============================================================ */

.account-option {

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 3px;

    padding: 12px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;

    text-align: left;

    cursor: pointer;

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


.account-option:hover {

    background: #f9fafb;

    border-color: #9ca3af;
}


.account-option.selected {

    border-color: #374151;

    background: #f3f4f6;
}


.account-option-name {

    width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #111827;

    font-size: 14px;

    font-weight: 600;
}


.account-option-contact {

    width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #6b7280;

    font-size: 12px;
}


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

.account-footer {

    margin-top: 24px;

    text-align: center;
}


.account-footer p {

    margin: 0;

    color: #9ca3af;

    font-size: 12px;

    line-height: 1.5;
}


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

input[type="date"] {

    color-scheme: light;
}


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

@media (
    max-width: 600px
) {

    .account-page {

        min-height: 100vh;

        align-items: flex-start;

        padding: 20px 12px;
    }


    .account-card {

        max-width: 100%;

        padding: 24px 18px;

        border-radius: 14px;

        box-shadow:
            0 6px 20px rgba(0, 0, 0, 0.05);
    }


    .account-header {

        margin-bottom: 22px;
    }


    .account-header h1 {

        font-size: 23px;
    }


    .account-logo {

        width: 52px;

        height: 52px;

        margin-bottom: 13px;
    }


    input,
    select {

        height: 48px;

        font-size: 16px;
    }


    .primary-button {

        height: 48px;

        font-size: 15px;
    }

}


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

@media (
    max-width: 360px
) {

    .account-page {

        padding: 12px 8px;
    }


    .account-card {

        padding: 20px 14px;
    }


    .account-header h1 {

        font-size: 21px;
    }


    .account-header p {

        font-size: 13px;
    }

}


/* ============================================================
   LARGE DESKTOP
   ============================================================ */

@media (
    min-width: 1000px
) {

    .account-page {

        padding: 50px 20px;
    }


    .account-card {

        max-width: 480px;

        padding: 38px;
    }

}