/* ================================================
   PLAYER PAGE - DASHBOARD REDESIGN
   Consistent with redesign_core + event/index styling
   ================================================ */

/* Match team.php background (index_redesign) */
.dashboard-wrapper,
.main-content-dashboard {
    background: linear-gradient(180deg, #eaf6ff 0%, #dff1ff 45%, #f4fbff 100%);
}

/* Header */
.dashboard-header {
    background:
        linear-gradient(135deg, rgba(10, 22, 40, 0.28) 0%, rgba(15, 39, 68, 0.20) 55%, rgba(10, 22, 40, 0.34) 100%),
        url("../images/Jembatan Barelang.png"),
        linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 45%, var(--blue-primary) 100%);
    background-size: cover, 106%, cover;
    background-position: center, 26% 54%, center;
    background-repeat: no-repeat;
    padding: 72px 50px 96px;
    min-height: 360px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 36%),
        linear-gradient(180deg, rgba(10, 22, 40, 0.18) 0%, rgba(10, 22, 40, 0.30) 100%),
        linear-gradient(110deg, rgba(255, 255, 255, 0) 33%, rgba(255, 255, 255, 0.46) 50%, rgba(255, 255, 255, 0) 67%);
    background-size: auto, auto, 220% 100%;
    background-position: center, center, -160% 0;
    opacity: 1;
    pointer-events: none;
    animation: barelangReveal 4.4s ease-in-out infinite alternate, barelangShimmer 6.2s linear infinite;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.dashboard-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.header-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 2px 10px rgba(10, 22, 40, 0.55);
}

.dashboard-header h1 {
    color: white;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 6px 22px rgba(10, 22, 40, 0.55);
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.93);
    font-size: 14px;
    max-width: 560px;
    line-height: 1.6;
    text-shadow: 0 3px 14px rgba(10, 22, 40, 0.5);
}

.header-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.dashboard-header .header-pill:not(.header-pill-light) {
    background: rgba(10, 22, 40, 0.38);
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
}

.header-pill-light {
    color: var(--navy-dark);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-color: transparent;
}

/* Dashboard Body */
.dashboard-body {
    padding: 0 16px 40px;
    flex: 1;
}

/* ================================================
   FILTER CARD
   ================================================ */
.filter-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow-lg);
    margin-top: -36px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 10;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    isolation: isolate;
}

.filter-card:hover {
    transform: translateY(-3px);
    border-color: #9fcbff;
    box-shadow: 0 16px 34px rgba(30, 64, 175, 0.14);
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 240px;
}

.filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.filter-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-700);
    transition: all var(--transition-normal);
    outline: none;
}

.filter-group input:focus {
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.filter-group input::placeholder {
    color: var(--gray-400);
}

.filter-actions-new {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-actions-new .btn-filter-apply,
.filter-actions-new .btn-filter-reset {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 14px 26px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), filter var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal), background var(--transition-normal);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.filter-actions-new .btn-filter-apply::before,
.filter-actions-new .btn-filter-reset::before {
    content: "";
    position: absolute;
    top: -120%;
    left: -35%;
    width: 42%;
    height: 300%;
    transform: rotate(22deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.filter-actions-new .btn-filter-apply {
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
    color: #3b2200;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.filter-actions-new .btn-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.4), 0 0 22px rgba(250, 204, 21, 0.38);
    filter: saturate(1.05);
}

.filter-actions-new .btn-filter-apply:hover::before {
    opacity: 1;
    animation: filterShine 1.25s ease;
}

.filter-actions-new .btn-filter-reset {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    color: #eff6ff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.filter-actions-new .btn-filter-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34), 0 0 22px rgba(56, 189, 248, 0.32);
    filter: saturate(1.06);
}

.filter-actions-new .btn-filter-reset:hover::before {
    opacity: 1;
    animation: filterShine 1.25s ease;
}

.filter-actions-new .btn-filter-apply:focus-visible,
.filter-actions-new .btn-filter-reset:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.82), 0 0 0 7px rgba(37, 99, 235, 0.2);
}

.filter-actions-new .btn-filter-apply:active,
.filter-actions-new .btn-filter-reset:active {
    transform: translateY(0);
}

.player-detail-actions .btn-filter-reset {
    background: transparent;
    border: 2px solid var(--gray-300);
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--gray-600);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.player-detail-actions .btn-filter-reset:hover {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--gray-50);
}

