@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Thin_0.ttf") format("truetype");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Regular_0.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Medium_0.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Bold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Bold_0.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Bold_0.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-ExtraBold.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GFF Latin";
    src: url("GFF-Latin-Black.ttf") format("truetype");
    font-weight: 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #0b1821;
    --navy: #2f496a;
    --pink: #f1a6cf;
    --mist: #eef3ed;
    --leaf: #bdcd8e;
    --text: #eef3ed;
    --muted: #bdccc5;
    --panel: rgba(12, 29, 40, .88);
    --panel-soft: rgba(28, 59, 79, .78);
    --field: rgba(238, 243, 237, .09);
    --border: rgba(238, 243, 237, .17);
    --shadow: 0 22px 60px rgba(0, 0, 0, .30);
    --danger: #dd7188;
    --warning: #e4cf89;
    --success: #bdcd8e;
    --site-font: "GFF Latin", "Noto Sans Bengali", "Hind Siliguri", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: var(--site-font);
    line-height: 1.5;
    background:
        radial-gradient(circle at 8% 12%, rgba(241, 166, 207, .38), transparent 29%),
        radial-gradient(circle at 91% 15%, rgba(189, 205, 142, .28), transparent 25%),
        radial-gradient(circle at 72% 86%, rgba(47, 73, 106, .65), transparent 31%),
        linear-gradient(128deg, #071119 0%, #0b1821 37%, #213e57 76%, #0b1821 100%);
    background-size: 150% 150%;
    animation: pageColorFlow 16s ease-in-out infinite alternate;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
}
body::before {
    width: 420px;
    height: 420px;
    left: -175px;
    top: 20%;
    background: radial-gradient(circle, rgba(241, 166, 207, .34), rgba(241, 166, 207, 0) 68%);
    animation: floatingGlowOne 17s ease-in-out infinite;
}
body::after {
    width: 460px;
    height: 460px;
    right: -190px;
    bottom: 2%;
    background: radial-gradient(circle, rgba(189, 205, 142, .30), rgba(189, 205, 142, 0) 68%);
    animation: floatingGlowTwo 20s ease-in-out infinite;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
code { color: var(--pink); background: rgba(241,166,207,.10); padding: 2px 5px; border-radius: 5px; }

.navbar {
    min-height: 74px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(238,243,237,.16);
    background: linear-gradient(105deg, rgba(7,17,25,.97), rgba(47,73,106,.94), rgba(11,24,33,.98));
    background-size: 220% 100%;
    box-shadow: 0 9px 28px rgba(0,0,0,.32);
    animation: navColourFlow 11s ease-in-out infinite;
}
.navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--pink), var(--leaf), var(--pink), var(--navy));
    background-size: 230% 100%;
    animation: paletteSweep 6s linear infinite;
}
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: flex;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 11px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 22px rgba(241,166,207,.27);
    animation: brandPulse 3.8s ease-in-out infinite;
}
.brand-mark span { display: block; flex: 1; }
.brand-mark span:nth-child(1) { background: var(--navy); }
.brand-mark span:nth-child(2) { background: var(--pink); }
.brand-mark span:nth-child(3) { background: var(--leaf); }
.brand { color: var(--mist); font-size: 15px; font-weight: 900; letter-spacing: .04em; line-height: 1.05; text-transform: uppercase; }
.brand-sub { display: block; color: rgba(238,243,237,.67); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.navlinks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.navlinks a, .nav-user { color: var(--mist); padding: 7px 9px; border-radius: 8px; font-size: 14px; font-weight: 700; }
.nav-user { color: var(--pink); font-weight: 600; }
.navlinks a:hover { background: rgba(238,243,237,.10); text-decoration: none; }
.navlinks .nav-feature-link {
    color: var(--mist);
    border: 1px solid rgba(189,205,142,.35);
    background: rgba(189,205,142,.10);
    font-weight: 850;
}
.navlinks .nav-feature-link:hover {
    color: var(--ink);
    border-color: rgba(241,166,207,.72);
    background: linear-gradient(110deg, var(--leaf), var(--pink));
}


.container { width: min(1180px, calc(100% - 32px)); margin: 34px auto 58px; }
.page-title { margin: 0 0 6px; color: var(--mist); font-size: clamp(28px, 4vw, 39px); letter-spacing: -.04em; }
.page-lead { margin: 0 0 26px; color: var(--muted); }

.auth-shell { width: min(1320px, calc(100% - 44px)); min-height: 100vh; margin: 0 auto; padding: 28px 0; display: grid; align-items: center; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.auth-side {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 720px;
    padding: 50px clamp(25px, 6vw, 92px);
    overflow: hidden;
    border-radius: 28px 0 0 28px;
    background:
        radial-gradient(circle at 18% 22%, rgba(241,166,207,.27), transparent 26%),
        radial-gradient(circle at 85% 78%, rgba(189,205,142,.23), transparent 24%),
        linear-gradient(125deg, #071119 0%, #122c3e 52%, #2f496a 100%);
    background-size: 160% 160%;
    animation: authColourFlow 14s ease-in-out infinite alternate;
}
.auth-side::before {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -120px;
    top: -115px;
    border-radius: 50%;
    background: rgba(241,166,207,.16);
    animation: floatingGlowTwo 15s ease-in-out infinite;
}
.auth-brand { position: relative; z-index: 1; max-width: 570px; }
.auth-brand h1 { margin: 21px 0 18px; color: var(--mist); font-size: clamp(39px, 6vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.auth-brand p { max-width: 470px; color: rgba(238,243,237,.73); font-size: 17px; }
.palette-line { display: flex; width: 236px; height: 10px; margin-top: 36px; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg, var(--navy), var(--pink), var(--mist), var(--leaf), var(--navy)); background-size: 250% 100%; animation: paletteSweep 7s linear infinite; }
.palette-line span { display: none; }
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 720px;
    padding: 35px;
    border-radius: 0 28px 28px 0;
    background: rgba(7,17,25,.76);
    backdrop-filter: blur(20px);
}
.auth-box { width: min(100%, 430px); padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(47,73,106,.52), rgba(11,24,33,.88)); box-shadow: var(--shadow); }
.auth-box h2 { margin: 0; color: var(--mist); font-size: 30px; letter-spacing: -.035em; }

.card {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(27,57,77,.89), rgba(11,24,33,.91) 72%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transition: transform .22s ease, box-shadow .22s ease;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(47,73,106,.65), rgba(241,166,207,.68), rgba(189,205,142,.66), rgba(47,73,106,.55));
    background-size: 260% 260%;
    animation: cardBorderFlow 10s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 28px 65px rgba(0,0,0,.38); }
.match-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.card-title { margin: 0 0 5px; color: var(--mist); font-size: 19px; }
.card-note { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-row { margin-bottom: 16px; }
label { display: block; margin-bottom: 7px; color: var(--mist); font-size: 14px; font-weight: 800; }
.optional-label { color: var(--muted); font-weight: 600; }
input, textarea, select {
    width: 100%;
    padding: 12px 13px;
    color: var(--mist);
    border: 1px solid rgba(238,243,237,.18);
    border-radius: 10px;
    outline: none;
    background: var(--field);
    font: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: rgba(238,243,237,.50); }

/* Make native tournament dropdowns readable on Windows/Chrome. */
select {
    color: #f6fbf6;
    color-scheme: dark;
    background-color: #243a4b;
}
select option,
select optgroup {
    color: #f6fbf6 !important;
    background-color: #132836 !important;
    font-weight: 700;
}
select option:checked {
    color: #ffffff !important;
    background-color: #2f496a !important;
}
select option:disabled {
    color: #aab9ba !important;
    background-color: #132836 !important;
}
input:focus, textarea:focus, select:focus { border-color: var(--pink); background: #2b4558; box-shadow: 0 0 0 3px rgba(241,166,207,.18); }
textarea { min-height: 124px; resize: vertical; }
.room-note-input { min-height: 86px; }
input[readonly] { color: var(--mist); background: rgba(7,17,25,.48); font-weight: 750; }
.input-help, .small { color: var(--muted); font-size: 12px; }

.btn {
    position: relative;
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: hidden;
    padding: 9px 15px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: var(--ink);
    background: linear-gradient(110deg, var(--pink) 0%, #f7bedb 50%, var(--pink) 100%);
    background-size: 210% 100%;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    transition: transform .15s ease, filter .15s ease;
    animation: buttonColourFlow 7s ease-in-out infinite;
}
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -55%; width: 32%; transform: skewX(-22deg); background: rgba(255,255,255,.35); transition: left .48s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); text-decoration: none; }
.btn:hover::after { left: 125%; }
.btn-pink { background: linear-gradient(110deg, var(--pink), #f7bedb, var(--pink)); }
.btn-success { background: linear-gradient(110deg, #aebf78, var(--leaf), #aebf78); }
.btn-danger { color: var(--mist); background: linear-gradient(110deg, #b44862, var(--danger), #b44862); }
.btn-light { color: var(--ink); background: linear-gradient(110deg, #d7e3dc, var(--mist), #d7e3dc); }
.btn-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn-row form { margin: 0; }

.alert { margin-bottom: 16px; padding: 12px 14px; border: 1px solid; border-radius: 11px; font-weight: 700; }
.alert-success { color: #e8f0d3; border-color: rgba(189,205,142,.52); background: rgba(78,106,50,.42); }
.alert-danger { color: #ffdce5; border-color: rgba(221,113,136,.52); background: rgba(127,43,62,.38); }
.alert-warning { color: #fff0c5; border-color: rgba(228,207,137,.52); background: rgba(116,91,34,.35); }
.info-strip { margin-bottom: 18px; padding: 15px 16px; color: #e6f0d9; border: 1px solid rgba(189,205,142,.33); border-left: 5px solid var(--leaf); border-radius: 11px; background: rgba(189,205,142,.10); }
.info-strip strong { color: var(--leaf); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: rgba(7,17,25,.28); }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 13px 12px; color: var(--text); text-align: left; vertical-align: top; border-bottom: 1px solid rgba(238,243,237,.11); }
th { color: var(--mist); background: rgba(47,73,106,.48); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(241,166,207,.07); }
.team-name { color: var(--mist); font-weight: 850; }
.team-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.badge-qualified { color: #1d2912; background: var(--leaf); }
.badge-disqualified { color: #4e1421; background: var(--pink); }
.badge-pending { color: #2b2610; background: #efe5aa; }

.room-box { padding: 18px; border: 1px solid rgba(189,205,142,.35); border-radius: 14px; background: linear-gradient(115deg, rgba(47,73,106,.42), rgba(11,24,33,.58), rgba(189,205,142,.08)); background-size: 230% 230%; animation: softPanelFlow 12s ease-in-out infinite; }
.room-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.room-header .card-title { margin-bottom: 3px; }
.room-help { margin: 0; color: var(--muted); font-size: 12px; }
.room-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.room-actions .btn { white-space: nowrap; }
.group-join-button {
    box-shadow: 0 8px 22px rgba(189,205,142,.18);
}
.refresh-button, .tutorial-button { flex: 0 0 auto; }
.room-note { margin: 0 0 14px; padding: 10px 12px; color: #f7d8e8; border: 1px solid rgba(241,166,207,.30); border-radius: 10px; background: rgba(241,166,207,.10); font-size: 13px; }
.room-note strong { color: var(--pink); }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.room-copy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.copy-field { min-width: 0; }
.copy-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; }
.copy-control input { width: 100%; min-width: 0; }
.copy-button {
    min-width: 76px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #07111a;
    background: linear-gradient(135deg, var(--leaf), #eff5d0);
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.copy-button:hover:not(:disabled), .copy-button.is-copied { transform: translateY(-1px); filter: brightness(1.06); }
.copy-button:disabled { cursor: not-allowed; opacity: .48; }
.result-box { min-height: 95px; padding: 16px; color: var(--mist); border: 1px solid rgba(241,166,207,.25); border-radius: 12px; background: linear-gradient(115deg, rgba(47,73,106,.34), rgba(11,24,33,.46), rgba(241,166,207,.10)); background-size: 230% 230%; white-space: pre-wrap; animation: softPanelFlow 12s ease-in-out infinite; }
.divider { height: 1px; margin: 22px 0; background: linear-gradient(90deg, transparent, rgba(241,166,207,.45), rgba(189,205,142,.45), transparent); }
.table-wrap-compact table, table.team-list-table { min-width: 460px; }
.team-list-table th:last-child, .team-list-table td:last-child { width: 170px; }

@keyframes pageColorFlow { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
@keyframes navColourFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes authColourFlow { 0% { background-position: 0% 20%; } 100% { background-position: 100% 80%; } }
@keyframes paletteSweep { from { background-position: 0% 50%; } to { background-position: 230% 50%; } }
@keyframes cardBorderFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes buttonColourFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes softPanelFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes floatingGlowOne { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(120px,45px,0) scale(1.11); } }
@keyframes floatingGlowTwo { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-95px,-68px,0) scale(1.14); } }
@keyframes brandPulse { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.05); } }

@media (max-width: 850px) {
    .auth-shell { width: min(100% - 24px, 1320px); grid-template-columns: 1fr; padding: 18px 0; }
    .auth-side { min-height: auto; padding: 42px 28px; border-radius: 24px 24px 0 0; }
    .auth-brand h1 { font-size: 46px; }
    .auth-panel { min-height: auto; padding: 32px 20px 42px; border-radius: 0 0 24px 24px; }
    .grid-2, .grid-3, .grid-4, .room-grid { grid-template-columns: 1fr; }
    .navbar { padding: 12px 16px; align-items: flex-start; flex-direction: column; }
    .navlinks { gap: 2px; }
    .container { width: min(100% - 24px, 1180px); margin-top: 25px; }
    .room-header { align-items: stretch; flex-direction: column; }
    .room-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .room-actions .btn { width: 100%; }
    .copy-control { grid-template-columns: 1fr; }
    .copy-button { width: 100%; min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ===== Version 5: Match Result Center ===== */
.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--pink);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.feature-card { min-height: 210px; }
.result-feature-card { background: linear-gradient(135deg, rgba(47,73,106,.82), rgba(11,24,33,.90) 62%, rgba(189,205,142,.10)); }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading-row .card-note { margin-bottom: 0; }
.result-guide { display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(130deg, rgba(241,166,207,.12), rgba(47,73,106,.48), rgba(189,205,142,.13)); }
.guide-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(241,166,207,.35); border-radius: 14px; background: rgba(241,166,207,.14); font-size: 22px; }
.result-group-list { display: grid; gap: 18px; }
.result-publish-card { scroll-margin-top: 105px; }
.result-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.result-fetch-form { padding: 16px; border: 1px solid rgba(189,205,142,.25); border-radius: 14px; background: rgba(7,17,25,.24); }
.result-id-field { margin-bottom: 12px; }
.inline-clear-form { display: inline-block; margin-top: 10px; }
.result-preview { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(238,243,237,.12); }
.result-table-wrap { border-color: rgba(189,205,142,.30); }
.result-table { min-width: 640px; }
.result-table th:first-child, .result-table td:first-child { width: 62px; text-align: center; }
.rank-pill { display: inline-grid; width: 27px; height: 27px; place-items: center; color: var(--ink); border-radius: 50%; background: linear-gradient(135deg, var(--leaf), #dce9b8); font-size: 12px; font-weight: 950; }
.result-table tbody tr:nth-child(1) .rank-pill { background: linear-gradient(135deg, #f7d77a, #f0a8b6); }
.match-id-chip, .published-tag { display: inline-flex; align-items: center; padding: 6px 9px; color: #eaf1d1; border: 1px solid rgba(189,205,142,.36); border-radius: 999px; background: rgba(189,205,142,.11); font-size: 11px; font-weight: 800; }
.published-tag { color: #412c0d; border-color: rgba(241,166,207,.25); background: var(--pink); }
.empty-result-state { padding: 16px; color: var(--muted); border: 1px dashed rgba(238,243,237,.22); border-radius: 12px; background: rgba(7,17,25,.20); }
.result-manage-card { background: linear-gradient(132deg, rgba(47,73,106,.72), rgba(11,24,33,.92), rgba(189,205,142,.07)); }

@media (max-width: 700px) {
    .result-card-top, .section-heading-row { align-items: stretch; flex-direction: column; }
    .result-card-top > .btn, .section-heading-row > .btn { width: 100%; }
    .result-guide { flex-direction: column; }
}


/* ===== Version 7: Group Result Preview + Continuous Serial ===== */
.group-result-preview-card {
    margin-top: 22px;
    background: linear-gradient(132deg, rgba(47,73,106,.78), rgba(11,24,33,.94) 64%, rgba(241,166,207,.08));
}
.group-result-preview-card .section-heading-row {
    margin-bottom: 16px;
}
.group-result-preview-card .result-table-wrap {
    box-shadow: inset 0 1px 0 rgba(238,243,237,.05);
}
.result-preview-time {
    margin: 14px 0 0;
}

/* ===== Version 8: Tournament hierarchy + multi-group user dashboard ===== */
.user-group-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.user-group-card {
    display: flex;
    min-height: 255px;
    flex-direction: column;
}
.user-group-card .card-title { font-size: 23px; }
.tournament-name {
    margin: -1px 0 11px;
    color: var(--leaf);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .02em;
}
.group-card-details {
    min-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.group-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: auto 0 16px;
    padding: 13px;
    border: 1px solid rgba(238,243,237,.13);
    border-radius: 12px;
    background: rgba(7,17,25,.23);
}
.full-width-btn { width: 100%; }
.back-link { margin: 0 0 12px; font-size: 13px; font-weight: 750; }
.back-link a { color: var(--leaf); }
.count-pill {
    display: inline-grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    padding: 0 8px;
    color: var(--ink);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--leaf), #dce9b8);
    font-size: 12px;
    font-weight: 950;
}
.form-card-narrow { max-width: 760px; }
.tournament-selector-card { padding: 18px 22px; }
.tournament-selector-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.tournament-select-field { flex: 1 1 360px; margin-bottom: 0; }
.team-status-form { min-width: 240px; }

@media (max-width: 1020px) {
    .user-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .user-group-grid { grid-template-columns: 1fr; }
    .tournament-selector-form { align-items: stretch; flex-direction: column; }
    .tournament-selector-form .btn { width: 100%; }
}

/* ===== Version 9: User update notifications ===== */
.notification-bell {
    position: relative;
    display: inline-flex;
    min-height: 35px;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: var(--mist);
    border: 1px solid rgba(238,243,237,.16);
    border-radius: 10px;
    background: rgba(7,17,25,.30);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.notification-bell:hover { border-color: rgba(241,166,207,.48); background: rgba(241,166,207,.11); }
.notification-bell-icon { font-size: 15px; }
.notification-count {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 4px;
    color: #25100f;
    border-radius: 999px;
    background: var(--pink);
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
}
.notification-count.is-hidden { display: none; }
.notification-popover {
    position: fixed;
    top: 83px;
    right: 20px;
    z-index: 120;
    width: min(420px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 105px));
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.38);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(28,58,78,.98), rgba(7,17,25,.99));
    box-shadow: 0 26px 70px rgba(0,0,0,.52);
    backdrop-filter: blur(18px);
}
.notification-popover[hidden], .notification-modal[hidden] { display: none !important; }
.notification-popover-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px 10px;
    border-bottom: 1px solid rgba(238,243,237,.12);
}
.notification-kicker { margin: 0 0 3px; color: var(--pink); font-size: 9px; font-weight: 950; letter-spacing: .14em; }
.notification-popover h2 { margin: 0; color: var(--mist); font-size: 19px; }
.notification-text-button {
    padding: 0;
    color: var(--leaf);
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}
.notification-text-button:hover { color: var(--pink); text-decoration: underline; }
.notification-browser-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 12px 8px;
    padding: 10px 11px;
    color: var(--muted);
    border: 1px solid rgba(189,205,142,.22);
    border-radius: 10px;
    background: rgba(189,205,142,.07);
    font-size: 12px;
}
.notification-list { max-height: 440px; overflow-y: auto; }
.notification-item {
    display: grid;
    grid-template-columns: 33px 1fr;
    gap: 10px;
    padding: 13px 14px;
    color: var(--text);
    border-bottom: 1px solid rgba(238,243,237,.09);
    text-decoration: none;
    transition: background .15s ease;
}
.notification-item:hover { background: rgba(241,166,207,.10); text-decoration: none; }
.notification-item.is-unread { background: linear-gradient(90deg, rgba(241,166,207,.13), rgba(189,205,142,.04)); }
.notification-item-icon {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 10px;
    background: rgba(7,17,25,.34);
    font-size: 15px;
}
.notification-item-copy { min-width: 0; display: grid; gap: 3px; }
.notification-item-copy strong { color: var(--mist); font-size: 13px; }
.notification-item-copy span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.notification-item-copy small { color: rgba(238,243,237,.48); font-size: 10px; }
.notification-empty { padding: 22px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.notification-modal {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4,12,18,.68);
    backdrop-filter: blur(5px);
}
.notification-modal-card {
    width: min(460px, 100%);
    padding: 28px;
    border: 1px solid rgba(241,166,207,.48);
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(47,73,106,.97), rgba(7,17,25,.98));
    box-shadow: 0 28px 75px rgba(0,0,0,.55);
}
.notification-modal-icon {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid rgba(241,166,207,.40);
    border-radius: 14px;
    background: rgba(241,166,207,.14);
    font-size: 22px;
}
.notification-modal-card h2 { margin: 0 0 10px; color: var(--mist); font-size: 25px; }
.notification-modal-card p { color: var(--muted); line-height: 1.55; }

@media (max-width: 700px) {
    .notification-bell-label { display: none; }
    .notification-bell { min-width: 37px; justify-content: center; }
    .notification-popover { top: 136px; right: 12px; width: min(420px, calc(100vw - 24px)); }
}
.notification-history-card { background: linear-gradient(132deg, rgba(47,73,106,.69), rgba(11,24,33,.94), rgba(241,166,207,.06)); }
.admin-notification-history { display: grid; gap: 9px; }
.admin-notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 12px;
    background: rgba(7,17,25,.22);
}
.admin-notification-item > div { display: grid; gap: 3px; }
.admin-notification-item strong { color: var(--mist); font-size: 14px; }
.admin-notification-item span { color: var(--muted); font-size: 12px; line-height: 1.42; }
.admin-notification-item small { color: rgba(238,243,237,.47); font-size: 10px; }
.admin-notification-item code { flex: 0 0 auto; max-width: 38%; overflow: hidden; color: var(--pink); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
    .admin-notification-item { flex-direction: column; }
    .admin-notification-item code { max-width: 100%; }
}


/* ===== Version 12: Official Free Fire logo + clean centered login ===== */
.brand-with-logo { gap: 10px; }
.brand-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 194, 48, .42));
}
.brand-with-logo .brand { font-size: 14px; }
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}
.login-only-box {
    width: min(100%, 440px);
    padding: 32px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(47,73,106,.60), rgba(11,24,33,.96));
}
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin: 0 0 25px;
}
.login-logo {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 13px rgba(255, 194, 48, .45));
}
.login-brand-text {
    font-size: 15px;
    text-align: left;
}
.login-only-box > h2 { text-align: center; }
.login-only-box > .page-lead {
    margin: 7px auto 24px;
    text-align: center;
}
.login-only-box .btn-row { justify-content: center; }

@media (max-width: 560px) {
    .login-only-box { padding: 25px 20px; }
    .brand-with-logo .brand { font-size: 12px; }
    .brand-logo { width: 34px; height: 34px; }
}

/* ===== Version 14: Tournament deletion ===== */
.inline-delete-form { margin: 0; display: inline-flex; }
.inline-delete-form .btn { white-space: nowrap; }


/* Version 15: Login pages use one direct submit action only */
.login-submit-row {
    justify-content: center;
    margin-top: 22px;
}
.login-submit-row .btn {
    min-width: 160px;
}


/* Shared status save action — one button for the full team list */
.bulk-team-status-save {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(238,243,237,.14);
}
.bulk-team-status-save .btn {
    min-width: 180px;
}
@media (max-width: 700px) {
    .bulk-team-status-save { justify-content: stretch; }
    .bulk-team-status-save .btn { width: 100%; }
}


/* ===== Tournament-wide Room Manager ===== */
.room-manager-selector-card { margin-bottom: 18px; }
.room-manager-card { background: linear-gradient(132deg, rgba(47,73,106,.70), rgba(11,24,33,.93), rgba(189,205,142,.08)); }
.room-manager-save-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.room-manager-table { min-width: 1400px; }
.room-manager-table th { white-space: nowrap; }
.room-manager-table td { vertical-align: top; }
.room-manager-table input { min-width: 175px; }
.room-manager-table textarea { min-width: 220px; min-height: 82px; margin: 0; }
.room-manager-manage-btn { white-space: nowrap; }
.room-manager-join-cell {
    display: grid;
    gap: 10px;
}
.room-manager-join-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid rgba(189,205,142,.24);
    border-radius: 12px;
    background: rgba(189,205,142,.08);
    cursor: pointer;
}
.room-manager-join-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.room-manager-join-toggle > span:first-of-type {
    color: var(--mist);
    font-size: 12px;
    font-weight: 800;
}
.room-manager-join-toggle input:focus-visible ~ .registration-toggle-control .registration-toggle-switch {
    box-shadow: 0 0 0 3px rgba(241,166,207,.24), inset 0 0 0 1px rgba(7,17,25,.16);
}
.room-manager-join-toggle input:checked ~ .registration-toggle-control .registration-toggle-switch {
    border-color: rgba(189,205,142,.70);
    background: linear-gradient(110deg, rgba(189,205,142,.92), rgba(241,166,207,.80));
}
.room-manager-join-toggle input:checked ~ .registration-toggle-control .registration-toggle-switch::after {
    transform: translateX(22px);
    background: #081119;
}
.room-manager-join-toggle input:checked ~ .registration-toggle-control .registration-toggle-state {
    color: var(--leaf);
}
.room-manager-join-toggle input:checked ~ .registration-toggle-control .registration-toggle-state::before {
    content: "On";
}
.room-manager-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.room-manager-footer .small { margin: 0; max-width: 760px; }
@media (max-width: 780px) {
    .room-manager-save-top, .room-manager-footer { align-items: stretch; flex-direction: column; }
    .room-manager-save-top .btn, .room-manager-footer .btn { width: 100%; }
}


/* ===== Team Presence & Last Active ===== */
.presence-refresh-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--leaf);
    border: 1px solid rgba(189,205,142,.30);
    border-radius: 999px;
    background: rgba(189,205,142,.09);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.presence-status {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 150px;
}
.presence-dot {
    display: block;
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    margin-top: 4px;
    border-radius: 50%;
    background: rgba(238,243,237,.35);
    box-shadow: 0 0 0 4px rgba(238,243,237,.06);
}
.presence-status.is-online .presence-dot {
    background: var(--leaf);
    box-shadow: 0 0 0 4px rgba(189,205,142,.12), 0 0 13px rgba(189,205,142,.68);
}
.presence-status.is-offline .presence-dot {
    background: var(--pink);
    box-shadow: 0 0 0 4px rgba(241,166,207,.08);
}
.presence-copy { display: grid; gap: 2px; }
.presence-copy strong { color: var(--mist); font-size: 12px; }
.presence-status.is-online .presence-copy strong { color: var(--leaf); }
.presence-copy small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.activity-group-card { margin-bottom: 18px; }
.activity-table th { white-space: nowrap; }
.activity-team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}
.activity-team-logo {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.28);
    border-radius: 12px;
    color: var(--pink);
    background: linear-gradient(135deg, rgba(241,166,207,.18), rgba(189,205,142,.10));
    font-size: 17px;
    font-weight: 900;
}
.activity-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 700px) {
    .presence-refresh-label { margin-top: 6px; }
    .presence-status { min-width: 135px; }
    .activity-team-cell { min-width: 190px; }
}


/* ===== Team Profile Card ===== */
.team-profile-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 30px 32px;
    border: 1px solid rgba(238,243,237,.18);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(241,166,207,.18), rgba(241,166,207,0) 34%),
        linear-gradient(135deg, rgba(47,73,106,.72), rgba(11,24,33,.96) 64%, rgba(7,17,25,.98));
    box-shadow: 0 24px 65px rgba(0,0,0,.36);
}
.team-profile-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .18;
    pointer-events: none;
    background-image:
        linear-gradient(30deg, rgba(238,243,237,.10) 12%, transparent 12.5%, transparent 87%, rgba(238,243,237,.10) 87.5%, rgba(238,243,237,.10)),
        linear-gradient(150deg, rgba(238,243,237,.10) 12%, transparent 12.5%, transparent 87%, rgba(238,243,237,.10) 87.5%, rgba(238,243,237,.10));
    background-size: 78px 45px;
}
.team-profile-card > * { position: relative; z-index: 1; }
.team-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 26px;
}
.team-profile-main { display: flex; align-items: center; min-width: 0; gap: 20px; }
.team-logo-frame {
    display: grid;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.26);
    border-radius: 22px;
    background: rgba(7,17,25,.72);
    box-shadow: 0 18px 35px rgba(0,0,0,.30);
}
.team-logo-frame img { width: 100%; height: 100%; object-fit: cover; }
.team-logo-frame span { color: var(--pink); font-size: 46px; font-weight: 950; }
.team-profile-title { min-width: 0; }
.team-profile-title h2 {
    margin: 8px 0 0;
    color: var(--mist);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1;
    letter-spacing: -.05em;
    text-transform: uppercase;
}
.team-profile-pills { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-profile-pills span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 5px 11px;
    color: rgba(238,243,237,.84);
    border-radius: 999px;
    background: rgba(238,243,237,.10);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.team-profile-pills .team-alive-pill { color: #11f2a5; background: rgba(17,242,165,.14); }
.captain-photo {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(228,207,137,.58);
    border-radius: 50%;
    background: rgba(7,17,25,.70);
    box-shadow: 0 0 0 4px rgba(228,207,137,.08);
}
.captain-photo img, .team-player-photo img { width: 100%; height: 100%; object-fit: cover; }
.captain-photo span, .team-player-photo span { color: var(--mist); font-size: 20px; font-weight: 950; }
.team-profile-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.team-profile-chip {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(238,243,237,.06);
}
.team-profile-chip span, .team-player-card span {
    display: block;
    color: rgba(238,243,237,.48);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.team-profile-chip strong {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    color: var(--mist);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team-player-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
.team-player-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 18px;
    background: rgba(7,17,25,.30);
}
.team-player-photo {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.30);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(241,166,207,.28), rgba(189,205,142,.18));
}
.team-player-card strong {
    display: block;
    overflow: hidden;
    color: var(--mist);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 950px) {
    .team-profile-meta { grid-template-columns: 1fr; }
    .team-player-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .team-profile-card { padding: 22px 18px; border-radius: 20px; }
    .team-profile-hero { align-items: flex-start; flex-direction: column; }
    .team-profile-main { align-items: flex-start; flex-direction: column; }
    .team-logo-frame { width: 96px; height: 96px; flex-basis: 96px; }
    .captain-photo { position: absolute; top: 22px; right: 18px; width: 64px; height: 64px; flex-basis: 64px; }
    .team-player-strip { grid-template-columns: 1fr; }
}


/* ===== Group Avatar Selection ===== */
.avatar-admin-card,
.avatar-select-card {
    background: linear-gradient(132deg, rgba(47,73,106,.72), rgba(11,24,33,.94), rgba(189,205,142,.08));
}
.avatar-toggle-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    margin-bottom: 16px;
    padding: 13px 14px;
    border: 1px solid rgba(189,205,142,.24);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(19,42,58,.62), rgba(7,17,25,.46));
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.avatar-toggle-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.avatar-toggle-row:hover {
    border-color: rgba(189,205,142,.40);
    background: linear-gradient(135deg, rgba(19,42,58,.78), rgba(7,17,25,.54));
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    transform: translateY(-1px);
}
.avatar-toggle-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}
.avatar-toggle-copy strong {
    color: var(--mist);
    font-size: 15px;
    font-weight: 850;
}
.avatar-toggle-copy small,
.avatar-auto-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}
.avatar-toggle-row input:focus-visible ~ .registration-toggle-control .registration-toggle-switch {
    box-shadow: 0 0 0 3px rgba(241,166,207,.24), inset 0 0 0 1px rgba(7,17,25,.16);
}
.avatar-toggle-row input:checked ~ .registration-toggle-control .registration-toggle-switch {
    border-color: rgba(189,205,142,.70);
    background: linear-gradient(110deg, rgba(189,205,142,.92), rgba(241,166,207,.80));
}
.avatar-toggle-row input:checked ~ .registration-toggle-control .registration-toggle-switch::after {
    transform: translateX(22px);
    background: #081119;
}
.avatar-toggle-row input:checked ~ .registration-toggle-control .registration-toggle-state {
    color: var(--leaf);
}
.avatar-toggle-row input:checked ~ .registration-toggle-control .registration-toggle-state::before {
    content: "On";
}
.team-avatar-empty {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.avatar-select-form {
    padding: 15px;
    border: 1px solid rgba(241,166,207,.18);
    border-radius: 14px;
    background: rgba(7,17,25,.24);
}
.avatar-live-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    padding: 13px;
    border: 1px solid rgba(189,205,142,.22);
    border-radius: 16px;
    background: rgba(189,205,142,.08);
}
.avatar-live-image,
.avatar-choice-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.25);
    border-radius: 16px;
    background: radial-gradient(circle at top, rgba(241,166,207,.18), rgba(7,17,25,.72));
}
.avatar-live-image {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
}
.avatar-live-image img,
.avatar-choice-image img,
.avatar-name-orb img,
.profile-selected-avatar img,
.avatar-name-pill img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.avatar-live-image span {
    color: rgba(238,243,237,.75);
    font-size: 24px;
    font-weight: 900;
}
.avatar-live-preview strong {
    display: block;
    color: var(--mist);
    font-size: 18px;
}
.avatar-live-preview span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}
.avatar-list-toggle {
    margin-bottom: 12px;
}
.avatar-choice-panel {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 18px;
    background: rgba(7,17,25,.22);
}
.avatar-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    max-height: 430px;
    overflow: auto;
    padding: 2px 2px 6px;
}
.avatar-choice-card {
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 100%;
    min-height: 124px;
    padding: 10px 8px;
    border: 1px solid rgba(238,243,237,.13);
    border-radius: 16px;
    color: var(--mist);
    background: rgba(18,39,53,.74);
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.avatar-choice-card:hover,
.avatar-choice-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(241,166,207,.52);
    outline: none;
}
.avatar-choice-card.is-selected {
    border-color: rgba(189,205,142,.82);
    background: linear-gradient(135deg, rgba(189,205,142,.22), rgba(241,166,207,.14));
}
.avatar-choice-image {
    width: 68px;
    height: 68px;
}
.avatar-choice-card strong {
    width: 100%;
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.avatar-select-form select option:disabled {
    color: rgba(238,243,237,.42);
    background: #172a38;
}
.avatar-locked-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(189,205,142,.28);
    border-radius: 16px;
    background: rgba(189,205,142,.09);
}
.avatar-conflict-warning {
    margin-bottom: 12px;
    padding: 12px 13px;
    color: #ffe8ef;
    border: 1px solid rgba(241,166,207,.35);
    border-radius: 12px;
    background: rgba(241,166,207,.12);
    font-size: 13px;
    font-weight: 800;
}
.avatar-locked-row strong {
    display: block;
    color: var(--leaf);
    font-size: 15px;
}
.avatar-locked-row span {
    color: var(--muted);
    font-size: 13px;
}
.team-avatar-thumb { width: 54px; height: 54px; }
.team-avatar-empty {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px dashed rgba(238,243,237,.20);
    border-radius: 999px;
}
@media (max-width: 700px) {
    .avatar-locked-row { align-items: flex-start; flex-direction: column; }
    .avatar-live-preview { align-items: flex-start; }
    .avatar-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .avatar-choice-card { min-height: 108px; padding: 8px 6px; }
    .avatar-choice-image { width: 56px; height: 56px; }
}


