/* Forge public authentication entry surfaces. Intentionally isolated from the signed-in app shell. */
html[data-forge-theme="anonymous"],
body.auth-page {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #f7f8fa !important;
}

body.auth-page {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    background-image: none !important;
    color: #101828;
}

body.auth-page::before {
    display: none !important;
}

.auth-entry-layout {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
    overflow: hidden;
    background: #f7f8fa;
}

.auth-entry-showcase {
    /* Keep the public dark showcase readable even when Forge theme tokens are present. */
    --forge-text: #fff;

    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 3vw, 46px);
    color: #fff;
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, .14), transparent 31%),
        radial-gradient(circle at 0% 100%, rgba(59, 130, 246, .11), transparent 28%),
        linear-gradient(145deg, #0d1420 0%, #151f30 52%, #0f1724 100%);
}

.auth-entry-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.62), transparent 88%);
}

.auth-entry-showcase-glow {
    position: absolute;
    width: min(34vw, 360px);
    aspect-ratio: 1;
    border-radius: 999px;
    pointer-events: none;
}

.auth-entry-showcase-glow-top {
    top: -22%;
    right: -18%;
    background: rgba(245, 158, 11, .08);
    border: 1px solid rgba(251, 191, 36, .08);
}

.auth-entry-showcase-glow-bottom {
    bottom: -28%;
    left: -20%;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(96, 165, 250, .07);
}

.auth-entry-brand,
.auth-entry-showcase-copy,
.auth-entry-preview,
.auth-entry-showcase-chips {
    position: relative;
    z-index: 1;
}

.auth-entry-brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    text-decoration: none;
}

.auth-entry-brand img {
    display: block;
    width: clamp(110px, 9vw, 145px);
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.18));
}

.auth-entry-showcase-copy {
    max-width: 620px;
    margin-top: clamp(34px, 8vh, 88px);
}

.auth-entry-showcase-eyebrow,
.auth-entry-card-eyebrow {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.auth-entry-showcase-eyebrow {
    margin-bottom: 12px;
    color: rgba(226, 232, 240, .68);
}

.auth-entry-showcase-copy h1 {
    max-width: 600px;
    margin: 0;
    color: #fff;
    font-size: clamp(34px, min(4.05vw, 7.2vh), 62px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 800;
}

.auth-entry-showcase-copy p {
    max-width: 500px;
    margin: clamp(12px, 2vh, 18px) 0 0;
    color: rgba(226, 232, 240, .78);
    font-size: clamp(13px, 1.05vw, 15px);
    line-height: 1.55;
}

.auth-entry-preview {
    width: min(700px, 108%);
    height: clamp(150px, 31vh, 320px);
    flex: 0 1 auto;
    margin-top: clamp(24px, 5vh, 54px);
    margin-right: -18%;
    align-self: flex-end;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
    box-shadow: 0 28px 68px rgba(0,0,0,.28);
    transform: perspective(1200px) rotateY(-2deg);
}

.auth-entry-preview-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 25px;
    padding: 0 11px;
    background: rgba(255,255,255,.075);
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.auth-entry-preview-chrome span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.32);
}

.auth-entry-preview img {
    display: block;
    width: 100%;
    height: calc(100% - 25px);
    object-fit: cover;
    object-position: top left;
    background: #fff;
}

.auth-entry-showcase-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
    padding-top: 16px;
}

.auth-entry-showcase-chips span {
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255,255,255,.05);
    color: rgba(248,250,252,.8);
    font-size: 10px;
    font-weight: 700;
}

.auth-entry-form-pane {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(14px, 3.5vh, 42px) clamp(18px, 5vw, 68px);
    background:
        radial-gradient(circle at 86% 4%, rgba(59,130,246,.045), transparent 28%),
        #f7f8fa;
}

