/* Shared sign-in presentation for the Client portal and Studio console. */
:root {
    --auth-bg: var(--primary-black, #0d0d0d);
    --auth-panel: var(--secondary-black, #1a1a1a);
    --auth-panel-raised: #202020;
    --auth-border: rgba(255, 255, 255, .1);
    --auth-text: var(--text-white, #fff);
    --auth-muted: var(--muted-gray, #a0a0a0);
    --auth-accent: var(--accent-red, #ce0000);
    --auth-accent-hover: #a90000;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 26px;
    background:
        radial-gradient(circle at 15% 15%, rgba(206, 0, 0, .11), transparent 34%),
        radial-gradient(circle at 90% 85%, rgba(255, 255, 255, .025), transparent 32%),
        var(--auth-bg);
    color: var(--auth-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-wrapper {
    display: grid;
    grid-template-columns: minmax(330px, .78fr) minmax(0, 1.22fr);
    width: min(100%, 1040px);
    min-height: 530px;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 22px;
    background: var(--auth-panel);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.login-side {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 42px;
    background: #141414;
}

.login-content {
    width: 100%;
    max-width: 350px;
    margin: auto;
}

.login-heading {
    margin-bottom: 25px;
}

.login-heading h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 750;
    letter-spacing: -.04em;
}

.login-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: .84rem;
    line-height: 1.5;
}

.brand-side {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
    padding: 42px 48px;
    border-left: 1px solid var(--auth-border);
    background:
        radial-gradient(ellipse at 13% 5%, rgba(255, 255, 255, .09), transparent 25%),
        linear-gradient(145deg, #1b1b1b, #101010 72%);
}

.brand-side::before {
    position: absolute;
    right: -105px;
    bottom: -160px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .24), rgba(255, 255, 255, .035) 60%, transparent 72%);
    content: "";
    pointer-events: none;
}

.login-brand-image {
    display: block;
    width: 78px;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 0 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    object-fit: contain;
}

.brand-content {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    margin: auto 0 12px;
}

.eyebrow {
    margin-bottom: 12px;
    color: #e07878;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.brand-content h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -.05em;
}

.brand-content p {
    max-width: 390px;
    margin: 0;
    color: #b5b5b5;
    font-size: .88rem;
    line-height: 1.65;
}

.error-message,
.error-msg {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 18px;
    padding: 11px 12px;
    border: 1px solid rgba(206, 0, 0, .32);
    border-radius: 10px;
    background: rgba(206, 0, 0, .1);
    color: #f2bcbc;
    font-size: .82rem;
    line-height: 1.45;
}

.error-message i,
.error-msg i {
    flex: none;
    color: #ef7777;
}

.field {
    margin-bottom: 16px;
}

.field label,
.form-label {
    display: block;
    margin-bottom: 7px;
    color: #e5e5e5;
    font-size: .78rem;
    font-weight: 650;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #858585;
    font-size: 1rem;
    pointer-events: none;
}

.input-wrapper input,
.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 42px;
    border: 1px solid #3b3b3b;
    border-radius: 10px;
    outline: none;
    background: #1d1d1d;
    color: #fff;
    font: inherit;
    font-size: .84rem;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.input-wrapper input::placeholder,
.auth-input::placeholder {
    color: #858585;
}

.input-wrapper input:focus,
.auth-input:focus {
    border-color: var(--auth-accent);
    background: #202020;
    box-shadow: 0 0 0 3px rgba(206, 0, 0, .16);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #929292;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;
}

.password-toggle:focus-visible,
.login-button:focus-visible,
.register-link a:focus-visible,
.login-help a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.login-button,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
    padding: 11px 16px;
    border: 1px solid var(--auth-accent);
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    font: inherit;
    font-size: .84rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .18s;
}

.login-button:hover,
.btn-login:hover {
    transform: translateY(-1px);
    border-color: var(--auth-accent-hover);
    background: var(--auth-accent-hover);
    color: #fff;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    color: #8d8d8d;
    font-size: .69rem;
    text-align: center;
}

.security-note i {
    color: #d47777;
}

.register-link,
.login-help {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, .09);
    color: #999;
    font-size: .78rem;
    text-align: center;
}

.register-link a,
.login-help a {
    color: #e07878;
    font-weight: 700;
    text-decoration: none;
}

.register-link a:hover,
.login-help a:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    body.auth-page {
        align-items: flex-start;
        padding: 14px;
    }

    .login-wrapper {
        grid-template-columns: minmax(0, 1fr);
        max-width: 540px;
        min-height: auto;
        margin: auto;
        border-radius: 18px;
    }

    .login-side {
        grid-column: 1;
        grid-row: 1;
        padding: 32px;
    }

    .brand-side {
        grid-column: 1;
        grid-row: 2;
        min-height: 245px;
        padding: 28px 32px;
        border-top: 1px solid var(--auth-border);
        border-left: 0;
    }

    .brand-side::before {
        width: 260px;
        height: 260px;
    }

    .brand-content h1 {
        font-size: 2.15rem;
    }
}

@media (max-width: 420px) {
    body.auth-page {
        padding: 10px;
    }

    .login-side {
        padding: 26px 22px;
    }

    .brand-side {
        min-height: 220px;
        padding: 24px 22px;
    }

}
