:root {
    --brand: var(--rsa-purple-600);
    --brand-dark: var(--rsa-purple-800);
    --brand-light: var(--rsa-purple-50);
    --accent: var(--rsa-pink-500);
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f6f7fb;
    --card: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
}

html, body {
    font-family: 'Aptos', 'Aptos Display', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Aptos Display', 'Aptos', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
    color: var(--ink);
    letter-spacing: -0.01em;
}

a, .btn-link { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--rsa-purple-600) 20%, transparent);
    border-color: var(--brand);
}

.form-control, .form-select {
    border-color: var(--line);
    border-radius: 8px;
}
.form-label { font-weight: 500; color: #374151; margin-bottom: .25rem; }
.form-text { color: var(--muted); }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card-header {
    background: var(--brand-light);
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.table {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table > thead { background: var(--brand-light); }
.table > thead th { font-weight: 600; border-bottom: 1px solid var(--line); }

.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; border-radius: var(--radius); }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #fecaca; border-radius: var(--radius); }
.alert-info    { background: var(--brand-light); color: var(--brand-dark); border-color: #bcbddc; border-radius: var(--radius); }

.content { padding-top: 1.1rem; }

h1:focus { outline: none; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: var(--radius);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* ============================================================
   AUTH SCENE — shared by every signed-out page
   (Login, SignUp, Welcome, resets, payment outcomes)
   Deep RSA blue with drifting pink/yellow glows; the card
   reveals with a soft rise. No markup changes needed per page.
   ============================================================ */

.login-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 14 Q15 4 30 14 T60 14 T90 14 T120 14 V28 H0 Z' fill='rgba(255,255,255,.06)'/%3E%3C/svg%3E") left bottom / 300px 34px repeat-x,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 16 Q15 7 30 16 T60 16 T90 16 T120 16 V28 H0 Z' fill='rgba(255,255,255,.04)'/%3E%3C/svg%3E") left bottom / 520px 52px repeat-x,
        radial-gradient(ellipse 70% 55% at 85% 10%, color-mix(in srgb, var(--login-glow, var(--rsa-pink-500)) 28%, transparent) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 10% 95%, color-mix(in srgb, var(--rsa-yellow-500) 18%, transparent) 0%, transparent 55%),
        radial-gradient(ellipse 55% 55% at 50% 50%, color-mix(in srgb, var(--login-bg, var(--rsa-purple-900)) 70%, transparent) 0%, transparent 75%),
        linear-gradient(160deg, var(--login-bg, var(--rsa-purple-900)) 0%, var(--login-bg, var(--rsa-purple-800)) 40%, var(--login-bg, var(--rsa-purple-600)) 75%, var(--login-bg, var(--rsa-purple-900)) 100%);
    padding: 2rem 1rem;
}

/* faint grid, masked to the middle — same trick as the Montego login */
.login-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, black 15%, transparent 72%);
    mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, black 15%, transparent 72%);
    pointer-events: none;
}

