.auth-page {
    padding: 56px 0 90px;
}

.auth-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
    gap: 28px;
    align-items: stretch;
}

.auth-side {
    background: linear-gradient(135deg, rgba(124, 121, 184, 0.12), rgba(124, 121, 184, 0.04));
    border: 1px solid rgba(124, 121, 184, 0.16);
    border-radius: 30px;
    padding: 38px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.auth-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.auth-side h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
}

.auth-side p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.03rem;
    max-width: 560px;
}

.auth-side-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.auth-card {
    border-radius: 30px;
    overflow: hidden;
    min-height: 100%;
}

.auth-card .card-body {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.auth-card-header {
    margin-bottom: 24px;
    text-align: left;
}

.auth-card-header h2 {
    margin: 0 0 8px;
    font-size: 1.9rem;
}

.auth-card-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 18px;
    width: 100%;
}

/* The login/signup cards want a full-width submit, but the contact form sits in
   a wide page card where a stretched button looks broken. */
.auth-form .contact-form-submit {
    justify-self: start;
    width: auto;
    min-width: 200px;
    padding-inline: 28px;
}

.auth-field {
    display: grid;
    gap: 8px;
    width: 100%;
}

.auth-field label {
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fbfbfe 0%, #f6f8fd 100%);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    outline: none;
    appearance: none;
}

/* Vertical only. A textarea defaults to `resize: both`, and these sit in cards
   sized to their container — dragging one wider pushed it straight out past the
   card's padding, and the corner grip fought the 16px radius. Height is the axis
   a note actually needs. */
.auth-field textarea {
    resize: vertical;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    border-color: rgba(124, 121, 184, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 121, 184, 0.12);
    background: white;
}

.auth-help {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.auth-password-checklist {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfbfe 0%, #f6f8fd 100%);
    border: 1px solid var(--border);
}

.auth-password-checklist-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.auth-password-checklist-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.auth-password-checklist-item {
    position: relative;
    padding-left: 22px;
    font-size: 0.94rem;
    line-height: 1.5;
    font-weight: 600;
    transition: color 0.18s ease;
}

.auth-password-checklist-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transform: translateY(-50%);
    /* Neutral grey by default (pending); turns green when the rule is met. */
    background: #cdd3e4;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.auth-password-checklist-item.is-invalid {
    color: #b23a48;
}

.auth-password-checklist-item.is-invalid::before {
    background: #d8606d;
    box-shadow: 0 0 0 3px rgba(216, 96, 109, 0.14);
}

.auth-password-checklist-item.is-valid {
    color: #1b7f4b;
}

.auth-password-checklist-item.is-valid::before {
    background: #2ea66a;
    box-shadow: 0 0 0 3px rgba(46, 166, 106, 0.14);
}

.auth-help ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.auth-error {
    color: #b23a48;
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-alert {
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff2f3;
    border: 1px solid #f1c7cc;
    color: #a33746;
    font-weight: 600;
    line-height: 1.6;
}

.auth-submit {
    margin-top: 8px;
    min-height: 54px;
    font-size: 1.02rem;
    font-weight: 800;
    /* Full width — it's the page's primary action, not a floating chip. */
    justify-self: stretch;
    width: 100%;
}

.auth-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.auth-footer a {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.auth-field select[multiple] {
    min-height: 180px;
    padding: 12px;
}

@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* Form first, marketing panel below; drop the equal-height stretch so
       neither panel floats in empty space when stacked. */
    .auth-card { order: 1; min-height: 0; }
    .auth-side {
        order: 2;
        min-height: 0;
        justify-content: flex-start;
    }
    .auth-side h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); }
}

@media (max-width: 700px) {
    .auth-page {
        padding: 34px 0 70px;
    }

    .auth-container {
        width: min(1180px, calc(100% - 28px));
    }

    .auth-side,
    .auth-card .card-body {
        padding: 24px 20px;
    }

    .auth-side h1 {
        font-size: 2rem;
    }
}

