/* ═══════════════════════════════════════════════════════════════
   EM 2028 – Cinematic Stadium Premium Theme
   ═══════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@700;800;900&display=swap");

:root {
    --em-bg-deep: #050510;
    --em-bg-navy: #0a0a2a;
    --em-pitch-dark: #2d5a27;
    --em-pitch-bright: #4caf50;
    --em-gold: #ffd700;
    --em-orange: #f58220;
    --em-text: #f0f2f8;
    --em-text-muted: rgba(220, 228, 240, 0.65);
    --em-card-bg: rgba(0, 0, 0, 0.7);
    --em-card-border: rgba(76, 175, 80, 0.35);
    --em-glow-green: rgba(76, 175, 80, 0.45);
    --em-glow-gold: rgba(255, 215, 0, 0.35);
    --em-font: "Figtree", "Metropolis", system-ui, -apple-system, "Segoe UI", sans-serif;
    --em-font-display: "Outfit", var(--em-font);
}

/* ── Global stadium atmosphere ── */
body.em-stadium-theme,
body.login-hero-page {
    font-family: var(--em-font);
    color: var(--em-text);
    background: var(--em-bg-deep);
}

body.em-stadium-theme::before {
    display: none;
}

body.em-stadium-theme .page-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Login / auth hero background ── */
body.login-hero-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--em-bg-deep);
}

.login-hero,
.em-app-stadium-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(160deg, var(--em-bg-navy), var(--em-pitch-dark) 120%);
}

.login-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transform: scale(1.05);
    transform-origin: center center;
    animation: heroKenBurns 30s ease-in-out infinite alternate;
    will-change: transform;
}

.em-app-stadium-bg__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    transform: scale(1.05);
    transform-origin: center center;
    animation: heroKenBurns 30s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes heroKenBurns {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.12); }
}

.login-hero-vignette,
.em-app-stadium-bg__vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 130% 95% at 50% 45%, transparent 15%, rgba(5, 5, 16, 0.65) 100%),
        linear-gradient(180deg, rgba(5, 5, 16, 0.55) 0%, transparent 25%, rgba(5, 5, 16, 0.75) 100%);
}

.login-hero-scrim,
.em-app-stadium-bg__scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 50% 50%, rgba(10, 10, 42, 0.15) 0%, rgba(5, 5, 16, 0.55) 100%),
        linear-gradient(90deg, rgba(5, 5, 16, 0.5) 0%, transparent 30%, transparent 70%, rgba(5, 5, 16, 0.5) 100%);
}

.login-hero-glow,
.em-app-stadium-bg__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 50% 30% at 50% 15%, rgba(255, 215, 0, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 25% at 30% 60%, rgba(76, 175, 80, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 40% 25% at 70% 55%, rgba(76, 175, 80, 0.08) 0%, transparent 60%);
}

.login-hero-grain,
.em-app-stadium-bg__grain {
    position: absolute;
    inset: -50%;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.0' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.12s steps(3) infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-2%, 1%); }
    66% { transform: translate(1%, -2%); }
    100% { transform: translate(0, 0); }
}

body.login-hero-page .page-login {
    position: relative;
    z-index: 2;
    margin: 0;
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 3.5rem);
}

body.login-hero-page .page-login .login-shell {
    width: 100%;
    max-width: 440px !important;
    margin: 0 auto !important;
}

/* ── Auth cards (login, register, etc.) ── */
body.login-hero-page .page-login .card {
    background: var(--em-card-bg) !important;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    box-shadow:
        0 0 0 1px var(--em-card-border),
        0 0 40px rgba(76, 175, 80, 0.12),
        0 24px 80px rgba(0, 0, 0, 0.65) !important;
    border: 1px solid var(--em-card-border) !important;
    border-radius: 14px !important;
}

.page-login .card,
.page-login .card .header,
.page-login .card label,
.page-login .card h3,
.page-login .card h4,
.page-login .card p {
    color: var(--em-text) !important;
}

.page-login .card p {
    color: var(--em-text-muted) !important;
}

.page-login .card .ui.input input,
.page-login .card input {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--em-text) !important;
    border: 1px solid rgba(76, 175, 80, 0.3) !important;
    border-radius: 8px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.page-login .card .ui.input input:focus,
.page-login .card input:focus {
    border-color: var(--em-pitch-bright) !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2), 0 0 20px rgba(76, 175, 80, 0.15) !important;
}

.page-login .card .ui.checkbox label {
    color: var(--em-text-muted) !important;
}

.page-login .card a.underline,
.page-login .card a.black {
    color: var(--em-gold) !important;
}

.page-login .card a:hover {
    color: var(--em-orange) !important;
}

.login-footer-links {
    text-align: center;
    margin-top: 14px;
}

.login-admin-link {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.9em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
    transition: color 0.2s ease;
}

