/* Cricket Leaderboard - Custom Styles */

:root {
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --green-up: #198754;
    --red-down: #dc3545;
}

/* General */
body {
    font-size: 1rem;
    background: #f8f9fa;
    min-height: 100vh;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar-brand .bi {
    color: #ffc107;
}

/* Leaderboard */
.leaderboard-table {
    font-size: 1.05rem;
}

.leaderboard-table th {
    background: #212529;
    color: #fff;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.leaderboard-table td {
    vertical-align: middle;
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr {
    transition: transform 0.5s ease, background-color 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background-color: #e8f4f8 !important;
    transform: scale(0.99);
}

/* Rank badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background: #6c757d;
}

.rank-1 { background: var(--gold); color: #333; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rank-2 { background: var(--silver); color: #333; box-shadow: 0 0 8px rgba(192, 192, 192, 0.5); }
.rank-3 { background: var(--bronze); color: #fff; box-shadow: 0 0 8px rgba(205, 127, 50, 0.5); }

/* Position change indicators */
.pos-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 4px;
}

.pos-up { color: var(--green-up); }
.pos-down { color: var(--red-down); }
.pos-same { color: #6c757d; }

/* Team badge */
.team-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

/* Points display */
.points-total {
    font-size: 1.3rem;
    font-weight: 700;
}

.points-breakdown {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Stats cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top 3 podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 2rem 0;
}

.podium-place {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    min-width: 140px;
    transition: transform 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-4px);
}

.podium-1st {
    order: 2;
    min-height: 200px;
    border-top: 4px solid var(--gold);
}

.podium-2nd {
    order: 1;
    min-height: 170px;
    border-top: 4px solid var(--silver);
}

.podium-3rd {
    order: 3;
    min-height: 150px;
    border-top: 4px solid var(--bronze);
}

.podium-rank {
    font-size: 2rem;
    font-weight: 800;
}

.podium-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.podium-points {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Player profile */
.player-header {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    color: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.player-header h1 {
    font-weight: 700;
    margin: 0;
}

.player-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.player-header-identity {
    flex: 1 1 420px;
}

.player-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.player-rank-card {
    min-width: 180px;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    text-align: right;
    backdrop-filter: blur(10px);
}

.player-rank-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.72);
}

.player-rank-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0.25rem;
}

.player-rank-meta {
    margin-top: 0.45rem;
    color: rgba(255,255,255,0.78);
    font-size: 0.88rem;
}

.player-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.player-filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 180px;
}

.player-filter-form .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.player-scope-note {
    margin-top: 0.75rem;
    color: rgba(255,255,255,0.78);
    font-size: 0.92rem;
}

.player-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.4rem;
}

.player-summary-panel {
    padding: 1rem 1rem 0.9rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}

.player-summary-panel-overview {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.12) 0%, rgba(255,255,255,0.08) 100%);
}

.player-summary-panel-batting {
    background: linear-gradient(180deg, rgba(79, 156, 249, 0.16) 0%, rgba(255,255,255,0.08) 100%);
}

.player-summary-panel-bowling {
    background: linear-gradient(180deg, rgba(25, 135, 84, 0.16) 0%, rgba(255,255,255,0.08) 100%);
}

.player-summary-panel-fielding {
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.14) 0%, rgba(255,255,255,0.08) 100%);
}

.player-summary-panel-milestones {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.14) 0%, rgba(255,255,255,0.08) 100%);
    grid-column: 1 / -1;
}

.player-milestone-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.player-milestone-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    min-width: 70px;
    text-align: center;
}

.milestone-badge-value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.milestone-badge-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.72);
    margin-top: 0.25rem;
}

.milestone-best-score   { background: rgba(79, 156, 249, 0.22); border-color: rgba(79, 156, 249, 0.4); }
.milestone-best-bowling { background: rgba(25, 135, 84, 0.22);  border-color: rgba(25, 135, 84, 0.4); }
.milestone-hundreds     { background: rgba(255, 193, 7, 0.28);  border-color: rgba(255, 193, 7, 0.5); }
.milestone-seventyfives { background: rgba(255, 193, 7, 0.18);  border-color: rgba(255, 193, 7, 0.35); }
.milestone-fifties      { background: rgba(255, 193, 7, 0.12);  border-color: rgba(255, 193, 7, 0.25); }
.milestone-thirties     { background: rgba(255, 193, 7, 0.07);  border-color: rgba(255, 193, 7, 0.18); }
.milestone-fivewickets  { background: rgba(220, 53, 69, 0.22);  border-color: rgba(220, 53, 69, 0.4); }
.milestone-threewickets { background: rgba(220, 53, 69, 0.12);  border-color: rgba(220, 53, 69, 0.25); }

