@font-face {
    font-family: 'Outfit';
    src: url('/public/fonts/outfit-latin-ext.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --on-red: #e31837;
    --on-red-dark: #b90f28;
    --on-ink: #0f172a;
    --on-ink-soft: #334155;
    --on-muted: #64748b;
    --on-line: #e2e8f0;
    --on-canvas: #f6f7fb;
    --on-white: #ffffff;
    --on-success: #0f9f6e;
    --on-shadow: 0 24px 70px rgba(15, 23, 42, .12);
}

.online-auth,
.online-pay-page,
.online-invoice-page {
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--on-ink);
    -webkit-font-smoothing: antialiased;
}

.online-auth *,
.online-pay-page *,
.online-invoice-page * {
    box-sizing: border-box;
}

.online-auth a,
.online-pay-page a,
.online-invoice-page a {
    text-decoration: none;
}

.online-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--on-ink);
    line-height: 1;
}

.online-brand__mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--on-red), var(--on-red-dark));
    box-shadow: 0 10px 24px rgba(227, 24, 55, .28);
    color: #fff;
}

.online-brand__mark svg {
    width: 27px;
    height: 27px;
}

.online-brand__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.online-brand__text strong {
    color: inherit;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.035em;
}

.online-brand__text em {
    color: var(--on-red);
    font-style: normal;
}

.online-brand__text small {
    color: var(--on-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .18em;
}

.online-brand--light {
    color: #fff;
}

.online-brand--light .online-brand__text small {
    color: #94a3b8;
}

.online-brand--light .online-brand__mark {
    border: 1px solid rgba(255, 255, 255, .2);
}

/* ---------- Login ---------- */
.online-auth {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1.02fr) minmax(460px, .98fr);
    background: var(--on-canvas);
}

.online-auth__brand {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: clamp(32px, 5vw, 64px);
    background: #0b1220;
    color: #fff;
}

.online-auth__brand::before {
    position: absolute;
    inset: -20% -20% auto auto;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(227, 24, 55, .52) 0%, rgba(227, 24, 55, 0) 68%);
    content: '';
    filter: blur(10px);
}

.online-auth__brand::after {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 34px 34px;
    content: '';
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 48%, transparent 92%);
    opacity: .7;
    pointer-events: none;
}

.online-auth__brand > * {
    position: relative;
    z-index: 1;
}

.online-auth__hero {
    max-width: 620px;
    margin-top: auto;
    margin-bottom: auto;
}

.online-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fecdd3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.online-eyebrow::before {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--on-red);
    content: '';
}

.online-auth__hero h1 {
    max-width: 620px;
    margin: 18px 0 0;
    color: #fff;
    font-size: clamp(38px, 4.2vw, 64px);
    font-weight: 900;
    letter-spacing: -.055em;
    line-height: .98;
}

.online-auth__hero h1 em {
    color: #fb7185;
    font-style: normal;
}

.online-auth__hero p {
    max-width: 500px;
    margin: 20px 0 0;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
}

.online-auth__features {
    display: grid;
    max-width: 520px;
    gap: 12px;
    margin-top: 36px;
}

.online-auth__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.online-auth__feature-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: #fb7185;
}

.online-auth__feature-icon svg {
    width: 16px;
    height: 16px;
}

.online-auth__support {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    max-width: 620px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .07);
}

.online-auth__support small {
    display: block;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.online-auth__support strong {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.online-auth__support a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fecdd3;
    font-size: 12px;
    font-weight: 800;
}

.online-auth__form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.online-card {
    width: 100%;
    max-width: 448px;
    padding: 34px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--on-shadow);
}

.online-card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--on-red);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.online-card__kicker::before {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--on-red);
    content: '';
}

.online-card h1,
.online-card h2 {
    margin: 12px 0 0;
    color: var(--on-ink);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1.04;
}

.online-card__lead {
    margin: 10px 0 26px;
    color: var(--on-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.online-form {
    display: grid;
    gap: 15px;
}

.online-field label {
    display: block;
    margin: 0 0 7px;
    color: var(--on-ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.online-field__control {
    position: relative;
}

.online-field__icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transform: translateY(-50%);
}

.online-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--on-line);
    border-radius: 13px;
    outline: none;
    background: #f8fafc;
    color: var(--on-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.online-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.online-form-hint {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.45;
}

.online-input:focus {
    border-color: var(--on-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(227, 24, 55, .1);
}

.online-field--password .online-input {
    padding-right: 48px;
}

.online-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transform: translateY(-50%);
}

.online-password-toggle:hover {
    background: #f1f5f9;
    color: var(--on-red);
}

.online-password-toggle svg {
    width: 18px;
    height: 18px;
}

.online-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 1px 0 2px;
}

.online-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--on-muted);
    font-size: 12px;
    font-weight: 600;
}