/* drifting glow */
.login-shell::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--login-glow, var(--rsa-pink-500)) 16%, transparent);
    filter: blur(90px);
    top: -12%;
    right: -6%;
    animation: rsa-orb 22s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
}
@keyframes rsa-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-40px, 30px) scale(1.06); }
    66%      { transform: translate(25px, -20px) scale(.96); }
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    /* No border: overflow clips the stripe below to the padding box, so a border showed as a white hairline above it. */
    border: 0;
    border-radius: 20px;
    box-shadow:
        0 30px 60px -18px rgba(10, 2, 30, .55),
        0 0 0 1px rgba(255, 255, 255, .06);
    padding: 2.25rem 2rem;
    animation: rsa-card-reveal .6s cubic-bezier(.16, 1, .3, 1) both;
    overflow: hidden;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rsa-purple-600) 0%, var(--login-glow, var(--rsa-pink-500)) 60%, var(--rsa-yellow-500) 100%);
}
@keyframes rsa-card-reveal {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* wide variant for the multi-step sign-up */
.login-card--wide { max-width: 860px; }

.login-brand { text-align: center; margin-bottom: 1rem; }
.login-brand img { height: 76px; width: auto; max-width: 100%; }
.login-title {
    text-align: center;
    margin: .25rem 0 0;
    color: var(--rsa-purple-600);
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: 1.6rem;
    text-wrap: balance;
}
.login-sub {
    text-align: center;
    color: #6f6c81;
    margin-bottom: 1.5rem;
    font-size: .9375rem;
    /* Short centred copy: no single word left alone on the last line. */
    text-wrap: balance;
}
/* The line under a heading sat flush against it. */
.login-title + .login-sub { margin-top: .375rem; }
.login-foot {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid #f1f0f6;
    font-size: .875rem;
    color: #6f6c81;
}
.login-foot__sep { color: var(--rsa-gray-300); }
/* A foot with two separate offers (sign up · back to website): each stays whole, and on a phone they
   stack instead of breaking "Back to / website" across lines. */
.login-foot--split {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: .5rem;
    row-gap: .35rem;
}
.login-foot--split > * { white-space: nowrap; }
@media (max-width: 440px) {
    .login-foot--split { flex-direction: column; align-items: center; }
    .login-foot--split > * { white-space: normal; }
    .login-foot--split .login-foot__sep { display: none; }
}

/* Floating-label fields: the validation line sat flush under the box. */
.login-card .form-floating > .validation-message { margin-top: .3rem; }

/* The sign-in club picker: tappable tiles, a size up from the small tiles inside forms. */
.login-card .check-tile { padding: .75rem .9rem; align-items: center; }
.login-card .check-tile input { margin-top: 0; }
.login-card .check-tile__text { font-size: .9375rem; font-weight: 550; }

/* A Super Admin's club choice on signing in (ChooseClub.razor): a dialog on a blank page, one
   button per club, each submitting that club, so a single click both picks it and goes on. */
.club-pick { background: var(--rsa-gray-100); }
.club-pick__sub { margin: .25rem 0 0; color: var(--rsa-gray-500); font-size: .875rem; }
.club-pick__list { display: grid; gap: .5rem; }
.club-pick__item {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-sm);
    background: #fff;
    color: var(--rsa-gray-800);
    text-align: left;
    cursor: pointer;
    transition: border-color var(--rsa-fast), background var(--rsa-fast);
}
.club-pick__item:hover,
.club-pick__item:focus-visible {
    border-color: var(--rsa-purple-300);
    background: var(--rsa-purple-50);
}
.club-pick__item:focus-visible { outline: 2px solid var(--rsa-purple-300); outline-offset: 1px; }
.club-pick__mark { height: 32px; width: 32px; object-fit: contain; flex-shrink: 0; }
.club-pick__name { flex: 1; min-width: 0; font-size: .9375rem; font-weight: 550; }
.club-pick__go { color: var(--rsa-gray-400); transition: color var(--rsa-fast), transform var(--rsa-fast); }
.club-pick__item:hover .club-pick__go { color: var(--rsa-purple-600); transform: translateX(2px); }

/* A support reference (the error page's request id): one chip that wraps inside itself,
   rather than an inline code chip broken in two across lines. */
.login-ref {
    display: inline-block;
    max-width: 100%;
    padding: .35rem .7rem;
    font-size: .75rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Header laid out in a row: logo and title on the left, an aside on the right (the wide sign-up). */
.login-head--row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.login-head__id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.login-head__logo { height: 52px; width: auto; flex-shrink: 0; }
.login-head--row .login-title { text-align: left; font-size: 1.375rem; margin: 0; }
.login-head--row .login-sub { text-align: left; margin: 0; }

/* password requirements checklist (Welcome, resets) */
.req-list {
    list-style: none;
    margin: .75rem 0 0;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: #f8f8fb;
    border: 1px solid #e5e3ed;
    display: grid;
    gap: .35rem;
}
.req-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: #6f6c81;
}
.req-list li::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid #d3d0de;
    background: #fff;
    transition: background 140ms ease, border-color 140ms ease;
}
/* The same rules as a plain reminder, on a page that cannot tick them off as they are typed:
   bullets rather than empty boxes that look unmet. */