.login-admin-link:hover {
    color: var(--em-gold) !important;
}

.login-headline {
    font-size: 1em;
    text-align: center;
    margin: 0 0 20px;
    color: var(--em-text-muted) !important;
}

.logo-big {
    display: none;
}

/* ── Branding ── */
.em-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 4px auto 20px;
    padding: 16px 18px 14px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 215, 0, 0.06), transparent 45%),
        linear-gradient(180deg, rgba(10, 14, 40, 0.92), rgba(5, 5, 16, 0.88));
    border: 1px solid rgba(76, 175, 80, 0.28);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(255, 215, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.em-brand--official {
    padding: 12px 14px 10px;
}

.em-brand__logo {
    display: block;
    object-fit: cover;
    object-position: center 38%;
    border-radius: 12px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.em-brand__logo--login {
    width: 100%;
    max-width: 320px;
    height: auto;
    max-height: 140px;
    aspect-ratio: 2.2 / 1;
}

.em-brand__tippspiel {
    margin: 0;
    font-family: var(--em-font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(240, 242, 248, 0.88);
}

.em-header-brand--official {
    padding: 4px 10px 4px 4px;
    gap: 0;
}

.em-brand__logo--header {
    width: 168px;
    height: 46px;
    object-position: center 36%;
    border-radius: 8px;
}

.em-brand__logo--nav {
    width: 40px;
    height: 40px;
    object-position: center 34%;
    border-radius: 8px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.em-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -12deg,
        transparent,
        transparent 10px,
        rgba(76, 175, 80, 0.03) 10px,
        rgba(76, 175, 80, 0.03) 11px
    );
    pointer-events: none;
}

.em-brand--login {
    margin-bottom: 8px;
}

.em-brand__crest-wrap {
    position: relative;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
}

.em-brand__crest-wrap::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, transparent, var(--em-gold), var(--em-pitch-bright), transparent 70%);
    opacity: 0.55;
    animation: emCrestAura 5s linear infinite;
    filter: blur(8px);
    z-index: 0;
}

.em-brand__crest-wrap--sm {
    width: 44px;
    height: 44px;
}

.em-brand__crest {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
    animation: emCrestFloat 4s ease-in-out infinite;
}

.em-brand__crest--sm {
    width: 40px;
    height: 40px;
    animation: none;
}

@keyframes emCrestAura {
    to { transform: rotate(360deg); }
}

@keyframes emCrestFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.em-wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.em-wordmark__row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 0.9;
}

.em-wordmark__em {
    font-family: var(--em-font-display);
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: linear-gradient(165deg, #ffffff 0%, var(--em-gold) 55%, #ffb300 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.25));
}

.em-wordmark__year {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--em-bg-deep);
    background: linear-gradient(180deg, var(--em-gold), #e6a800);
    padding: 2px 8px 3px;
    border-radius: 8px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.35);
    transform: rotate(-4deg) translateY(-2px);
}

.em-wordmark__line {
    display: block;
    width: 100%;
    height: 3px;
    margin: 4px 0 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--em-pitch-bright), var(--em-gold), transparent);
    opacity: 0.9;
}

.em-wordmark__tag {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(240, 242, 248, 0.92);
}

.em-wordmark__euro {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(111, 207, 95, 0.85);
    margin-top: 1px;
}

.em-wordmark--compact .em-wordmark__em {
    font-size: 1.25rem;
}

.em-wordmark--compact .em-wordmark__year {
    font-size: 0.72rem;
    padding: 1px 5px 2px;
    border-radius: 5px;
}

.em-wordmark--compact .em-wordmark__line {
    height: 2px;
    margin: 2px 0 1px;
    width: 90%;
}

.em-wordmark--compact .em-wordmark__tag {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
}

.em-wordmark--compact .em-wordmark__euro {
    display: none;
}

/* Legacy aliases – alte Seiten */
.em-brand-icon,
.em-brand-wordmark,
.em-brand-primary,
.em-brand-secondary {
    display: none;
}

.em-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    text-decoration: none !important;
    padding: 6px 12px 6px 6px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(76, 175, 80, 0.06));
    border: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.em-header-brand:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 215, 0, 0.08);
}

.em-header-brand__mark,
.em-header-brand__ring,
.em-header-brand__ball,
.em-header-brand__copy,
.em-header-brand__title,
.em-header-brand__sub {
    display: none !important;
}

.em-header-brand__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px var(--em-glow-gold));
}

.em-header-brand__text {
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.em-header-brand__text em {
    font-style: normal;
    color: var(--em-gold);
}

.em2028-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--em-gold), var(--em-orange));
    color: var(--em-bg-deep);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 0 16px var(--em-glow-gold);
}

