/*
 * BritTips 0.2.0 R3.1.4 - Authentication focused shell
 *
 * Public member authentication uses the canonical Public UI 0.3.0 visual system inside a focused, standalone auth shell.
 * Administrator-intent authentication remains an Operations Center surface,
 * using the canonical Admin UI 0.3.0 navy/red visual language.
 */

.auth-page {
    min-width: 320px;
}

.auth-page-member {
    margin: 0;
    min-height: 100vh;
    color: #f7f9fa;
    background:
        radial-gradient(circle at 20% 8%, rgba(205, 32, 41, 0.085), transparent 24rem),
        radial-gradient(circle at 82% 3%, rgba(16, 45, 68, 0.28), transparent 26rem),
        linear-gradient(180deg, #06101a 0%, #030a10 100%);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    --auth-accent: var(--bt-brand-red, #cd2029);
    --auth-accent-bright: var(--bt-brand-red-bright, #e23a43);
    --auth-accent-dark: var(--bt-brand-red-dark, #a91620);
    --auth-surface: rgba(7, 19, 30, 0.94);
    --auth-surface-raised: rgba(10, 25, 37, 0.98);
    --auth-border: rgba(139, 169, 187, 0.20);
    --auth-border-strong: rgba(205, 32, 41, 0.34);
    --auth-text: #f7f9fa;
    --auth-muted: #a9b7c2;
    --auth-dim: #738391;
}

.auth-page-admin {
    margin: 0;
    min-height: 100vh;
    --auth-accent: var(--ops-accent, #cd2029);
    --auth-accent-bright: var(--ops-accent-bright, #e23a43);
    --auth-accent-dark: #a91620;
    --auth-surface: rgba(7, 19, 30, 0.96);
    --auth-surface-raised: rgba(9, 23, 34, 0.99);
    --auth-border: var(--ops-border, rgba(161, 187, 203, 0.19));
    --auth-border-strong: rgba(205, 32, 41, 0.38);
    --auth-text: var(--ops-text, #f7f9fb);
    --auth-muted: var(--ops-muted, #b6c5cf);
    --auth-dim: var(--ops-dim, #7d919e);
    color: var(--auth-text);
    background:
        radial-gradient(circle at 75% 0%, rgba(205, 32, 41, 0.11), transparent 29rem),
        linear-gradient(180deg, #06101a 0, #050d15 44%, #02070c 100%);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth-page a {
    text-decoration: none;
}

.auth-member-shell {
    min-height: 100vh;
    padding: clamp(22px, 4vw, 46px) 18px;
    display: grid;
    place-items: center;
}

.auth-member-frame {
    width: min(1180px, 100%);
    display: grid;
    gap: 18px;
}

.auth-member-topbar {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-member-brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f7f9fa;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.auth-member-brand img {
    width: 31px;
    height: auto;
}

.auth-member-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 700;
    transition: color 160ms ease;
}

.auth-member-home:hover,
.auth-member-home:focus-visible {
    color: #f7f9fa;
    outline: none;
}

.auth-member-home-icon {
    width: 14px;
    height: 14px;
}

.auth-public-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 610px;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.78fr);
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 7%, rgba(205, 32, 41, 0.10), transparent 18rem),
        linear-gradient(135deg, rgba(8, 25, 38, 0.97), rgba(3, 11, 18, 0.99));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.30);
}

.auth-public-intro {
    position: relative;
    min-width: 0;
    padding: clamp(42px, 5vw, 68px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

.auth-public-intro::after {
    content: "";
    position: absolute;
    top: 42px;
    right: -1px;
    bottom: 42px;
    width: 1px;
    background: linear-gradient(transparent, rgba(139, 169, 187, 0.20), transparent);
}

.auth-public-intro h1 {
    max-width: 650px;
    margin: 12px 0 0;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-public-intro h1 span {
    color: var(--auth-accent-bright);
    text-shadow: 0 0 30px rgba(205, 32, 41, 0.20);
}

.auth-public-lead {
    max-width: 610px;
    margin: 22px 0 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.75;
}

.auth-public-benefits {
    display: grid;
    gap: 11px;
}

.auth-public-benefits > div {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid rgba(139, 169, 187, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(3, 13, 21, 0.42);
}

.auth-public-benefits > div > span {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 1px solid rgba(205, 32, 41, 0.25);
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #ff9096;
    background: rgba(205, 32, 41, 0.075);
}

.auth-public-benefits .ui-icon {
    width: 17px;
    height: 17px;
}

.auth-public-benefits strong,
.auth-public-benefits small {
    display: block;
}

.auth-public-benefits strong {
    color: #f3f6f8;
    font-size: 12px;
}

.auth-public-benefits small {
    margin-top: 3px;
    color: var(--auth-dim);
    font-size: 10px;
    line-height: 1.45;
}

.auth-public-form-side,
.auth-admin-form-side {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-public-form-side {
    padding: clamp(34px, 4vw, 54px);
    background:
        radial-gradient(circle at 100% 0%, rgba(205, 32, 41, 0.06), transparent 15rem),
        rgba(4, 14, 22, 0.70);
}

.auth-form-stack {
    width: min(100%, 490px);
    margin-inline: auto;
}

.auth-form-card {
    width: 100%;
}

.auth-form-card-wide,
.auth-form-stack:has(.auth-form-card-wide) {
    width: min(100%, 540px);
}

.auth-form-heading {
    margin-bottom: 28px;
}

.auth-card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #ff969c;
    background: rgba(205, 32, 41, 0.075);
}

.auth-card-icon .ui-icon {
    width: 20px;
    height: 20px;
}

.auth-kicker,
.auth-eyebrow {
    display: block;
    margin: 0;
    color: #ef777f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-form-card h2 {
    margin: 8px 0 0;
    color: var(--auth-text);
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-form-description {
    margin: 11px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.auth-field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.auth-field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.auth-label {
    color: #dce5ea;
    font-size: 12px;
    font-weight: 700;
}

.auth-input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(137, 167, 184, 0.27);
    border-radius: 8px;
    outline: none;
    color: #f5f8f9;
    background: rgba(3, 12, 19, 0.72);
    font: inherit;
    font-size: 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.auth-input:hover {
    border-color: rgba(137, 167, 184, 0.46);
}

.auth-input:focus {
    border-color: var(--auth-accent);
    background: rgba(6, 18, 27, 0.95);
    box-shadow: 0 0 0 3px rgba(205, 32, 41, 0.10);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f8f9;
    caret-color: #f5f8f9;
    box-shadow: 0 0 0 1000px #06121b inset, 0 0 0 3px rgba(205, 32, 41, 0.08);
    transition: background-color 9999s ease-in-out 0s;
}

.auth-help {
    margin: 0;
    color: var(--auth-dim);
    font-size: 10px;
    line-height: 1.5;
}

.auth-inline-link,
.auth-back a,
.auth-back span {
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 700;
}

.auth-inline-link,
.auth-back a {
    transition: color 160ms ease;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible,
.auth-back a:hover,
.auth-back a:focus-visible {
    color: #ff969c;
    outline: none;
}

.auth-button {
    width: 100%;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.auth-button:hover,
.auth-button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.auth-button-primary {
    border-color: var(--auth-accent);
    color: #fff;
    background: linear-gradient(135deg, var(--auth-accent-bright), var(--auth-accent-dark));
    box-shadow: 0 10px 28px rgba(205, 32, 41, 0.20);
}

.auth-button-primary:hover,
.auth-button-primary:focus-visible {
    box-shadow: 0 12px 34px rgba(205, 32, 41, 0.31);
}

.auth-button-secondary {
    border-color: rgba(139, 169, 187, 0.34);
    color: #edf3f6;
    background: rgba(10, 25, 37, 0.74);
}

.auth-button-secondary:hover,
.auth-button-secondary:focus-visible {
    border-color: rgba(205, 32, 41, 0.54);
    background: rgba(16, 37, 51, 0.88);
}

.auth-button .ui-icon {
    width: 16px;
    height: 16px;
}

.auth-back {
    margin-top: 22px;
    text-align: center;
}

.auth-back span a {
    margin-left: 3px;
    color: #e8eef1;
}

.auth-feedback {
    width: 100%;
    margin-bottom: 17px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 9px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    line-height: 1.55;
}

.auth-feedback-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-feedback.is-success {
    border-color: rgba(70, 185, 130, 0.31);
    color: #d9f8e9;
    background: rgba(70, 185, 130, 0.10);
}

.auth-feedback.is-error {
    border-color: rgba(240, 106, 118, 0.32);
    color: #ffd9dd;
    background: rgba(240, 106, 118, 0.10);
}

.auth-feedback.is-warning {
    margin: 0 0 18px;
    border-color: rgba(224, 173, 79, 0.32);
    color: #ffe9bc;
    background: rgba(224, 173, 79, 0.10);
}

.auth-check {
    position: relative;
    padding: 2px 0;
}

.auth-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.55;
}

.auth-check-input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: var(--auth-accent);
}

.auth-check-label a {
    color: #e5edf1;
    font-weight: 700;
}

.auth-check-label a:hover,
.auth-check-label a:focus-visible {
    color: #ff969c;
}

.auth-admin-shell {
    min-height: 100vh;
    padding: 18px;
    display: grid;
    place-items: center;
}

.auth-admin-layout {
    width: min(1180px, 100%);
    min-height: 650px;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.82fr);
    overflow: hidden;
    background: rgba(4, 13, 21, 0.88);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.auth-admin-visual {
    position: relative;
    min-width: 0;
    padding: clamp(40px, 5vw, 66px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 42px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 10%, rgba(205, 32, 41, 0.13), transparent 18rem),
        radial-gradient(circle at 92% 92%, rgba(104, 183, 232, 0.07), transparent 18rem),
        linear-gradient(145deg, #0a1c29, #05101a 72%);
}

.auth-admin-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0 70%, rgba(255, 255, 255, 0.018) 70% 70.6%, transparent 70.6%);
}

.auth-admin-visual > * {
    position: relative;
    z-index: 1;
}

.auth-admin-brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.auth-admin-brand img {
    width: 40px;
    height: auto;
}

.auth-admin-brand strong,
.auth-admin-brand small {
    display: block;
}

.auth-admin-brand strong {
    font-size: 22px;
    letter-spacing: -0.035em;
}

.auth-admin-brand small {
    margin-top: 3px;
    color: var(--auth-dim);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-admin-copy h1 {
    max-width: 620px;
    margin: 10px 0 0;
    font-size: clamp(42px, 5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-admin-copy h1 span {
    color: var(--auth-accent-bright);
}

.auth-admin-copy > p:last-child {
    max-width: 590px;
    margin: 21px 0 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.75;
}

.auth-admin-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-admin-trust span {
    padding: 7px 9px;
    border: 1px solid rgba(161, 187, 203, 0.18);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--auth-muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 9px;
    font-weight: 750;
}

.auth-trust-icon {
    width: 13px;
    height: 13px;
    color: #ef777f;
}

.auth-admin-form-side {
    padding: clamp(34px, 4.5vw, 58px);
    background:
        radial-gradient(circle at 100% 0%, rgba(205, 32, 41, 0.055), transparent 15rem),
        linear-gradient(180deg, rgba(9, 23, 34, 0.99), rgba(5, 15, 23, 0.99));
}

.auth-page-admin .auth-form-stack {
    width: min(100%, 430px);
}

.auth-page-admin .auth-form-card-wide,
.auth-page-admin .auth-form-stack:has(.auth-form-card-wide) {
    width: min(100%, 490px);
}

@media (max-width: 980px) {
    .auth-public-stage,
    .auth-admin-layout {
        grid-template-columns: 1fr;
    }

    .auth-public-stage {
        min-height: 0;
    }

    .auth-public-intro {
        padding-bottom: 38px;
    }

    .auth-public-intro::after {
        top: auto;
        right: 34px;
        bottom: 0;
        left: 34px;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(139, 169, 187, 0.20), transparent);
    }

    .auth-public-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-public-benefits > div {
        align-items: flex-start;
    }

    .auth-admin-layout {
        min-height: 0;
    }

    .auth-admin-visual {
        min-height: 390px;
    }
}

@media (max-width: 720px) {
    .auth-public-stage {
        border-radius: 14px;
    }

    .auth-public-intro,
    .auth-public-form-side,
    .auth-admin-visual,
    .auth-admin-form-side {
        padding: 30px 24px;
    }

    .auth-public-intro {
        gap: 32px;
    }

    .auth-public-intro h1,
    .auth-admin-copy h1 {
        font-size: clamp(37px, 11vw, 48px);
    }

    .auth-public-benefits {
        grid-template-columns: 1fr;
    }

    .auth-public-benefits > div {
        align-items: center;
    }

    .auth-admin-shell {
        padding: 10px;
    }

    .auth-admin-visual {
        min-height: 340px;
    }

    .auth-admin-trust {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-admin-trust span:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .auth-member-shell {
        padding: 14px 11px 18px;
    }

    .auth-member-frame {
        gap: 12px;
    }

    .auth-member-topbar {
        padding: 0 4px;
    }

    .auth-member-home span {
        display: none;
    }

    .auth-member-home {
        width: 36px;
        height: 36px;
        justify-content: center;
        border: 1px solid rgba(139, 169, 187, 0.20);
        border-radius: 9px;
        background: rgba(7, 19, 30, 0.66);
    }

    .auth-public-stage {
        width: 100%;
    }

    .auth-public-intro,
    .auth-public-form-side,
    .auth-admin-visual,
    .auth-admin-form-side {
        padding: 26px 20px;
    }

    .auth-field-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .auth-admin-trust {
        grid-template-columns: 1fr;
    }

    .auth-admin-trust span:last-child {
        grid-column: auto;
    }
}

/* Compatibility overrides for legacy auth rules still present in admin.css. */
.auth-form .auth-field + .auth-field {
    margin-top: 0;
}

.auth-form-card .auth-button {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.auth-form-card .auth-button-secondary {
    color: #edf3f6;
}

.auth-back a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.auth-back-icon {
    width: 14px;
    height: 14px;
}
