/* Human Custom Patches — app-style invoice portal login */

.chp-login-body,
.chp-login-body.fi-body {
    --chp-gold: #c9a227;
    --chp-gold-soft: #e4c76a;
    --chp-gold-deep: #8a6d14;
    --chp-ink: #111111;
    --chp-ink-2: #1a1a1a;
    --chp-navy: #0b1020;
    --chp-navy-2: #141c32;
    --chp-paper: #f6f3ec;
    --chp-muted: #6c7378;
    --chp-line: rgba(17, 17, 17, 0.1);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--chp-navy) !important;
    color: var(--chp-ink-2);
    font-family: "Plus Jakarta Sans", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

html.dark .chp-login-body {
    background: var(--chp-navy) !important;
    color-scheme: light;
}

.chp-login-body #main,
.chp-login-body .fi-simple-layout,
.chp-login-body .fi-simple-main-ctn,
.chp-login-body .fi-simple-main,
.chp-login-body .fi-simple-page,
.chp-login-body .fi-main,
.chp-login-body .fi-page {
    max-width: none !important;
    width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.chp-login {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.chp-login__atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.chp-login__spot {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        520px circle at var(--spot-x, 28%) var(--spot-y, 32%),
        rgba(201, 162, 39, 0.18),
        transparent 46%
    );
    transition: background 80ms linear;
}

.chp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: chp-float 16s ease-in-out infinite;
}

.chp-orb--1 {
    width: 340px;
    height: 340px;
    top: -80px;
    left: -60px;
    background: rgba(201, 162, 39, 0.28);
}

.chp-orb--2 {
    width: 280px;
    height: 280px;
    right: 38%;
    bottom: -90px;
    background: rgba(54, 92, 168, 0.32);
    animation-delay: -6s;
}

.chp-orb--3 {
    width: 180px;
    height: 180px;
    top: 42%;
    left: 28%;
    background: rgba(255, 255, 255, 0.08);
    animation-delay: -11s;
}

.chp-login__grid {
    position: absolute;
    inset: 0;
    right: 42%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 78%);
}