.online-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--on-red);
}

.online-link {
    color: var(--on-red);
    font-size: 12px;
    font-weight: 800;
}

.online-link:hover {
    color: var(--on-red-dark);
    text-decoration: underline;
}

.online-recaptcha {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}

.online-submit {
    display: inline-flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--on-red), var(--on-red-dark));
    box-shadow: 0 12px 24px rgba(227, 24, 55, .22);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    transition: box-shadow .18s ease, transform .18s ease;
}

.online-submit:hover {
    box-shadow: 0 16px 30px rgba(227, 24, 55, .3);
    transform: translateY(-1px);
}

.online-submit:active {
    transform: translateY(0);
}

.online-submit svg {
    width: 17px;
    height: 17px;
}

.online-card__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 14px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.online-card__divider::before,
.online-card__divider::after {
    height: 1px;
    flex: 1;
    background: var(--on-line);
    content: '';
}

.online-quick-pay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #fecdd3;
    border-radius: 13px;
    background: #fff7f8;
}

.online-quick-pay span {
    color: #9f1239;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.online-quick-pay a {
    flex: 0 0 auto;
    color: var(--on-red);
    font-size: 11px;
    font-weight: 900;
}

.online-legal {
    margin: 16px 0 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.online-legal a {
    color: var(--on-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Quick payment ---------- */
.online-pay-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% 12%, rgba(227, 24, 55, .08), transparent 28%),
        radial-gradient(circle at 92% 82%, rgba(15, 23, 42, .07), transparent 30%),
        var(--on-canvas);
}

.online-pay-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

.online-public-header {
    display: flex;
    width: min(1180px, 100%);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    padding: 24px;
}

.online-public-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.online-public-header__link {
    color: var(--on-ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.online-public-header__link:hover {
    color: var(--on-red);
}

.online-public-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--on-ink);
    font-size: 12px;
    font-weight: 800;
}

.online-public-header__phone svg {
    width: 15px;
    height: 15px;
    color: var(--on-red);
}

.online-pay-main {
    display: grid;
    width: min(1180px, 100%);
    flex: 1;
    grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
    align-items: center;
    gap: 34px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

.online-pay-intro {
    order: -1;
}

.online-pay-intro__panel {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border-radius: 28px;
    background: #0b1220;
    color: #fff;
}

.online-pay-intro__panel::before {
    position: absolute;
    top: -150px;
    right: -150px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(227, 24, 55, .55), transparent 70%);
    content: '';
}

.online-pay-intro__panel > * {
    position: relative;
    z-index: 1;
}

.online-pay-intro__panel h2 {
    max-width: 420px;
    margin: 16px 0 0;
    color: #fff;
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.02;
}

.online-pay-intro__panel p {
    max-width: 380px;
    margin: 16px 0 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.65;
}

.online-pay-steps {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.online-pay-step {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

.online-pay-step__number {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    background: rgba(255, 255, 255, .07);
    color: #fecdd3;
    font-size: 11px;
    font-weight: 900;
}

.online-pay-intro__support {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.online-pay-intro__support-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #fb7185;
}

.online-pay-intro__support-icon svg {
    width: 18px;
    height: 18px;
}

.online-pay-intro__support small {
    display: block;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
}

.online-pay-intro__support a {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.online-card--pay {
    max-width: 560px;
    justify-self: end;
}

.online-pay-form__note {
    margin: 16px 0 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.55;
    text-align: center;
}

.online-pay-footer {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 24px 26px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
}

.online-pay-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--on-line);
}

.online-pay-footer a {
    color: var(--on-muted);
    font-weight: 700;
}

/* ---------- Invoice result ---------- */
.online-invoice-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 92% 8%, rgba(227, 24, 55, .08), transparent 26%),
        var(--on-canvas);
}

.online-invoice-main {
    width: min(1080px, 100%);
    flex: 1;
    margin: 0 auto;
    padding: 30px 24px 64px;
}

.online-invoice-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 28px 0 24px;
}

.online-invoice-head h1 {
    margin: 10px 0 0;
    color: var(--on-ink);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1;
}

