:root {
    --bg: #07111f;
    --bg-soft: #0d1728;
    --bg-card: rgba(13, 23, 40, 0.82);
    --bg-card-strong: rgba(16, 26, 46, 0.92);
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.26);
    --text: #e7edf6;
    --text-soft: #9db0c6;
    --primary: #5eead4;
    --primary-strong: #14b8a6;
    --danger: #fb7185;
    --warning: #fbbf24;
    --info: #60a5fa;
    --success: #34d399;
    --muted: #94a3b8;
    --shadow: 0 24px 60px rgba(2, 8, 23, 0.42);
    --radius: 24px;
    --radius-sm: 16px;
    --radius-xs: 12px;
    --container: 1200px;
    --container-tight: 1040px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 25%),
        linear-gradient(180deg, #07111f 0%, #081221 48%, #0a1324 100%);
    color: var(--text);
    min-height: 100vh;
}

.app-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.8));
    opacity: 0.35;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

h1,
 h2,
 h3,
 h4,
 strong {
    color: var(--text);
    margin: 0;
}

.container-wide {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.container-tight {
    width: min(var(--container-tight), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(20px);
    background: rgba(6, 15, 28, 0.72);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
}

.brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand strong,
.sidebar-brand strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.brand small,
.sidebar-brand small,
.user-chip small,
.list-row small,
.subtle,
.footer-label,
.eyebrow,
.meta-row,
.meta-stack,
.stat-card span,
.topbar .eyebrow {
    color: var(--text-soft);
}

.brand small,
.sidebar-brand small,
.footer-label,
.eyebrow,
.topbar .eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.brand-badge,
.user-avatar,
.team-logo,
.player-avatar,
.profile-avatar {
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.3), rgba(96, 165, 250, 0.28));
    border: 1px solid rgba(94, 234, 212, 0.2);
    color: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.brand-badge {
    width: 40px;
    height: 40px;
    font-weight: 700;
}


.site-header .brand-badge {
    width: 56px;
    height: 56px;
    border-radius: 20px;
}

.site-header .brand strong {
    font-size: 1.08rem;
}

.site-header .brand-badge.has-image img {
    object-fit: contain;
    padding: 6px;
}

@media (max-width: 640px) {
    .site-header .brand-badge {
        width: 48px;
        height: 48px;
    }
}

.user-avatar,
.player-avatar {
    width: 54px;
    height: 54px;
    font-weight: 800;
}

.team-logo {
    width: 64px;
    height: 64px;
    font-weight: 800;
}

.user-avatar {
    width: 42px;
    height: 42px;
    font-size: 0.88rem;
    border-radius: 14px;
}

.user-chip.large .user-avatar,
.profile-avatar.large {
    width: 84px;
    height: 84px;
    border-radius: 24px;
    font-size: 1.1rem;
}

.player-avatar.small {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.team-logo.small {
    width: 50px;
    height: 50px;
    border-radius: 16px;
}

.site-nav,
.site-actions,
.topbar-actions,
.meta-row,
.hero-actions,
.form-actions,
.toolbar-form,
.auth-links,
.footer-grid,
.info-grid {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-nav {
    flex-wrap: wrap;
    justify-content: center;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-soft);
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.sidebar-link:hover,
.sidebar-link.active,
.list-row.active-row {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.site-main {
    padding: 34px 0 72px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.card-padded {
    padding: 24px;
}

.glow-card,
.panel-highlight {
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.92), rgba(13, 23, 40, 0.72)),
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.22), transparent 30%);
}

.panel-highlight.secondary {
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.92), rgba(13, 23, 40, 0.72)),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.2), transparent 25%);
}

.hero-grid,
.detail-grid,
.card-grid,
.stat-grid,
.action-grid,
.form-grid,
.footer-grid {
    display: grid;
    gap: 20px;
}

.hero-grid {
    grid-template-columns: 1.35fr 0.65fr;
    margin-bottom: 36px;
}