/* Avatar names are text badges, not image links. */
.avatar-name-preview { min-height: 116px; }
.avatar-name-orb {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 2px solid rgba(241,166,207,.38);
    border-radius: 50%;
    color: var(--mist);
    background: linear-gradient(135deg, rgba(241,166,207,.28), rgba(189,205,142,.18));
    font-size: 20px;
    font-weight: 950;
    text-align: center;
    overflow: hidden;
    padding: 4px;
}
.avatar-name-orb-large { width: 74px; height: 74px; flex: 0 0 74px; }
.avatar-name-pill {
    display: inline-flex;
    min-width: 46px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: 1px solid rgba(241,166,207,.32);
    border-radius: 999px;
    color: var(--mist);
    background: rgba(241,166,207,.12);
    font-weight: 950;
}
.avatar-name-pill img {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 10px;
}


/* Group match day countdown */
.schedule-admin-card {
    border-color: rgba(0, 230, 164, .22);
}
.schedule-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(120px, .45fr);
    gap: 14px;
    align-items: end;
}
.match-day-card {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid rgba(238, 243, 237, .15);
    border-radius: 26px;
    background: rgba(8, 14, 20, .62);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}
.match-day-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(238, 243, 237, .66);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.match-clock-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(238, 243, 237, .45);
    border-radius: 50%;
    color: rgba(238, 243, 237, .82);
    font-size: 15px;
}
.match-countdown-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 124px;
    padding: 26px 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 230, 164, .36);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(0, 230, 164, .13), rgba(12, 29, 40, .54)),
        repeating-linear-gradient(150deg, rgba(238, 243, 237, .035) 0 1px, transparent 1px 46px);
}
.match-copy,
.countdown-wrap {
    position: relative;
    z-index: 1;
}
.match-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 5px 14px;
    border-radius: 999px;
    color: #00e6a4;
    background: rgba(0, 230, 164, .18);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.match-copy h2 {
    margin: 12px 0 10px;
    color: #fff;
    font-size: clamp(21px, 3vw, 32px);
    line-height: 1.05;
}
.match-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    color: rgba(238, 243, 237, .88);
    font-weight: 850;
}
.match-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.match-qualified-meta {
    color: var(--leaf);
}
.countdown-wrap {
    display: grid;
    gap: 9px;
    justify-items: end;
}
.countdown-caption {
    color: rgba(238, 243, 237, .52);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.countdown-values {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #00e6a4;
}
.countdown-values b {
    color: rgba(0, 230, 164, .75);
    font-size: 20px;
}
.countdown-unit {
    display: grid;
    gap: 4px;
    justify-items: center;
}
.countdown-unit strong {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(0, 230, 164, .32);
    border-radius: 50%;
    color: #00e6a4;
    background: rgba(0, 230, 164, .12);
    font-size: 18px;
    line-height: 1;
}
.countdown-unit span {
    color: rgba(238, 243, 237, .58);
    font-size: 10px;
    font-weight: 900;
}
.match-day-note {
    margin: 18px 0 0;
    color: rgba(238, 243, 237, .62);
}
.match-qualified-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(189,205,142,.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(189,205,142,.13), rgba(0,230,164,.08));
}
.match-qualified-strip span {
    color: var(--leaf);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.match-qualified-strip strong {
    color: var(--mist);
    font-size: 22px;
    font-weight: 900;
}
.qualified-team-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.qualified-team-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(189,205,142,.30);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(189,205,142,.13), rgba(7,17,25,.58)),
        rgba(12,29,40,.72);
    box-shadow: inset 0 0 0 1px rgba(7,17,25,.18);
}
.qualified-team-media {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.34);
    border-radius: 15px;
    color: var(--ink);
    background: linear-gradient(135deg, var(--leaf), var(--pink));
    font-weight: 950;
}
.qualified-team-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qualified-team-copy {
    display: grid;
    min-width: 0;
    align-content: center;
}
.qualified-team-copy span {
    color: var(--leaf);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.qualified-team-copy strong {
    overflow: hidden;
    color: var(--mist);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qualified-team-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.qualified-team-stats div {
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(238,243,237,.10);
    border-radius: 10px;
    background: rgba(7,17,25,.24);
}
.qualified-team-stats span {
    display: block;
    color: rgba(238,243,237,.55);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.qualified-team-stats strong {
    display: block;
    color: var(--mist);
    font-size: 15px;
    font-weight: 900;
}
@media (max-width: 850px) {
    .schedule-admin-grid {
        grid-template-columns: 1fr;
    }
    .match-countdown-panel {
        grid-template-columns: 1fr;
    }
    .countdown-wrap {
        justify-items: start;
    }
}
@media (max-width: 560px) {
    .match-day-card {
        padding: 16px;
        border-radius: 20px;
    }
    .match-countdown-panel {
        padding: 20px 14px;
        border-radius: 18px;
    }
    .countdown-values {
        width: 100%;
        gap: 5px;
        justify-content: space-between;
    }
    .countdown-unit strong {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    .qualified-team-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Match day and room manager refinements */
.room-manager-schedule-cell {
    min-width: 320px;
}
.room-manager-schedule-fields {
    display: grid;
    min-width: 290px;
    gap: 9px;
}
.room-manager-inline-fields {
    display: grid;
    grid-template-columns: 86px minmax(180px, 1fr);
    gap: 9px;
}
.room-manager-inline-fields .room-note-input {
    min-height: 70px;
}
.room-manager-map-list {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(189,205,142,.20);
    border-radius: 12px;
    background: rgba(7,17,25,.22);
}
.room-manager-map-label {
    color: var(--leaf);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.room-manager-map-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    margin: 0;
}
.room-manager-map-row span {
    color: var(--muted);
    font-size: 12px;
}
.room-manager-map-row select {
    min-width: 0;
    height: 42px;
    padding-block: 8px;
}
.match-day-card {
    position: relative;
    overflow: hidden;
    margin: 24px 0;
    padding: 30px 32px;
    border: 1px solid rgba(238,243,237,.18);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(241,166,207,.12), rgba(241,166,207,0) 34%),
        linear-gradient(135deg, rgba(47,73,106,.72), rgba(11,24,33,.96) 64%, rgba(7,17,25,.98));
    box-shadow: 0 24px 65px rgba(0,0,0,.36);
}
.match-day-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    pointer-events: none;
    background-image:
        linear-gradient(30deg, rgba(238,243,237,.10) 12%, transparent 12.5%, transparent 87%, rgba(238,243,237,.10) 87.5%, rgba(238,243,237,.10)),
        linear-gradient(150deg, rgba(238,243,237,.10) 12%, transparent 12.5%, transparent 87%, rgba(238,243,237,.10) 87.5%, rgba(238,243,237,.10));
    background-size: 78px 45px;
}
.match-day-card > * {
    position: relative;
    z-index: 1;
}
.match-day-heading {
    color: rgba(238,243,237,.72);
}
.match-countdown-panel {
    border-color: rgba(0,230,164,.46);
    border-radius: 22px;
    background:
        linear-gradient(130deg, rgba(0,230,164,.16), rgba(7,17,25,.56) 48%, rgba(47,73,106,.22)),
        repeating-linear-gradient(150deg, rgba(238,243,237,.04) 0 1px, transparent 1px 46px);
}
.match-copy h2 {
    color: var(--mist);
}
.match-map-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.match-map-card {
    position: relative;
    min-height: 86px;
    overflow: hidden;
    border: 1px solid rgba(238,243,237,.15);
    border-radius: 14px;
    background: rgba(7,17,25,.40);
    box-shadow: inset 0 0 0 1px rgba(7,17,25,.18);
}
.match-map-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.62) saturate(1.12);
    transform: scale(1.02);
}
.match-map-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(7,17,25,.78), rgba(7,17,25,.20));
}
.match-map-card div {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    min-height: 86px;
    padding: 12px;
}
.match-map-card span {
    color: var(--leaf);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.match-map-card strong {
    color: var(--mist);
    font-size: 17px;
    font-weight: 700;
}
@media (max-width: 900px) {
    .room-manager-schedule-cell,
    .room-manager-schedule-fields {
        min-width: 260px;
    }
    .room-manager-inline-fields {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 650px) {
    .match-day-card {
        padding: 22px 18px;
        border-radius: 20px;
    }
}


/* Admin room manager fitted controls */
.room-manager-table-wrap {
    padding-bottom: 8px;
}
.room-manager-table {
    min-width: 2070px;
    table-layout: fixed;
}
.room-manager-table th,
.room-manager-table td {
    padding: 14px 13px;
}
.room-manager-table th:nth-child(1),
.room-manager-table td:nth-child(1) { width: 165px; }
.room-manager-table th:nth-child(2),
.room-manager-table td:nth-child(2) { width: 76px; }
.room-manager-table th:nth-child(3),
.room-manager-table td:nth-child(3) { width: 620px; }
.room-manager-table th:nth-child(4),
.room-manager-table td:nth-child(4) { width: 220px; }
.room-manager-table th:nth-child(5),
.room-manager-table td:nth-child(5) { width: 220px; }
.room-manager-table th:nth-child(6),
.room-manager-table td:nth-child(6) { width: 260px; }
.room-manager-table th:nth-child(7),
.room-manager-table td:nth-child(7) { width: 310px; }
.room-manager-table th:nth-child(8),
.room-manager-table td:nth-child(8) { width: 140px; }
.room-manager-table input,
.room-manager-table textarea,
.room-manager-table select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.room-manager-table input {
    height: 50px;
}
.room-manager-table textarea {
    min-width: 0;
    min-height: 82px;
}
.room-manager-schedule-cell {
    min-width: 620px;
}
.room-manager-schedule-fields {
    min-width: 0;
    gap: 10px;
}
.room-manager-field-label {
    display: grid;
    gap: 6px;
    min-width: 0;
}
.room-manager-field-label > span {
    color: var(--leaf);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}
.room-manager-inline-fields {
    grid-template-columns: 88px 138px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}
.room-manager-inline-fields input[type="number"] {
    min-width: 0;
}
.room-manager-inline-fields .room-note-input {
    min-height: 74px;
}
.room-manager-table .team-name {
    display: block;
    line-height: 1.35;
}
.room-manager-manage-btn {
    width: 100%;
    min-width: 0;
}
@media (max-width: 900px) {
    .room-manager-table {
        min-width: 1990px;
    }
    .room-manager-table th:nth-child(3),
    .room-manager-table td:nth-child(3),
    .room-manager-schedule-cell {
        width: 590px;
        min-width: 590px;
    }
}

/* Compact Room IDP cards */
.room-manager-group-list {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}
.room-manager-group-form {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 16px;
    background: rgba(7,17,25,.24);
    box-shadow: inset 0 0 0 1px rgba(7,17,25,.24);
}
.room-manager-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.room-manager-group-head h3 {
    margin: 2px 0 3px;
    color: var(--mist);
    font-size: 22px;
    line-height: 1.15;
}
.room-manager-group-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.room-manager-group-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}
.room-save-status {
    min-height: 28px;
    padding: 6px 9px;
    color: rgba(238,243,237,.68);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.room-save-status:empty {
    display: none;
}
.room-save-status.is-saving {
    display: inline-flex;
    align-items: center;
    color: var(--warning);
    border-color: rgba(228,207,137,.28);
    background: rgba(228,207,137,.08);
}
.room-save-status.is-saved {
    display: inline-flex;
    align-items: center;
    color: var(--leaf);
    border-color: rgba(189,205,142,.28);
    background: rgba(189,205,142,.10);
}
.room-save-status.is-error {
    display: inline-flex;
    align-items: center;
    color: var(--pink);
    border-color: rgba(221,113,136,.30);
    background: rgba(221,113,136,.10);
}
.room-manager-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 14px;
    min-width: 0;
}
.room-manager-box {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 14px;
    background: rgba(12,29,40,.48);
}
.room-manager-box-wide {
    grid-column: span 1;
}
.room-manager-box h4,
.room-manager-box-head h4 {
    margin: 0;
    color: var(--mist);
    font-size: 15px;
    line-height: 1.2;
}
.room-manager-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.room-manager-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.room-manager-box input,
.room-manager-box textarea,
.room-manager-box select {
    width: 100%;
    min-width: 0;
}
.room-manager-button-list,
.room-qualified-link-list {
    display: grid;
    gap: 9px;
    min-width: 0;
}
.room-manager-button-row {
    display: grid;
    grid-template-columns: minmax(105px, 160px) minmax(0, 1fr) auto;
    gap: 8px;
    min-width: 0;
}
.btn-iconish {
    min-height: 44px;
    padding-inline: 12px;
}
.room-manager-add-button {
    justify-self: start;
}
.room-qualified-link-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(238,243,237,.10);
    border-radius: 12px;
    background: rgba(7,17,25,.22);
}
.room-qualified-link-row > span {
    color: var(--mist);
    font-size: 13px;
    font-weight: 800;
}
@media (max-width: 1150px) {
    .room-manager-card-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .room-manager-group-head,
    .room-manager-group-actions,
    .room-manager-box-head {
        align-items: stretch;
        flex-direction: column;
    }
    .room-manager-group-actions .btn,
    .room-manager-field-grid,
    .room-manager-button-row,
    .room-qualified-link-row {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .room-manager-group-actions {
        justify-content: stretch;
    }
}


/* Avatar example and image preview modal */
.avatar-example-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0 18px;
    padding: 14px;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 16px;
    background: rgba(7,17,25,.28);
}
.avatar-example-card-user {
    margin-top: 16px;
}
.avatar-example-image {
    width: 100%;
    height: auto;
    max-height: 240px;
    flex: 0 1 auto;
    object-fit: contain;
    border: 0;
    border-radius: 10px;
    background: rgba(7,17,25,.40);
}
.avatar-example-copy {
    display: grid;
    gap: 4px;
}
.avatar-example-copy strong {
    color: var(--mist);
    font-size: 15px;
}
.avatar-example-copy span {
    color: var(--muted);
    font-size: 13px;
}
button.team-logo-frame,
button.captain-photo,
button.team-player-photo {
    padding: 0;
    border-width: 1px;
    cursor: zoom-in;
    font: inherit;
}
.profile-image-trigger {
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.profile-image-trigger:hover,
.profile-image-trigger:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(241,166,207,.72);
    box-shadow: 0 0 0 4px rgba(241,166,207,.12), 0 18px 35px rgba(0,0,0,.30);
    outline: none;
}
.image-lightbox[hidden] { display: none; }
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
}
.image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(3,8,12,.76);
    backdrop-filter: blur(8px);
}
.image-lightbox-dialog {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(92vw, 560px);
    padding: 18px;
    border: 1px solid rgba(238,243,237,.20);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(47,73,106,.86), rgba(7,17,25,.98));
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.image-lightbox-dialog img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(7,17,25,.65);
}
.image-lightbox-dialog strong {
    color: var(--mist);
    font-size: 14px;
}
.image-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(238,243,237,.25);
    border-radius: 50%;
    color: var(--mist);
    background: rgba(7,17,25,.78);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}