/* ── Buttons (broadcast CTA style) ── */
.ui.primary.button,
.ui.primary.labeled.icon.button {
    background: linear-gradient(135deg, var(--em-pitch-dark), var(--em-pitch-bright)) !important;
    color: #fff !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    border: 1px solid rgba(76, 175, 80, 0.5) !important;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s, box-shadow 0.2s !important;
}

.ui.primary.button:hover,
.ui.primary.labeled.icon.button:hover {
    background: linear-gradient(135deg, var(--em-pitch-bright), #5ec462) !important;
    box-shadow: 0 4px 28px var(--em-glow-green), 0 0 20px var(--em-glow-gold) !important;
    transform: translateY(-1px);
}

/* ── 3D scene (legacy kick overlay) ── */
#scene-3d {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--em-bg-navy);
}

#scene-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.kick-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.kick-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 75% 65% at 55% 45%, transparent 35%, rgba(5, 5, 16, 0.55) 100%);
}

.kick-grain {
    position: absolute;
    inset: -100%;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.0' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.1s steps(3) infinite;
}

/* ═══════════════════════════════════════════════════════════════
   APP SHELL – Header, Nav, Footer
   ═══════════════════════════════════════════════════════════════ */

#header,
.em-topbar {
    height: 58px;
    background: linear-gradient(90deg, rgba(5, 5, 16, 0.88), rgba(10, 10, 42, 0.85)) !important;
    border-bottom: 1px solid rgba(76, 175, 80, 0.22) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(76, 175, 80, 0.06) !important;
    backdrop-filter: blur(16px) saturate(1.15);
    position: relative;
    overflow: visible;
    z-index: 100;
}

.em-topbar__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 40% 80% at 8% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 30% 60% at 92% 50%, rgba(76, 175, 80, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.em-topbar__beam {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--em-gold), var(--em-pitch-bright), var(--em-gold), transparent);
    background-size: 200% 100%;
    animation: emTopbarBeam 4s ease-in-out infinite;
    opacity: 0.75;
}

@keyframes emTopbarBeam {
    0%, 100% { background-position: 0% center; opacity: 0.5; }
    50% { background-position: 100% center; opacity: 1; }
}

.em-topbar__menu {
    height: 100% !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    position: relative;
    z-index: 1;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
}

.em-topbar__left {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    height: 100%;
}

.em-topbar__right {
    flex: 0 0 auto !important;
    gap: 8px;
    padding-right: 12px !important;
    overflow: visible;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    height: 100%;
}

.em-user-chip {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 4px 10px 4px 4px !important;
    margin-left: 4px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(76, 175, 80, 0.25) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    position: relative !important;
    cursor: pointer;
}

.em-user-chip.open {
    border-color: rgba(255, 215, 0, 0.45) !important;
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.15) !important;
}

.em-user-chip .menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    margin: 0 !important;
    padding: 6px 0 !important;
    border-radius: 12px !important;
    background: rgba(10, 10, 42, 0.97) !important;
    border: 1px solid rgba(76, 175, 80, 0.35) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(76, 175, 80, 0.1) !important;
    z-index: 10050 !important;
    backdrop-filter: blur(16px);
}

.em-user-chip.open .menu,
.em-user-chip .menu.visible {
    display: block !important;
}

.em-user-chip .menu > .item {
    padding: 0 !important;
}

.em-user-chip .menu > .item > a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 16px !important;
    color: var(--em-text) !important;
    text-decoration: none !important;
}

.em-user-chip .menu > .item:hover {
    background: rgba(76, 175, 80, 0.12) !important;
}

.em-user-chip .menu > .divider {
    margin: 6px 0 !important;
    border-top: 1px solid rgba(76, 175, 80, 0.2) !important;
}

.em-user-chip:hover {
    border-color: rgba(255, 215, 0, 0.35) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1) !important;
}

.em-user-chip > .dropdown.icon {
    color: var(--em-text-muted) !important;
    margin: 0 !important;
}

.em-header-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.2);
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.em-header-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(76, 175, 80, 0.45);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
}

.em-header-stat__val {
    font-size: 1.05em;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.em-header-stat__lbl {
    font-size: 0.62em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--em-text-muted);
    margin-top: 1px;
}

.em-header-stat--gold {
    border-color: rgba(255, 215, 0, 0.25);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(245, 130, 32, 0.08));
}

.em-header-stat--gold .em-header-stat__val {
    color: var(--em-gold);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.em-user-chip__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85em;
    color: var(--em-bg-deep);
    background: linear-gradient(135deg, var(--em-gold), var(--em-orange));
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.em-user-chip__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    max-width: 120px;
}

.em-user-chip__name {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.em-user-chip__role {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--em-text-muted);
}

