:root {
    --fm-bg: #f4f8f2;
    --fm-surface: #ffffff;
    --fm-surface-strong: #0d2f24;
    --fm-text: #13261f;
    --fm-text-soft: #4d6359;
    --fm-primary: #1b8f4f;
    --fm-primary-dark: #0f6b39;
    --fm-accent: #f8b81f;
    --fm-radius-lg: 1.2rem;
    --fm-radius-md: 0.8rem;
    --fm-shadow-soft: 0 14px 30px rgba(13, 47, 36, 0.14);
}

html, body {
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 10% 10%, #fdf7e2 0%, #f4f8f2 38%, #e9f3ee 100%);
    color: var(--fm-text);
}

a, .btn-link {
    color: #116aa8;
}

.btn-primary {
    color: #fff;
    background-color: var(--fm-primary);
    border-color: var(--fm-primary-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--fm-primary-dark);
    border-color: #0a512b;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    letter-spacing: 0.01em;
}

h1:focus {
    outline: none;
}

.hero-mundial {
    position: relative;
    overflow: hidden;
    border-radius: var(--fm-radius-lg);
    margin: 0.4rem 0 1.4rem;
    padding: 2.5rem 2rem;
    min-height: 22rem;
    display: flex;
    align-items: flex-end;
    background-image: linear-gradient(120deg, rgba(6, 40, 29, 0.9) 0%, rgba(7, 61, 40, 0.74) 45%, rgba(18, 56, 105, 0.58) 100%),
        url('https://images.unsplash.com/photo-1522778526097-ce0a22ceb253?auto=format&fit=crop&w=1920&q=80');
    background-position: center;
    background-size: cover;
    box-shadow: var(--fm-shadow-soft);
}

.hero-mundial__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(8, 22, 17, 0.55) 0%, rgba(8, 22, 17, 0) 38%);
}

.hero-mundial__content {
    position: relative;
    max-width: 44rem;
    color: #f4fff8;
}