.hero h1,
.page-hero h1,
.profile-main h1,
.auth-card h1 {
    font-size: clamp(2rem, 3vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 10px 0 16px;
}

.page-hero h1,
.auth-card h1 {
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
}

.hero p,
.page-hero p,
.auth-card p {
    max-width: 64ch;
}

.hero-actions {
    margin: 24px 0;
    flex-wrap: wrap;
}

.stack-gap {
    display: grid;
    gap: 20px;
}

.stack-gap.tight {
    gap: 12px;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.stat-grid.compact {
    margin-top: 20px;
}

.stat-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card.big {
    min-height: 124px;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.7rem, 2.5vw, 2.4rem);
    letter-spacing: -0.04em;
}

.stat-card small {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
    line-height: 1.6;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 34px 0 18px;
}

.section-head.inside {
    margin: 0 0 18px;
}

.section-head h2,
.mini-heading {
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.card-grid.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.columns-2,
.action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-grid.single-column {
    grid-template-columns: 1fr;
}

.team-card,
.player-card,
.tournament-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-card:hover,
.player-card:hover,
.tournament-card:hover,
.action-card:hover,
.list-row:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
}

.team-banner {
    height: 130px;
    background:
        radial-gradient(circle at top left, rgba(94, 234, 212, 0.28), transparent 28%),
        radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.22), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    border-bottom: 1px solid var(--line);
}

.team-banner.small {
    height: 110px;
}

.team-banner.large {
    height: 220px;
}

.team-card .card-padded,
.profile-content {
    position: relative;
}

.team-card .team-logo {
    margin-top: -56px;
}

.profile-avatar,
.profile-avatar.large {
    margin-top: -48px;
}