.player-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.player-summary-kicker {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.72);
    margin-bottom: 0.3rem;
}

.player-summary-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.player-summary-total {
    text-align: right;
    flex-shrink: 0;
}

.player-summary-total-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.player-summary-total-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.72);
}

.player-summary-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.8rem;
}

.player-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.player-summary-item-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.68);
}

.player-summary-item-value {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.player-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.85rem;
    color: #6c757d;
    font-size: 0.88rem;
}

.player-progress-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
}

.player-progress-legend-swatch {
    display: inline-block;
    flex-shrink: 0;
}

.player-progress-legend-swatch-bar {
    width: 16px;
    height: 10px;
    border-radius: 999px;
    background: #2f80ed;
}

.player-progress-legend-swatch-line {
    width: 18px;
    height: 0;
    border-top: 3px solid #f4b400;
    position: relative;
}

.player-progress-legend-swatch-line::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f4b400;
}

.player-progress-wrap {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.player-progress-chart {
    display: block;
    height: auto;
    min-width: 100%;
}

.player-progress-panel {
    fill: #f8fafc;
    stroke: rgba(20, 33, 61, 0.08);
    stroke-width: 1;
}

.player-progress-grid {
    stroke: rgba(20, 33, 61, 0.1);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.player-progress-grid-zero {
    stroke: rgba(20, 33, 61, 0.2);
    stroke-dasharray: none;
}

.player-progress-line {
    fill: none;
    stroke: #f4b400;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.player-progress-area {
    fill: rgba(244, 180, 0, 0.12);
}

.player-progress-bar {
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.player-progress-bar-positive {
    fill: #2f80ed;
}

.player-progress-bar-negative {
    fill: #dc3545;
}

.player-progress-point {
    fill: #f4b400;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
}

.player-progress-bar:hover,
.player-progress-point:hover {
    opacity: 0.82;
}

.player-progress-axis-label {
    fill: #6c757d;
    font-size: 12px;
    font-weight: 600;
}

.player-progress-section-label {
    fill: #495057;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.player-progress-last-label {
    fill: #b87900;
    font-size: 12px;
    font-weight: 800;
}

.player-progress-note {
    margin-top: 0.85rem;
    color: #6c757d;
    font-size: 0.88rem;
}

.player-performance-table th,
.player-performance-table td {
    vertical-align: middle;
    padding: 0.45rem 0.35rem;
}

.player-performance-table {
    min-width: 1180px;
    font-size: 0.92rem;
}

.player-performance-group-row th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    border-bottom: 0;
    background: #eef2f6 !important;
    color: #495057;
}

.player-performance-label-row th {
    font-size: 0.78rem;
    border-top: 0;
}

.player-performance-table .team-badge {
    font-size: 0.72rem;
    padding: 1px 6px;
}

.player-figure-main {
    font-weight: 700;
    color: #212529;
}

.player-figure-meta {
    font-size: 0.78rem;
    color: #6c757d;
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* Game cards */
.game-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
    margin-bottom: 1rem;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.game-card .game-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.game-card .game-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Public dashboard */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.22), transparent 30%),
        linear-gradient(135deg, #14213d 0%, #1f4068 55%, #0f2d4a 100%);
    color: #fff;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--team-color, transparent);
    z-index: 2;
    border-radius: 24px 24px 0 0;
    transition: background 0.3s ease;
}

.dashboard-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.18;
    pointer-events: none;
}

.dashboard-hero-content {
    position: relative;
    padding: 2rem;
}

.dashboard-eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.72);
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-eyebrow-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-eyebrow-chip-team {
    background: color-mix(in srgb, var(--chip-color) 25%, transparent);
    border-color: color-mix(in srgb, var(--chip-color) 55%, transparent);
    color: var(--chip-color);
    filter: brightness(1.4);
}

.dashboard-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.dashboard-subtitle {
    max-width: 44rem;
    color: rgba(255,255,255,0.82);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.dashboard-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: end;
    margin-bottom: 1rem;
}

.dashboard-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 180px;
    max-width: 260px;
}

.dashboard-filter-form .form-select {
    background: rgba(255,255,255,0.95);
    border: none;
}

.dashboard-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    backdrop-filter: blur(10px);
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-feature-card {
    height: 100%;
    padding: 1.2rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}

.dashboard-feature-card-muted {
    background: rgba(255,255,255,0.1);
}

.dashboard-feature-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.75rem;
}