.online-invoice-head p {
    margin: 10px 0 0;
    color: var(--on-muted);
    font-size: 13px;
    font-weight: 500;
}

.online-invoice-head__back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 13px;
    border: 1px solid var(--on-line);
    border-radius: 11px;
    background: #fff;
    color: var(--on-ink-soft);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.online-invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.online-invoice-card {
    display: flex;
    min-height: 240px;
    flex-direction: column;
    padding: 21px;
    border: 1px solid var(--on-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
}

.online-invoice-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.online-invoice-number {
    color: var(--on-ink);
    font-size: 12px;
    font-weight: 900;
}

.online-invoice-badge {
    padding: 5px 8px;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    background: #fff7f8;
    color: #9f1239;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .04em;
}

.online-invoice-description {
    margin: 18px 0 0;
    color: var(--on-ink-soft);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

.online-invoice-amount {
    margin: 18px 0 0;
    color: var(--on-red);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
}

.online-invoice-due {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0 20px;
    color: var(--on-muted);
    font-size: 11px;
    font-weight: 600;
}

.online-invoice-due svg {
    width: 15px;
    height: 15px;
    color: var(--on-red);
}

.online-invoice-card .online-submit {
    margin-top: auto;
}

.online-invoice-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 24px 0 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
}

.online-invoice-note svg {
    width: 14px;
    height: 14px;
    color: var(--on-success);
}

@media (max-width: 640px) {
    .online-invoice-main {
        padding: 18px 16px 34px;
    }

    .online-invoice-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-top: 20px;
    }

    .online-invoice-head__back {
        order: -1;
    }

    .online-invoice-grid {
        grid-template-columns: 1fr;
    }

    .online-invoice-card {
        min-height: 0;
    }
}

@media (max-width: 980px) {
    .online-auth {
        display: block;
    }

    .online-auth__brand {
        min-height: 268px;
        justify-content: flex-start;
        gap: 28px;
        padding: 24px 20px 68px;
        border-radius: 0 0 30px 30px;
    }

    .online-auth__hero {
        margin: 0;
    }

    .online-auth__hero h1 {
        max-width: 500px;
        margin-top: 14px;
        font-size: 34px;
        line-height: 1.02;
    }

    .online-auth__hero p {
        margin-top: 10px;
        font-size: 13px;
        line-height: 1.5;
    }

    .online-auth__features,
    .online-auth__support {
        display: none;
    }

    .online-auth__form-side {
        position: relative;
        z-index: 2;
        display: block;
        margin-top: -42px;
        padding: 0 16px 34px;
    }

    .online-card {
        max-width: 520px;
        padding: 25px 21px;
        border-radius: 24px;
    }

    .online-card h1,
    .online-card h2 {
        font-size: 28px;
    }

    .online-card__lead {
        margin-bottom: 20px;
    }

    .online-recaptcha {
        transform: scale(.94);
    }

    .online-pay-main {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px 16px 34px;
    }

    .online-pay-intro {
        order: 2;
    }

    .online-card--pay {
        order: 1;
        max-width: none;
        justify-self: auto;
    }

    .online-pay-intro__panel {
        padding: 23px 20px;
        border-radius: 22px;
    }

    .online-pay-intro__panel h2 {
        font-size: 29px;
    }

    .online-pay-intro__panel p {
        font-size: 12px;
    }

    .online-pay-steps {
        gap: 10px;
        margin-top: 18px;
    }

    .online-pay-intro__support {
        margin-top: 20px;
        padding-top: 16px;
    }

    .online-public-header {
        padding: 16px;
    }

    .online-public-header__actions {
        gap: 12px;
    }

    .online-public-header__phone {
        display: none;
    }

    .online-pay-footer {
        padding: 0 16px 20px;
    }

    .online-pay-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 420px) {
    .online-auth__brand {
        min-height: 250px;
        padding-bottom: 62px;
    }

    .online-auth__hero h1 {
        font-size: 30px;
    }

    .online-brand__text strong {
        font-size: 17px;
    }

    .online-brand__mark {
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .online-card {
        padding: 22px 17px;
    }

    .online-recaptcha {
        transform: scale(.86);
        margin: 0 -14px;
    }

    .online-public-header .online-brand__text small {
        display: none;
    }
}

.online-brand {
    text-decoration: none;
}

.online-brand,
.online-brand * {
    text-decoration: none !important;
}
