/*
 * Login and register, in the landing page's panel-board language.
 *
 * Loaded after landing.css and depends on its custom properties and `gp-` primitives — the
 * buttons and the `.gp-page` type scale are shared, so only the split shell and the real form
 * controls live here. The admin theme's Bootstrap is deliberately absent from these pages, so
 * nothing here may rely on `.form-control`, `.input-group` or `.invalid-feedback`.
 */

.gp-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gp-auth__body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gp-gap);
    align-items: stretch;
    padding-bottom: var(--gp-pad);
}

/* ── the pitch half ─────────────────────────────────────────────────── */

.gp-auth__aside {
    background: var(--gp-ink);
    color: #fff;
    border-radius: var(--gp-radius);
    padding: clamp(28px, 2.6vw, 48px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.gp-auth__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gp-teal-bright);
    margin: 0;
}

.gp-auth__statement {
    font-family: "Bricolage Grotesque", Figtree, sans-serif;
    font-size: clamp(28px, 2.4vw, 46px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin: 0;
    text-wrap: pretty;
}

.gp-auth__lead {
    margin: 0;
    max-width: 30em;
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
}

.gp-auth__steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: gp-auth-step;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: auto;
}

.gp-auth__steps li {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

.gp-auth__steps li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.gp-auth__steps li::before {
    counter-increment: gp-auth-step;
    content: "0" counter(gp-auth-step);
    font-family: "Bricolage Grotesque", Figtree, sans-serif;
    font-weight: 700;
    color: var(--gp-teal-bright);
    flex: 0 0 22px;
}

.gp-auth__marks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.gp-auth__marks img {
    height: 22px;
    width: auto;
    /* The mark files carry white plates; on ink they need to be knocked back, not multiplied. */
    filter: grayscale(1) brightness(0) invert(1);
    opacity: 0.72;
}

/* ── the form half ──────────────────────────────────────────────────── */

.gp-auth__panel {
    background: var(--gp-panel);
    border-radius: var(--gp-radius);
    padding: clamp(26px, 2.4vw, 44px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gp-auth__panel-inner {
    width: 100%;
    max-width: 30em;
    margin: 0 auto;
}

.gp-auth__title {
    font-family: "Bricolage Grotesque", Figtree, sans-serif;
    font-size: clamp(26px, 2vw, 34px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0;
}

.gp-auth__subtitle {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gp-body);
}

.gp-form {
    margin-top: 28px;
    display: grid;
    gap: 16px;
}

/* Two fields to a row where they are naturally a pair, one row on a narrow panel. */
.gp-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gp-field-group {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.gp-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gp-ink);
}

.gp-input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--gp-line);
    border-radius: 12px;
    background: #fff;
    padding: 0 16px;
    font: 400 16px/1.4 Figtree, "Helvetica Neue", Arial, sans-serif;
    color: var(--gp-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gp-input::placeholder {
    color: var(--gp-placeholder);
}

.gp-input:hover {
    border-color: #d8d2c6;
}

.gp-input:focus {
    outline: none;
    border-color: var(--gp-teal);
    box-shadow: 0 0 0 3px rgba(0, 155, 149, 0.16);
}

.gp-input.is-invalid {
    border-color: #c0392b;
}

.gp-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.16);
}

.gp-error {
    font-size: 13px;
    line-height: 1.45;
    color: #c0392b;
}

.gp-hint {
    font-size: 13px;
    line-height: 1.5;
    color: var(--gp-faint);
}

.gp-hint--center {
    text-align: center;
}

/* A second form on the same panel, set off from the one above it. */
.gp-form--divided {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--gp-line);
}

.gp-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.gp-alert {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
}

.gp-alert--danger {
    background: #fdeceb;
    color: #96261a;
}

/* Real checkbox, kept in the accessibility tree and drawn with an accent colour. */
.gp-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--gp-body);
    cursor: pointer;
}

.gp-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--gp-teal);
    cursor: pointer;
}

/*
 * A check that sits on its own line above a submit, rather than inline in a form row: the
 * trust-device box wraps to two lines on a phone, and centre alignment leaves the tick
 * floating beside the second line (PAYL-1502).
 */