.dashboard-feature-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.dashboard-feature-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.45rem;
}

.dashboard-feature-metric {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.85rem 0 0.55rem;
}

.dashboard-feature-meta,
.dashboard-scoreline {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.dashboard-latest-date {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.72);
    margin-bottom: 0.3rem;
}

.dashboard-feature-empty {
    color: #6c757d;
    line-height: 1.5;
}

.dashboard-feature-card .dashboard-feature-empty {
    color: rgba(255,255,255,0.72);
}

.dashboard-metric-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.2rem 1rem;
    box-shadow: 0 10px 26px rgba(20, 33, 61, 0.08);
    border: 1px solid rgba(20, 33, 61, 0.06);
    text-align: center;
    height: 100%;
}

.dashboard-metric-icon {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
}

.dashboard-metric-value {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.dashboard-metric-label {
    color: #6c757d;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-section-card {
    border-radius: 20px;
    border: 1px solid rgba(20, 33, 61, 0.08);
}

.dashboard-section-card .card-header {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.dashboard-leader-card {
    height: 100%;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
    border: 1px solid rgba(20, 33, 61, 0.08);
}

.dashboard-leader-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 0.65rem;
}

.dashboard-leader-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.dashboard-leader-card,
.dashboard-result-item,
.dashboard-performance-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-leader-card:hover,
.dashboard-result-item:hover,
.dashboard-performance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(20, 33, 61, 0.08);
    border-color: rgba(13, 110, 253, 0.18);
}

.dashboard-leader-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.dashboard-leader-stat {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0.8rem 0 0.25rem;
    color: #14213d;
}

.dashboard-leader-meta {
    color: #6c757d;
    font-size: 0.92rem;
}

.dashboard-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.dashboard-result-item {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(20, 33, 61, 0.08);
    color: inherit;
    text-decoration: none;
}

.dashboard-result-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.dashboard-result-date {
    font-size: 0.82rem;
    color: #6c757d;
}

.dashboard-result-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.dashboard-result-score {
    color: #495057;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-performance-card {
    display: block;
    height: 100%;
    padding: 1rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
    border: 1px solid rgba(20, 33, 61, 0.08);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(20, 33, 61, 0.05);
}

.dashboard-performance-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.dashboard-performance-name {
    font-weight: 700;
    font-size: 1.02rem;
}

.dashboard-performance-context {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.dashboard-performance-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.dashboard-performance-points {
    text-align: right;
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1;
    color: #0d6efd;
}

.dashboard-performance-points span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c757d;
    margin-top: 0.15rem;
}

.dashboard-performance-summary {
    margin-top: 0.95rem;
    color: #495057;
    font-size: 0.92rem;
    line-height: 1.5;
}

.dashboard-award-card {
    height: 100%;
    padding: 1rem;
    border-radius: 16px;
    background: #fff8e6;
    border: 1px solid rgba(255, 193, 7, 0.22);
    text-align: center;
}

.dashboard-award-card .bi {
    font-size: 1.5rem;
    color: #c58a00;
}

.dashboard-award-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b6b00;
    margin: 0.6rem 0 0.4rem;
}

.dashboard-award-player {
    font-weight: 700;
}

.dashboard-award-value {
    margin-top: 0.35rem;
    color: #6c757d;
    font-size: 0.92rem;
}

.dashboard-standings-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.dashboard-standings-rates {
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-standings-note {
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 600;
}

.leaderboard-dashboard-table {
    min-width: 800px;
    font-size: 0.90rem;
}

#live-leaderboard {
    max-height: 70vh;
    overflow-y: auto;
}