@keyframes filterShine {
    0% {
        left: -40%;
    }

    100% {
        left: 130%;
    }
}

/* ================================================
   PLAYER DETAIL
   ================================================ */
.player-detail-card {
    background: var(--white);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    margin-top: -40px;
    margin-bottom: 26px;
    position: relative;
    z-index: 9;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    isolation: isolate;
}

.player-detail-card:hover {
    transform: translateY(-4px);
    border-color: var(--blue-primary);
    box-shadow: 0 18px 34px rgba(30, 64, 175, 0.15);
}

.player-detail-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-detail-identity {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-photo-lg {
    width: 140px;
    height: 140px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-photo-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 32px;
}

.player-detail-main h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
}

.player-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.meta-pill-outline {
    background: var(--white-blue);
    color: var(--navy);
    border: 1px solid var(--gray-200);
}

.player-team-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 12px 14px;
}

.team-logo-lg {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    object-fit: contain;
    padding: 6px;
}

.team-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--gray-400);
    letter-spacing: 1px;
    font-weight: 800;
}

.team-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 4px;
}

.player-detail-actions {
    display: flex;
    justify-content: flex-start;
}

.player-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detail-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    isolation: isolate;
}

.detail-item:hover {
    transform: translateY(-3px);
    border-color: var(--blue-primary);
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.12);
}

.detail-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    font-weight: 800;
}

.detail-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.player-skills-section {
    background: linear-gradient(140deg, rgba(219, 234, 254, 0.42) 0%, rgba(239, 246, 255, 0.82) 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.player-skills-toggle {
    display: none;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-primary) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-skills-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(30, 64, 175, 0.2);
}

.player-skills-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.player-skills-toggle-icon {
    transition: transform 0.2s ease;
}

.player-skills-section.open .player-skills-toggle-icon {
    transform: rotate(180deg);
}

.player-skills-content {
    display: block;
}

.player-skills-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.player-skills-head h3 {
    margin: 0;
    font-size: 15px;
    color: var(--navy);
    font-weight: 800;
}

.player-skills-scale {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #bfdbfe;
}

.player-skills-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 25px;
}

.player-skill-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 82px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.player-skill-item:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.player-skill-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.player-skill-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}

.player-skill-name i {
    color: var(--blue-primary);
    font-size: 12px;
}

.player-skill-value {
    font-size: 11px;
    font-weight: 800;
    color: var(--navy);
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.player-skill-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
    margin-top: 2px;
}

.player-skill-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 45%, #60a5fa 100%);
    transition: width 0.32s ease;
}

.player-history-panel {
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: rgba(239, 246, 255, 0.7);
    padding: 12px;
}

.player-history-toggle {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-primary) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    min-height: 44px;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-history-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(30, 64, 175, 0.2);
}

.player-history-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.player-history-toggle-icon {
    transition: transform 0.2s ease;
}

.player-history-panel.open .player-history-toggle-icon {
    transform: rotate(180deg);
}

.player-history-content {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 0 12px;
    border-width: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, transform 0.24s ease, margin-top 0.24s ease, padding 0.24s ease, border-width 0.24s ease;
    will-change: max-height, opacity, transform;
}

.player-history-panel.open .player-history-content {
    margin-top: 12px;
    padding: 12px;
    border-width: 1px;
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* History Table Styles */
.player-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.history-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.history-table thead th {
    background: #f8fafc;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
}

.history-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 13px;
    color: #0f172a;
    vertical-align: top;
}