.req-list--hint { margin-top: -.25rem; }
.req-list--hint li::before {
    width: 6px;
    height: 6px;
    margin: 0 5px;
    border: none;
    background: var(--rsa-gray-300);
}
.req-list li.met { color: #12855f; }
.req-list li.met::before {
    border-color: #12855f;
    background: #12855f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M12.7 5.3a1 1 0 0 0-1.4-1.4L7 8.2 5.2 6.4a1 1 0 1 0-1.4 1.4l2.5 2.5a1 1 0 0 0 1.4 0l5-5z'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* compact step indicator (sign-up wizard) */
.auth-steps {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.75rem;
}
.auth-steps__step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #a3a0b3;
    white-space: nowrap;
}
.auth-steps__dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 700;
    background: #f1f0f6;
    color: #a3a0b3;
    border: 1.5px solid #e5e3ed;
    transition: all 200ms ease;
}
.auth-steps__step--active { color: var(--rsa-purple-600); }
.auth-steps__step--active .auth-steps__dot {
    background: var(--rsa-purple-600);
    border-color: var(--rsa-purple-600);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--rsa-purple-600) 15%, transparent);
}
.auth-steps__step--done { color: #12855f; }
.auth-steps__step--done .auth-steps__dot {
    background: #12855f;
    border-color: #12855f;
    color: #fff;
}
.auth-steps__bar {
    flex: 1;
    height: 2px;
    min-width: 18px;
    background: #e5e3ed;
    border-radius: 2px;
}
.auth-steps__bar--done { background: #12855f; }

@media (max-width: 560px) {
    .auth-steps__step span:last-child { display: none; }
    .auth-steps__step--active span:last-child { display: inline; }
    .login-card { padding: 1.75rem 1.25rem; }
}

/* Light scene, for a club whose sign-in background is a light colour (data-login-scene on the
   document, from ClubPalette.LoginScene). Same waves, grid and glows, drawn dark on light; the
   stripe across the card stays as it is. The sign-in preview (SignInPreview.razor) names its scene
   with a class instead, so the club the page is viewed under does not decide it. */
[data-login-scene="light"] .login-shell:not(.login-shell--dark),
.login-shell--light {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 14 Q15 4 30 14 T60 14 T90 14 T120 14 V28 H0 Z' fill='rgba(0,0,0,.04)'/%3E%3C/svg%3E") left bottom / 300px 34px repeat-x,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28' preserveAspectRatio='none'%3E%3Cpath d='M0 16 Q15 7 30 16 T60 16 T90 16 T120 16 V28 H0 Z' fill='rgba(0,0,0,.03)'/%3E%3C/svg%3E") left bottom / 520px 52px repeat-x,
        radial-gradient(ellipse 70% 55% at 85% 10%, color-mix(in srgb, var(--login-glow, var(--rsa-pink-500)) 22%, transparent) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 10% 95%, color-mix(in srgb, var(--rsa-purple-600) 8%, transparent) 0%, transparent 55%),
        var(--login-bg, #f4f5f7);
}
[data-login-scene="light"] .login-shell:not(.login-shell--dark)::before,
.login-shell--light::before {
    background-image:
        linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px);
}
[data-login-scene="light"] .login-shell:not(.login-shell--dark)::after,
.login-shell--light::after {
    background: color-mix(in srgb, var(--login-glow, var(--rsa-pink-500)) 22%, transparent);
}
[data-login-scene="light"] .login-shell:not(.login-shell--dark) .login-card,
.login-shell--light .login-card {
    box-shadow:
        0 24px 48px -20px rgba(15, 23, 42, .18),
        0 0 0 1px rgba(15, 23, 42, .06);
}

@media (prefers-reduced-motion: reduce) {
    .login-shell::after { animation: none; }
    .login-card { animation-duration: .001ms; }
}

/* The reconnect card: the page is waiting on its connection, and nothing on it can answer until
   it is back. A soft veil says so without hiding the page; the card changes its words with
   Blazor's state (trying / gave up / the server no longer knows this page). */
#components-reconnect-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--rsa-purple-900) 32%, transparent);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: rsa-veil-in 200ms ease-out both;
}
@keyframes rsa-veil-in { from { opacity: 0; } to { opacity: 1; } }
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}
#components-reconnect-modal.components-reconnect-hidden { display: none; }
.components-reconnect-inner {
    width: min(100%, 340px);
    padding: 1.6rem 1.5rem 1.4rem;
    text-align: center;
    background: var(--rsa-surface);
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    box-shadow: var(--rsa-shadow-lg);
    animation: rsa-toast-in 320ms cubic-bezier(.2, .8, .3, 1.08) both;
}
.components-reconnect-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid var(--rsa-purple-50);
    border-top-color: var(--rsa-purple-600);
    border-radius: 50%;
    animation: components-reconnect-spin 900ms linear infinite;
}
@keyframes components-reconnect-spin { to { transform: rotate(360deg); } }
.components-reconnect-text strong {
    display: block;
    font-family: var(--rsa-font-display);
    font-size: 1.05rem;
    color: var(--rsa-gray-900);
    margin-bottom: .2rem;
}
.components-reconnect-text .small { color: var(--rsa-gray-600); }
/* One line of words per state; the rest stay hidden. */
.components-reconnect-text [data-when] { display: none; }
#components-reconnect-modal.components-reconnect-show [data-when="trying"],
#components-reconnect-modal.components-reconnect-failed [data-when="failed"],
#components-reconnect-modal.components-reconnect-rejected [data-when="rejected"] { display: block; }
#components-reconnect-modal.components-reconnect-failed .components-reconnect-spinner,
#components-reconnect-modal.components-reconnect-rejected .components-reconnect-spinner {
    animation: none;
    border-color: var(--rsa-pink-50);
    border-top-color: var(--rsa-pink-500);
}
.components-reconnect-inner .btn { margin-top: .9rem; }
#components-reconnect-rejoin { display: inline-flex; }
#components-reconnect-reload { display: none; }
#components-reconnect-modal.components-reconnect-rejected #components-reconnect-rejoin { display: none; }
#components-reconnect-modal.components-reconnect-rejected #components-reconnect-reload { display: inline-flex; }