.leaderboard-dashboard-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #000000;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Second header row sticks below first row (~29px tall) */
.leaderboard-dashboard-table thead tr:nth-child(2) th {
    top: 29px;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

.leaderboard-dashboard-table th,
.leaderboard-dashboard-table td {
    padding: 0.35rem 0.25rem;
}

.leaderboard-group-row th {
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 0;
    text-align: center;
}

.leaderboard-subhead-row th {
    font-size: 0.75rem;
    border-top: 0;
}

.leaderboard-group-batting {
    background: #e7f1ff !important;
    color: #174ea6 !important;
}

.leaderboard-group-bowling {
    background: #e8f7ee !important;
    color: #18794e !important;
}

.leaderboard-group-fielding {
    background: #fff4db !important;
    color: #9a6700 !important;
}

.leaderboard-group-extras {
    background: #f2eefe !important;
    color: #6f42c1 !important;
}

.leaderboard-group-total {
    background: #eef2f6 !important;
    color: #495057 !important;
}

.leaderboard-dashboard-table td {
    vertical-align: middle;
}

.leaderboard-dashboard-table .points-total {
    font-size: 1.12rem;
}

.leaderboard-dashboard-table .team-badge {
    font-size: 0.70rem;
    padding: 1px 4px;
}

.leaderboard-dashboard-table .rank-badge {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
}

/* Score entry table */
.score-entry-table {
    min-width: 0;
}

/* Score entry tabs */
.score-entry-tabs { margin-bottom: -1px; }
.score-entry-tabs .nav-link { font-size: 0.85rem; padding: 0.35rem 0.75rem; }

/* Overs consistency warning — shown only on the Bowling tab (toggled by JS) */
.score-overs-warning { display: none; }

/* Column group visibility — hide inactive groups */
#score-table-wrap.scores-show-bat  .score-grp-bowl,
#score-table-wrap.scores-show-bat  .score-grp-field { display: none; }

#score-table-wrap.scores-show-bowl .score-grp-bat,
#score-table-wrap.scores-show-bowl .score-grp-field { display: none; }

#score-table-wrap.scores-show-field .score-grp-bat,
#score-table-wrap.scores-show-field .score-grp-bowl { display: none; }

/* Hide group-label header row when a tab is active */
.scores-show-bat .score-entry-group-row,
.scores-show-bowl .score-entry-group-row,
.scores-show-field .score-entry-group-row { display: none; }

/* With group row hidden, label row must stick at top (was top:29px for the row above) */
.scores-show-bat .score-entry-label-row th,
.scores-show-bowl .score-entry-label-row th,
.scores-show-field .score-entry-label-row th { top: 0; }

.score-entry-table col.score-col-batting {
    background-color: #eef6ff;
}

.score-entry-table col.score-col-bowling {
    background-color: #eefbf3;
}

.score-entry-table col.score-col-fielding {
    background-color: #fff7e8;
}

.score-entry-table col.score-col-misc {
    background-color: #f7f3ff;
}

.score-entry-table th,
.score-entry-table td {
    vertical-align: middle;
    padding: 0.35rem 0.3rem;
}

.score-group-header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding-bottom: 0.15rem;
}

.score-entry-group-row th {
    position: sticky;
    top: 0;
    z-index: 6;
    background-color: #f8f9fa;
}

.score-entry-label-row th {
    position: sticky;
    top: 29px;
    z-index: 7;
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.score-col-player {
    min-width: 120px;
    width: 120px;
}

.score-col-main {
    width: 60px;
}

.score-col-wickets {
    width: 80px;
    min-width: 80px;
}

.score-col-sm {
    width: 52px;
}

.score-col-chk {
    width: 36px;
}

.score-col-pts {
    width: 52px;
}

.score-col-points {
    width: 60px;
}

.score-input {
    width: 60px;
    text-align: center;
    font-weight: 600;
    padding: 0.2rem 0.25rem;
    font-size: 0.9rem;
}

.score-input-sm {
    width: 52px;
    font-size: 0.85rem;
}

.score-input:focus {
    background-color: #fff3cd;
    box-shadow: none;
}

.score-input-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.score-field-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
}

.score-field-message {
    display: block;
    font-size: 0.65rem;
    line-height: 1.15;
    white-space: normal;
}

.score-input-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.score-input-warning {
    border-color: #ffc107;
    background-color: #fff9db;
}

.score-team-select {
    font-size: 0.72rem;
    padding: 0.1rem 1.4rem 0.1rem 0.4rem;
    max-width: 140px;
}