.meta-row,
.meta-stack,
.row-tail {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.meta-row.start {
    justify-content: flex-start;
}

.meta-row.wrap {
    flex-wrap: wrap;
}

.meta-row.compact {
    gap: 8px;
}

.meta-stack {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.profile-hero {
    margin-bottom: 24px;
}

.profile-content {
    display: flex;
    gap: 22px;
    align-items: flex-end;
    margin-top: -70px;
}

.profile-main {
    display: grid;
    gap: 10px;
    align-content: end;
}

.profile-main.no-avatar {
    width: 100%;
    margin-top: 0;
}

.detail-grid {
    grid-template-columns: 1fr 0.9fr;
    margin-bottom: 24px;
}

.detail-grid.single-sidebar {
    grid-template-columns: 1.35fr 0.65fr;
}

.detail-grid.sidebar-left {
    grid-template-columns: 0.55fr 1.45fr;
}

.sidebar-card {
    align-self: start;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    color: #061016;
    background: linear-gradient(135deg, var(--primary), #76e6ff);
    box-shadow: 0 14px 24px rgba(34, 211, 238, 0.18);
}

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.btn-danger {
    color: white;
    background: rgba(251, 113, 133, 0.16);
    border-color: rgba(251, 113, 133, 0.3);
}

.btn-small {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-success {
    background: rgba(52, 211, 153, 0.16);
    border-color: rgba(52, 211, 153, 0.24);
    color: #9cf0cc;
}

.badge-danger {
    background: rgba(251, 113, 133, 0.16);
    border-color: rgba(251, 113, 133, 0.22);
    color: #fec3cf;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.16);
    border-color: rgba(251, 191, 36, 0.22);
    color: #fde59f;
}

.badge-info {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}

.badge-muted {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

.input,
textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.input:focus,
textarea:focus,
select:focus {
    border-color: rgba(94, 234, 212, 0.55);
    background: rgba(255, 255, 255, 0.05);
}

input::placeholder,
textarea::placeholder {
    color: #6f8299;
}

textarea.textarea {
    padding: 14px;
    min-height: auto;
    resize: vertical;
}

label {
    display: grid;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four-col {
    grid-template-columns: 2fr 1fr 1.2fr auto;
}

.form-grid.compact-form,
.form-stack.compact-form {
    gap: 14px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.form-actions {
    margin-top: 4px;
    flex-wrap: wrap;
}

.form-actions.align-end {
    align-self: end;
    justify-content: flex-end;
}

.full-width {
    grid-column: 1 / -1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    border-radius: 14px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.checkbox-label.compact {
    min-height: auto;
    padding: 0;
    border: none;
    background: transparent;
}

.checkbox-label input {
    accent-color: var(--primary-strong);
}

.list-row,
.action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    transition: 0.2s ease;
}

.list-row strong,
.action-card strong {
    display: block;
    margin-bottom: 2px;
}

.row-tail {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
}

.action-card {
    flex-direction: column;
    align-items: flex-start;
    min-height: 146px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-form.stacked-mini {
    display: grid;
    gap: 8px;
    min-width: 120px;
}

.input.small {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
}

.toolbar-form {
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.toolbar-form .input {
    min-width: 180px;
    flex: 1 1 220px;
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

.public-flash {
    margin-top: 16px;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    font-weight: 600;
}

.flash-success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.24);
    color: #a7f3d0;
}

.flash-danger {
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.24);
    color: #fecdd3;
}

.flash-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.24);
    color: #fde68a;
}

.flash-info,
.flash-muted {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.24);
    color: #bfdbfe;
}

.empty-state {
    display: grid;
    gap: 10px;
    justify-items: start;
    min-height: 180px;
    align-content: center;
}

.empty-state.compact {
    min-height: auto;
}

.empty-note {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: var(--text-soft);
    line-height: 1.7;
}

.page-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.info-grid {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin-top: 18px;
}

.info-grid > div {
    flex: 1 1 180px;
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.content-block {
    margin-top: 22px;
}

.site-footer {
    padding: 28px 0 54px;
    border-top: 1px solid var(--line);
    background: rgba(6, 15, 28, 0.45);
}

.footer-grid {
    grid-template-columns: 1.4fr 0.6fr 0.6fr;
    align-items: start;
}

.footer-grid a {
    display: block;
    color: var(--text-soft);
    margin-top: 8px;
}

.footer-grid a:hover {
    color: var(--text);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 16px 20px;
    border-right: 1px solid var(--line);
    background: rgba(6, 15, 28, 0.76);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px 16px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 10px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 26px;
}

.sidebar-link {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.sidebar-label {
    margin-top: 22px;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}

.dashboard-main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 32px;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    background: rgba(7, 17, 31, 0.78);
}

.topbar h1 {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    letter-spacing: -0.04em;
}

.dashboard-content {
    padding: 28px 0 44px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.user-chip strong,
.list-row strong,
.meta-stack strong,
.info-grid strong,
.data-table strong {
    font-size: 0.95rem;
}

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font: inherit;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 220px);
}

.auth-card {
    width: min(560px, 100%);
}

.auth-card.wide {
    width: min(760px, 100%);
}

.auth-links {
    justify-content: center;
    margin-top: 18px;
    color: var(--text-soft);
}

.auth-links a {
    color: var(--primary);
}

.install-shell {
    width: min(860px, calc(100% - 32px));
    margin: 40px auto 64px;
}

.install-shell .card {
    margin-bottom: 18px;
}

.install-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.muted-grid {
    display: grid;
    gap: 12px;
}

.notice {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: var(--text-soft);
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .hero-grid,
    .detail-grid,
    .detail-grid.single-sidebar,
    .detail-grid.sidebar-left,
    .dashboard-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        min-height: auto;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 290px;
        height: 100dvh;
        transform: translateX(-102%);
        transition: transform 0.24s ease;
        z-index: 50;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .topbar {
        padding: 20px 16px;
    }

    .mobile-nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .dashboard-content {
        padding: 22px 0 40px;
    }
}

@media (max-width: 980px) {
    .card-grid.columns-4,
    .card-grid.columns-3,
    .card-grid.columns-2,
    .action-grid,
    .stat-grid,
    .form-grid.two-col,
    .form-grid.three-col,
    .form-grid.four-col,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero,
    .site-header-inner,
    .site-nav,
    .site-actions,
    .topbar-actions,
    .profile-content,
    .toolbar-form {
        flex-wrap: wrap;
    }

    .profile-content {
        align-items: flex-start;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .site-main,
    .dashboard-content {
        width: calc(100% - 20px);
    }

    .card-padded,
    .topbar,
    .sidebar {
        padding: 18px;
    }

    .card-grid.columns-4,
    .card-grid.columns-3,
    .card-grid.columns-2,
    .action-grid,
    .stat-grid,
    .form-grid.two-col,
    .form-grid.three-col,
    .form-grid.four-col,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .page-hero h1,
    .profile-main h1,
    .auth-card h1 {
        font-size: 1.9rem;
    }

    .profile-content {
        margin-top: -54px;
    }

    .team-banner.large {
        height: 170px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .site-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== UI refresh: typography + responsiveness ===== */
:root {
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
    --radius: 28px;
    --radius-sm: 18px;
    --radius-xs: 14px;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.3);
    --bg-card: rgba(8, 16, 29, 0.82);
    --bg-card-strong: rgba(10, 19, 35, 0.94);
    --shadow: 0 30px 72px rgba(2, 8, 23, 0.42);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(94, 234, 212, 0.28);
    color: #ffffff;
}

h1,
h2,
h3,
h4,
.brand strong,
.sidebar-brand strong,
.topbar h1,
.mini-heading,
.btn,
.badge {
    font-family: var(--font-display);
}

h1,
h2,
h3,
h4 {
    text-wrap: balance;
}

p,
label,
input,
textarea,
select,
table,
.subtle,
.meta-row,
.meta-stack,
.info-grid {
    font-family: var(--font-sans);
}

.site-main {
    padding: 42px 0 80px;
}

.site-header-inner {
    position: relative;
    gap: 20px;
}

.public-nav-shell {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.nav-menu-toggle,
.public-nav-backdrop,
.sidebar-backdrop {
    display: none;
}

.nav-menu-toggle {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.14);
}

.nav-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.public-nav-open .nav-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.public-nav-open .nav-menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.public-nav-open .nav-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(8, 16, 29, 0.9), rgba(10, 17, 31, 0.82));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 40%, rgba(94, 234, 212, 0.12));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.75;
}

.card > * {
    position: relative;
}

.card-padded {
    padding: 28px;
}

.hero-grid {
    align-items: stretch;
    gap: 22px;
}

.hero .eyebrow,
.page-hero .eyebrow {
    margin-bottom: 6px;
}

.hero h1 {
    max-width: 13ch;
}

.page-hero {
    align-items: center;
    gap: 24px;
}

.page-hero p {
    max-width: 62ch;
}

.team-card .card-padded,
.player-card.card-padded,
.tournament-card.card-padded {
    display: grid;
    gap: 14px;
}

.team-card h3,
.player-card h3,
.tournament-card h3 {
    font-size: 1.25rem;
}

.team-banner {
    position: relative;
    overflow: hidden;
}

.team-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(8, 16, 29, 0.28));
}

.stat-card,
.list-row,
.action-card,
.info-grid > div,
.notice,
.empty-note,
.checkbox-label {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.12);
}