/* ── Modern nav rail ── */
.em-nav-rail {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px 12px 20px;
    background: linear-gradient(165deg, rgba(12, 12, 38, 0.82) 0%, rgba(5, 5, 16, 0.92) 100%);
    border-right: 1px solid rgba(76, 175, 80, 0.18);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.45), inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.em-nav-rail__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.12);
}

.em-nav-rail__crest-slot {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-nav-rail__crest {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.em-nav-rail__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.25em;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(76, 175, 80, 0.25));
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.12);
}

.em-nav-rail__brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.em-nav-rail__brand strong {
    color: var(--em-text);
    font-size: 0.95em;
    letter-spacing: 0.02em;
}

.em-nav-rail__brand small {
    color: var(--em-text-muted);
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.em-nav-rail__track {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.em-nav-rail__indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.14), rgba(76, 175, 80, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.22);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition:
        transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1),
        height 0.32s cubic-bezier(0.34, 1.2, 0.64, 1),
        opacity 0.2s ease;
    will-change: transform, height;
}

.em-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.em-nav-item {
    margin: 0;
    padding: 0;
}

.em-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    text-decoration: none !important;
    color: var(--em-text-muted) !important;
    position: relative;
    transition: color 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.em-nav-link:hover {
    color: var(--em-text) !important;
    transform: translateX(4px);
}

.em-nav-link:active {
    transform: translateX(2px) scale(0.99);
}

.em-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.25s ease;
}

.em-nav-icon .icon {
    margin: 0 !important;
    font-size: 1.15em !important;
    opacity: 0.85;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.em-nav-link:hover .em-nav-icon {
    transform: scale(1.08) rotate(-3deg);
}

.em-nav-link:hover .em-nav-icon .icon {
    opacity: 1;
}

.em-nav-item.active .em-nav-link {
    color: #fff !important;
}

.em-nav-item.active .em-nav-icon {
    transform: scale(1.05);
}

.em-nav-item.active .em-nav-icon .icon {
    opacity: 1;
}

.em-nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.em-nav-label {
    font-weight: 600;
    font-size: 0.92em;
    letter-spacing: 0.01em;
}

.em-nav-hint {
    font-size: 0.72em;
    opacity: 0.65;
    letter-spacing: 0.02em;
}

.em-nav-item.active .em-nav-hint {
    opacity: 0.85;
    color: var(--em-gold);
}

.em-nav-badge {
    flex-shrink: 0;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff6b6b, #f58220);
    color: #fff;
    font-size: 0.72em;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(245, 130, 32, 0.45);
    animation: emBadgePulse 2.4s ease-in-out infinite;
}

@keyframes emBadgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(245, 130, 32, 0.35); }
    50% { transform: scale(1.06); box-shadow: 0 0 20px rgba(245, 130, 32, 0.55); }
}

.em-nav-item[data-accent="gold"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(245, 130, 32, 0.18));
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.em-nav-item[data-accent="violet"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.28), rgba(103, 58, 183, 0.22));
    border-color: rgba(186, 104, 200, 0.35);
    color: #ce93d8;
}

.em-nav-item[data-accent="green"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.28), rgba(45, 90, 39, 0.25));
    border-color: rgba(129, 199, 132, 0.35);
    color: #81c784;
}

.em-nav-item[data-accent="cyan"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.25), rgba(33, 150, 243, 0.22));
    border-color: rgba(77, 208, 225, 0.35);
    color: #4dd0e1;
}

.em-nav-item[data-accent="orange"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.28), rgba(245, 130, 32, 0.22));
    border-color: rgba(255, 183, 77, 0.35);
    color: #ffb74d;
}

.em-nav-item[data-accent="silver"] .em-nav-icon {
    background: linear-gradient(135deg, rgba(120, 144, 156, 0.25), rgba(84, 110, 122, 0.22));
    border-color: rgba(176, 190, 197, 0.3);
    color: #b0bec5;
}

.em-nav-item.active[data-accent="gold"] .em-nav-icon { box-shadow: 0 0 22px rgba(255, 215, 0, 0.35); }
.em-nav-item.active[data-accent="violet"] .em-nav-icon { box-shadow: 0 0 22px rgba(156, 39, 176, 0.4); }
.em-nav-item.active[data-accent="green"] .em-nav-icon { box-shadow: 0 0 22px rgba(76, 175, 80, 0.35); }
.em-nav-item.active[data-accent="cyan"] .em-nav-icon { box-shadow: 0 0 22px rgba(0, 188, 212, 0.35); }
.em-nav-item.active[data-accent="orange"] .em-nav-icon { box-shadow: 0 0 22px rgba(255, 152, 0, 0.35); }
.em-nav-item.active[data-accent="silver"] .em-nav-icon { box-shadow: 0 0 18px rgba(176, 190, 197, 0.25); }

.nav-menu.isMobile .em-nav-rail {
    border-right: none;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.55);
}

