:root {
    --navy: #0f2740;
    --navy-dark: #0a1c2e;
    --navy-light: #173b63;

    --blue: #2f6fed;
    --blue-dark: #245ecf;

    --page-background: #f4f7fa;
    --card-background: #ffffff;

    --text-primary: #102133;
    --text-secondary: #6b7c93;

    --border: #d9e2ec;

    --error-background: #fff2f2;
    --error-border: #f1b8b8;
    --error-text: #9f1c1c;
}


* {
    box-sizing: border-box;
}


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


body {
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text-primary);

    background: var(--page-background);
}


button,
input {
    font: inherit;
}


/* PAGE */

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

    display: grid;

    grid-template-columns:
        minmax(390px, 42%)
        1fr;
}


/* LEFT BRAND PANEL */

.auth-brand-panel {
    position: relative;

    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 64px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            var(--navy) 0%,
            var(--navy-dark) 100%
        );
}


.auth-brand {
    position: absolute;

    top: 36px;
    left: 58px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 1px;

    color: #ffffff;

    text-decoration: none;
}


.auth-brand-logo {
    display: block;

    width: 178px;
    height: auto;
}


.auth-brand-subtitle {
    margin-top: -1px;
    padding-left: 45px;

    color: #aab8c6;

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


.auth-brand-content {
    max-width: 530px;
}


.auth-brand-eyebrow {
    margin-bottom: 18px;

    color: #74a7f6;

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

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


.auth-brand-content h1 {
    margin: 0 0 22px;

    font-size: clamp(38px, 4vw, 54px);
    line-height: 1.08;

    letter-spacing: -1.4px;
}


.auth-brand-content p {
    max-width: 490px;

    margin: 0;

    color: #b5c3d0;

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


.auth-brand-footer {
    position: absolute;

    bottom: 34px;
    left: 64px;

    color: #70869a;

    font-size: 11px;

    letter-spacing: 1px;
}


/* RIGHT SIDE */

.auth-workspace {
    min-height: 100vh;

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

    padding: 48px;
}


.auth-card {
    width: 100%;
    max-width: 440px;

    padding: 40px;

    background: var(--card-background);

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

    border-radius: 12px;

    box-shadow:
        0 12px 40px
        rgba(17, 36, 54, 0.08);
}


.auth-mobile-brand {
    display: none;
}


/* HEADINGS */

.auth-eyebrow {
    margin: 0 0 9px;

    color: var(--blue);

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

    letter-spacing: 1.3px;

    text-transform: uppercase;
}


.auth-title {
    margin: 0;

    color: var(--text-primary);

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

    letter-spacing: -0.5px;
}


.auth-subtitle {
    margin: 10px 0 28px;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.5;
}


/* FORM */

.auth-field {
    margin-bottom: 20px;
}


.auth-label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-primary);

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


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

    gap: 20px;

    margin-bottom: 7px;
}


.auth-label-row .auth-label {
    margin: 0;
}


.auth-input {
    width: 100%;
    height: 46px;

    padding: 0 13px;

    border: 1px solid #cbd6e2;
    border-radius: 6px;

    background: #ffffff;

    color: var(--text-primary);

    outline: none;

    font-size: 14px;

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


.auth-input:hover {
    border-color: #acbccb;
}


.auth-input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(47, 111, 237, 0.12);
}


.auth-link {
    color: var(--blue);

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

    text-decoration: none;
}


.auth-link:hover {
    text-decoration: underline;
}


/* REMEMBER */

.auth-remember {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 2px 0 20px;

    color: var(--text-secondary);

    font-size: 13px;

    cursor: pointer;
}


.auth-remember input {
    width: 16px;
    height: 16px;

    margin: 0;
}


/* BUTTON */

.auth-button {
    width: 100%;
    height: 46px;

    border: none;
    border-radius: 6px;

    background: var(--blue);

    color: #ffffff;

    cursor: pointer;

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

    transition: background 0.15s ease;
}


.auth-button:hover {
    background: var(--blue-dark);
}


/* ERRORS */

.auth-error {
    margin-bottom: 20px;

    padding: 12px 14px;

    border: 1px solid var(--error-border);
    border-radius: 6px;

    background: var(--error-background);

    color: var(--error-text);

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


/* FOOTER LINK */

.auth-card-footer {
    margin-top: 26px;

    padding-top: 20px;

    border-top: 1px solid var(--border);

    color: var(--text-secondary);

    font-size: 13px;

    text-align: center;
}


.auth-card-footer a {
    color: var(--blue);

    font-weight: 600;

    text-decoration: none;
}


.auth-card-footer a:hover {
    text-decoration: underline;
}


/* MOBILE */

@media (max-width: 850px) {

    .auth-page {
        display: block;
    }


    .auth-brand-panel {
        display: none;
    }


    .auth-workspace {
        min-height: 100vh;

        display: block;

        padding:
            28px 18px
            40px;
    }


    .auth-mobile-brand {
        display: block;

        max-width: 440px;

        margin:
            0 auto
            28px;

        text-decoration: none;
    }


    .auth-mobile-brand-logo {
        display: block;

        width: 156px;
        height: auto;
    }


    .auth-card {
        margin: 0 auto;

        padding: 30px 24px;

        box-shadow:
            0 5px 24px
            rgba(17, 36, 54, 0.07);
    }

}


@media (max-width: 450px) {

    .auth-workspace {
        padding:
            22px 14px
            30px;
    }


    .auth-card {
        padding: 26px 20px;
    }


    .auth-title {
        font-size: 26px;
    }

}

/* SUCCESS MESSAGE */

.auth-success {
    margin-bottom: 20px;

    padding: 12px 14px;

    border: 1px solid #a9d8b7;
    border-radius: 6px;

    background: #f0fbf3;

    color: #176b35;

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

.auth-input[readonly] {
    background: #f4f7fa;
    color: var(--text-secondary);
    cursor: default;
}
/* ORGANIZATION INVITATIONS */

.auth-button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-button-secondary {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text-primary);
}

.auth-button-secondary:hover {
    background: #f4f7fa;
}

.invitation-summary {
    margin: 0 0 24px;
    padding: 4px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.invitation-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.invitation-summary-row:last-child {
    border-bottom: 0;
}

.invitation-summary-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.invitation-summary-value {
    min-width: 0;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.invitation-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.invitation-notice-warning {
    border-color: #f0d7a4;
    background: #fff9eb;
    color: #72520d;
}


/* PASSWORD CONTROLS */

.auth-password-control {
    position: relative;
}

.auth-password-control .auth-input {
    padding-right: 66px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    min-width: 48px;
    height: 32px;
    padding: 0 8px;

    border: 0;
    border-radius: 5px;
    background: transparent;

    color: var(--blue);
    cursor: pointer;

    font-size: 12px;
    font-weight: 600;
}

.auth-password-toggle:hover {
    background: #f2f6fb;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.auth-field-help {
    margin: 7px 0 0;

    color: var(--text-secondary);

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