.chp-login__noise {
    position: absolute;
    inset: 0;
    opacity: 0.16;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.chp-login__stage,
.chp-login__main {
    position: relative;
    z-index: 1;
}

.chp-login__stage {
    display: flex;
    align-items: center;
    padding: 40px 48px 48px;
    color: #f4efe4;
}

.chp-login__stage-inner {
    width: 100%;
    max-width: 540px;
    margin: 0 auto 0 6%;
}

.chp-login__brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.chp-login__brand--stage {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
}

.chp-login__mark-wrap {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.chp-login__brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.chp-login__brand--form {
    display: none;
    align-items: center;
    margin: 0 0 28px;
}

.chp-login__mark {
    width: 34px;
    height: 34px;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.chp-login__brand--form .chp-login__mark {
    width: 44px;
    height: 44px;
}

.chp-login__logo-img {
    display: block;
    max-height: 52px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.chp-login__logo-img--light {
    filter: brightness(0) invert(1);
}

.chp-login__wordmark {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: inherit;
}

.chp-login__brand--stage .chp-login__wordmark {
    font-size: 17px;
}

.chp-login__wordmark span {
    color: var(--chp-gold);
}

.chp-login__product {
    margin: 2px 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244, 239, 228, 0.62);
}

.chp-login__kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--chp-gold-soft);
}

.chp-login__headline {
    margin: 0 0 12px;
    font-size: clamp(32px, 3.8vw, 48px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
    color: #fff;
}

.chp-login__lede {
    margin: 0 0 26px;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(244, 239, 228, 0.72);
}

.chp-login__features {
    display: grid;
    gap: 12px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.chp-login__features li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
}

.chp-login__feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(201, 162, 39, 0.12);
    border: 1px solid rgba(201, 162, 39, 0.22);
    color: var(--chp-gold-soft);
}

.chp-login__feature-icon svg {
    width: 22px;
    height: 22px;
}

.chp-login__features strong {
    display: block;
    margin: 2px 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.chp-login__features span:not(.chp-login__feature-icon) {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(244, 239, 228, 0.62);
}

.chp-login__preview {
    width: 100%;
    max-width: 380px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    animation: chp-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chp-login__preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chp-login__preview-dots {
    display: flex;
    gap: 6px;
}

.chp-login__preview-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.chp-login__preview-dots i:first-child { background: #ff6b6b; }
.chp-login__preview-dots i:nth-child(2) { background: #f5c542; }
.chp-login__preview-dots i:nth-child(3) { background: #3dd68c; }

.chp-login__preview-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(244, 239, 228, 0.55);
}

.chp-login__preview-body {
    padding: 20px 18px 18px;
}

.chp-login__preview-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chp-login__preview-kicker {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--chp-gold-soft);
}

.chp-login__preview-client {
    margin: 4px 0 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
}

.chp-login__pill {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(61, 214, 140, 0.16);
    color: #7eecc0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chp-login__preview-meta {
    display: flex;
    gap: 16px;
    margin: 16px 0 18px;
    font-size: 13px;
    color: rgba(244, 239, 228, 0.58);
}

.chp-login__preview-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chp-login__preview-total span {
    font-size: 13px;
    color: rgba(244, 239, 228, 0.55);
}

.chp-login__preview-total strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
}

.chp-login__progress {
    height: 6px;
    margin-top: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.chp-login__progress span {
    display: block;
    width: 72%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--chp-gold-deep), var(--chp-gold-soft));
    animation: chp-fill 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chp-login__main {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 28px;
}

.chp-login__card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px 28px;
    border-radius: 28px;
    background: rgba(246, 243, 236, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(201, 162, 39, 0.08);
    backdrop-filter: blur(22px);
    text-align: left;
    animation: chp-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chp-login__steps {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
}

.chp-login__step-chip {
    padding: 5px 10px;
    border-radius: 999px;
    background: #ece7dc;
    color: #6c7378;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
}

.chp-login__step-chip.is-active {
    background: var(--chp-ink);
    color: #fff;
}

.chp-login__step-chip.is-done {
    background: rgba(201, 162, 39, 0.18);
    color: var(--chp-gold-deep);
}

.chp-login__step-line {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #d4cfc4;
}

.chp-login__intro h2 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.045em;
    color: var(--chp-ink);
}

.chp-login__intro p {
    margin: 0 0 24px;
    font-size: 15px;
    color: var(--chp-muted);
}

.chp-login__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -8px 0 20px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--chp-line);
    font-size: 14px;
    color: var(--chp-ink);
}

.chp-login__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(180deg, #2a2a2a, #111);
    color: var(--chp-gold-soft);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.chp-login__identity-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.chp-login__change {
    margin-left: auto;
    flex-shrink: 0;
    border: 0;
    background: none;
    padding: 6px 4px;
    color: var(--chp-gold-deep);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.chp-login__change:hover {
    text-decoration: underline;
}

.chp-login__step {
    animation: chp-enter 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chp-field {
    position: relative;
    margin-bottom: 16px;
    text-align: left;
}

.chp-field__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #8b9098;
    pointer-events: none;
    z-index: 1;
}

.chp-field__icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.chp-field__input {
    width: 100%;
    height: 64px;
    box-sizing: border-box;
    padding: 22px 16px 8px 48px;
    border: 1px solid #c9c3b6;
    border-radius: 16px;
    background: #fff;
    color: var(--chp-ink);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chp-field__input--password {
    padding-right: 72px;
}

.chp-field__input::placeholder {
    color: transparent;
}

.chp-field__label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c7378;
    font-size: 16px;
    pointer-events: none;
    transition: top 0.16s ease, transform 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.chp-field__input:focus,
.chp-field__input:not(:placeholder-shown) {
    padding-top: 26px;
    padding-bottom: 8px;
}

.chp-field__input:focus + .chp-field__label,
.chp-field__input:not(:placeholder-shown) + .chp-field__label {
    top: 11px;
    transform: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #545d68;
}

.chp-field__input:focus {
    border-color: var(--chp-gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
}

.chp-field__input:focus ~ .chp-field__icon,
.chp-field:focus-within .chp-field__icon {
    color: var(--chp-gold-deep);
}

.chp-field.is-invalid .chp-field__input {
    border-color: #d20000;
    box-shadow: 0 0 0 4px rgba(210, 0, 0, 0.1);
}

.chp-field__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--chp-gold-deep);
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    padding: 8px;
}

.chp-field__toggle:hover {
    text-decoration: underline;
}

.chp-error {
    margin: -4px 0 16px;
    text-align: left;
    color: #d20000;
    font-size: 13px;
    font-weight: 700;
}

.chp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 52px;
    margin-top: 8px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, #2a2a2a 0%, #111 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(17, 17, 17, 0.18);
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.chp-btn__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
}

.chp-btn:hover {
    background: linear-gradient(180deg, #d4b03a 0%, var(--chp-gold) 100%);
    color: var(--chp-ink);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(201, 162, 39, 0.28);
}

.chp-btn:hover .chp-btn__shine {
    animation: chp-shine 0.7s ease;
}

.chp-btn:active {
    transform: translateY(0);
    background: var(--chp-gold-deep);
    color: #fff;
    box-shadow: none;
}

.chp-btn:disabled,
.chp-btn[wire\:loading][disabled] {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.chp-btn__wait {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chp-btn__spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: chp-spin 0.7s linear infinite;
}

.chp-remember {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 4px 0 14px;
    text-align: left;
    color: var(--chp-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.chp-remember input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.chp-remember__ui {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #d8d2c6;
    transition: background 0.18s ease;
}

.chp-remember__ui span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(17, 17, 17, 0.16);
    transition: transform 0.18s ease;
}

.chp-remember input:checked + .chp-remember__ui {
    background: var(--chp-gold);
}

.chp-remember input:checked + .chp-remember__ui span {
    transform: translateX(18px);
}

.chp-remember input:focus-visible + .chp-remember__ui {
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.22);
}

.chp-help {
    margin: 28px 0 0;
    text-align: center;
    font-size: 14px;
}

.chp-help a,
.chp-login__footer a {
    color: var(--chp-gold-deep);
    font-weight: 700;
    text-decoration: none;
}

.chp-help a:hover,
.chp-login__footer a:hover {
    text-decoration: underline;
}

.chp-login__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--chp-line);
    color: var(--chp-muted);
    font-size: 12px;
}

.chp-login__footer-copy {
    width: 100%;
    margin: 4px 0 0;
    text-align: center;
    color: #8a8f96;
}

@keyframes chp-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(24px, -18px, 0) scale(1.08); }
}