.footer {
    background: linear-gradient(90deg, rgba(5, 5, 16, 0.94), rgba(10, 10, 42, 0.92)) !important;
    border-top: 1px solid rgba(76, 175, 80, 0.2) !important;
    height: auto !important;
    padding: 10px 16px !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.footer .ui.secondary.menu {
    margin: 0 !important;
    min-height: 0 !important;
    background: transparent !important;
    border: none !important;
}

.footer .menu .item a {
    color: var(--em-text-muted) !important;
}

.footer .menu .item a:hover {
    color: var(--em-gold) !important;
}

#react-app .main-content {
    background: transparent;
    min-height: calc(100vh - 130px);
    color: var(--em-text);
}

@media (min-width: 768px) {
    #react-app .main-content:not(.mobile) {
        margin-left: 252px !important;
        max-width: calc(100vw - 252px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   APP CONTENT – Hero, Cards, Sections
   ═══════════════════════════════════════════════════════════════ */

.em-app-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 14px;
    padding: 36px 36px 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(76, 175, 80, 0.35);
    background:
        linear-gradient(135deg, rgba(5, 5, 16, 0.82) 0%, rgba(10, 10, 42, 0.75) 50%, rgba(45, 90, 39, 0.35) 100%),
        url("../img/stadium-hero.jpg") center 40% / cover no-repeat;
    box-shadow:
        0 8px 48px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.em-app-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, transparent 40%, rgba(5, 5, 16, 0.6) 100%);
    pointer-events: none;
}

.em-app-hero > * {
    position: relative;
    z-index: 1;
}

.em-app-hero__badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--em-gold), var(--em-orange));
    color: var(--em-bg-deep);
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    box-shadow: 0 0 20px var(--em-glow-gold);
}

.em-app-hero h2 {
    color: #fff !important;
    margin: 0 0 8px !important;
    font-weight: 800 !important;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.em-app-hero p {
    opacity: 0.88;
    margin-bottom: 16px;
    color: var(--em-text-muted);
}

.em-app-hero__stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-size: 0.95em;
    color: var(--em-text-muted);
}

.em-app-hero__stats b {
    color: var(--em-gold);
    font-size: 1.35em;
    text-shadow: 0 0 16px var(--em-glow-gold);
}

/* ── Content cards ── */
.em-card,
body.em-stadium-theme .ui.segment {
    background: var(--em-card-bg) !important;
    border: 1px solid var(--em-card-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 0 1px rgba(76, 175, 80, 0.2) !important;
    color: var(--em-text) !important;
    backdrop-filter: blur(8px);
}

.em-card:hover,
body.em-stadium-theme .ui.segment:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(76, 175, 80, 0.08) !important;
}

.em-section-title,
.em-page-title,
body.em-stadium-theme .ui.header {
    color: var(--em-text) !important;
}

.em-section-title i.icon,
.em-page-title i.icon {
    color: var(--em-gold) !important;
    text-shadow: 0 0 12px var(--em-glow-gold);
}

.em-page-sub {
    color: var(--em-text-muted);
    margin: -8px 0 20px;
}

.em-group-title {
    color: var(--em-gold) !important;
    margin-top: 24px !important;
    text-shadow: 0 0 20px var(--em-glow-gold);
}

/* ── Team cards ── */
.em-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.em-team-card {
    background: var(--em-card-bg);
    border: 1px solid var(--em-card-border);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.em-team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.15), 0 0 20px rgba(255, 215, 0, 0.06);
    border-color: rgba(255, 215, 0, 0.3);
}