@media (max-width: 620px) {
    .avatar-example-card {
        align-items: flex-start;
        flex-direction: column;
    }
    .avatar-example-image {
        width: 78px;
        height: 78px;
        flex-basis: 78px;
    }
}


/* Full avatar example preview */
.avatar-example-card {
    align-items: flex-start;
}
.avatar-example-preview {
    display: grid;
    width: min(100%, 360px);
    min-height: 190px;
    flex: 0 0 min(360px, 45%);
    place-items: center;
    padding: 10px;
    border: 1px solid rgba(241,166,207,.32);
    border-radius: 16px;
    background: rgba(7,17,25,.50);
    cursor: zoom-in;
}
.avatar-example-image {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    border: 0;
    border-radius: 10px;
    background: rgba(7,17,25,.40);
}
.avatar-example-preview .avatar-example-image {
    flex: 0 1 auto;
}
@media (max-width: 760px) {
    .avatar-example-preview {
        width: 100%;
        flex-basis: auto;
    }
}


/* Profile status note and activity avatar */
.team-profile-side {
    display: grid;
    flex: 0 0 270px;
    gap: 12px;
    justify-items: end;
}
.team-profile-side-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.profile-selected-avatar {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding: 8px;
    border: 1px solid rgba(241,166,207,.42);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(241,166,207,.28), rgba(189,205,142,.16));
    box-shadow: 0 0 0 4px rgba(241,166,207,.08);
}
.profile-selected-avatar img {
    width: 48px;
    height: 48px;
    grid-row: 1;
}
.profile-selected-avatar span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--mist);
    font-size: 19px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-selected-avatar small {
    color: rgba(238,243,237,.58);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.profile-admin-note-card {
    width: min(270px, 100%);
    padding: 12px 14px;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 16px;
    background: rgba(7,17,25,.32);
}
.profile-admin-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.profile-admin-note-head span,
.profile-admin-note-card strong {
    color: rgba(238,243,237,.55);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.profile-admin-note-card p {
    margin: 4px 0 0;
    color: var(--mist);
    font-size: 13px;
    line-height: 1.45;
}
.activity-avatar-pill {
    min-width: 44px;
    min-height: 34px;
}
@media (max-width: 850px) {
    .team-profile-side {
        width: 100%;
        flex-basis: auto;
        justify-items: start;
    }
    .team-profile-side-top {
        justify-content: flex-start;
    }
    .profile-admin-note-card {
        width: 100%;
    }
}
@media (max-width: 650px) {
    .team-profile-side {
        margin-top: 8px;
    }
    .team-profile-side-top {
        align-items: flex-start;
        flex-direction: column;
    }
    .profile-selected-avatar {
        width: 64px;
        height: 64px;
    }
    .profile-selected-avatar img {
        width: 40px;
        height: 40px;
    }
    .profile-selected-avatar small {
        font-size: 8px;
    }
}


/* Profile side mobile safety */
@media (max-width: 650px) {
    .team-profile-side .captain-photo {
        position: static;
        top: auto;
        right: auto;
    }
}


/* Footer and logo link polish */
.brand-home-link {
    color: inherit;
    text-decoration: none;
}
.brand-home-link:hover {
    text-decoration: none;
}
.brand-home-link:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 4px;
    border-radius: 12px;
}
.profile-admin-note-head .badge,
.profile-admin-note-head .badge-pending,
.badge.badge-pending {
    color: #0b1821;
}
.site-footer {
    width: 100%;
    margin-top: 36px;
    border-top: 1px solid rgba(238,243,237,.16);
    border-bottom: 1px solid rgba(238,243,237,.10);
    background: rgba(7, 7, 7, .95);
    box-shadow: 0 -12px 34px rgba(0,0,0,.30);
}
.site-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    width: min(1180px, calc(100% - 44px));
    min-height: 64px;
    margin: 0 auto;
    padding: 8px 0;
}
.site-footer-inner p {
    justify-self: start;
    margin: 0;
    color: rgba(238,243,237,.78);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}