.gp-check--stacked {
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 18px;
    font-size: 14px;
}

.gp-check--stacked input {
    margin-top: 1px;
    flex: 0 0 auto;
}

.gp-form__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
}

.gp-form__submit {
    width: 100%;
    border: 0;
    font-family: inherit;
}

.gp-auth__switch {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--gp-line);
    font-size: 15px;
    color: var(--gp-body);
    text-align: center;
}

.gp-auth__terms {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--gp-faint);
    text-align: center;
}

/* ── the smaller auth pages ─────────────────────────────────────────── */

.gp-alert--success {
    background: var(--gp-teal-soft);
    color: #04302e;
}

.gp-auth__note {
    margin: 22px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gp-body);
}

/* A submit that reads as a link — resend, and the other one-word actions. */
.gp-link-btn {
    background: none;
    border: 0;
    padding: 0;
    font: 600 15px/1.4 Figtree, "Helvetica Neue", Arial, sans-serif;
    color: var(--gp-teal);
    cursor: pointer;
}

.gp-link-btn:hover,
.gp-link-btn:focus {
    color: var(--gp-ink);
}

.gp-inline-form {
    display: inline;
}

.gp-input--otp {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 10px;
    height: 60px;
}

.gp-company-list {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.gp-company {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--gp-line);
    border-radius: 16px;
    padding: 18px 20px;
    transition: border-color 0.15s ease;
}

.gp-company:hover {
    border-color: var(--gp-teal);
}

.gp-company__name {
    font-family: "Bricolage Grotesque", Figtree, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.gp-company__owner {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--gp-faint);
}

/* ── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .gp-auth__body {
        grid-template-columns: 1fr;
    }

    /* The form is why the visitor is here: it leads, and the pitch follows it. */
    .gp-auth__panel {
        order: -1;
    }

    .gp-auth__steps {
        margin-top: 0;
    }
}

@media (max-width: 620px) {
    .gp-form__row {
        grid-template-columns: 1fr;
    }

    .gp-auth__panel,
    .gp-auth__aside {
        padding: 24px;
    }
}

/* ── choose where the sign-in code goes (PAYL-1502) ─────────────────── */

/*
 * Selectable cards rather than a radio list. The radio is still the control — it stays in
 * the DOM for the keyboard and for the form — but it is visually replaced by the card,
 * whose whole area is the label and therefore the tap target.
 */
.gp-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.gp-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    /* 14px sits the text comfortably clear of a 44px minimum tap target once the icon
       is in the row, without the card looking loose on a narrow phone. */
    padding: 14px 16px;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    background: var(--gp-panel);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.gp-choice:hover {
    border-color: var(--gp-teal);
}

/* Visually hidden, not display:none — the control has to stay focusable and announced. */
.gp-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.gp-choice:has(input:checked) {
    border-color: var(--gp-teal);
    background: var(--gp-teal-soft);
}

/* The card carries the focus ring, since the input it belongs to is not visible. */
.gp-choice:has(input:focus-visible) {
    outline: 2px solid var(--gp-teal);
    outline-offset: 2px;
}

.gp-choice__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gp-sand);
    color: var(--gp-ink);
}

.gp-choice:has(input:checked) .gp-choice__icon {
    background: var(--gp-teal);
    color: #fff;
}

.gp-choice__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.gp-choice__title {
    font-weight: 600;
    color: var(--gp-ink);
}

/* A masked address can still be long; it truncates rather than wrapping the card open. */
.gp-choice__hint {
    font-size: 13px;
    color: var(--gp-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The tick only appears on the chosen card, so the row is quiet until it is picked. */
.gp-choice__mark {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--gp-line);
    color: transparent;
}

.gp-choice:has(input:checked) .gp-choice__mark {
    background: var(--gp-teal);
    border-color: var(--gp-teal);
    color: #fff;
}

@media (max-width: 480px) {
    .gp-choice {
        gap: 12px;
        padding: 12px 14px;
    }

    .gp-choice__icon {
        width: 36px;
        height: 36px;
    }
}