.em-team-crest,
.em-team-flag {
    width: 64px;
    height: 42px;
    object-fit: cover;
    object-position: center;
    margin-bottom: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.em-team-crest {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.em-team-crest-fallback {
    font-size: 2em;
    display: block;
    margin-bottom: 8px;
}

.em-team-name {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--em-text);
}

.em-team-code {
    font-size: 0.8em;
    color: var(--em-text-muted);
    margin-top: 4px;
}

/* ── Match tables & lists ── */
body.em-stadium-theme table.ui.table,
body.em-stadium-theme table.ui.celled.table,
body.em-stadium-theme table.ui.inverted.table,
.em-data-table,
.em-match-table {
    background: var(--em-card-bg) !important;
    color: var(--em-text) !important;
    border: 1px solid var(--em-card-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

body.em-stadium-theme table.ui.table thead th,
body.em-stadium-theme table.ui.celled.table thead th,
body.em-stadium-theme table.ui.inverted.table thead th,
.em-data-table th,
.em-match-table th {
    background: rgba(10, 10, 42, 0.92) !important;
    color: var(--em-gold) !important;
    border-color: rgba(76, 175, 80, 0.25) !important;
}

body.em-stadium-theme table.ui.table tbody td,
body.em-stadium-theme table.ui.celled.table tbody td,
body.em-stadium-theme table.ui.inverted.table tbody td,
.em-data-table td,
.em-match-table td {
    background: rgba(5, 5, 16, 0.5) !important;
    border-color: rgba(76, 175, 80, 0.15) !important;
    border-top-color: rgba(76, 175, 80, 0.15) !important;
    color: var(--em-text) !important;
}

body.em-stadium-theme table.ui.celled.table tbody tr:nth-child(even) td,
body.em-stadium-theme table.ui.inverted.table tbody tr:nth-child(even) td {
    background: rgba(10, 10, 42, 0.4) !important;
}

body.em-stadium-theme table.ui.celled.table tbody tr,
body.em-stadium-theme table.ui.inverted.table tbody tr,
body.em-stadium-theme table.ui.striped.table tbody tr {
    background: transparent !important;
}

body.em-stadium-theme table.ui.table tbody tr:hover td,
body.em-stadium-theme table.ui.celled.table tbody tr:hover td,
.em-data-table tbody tr:hover td,
.em-match-table tbody tr:hover td {
    background: rgba(76, 175, 80, 0.14) !important;
    color: var(--em-text) !important;
}

body.em-stadium-theme table.ui.table tbody td b,
body.em-stadium-theme table.ui.celled.table tbody td b,
body.em-stadium-theme table.ui.inverted.table tbody td b,
.em-data-table td b,
.em-match-table td b {
    color: #fff !important;
}

body.em-stadium-theme table.ui.table tr.em-row-self td,
body.em-stadium-theme table.ui.celled.table tr.em-row-self td,
.em-data-table tr.em-row-self td,
.em-match-table tr.em-row-self td {
    background: rgba(76, 175, 80, 0.22) !important;
    color: var(--em-gold) !important;
}

.em-match-list .segment {
    border-radius: 10px !important;
    margin-bottom: 10px !important;
    transition: box-shadow 0.2s ease;
    background: var(--em-card-bg) !important;
    border: 1px solid var(--em-card-border) !important;
    color: var(--em-text) !important;
}

.em-match-list .segment:hover {
    box-shadow: 0 4px 24px rgba(76, 175, 80, 0.12) !important;
}

/* ── Global chat ── */
.em-global-chat {
    margin-top: 20px;
}

.em-chat-sub {
    color: var(--em-text-muted);
    margin: -6px 0 14px;
    font-size: 0.9em;
}

.em-chat-messages {
    height: 320px;
    overflow-y: auto;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(5, 5, 16, 0.55);
    border: 1px solid rgba(76, 175, 80, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.em-chat-empty {
    color: var(--em-text-muted);
    text-align: center;
    padding: 40px 16px;
    font-size: 0.95em;
}

.em-chat-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(10, 10, 42, 0.75);
    border: 1px solid rgba(76, 175, 80, 0.15);
    align-self: flex-start;
}

.em-chat-msg--self {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.45), rgba(76, 175, 80, 0.2));
    border-color: rgba(76, 175, 80, 0.35);
}

.em-chat-msg__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    font-size: 0.78em;
}

.em-chat-msg__author {
    font-weight: 700;
    color: var(--em-gold);
}

.em-chat-msg--self .em-chat-msg__author {
    color: #fff;
}

.em-chat-msg__time {
    color: var(--em-text-muted);
    flex-shrink: 0;
}

.em-chat-msg__text {
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
    color: var(--em-text);
}

.em-chat-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.em-chat-form input[type="text"] {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(76, 175, 80, 0.3) !important;
    color: var(--em-text) !important;
}

.em-chat-form .ui.primary.button {
    min-height: 44px;
    white-space: nowrap;
    margin: 0 !important;
}

@media (max-width: 767px) {
    .em-chat-messages {
        height: 260px;
    }

    .em-chat-form {
        flex-direction: column;
    }

    .em-chat-form .ui.primary.button {
        width: 100%;
    }
}

/* ── Tip form + dice ── */
.em-tip-fields {
    align-items: center !important;
    flex-wrap: wrap;
    gap: 6px;
}

.em-tip-input {
    width: 60px !important;
    text-align: center;
}

.em-tip-colon {
    margin: 0 !important;
    padding: 0 2px !important;
    color: var(--em-text) !important;
    font-size: 1.2em;
    font-weight: 700;
}

.em-tip-dice {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: url("../img/wuerfel.png") no-repeat 0 0;
    background-size: 36px auto;
    border: 1px solid rgba(76, 175, 80, 0.35);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    vertical-align: middle;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.em-tip-dice:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
}

.em-tip-dice:active:not(:disabled),
.em-tip-dice.click {
    background-position: 0 -36px;
    transform: scale(0.96);
}

.em-tip-dice:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

body.em-stadium-theme table {
    color: var(--em-text);
}

body.em-stadium-theme table td,
body.em-stadium-theme table th {
    border-color: rgba(76, 175, 80, 0.15) !important;
}

body.em-stadium-theme .gray,
body.em-stadium-theme a.gray {
    color: var(--em-text-muted) !important;
}

body.em-stadium-theme a {
    color: var(--em-gold);
}

body.em-stadium-theme .ui.input input,
body.em-stadium-theme input,
body.em-stadium-theme select,
body.em-stadium-theme textarea {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--em-text) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

body.em-stadium-theme .ui.form .field > label,
body.em-stadium-theme .ui.form label,
body.em-stadium-theme .em-card .ui.header:not(.red) {
    color: rgba(220, 228, 240, 0.9) !important;
}

body.em-stadium-theme .em-card .ui.header.red {
    color: #ff8a80 !important;
}

body.em-stadium-theme .ui.button:not(.primary):not(.red):not(.green) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--em-text) !important;
    border: 1px solid rgba(76, 175, 80, 0.35) !important;
}