.hero-mundial__kicker {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    color: #102318;
    background: linear-gradient(135deg, #ffe48a, #f8b81f);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.hero-mundial h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 0.8rem;
    color: #ffe48a;
    font-weight: 700;
}

.hero-mundial p {
    font-size: 1.05rem;
    color: #dcece2;
    max-width: 40rem;
}

.hero-mundial__actions {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.info-card {
    background: var(--fm-surface);
    border-radius: var(--fm-radius-md);
    padding: 1.1rem;
    box-shadow: var(--fm-shadow-soft);
    border: 1px solid #d7e7de;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(13, 47, 36, 0.19);
}

.info-card h2 {
    margin-bottom: 0.45rem;
    font-size: 1.35rem;
}

.info-card p {
    color: var(--fm-text-soft);
}

.login-stage {
    display: grid;
    gap: 1.2rem;
    align-items: start;
    grid-template-columns: 1fr;
}

.login-stage__intro {
    background: linear-gradient(150deg, #edf8f2 0%, #fff9ea 100%);
    border: 1px solid #d8e9df;
    border-radius: var(--fm-radius-md);
    padding: 1.2rem;
}

.login-stage__intro p {
    margin: 0;
    color: var(--fm-text-soft);
}

.login-card {
    background: var(--fm-surface);
    border-radius: var(--fm-radius-md);
    border: 1px solid #d7e7de;
    box-shadow: var(--fm-shadow-soft);
    padding: 1.25rem;
}

.admin-page-shell {
    display: grid;
    gap: 1rem;
}

.admin-page-hero {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border-radius: var(--fm-radius-lg);
    background: linear-gradient(135deg, rgba(14, 63, 45, 0.95), rgba(23, 109, 80, 0.8)),
        url('https://images.unsplash.com/photo-1517927033932-b3d18e61fb3a?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    color: #f4fff8;
    box-shadow: var(--fm-shadow-soft);
}

.admin-page-hero--compact {
    background-image: linear-gradient(135deg, rgba(13, 38, 31, 0.95), rgba(13, 83, 61, 0.82)),
        url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=1600&q=80');
}

.admin-page-hero p {
    margin: 0.5rem 0 0;
    max-width: 60ch;
    color: rgba(244, 255, 248, 0.85);
}

.admin-surface-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d7e7de;
    border-radius: var(--fm-radius-md);
    box-shadow: var(--fm-shadow-soft);
    padding: 1rem;
}

.admin-table thead th {
    border-bottom-width: 1px;
    color: var(--fm-text-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table tbody tr:hover {
    background-color: #f4fbf7;
}

.reveal-up {
    opacity: 0;
    transform: translateY(10px);
    animation: reveal-up 420ms ease forwards;
}

.reveal-up.delay-1 {
    animation-delay: 110ms;
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 900px) {
    .login-stage {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

@media (max-width: 640px) {
    .hero-mundial {
        min-height: 20rem;
        padding: 1.5rem 1.1rem;
    }

    .hero-mundial__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .info-card,
    .btn,
    .nav-link {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

.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;
}

/* ── Avatares genéricos ── */
.avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--fm-gold);
    flex-shrink: 0;
}
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fm-green) 0%, #0a5c3c 100%);
    color: var(--fm-gold);
    font-size: 1.7rem;
    font-family: var(--fm-font-display);
    font-weight: 700;
    border: 3px solid var(--fm-gold);
}

/* ── Tabla de posiciones: grid de cards ── */
.page-with-sponsors {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.1rem;
    align-items: start;
}

.page-with-sponsors__main {
    min-width: 0;
}

.player-sponsors-rail {
    position: sticky;
    top: 1rem;
}

.player-sponsors-rail__card {
    border: 1px solid #d7e8de;
    border-radius: 1.2rem;
    background: linear-gradient(160deg, #ffffff 0%, #f4faf6 100%);
    box-shadow: 0 14px 30px rgba(13, 47, 36, 0.12);
    padding: 0.9rem;
}

.player-sponsors-rail__kicker {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a7266;
    font-weight: 700;
}

.player-sponsors-rail__title {
    margin: 0.18rem 0 0.8rem;
    font-size: 1.25rem;
    color: #143628;
}

.player-sponsors-tier {
    margin-top: 0.7rem;
    border: 1px solid #deece4;
    border-radius: 0.95rem;
    padding: 0.55rem 0.6rem 0.7rem;
    background: #fff;
}

.player-sponsors-tier h3 {
    margin: 0 0 0.4rem;
    font-size: 0.92rem;
    color: #1d3f31;
}

.player-sponsors-tier--gold {
    background: linear-gradient(180deg, #fffcf2 0%, #fff9e6 100%);
    border-color: #f1dda1;
}

.player-sponsors-tier--silver {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    border-color: #dbe3e9;
}

.player-sponsors-tier--bronze {
    background: linear-gradient(180deg, #fffefb 0%, #fff8f2 100%);
    border-color: #ebdbcf;
}

.standings-shell {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.page-with-sponsors .standings-shell {
    max-width: none;
    margin: 0;
    padding: 0;
}

.standings-grid {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.standing-card {
    display: grid;
    grid-template-columns: 2.4rem 3.4rem 1fr auto;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1.1rem;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid #e8ede9;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s, transform .18s;
}
.standing-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

/* Podio */
.standing-card--gold  { border-color: #f8b81f; background: linear-gradient(95deg,#fffdf0 0%,#fff8d6 100%); }
.standing-card--silver{ border-color: #b8c0cc; background: linear-gradient(95deg,#f8f9fb 0%,#eceff3 100%); }
.standing-card--bronze{ border-color: #c8876a; background: linear-gradient(95deg,#fdf6f1 0%,#f9ede4 100%); }

.standing-pos {
    font-family: var(--fm-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #9aa5a7;
    text-align: center;
}
.standing-card--gold  .standing-pos { color: #c89400; }
.standing-card--silver .standing-pos { color: #7a8694; }
.standing-card--bronze .standing-pos { color: #b06040; }

.standing-avatar-wrap { flex-shrink: 0; }

.standing-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4e8d9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.standing-avatar--initials {
    background: linear-gradient(135deg, var(--fm-green) 0%, #0a5c3c 100%);
    color: var(--fm-gold);
    font-family: var(--fm-font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.standing-name {
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standing-stats {
    display: flex;
    gap: .6rem;
}

.sstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.8rem;
}
.sstat__value {
    font-family: var(--fm-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    color: var(--fm-dark);
}
.sstat__label {
    font-size: .62rem;
    color: #8a9a9b;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: 2px;
}
.sstat--exact .sstat__value  { color: #1a7c4a; }
.sstat--outcome .sstat__value { color: #c07800; }
.sstat--miss .sstat__value   { color: #b03030; }

@media (max-width: 600px) {
    .page-with-sponsors {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding-bottom: 2rem;
    }

    .player-sponsors-rail {
        position: static;
    }

    .standing-card {
        grid-template-columns: 1.8rem 2.8rem 1fr;
        grid-template-rows: auto auto;
    }
    .standing-stats {
        grid-column: 1 / -1;
        justify-content: space-around;
    }
}

/* ── Página de perfil de jugador ── */
.player-profile-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.player-profile-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #0e4d2b 0%, #1b7a4a 100%);
    color: #fff;
    margin-bottom: 1.5rem;
}

.player-profile-avatar-wrap { flex-shrink: 0; }

.player-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--fm-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-profile-avatar--initials {
    background: rgba(255,255,255,.15);
    color: var(--fm-gold);
    font-family: var(--fm-font-display);
    font-size: 2.5rem;
    font-weight: 700;
}

.player-profile-info h1 {
    font-family: var(--fm-font-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: #fff;
}

.player-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1rem;
}

.pstat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pstat__value {
    font-family: var(--fm-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fm-gold);
    line-height: 1;
}
.pstat__label {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(255,255,255,.7);
    margin-top: 2px;
}

@media (max-width: 580px) {
    .player-profile-hero {
        flex-direction: column;
        text-align: center;
    }
    .player-profile-stats {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════
   APP SHELL — authenticated layout
═══════════════════════════════════════════════════════ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #061a10 0%, #0d3620 60%, #0a2c1a 100%);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    z-index: 40;
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms ease;
}
.app-sidebar::-webkit-scrollbar { display: none; }

.app-sidebar:has(.sidebar-shell--collapsed) {
    width: 70px;
}

.app-sidebar--collapsed {
    width: 70px;
}

.app-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 1.6rem 2rem;
}

.app-sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.9rem;
    left: 0.9rem;
    z-index: 50;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    border: none;
    background: #061a10;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

.app-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 35;
    backdrop-filter: blur(2px);
}

/* ══ Sidebar internals ══ */
.sidebar-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-brand {
    padding: 1.4rem 1.2rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-brand__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: #fff;
}
.sidebar-brand__link:hover { text-decoration: none; color: #fff; }

.sidebar-brand__ball { font-size: 1.5rem; }

.sidebar-brand__text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.18rem;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    letter-spacing: 0.02em;
}
.sidebar-brand__text strong {
    color: var(--fm-accent);
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 0.8rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
}

.sidebar-nav__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.9rem;
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 160ms, color 160ms;
    white-space: nowrap;
}
.sidebar-nav__item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}
.sidebar-nav__item.active {
    background: rgba(248,184,31,0.14);
    color: var(--fm-accent);
}

.sidebar-nav__icon {
    font-size: 1rem;
    opacity: 0.8;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}
.sidebar-nav__item.active .sidebar-nav__icon { opacity: 1; }

.sidebar-nav__section {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    padding: 1rem 0.9rem 0.3rem;
    font-weight: 700;
}

.sidebar-footer {
    padding: 0.7rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-footer__profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 160ms, color 160ms;
    width: 100%;
    overflow: hidden;
}
.sidebar-footer__profile:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}

.sidebar-footer__icon {
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.sidebar-footer__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.sidebar-footer__logout-form { margin: 0; }

.sidebar-footer__logout {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: none;
    background: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 160ms, color 160ms;
}
.sidebar-footer__logout:hover {
    background: rgba(200, 40, 40, 0.14);
    color: #f87070;
}

/* ── Sidebar collapse ── */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.3);
}

.sidebar-shell--collapsed {
    width: 70px;
}

.sidebar-shell--collapsed .sidebar-brand__text,
.sidebar-shell--collapsed .sidebar-nav__item span,
.sidebar-shell--collapsed .sidebar-footer__name,
.sidebar-shell--collapsed .sidebar-footer__logout span {
    display: none;
}

.sidebar-shell--collapsed .sidebar-brand {
    padding: 1.4rem 0.5rem;
}

.sidebar-shell--collapsed .sidebar-nav__item {
    padding: 0.62rem 0.5rem;
    justify-content: center;
    gap: 0;
}

.sidebar-shell--collapsed .sidebar-nav__section {
    display: none;
}

.sidebar-shell--collapsed .sidebar-footer__profile,
.sidebar-shell--collapsed .sidebar-footer__logout {
    padding: 0.55rem 0.5rem;
    justify-content: center;
    gap: 0;
}

.sidebar-toggle {
    display: flex;
}

body.fm-sidebar-collapsed .app-sidebar {
    width: 70px;
}

body.fm-sidebar-collapsed .sidebar-shell .sidebar-brand__text,
body.fm-sidebar-collapsed .sidebar-shell .sidebar-nav__item span,
body.fm-sidebar-collapsed .sidebar-shell .sidebar-footer__name,
body.fm-sidebar-collapsed .sidebar-shell .sidebar-footer__logout span {
    display: none;
}

body.fm-sidebar-collapsed .sidebar-shell .sidebar-brand {
    padding: 1.4rem 0.5rem;
}

body.fm-sidebar-collapsed .sidebar-shell .sidebar-nav__item {
    padding: 0.62rem 0.5rem;
    justify-content: center;
    gap: 0;
}

body.fm-sidebar-collapsed .sidebar-shell .sidebar-nav__section {
    display: none;
}

body.fm-sidebar-collapsed .sidebar-shell .sidebar-footer__profile,
body.fm-sidebar-collapsed .sidebar-shell .sidebar-footer__logout {
    padding: 0.55rem 0.5rem;
    justify-content: center;
    gap: 0;
}

/* Mobile sidebar */
@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
    }
    .app-shell--sidebar-open .app-sidebar {
        transform: translateX(0);
    }
    .app-shell--sidebar-open .app-overlay {
        display: block;
    }
    .app-sidebar-toggle {
        display: flex;
    }
    .app-content {
        padding: 1rem;
        padding-top: 3.8rem;
    }
}

/* ═══════════════════════════════════════════════════════
   PUBLIC LAYOUT — topbar + landing
═══════════════════════════════════════════════════════ */

.public-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.public-main { flex: 1; }

/* ── Topbar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 20, 12, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.topbar__brand:hover { text-decoration: none; color: #fff; }

.topbar__brand-ball { font-size: 1.3rem; }

.topbar__brand-text {
    font-family: 'Oswald', sans-serif;
    font-size: 1.18rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.02em;
}
.topbar__brand-text strong {
    color: var(--fm-accent);
    font-weight: 700;
}

.topbar__nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    justify-content: flex-end;
}

.topbar__link {
    padding: 0.42rem 0.95rem;
    border-radius: 8px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 150ms, color 150ms;
}
.topbar__link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

.topbar__cta {
    background: var(--fm-accent);
    color: #0d1f12 !important;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.42rem 1.15rem;
    border-radius: 8px;
    margin-left: 0.35rem;
    transition: background 150ms, transform 150ms;
    text-decoration: none;
    display: inline-block;
}
.topbar__cta:hover {
    background: #ffce30;
    transform: translateY(-1px);
    text-decoration: none;
}

.topbar__hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0.42rem 0.32rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    cursor: pointer;
    margin-left: auto;
    transition: background 150ms;
    flex-shrink: 0;
}
.topbar__hamburger:hover { background: rgba(255,255,255,0.16); }
.topbar__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
}

/* Mobile topbar */
@media (max-width: 640px) {
    .topbar__inner {
        height: auto;
        min-height: 58px;
        flex-wrap: wrap;
        padding: 0.7rem 1rem;
        gap: 0;
    }
    .topbar__hamburger { display: flex; }
    .topbar__nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0 0.75rem;
        gap: 0.2rem;
    }
    .topbar__nav--open { display: flex; }
    .topbar__link, .topbar__cta {
        text-align: center;
        padding: 0.65rem 1rem;
        margin-left: 0;
        border-radius: 10px;
    }
}

/* ── Landing hero ── */
.landing-hero {
    position: relative;
    min-height: calc(100vh - 62px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.landing-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    animation: hero-zoom 22s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes hero-zoom {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

.landing-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 12, 8, 0.9) 0%,
        rgba(4, 26, 16, 0.78) 40%,
        rgba(6, 25, 55, 0.5) 100%
    );
}

.landing-hero__content {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(248,184,31,0.2), rgba(248,184,31,0.1));
    border: 1px solid rgba(248,184,31,0.45);
    color: var(--fm-accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.6rem;
    backdrop-filter: blur(6px);
}

.landing-hero__title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(3.8rem, 8vw, 6.8rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.01em;
    color: #fff;
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.landing-hero__accent {
    color: var(--fm-accent);
    text-shadow: 0 0 60px rgba(248,184,31,0.45);
}

.landing-hero__desc {
    font-size: 1.12rem;
    color: rgba(255,255,255,0.72);
    max-width: 46ch;
    line-height: 1.65;
    margin-bottom: 2.2rem;
}

.landing-hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.88rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms, box-shadow 160ms, background 160ms;
    letter-spacing: 0.01em;
}

.landing-btn--primary {
    background: var(--fm-accent);
    color: #0d1f12;
    box-shadow: 0 4px 22px rgba(248,184,31,0.38);
}
.landing-btn--primary:hover {
    background: #ffce30;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(248,184,31,0.48);
    text-decoration: none;
    color: #0d1f12;
}

.landing-btn--ghost {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(6px);
}
.landing-btn--ghost:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.landing-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.35);
    font-size: 1.6rem;
    animation: bounce-hint 2.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bounce-hint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(9px); }
}

/* ── Features section ── */
.landing-features {
    background: var(--fm-bg);
    padding: 4rem 0 5rem;
}

.landing-features__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}

.landing-feature-card {
    background: var(--fm-surface);
    border: 1px solid #d7e7de;
    border-radius: 20px;
    padding: 2rem 1.75rem;
    box-shadow: var(--fm-shadow-soft);
    transition: transform 200ms ease, box-shadow 200ms ease;
    text-align: center;
}
.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(13,47,36,0.16);
}

.landing-feature-card__icon {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    display: block;
}

.landing-feature-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    margin-bottom: 0.55rem;
    color: var(--fm-text);
}

.landing-feature-card p {
    color: var(--fm-text-soft);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

/* ── Sponsors section ── */
.landing-sponsors {
    padding: 0.8rem 1.25rem 4.8rem;
}

.landing-sponsors__inner {
    max-width: 1120px;
    margin: 0 auto;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 248, 243, 0.96) 100%);
    border: 1px solid #d7e8de;
    border-radius: 1.6rem;
    box-shadow: 0 20px 44px rgba(10, 45, 33, 0.14);
    padding: clamp(1.1rem, 2.4vw, 2rem);
}

.landing-sponsors__title {
    margin: 0;
    text-align: center;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    color: #123125;
}

.landing-sponsors__subtitle {
    margin: 0.35rem 0 1.35rem;
    text-align: center;
    color: #4f685c;
}

.sponsors-tier {
    background: #ffffff;
    border: 1px solid #deece4;
    border-radius: 1.1rem;
    padding: 0.85rem 0.95rem 1.1rem;
    margin-top: 0.95rem;
    box-shadow: 0 10px 22px rgba(13, 47, 36, 0.08);
}

.landing-sponsors .sponsors-tier,
.landing-sponsors .sponsors-section,
.landing-sponsors .sponsors-carousel,
.landing-sponsors .sponsors-carousel__stage,
.landing-sponsors .sponsors-carousel__content,
.landing-sponsors .sponsors-carousel__viewport {
    width: 100%;
    max-width: none;
}

.sponsors-tier__title {
    margin: 0 0 0.65rem;
    color: #123528;
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

.sponsors-tier--gold {
    border-color: #f0db98;
    background: linear-gradient(180deg, #fffef8 0%, #fffcf1 100%);
}

.sponsors-tier--silver {
    border-color: #d8e0e6;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.sponsors-tier--bronze {
    border-color: #e7d4c6;
    background: linear-gradient(180deg, #fffdfa 0%, #fff8f3 100%);
}

/* Mobile landing */
@media (max-width: 640px) {
    .landing-hero {
        min-height: calc(100svh - 58px);
    }
    .landing-hero__content {
        padding: 3rem 1.25rem 4rem;
    }
    .landing-hero__actions {
        flex-direction: column;
    }
    .landing-btn {
        justify-content: center;
        text-align: center;
    }

    .landing-sponsors {
        padding: 0.6rem 0.8rem 3.5rem;
    }

    .landing-sponsors__inner {
        border-radius: 1.1rem;
        padding: 0.95rem 0.8rem 1rem;
    }

    .sponsors-tier {
        border-radius: 0.9rem;
        padding: 0.7rem 0.7rem 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-hero__bg,
    .landing-hero__scroll-hint,
    .landing-feature-card,
    .landing-btn {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: #fff3cd;
    border-top: 1px solid #ffe69c;
    color: #6b5400;
    padding: 0.75rem 1rem;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
}

#blazor-error-ui .reload {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}