/* ============================================================
   Auth UX-audit additions — left-panel content, show-password
   toggle, remember-me row, required markers, role reveal, and
   the responsive stack (Register + Login). July 2026.
   ============================================================ */

/* Value content that fills the left panel so it isn't dead space. */
.auth-side-benefits {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.auth-side-benefits li {
    position: relative;
    padding-left: 30px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.5;
}
.auth-side-benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--primary);
    /* white check mark */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Header row: title + a quick cross-link to the other auth page. */
.auth-card-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.auth-header-link {
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.95rem;
}
.auth-header-link:hover { text-decoration: underline; }

/* Required-field marker. */
.auth-req { color: #c5482a; font-weight: 800; }

/* Show / hide password toggle. */
.auth-pw-wrap { position: relative; display: block; }
.auth-pw-wrap input { padding-right: 74px; }
.auth-pw-toggle {
    position: absolute;
    /* Anchor top+bottom and auto-centre — layout-stable, so the label
       swapping Show<->Hide (or gaining focus) never nudges it vertically. */
    top: 0;
    bottom: 0;
    right: 8px;
    margin: auto 0;
    height: 36px;
    min-width: 62px;           /* fixed footprint so Show/Hide don't reflow */
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--primary-dark);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.auth-pw-toggle:hover { background: rgba(124, 121, 184, 0.08); border-color: rgba(124, 121, 184, 0.45); }
.auth-pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Remember-me + forgot-password row on login. */
.auth-helper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: -4px;
}
.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}
.auth-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid #c5cae0;
    border-radius: 7px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-remember input[type="checkbox"]:hover { border-color: var(--primary); }
.auth-remember input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.auth-remember input[type="checkbox"]:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124, 121, 184, 0.18);
}
.auth-helper-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.92rem;
}
.auth-helper-link:hover { text-decoration: underline; }

/* Registration consent gate — reuses the custom checkbox, but top-aligned so
   the box sits with the first line when the label wraps.

   The row sits between the password-requirements panel and the role details,
   both of which are bordered cards. Left bare, the checkbox was the only thing
   hanging in the gutter beside them, which read as misaligned — so the consent
   gets the same card treatment and its checkbox lines up with their content. */
.auth-consent-field {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fbfbfe 0%, #f6f8fd 100%);
}

.auth-consent-label {
    align-items: flex-start;
    font-weight: 500;
    line-height: 1.5;
}
.auth-consent-label input[type="checkbox"] { margin-top: 1px; }
.auth-consent-label a { color: var(--primary-dark); font-weight: 700; }
.auth-consent-label a:hover { text-decoration: underline; }

/* Role reveal (register) — privileged roles tucked behind an optional toggle. */
.auth-role {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfbfe 0%, #f6f8fd 100%);
    padding: 4px 6px;
}
.auth-role[open] { padding-bottom: 14px; }
.auth-role-summary {
    list-style: none;
    cursor: pointer;
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease;
}
.auth-role-summary:hover { background: rgba(124, 121, 184, 0.07); }
.auth-role-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-role-summary::-webkit-details-marker { display: none; }
.auth-role-summary::before {
    content: "+";
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(124, 121, 184, 0.16);
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
}
.auth-role[open] .auth-role-summary::before { content: "\2013"; }
.auth-role-body { padding: 4px 14px 6px; display: grid; gap: 8px; }
.auth-role-body label { font-weight: 700; color: var(--text); }

/* Native select styled to match the site's inputs, with a custom chevron
   (the reveal's dropdown was otherwise the raw OS control). */
.auth-role-body select {
    width: 100%;
    min-height: 48px;
    padding: 12px 42px 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c79b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-role-body select:focus {
    outline: none;
    border-color: rgba(124, 121, 184, 0.65);
    box-shadow: 0 0 0 4px rgba(124, 121, 184, 0.12);
}