body.em-stadium-theme .ui.red.button,
body.em-stadium-theme .ui.red.buttons .button {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

body.em-stadium-theme input:disabled,
body.em-stadium-theme .ui.input input:disabled {
    opacity: 0.75;
    color: var(--em-text-muted) !important;
}

body.em-stadium-theme select option {
    background: var(--em-bg-navy);
    color: var(--em-text);
}

body.em-stadium-theme .ui.dropdown {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--em-text) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

body.em-stadium-theme .ui.dropdown .menu {
    background: var(--em-bg-navy) !important;
    border-color: var(--em-card-border) !important;
}

body.em-stadium-theme .ui.dropdown .menu .item {
    color: var(--em-text) !important;
}

body.em-stadium-theme .ui.dropdown .menu .item:hover {
    background: rgba(76, 175, 80, 0.15) !important;
}

body.em-stadium-theme .table:not(.nohover) .table-row:hover,
body.em-stadium-theme .table-row.background {
    background-color: rgba(76, 175, 80, 0.08) !important;
}

body.em-stadium-theme .border_bottom {
    border-bottom-color: rgba(76, 175, 80, 0.15) !important;
}

body.em-stadium-theme .border_top {
    border-top-color: rgba(76, 175, 80, 0.15) !important;
}

.em-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--em-text-muted);
    font-size: 1.1em;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */

.admin-layout {
    position: relative;
    display: flex;
    min-height: 100vh;
    background: transparent;
    color: var(--em-text);
    overflow: hidden;
}