.stat-card {
    border-radius: 22px;
}

.list-row,
.action-card {
    border-radius: 20px;
}

.input,
textarea,
select {
    min-height: 52px;
    background: rgba(7, 14, 26, 0.78);
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.input:focus,
textarea:focus,
select:focus {
    border-color: rgba(94, 234, 212, 0.54);
    box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12);
}

.btn {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 16px;
    letter-spacing: -0.01em;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.badge {
    padding: 0 12px;
}

.site-nav a {
    font-family: var(--font-display);
    font-size: 0.95rem;
}

.data-table th {
    white-space: nowrap;
}

.data-table td {
    line-height: 1.55;
}

.data-table td strong {
    font-family: var(--font-display);
}

.user-chip,
.brand,
.sidebar-brand {
    min-width: 0;
}

.user-chip > div:last-child,
.brand > div,
.sidebar-brand > div {
    min-width: 0;
}

.user-chip strong,
.user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar {
    padding: 22px clamp(16px, 3vw, 32px);
}

.mobile-nav-toggle {
    display: none;
    font-family: var(--font-display);
    font-size: 1rem;
}

.site-footer {
    margin-top: 28px;
}

.install-header,
.section-head,
.page-hero {
    row-gap: 14px;
}

@media (max-width: 1180px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(2, 6, 23, 0.58);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 45;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        box-shadow: 0 30px 80px rgba(2, 8, 23, 0.6);
    }

    .mobile-nav-toggle {
        display: inline-grid;
        place-items: center;
    }
}