.site-footer-inner a:not(.site-footer-topup) {
    color: rgba(238,243,237,.92);
    text-decoration: underline;
}
.site-footer-topup {
    justify-self: center;
    min-width: 108px;
    padding: 9px 18px;
    color: #07111a;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--leaf), #f2f6d0);
    box-shadow: 0 10px 24px rgba(189,205,142,.20);
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.site-footer-topup:hover { filter: brightness(1.06); text-decoration: none; }
.site-footer-inner img {
    justify-self: end;
    width: clamp(118px, 9vw, 156px);
    max-width: 30vw;
    height: auto;
    object-fit: contain;
}
@media (max-width: 700px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 0;
        padding: 14px 0;
        width: min(100% - 28px, 420px);
    }
    .site-footer-inner p,
    .site-footer-topup,
    .site-footer-inner img {
        justify-self: center;
        text-align: center;
    }
    .site-footer-inner p { white-space: normal; }
    .site-footer-topup { width: min(210px, 100%); }
    .site-footer-inner img {
        width: 124px;
        max-width: 70vw;
    }
}


/* Sticky bottom footer */
body {
    display: flex;
    flex-direction: column;
}
body > main.container {
    flex: 1 0 auto;
}
.site-footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* Universal notice dashboard feed and popup */
.universal-notice-feed { overflow: hidden; }
.notice-feed-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(241,166,207,.28);
    border-radius: 11px;
    background: rgba(241,166,207,.10);
}
.notice-empty { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.universal-notice-list { display: grid; gap: 10px; margin-top: 14px; }
.universal-notice-item {
    padding: 13px 14px;
    border: 1px solid rgba(238,243,237,.13);
    border-radius: 12px;
    background: rgba(7,17,25,.24);
}
.universal-notice-item.is-unread { border-color: rgba(241,166,207,.38); background: rgba(241,166,207,.10); }
.universal-notice-item h3 { margin: 0 0 5px; color: var(--mist); font-size: 16px; }
.universal-notice-item p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.universal-notice-item small { display: block; margin-top: 8px; color: rgba(238,243,237,.54); font-size: 11px; }
.universal-notice-modal {
    position: fixed;
    inset: 0;
    z-index: 170;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4,12,18,.76);
    backdrop-filter: blur(7px);
}
.universal-notice-modal[hidden] { display: none !important; }
.universal-notice-card {
    position: relative;
    width: min(540px, 100%);
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.54);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(47,73,106,.98), rgba(7,17,25,.99));
    box-shadow: 0 28px 80px rgba(0,0,0,.58);
}
.universal-notice-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--pink), var(--leaf));
}
.universal-notice-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--mist);
    border: 1px solid rgba(238,243,237,.16);
    border-radius: 10px;
    background: rgba(7,17,25,.42);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.universal-notice-chip {
    display: inline-flex;
    margin-bottom: 13px;
    padding: 6px 10px;
    color: #07111a;
    border-radius: 999px;
    background: var(--leaf);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}