@keyframes chp-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

@keyframes chp-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes chp-fill {
    from { width: 0; }
    to { width: 72%; }
}

@keyframes chp-shine {
    to { transform: translateX(120%); }
}

@keyframes chp-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
    .chp-login {
        grid-template-columns: 1fr 1fr;
    }

    .chp-login__stage {
        padding: 36px 32px;
    }

    .chp-login__stage-inner {
        margin: 0;
    }

    .chp-login__headline {
        font-size: 36px;
    }

    .chp-login__preview {
        display: none;
    }
}

@media (max-width: 860px) {
    .chp-login {
        grid-template-columns: 1fr;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .chp-login__atmosphere {
        position: fixed;
    }

    .chp-login__grid {
        right: 0;
    }

    .chp-login__stage {
        padding: 28px 20px 8px;
    }

    .chp-login__stage-inner {
        max-width: none;
    }

    .chp-login__brand--stage {
        margin-bottom: 18px;
    }

    .chp-login__copy,
    .chp-login__features,
    .chp-login__preview {
        display: none;
    }

    .chp-login__main {
        padding: 8px 16px 24px;
        align-items: flex-start;
    }

    .chp-login__card {
        padding: 28px 20px 20px;
        border-radius: 24px;
    }

    .chp-login__brand--form {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chp-orb,
    .chp-login__preview,
    .chp-login__card,
    .chp-login__step,
    .chp-login__progress span,
    .chp-btn__shine,
    .chp-btn__spinner {
        animation: none !important;
    }

    .chp-btn:hover {
        transform: none;
    }
}