/* The "something broke" bar: the same card as a toast, in the toast's corner, in the danger colour.
   Blazor shows it by setting display: block on it. */
#blazor-error-ui {
    color-scheme: light only;
    display: none;
    position: fixed;
    right: 1.25rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    width: min(100vw - 2rem, 390px);
    z-index: 1301;
    align-items: start;
    gap: .8rem;
    padding: .9rem 1rem;
    background: color-mix(in srgb, var(--rsa-surface) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    box-shadow: var(--rsa-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .7);
    color: var(--rsa-gray-900);
    font-size: .875rem;
    line-height: 1.4;
    animation: rsa-toast-in 360ms cubic-bezier(.2, .8, .3, 1.08) both;
}
#blazor-error-ui[style*="block"] { display: flex !important; }
#blazor-error-ui > .bi-exclamation-triangle-fill {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--rsa-pink-50);
    color: var(--rsa-pink-600);
    font-size: .9rem;
}
#blazor-error-ui .error-body { flex: 1; min-width: 0; padding-top: .3rem; }
#blazor-error-ui .error-body strong { display: block; font-weight: 650; }
#blazor-error-ui .error-body span { display: block; color: var(--rsa-gray-600); }
#blazor-error-ui .reload {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .45rem;
    color: var(--rsa-purple-600);
    font-weight: 650;
    text-decoration: none;
}
#blazor-error-ui .reload:hover { color: var(--rsa-purple-800); text-decoration: underline; text-underline-offset: 3px; }
#blazor-error-ui .dismiss {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin: -.2rem -.3rem 0 0;
    border-radius: 8px;
    color: var(--rsa-gray-400);
    font-size: .8rem;
    cursor: pointer;
    transition: background var(--rsa-fast), color var(--rsa-fast);
}
#blazor-error-ui .dismiss:hover { background: var(--rsa-gray-100); color: var(--rsa-gray-800); }
@media (max-width: 575.98px) {
    #blazor-error-ui { left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); width: auto; border-radius: var(--rsa-radius); }
}