@media (max-width: 980px) {
    .site-header-inner {
        flex-wrap: wrap;
    }

    .nav-menu-toggle {
        display: inline-flex;
    }

    .public-nav-shell {
        position: fixed;
        inset: 82px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
        background: rgba(6, 15, 28, 0.96);
        border: 1px solid var(--line-strong);
        border-radius: 24px;
        box-shadow: var(--shadow);
        backdrop-filter: blur(22px);
        z-index: 40;
        max-height: calc(100vh - 104px);
        overflow: auto;
    }

    .public-nav-shell.open {
        display: flex;
    }

    .public-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(2, 6, 23, 0.56);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 35;
    }

    body.public-nav-open {
        overflow: hidden;
    }

    body.public-nav-open .public-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .site-nav a {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid transparent;
    }

    .site-nav a.active,
    .site-nav a:hover {
        border-color: var(--line);
        background: rgba(255, 255, 255, 0.06);
    }

    .site-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .site-actions .btn {
        width: 100%;
    }

    .page-hero,
    .install-header {
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 760px) {
    .container-wide,
    .container-tight {
        width: min(100% - 20px, var(--container));
    }

    .card-padded {
        padding: 20px;
    }

    .hero-grid {
        gap: 18px;
    }

    .team-card .team-logo {
        margin-top: -46px;
    }

    .profile-avatar,
    .profile-avatar.large {
        margin-top: -40px;
    }

    .profile-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-top: -56px;
    }

    .profile-main,
    .profile-main.no-avatar {
        width: 100%;
    }

    .row-tail {
        width: 100%;
        justify-content: space-between;
        text-align: left;
        margin-left: 0;
    }

    .list-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .table-wrap {
        overflow: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: grid;
        gap: 14px;
    }

    .data-table tr {
        padding: 8px 0;
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.03);
        overflow: hidden;
    }

    .data-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 12px 16px;
        display: grid;
        grid-template-columns: minmax(78px, 110px) 1fr;
        gap: 12px;
        align-items: start;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .inline-form,
    .inline-form.stacked-mini {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .inline-form .btn,
    .inline-form .input,
    .inline-form select {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .site-header-inner {
        gap: 14px;
        padding: 14px 0;
    }

    .brand strong,
    .sidebar-brand strong {
        font-size: 0.98rem;
    }

    .hero h1,
    .page-hero h1,
    .profile-main h1,
    .auth-card h1 {
        font-size: clamp(1.72rem, 8vw, 2.28rem);
    }

    .hero p,
    .page-hero p,
    .auth-card p,
    p {
        line-height: 1.65;
    }

    .stat-card strong {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions .btn,
    .topbar-actions .user-chip {
        width: 100%;
    }

    .form-actions,
    .hero-actions {
        width: 100%;
    }

    .form-actions .btn,
    .hero-actions .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .public-nav-shell {
        inset: 76px 12px auto;
    }

    .nav-menu-toggle,
    .mobile-nav-toggle {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .auth-links {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .team-banner.large {
        height: 154px;
    }

    .team-card .team-logo,
    .player-avatar,
    .team-logo,
    .profile-avatar.large {
        width: 64px;
        height: 64px;
        border-radius: 20px;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }

    .data-table td {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .data-table td::before {
        margin-bottom: 2px;
    }
}


.team-banner.has-image,
.team-logo.has-image,
.player-avatar.has-image,
.profile-avatar.has-image {
    border-color: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.team-banner.has-image,
.player-avatar.has-image,
.profile-avatar.has-image {
    background: rgba(255, 255, 255, 0.02);
    padding: 0;
}

.team-logo.has-image {
    background:
        radial-gradient(circle at top, rgba(94, 234, 212, 0.12), transparent 62%),
        linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(9, 21, 38, 0.98));
    padding: 4px;
}

.team-banner.has-image img,
.player-avatar.has-image img,
.profile-avatar.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-logo.has-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.12);
    transform-origin: center;
    display: block;
}

.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.media-preview-card {
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    gap: 12px;
}

.media-preview-card small {
    color: var(--text-soft);
    display: block;
    line-height: 1.5;
}

.media-preview-card .team-banner,
.media-preview-card .team-logo,
.media-preview-card .player-avatar,
.media-preview-card .profile-avatar {
    margin-top: 0;
}

.media-preview-card .team-banner {
    height: 140px;
    border-radius: 18px;
}

.media-preview-card .team-logo,
.media-preview-card .player-avatar,
.media-preview-card .profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 24px;
}

body.compact-sidebar-mode .dashboard-layout {
    grid-template-columns: 1fr;
    min-height: auto;
}

body.compact-sidebar-mode .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(290px, calc(100vw - 24px));
    height: 100dvh;
    transform: translateX(-102%);
    transition: transform 0.24s ease;
    z-index: 50;
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.6);
}

body.compact-sidebar-mode .sidebar.open {
    transform: translateX(0);
}

body.compact-sidebar-mode .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
}

body.compact-sidebar-mode .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 45;
}

body.compact-sidebar-mode.sidebar-open {
    overflow: hidden;
}

body.compact-sidebar-mode.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .media-preview-grid {
        grid-template-columns: 1fr;
    }

    .media-preview-card .team-banner {
        height: 120px;
    }
}


@media (max-height: 760px) {
    .sidebar {
        padding-bottom: 14px;
    }

    .sidebar-footer {
        gap: 12px;
        padding: 14px;
    }

    .sidebar-link {
        padding-top: 11px;
        padding-bottom: 11px;
    }
}

/* ===== v9 card sizing polish ===== */
.team-card,
.player-card,
.tournament-card {
    height: 100%;
}

