:root {
    --bg-main: #0d1117;
    --bg-surface: #151b23;
    --bg-surface-alt: #1c2430;
    --border-soft: rgba(255,255,255,0.08);
    --text-muted-custom: #97a3b6;
    --accent: #f4b400;
    --accent-soft: rgba(244, 180, 0, 0.12);
    --success-soft: rgba(25, 135, 84, 0.15);
    --danger-soft: rgba(220, 53, 69, 0.14);
    --info-soft: rgba(13, 202, 240, 0.14);
    --shadow-soft: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

html,
body {
    height: 100%;
    background: var(--bg-main);
}

body {
    margin: 0;
    overflow: hidden;
    color: #f8f9fa;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top right, rgba(244, 180, 0, 0.05), transparent 18%), radial-gradient(circle at bottom left, rgba(13, 202, 240, 0.05), transparent 20%), var(--bg-main);
}

.app-shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-dashboard {
    min-height: 72px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(10px);
}

.brand-badge {
    width: 2.75rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--accent), #ff7b00);
    color: #111;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.dashboard-main {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    flex: 0 0 280px;
    background: linear-gradient(180deg, rgba(21, 27, 35, 0.96), rgba(13, 17, 23, 0.96));
    border-right: 1px solid var(--border-soft);
    overflow-y: auto;
}

    .sidebar .nav-link {
        color: #d6deeb;
        border-radius: 0.9rem;
        padding: 0.8rem 1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.35rem;
    }

        .sidebar .nav-link:hover,
        .sidebar .nav-link.active {
            background: var(--accent-soft);
            color: #fff;
        }

.quick-filter .btn {
    border-radius: 999px;
}

.match-layout {
    flex: 1;
    height: 100%;
    display: grid;
    grid-template-columns: 33% 67%;
    min-width: 0;
    min-height: 0;
}

.left-panel,
.right-panel {
    min-height: 0;
    overflow: hidden;
}

.left-panel {
    border-right: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(21, 27, 35, 0.98), rgba(16, 21, 28, 0.98));
    display: flex;
    flex-direction: column;
}

.right-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel-scroll {
    overflow-y: auto;
    min-height: 0;
}

.card-dashboard {
    background: linear-gradient(180deg, rgba(28, 36, 48, 0.96), rgba(21, 27, 35, 0.96));
    border: 1px solid var(--border-soft);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted-custom);
    font-weight: 700;
}

.text-muted-custom {
    color: var(--text-muted-custom) !important;
}

.match-item {
    border: 1px solid transparent;
    border-radius: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .match-item:hover {
        background: rgba(255,255,255,0.03);
        border-color: rgba(255,255,255,0.06);
    }

    .match-item.active {
        background: var(--accent-soft);
        border-color: rgba(244,180,0,0.28);
    }

.placement-badge {
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
    white-space: nowrap;
}

.ranking-strip .rank-card {
    height: 100%;
    min-height: 180px;
}

.rank-pill {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

.player-card-highlight {
    background: linear-gradient(180deg, rgba(244,180,0,0.14), rgba(244,180,0,0.06));
    border-color: rgba(244,180,0,0.25);
}

.player-header-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    font-size: 1rem;
}

    .player-header-icon.first {
        background: rgba(244,180,0,0.18);
        border-color: rgba(244,180,0,0.35);
        color: #ffd24d;
    }

    .player-header-icon.last {
        background: rgba(220,53,69,0.14);
        border-color: rgba(220,53,69,0.28);
        color: #ff8e9b;
    }

.metric-box {
    border-radius: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1rem;
    height: 100%;
}

.timeline-row {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

    .timeline-row:last-child {
        border-bottom: 0;
    }

.mini-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

/* TEAMS */
.teams-container {
    flex: 1;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.team-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-item:hover {
    background: var(--accent-soft);
    border-color: rgba(244,180,0,0.3);
}

.team-name {
    font-weight: 600;
    font-size: 1.1rem;
}


@media (max-width: 1399.98px) {
    .match-layout {
        grid-template-columns: 36% 64%;
    }
}

@media (max-width: 1199.98px) {
    .match-layout {
        grid-template-columns: 38% 62%;
    }

    .ranking-strip .rank-card {
        min-height: 160px;
    }
}

@media (max-width: 991.98px) {
    body {
        overflow: auto;
    }

    .app-shell,
    .dashboard-main,
    .match-layout,
    .left-panel,
    .right-panel,
    .panel-scroll {
        height: auto;
    }

    .dashboard-main,
    .match-layout {
        display: block;
    }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .left-panel {
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
    }
}