.score-entry-toolbar {
    border-top: 1px solid #edf0f3;
    border-bottom: 1px solid #edf0f3;
    background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.score-entry-team-totals {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.score-entry-team-totals strong {
    color: #0d6efd;
}

.score-entry-row.score-row-active td:first-child {
    border-left: 3px solid #0d6efd;
}

.score-entry-row:hover {
    background-color: #f0f7ff;
}

.score-row-dnb td {
    color: #6c757d;
}

.score-row-dnb td:nth-child(n+2):nth-child(-n+7) {
    background-color: #e9ecef !important;
}

.score-row-dnb .score-input,
.score-row-dnb .form-check-input:not(.dnb-check) {
    opacity: 0.6;
}

.score-entry-totals-row td {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background-color: #f8f9fa;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Admin sidebar */
.admin-sidebar {
    background: #212529;
    min-height: 100vh;
    padding: 1rem 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: #0d6efd;
}

.admin-sidebar .nav-link .bi {
    margin-right: 8px;
    font-size: 1.1rem;
}

.admin-sidebar .sidebar-heading {
    color: #6c757d;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.5rem 0.5rem;
}

/* Flash messages */
.flash-message {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Eurovision animation */
.leaderboard-animate .leaderboard-row {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.points-flash {
    animation: pointsFlash 1s ease;
}

@keyframes pointsFlash {
    0% { background-color: transparent; }
    25% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

/* Autosave status indicator */
#score-autosave-status {
    transition: opacity 0.8s ease;
}

@keyframes score-autosave-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.score-autosave-spin {
    display: inline-block;
    animation: score-autosave-spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-hero-content {
        padding: 1.4rem;
    }

    .dashboard-title {
        font-size: 2.1rem;
    }

    .dashboard-hero-actions,
    .dashboard-hero-pills {
        gap: 0.55rem;
    }

    .dashboard-filter-group {
        min-width: 100%;
        max-width: none;
    }

    .dashboard-performance-header {
        flex-direction: column;
    }

    .dashboard-performance-points {
        text-align: left;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-place {
        order: unset !important;
        width: 100%;
        max-width: 300px;
        min-height: auto !important;
    }

    .stat-card .stat-number {
        font-size: 1.5rem;
    }

    .leaderboard-table {
        font-size: 0.9rem;
    }

    .rank-badge {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .score-entry-row input {
        font-size: 0.85rem;
        padding: 0.25rem;
    }

    .admin-sidebar {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .dashboard-title {
        font-size: 1.8rem;
    }

    .dashboard-metric-value {
        font-size: 1.6rem;
    }

    .dashboard-feature-card,
    .dashboard-leader-card,
    .dashboard-performance-card,
    .dashboard-result-item,
    .dashboard-award-card {
        border-radius: 14px;
    }

    .player-header {
        padding: 1.35rem;
    }

    .player-rank-card {
        width: 100%;
        text-align: left;
    }

    .player-rank-value {
        font-size: 2.35rem;
    }

    .player-summary-grid {
        grid-template-columns: 1fr;
    }

    .player-summary-items {
        grid-template-columns: 1fr 1fr;
    }

    .player-filter-form {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .navbar, .admin-sidebar, .btn, form {
        display: none !important;
    }

    .leaderboard-table th {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .rank-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state .bi {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Table sorting indicators */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:after {
    content: ' ↕';
    opacity: 0.3;
}

.sortable.sort-asc:after {
    content: ' ↑';
    opacity: 1;
}

.sortable.sort-desc:after {
    content: ' ↓';
    opacity: 1;
}

/* Form guide badges */
.form-badge {
    font-size: 0.85rem;
    padding: 0.25em 0.5em;
}

/* POTM star */
.potm-star {
    color: var(--gold);
    font-size: 1.1rem;
}

/* Season awards */
.award-card {
    text-align: center;
    padding: 1rem;
}

.award-card .bi {
    font-size: 2rem;
}

/* POTM checkbox highlight */
.potm-check:checked + label {
    animation: starPulse 0.5s ease;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ========== Interactive Tour ========== */
#tour-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    pointer-events: none;
}

#tour-overlay svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

#tour-tooltip {
    position: absolute;
    z-index: 10001;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 0;
    width: 380px;
    max-width: calc(100vw - 20px);
    display: none;
    animation: tourFadeIn 0.25s ease;
    border: 2px solid #0d6efd;
}

@keyframes tourFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #0d6efd;
    color: #fff;
    border-radius: 10px 10px 0 0;
    font-size: 0.8rem;
}

.tour-tooltip-step {
    font-weight: 600;
    opacity: 0.9;
}

.tour-tooltip-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tour-tooltip-close:hover {
    opacity: 1;
}

.tour-tooltip-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    padding: 14px 16px 4px;
    color: #212529;
}

.tour-tooltip-body {
    padding: 4px 16px 8px;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

.tour-tooltip-body p {
    margin-bottom: 0.5rem;
}

.tour-tooltip-body ul,
.tour-tooltip-body ol {
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.tour-tooltip-body li {
    margin-bottom: 0.2rem;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.tour-tooltip-body kbd {
    background: #212529;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Tour highlight pulse on spotlight */
#tour-spotlight {
    transition: all 0.3s ease;
}

@media (max-width: 576px) {
    #tour-tooltip {
        width: calc(100vw - 20px);
    }
}

/* Help button in sidebar */
.sidebar-help-btn {
    color: #6c757d;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-help-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #ffc107;
}

.sidebar-help-btn .bi {
    margin-right: 8px;
    font-size: 1.1rem;
}