.universal-notice-card h2 { margin: 0 42px 10px 0; color: var(--mist); font-size: 25px; line-height: 1.15; }
.universal-notice-card p { margin: 0; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.universal-notice-card small { display: block; margin-top: 12px; color: rgba(238,243,237,.58); font-size: 11px; }
.universal-notice-actions { margin-top: 20px; }
@media (max-width: 700px) {
    .universal-notice-card { padding: 24px 18px 20px; }
    .universal-notice-card h2 { font-size: 22px; }
    .universal-notice-actions .btn { width: 100%; }
}

.team-status-result-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(4,12,18,.78);
    backdrop-filter: blur(8px);
}
.team-status-result-modal[hidden] { display: none !important; }
.team-status-result-card {
    position: relative;
    width: min(460px, 100%);
    padding: 31px 26px 24px;
    overflow: hidden;
    border: 1px solid rgba(241,166,207,.52);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0%, rgba(189,205,142,.18), transparent 35%),
        linear-gradient(155deg, rgba(47,73,106,.97), rgba(7,17,25,.99) 66%);
    box-shadow: 0 30px 90px rgba(0,0,0,.62);
    text-align: center;
}
.team-status-result-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--pink), var(--leaf), var(--pink));
}
.team-status-result-card.is-qualified {
    border-color: rgba(189,205,142,.72);
}
.team-status-result-card.is-disqualified {
    border-color: rgba(221,113,136,.72);
}
.team-status-result-close {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--mist);
    border: 1px solid rgba(238,243,237,.16);
    border-radius: 10px;
    background: rgba(7,17,25,.46);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.team-status-trophy {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    margin: 2px auto 18px;
    color: #071119;
    border: 1px solid rgba(189,205,142,.45);
    border-radius: 50%;
    background: radial-gradient(circle, var(--leaf), #dce9b8);
    box-shadow: 0 0 34px rgba(189,205,142,.28);
    font-size: 42px;
    font-weight: 950;
}
.team-status-result-card.is-disqualified .team-status-trophy {
    color: var(--mist);
    border-color: rgba(221,113,136,.46);
    background: radial-gradient(circle, #b44862, var(--danger));
    box-shadow: 0 0 34px rgba(221,113,136,.22);
}
.team-status-chip {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--leaf);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .34em;
    text-transform: uppercase;
}
.team-status-result-card.is-disqualified .team-status-chip { color: var(--pink); }
.team-status-result-card h2 {
    margin: 0 34px 12px;
    color: var(--mist);
    font-size: 32px;
    line-height: 1.08;
    letter-spacing: -.03em;
}
.team-status-result-message {
    margin: 0 auto 20px;
    max-width: 390px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}
.team-status-result-message strong {
    color: var(--leaf);
    font-weight: 950;
}
.team-status-result-card small {
    display: block;
    margin-bottom: 18px;
    color: rgba(238,243,237,.56);
    font-size: 11px;
}
.team-status-go-button {
    width: 100%;
    min-height: 48px;
}
@media (max-width: 520px) {
    .team-status-result-card { padding: 28px 16px 18px; }
    .team-status-trophy { width: 78px; height: 78px; font-size: 34px; }
    .team-status-result-card h2 { margin-inline: 28px; font-size: 27px; }
}


/* Server Insights page */
.insights-feature-card {
    background: linear-gradient(135deg, rgba(47,73,106,.82), rgba(11,24,33,.92) 58%, rgba(241,166,207,.12));
}
.server-insight-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, rgba(47,73,106,.78), rgba(7,17,25,.94), rgba(189,205,142,.10));
}
.server-insight-time {
    display: grid;
    min-width: 220px;
    justify-items: end;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid rgba(189,205,142,.28);
    border-radius: 14px;
    background: rgba(7,17,25,.30);
}
.server-insight-time strong { color: var(--mist); font-size: 18px; }
.server-insight-time span { color: var(--muted); font-size: 12px; font-weight: 800; }
.insight-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.insight-metric { padding: 18px; }
.insight-metric span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.insight-metric strong { display: block; margin: 6px 0 2px; color: var(--mist); font-size: 34px; line-height: 1; }
.insight-metric small { color: rgba(238,243,237,.62); font-size: 12px; }
.insight-section-grid { margin-top: 18px; }
.insight-card { overflow: hidden; }
.insight-detail-list { display: grid; gap: 10px; }
.insight-detail-list div {
    display: grid;
    grid-template-columns: minmax(120px, .65fr) minmax(0, 1.35fr);
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid rgba(238,243,237,.11);
    border-radius: 12px;
    background: rgba(7,17,25,.22);
}
.insight-detail-list span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.insight-detail-list strong { min-width: 0; color: var(--mist); font-size: 13px; overflow-wrap: anywhere; }
.health-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #07111a;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}
.health-ok { background: var(--leaf); }
.health-warn { background: var(--warning); }
.health-danger { color: #fff; background: var(--danger); }
.storage-meter {
    width: 100%;
    height: 12px;
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 999px;
    background: rgba(7,17,25,.36);
}
.storage-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--leaf), var(--pink));
}
.extension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.extension-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 12px;
    background: rgba(7,17,25,.22);
}
.extension-pill strong { color: var(--mist); font-size: 13px; }
.insight-table-wrap { margin-top: 10px; }
.insight-table { min-width: 560px; }
.insight-data-table { min-width: 780px; }
.insight-table td, .insight-table th { vertical-align: middle; }
@media (max-width: 950px) {
    .insight-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .server-insight-hero { align-items: stretch; flex-direction: column; }
    .server-insight-time { justify-items: start; min-width: 0; }
}
@media (max-width: 700px) {
    .insight-metric-grid { grid-template-columns: 1fr; }
    .insight-detail-list div { grid-template-columns: 1fr; }
}