.team-card {
    display: flex;
    flex-direction: column;
}

.team-card .card-padded {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
}

.team-card .team-logo {
    margin-top: -42px;
}

.team-card .team-banner.small {
    height: 96px;
}

.team-card h3 {
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.team-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 3.4em;
}

.team-card .meta-row,
.team-card .meta-stack {
    margin-top: auto;
}

.team-card .meta-row {
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: flex-start;
}

.team-card .btn {
    margin-top: 2px;
}

.player-card.card-padded,
.tournament-card.card-padded {
    height: 100%;
    gap: 12px;
}

.player-card.card-padded p,
.tournament-card.card-padded p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 3.4em;
}

.player-card.card-padded .btn,
.tournament-card.card-padded .btn {
    margin-top: auto;
}

@media (max-width: 760px) {
    .team-card .card-padded {
        padding: 20px;
    }

    .team-card .team-banner.small {
        height: 88px;
    }

    .team-card .team-logo {
        margin-top: -38px;
    }
}


/* ===== Mobile polish: leaderboards, team and player pages ===== */
.directory-grid .directory-card,
.leaderboard-switcher .list-row,
.team-detail-layout .list-row,
.player-detail-layout .list-row {
    min-width: 0;
}

.directory-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.directory-grid .meta-stack span,
.profile-main .meta-row.start.wrap > * {
    min-width: 0;
}

.profile-main .meta-row.start.wrap > * {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.profile-main p {
    max-width: 72ch;
}

.leaderboard-board .table-wrap {
    margin-top: 8px;
}

@media (max-width: 980px) {
    .directory-hero .toolbar-form {
        width: 100%;
    }

    .directory-hero .toolbar-form .input,
    .directory-hero .toolbar-form select,
    .directory-hero .toolbar-form .btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .leaderboard-layout {
        gap: 16px;
    }

    .leaderboard-switcher .stack-gap.tight {
        gap: 10px;
    }
}

@media (max-width: 760px) {
    .directory-grid {
        gap: 16px;
    }

    .directory-card .meta-stack {
        gap: 10px;
    }

    .directory-card .btn {
        margin-top: 2px;
    }

    .leaderboard-hero .btn,
    .directory-hero .btn {
        width: 100%;
    }

    .leaderboard-board .data-table tr {
        padding: 10px 0;
        border-radius: 20px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .leaderboard-board .data-table td:first-child {
        background: rgba(94, 234, 212, 0.08);
    }

    .leaderboard-board .data-table td:first-child::before {
        color: #9ae6da;
    }

    .team-profile-page .team-banner.large,
    .player-profile-page .team-banner.large {
        height: 150px;
    }

    .team-profile-page .profile-content,
    .player-profile-page .profile-content {
        gap: 14px;
        margin-top: -44px;
        padding-top: 0;
    }

    .team-profile-page .profile-avatar.large,
    .player-profile-page .profile-avatar.large {
        width: 76px;
        height: 76px;
        border-radius: 22px;
        font-size: 1rem;
        margin-top: 0;
    }

    .team-profile-page .profile-main .meta-row.compact,
    .player-profile-page .profile-main .meta-row.compact {
        width: 100%;
        flex-wrap: wrap;
    }

    .team-profile-page .profile-main .meta-row.start.wrap,
    .player-profile-page .profile-main .meta-row.start.wrap {
        gap: 8px;
    }

    .team-profile-page .profile-main .meta-row.start.wrap > *,
    .player-profile-page .profile-main .meta-row.start.wrap > * {
        max-width: 100%;
        white-space: normal;
        line-height: 1.35;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .team-detail-layout .list-row,
    .player-detail-layout .list-row {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 12px;
    }

    .team-detail-layout .list-row > div:nth-child(2),
    .player-detail-layout .list-row > div:nth-child(2) {
        min-width: 0;
    }

    .team-detail-layout .list-row strong,
    .player-detail-layout .list-row strong,
    .leaderboard-switcher .list-row strong {
        overflow-wrap: anywhere;
    }

    .team-detail-layout .row-tail,
    .player-detail-layout .row-tail {
        grid-column: 1 / -1;
        width: 100%;
        padding-top: 2px;
    }

    .player-detail-layout .social-row {
        grid-template-columns: 1fr;
    }

    .player-detail-layout .social-row span,
    .team-detail-layout .result-row span {
        word-break: break-word;
    }

    .player-detail-layout .info-grid,
    .team-detail-layout .info-grid {
        gap: 12px;
    }

    .player-detail-layout .info-grid > div,
    .team-detail-layout .info-grid > div {
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-width: 560px) {
    .leaderboard-switcher.card-padded,
    .leaderboard-board.card-padded,
    .team-detail-layout > .card-padded,
    .player-detail-layout > .card-padded,
    .directory-hero.card-padded {
        padding: 18px;
    }

    .leaderboard-switcher .list-row,
    .team-detail-layout .list-row,
    .player-detail-layout .list-row {
        padding: 14px;
        gap: 10px;
    }

    .leaderboard-board .data-table td {
        grid-template-columns: minmax(68px, 92px) 1fr;
        gap: 10px;
        padding: 11px 14px;
    }

    .team-profile-page .team-banner.large,
    .player-profile-page .team-banner.large {
        height: 132px;
    }

    .team-profile-page .profile-avatar.large,
    .player-profile-page .profile-avatar.large {
        width: 68px;
        height: 68px;
        border-radius: 20px;
    }

    .team-profile-page .profile-main h1,
    .player-profile-page .profile-main h1 {
        font-size: clamp(1.56rem, 7.6vw, 2rem);
    }

    .team-profile-page .profile-main p,
    .player-profile-page .profile-main p {
        font-size: 0.98rem;
    }

    .leaderboard-switcher .list-row {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}


.home-banner-carousel {
    position: relative;
    overflow: hidden;
    margin: 16px 0 30px;
    padding: 0;
    border-radius: 28px;
    background: #040b15;
}

.home-banner-carousel.image-only {
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.38);
}

.home-banner-viewport {
    overflow: hidden;
    border-radius: inherit;
}

.home-banner-track {
    display: flex;
    transition: transform 420ms ease;
    will-change: transform;
}

.home-banner-slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.home-banner-card {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 340px;
    text-decoration: none;
}

.home-banner-card.image-only {
    min-height: clamp(220px, 32vw, 420px);
}

.home-banner-card.is-clickable {
    cursor: pointer;
}

.home-banner-media {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(96, 165, 250, 0.08), rgba(7, 17, 31, 0.95));
}

.home-banner-media.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 320ms ease;
}

.home-banner-card.is-clickable:hover .home-banner-media.has-image img,
.home-banner-card.is-clickable:focus-visible .home-banner-media.has-image img {
    transform: scale(1.02);
}

.home-banner-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 15, 28, 0.18) 0%, rgba(6, 15, 28, 0.04) 100%);
}