.auth-entry-form-wrap {
    width: min(100%, 480px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    display: flex;
    flex-direction: column;
}

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

.auth-entry-card {
    width: 100%;
    flex: 0 1 auto;
    padding: clamp(18px, 2.7vh, 30px) clamp(20px, 2.8vw, 32px);
    overflow: hidden;
    border: 1px solid #e1e6ec;
    border-radius: 17px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(16,24,40,.075);
}

.auth-entry-card.auth-entry-card-wide {
    width: min(100%, 620px);
}

.auth-entry-card-header {
    margin-bottom: clamp(16px, 2.4vh, 24px);
}

.auth-entry-card-eyebrow {
    margin-bottom: 7px;
    color: #667085;
}

.auth-entry-card-header h2 {
    margin: 0;
    color: #101828;
    font-size: clamp(25px, min(2.5vw, 4.5vh), 34px);
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 800;
}

.auth-entry-card-header p {
    margin: 8px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.auth-entry-card .mb-3 {
    margin-bottom: clamp(10px, 1.6vh, 14px) !important;
}

.auth-entry-card .mb-4 {
    margin-bottom: clamp(12px, 1.8vh, 18px) !important;
}

.auth-entry-card .mt-3 {
    margin-top: clamp(10px, 1.5vh, 14px) !important;
}

.auth-entry-card .mt-4 {
    margin-top: clamp(14px, 2vh, 18px) !important;
}

.auth-entry-card label,
.auth-entry-card .form-label {
    margin-bottom: 5px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}

.auth-entry-card .form-control,
.auth-entry-card .form-select {
    min-height: 43px;
    padding-top: 8px;
    padding-bottom: 8px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #fff;
    color: #101828;
    box-shadow: none;
}

.auth-entry-card .form-control::placeholder {
    color: #98a2b3;
}

.auth-entry-card .form-control:focus,
.auth-entry-card .form-select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,.10);
}

.auth-entry-card .btn-primary {
    min-height: 43px;
    border-color: #111827;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.auth-entry-card .btn-primary:hover,
.auth-entry-card .btn-primary:focus {
    border-color: #1f2937;
    background: #1f2937;
}

.auth-entry-card .btn-outline-primary {
    border-color: #d0d5dd;
    color: #344054;
    background: #fff;
}

.auth-entry-card .btn-outline-primary:hover,
.auth-entry-card .btn-outline-primary:focus {
    border-color: #98a2b3;
    background: #f9fafb;
    color: #101828;
}

.auth-entry-card a,
.auth-entry-card .btn-link {
    color: #475467;
}

.auth-entry-card a:hover,
.auth-entry-card .btn-link:hover {
    color: #101828;
}

.auth-entry-card .text-muted,
.auth-entry-card .form-text,
.auth-entry-card .custom-control-label {
    color: #667085 !important;
}

.auth-entry-card .form-text {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.35;
}

.auth-entry-card .alert {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.35;
}

.auth-entry-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: #98a2b3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-entry-divider::before,
.auth-entry-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e7ec;
}

.auth-entry-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: clamp(12px, 1.8vh, 18px);
    padding: 4px;
    border-radius: 10px;
    background: #f2f4f7;
}

.auth-entry-mode-switch button {
    min-height: 35px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.auth-entry-mode-switch button.is-active {
    background: #fff;
    color: #101828;
    box-shadow: 0 1px 3px rgba(16,24,40,.08);
}

.auth-entry-inline-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: clamp(10px, 1.5vh, 14px) 0 0;
    padding: 9px 10px;
    border: 1px solid #e7eaf0;
    border-radius: 9px;
    background: #fafbfc;
    color: #667085;
    font-size: 11px;
    line-height: 1.4;
}

.auth-entry-inline-note i {
    margin-top: 1px;
    color: #667085;
}

.auth-entry-secondary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: clamp(10px, 1.5vh, 14px);
    font-size: 12px;
}

.auth-entry-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 15px;
    flex: 0 0 auto;
    margin-top: clamp(9px, 1.4vh, 14px);
    color: #98a2b3;
    font-size: 11px;
}

.auth-entry-footer a {
    color: #667085;
    text-decoration: none;
}

.auth-entry-footer a:hover {
    color: #344054;
}

.auth-entry-danger-panel,
.auth-entry-neutral-panel {
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: clamp(11px, 1.6vh, 15px);
    background: #fff;
}

.auth-entry-danger-panel {
    border-color: #fecdca;
    background: #fffafa;
}

.auth-entry-card .custom-control-input:checked ~ .custom-control-label::before {
    border-color: #111827;
    background: #111827;
}

.auth-entry-card .forge-pwa-auth-hint {
    margin-top: 10px;
    padding: 8px 10px;
    gap: 8px;
    box-shadow: none;
    font-size: 11px;
}

.auth-entry-card .forge-pwa-auth-hint span {
    font-size: 10px;
    line-height: 1.3;
}

.auth-entry-card .forge-pwa-install-actions {
    gap: 5px;
}

.auth-entry-card .forge-pwa-install-actions .btn {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 10px;
}

