:root {
    --surface-1: #08130f;
    --surface-2: #101c18;
    --surface-3: rgba(255, 255, 255, 0.06);
    --text-main: #f4f1e8;
    --text-muted: #b6c0b7;
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-heavy: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Sora", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(106, 27, 26, 0.2), transparent 28%),
        linear-gradient(180deg, #050807 0%, var(--surface-1) 36%, #0b1712 100%);
    color: var(--text-main);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../img/splash-domino.svg");
    background-repeat: no-repeat;
    background-position: right -80px bottom -60px;
    background-size: 420px;
    opacity: 0.08;
    pointer-events: none;
    z-index: -1;
}

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

.auth-body,
.admin-body {
    background-color: transparent;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 290px;
    padding: 24px;
    border-right: 1px solid var(--border-soft);
    background: rgba(5, 8, 7, 0.72);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    height: 100vh;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.sidebar-brand {
    margin-bottom: 30px;
}

.brand-mark {
    display: flex;
    gap: 14px;
    align-items: center;
}

.brand-mark img,
.hero-logo,
.brand-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.brand-mark strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: 0.02em;
}

.brand-mark span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: 0.2s ease;
}

.sidebar-link.active,
.sidebar-link:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.45), rgba(212, 175, 55, 0.18));
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 16px;
}

.page-title,
.section-title,
.domino-hero h1,
.score-team h3,
.hero-panel h2 {
    font-family: "Space Grotesk", sans-serif;
}

.page-title {
    font-size: 2rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand-secondary);
    font-size: 0.76rem;
}

.glass-card,
.hero-panel,
.score-team,
.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-heavy);
    border-radius: var(--radius-xl);
}

.glass-card {
    padding: 24px;
}

.hero-panel {
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-card {
    padding: 18px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card span {
    color: var(--text-muted);
}

.stat-card strong {
    font-size: 2rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

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

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.04);
}

.quick-link i,
.seed-note strong {
    color: var(--brand-secondary);
}

.list-stack {
    display: grid;
    gap: 14px;
}

.list-stack.compact {
    gap: 10px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.035);
}

.list-row--link:hover {
    border-color: rgba(212, 175, 55, 0.2);
}

.list-row strong,
.player-cell strong {
    display: block;
}

.list-row small,
.player-cell small {
    color: var(--text-muted);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-weight: 700;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-brand:hover {
    color: #fff;
    filter: brightness(1.08);
}

.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #f4d37d;
    font-size: 0.82rem;
    border: 1px solid rgba(212, 175, 55, 0.18);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.auth-shell__visual,
.auth-shell__form {
    padding: 32px;
    display: grid;
    place-items: center;
}

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

.domino-hero {
    padding: 40px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 28%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-soft);
}

.domino-hero h1 {
    font-size: clamp(2.6rem, 4vw, 4rem);
    margin: 24px 0 10px;
}

.domino-hero p {
    max-width: 520px;
    color: var(--text-muted);
}

.hero-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hero-stat {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.04);
}

.hero-stat strong {
    display: block;
    margin-bottom: 6px;
}

.hero-stat span,
.seed-note span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-card {
    padding: 34px;
}

.seed-note {
    border-top: 1px solid var(--border-soft);
    padding-top: 18px;
    display: grid;
    gap: 4px;
}

.form-control,
.form-select {
    min-height: 48px;
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.07);
    color: #fff;
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-check-label,
.form-label,
.text-secondary {
    color: var(--text-muted) !important;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(255, 255, 255, 0.06);
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-cell img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.switch-card,
.match-side {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
}

.match-side h4 {
    margin-bottom: 12px;
}

.scoreboard-meta {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.score-team {
    padding: 24px;
}

.score-team__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.score-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3.2rem, 6vw, 5rem);
    line-height: 1;
    margin: 16px 0 20px;
}

.score-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.event-timeline {
    display: grid;
    gap: 12px;
    max-height: 520px;
    overflow: auto;
}

.event-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.event-item.is-reversed {
    opacity: 0.45;
}

.brand-preview,
.empty-state {
    display: grid;
    gap: 16px;
    justify-items: start;
}

.empty-state {
    min-height: 420px;
    place-items: center;
    text-align: center;
}

.empty-state img {
    width: min(100%, 220px);
    opacity: 0.88;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter label {
    color: var(--text-muted) !important;
}

.standings-tabs {
    align-items: center;
}

.leaderboard-stack {
    display: grid;
    gap: 14px;
}

.leaderboard-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-card small {
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.leader-rank {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
}

.leaderboard-card.rank-1 .leader-rank {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.12));
    color: #f7de98;
}

.leaderboard-card.rank-2 .leader-rank {
    background: linear-gradient(135deg, rgba(207, 216, 220, 0.28), rgba(207, 216, 220, 0.1));
    color: #e4eef1;
}

.leaderboard-card.rank-3 .leader-rank {
    background: linear-gradient(135deg, rgba(165, 94, 53, 0.3), rgba(165, 94, 53, 0.12));
    color: #f1c39e;
}

.leader-metric {
    text-align: right;
}

.leader-metric strong {
    display: block;
    font-size: 1.6rem;
    font-family: "Space Grotesk", sans-serif;
}

.leader-metric span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.trend-badge.positive {
    background: rgba(15, 81, 50, 0.28);
    color: #8de0b6;
}

.trend-badge.negative {
    background: rgba(106, 27, 26, 0.28);
    color: #ffada7;
}

.page-item.active .page-link {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.page-link {
    background-color: rgba(255, 255, 255, 0.04);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1199.98px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        width: auto;
        height: auto;
        position: static;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .hero-panel,
    .scoreboard-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-shell__visual {
        padding-bottom: 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .glass-card,
    .hero-panel,
    .score-team {
        padding: 20px;
        border-radius: 22px;
    }

    .score-buttons .btn {
        flex: 1 1 calc(50% - 10px);
    }
}