.history-table .col-no { width: 40px; white-space: nowrap; }
.history-table .col-tanggal { width: 110px; white-space: nowrap; }
.history-table .col-pertandingan { min-width: 260px; }
.history-table .col-event { min-width: 140px; white-space: nowrap; }
.history-table .col-posisi { white-space: nowrap; }
.history-table .col-peran { white-space: nowrap; }
.history-table .col-babak { white-space: nowrap; }
.history-table .col-hasil { width: 60px; white-space: nowrap; }

.player-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.player-history-content .history-table {
    min-width: 980px;
}

/* ================================================
   DATA TABLE
   ================================================ */
.player-table-container {
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    min-width: 0;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    position: relative;
    isolation: isolate;
}

.player-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: inherit;
}

.player-table-container:hover {
    transform: translateY(-3px);
    border-color: var(--blue-primary);
    box-shadow: 0 18px 34px rgba(30, 64, 175, 0.15);
}

.player-table-new {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.player-table-new thead tr {
    background: linear-gradient(90deg, var(--navy) 0%, var(--blue-primary) 100%);
}

.player-table-new th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
}

.player-table-new th:first-child {
    padding-left: 24px;
}

.player-table-new th:last-child {
    padding-right: 24px;
}

.player-table-new td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-600);
    vertical-align: middle;
    transition: all var(--transition-fast);
    word-break: break-word;
}

.player-table-new td:first-child {
    padding-left: 24px;
}

.player-table-new td:last-child {
    padding-right: 24px;
}

.player-table-new tbody tr {
    transition: all var(--transition-fast);
}

.player-table-new tbody tr:hover {
    background: linear-gradient(90deg, var(--white-blue) 0%, var(--white) 100%);
}

.player-table-new tbody tr:hover td {
    color: var(--gray-700);
}

.player-table-new tbody tr:last-child td {
    border-bottom: none;
}

.col-no {
    width: 56px;
    text-align: center;
    color: var(--gray-500);
    font-weight: 700;
}

.col-photo {
    width: 70px;
    text-align: center;
}

.col-center {
    text-align: center;
}

.player-link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 700;
    transition: color var(--transition-fast);
}

.player-link:hover {
    color: var(--blue-primary);
}

.player-photo-sm {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.placeholder-img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    border: 1px dashed var(--gray-200);
}

.col-team {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--navy);
}

.team-logo-small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 2px;
}

.team-logo-placeholder {
    background: var(--gray-100);
    border-style: dashed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.team-logo-lg.team-logo-placeholder {
    font-size: 22px;
}

.team-logo-small.team-logo-placeholder {
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 30px;
    border: 2px dashed #2f2f2f;
    border-radius: 18px;
    background: #fff;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-icon {
    font-size: 42px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

/* Force icon size inside player empty state */
.player-table-new .empty-state .empty-icon,
.player-table-new .empty-state .empty-icon i {
    font-size: 42px;
    color: var(--gray-600);
}

.empty-state h3 {
    color: var(--gray-600);
    font-weight: 700;
    margin: 0 0 8px;
}

.empty-state p {
    color: var(--gray-400);
    font-size: 13px;
    margin: 0;
}

.player-table-new td.no-data {
    text-align: center;
    padding: 16px 24px;
    color: var(--gray-500);
    font-size: 14px;
}

.player-table-new td.no-data .empty-state {
    margin: 0 auto;
    width: 100%;
    max-width: calc(100% - 10px);
}

.player-table-new td.no-data .empty-state,
.player-table-new td.no-data .empty-state h3,
.player-table-new td.no-data .empty-state p {
    text-align: center;
    width: 100%;
}

/* Scrollbar */
.player-table-container::-webkit-scrollbar {
    height: 8px;
}

.player-table-container::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.player-table-container::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 99px;
}

.player-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ================================================
   PAGINATION
   ================================================ */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 20px 24px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    gap: 16px;
    flex-wrap: wrap;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    border: 1px solid var(--gray-100);
    position: relative;
    isolation: isolate;
}