/* Traffic analytics additions */
.traffic-metric-card {
    border-color: rgba(241,166,207,.28);
    background: linear-gradient(135deg, rgba(241,166,207,.12), rgba(7,17,25,.78), rgba(189,205,142,.08));
}
.traffic-overview-card {
    background: linear-gradient(135deg, rgba(47,73,106,.70), rgba(7,17,25,.94), rgba(241,166,207,.07));
}
.traffic-table { min-width: 420px; }
.traffic-recent-table { min-width: 840px; }
.audit-log-table { min-width: 1040px; }
.traffic-page-path {
    display: inline-block;
    max-width: 360px;
    color: var(--mist);
    font-size: 12px;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.audit-detail-text {
    display: inline-block;
    max-width: 360px;
    overflow-wrap: anywhere;
}
.traffic-recent-card code {
    color: var(--leaf);
    background: rgba(189,205,142,.10);
}
@media (max-width: 700px) {
    .traffic-page-path { max-width: 220px; }
}


/* Match Data admin page */
.match-data-tool-card,
.match-data-preview-card {
    background: linear-gradient(135deg, rgba(47,73,106,.78), rgba(7,17,25,.94), rgba(189,205,142,.08));
}
.match-data-form textarea {
    min-height: 122px;
    resize: vertical;
}
.match-data-error-card {
    border-color: rgba(221,113,136,.38);
    background: linear-gradient(135deg, rgba(221,113,136,.12), rgba(7,17,25,.92));
}
.match-data-table { min-width: 760px; }
.match-data-table th:nth-child(3),
.match-data-table td:nth-child(3) { text-align: center; }
.match-data-guide .guide-icon {
    width: 52px;
    color: #07111a;
    background: var(--leaf);
    font-size: 13px;
    font-weight: 950;
}

/* Admin left sidebar navigation */
.admin-shell-body {
    display: block;
    min-height: 100vh;
    padding-left: 260px;
}
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: 260px;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    border-right: 1px solid rgba(238,243,237,.18);
    background: linear-gradient(170deg, rgba(7,17,25,.98), rgba(31,57,78,.96), rgba(10,24,34,.98));
    box-shadow: 14px 0 34px rgba(0,0,0,.26);
}
.admin-sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--navy), var(--pink), var(--leaf), var(--pink), var(--navy));
    background-size: 100% 230%;
    animation: paletteSweep 6s linear infinite;
}
.admin-sidebar-brand {
    align-items: center;
    min-height: 70px;
    padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(238,243,237,.10);
    background: rgba(238,243,237,.05);
}
.admin-sidebar-brand:hover {
    text-decoration: none;
    background: rgba(238,243,237,.08);
}
.admin-sidebar .brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
}
.admin-sidebar .brand {
    font-size: 14px;
    line-height: 1.08;
}
.admin-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 10px;
    border: 1px solid rgba(189,205,142,.20);
    border-radius: 14px;
    color: var(--mist);
    background: linear-gradient(135deg, rgba(189,205,142,.10), rgba(241,166,207,.08));
    text-decoration: none;
}
.admin-profile-mini:hover {
    border-color: rgba(241,166,207,.40);
    background: linear-gradient(135deg, rgba(189,205,142,.16), rgba(241,166,207,.12));
    text-decoration: none;
}
.admin-profile-avatar,
.admin-profile-large-avatar {
    display: grid;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(241,166,207,.34);
    border-radius: 50%;
    color: var(--ink);
    background: linear-gradient(135deg, var(--leaf), var(--pink));
    box-shadow: 0 8px 22px rgba(0,0,0,.20);
}
.admin-profile-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}
.admin-profile-avatar img,
.admin-profile-large-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-profile-avatar strong {
    font-size: 14px;
    font-weight: 700;
}
.admin-profile-mini-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
.admin-profile-mini-copy strong,
.admin-profile-mini-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-profile-mini-copy strong {
    color: var(--mist);
    font-size: 13px;
    font-weight: 600;
}
.admin-profile-mini-copy small {
    color: var(--leaf);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.admin-navlinks {
    display: grid;
    gap: 8px;
    align-content: start;
}
.admin-navlinks a {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 10px 12px;
    color: var(--mist);
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 12px;
    background: rgba(238,243,237,.055);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
}
.admin-navlinks a:hover,
.admin-navlinks a.is-active {
    color: var(--ink);
    border-color: rgba(241,166,207,.72);
    background: linear-gradient(110deg, var(--leaf), var(--pink));
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.admin-shell-body > main.container,
.admin-main {
    width: min(calc(100% - 48px), 1220px);
    margin: 34px auto 58px;
}
.admin-profile-grid {
    display: grid;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
    gap: 18px;
    align-items: start;
}
.admin-profile-card,
.admin-profile-form {
    background: linear-gradient(135deg, rgba(47,73,106,.76), rgba(11,24,33,.94), rgba(189,205,142,.08));
}
.admin-profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}
.admin-profile-large-avatar {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
}
.admin-profile-large-avatar strong {
    font-size: 28px;
    font-weight: 700;
}
.admin-profile-detail-list {
    display: grid;
    gap: 10px;
}
.admin-profile-detail-list div {
    padding: 12px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 12px;
    background: rgba(7,17,25,.24);
}
.admin-profile-detail-list span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.admin-profile-detail-list strong {
    display: block;
    margin-top: 3px;
    color: var(--mist);
    font-weight: 600;
    overflow-wrap: anywhere;
}
@media (max-width: 980px) {
    .admin-shell-body {
        padding-left: 0;
    }
    .admin-sidebar {
        position: sticky;
        inset: auto;
        top: 0;
        width: 100%;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(238,243,237,.18);
        box-shadow: 0 10px 28px rgba(0,0,0,.30);
    }
    .admin-sidebar::after {
        top: auto;
        right: 0;
        bottom: -4px;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--navy), var(--pink), var(--leaf), var(--pink), var(--navy));
        background-size: 230% 100%;
    }
    .admin-sidebar-brand {
        min-height: 58px;
    }
    .admin-navlinks {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .admin-profile-mini {
        align-self: stretch;
    }
    .admin-profile-grid {
        grid-template-columns: 1fr;
    }
    .admin-shell-body > main.container,
    .admin-main {
        width: min(100% - 24px, 1180px);
        margin: 24px auto 44px;
    }
}
@media (max-width: 620px) {
    .admin-sidebar {
        gap: 12px;
    }
    .admin-navlinks {
        grid-template-columns: 1fr;
    }
}