.darker-border-checkbox.form-check-input { border-color: #929292; }

/* Floating labels: the label sits in the field until it floats, then the placeholder shows as a hint. */
.form-floating > .form-control:focus::placeholder { color: var(--rsa-gray-400); }
/* Bootstrap paints the floated label's backing in the page colour, which shows as a grey pill on a white field. */
.form-floating > .form-control ~ label::after { background-color: #fff !important; }

/* A drop zone on a tinted panel (the sign-up's member editor) keeps a white ground so it reads as a field.
   Doubled class: theme.css loads after this file and sets the zone's own grey. Hover still wins. */
.upload-zone.upload-zone--solid { background: var(--rsa-surface); }
.upload-zone.upload-zone--solid:hover { background: var(--rsa-purple-50); }

/* ============================================================
   PUBLIC PAGES (fundraisers, under PublicLayout)
   ============================================================ */


/* A price or count on the right of a tick tile. */
.check-tile__aside {
    margin-left: auto;
    padding-left: .5rem;
    font-size: .8125rem;
    font-weight: 650;
    white-space: nowrap;
    color: var(--rsa-gray-700);
}

/* The public shell has no .has-mobile-bar padding of its own, so the fixed bar sat over its footer. */
@media (max-width: 1199.98px) {
    .home-shell:has(.mobile-bar) { padding-bottom: 84px; }
    /* ...which then does the page's own padding's job, so that one steps aside. */
    .home-shell:has(.mobile-bar) .has-mobile-bar { padding-bottom: 0; }
}

/* ============================================================
   Generic sign-in: the portal's own mark and name, worn when the
   address names no club (ClubBrand). Colours come from the
   Portal palette in the head, like any club's.
   ============================================================ */
.portal-logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}
.login-brand .portal-logo img { height: 48px; width: 48px; }
/* A warm glow over teal turns to mud, so the generic scene glows in its own aqua. */
.login-shell:has(.portal-logo) { --login-glow: var(--rsa-yellow-500); }
.portal-logo__name {
    font-family: var(--rsa-font-display);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -.02em;
    color: var(--rsa-purple-800);
}
/* One link per club under "Sign up with your club". */
.login-foot__clubs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem 1.1rem;
    margin-top: .4rem;
}
.login-foot__clubs a { font-weight: 600; }