.admin-sidebar {
    position: relative;
    z-index: 2;
    width: 240px;
    background: linear-gradient(180deg, rgba(10, 10, 42, 0.92), rgba(5, 5, 16, 0.94));
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    border-right: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.admin-sidebar .brand {
    padding: 0 20px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    margin-bottom: 10px;
    color: var(--em-gold);
    text-shadow: 0 0 16px var(--em-glow-gold);
}

.admin-sidebar a {
    display: block;
    color: var(--em-text-muted);
    padding: 12px 20px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(76, 175, 80, 0.12);
    color: var(--em-gold);
    border-left: 3px solid var(--em-gold);
}

.admin-main {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: transparent;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
}

.admin-header .ui.header {
    color: var(--em-text) !important;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat {
    background: var(--em-card-bg);
    border: 1px solid var(--em-card-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.admin-stat .value {
    font-size: 2em;
    font-weight: bold;
    color: var(--em-gold);
    text-shadow: 0 0 16px var(--em-glow-gold);
}

.admin-stat .label {
    color: var(--em-text-muted);
    font-size: 0.9em;
}

.admin-panel {
    background: var(--em-card-bg);
    border: 1px solid var(--em-card-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    color: var(--em-text);
}

.admin-panel .ui.header,
.admin-panel label,
.admin-panel th,
.admin-panel td {
    color: var(--em-text) !important;
}

.admin-panel table {
    color: var(--em-text);
}

.admin-panel input,
.admin-panel select,
.admin-panel textarea {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--em-text) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

/* ── Admin login ── */
.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--em-bg-deep);
    position: relative;
    overflow: hidden;
}

.admin-login-wrap .login-hero {
    opacity: 1;
}

.admin-login-card {
    background: var(--em-card-bg);
    border: 1px solid var(--em-card-border);
    border-radius: 14px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow:
        0 0 40px rgba(76, 175, 80, 0.1),
        0 24px 80px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(24px);
    color: var(--em-text);
}

.admin-login-card .ui.header,
.admin-login-card label {
    color: var(--em-text) !important;
}

.admin-login-card input {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

.admin-login-wrap a {
    color: var(--em-text-muted) !important;
}

.admin-login-wrap a:hover {
    color: var(--em-gold) !important;
}

#admin-scene {
    display: none;
}

.admin-login-wrap .admin-login-card {
    position: relative;
    z-index: 2;
}

.hidden { display: none !important; }

/* ── Responsive layout ── */
.em-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.em-responsive-table {
    min-width: 520px;
}

@media (max-width: 768px) {
    .em-page-content .ui.grid > .row > .column {
        width: 100% !important;
    }
}

@media (max-width: 1023px) {
    .em-app-hero {
        padding: 28px 24px;
    }

    .em-app-hero h2 {
        font-size: 1.6em;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 900px) {
    .login-hero-img {
        object-position: center 38%;
        transform-origin: center 38%;
    }

    body.login-hero-page .page-login {
        justify-content: center;
        align-items: center;
        padding: 12px;
    }

    .login-shell {
        width: 100%;
        max-width: 420px;
        padding: 0 12px;
    }
}

@media (max-width: 768px) {
    .em-app-hero {
        padding: 22px 18px;
        border-radius: 10px;
    }

    .em-app-hero__stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .em-app-hero__stats span {
        width: 100%;
    }

    .em-team-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .em-card,
    .ui.segment.em-card {
        padding: 14px !important;
    }

    .em-match-list .ui.segment {
        padding: 12px !important;
    }

    .em-match-list .ui.grid > .row > .column {
        width: 100% !important;
        padding-bottom: 8px !important;
    }

    .tip-form .inline.fields {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px;
    }

    .tip-form .inline.fields .field {
        width: 100% !important;
        margin: 0 !important;
    }

    .tip-form input[type="number"] {
        width: 100% !important;
        max-width: none !important;
        min-height: 44px;
        font-size: 16px;
    }

    .tip-form .ui.primary.button {
        width: 100%;
        min-height: 44px;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(280px, 88vw) !important;
        z-index: 10001;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    body.admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-main {
        width: 100%;
        padding: 12px;
        padding-top: 56px;
    }

    .admin-header {
        flex-wrap: wrap;
        gap: 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10000;
        background: rgba(5, 5, 16, 0.95);
        padding: 10px 12px;
        margin: 0;
        border-bottom: 1px solid rgba(76, 175, 80, 0.2);
        backdrop-filter: blur(10px);
    }

    .admin-header .ui.header {
        font-size: 1.1em !important;
        margin: 0 !important;
    }

    .admin-login-card {
        margin: 12px;
        padding: 28px 20px;
        max-width: none;
    }

    .page-login .container {
        max-width: 100% !important;
        padding: 0 12px;
    }

    .ui.primary.button,
    .ui.form input,
    .ui.form .ui.checkbox label {
        min-height: 44px;
    }

    .ui.form input {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-hero-img {
        object-position: center 35%;
        transform-origin: center 35%;
    }

    body.login-hero-page .page-login .card > .content {
        padding: 10px 18px 22px 18px !important;
    }

    .em-wordmark__euro,
    .em-wordmark__line {
        display: none;
    }

    .em-wordmark__tag {
        font-size: 0.55rem;
        letter-spacing: 0.12em;
    }

    .em-wordmark--compact .em-wordmark__em {
        font-size: 1.05rem;
    }

    .em-header-stat__lbl {
        display: none;
    }

    .em-header-stat {
        min-width: 44px;
        padding: 5px 8px;
    }

    .em-user-chip__meta {
        display: none;
    }

    .em-user-chip > .dropdown.icon {
        display: none !important;
    }

    .em-brand__logo--header {
        width: 132px;
        height: 40px;
    }

    .em-brand__logo--login {
        max-height: 110px;
    }

    .em-header-brand {
        padding: 4px 8px 4px 4px;
    }

    .em-topbar__right {
        gap: 4px;
        padding-right: 6px !important;
    }

    .em-page-title {
        font-size: 1.25em !important;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.em-admin-nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.35);
    border-radius: 8px;
    color: #ffd700;
    cursor: pointer;
    margin-right: 10px;
}

@media (max-width: 768px) {
    .em-admin-nav-toggle {
        display: inline-flex;
    }
}

.em-admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5, 5, 16, 0.65);
}

body.admin-nav-open .em-admin-overlay {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .login-hero-img,
    .em-app-stadium-bg__img {
        animation: none;
        transform: scale(1.05);
    }

    .login-hero-grain,
    .em-app-stadium-bg__grain {
        animation: none;
    }

    .em-nav-rail__indicator {
        transition: opacity 0.2s ease;
    }

    .em-nav-badge {
        animation: none;
    }

    .em-brand__crest,
    .em-brand__crest-wrap::after,
    .em-topbar__beam {
        animation: none;
    }

    .em-nav-link:hover,
    .em-nav-link:hover .em-nav-icon {
        transform: none;
    }
}