.registration-admin-grid { align-items: start; }
.registration-admin-card { min-height: 320px; }
.registration-field-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0;
}
.registration-field-panel {
    padding: 16px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 14px;
    background: rgba(7,17,25,.20);
}
.registration-field-settings h3 {
    margin: 0 0 5px;
    color: var(--mist);
    font-size: 18px;
}
.registration-field-toggle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}
.registration-field-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 13px 14px;
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(19,42,58,.58), rgba(7,17,25,.46));
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(238,243,237,.04);
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.registration-field-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.registration-field-toggle:hover {
    border-color: rgba(189,205,142,.36);
    background: linear-gradient(135deg, rgba(19,42,58,.74), rgba(7,17,25,.54));
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    transform: translateY(-1px);
}
.registration-field-toggle-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}
.registration-field-toggle-copy strong {
    color: var(--mist);
    font-size: 14px;
    font-weight: 950;
}
.registration-field-toggle-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}
.registration-toggle-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}
.registration-toggle-switch {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 26px;
    border: 1px solid rgba(238,243,237,.16);
    border-radius: 999px;
    background: rgba(238,243,237,.13);
    box-shadow: inset 0 0 0 1px rgba(7,17,25,.16);
    transition: background .2s ease, border-color .2s ease;
}
.registration-field-toggle input:focus-visible ~ .registration-toggle-control .registration-toggle-switch {
    box-shadow: 0 0 0 3px rgba(241,166,207,.24), inset 0 0 0 1px rgba(7,17,25,.16);
}
.registration-toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 3px 10px rgba(0,0,0,.35);
    transition: transform .22s ease, background .22s ease;
}
.registration-field-toggle input:checked ~ .registration-toggle-control .registration-toggle-switch {
    border-color: rgba(189,205,142,.70);
    background: linear-gradient(110deg, rgba(189,205,142,.92), rgba(241,166,207,.80));
}
.registration-field-toggle input:checked ~ .registration-toggle-control .registration-toggle-switch::after {
    transform: translateX(22px);
    background: #081119;
}
.registration-toggle-state {
    flex: 0 0 auto;
    min-width: 28px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    text-align: right;
    text-transform: uppercase;
}
.registration-toggle-state::before {
    content: "Off";
}
.registration-field-toggle input:checked ~ .registration-toggle-control .registration-toggle-state {
    color: var(--leaf);
}
.registration-field-toggle input:checked ~ .registration-toggle-control .registration-toggle-state::before {
    content: "On";
}
.registration-link-box { display: grid; gap: 8px; margin: 14px 0 16px; }
.registration-stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}
.registration-stats-row div,
.registration-preview-card div:not(.section-heading-row) {
    padding: 12px;
    border: 1px solid rgba(238,243,237,.12);
    border-radius: 10px;
    background: rgba(7,17,25,.24);
}
.registration-stats-row span,
.registration-preview-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}
.registration-stats-row strong,
.registration-preview-card strong {
    color: var(--mist);
    overflow-wrap: anywhere;
}
.registration-form-table { min-width: 1120px; }
.registration-table-copy { min-width: 330px; }
.registration-response-wrap { max-height: 70vh; }
.registration-response-table { min-width: 3100px; }
.registration-response-table th,
.registration-response-table td {
    vertical-align: top;
    white-space: normal;
}
.registration-response-table td { max-width: 230px; overflow-wrap: anywhere; }

