/* ===== Auth pages — built on the portal theme tokens in portal.css ===== */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--bg);
}

/* ── Left: brand panel ── */
.auth-brand {
    background: linear-gradient(150deg, var(--acc) 0%, var(--acc-dk) 100%);
    color: var(--on-dark);
    padding: 56px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::after {
    content: '';
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.auth-brand .epoch-logo {
    width: 156px;
    height: auto;
    color: var(--on-dark);
    position: relative;
    z-index: 1;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-brand-copy h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.25;
    margin-bottom: 12px;
}

.auth-brand-copy p {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, .82);
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

/* ── Right: form panel ── */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
}

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

.auth-card-mark {
    display: none;
    margin-bottom: 28px;
}

.auth-card-mark .epoch-logo {
    width: 118px;
    height: auto;
    color: var(--ink);
}

.auth-title {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 13.5px;
    color: var(--ink3);
    margin-bottom: 26px;
}

.auth-form .frow {
    margin-bottom: 16px;
}

/* Password field with a reveal toggle */
.auth-pw {
    position: relative;
}

.auth-pw .finp {
    padding-right: 42px;
}

.auth-pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ink4);
    border-radius: 7px;
    transition: .14s;
}

.auth-pw-toggle:hover {
    color: var(--ink2);
    background: var(--rule2);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink2);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--acc);
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 13.5px;
    border: none;
}

.auth-alt {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--ink3);
}

.auth-alt a {
    color: var(--acc-dk);
    font-weight: 700;
}

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

/* ── Validation ── */
.auth-err {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    margin-bottom: 20px;
    border: 1px solid var(--danger-bd);
    background: var(--danger-lt);
    color: var(--danger);
    border-radius: var(--r-sm);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}

.auth-err svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.finp.is-invalid {
    border-color: var(--danger-bd);
}

.finp.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(224, 56, 74, .14);
}

.ferr {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--danger);
    margin-top: 5px;
}

/* ── Standalone message pages (403 / 404) ── */
.auth-msg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    background: var(--bg);
}

.auth-msg-code {
    font-family: var(--fm);
    font-size: 62px;
    font-weight: 700;
    color: var(--acc);
    letter-spacing: -.03em;
    line-height: 1;
    margin-bottom: 14px;
}

.auth-msg h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 8px;
}

.auth-msg p {
    font-size: 13.5px;
    color: var(--ink3);
    max-width: 420px;
    margin-bottom: 26px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-wrap {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-card-mark {
        display: block;
    }
}