@media (max-width: 1180px) {
    .auth-entry-layout {
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
    }

    .auth-entry-showcase {
        padding: 28px;
    }

    .auth-entry-preview {
        width: 120%;
        margin-right: -30%;
    }
}

@media (max-width: 900px) {
    .auth-entry-layout {
        display: block;
        height: 100vh;
        height: 100dvh;
    }

    .auth-entry-showcase {
        display: none;
    }

    .auth-entry-form-pane {
        height: 100vh;
        height: 100dvh;
        padding: clamp(12px, 2.5vh, 22px) clamp(12px, 4vw, 26px);
    }

    .auth-entry-form-wrap {
        width: min(100%, 500px);
        max-height: calc(100dvh - 20px);
    }

    .auth-entry-mobile-brand {
        display: inline-flex;
        width: fit-content;
        align-self: center;
        margin: 0 auto clamp(8px, 1.5vh, 14px);
    }

    .auth-entry-mobile-brand img {
        display: block;
        width: clamp(92px, 24vw, 126px);
        height: auto;
    }

    .auth-entry-card {
        box-shadow: 0 14px 40px rgba(16,24,40,.07);
    }
}

@media (max-width: 520px) {
    .auth-entry-form-pane {
        padding-left: 10px;
        padding-right: 10px;
    }

    .auth-entry-card {
        padding-left: 17px;
        padding-right: 17px;
        border-radius: 14px;
    }

    .auth-entry-secondary-row {
        gap: 5px 10px;
    }

    .auth-entry-footer {
        gap: 5px 11px;
    }
}

@media (max-height: 720px) {
    .auth-entry-showcase {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-entry-showcase-copy {
        margin-top: 26px;
    }

    .auth-entry-showcase-copy p {
        margin-top: 10px;
    }

    .auth-entry-preview {
        height: clamp(120px, 25vh, 190px);
        margin-top: 20px;
    }

    .auth-entry-card {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .auth-entry-card-header {
        margin-bottom: 12px;
    }

    .auth-entry-card-header p {
        margin-top: 5px;
    }

    .auth-entry-card .form-control,
    .auth-entry-card .form-select,
    .auth-entry-card .btn-primary {
        min-height: 39px;
    }

    .auth-entry-inline-note {
        padding: 7px 9px;
    }

    .auth-entry-card .forge-pwa-auth-hint span {
        display: none;
    }
}

@media (max-height: 620px) {
    .auth-entry-showcase-copy p,
    .auth-entry-showcase-chips {
        display: none;
    }

    .auth-entry-preview {
        height: 21vh;
    }

    .auth-entry-card-header p,
    .auth-entry-inline-note {
        display: none;
    }

    .auth-entry-card-header {
        margin-bottom: 9px;
    }

    .auth-entry-card .mb-3 {
        margin-bottom: 8px !important;
    }

    .auth-entry-card .mt-3,
    .auth-entry-card .mt-4,
    .auth-entry-secondary-row {
        margin-top: 8px !important;
    }

    .auth-entry-danger-panel > p,
    .auth-entry-neutral-panel > p {
        display: none;
    }

    .auth-entry-danger-panel,
    .auth-entry-neutral-panel {
        padding: 9px 10px;
    }

    .auth-entry-footer {
        margin-top: 7px;
        font-size: 10px;
    }

    .auth-entry-mobile-brand {
        margin-bottom: 7px;
    }

    .auth-entry-mobile-brand img {
        width: 88px;
    }
}

@media (max-height: 540px) {
    .auth-entry-mobile-brand {
        display: none;
    }

    .auth-entry-card {
        padding: 10px 14px;
    }

    .auth-entry-card-eyebrow,
    .auth-entry-card-header p,
    .auth-entry-inline-note,
    .auth-entry-card .forge-pwa-auth-hint {
        display: none !important;
    }

    .auth-entry-card-header {
        margin-bottom: 7px;
    }

    .auth-entry-card-header h2 {
        font-size: 22px;
    }

    .auth-entry-card .form-control,
    .auth-entry-card .form-select,
    .auth-entry-card .btn-primary {
        min-height: 34px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .auth-entry-mode-switch {
        margin-bottom: 8px;
    }

    .auth-entry-mode-switch button {
        min-height: 31px;
    }

    .auth-entry-danger-panel,
    .auth-entry-neutral-panel {
        padding: 7px 9px;
    }

    .auth-entry-footer {
        margin-top: 4px;
        gap: 3px 10px;
        font-size: 9px;
    }
}