/* Club profile (ClubProfile.razor): the uploaded images as they are now. */
.club-asset-preview { max-height: 48px; max-width: 160px; object-fit: contain; border-radius: 6px; padding: 4px; border: 1px solid var(--rsa-line); background: #fff; }
.club-asset-preview--dark { background: var(--rsa-purple-900, #1d1446); }
.club-asset-input { max-width: 22rem; }

/* ColourInput.razor: the browser's colour picker beside the hex box, the two kept in step. */
.colour-input { display: flex; align-items: center; gap: .5rem; }
.colour-input__picker {
    width: 2.25rem; height: 2rem; flex-shrink: 0; padding: 2px; cursor: pointer;
    border: 1px solid var(--rsa-gray-300); border-radius: var(--rsa-radius-sm); background: #fff;
}
.colour-input__picker::-webkit-color-swatch-wrapper { padding: 0; }
.colour-input__picker::-webkit-color-swatch { border: 0; border-radius: 5px; }
.colour-input__picker::-moz-color-swatch { border: 0; border-radius: 5px; }
.colour-input__hex { max-width: 9rem; font-variant-numeric: tabular-nums; }

/* FontPicker.razor: a select-looking button that opens a list of fonts, each in its own face. */
.font-picker { position: relative; max-width: 22rem; }
.font-picker__toggle { text-align: left; width: 100%; }
.font-picker__list {
    position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
    max-height: 22rem; overflow-y: auto; padding: .35rem;
    background: #fff; border: 1px solid var(--rsa-line); border-radius: var(--rsa-radius-sm);
    box-shadow: 0 12px 30px -12px rgba(20, 10, 60, .35);
}
.font-picker__group {
    padding: .5rem .5rem .2rem; color: var(--rsa-gray-500);
    font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.font-picker__option {
    display: flex; flex-direction: column; align-items: flex-start; width: 100%;
    padding: .4rem .55rem; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer;
}
.font-picker__option:hover, .font-picker__option:focus-visible { background: var(--rsa-purple-50); }
.font-picker__option.is-current { background: var(--rsa-purple-50); box-shadow: inset 3px 0 0 var(--rsa-purple-400); }
.font-picker__name { font-size: 1rem; color: var(--rsa-gray-800); }
.font-picker__sample { font-size: .8125rem; color: var(--rsa-gray-500); }

.branding-advanced { margin-top: .5rem; }
.branding-advanced > summary { cursor: pointer; color: var(--rsa-gray-600); margin-bottom: .5rem; }

/* ClubBrandingFields.razor's preview: a slice of the portal in the colours and fonts being edited. */
.branding-preview {
    display: grid; grid-template-columns: 1fr 9rem; overflow: hidden;
    border: 1px solid var(--rsa-line); border-radius: var(--rsa-radius-sm); background: #fff;
    font-family: var(--pv-body);
}
.branding-preview__bar {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .6rem .9rem; background: var(--pv-brand); color: #fff;
}
.branding-preview__name { font-family: var(--pv-heading); font-weight: 700; font-size: 1.05rem; }
.branding-preview__nav { font-size: .8125rem; opacity: .85; }
.branding-preview__body { padding: .9rem; }
.branding-preview__title { font-family: var(--pv-heading); font-weight: 700; font-size: 1.25rem; color: var(--pv-brand); margin: 0 0 .25rem; }
.branding-preview__text { font-size: .875rem; color: var(--rsa-gray-700); margin: 0 0 .75rem; }
.branding-preview__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.branding-preview__btn { padding: .35rem .8rem; border-radius: 8px; background: var(--pv-brand); color: #fff; font-size: .8125rem; font-weight: 600; }
.branding-preview__chip { padding: .2rem .6rem; border-radius: 999px; background: var(--pv-accent); color: #1f1a33; font-size: .75rem; font-weight: 600; }
.branding-preview__due { color: var(--pv-due); font-weight: 700; font-size: .875rem; }
.branding-preview__login {
    display: grid; place-items: center; padding: .9rem;
    background: radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--pv-glow) 45%, transparent), transparent 60%), var(--pv-login);
}
.branding-preview__login-card {
    width: 100%; padding: .6rem; border-radius: 10px; background: #fff; text-align: center;
    font-family: var(--pv-heading); font-weight: 700; font-size: .875rem; color: var(--pv-brand);
    border-top: 3px solid var(--pv-glow);
}
@media (max-width: 575.98px) {
    .branding-preview { grid-template-columns: 1fr; }
}

/* ColourInput.razor: a colour that saves but will be hard to read. */
.colour-input__warning { margin-top: .3rem; font-size: .8125rem; color: #8a5a00; }
.colour-input__warning .bi { margin-right: .2rem; }

/* SignInPreview.razor: the sign-in page at full size over the form that opened it. */
.signin-preview {
    position: fixed; inset: 0; z-index: 1070;
    overflow-y: auto; overscroll-behavior: contain;
    font-family: var(--rsa-font);
    background: var(--rsa-purple-900, #1d1446);
}
.signin-preview__bar {
    position: sticky; top: 0; z-index: 2;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    padding: .6rem 1rem; background: rgba(15, 12, 30, .88); color: #fff; font-size: .875rem;
    backdrop-filter: blur(6px);
}
.signin-preview__note .bi { margin-right: .35rem; }
.signin-preview .login-shell { min-height: calc(100vh - 3rem); }
.signin-preview__name {
    font-family: var(--rsa-font-display); font-weight: 700; font-size: 1.5rem; color: var(--rsa-purple-800);
}
body:has(.signin-preview) { overflow: hidden; }

/* The show-password eye (sign-in and sign-up), inside the right-hand end of the password box. */
.password-field { position: relative; }
.password-field > .form-control { padding-right: 2.75rem; }
.password-toggle {
    position: absolute; top: 0; right: 0; z-index: 5;
    height: 100%; width: 2.75rem;
    display: flex; align-items: center; justify-content: center;
    padding: 0; border: 0; background: transparent;
    color: var(--rsa-gray-500); border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.password-toggle:hover { color: var(--rsa-purple-600); }
.password-toggle:focus-visible { outline: 2px solid var(--rsa-purple-400); outline-offset: -2px; }
/* A floating-label box holds its validation message too, so the eye is sized to the box, not the wrapper. */
.form-floating.password-field > .password-toggle { height: calc(3.5rem + calc(var(--bs-border-width) * 2)); }
/* Edge draws its own eye in a password box; one is enough. */
.password-field input::-ms-reveal, .password-field input::-ms-clear { display: none; }