.registration-public-main { width: min(1020px, calc(100% - 32px)); }
.registration-form-hero {
    background: linear-gradient(132deg, rgba(47,73,106,.76), rgba(11,24,33,.94), rgba(189,205,142,.09));
}
.registration-step-indicator {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}
.registration-step-indicator span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    color: var(--muted);
    border: 1px solid rgba(238,243,237,.14);
    border-radius: 10px;
    background: rgba(7,17,25,.28);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.registration-step-indicator span.is-active {
    color: var(--ink);
    border-color: rgba(189,205,142,.66);
    background: linear-gradient(110deg, var(--leaf), var(--pink));
}
.registration-step[hidden] { display: none !important; }
.registration-step { scroll-margin-top: 100px; }
.registration-progress-widget {
    position: fixed;
    top: 86px;
    right: 18px;
    z-index: 40;
    width: min(210px, calc(100vw - 32px));
    padding: 12px 13px;
    border: 1px solid rgba(241,166,207,.34);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(19,42,58,.94), rgba(7,17,25,.96));
    box-shadow: 0 16px 44px rgba(0,0,0,.34);
}
.registration-progress-widget > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.registration-progress-widget strong {
    color: var(--leaf);
    font-size: 14px;
}
.registration-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(238,243,237,.13);
}
.registration-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--leaf), var(--pink));
    transition: width .22s ease;
}
.registration-nav-row { justify-content: flex-end; margin-top: 18px; }
.phone-input-row {
    display: grid;
    grid-template-columns: minmax(170px, .45fr) minmax(0, 1fr);
    gap: 10px;
}
.address-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.member-field-card {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(189,205,142,.25);
    border-radius: 14px;
    background: rgba(7,17,25,.24);
}
.member-field-card:first-of-type { margin-top: 0; }
.uid-preview-text {
    min-height: 20px;
    margin-top: 7px;
    color: var(--leaf);
    font-size: 12px;
    font-weight: 850;
}
.upload-draft-note {
    color: var(--leaf);
}
.upload-draft-note strong {
    color: var(--mist);
}
.upload-draft-note[data-state="uploading"] {
    color: var(--pink);
}
.upload-draft-note[data-state="error"] {
    color: #ff9db2;
}
.registration-photo-field { grid-column: 1 / -1; }
.prompt-toggle-button { margin-top: 9px; }
.prompt-panel {
    display: grid;
    gap: 9px;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid rgba(241,166,207,.25);
    border-radius: 12px;
    background: rgba(241,166,207,.08);
}
.prompt-panel[hidden] { display: none !important; }
.prompt-panel textarea {
    min-height: 118px;
    color: var(--mist);
    background: rgba(7,17,25,.42);
}
.registration-preview-list { display: grid; gap: 14px; }
.registration-preview-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(189,205,142,.24);
    border-radius: 14px;
    background: rgba(7,17,25,.24);
}
.registration-preview-card .section-heading-row { margin-bottom: 2px; }
.registration-preview-card h3 {
    margin: 0;
    color: var(--leaf);
    font-size: 15px;
    text-transform: uppercase;
}
.registration-success-card,
.registration-stopped-card {
    max-width: 760px;
    margin-inline: auto;
}
@media (max-width: 820px) {
    .registration-progress-widget {
        top: 74px;
        right: 10px;
        width: min(180px, calc(100vw - 20px));
        padding: 10px;
    }
    .registration-step-indicator,
    .address-select-grid,
    .registration-stats-row,
    .registration-field-settings,
    .registration-field-toggle-grid {
        grid-template-columns: 1fr;
    }
    .phone-input-row {
        grid-template-columns: 1fr;
    }
    .registration-nav-row {
        justify-content: stretch;
    }
    .registration-nav-row .btn {
        width: 100%;
    }
}

/* ===== Normal Room Result ===== */
.normal-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 18px;
    align-items: start;
}
.normal-result-wide { grid-column: 1 / -1; }
.normal-result-card textarea { min-height: 170px; }
.normal-team-list-form { margin-bottom: 18px; }
.normal-small-table table { min-width: 520px; }
.normal-result-table table { min-width: 780px; }
.normal-match-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(189,205,142,.25);
    border-radius: 14px;
    background: rgba(7,17,25,.24);
}
.normal-match-title {
    margin-bottom: 12px;
    color: var(--leaf);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.normal-auto-total {
    color: var(--leaf);
    font-weight: 950;
}
.normal-action-card .section-heading-row {
    align-items: center;
}
.normal-share-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin: 8px 0 16px;
}
.normal-match-block {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(238,243,237,.13);
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(7,17,25,.30), rgba(47,73,106,.23));
}
.normal-match-block h3 {
    margin: 0 0 12px;
    color: var(--leaf);
    font-size: 16px;
}
.normal-booyah td {
    background: rgba(189,205,142,.10);
}
.small-btn {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}
.normal-public-page .card {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .normal-result-grid { grid-template-columns: 1fr; }
    .normal-action-card .section-heading-row { align-items: stretch; flex-direction: column; }
    .normal-share-row { grid-template-columns: 1fr; }
}

/* GFF is a heavy display family, so keep UI weights calmer for readability. */
body {
    font-weight: 400;
    letter-spacing: 0;
}
.brand {
    font-weight: 700;
    letter-spacing: .06em;
}
.brand-sub {
    font-weight: 500;
}
.admin-navlinks a,
.navlinks a,
.nav-user,
.btn,
label,
.team-name,
.card-title,
.registration-field-toggle-copy strong,
.registration-toggle-state,
.normal-match-title,
.normal-auto-total {
    font-weight: 600;
}
.page-title,
.auth-brand h1,
.section-heading-row h2,
.registration-preview-card h3 {
    font-weight: 700;
    letter-spacing: 0;
}
.registration-field-toggle-copy small,
.input-help,
.small,
.card-note,
.page-lead {
    font-weight: 400;
}
.badge,
.eyebrow,
th,
.rank-pill {
    font-weight: 700;
}