.pagination-wrapper:hover {
    transform: translateY(-2px);
    border-color: var(--blue-primary);
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.12);
}

.pagination-info {
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 600;
}

.pagination-nav {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--white);
    color: var(--navy);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    font-size: 13px;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.pagination-link:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.pagination-link.active {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue-primary) 100%);
    color: white;
    border-color: transparent;
}

.pagination-disabled {
    color: #94a3b8;
    cursor: default;
    background: #f8fafc;
}

/* Decorative hover ring like other public pages */
.filter-card::after,
.player-detail-card::after,
.detail-item::after,
.player-table-container::after,
.pagination-wrapper::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(147, 197, 253, 0.22));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: -1;
}

.filter-card:hover::after,
.player-detail-card:hover::after,
.detail-item:hover::after,
.player-table-container:hover::after,
.pagination-wrapper:hover::after {
    opacity: 1;
}

/* ================================================
   FOOTER
   ================================================ */
.dashboard-footer {
    text-align: center;
    padding: 32px 50px;
    color: var(--gray-500);
    font-size: 13px;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
    background: var(--white);
}

.dashboard-footer p {
    margin: 6px 0;
}

.dashboard-footer a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.dashboard-footer a:hover {
    color: var(--blue-accent);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (min-width: 768px) {
    .dashboard-header h1 {
        font-size: 38px;
        letter-spacing: 2px;
    }

    .dashboard-header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }

    .player-detail-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .player-detail-identity {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

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

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

@media (max-width: 1200px) {
    .dashboard-body {
        padding: 0 30px 40px;
    }

    .dashboard-header {
        padding: 60px 30px 80px;
        background-size: cover, 106%, cover;
        background-position: center, 28% 56%, center;
    }

    .filter-group {
        min-width: 200px;
    }
}

@media (max-width: 992px) {
    .dashboard-header {
        padding: 44px 16px 64px;
        min-height: 360px;
        background-size: cover, 146%, cover;
        background-position: center, 34% 62%, center;
    }

    .player-detail-card {
        margin: -12px 16px 20px;
        padding: 20px;
    }

    .filter-card {
        margin: -20px 16px 20px;
        padding: 22px;
        border-radius: 16px;
    }

    .dashboard-body {
        padding: 0 16px 30px;
    }

    .player-table-new {
        min-width: 1100px;
    }
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

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

    .filter-group input {
        padding: 16px;
        font-size: 15px;
        border-radius: 14px;
    }

    .filter-actions-new {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
        align-items: stretch;
        gap: 8px;
    }

    .filter-actions-new .btn-filter-apply,
    .filter-actions-new .btn-filter-reset {
        width: 100%;
        justify-content: center;
        padding: 14px 12px;
        font-size: 12px;
        min-height: 44px;
    }

    .player-detail-card {
        margin: -10px 16px 20px;
        padding: 18px;
    }

    .player-photo-lg {
        width: 120px;
        height: 120px;
    }

    .player-detail-actions .btn-filter-reset {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

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

    .player-skills-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .player-skills-section {
        padding: 10px;
    }

    .player-skills-toggle {
        display: flex;
        font-size: 12px;
        padding: 11px 12px;
        min-height: 44px;
    }

    .player-skills-content {
        margin-top: 0;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid #dbeafe;
        border-radius: 12px;
        padding: 0 12px;
        border-width: 0;
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, transform 0.24s ease, margin-top 0.24s ease, padding 0.24s ease, border-width 0.24s ease;
        will-change: max-height, opacity, transform;
    }

    .player-skills-section.open .player-skills-content {
        margin-top: 12px;
        padding: 12px;
        border-width: 1px;
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .player-skills-section .player-skills-head h3 {
        display: none;
    }

    .player-skills-head {
        justify-content: flex-end;
    }

    .player-history-panel {
        padding: 10px;
    }

    .player-history-toggle {
        font-size: 12px;
        padding: 11px 12px;
        min-height: 44px;
    }

    .player-skill-item {
        padding: 12px;
        min-height: 74px;
        border-radius: 11px;
    }

    .player-skill-name {
        font-size: 12px;
        line-height: 1.3;
    }

    .player-skill-value {
        min-width: 46px;
        font-size: 10px;
        padding: 3px 7px;
    }

    .player-skill-bar {
        height: 7px;
    }

    .player-table-container {
        background: transparent;
        box-shadow: none;
        border: none;
        overflow: visible;
        border-radius: 0;
    }

    .player-table-new {
        display: block;
        min-width: 0;
    }

    .player-table-new thead {
        display: none;
    }

    .player-table-new tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .player-table-new tr {
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-radius: 18px;
        box-shadow: 0 2px 12px rgba(15, 39, 68, 0.08);
        border: 1px solid var(--gray-200);
        overflow: hidden;
    }

    .player-table-new tr.empty-row {
        background: transparent;
        border: none;
        box-shadow: none;
        align-items: center !important;
        justify-content: center !important;
    }

    .player-table-new tr.empty-row td {
        padding: 12px !important;
        border-bottom: none;
        display: flex !important;
        justify-content: center;
        width: 100% !important;
        box-sizing: border-box;
    }

    .player-table-new tr.empty-row td::before {
        content: none;
    }

    .player-table-new td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--gray-100);
        text-align: left !important;
    }

    .player-table-new td::before {
        content: attr(data-label);
        font-weight: 800;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: var(--gray-500);
        flex: 0 0 120px;
    }

    .player-table-new td:last-child {
        border-bottom: none;
    }

    .player-table-new td.cell-no {
        display: none;
    }

    .player-table-new td.cell-photo {
        order: 1;
        justify-content: flex-start;
    }

    .player-table-new td.cell-photo::before {
        content: 'Player';
    }

    .player-table-new td.cell-photo .player-photo-sm,
    .player-table-new td.cell-photo .placeholder-img {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .player-table-new td.cell-name {
        order: 2;
    }

    .player-table-new td.cell-name .player-link {
        font-size: 15px;
        font-weight: 800;
    }

    .player-table-new td.cell-team {
        order: 3;
    }

    .empty-state {
        padding: 22px 18px;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 18px;
        margin: 0 !important;
        box-sizing: border-box;
        transform: translateX(0);
    }

    .empty-state .empty-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .pagination-link,
    .pagination-disabled {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .filter-card {
        margin: -18px 12px 18px;
        padding: 16px;
        border-radius: 14px;
    }

    .dashboard-body {
        padding: 0 12px 24px;
    }

    .player-detail-card {
        margin: -10px 12px 16px;
        padding: 16px;
    }

    .player-photo-lg {
        width: 100px;
        height: 100px;
    }

    .player-table-new td::before {
        flex: 0 0 100px;
    }

    .pagination-link,
    .pagination-disabled {
        min-width: 40px;
        min-height: 40px;
        padding: 10px;
        font-size: 13px;
    }
}

.dashboard-body.has-player-detail .filter-card {
    margin-top: 0;
}

@keyframes barelangReveal {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.10;
    }
}

@keyframes barelangShimmer {
    0% {
        background-position: center, center, -130% 0;
    }

    100% {
        background-position: center, center, 145% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-header {
        animation: none !important;
        background-size: cover, 106%, cover;
        background-position: center, 26% 54%, center;
    }

    .dashboard-header::before {
        animation: none !important;
        opacity: 0.1;
    }

    .filter-card,
    .player-detail-card,
    .detail-item,
    .player-table-container,
    .pagination-controls {
        transition: none !important;
        transform: none !important;
    }
}
