h1:focus {
    outline: none;
}

.logo-preview {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Person photos are portrait, 400 x 512. */
.photo-preview {
    width: 75px;
    height: 96px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cursor-pointer {
    cursor: pointer;
}

.permission-grid td, .permission-grid th {
    text-align: center;
    padding: 0 4px !important;
}

.permission-grid td:first-child, .permission-grid th:first-child {
    text-align: left;
}

/* ---- Account (login) pages: static, no MudBlazor ---- */
.account-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #eef2f8;
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

.account-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(31, 56, 100, .15);
    padding: 32px 28px;
}

.account-brand {
    font-size: 28px;
    font-weight: 700;
    color: #1F3864;
    text-align: center;
}

.account-subtitle {
    color: #5f6b7a;
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.account-card h1 {
    font-size: 20px;
    margin: 0 0 16px;
    color: #1F3864;
}

.account-card label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.account-card input[type=email], .account-card input[type=text] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #b8c2d0;
    border-radius: 4px;
    margin-bottom: 12px;
}

.account-card input.otp {
    letter-spacing: 6px;
    font-size: 22px;
    text-align: center;
}

.account-card .btn {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border: 0;
    border-radius: 4px;
    background: #1F3864;
    color: #fff;
    cursor: pointer;
    margin-top: 4px;
}

.account-card .btn.secondary {
    background: transparent;
    color: #2E5597;
    border: 1px solid #2E5597;
}

.account-card .btn + .btn, .account-card form + form {
    margin-top: 10px;
}

.account-card .msg {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 14px;
}

.account-card .msg.info { background: #e8f0fb; color: #1F3864; }
.account-card .msg.error { background: #fdecea; color: #a12622; }
.account-card .hint { font-size: 13px; color: #5f6b7a; margin-top: 12px; }

/* Registration page */
.account-card a.btn { display: block; box-sizing: border-box; text-align: center; text-decoration: none; }
.account-card .lead { font-size: 14px; color: #333; margin: -6px 0 16px; line-height: 1.45; }
.account-card .divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; color: #5f6b7a; font-size: 13px; }
.account-card .divider::before, .account-card .divider::after { content: ""; flex: 1; border-top: 1px solid #dde3ea; }
.account-card input[type=tel], .account-card input[type=date], .account-card select, .account-card textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #b8c2d0;
    border-radius: 4px;
    margin-bottom: 12px;
    background: #fff;
}
.account-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.account-card .section { font-weight: 600; color: #1F3864; font-size: 14px; margin: 8px 0 10px; }
.account-card label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; margin: 4px 0 14px; }
.account-card label.check input { margin-top: 2px; flex: none; }
.account-card .cf-turnstile { margin: 4px 0 12px; min-height: 65px; }
.account-card .choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.account-card .choice {
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #b8c2d0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
}
.account-card .choice:hover { border-color: #2E5597; background: #f4f7fc; }
.account-card .choice span { display: block; font-size: 13px; color: #5f6b7a; margin-top: 2px; }
@media (max-width: 380px) { .account-card .row2 { grid-template-columns: 1fr; } }

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ST006 email preview: show the email roughly as a mail client would. */
.email-preview {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Member area (MemberLayout): phone-first, bottom navigation. */
.member-main {
    padding-top: 48px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.member-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    display: flex;
    justify-content: center;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
}

.member-nav a {
    flex: 1;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
}

.member-nav a.active {
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.member-pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* "Advertise here" banner (SponsoredAd) in ad spaces without a paid ad. */
.house-ad {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 14px 16px 16px;
    border-radius: 12px;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #1F3864 0%, #2E5597 60%, #3d6fc4 100%);
    box-shadow: 0 2px 10px rgba(31, 56, 100, .25);
}
.house-ad::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.house-ad-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .16);
    padding: 2px 8px;
    border-radius: 10px;
}
.house-ad-body { display: flex; gap: 12px; align-items: center; margin-top: 10px; position: relative; z-index: 1; }
.house-ad-icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5b301;
    color: #1F3864;
}
.house-ad-text { display: flex; flex-direction: column; gap: 3px; }
.house-ad-headline { font-size: 20px; font-weight: 700; line-height: 1.2; }
.house-ad-message { font-size: 13.5px; line-height: 1.4; opacity: .92; }
.house-ad-cta {
    display: inline-block;
    position: relative;
    z-index: 1;
    margin-top: 12px;
    padding: 7px 14px;
    border-radius: 18px;
    background: #fff;
    color: #1F3864;
    font-weight: 600;
    font-size: 14px;
}
.house-ad:hover .house-ad-cta { background: #f5b301; }

/* Ad carousel (SponsoredAd.razor + ovams.adRotator), as in the Grab / TADA apps: one full-width 2:1 banner at a time
   (upload 1200 x 600), sliding on to the next every few seconds, with the dots on the banner itself. */
.ad-rotator {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.ad-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ad-track::-webkit-scrollbar { display: none; }
.ad-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: block;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #e9edf3;
    color: #fff !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}
.ad-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.ad-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ad-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    padding: 30px 12px 22px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}
.ad-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ad-cta {
    flex: none;
    align-self: flex-end;
    padding: 5px 11px;
    border-radius: 999px;
    background: #ffc83d;
    color: #3b2a00;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
.ad-slide:hover .ad-cta { background: #f5b301; }
/* An ad without an image: headline and text on a coloured card the same shape as the banners. */
.ad-slide-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 34px 14px 22px;
    background: linear-gradient(135deg, #0f766e 0%, #14919b 60%, #2bb3a3 100%);
}
.ad-slide-text .ad-title { font-size: 18px; }
.ad-body {
    font-size: 13.5px;
    line-height: 1.4;
    opacity: .92;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ad-slide-text .ad-cta { margin-top: auto; }
/* Dots on the banner, bottom centre. */
.ad-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 7px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}
.ad-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 2px rgba(0, 0, 0, .35);
    cursor: pointer;
    pointer-events: auto;
    transition: width .25s, background .25s;
}
.ad-dot.active { width: 16px; background: #fff; }

/* Membership card (/my/card): a coloured band with the association, then the member and the QR code. */
.member-card {
    overflow: hidden;
    border-radius: 16px !important;
}

.member-card-head {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    padding: 12px 16px;
}

/* Two-step sign-in */
.account-card .recovery-codes { columns: 2; gap: 16px; padding-left: 22px; margin: 0 0 16px; font-size: 15px; }
.account-card .recovery-codes li { margin: 4px 0; }
.account-card .recovery-codes code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .5px; }
.account-card .secret { font-family: ui-monospace, Consolas, monospace; font-size: 14px; text-align: center; word-spacing: 4px;
    background: #f4f6f9; border-radius: 6px; padding: 8px; margin: 0 0 14px; user-select: all; }
.account-card details { margin-top: 14px; font-size: 13px; }
.account-card details summary { cursor: pointer; color: #1F3864; }
.account-card ol.steps { padding-left: 20px; font-size: 14px; line-height: 1.45; margin: 0 0 14px; }

/* Contact us */
.account-footer { text-align: center; margin-top: 14px; font-size: 13px; }
.account-footer a { color: #5f6b7a; }
.account-card .contact-list { list-style: none; padding: 0; margin: 0 0 8px; }
.account-card .contact-list li { margin: 0 0 10px; }
.account-card .contact-list .label { display: block; font-size: 12px; color: #5f6b7a; text-transform: uppercase; letter-spacing: .4px; }
.account-card .contact-list a { font-size: 16px; color: #1F3864; word-break: break-all; }
.account-card a.btn.whatsapp { background: #1f8f4e; }
.account-card .contact-message { white-space: pre-line; }
.account-card .hint a { color: #1F3864; }