.home-banner-carousel.image-only .home-banner-media::after,
.home-banner-carousel.image-only .home-banner-content {
    display: none;
}

.home-banner-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #0f2942;
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(2, 8, 23, 0.24);
}

.home-banner-control:hover {
    background: #ffffff;
}

.home-banner-control.prev {
    left: 14px;
}

.home-banner-control.next {
    right: 14px;
}

.home-banner-dots {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 18px;
    z-index: 3;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.home-banner-dot {
    width: 13px;
    height: 13px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.home-banner-dot.is-active {
    background: rgba(15, 23, 42, 0.95);
}

@media (max-width: 760px) {
    .home-banner-carousel {
        border-radius: 22px;
        margin: 12px 0 24px;
    }

    .home-banner-card,
    .home-banner-card.image-only {
        min-height: 190px;
    }

    .home-banner-control {
        width: 44px;
        height: 44px;
        font-size: 1.45rem;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
    }

    .home-banner-control.prev {
        left: 10px;
    }

    .home-banner-control.next {
        right: 10px;
    }

    .home-banner-dots {
        left: 16px;
        right: 16px;
        bottom: 12px;
        gap: 9px;
    }

    .home-banner-dot {
        width: 10px;
        height: 10px;
    }
}

.home-banner-preview {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.home-banner-preview.small {
    width: 150px;
    min-width: 150px;
    min-height: 96px;
}

.home-banner-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-admin-row {
    align-items: stretch;
    gap: 18px;
}

.banner-admin-main {
    align-items: stretch;
    gap: 18px;
}

.banner-admin-main p {
    margin: 8px 0 0;
}

.banner-admin-actions {
    gap: 10px;
    align-items: center;
}

.banner-admin-actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .home-banner-card,
    .home-banner-content {
        min-height: 240px;
    }

    .home-banner-content {
        padding: 20px;
        max-width: 100%;
    }

    .home-banner-media::after {
        background: linear-gradient(180deg, rgba(6, 15, 28, 0.28) 0%, rgba(6, 15, 28, 0.72) 45%, rgba(6, 15, 28, 0.94) 100%);
    }

    .home-banner-control {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .home-banner-control.prev {
        left: 16px;
    }

    .home-banner-control.next {
        right: 16px;
    }

    .home-banner-dots {
        left: 72px;
        right: 72px;
        bottom: 30px;
    }

    .home-banner-preview.small {
        width: 100%;
        min-width: 0;
        min-height: 120px;
    }

    .banner-admin-main {
        flex-direction: column;
    }

    .banner-admin-actions {
        width: 100%;
        justify-content: stretch;
    }

    .banner-admin-actions .btn,
    .banner-admin-actions form,
    .banner-admin-actions form .btn {
        width: 100%;
    }
}


.brand-badge.has-image,
.site-logo-preview,
.favicon-preview {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.brand-badge.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.site-logo-preview,
.favicon-preview {
    display: grid;
    place-items: center;
    border-radius: 22px;
    min-height: 120px;
}

.site-logo-preview img {
    width: min(180px, 100%);
    max-height: 74px;
    object-fit: contain;
    display: block;
}

.favicon-preview {
    width: 96px;
    min-height: 96px;
}

.favicon-preview img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}

.settings-meta-help {
    color: var(--text-soft);
    margin-top: -6px;
    font-size: 0.92rem;
}


/* ===== v18 site logo clarity + v17 tournament rounds, payment and media sizing ===== */
.site-header .brand-badge {
    width: 68px;
    height: 68px;
    border-radius: 22px;
}

.site-header .brand-badge.has-image {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    height: 72px;
    padding: 6px;
    border-radius: 20px;
}

.site-header .brand strong {
    font-size: 1.16rem;
}

.site-header .brand-badge.has-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    transform: none;
}

.brand-badge.has-image img {
    object-fit: contain;
    object-position: center;
    padding: 2px;
    transform: none;
}

.team-logo {
    width: 74px;
    height: 74px;
    border-radius: 22px;
}

.player-avatar {
    width: 74px;
    height: 74px;
    border-radius: 24px;
}

.profile-avatar.large {
    width: 112px;
    height: 112px;
    border-radius: 30px;
    font-size: 1.25rem;
}

.team-card .team-logo {
    width: 92px;
    height: 92px;
    margin-top: -48px;
}

.player-card.card-padded .player-avatar {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    margin-bottom: 2px;
}

.player-card.card-padded {
    align-items: flex-start;
}

.team-logo.has-image {
    padding: 2px;
}

.team-logo.has-image img {
    transform: scale(1.22);
}

.player-avatar.has-image img,
.profile-avatar.has-image img {
    object-position: center top;
}

.payment-box {
    border: 1px solid rgba(94, 234, 212, 0.18);
    background: linear-gradient(180deg, rgba(12, 28, 47, 0.95), rgba(9, 20, 35, 0.95));
    border-radius: 18px;
    padding: 16px 18px;
    display: grid;
    gap: 6px;
}

.payment-box.inline-box {
    margin-top: 18px;
}

.payment-number {
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #d7fbff;
}

.helper-text {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.round-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.round-plan-item {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(9, 20, 35, 0.84);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    gap: 6px;
}

.round-plan-item small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.round-plan-item strong {
    font-size: 1rem;
}

.round-plan-item span {
    color: #dbeafe;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.24);
}

@media (max-width: 760px) {
    .site-header .brand-badge {
        width: 56px;
        height: 56px;
    }

    .site-header .brand-badge.has-image {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
        height: 58px;
        padding: 5px;
        border-radius: 18px;
    }

    .team-card .team-logo {
        width: 82px;
        height: 82px;
        margin-top: -42px;
    }

    .player-card.card-padded .player-avatar {
        width: 86px;
        height: 86px;
    }

    .profile-avatar.large {
        width: 92px;
        height: 92px;
    }
}

@media (max-width: 560px) {
    .site-header .brand-badge {
        width: 52px;
        height: 52px;
    }

    .site-header .brand-badge.has-image {
        width: 54px;
        min-width: 54px;
        max-width: 54px;
        height: 54px;
        padding: 4px;
        border-radius: 16px;
    }

    .team-card .team-logo {
        width: 76px;
        height: 76px;
    }

    .player-card.card-padded .player-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-avatar.large {
        width: 84px;
        height: 84px;
        border-radius: 24px;
    }

    .payment-number {
        font-size: 1.02rem;
    }
}


/* v19 square header logo */
