/* =====================================================
   TACTICO - Team Management Styles
   Player tracking and performance evaluation styling
   ===================================================== */

/* Button Variables - Unified Responsive System */
:root {
    --btn-font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --btn-radius: clamp(6px, 0.6vw + 4px, 12px);
    --btn-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Button Sizes - XS */
    --btn-xs-padding-y: clamp(4px, 0.4vw + 2px, 6px);
    --btn-xs-padding-x: clamp(8px, 0.8vw + 4px, 12px);
    --btn-xs-font: clamp(10px, 0.6vw + 8px, 12px);
    --btn-xs-gap: clamp(4px, 0.3vw + 2px, 6px);

    /* Button Sizes - SM */
    --btn-sm-padding-y: clamp(6px, 0.6vw + 3px, 10px);
    --btn-sm-padding-x: clamp(12px, 1vw + 6px, 18px);
    --btn-sm-font: clamp(11px, 0.7vw + 8px, 13px);
    --btn-sm-gap: clamp(5px, 0.4vw + 3px, 8px);

    /* Button Sizes - MD (Default) */
    --btn-md-padding-y: clamp(8px, 0.8vw + 4px, 14px);
    --btn-md-padding-x: clamp(16px, 1.5vw + 8px, 28px);
    --btn-md-font: clamp(13px, 0.8vw + 9px, 16px);
    --btn-md-gap: clamp(6px, 0.5vw + 4px, 10px);

    /* Button Sizes - LG */
    --btn-lg-padding-y: clamp(12px, 1vw + 6px, 18px);
    --btn-lg-padding-x: clamp(24px, 2vw + 12px, 40px);
    --btn-lg-font: clamp(14px, 0.9vw + 10px, 18px);
    --btn-lg-gap: clamp(8px, 0.6vw + 5px, 12px);

    /* Icon Button Sizes */
    --btn-icon-xs: clamp(28px, 2vw + 20px, 36px);
    --btn-icon-sm: clamp(32px, 2.5vw + 22px, 42px);
    --btn-icon-md: clamp(40px, 3vw + 26px, 52px);
    --btn-icon-lg: clamp(48px, 3.5vw + 30px, 64px);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.hidden {
    display: none !important;
}

/* =====================================================
   PAGE LAYOUT
   ===================================================== */

.team-page {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 54px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.team-header .page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.team-header .header-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    font-family: var(--btn-font);
    font-weight: 500;
    transition: all 0.2s ease;
}

.team-header .header-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.team-header .header-btn:active {
    transform: translateY(0);
}

.team-header .header-btn .btn-icon {
    font-size: 14px;
}

/* Main Content Layout */
.team-main {
    display: grid;
    grid-template-columns: minmax(200px, 240px) 1fr;
    gap: 0;
    height: calc(100vh - 110px); /* Account for header + nav bar on desktop */
    min-height: 500px;
}

/* When player sidebar is visible */
.team-main.sidebar-open {
    grid-template-columns: minmax(200px, 240px) 1fr minmax(280px, 360px);
}

/* =====================================================
   LEFT SIDEBAR - TEAMS LIST
   ===================================================== */

.team-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .sidebar-title {
    margin: 0;
}

.btn-add-team {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 0 12px rgba(0, 212, 170, 0.4),
        0 0 24px rgba(0, 212, 170, 0.2),
        0 3px 10px rgba(0, 0, 0, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(0, 212, 170, 0.5),
            0 0 30px rgba(0, 212, 170, 0.3),
            0 4px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 20px rgba(0, 212, 170, 0.7),
            0 0 40px rgba(0, 212, 170, 0.4),
            0 4px 20px rgba(0, 0, 0, 0.4);
    }
}

.btn-add-team:hover {
    background: linear-gradient(135deg, #00e6b8 0%, #00b8ff 100%);
    transform: scale(1.1);
    box-shadow:
        0 0 25px rgba(0, 212, 170, 0.7),
        0 0 50px rgba(0, 212, 170, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.4);
    animation: none;
}

.btn-add-team:active {
    transform: scale(0.98);
}

.btn-add-team svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0 0 12px 0;
}

/* Create Team Button */
.btn-create-team {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-create-team .btn-icon {
    font-size: 16px;
}

/* Team List */
.teams-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.teams-list::-webkit-scrollbar {
    width: 6px;
}

.teams-list::-webkit-scrollbar-track {
    background: transparent;
}

.teams-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.teams-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.teams-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}

.teams-empty p {
    margin: 0 0 12px 0;
    font-size: 13px;
}

.team-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-item:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.team-item.active {
    border-color: var(--accent);
    background: rgba(0, 212, 170, 0.1);
}

.team-item-icon {
    font-size: 20px;
}

.team-item-info {
    flex: 1;
    min-width: 0;
}

.team-item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-item-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.team-limit-info {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.team-limit-info .limit-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.team-limit-info .limit-badge.pro {
    background: rgba(0, 212, 170, 0.2);
    color: var(--accent);
}

.team-limit-info .limit-badge.free {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.team-limit-info .upgrade-link {
    display: block;
    margin-top: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 11px;
}

.team-limit-info .upgrade-link:hover {
    text-decoration: underline;
}

.team-list-empty .empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.team-list-empty p {
    margin: 0 0 4px 0;
    font-size: 14px;
}

/* Team Card */
.team-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.team-card.active {
    border-color: var(--accent);
    background: rgba(0, 212, 170, 0.1);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.team-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.team-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.team-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   CENTER - TEAM CONTENT
   ===================================================== */

.team-content {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 14px;
}

/* Team View */
.team-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Team Header (inside team view) */
.team-view .team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.team-info h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.team-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.team-actions {
    display: flex;
    gap: 10px;
}

/* View Tabs */
.view-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.view-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-tab:hover {
    background: transparent;
    color: var(--text-primary);
    border-bottom-color: rgba(0, 212, 170, 0.3);
}

.view-tab.active {
    background: transparent;
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.view-tab.active svg {
    stroke: var(--accent);
}

.view-tab svg {
    opacity: 0.7;
    transition: all 0.2s ease;
}

.view-tab:hover svg {
    opacity: 1;
}

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.dashboard-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    border-color: var(--accent-primary);
}

.dashboard-card .card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.dashboard-card .card-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 5px;
}

.dashboard-card .card-icon svg {
    stroke: var(--accent-primary);
    width: 12px;
    height: 12px;
}

.dashboard-card .card-title {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.dashboard-card .card-content {
    min-height: 30px;
}

.dashboard-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dashboard-card .card-link:hover {
    color: var(--accent-secondary);
}

/* Events Card */
.events-card .events-loading {
    font-size: 9px;
    color: var(--text-muted);
    font-style: italic;
}

.events-card .event-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 0;
    border-bottom: 1px solid var(--border-color);
}

.events-card .event-item:last-child {
    border-bottom: none;
}

.events-card .event-type-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.events-card .event-type-dot.training {
    background: #00d4aa;
}

.events-card .event-type-dot.match {
    background: #00a8ff;
}

.events-card .event-type-dot.meeting {
    background: #f39c12;
}

.events-card .event-type-dot.other {
    background: #9b59b6;
}

.events-card .event-info {
    flex: 1;
    min-width: 0;
}

.events-card .event-title {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.events-card .event-date {
    font-size: 8px;
    color: var(--text-muted);
}

.events-card .no-events {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

/* Attendance Card */
.attendance-card .attendance-rate-display {
    text-align: center;
    margin-bottom: 4px;
}

.attendance-card .rate-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
}

.attendance-card .rate-label {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.attendance-card .attendance-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.attendance-card .attendance-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4aa 0%, #00a8ff 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.attendance-card .attendance-breakdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 9px;
}

.attendance-card .breakdown-item {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--text-secondary);
}

.attendance-card .breakdown-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.attendance-card .breakdown-item.present .dot {
    background: #00d4aa;
}

.attendance-card .breakdown-item.absent .dot {
    background: #e74c3c;
}

/* Need Attention Card */
.attention-card .attention-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.attention-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 2px;
}

.attention-loading {
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
    padding: 10px 0;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attention-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.attention-item .player-photo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 9px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

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

.attention-item .attention-info {
    flex: 1;
    min-width: 0;
}

.attention-item .player-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attention-item .attention-reason {
    font-size: 9px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}

.attention-item .attention-reason .weak-attr {
    color: #f59e0b;
    font-weight: 500;
}

.attention-item .rating-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.attention-item .rating-badge.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.no-attention {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 0;
}

.no-attention svg {
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Dashboard Cards Responsive */
@media (max-width: 1200px) {
    .dashboard-card.attention-card {
        grid-column: 1 / -1;
    }

    .attention-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }

    .attention-item {
        flex: 1 1 calc(50% - 5px);
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        padding: 12px;
        gap: 12px;
    }

    .dashboard-card.attention-card {
        grid-column: auto;
    }

    .attention-list {
        flex-direction: column;
    }

    .attention-item {
        flex: none;
    }
}

/* View Content */
.view-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    min-height: 0;
}

.view-content::-webkit-scrollbar {
    width: 8px;
}

.view-content::-webkit-scrollbar-track {
    background: transparent;
}

.view-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.view-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Roster Controls */
.roster-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Roster Table */
.roster-table-container {
    overflow-x: auto;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
}

.roster-table th,
.roster-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.roster-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.roster-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.roster-table tbody tr:hover {
    background: var(--bg-secondary);
}

.roster-table tbody tr.selected {
    background: rgba(0, 212, 170, 0.1);
}

.col-number {
    width: 50px;
}

.col-position {
    width: 100px;
}

.col-rating {
    width: 80px;
}

.col-trend {
    width: 80px;
}

.col-actions {
    width: 60px;
}

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

.player-name-cell .player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #00a8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.player-name-cell img.player-avatar {
    object-fit: cover;
    background: var(--bg-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.player-name-cell .player-name {
    font-weight: 500;
    color: var(--text-primary);
}

.position-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.position-badge.pos-gk {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.position-badge.pos-def {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.position-badge.pos-mid {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.position-badge.pos-fwd {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.rating-badge {
    font-weight: 700;
    font-size: 14px;
}

.rating-badge.rating-excellent {
    color: #2ecc71;
}

.rating-badge.rating-good {
    color: #f39c12;
}

.rating-badge.rating-average {
    color: #e67e22;
}

.rating-badge.rating-poor {
    color: #e74c3c;
}

.trend-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.trend-badge.trend-up {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.trend-badge.trend-down {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--accent);
}

/* Roster Empty */
.roster-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.roster-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.roster-empty p {
    margin: 0;
    font-size: 14px;
}

/* Performance View */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.perf-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.perf-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.avg-chart-container {
    height: 250px;
    margin-bottom: 16px;
}

.top-list,
.improver-list,
.focus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.top-item:hover {
    background: var(--bg-hover);
}

.top-rank {
    font-size: 18px;
}

.top-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.top-rating {
    font-weight: 700;
    color: var(--accent);
}

.no-data {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* Insights View */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.insight-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.insight-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--text-primary);
}

.chart-container {
    height: 300px;
}

.breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-bar .bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.bar-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Roster View */
.roster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.roster-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.roster-title h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.player-count {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.roster-actions {
    display: flex;
    gap: 10px;
}

/* Filter Tabs */
.position-filters {
    display: flex;
    gap: 6px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-btn {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

/* Roster Grid */
.roster-grid {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    align-content: start;
}

.roster-grid::-webkit-scrollbar {
    width: 8px;
}

.roster-grid::-webkit-scrollbar-track {
    background: transparent;
}

.roster-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Player Card */
.player-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.player-card.active {
    border-color: var(--accent);
    background: rgba(0, 212, 170, 0.05);
}

.player-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

/* Player Photo Styles */
.player-avatar.player-photo,
.player-avatar-large.player-photo {
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.player-photo {
    object-fit: cover;
}

/* Photo Upload Styles */
.photo-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.photo-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.photo-preview .preview-placeholder {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.photo-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.photo-upload-btn {
    cursor: pointer;
}

.photo-upload-btn:hover {
    background: var(--bg-hover);
}

.photo-requirements {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.player-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 4px 0;
}

.player-card-number {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 12px 0;
}

.player-card-position {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 auto;
    display: block;
    width: fit-content;
}

.player-card-position.gk {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.player-card-position.def {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.player-card-position.mid {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.player-card-position.fwd {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.player-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.rating-label {
    font-size: 11px;
    color: var(--text-muted);
}

.rating-value {
    font-size: 14px;
    font-weight: 700;
}

.rating-value.high {
    color: #2ecc71;
}

.rating-value.medium {
    color: #f39c12;
}

.rating-value.low {
    color: #e74c3c;
}

/* Empty State */
.roster-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.roster-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.roster-empty h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.roster-empty p {
    margin: 0;
    font-size: 14px;
}

/* No Team Selected */
.no-team-selected {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.no-team-selected .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-team-selected h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary);
}

.no-team-selected p {
    margin: 0;
    font-size: 14px;
}

/* =====================================================
   RIGHT PANEL - PLAYER DETAILS
   ===================================================== */

.player-sidebar,
.player-panel {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 280px;
    max-width: 400px;
    width: 100%;
}

.player-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.player-sidebar-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.btn-close-sidebar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-sidebar:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Player sidebar header actions */
.player-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-action:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.btn-icon-action.btn-danger-icon:hover {
    background: #ff4757;
    border-color: #ff4757;
    color: #fff;
}

.btn-icon-action.btn-share-icon {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 168, 255, 0.2));
    border-color: rgba(0, 212, 170, 0.4);
}

.btn-icon-action.btn-share-icon:hover {
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    border-color: #00d4aa;
    color: #000;
}

/* Scrollable content area for player sidebar */
.player-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.player-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.player-sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.player-sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* =====================================================
   PLAYER PROFILE - Modern Design
   ===================================================== */

.player-profile {
    padding: 0;
    border-bottom: none;
    flex-shrink: 0;
}

/* Player Card */
.player-card {
    position: relative;
    padding: 24px 16px 20px;
    text-align: center;
    overflow: hidden;
}

.player-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(0, 168, 255, 0.15) 100%);
    border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

.player-card-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4aa, #00a8ff);
}

.player-card-content {
    position: relative;
    z-index: 1;
}

.player-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.player-avatar-large {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.35);
    border: 3px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

img.player-avatar-large {
    object-fit: cover;
    background: var(--bg-tertiary);
}

.position-badge-float {
    position: absolute;
    bottom: 0;
    right: -4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.player-name-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.player-info-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-chip .chip-icon {
    font-size: 10px;
    opacity: 0.8;
}

/* Rating Showcase */
.rating-showcase {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.rating-ring-container {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.rating-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.rating-ring-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 8;
}

.rating-ring-progress {
    fill: none;
    stroke: #00d4aa;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.rating-ring-progress.rating-excellent {
    stroke: #00d4aa;
}

.rating-ring-progress.rating-good {
    stroke: #00a8ff;
}

.rating-ring-progress.rating-average {
    stroke: #f39c12;
}

.rating-ring-progress.rating-poor {
    stroke: #e74c3c;
}

.rating-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.rating-number {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    display: block;
}

.rating-max {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.rating-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rating-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.rating-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
}

.rating-trend.trend-up {
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.15);
}

.rating-trend.trend-down {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}

.rating-trend.trend-neutral {
    color: var(--text-muted);
    background: var(--bg-secondary);
}

/* Category Stats Mini Bars */
.category-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.cat-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cat-stat-bar {
    width: 8px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.cat-stat-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 4px;
    transition: height 0.5s ease;
}

.cat-stat-value {
    font-size: 14px;
    font-weight: 700;
}

.cat-stat-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Legacy styles override */
.player-header {
    display: none;
}

.player-details {
    display: none;
}

.player-overall {
    display: none;
    font-weight: 600;
    color: white;
}

.player-details {
    flex: 1;
    min-width: 0;
}

.player-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-details .player-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.player-overall {
    text-align: center;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.player-overall .overall-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.player-overall .overall-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   CHART SECTIONS - Modern Design
   ===================================================== */

.player-radar-container,
.player-progress-container {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.player-radar-container h4,
.player-progress-container h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-radar-container h4::before {
    content: '📊';
    font-size: 14px;
}

.player-progress-container h4::before {
    content: '📈';
    font-size: 14px;
}

.player-radar-container canvas,
.player-progress-container canvas {
    max-height: 180px;
    width: 100% !important;
    height: auto !important;
}

/* =====================================================
   PLAYER ACTIONS - Modern Design
   ===================================================== */

.player-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary));
    flex-shrink: 0;
    margin-top: auto;
}

.btn-block {
    width: 100%;
}

.panel-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.panel-placeholder .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.panel-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* Player Profile Header */
.player-profile-header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.profile-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.profile-position {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.profile-position.gk {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.profile-position.def {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.profile-position.mid {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.profile-position.fwd {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.profile-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.panel-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.panel-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Panel Content */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Overall Rating */
.overall-rating {
    text-align: center;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.overall-rating .rating-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.overall-rating .rating-number.high {
    color: #2ecc71;
}

.overall-rating .rating-number.medium {
    color: #f39c12;
}

.overall-rating .rating-number.low {
    color: #e74c3c;
}

.overall-rating .rating-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radar Chart Container */
.chart-container {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    text-align: center;
}

.radar-chart-wrapper {
    position: relative;
    height: 250px;
}

/* Category Breakdown */
.category-breakdown {
    margin-bottom: 20px;
}

.category-item {
    margin-bottom: 12px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.category-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.category-score {
    font-size: 13px;
    font-weight: 600;
}

.category-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Insights Section */
.insights-section {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.insights-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =====================================================
   PLAYER INSIGHTS - Modern Design
   ===================================================== */

.player-insights {
    padding: 0;
    border-bottom: none;
}

.insights-empty {
    text-align: center;
    padding: 30px 16px;
}

.insights-empty-icon {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.insights-empty p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.insight-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.insight-section.strengths {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.03), transparent);
}

.insight-section.focus-areas {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.03), transparent);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.insight-header .insight-icon {
    font-size: 18px;
}

.insight-header h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.insight-item:hover {
    border-color: var(--text-muted);
    transform: translateX(4px);
}

.insight-item:last-child {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.insight-rank {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.insight-item.strength .insight-rank {
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
}

.insight-item.focus .insight-rank {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.insight-content {
    flex: 1;
    min-width: 0;
}

.insight-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.insight-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.insight-value {
    font-size: 14px;
    font-weight: 700;
}

.insight-item.strength .insight-value {
    color: #00d4aa;
}

.insight-item.focus .insight-value {
    color: #f39c12;
}

.insight-bar {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.insight-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.insight-bar-fill.strength {
    background: linear-gradient(90deg, #00d4aa, #00e6b8);
}

.insight-bar-fill.focus {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.insight-category {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.8;
}

/* Legacy insight styles - keep for compatibility */
.insight-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.insight-text strong {
    color: var(--text-primary);
}

/* Progress Tab */
.progress-chart-wrapper {
    position: relative;
    height: 200px;
    margin-bottom: 20px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.progress-stat {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.progress-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.progress-stat-value.positive {
    color: #2ecc71;
}

.progress-stat-value.negative {
    color: #e74c3c;
}

.progress-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* History Tab */
.evaluation-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eval-history-item {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eval-history-item:hover {
    background: var(--bg-hover);
}

.eval-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.eval-history-date {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.eval-history-score {
    font-size: 14px;
    font-weight: 700;
}

.eval-history-notes {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No Evaluations */
.no-evaluations {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-evaluations .empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-evaluations p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

/* Info Tab */
.player-info-section {
    margin-bottom: 20px;
}

.info-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 0 0 12px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.info-item {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
}

.info-item.full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-word;
}

/* =====================================================
   MODALS
   ===================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* Hide modal with .hidden class (used by JS) */
.modal-overlay.hidden {
    display: none !important;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-sm {
    max-width: 400px;
}

.modal-md {
    max-width: 500px;
}

.modal-lg {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-toggle {
    font-size: 13px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-toggle input[type="checkbox"] {
    width: auto;
}

/* All inputs in modals */
.modal input[type="text"],
.modal input[type="email"],
.modal input[type="tel"],
.modal input[type="number"],
.modal input[type="date"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.modal textarea {
    resize: vertical;
    min-height: 80px;
}

.modal select {
    cursor: pointer;
}

.modal-large {
    max-width: 700px;
}

/* Baseline Evaluation Form */
.baseline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.baseline-category h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
}

.baseline-attrs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.baseline-attr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.baseline-attr label {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.baseline-attr input {
    width: 60px;
    text-align: center;
}

/* Evaluation Categories Grid */
.eval-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.eval-category {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
}

.eval-category h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
}

.eval-attrs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eval-attr {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eval-attr label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-input input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: var(--bg-secondary);
    border-radius: 3px;
    border: none;
    padding: 0;
}

.rating-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.rating-value {
    width: 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}

.eval-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.eval-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.eval-player-header .player-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #00a8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.eval-player-header strong {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
}

.eval-player-header span {
    font-size: 13px;
    color: var(--text-muted);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent);
}

/* Evaluation Modal */
.eval-section {
    margin-bottom: 24px;
}

.eval-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.eval-section-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.eval-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.eval-attributes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eval-attribute {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attr-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.attr-slider {
    flex: 2;
    height: 6px;
    -webkit-appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
}

.attr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.attr-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg-secondary);
}

.attr-value {
    width: 32px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* =====================================================
   SHARE MODAL
   ===================================================== */

.share-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.share-player-info .player-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #00a8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    border-radius: 50%;
}

.share-player-info .player-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.share-player-info strong {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
}

.share-player-info span {
    font-size: 13px;
    color: var(--text-muted);
}

.share-info-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
}

.share-info-note svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.share-info-note p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.share-options {
    margin-bottom: 24px;
}

.share-options-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px 0;
}

.share-option-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-option-card {
    display: block;
    cursor: pointer;
}

.share-option-card input {
    display: none;
}

.share-card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.share-option-card:hover .share-card-content {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.share-option-card input:checked + .share-card-content {
    border-color: var(--accent);
    background: rgba(0, 212, 170, 0.08);
}

.share-card-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.share-card-text {
    flex: 1;
}

.share-card-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.share-card-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.share-link-section {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 16px;
}

.share-link-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-link-box {
    display: flex;
    gap: 8px;
}

.share-link-box input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'Space Mono', monospace;
}

.share-link-box input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-copy.copied {
    background: #22c55e !important;
}

.share-link-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.share-link-note svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Share Button in Sidebar */
.btn-share-icon {
    color: var(--accent) !important;
}

.btn-share-icon:hover {
    background: rgba(0, 212, 170, 0.15) !important;
}

/* =====================================================
   BULK SHARE FEATURE
   ===================================================== */

/* Checkbox column */
.col-checkbox {
    width: 40px;
    text-align: center;
}

.col-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.roster-table tbody td.cell-checkbox {
    text-align: center;
}

.roster-table tbody td.cell-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(0, 168, 255, 0.15) 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 10px;
    margin-bottom: 16px;
    animation: slideDown 0.2s ease;
}

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

.bulk-actions-bar.hidden {
    display: none;
}

.bulk-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.bulk-info span {
    font-weight: 700;
    color: var(--accent);
}

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

/* Bulk Share Modal */
.bulk-share-info {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 20px;
}

.bulk-share-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.bulk-share-progress {
    margin-bottom: 20px;
}

.bulk-share-progress.hidden {
    display: none;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #00a8ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* Bulk Share List */
.bulk-share-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.bulk-share-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.bulk-share-item .player-avatar {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.bulk-share-item .player-info {
    flex: 1;
    min-width: 0;
}

.bulk-share-item .player-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.bulk-share-item .player-phone {
    font-size: 12px;
    color: var(--text-muted);
}

.bulk-share-item .player-phone.no-phone {
    color: #f97316;
}

.bulk-share-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.bulk-share-item .share-link-input {
    width: 140px;
    padding: 8px 10px;
    font-size: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #25D366;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-1px);
}

.btn-whatsapp:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-whatsapp svg {
    width: 16px;
    height: 16px;
}

.btn-copy-sm {
    padding: 8px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-sm:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-copy-sm.copied {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.bulk-share-item.link-generated {
    border-color: rgba(0, 212, 170, 0.3);
    background: rgba(0, 212, 170, 0.05);
}

.bulk-share-item .status-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.bulk-share-item .status-badge.pending {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.bulk-share-item .status-badge.ready {
    background: rgba(0, 212, 170, 0.2);
    color: var(--accent);
}

/* =====================================================
   DESKTOP FULL PLAYER VIEW
   ===================================================== */

.player-fullview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 100;
    overflow-y: auto;
}

.player-fullview-overlay.hidden {
    display: none;
}

.player-fullview {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px 40px;
}

.player-fullview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.btn-back-to-roster {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-back-to-roster:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.player-fullview-actions {
    display: flex;
    gap: 10px;
}

.player-fullview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.player-fullview-left,
.player-fullview-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Full Profile Card */
.player-profile-full {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.player-profile-full .player-card {
    background: none;
    border: none;
    padding: 0;
}

.player-profile-full .player-avatar-large {
    width: 120px;
    height: 120px;
    font-size: 36px;
}

.player-profile-full .player-name-title {
    font-size: 28px;
}

.player-profile-full .rating-showcase {
    margin-top: 24px;
}

.player-profile-full .rating-ring-container {
    width: 140px;
    height: 140px;
}

.player-profile-full .rating-ring {
    width: 140px;
    height: 140px;
}

.player-profile-full .rating-ring-value .rating-number {
    font-size: 42px;
}

/* Full Radar */
.player-radar-full {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.player-radar-full h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.player-radar-full canvas {
    max-height: 300px;
}

/* Full Insights */
.player-insights-full {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

/* Full Progress */
.player-progress-full {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.player-progress-full h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.player-progress-full canvas {
    max-height: 280px;
}

/* Skills Breakdown */
.player-skills-breakdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.skills-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.skill-category-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
}

.skill-category-card h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-category-card .skill-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-item-name {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
}

.skill-item-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-item-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.skill-item-value {
    width: 28px;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

/* Full Recommendations */
.player-recommendations-full {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.player-recommendations-full h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.recommendations-list-full {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Eval Actions */
.player-eval-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.player-eval-actions .btn-lg {
    padding: 14px 20px;
    font-size: 15px;
}

/* Hide fullview on mobile, show sidebar instead */
@media (max-width: 900px) {
    .player-fullview-overlay {
        display: none !important;
    }
}

/* On desktop, we'll hide sidebar and use fullview */
@media (min-width: 901px) {
    .team-main.fullview-open .player-sidebar {
        display: none !important;
    }
}

/* =====================================================
   SUBSCRIPTION GATE MODAL
   ===================================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.auth-modal-overlay.active,
#teamGateModal {
    display: flex;
}

#teamGateModal {
    display: none;
}

.auth-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.auth-modal-header {
    padding: 40px 30px 20px;
    text-align: center;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.auth-modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--text-primary);
}

.auth-modal-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-modal-body {
    padding: 0 30px 30px;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.auth-btn.google {
    background: white;
    border: 1px solid #ddd;
    color: #333;
}

.auth-btn.google:hover {
    background: #f5f5f5;
}

/* Access Blocked State */
body.access-blocked .team-main {
    filter: blur(4px);
    pointer-events: none;
}

/* =====================================================
   HEADER USER INFO
   ===================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

.plan-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.plan-badge.pro {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: white;
}

.plan-badge.trial {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-profile {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.btn-profile:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.btn-profile svg {
    width: 20px;
    height: 20px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1400px) {
    .team-main.sidebar-open {
        grid-template-columns: minmax(180px, 220px) 1fr minmax(260px, 320px);
    }

    .player-radar-container canvas,
    .player-progress-container canvas {
        max-height: 160px;
    }
}

@media (max-width: 1200px) {
    .team-main {
        grid-template-columns: minmax(180px, 220px) 1fr;
    }

    .team-main.sidebar-open {
        grid-template-columns: minmax(180px, 200px) 1fr minmax(250px, 300px);
    }

    .view-tabs {
        padding: 10px 16px;
    }

    .view-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .player-avatar-large {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 16px;
    }

    .player-overall .overall-number {
        font-size: 28px;
    }
}

@media (max-width: 1024px) {
    .team-main {
        grid-template-columns: minmax(160px, 200px) 1fr;
    }

    .team-main.sidebar-open {
        grid-template-columns: 1fr;
    }

    /* Player sidebar becomes a slide-over panel on medium screens */
    .team-main.sidebar-open .player-sidebar {
        position: fixed;
        top: 64px;
        right: 0;
        bottom: 0;
        width: 340px;
        max-width: 90vw;
        z-index: 100;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .view-content {
        padding: 16px;
    }

    .roster-controls {
        flex-wrap: wrap;
    }

    .search-box {
        flex: 1 1 200px;
    }

    .filter-select {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    /* Header and nav bar styles handled by mobile.css */

    /* ===== MAIN LAYOUT ===== */
    .team-main {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* ===== TEAMS SIDEBAR - Compact horizontal strip ===== */
    .team-sidebar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        min-height: 50px !important;
        max-height: none !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 12px !important;
        gap: 10px !important;
        overflow-x: auto;
        overflow-y: visible;
        background: var(--bg-secondary);
        flex-shrink: 0 !important;
    }

    .team-sidebar .sidebar-header {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 0 !important;
        border-bottom: none !important;
        flex-shrink: 0 !important;
    }

    .team-sidebar .sidebar-title {
        font-size: 11px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    .team-sidebar .btn-add-team {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 4px !important;
        animation: none !important;
        box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3) !important;
    }

    .team-sidebar .btn-add-team svg {
        width: 14px !important;
        height: 14px !important;
    }

    .team-sidebar .teams-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        overflow-x: auto !important;
        padding: 4px 0 !important;
        flex: 1 !important;
        -webkit-overflow-scrolling: touch;
    }

    .team-sidebar .team-item {
        flex-shrink: 0 !important;
        min-width: auto !important;
        padding: 8px 12px !important;
        gap: 6px !important;
        border-radius: 6px !important;
    }

    .team-sidebar .team-item-icon {
        font-size: 16px !important;
    }

    .team-sidebar .team-item-name {
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .team-sidebar .team-item-meta {
        font-size: 10px !important;
    }

    /* Hide sidebar footer on mobile */
    .team-sidebar .sidebar-footer {
        display: none !important;
    }

    /* ===== TEAM CONTENT ===== */
    .team-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        min-height: 0 !important;
    }

    /* Team view is the main scroll container on mobile */
    .team-page .team-view {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 0 !important;
    }

    /* Dashboard cards on mobile */
    .team-page .dashboard-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        flex-shrink: 0 !important;
    }

    .team-page .dashboard-card {
        padding: 12px !important;
    }

    .team-page .dashboard-card .card-header {
        margin-bottom: 8px !important;
    }

    .team-page .dashboard-card .card-icon {
        width: 32px !important;
        height: 32px !important;
    }

    .team-page .dashboard-card .card-title {
        font-size: 13px !important;
    }

    .team-page .quick-actions {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .team-page .quick-action-btn {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
        padding: 10px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }

    /* View content flows naturally, parent team-view scrolls */
    .team-page .view-content {
        flex: 0 0 auto !important;
        min-height: auto !important;
        padding: 12px !important;
        overflow: visible !important;
        padding-bottom: 100px !important;
    }

    /* Empty state */
    .empty-state {
        padding: 30px 20px !important;
    }

    .empty-state .empty-icon {
        font-size: 50px !important;
    }

    .empty-state h2 {
        font-size: 20px !important;
    }

    .empty-state p {
        font-size: 13px !important;
    }

    /* ===== TEAM VIEW HEADER WITH BUTTONS ===== */
    .team-page .team-view .team-header,
    .team-page #teamView .team-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 12px 16px !important;
        border-bottom: 1px solid var(--border-color) !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    .team-page .team-view .team-info {
        width: 100% !important;
        display: block !important;
    }

    .team-page .team-view .team-name,
    .team-page .team-view .team-info h2,
    .team-page .team-view h2.team-name {
        font-size: 20px !important;
        font-weight: 600 !important;
        margin: 0 0 4px 0 !important;
        text-decoration: none !important;
        display: block !important;
    }

    .team-page .team-view .team-meta,
    .team-page .team-view span.team-meta {
        font-size: 13px !important;
        color: var(--text-muted) !important;
        text-decoration: none !important;
        display: block !important;
        border: none !important;
    }

    /* FORCE: Show team action buttons using ID selectors for max specificity */
    .team-page .team-view .team-actions,
    .team-page #teamView .team-actions {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 8px !important;
        height: auto !important;
        min-height: 44px !important;
        flex-shrink: 0 !important;
    }

    /* Target buttons by ID for maximum specificity */
    #editTeamBtn,
    #addPlayerBtn,
    .team-page .team-view .team-actions .btn,
    .team-page .team-view .team-actions button {
        flex: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 40px !important;
        height: auto !important;
    }

    .team-page .team-view .team-actions .btn svg,
    #editTeamBtn svg,
    #addPlayerBtn svg {
        width: 14px !important;
        height: 14px !important;
        display: inline-block !important;
    }

    /* View tabs */
    .team-page .view-tabs {
        padding: 8px 12px !important;
        gap: 4px !important;
        flex-wrap: wrap !important;
    }

    .team-page .view-tab {
        padding: 8px 12px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }

    .team-page .view-tab svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Roster controls - FIX THE BIG SEARCH BOX */
    .team-page .roster-controls {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        padding: 0 !important;
    }

    .team-page .search-box {
        flex: 1 1 60% !important;
        min-width: 150px !important;
        height: auto !important;
        max-height: 44px !important;
        padding: 10px 12px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .team-page .search-box input {
        font-size: 13px !important;
        height: auto !important;
        flex: 1 !important;
    }

    .team-page .filter-select {
        flex: 0 1 35% !important;
        min-width: 100px !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    /* Roster table */
    .team-page .roster-table-container {
        overflow-x: auto !important;
    }

    .team-page .roster-table th,
    .team-page .roster-table td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    .team-page .col-trend,
    .team-page .col-actions {
        display: none !important;
    }

    .team-page .col-rating {
        min-width: 50px !important;
    }

    /* Player sidebar - full screen overlay on mobile */
    .player-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        z-index: 1000 !important;
        background: var(--bg-secondary) !important;
    }

    .team-main.sidebar-open {
        grid-template-columns: 1fr;
    }

    .player-sidebar-header {
        padding: clamp(12px, 3vw, 16px);
        position: sticky;
        top: 0;
        background: var(--bg-secondary);
        z-index: 10;
    }

    .player-sidebar-content {
        padding: clamp(8px, 2vw, 12px);
        padding-bottom: 100px;
    }

    .player-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: clamp(10px, 2.5vw, 16px);
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        display: flex;
        gap: clamp(8px, 2vw, 12px);
    }

    .player-actions .btn {
        padding: clamp(10px, 2.5vw, 14px);
        font-size: clamp(12px, 3vw, 14px);
    }

    /* Performance grid */
    .performance-grid {
        grid-template-columns: 1fr;
        gap: clamp(12px, 3vw, 16px);
        padding: clamp(12px, 3vw, 16px);
    }

    .perf-card {
        padding: clamp(12px, 3vw, 16px);
    }

    .perf-card h3 {
        font-size: clamp(14px, 3.5vw, 16px);
    }

    /* Insights grid */
    .insights-grid {
        grid-template-columns: 1fr;
        gap: clamp(12px, 3vw, 16px);
        padding: clamp(12px, 3vw, 16px);
    }

    .insight-card {
        padding: clamp(12px, 3vw, 16px);
    }
}

@media (max-width: 480px) {
    /* Extra compact for very small screens */
    /* Logo/brand styling handled by mobile.css */

    /* Even more compact teams strip */
    .team-sidebar {
        padding: 6px 8px !important;
        gap: 6px;
    }

    .team-sidebar .sidebar-title {
        font-size: 9px;
    }

    .team-sidebar .btn-add-team {
        width: 22px;
        height: 22px;
    }

    .team-sidebar .team-item {
        padding: 5px 8px;
    }

    .team-sidebar .team-item-name {
        font-size: 10px;
    }

    /* View tabs - icons only */
    .view-tab span:not(.view-tab svg):not(:empty) {
        display: none;
    }

    .view-tab {
        padding: 10px 14px;
    }

    .view-tab svg {
        width: 18px;
        height: 18px;
    }

    /* Team actions - stack buttons */
    .team-actions {
        flex-wrap: wrap;
    }

    .team-actions .btn {
        font-size: 10px;
        padding: 8px 10px;
    }

    /* Roster */
    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        padding: 8px;
        gap: 8px;
    }

    .player-card {
        padding: 10px;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    /* Player sidebar */
    .player-sidebar-header {
        padding: 10px 12px;
    }

    .player-sidebar-header h3 {
        font-size: 14px;
    }

    .player-profile {
        padding: 12px;
    }

    .player-radar-container,
    .player-progress-container {
        padding: 12px;
    }

    .player-actions .btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

/* Base Button - Compact */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--btn-font);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    user-select: none;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    color: #ffffff;
    border: none;
    box-shadow:
        0 0 12px rgba(0, 212, 170, 0.4),
        0 0 24px rgba(0, 212, 170, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
    animation: btn-glow 2s ease-in-out infinite;
}

@keyframes btn-glow {
    0%, 100% {
        box-shadow:
            0 0 12px rgba(0, 212, 170, 0.4),
            0 0 24px rgba(0, 212, 170, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 18px rgba(0, 212, 170, 0.6),
            0 0 36px rgba(0, 212, 170, 0.3),
            0 4px 16px rgba(0, 0, 0, 0.4);
    }
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00e6b8 0%, #00b8ff 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 0 20px rgba(0, 212, 170, 0.6),
        0 0 40px rgba(0, 212, 170, 0.3),
        0 6px 20px rgba(0, 0, 0, 0.4);
    animation: none;
}

.btn-primary:active {
    transform: translateY(0) scale(1);
}

.btn-primary svg {
    stroke: #ffffff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.5);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Size Variants - Compact */
.btn-xs {
    padding: 4px 8px;
    font-size: 10px;
    gap: 4px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    gap: 5px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
    gap: 8px;
}

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

.mt-2 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

/* =====================================================
   EVALUATION HISTORY MODAL - Modern Pro Design
   ===================================================== */

/* Player Header Card */
.history-player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 168, 255, 0.1) 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 170, 0.2);
    position: relative;
    overflow: hidden;
}

.history-player-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4aa, #00a8ff);
}

.history-player-header .player-avatar {
    width: 56px;
    height: 56px;
    font-size: 18px;
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.history-player-header .player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-player-header .player-info strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.history-player-header .player-info span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.history-player-header .eval-count {
    font-size: 12px;
    font-weight: 600;
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.15);
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

/* Timeline List */
.history-list {
    max-height: 450px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 24px;
}

/* Timeline Line */
.history-list::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(180deg, #00d4aa, #00a8ff, var(--border-color));
    border-radius: 1px;
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.history-empty p {
    margin-bottom: 20px;
    font-size: 15px;
}

/* Individual History Card */
.history-item {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 16px;
    margin-left: 8px;
}

/* Timeline Dot */
.history-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: rgba(0, 212, 170, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.history-item:hover::before {
    border-color: #00d4aa;
    background: #00d4aa;
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

.history-item.latest {
    border-color: #00d4aa;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), rgba(0, 168, 255, 0.08));
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.15);
}

.history-item.latest::before {
    background: #00d4aa;
    border-color: #00d4aa;
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.6);
    width: 14px;
    height: 14px;
    left: -29px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.latest-badge {
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
}

.date-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.eval-type-badge {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: capitalize;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.history-overall {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-overall .overall-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.eval-change {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.eval-change.trend-up {
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.15);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.eval-change.trend-up::before {
    content: '↑';
    font-size: 12px;
}

.eval-change.trend-down {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.eval-change.trend-down::before {
    content: '↓';
    font-size: 12px;
}

/* Category Grid */
.history-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.history-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.history-cat:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.history-cat .cat-name {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.history-cat .cat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Notes Section */
.history-notes {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #00d4aa;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.5;
}

.history-notes::before {
    content: '"';
    font-size: 24px;
    color: #00d4aa;
    opacity: 0.5;
    margin-right: 4px;
    line-height: 0;
    vertical-align: middle;
}

/* Scrollbar */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .history-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-player-header {
        flex-direction: column;
        text-align: center;
    }

    .history-player-header .player-info {
        align-items: center;
    }
}

/* =====================================================
   TOP IMPROVERS
   ===================================================== */

.improver-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.improver-item:hover {
    background: var(--bg-tertiary);
}

.improver-rank {
    font-size: 16px;
    flex-shrink: 0;
}

.improver-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.improver-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.improver-detail {
    font-size: 11px;
    color: var(--text-muted);
}

.improver-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.improvement-badge {
    font-size: 13px;
    font-weight: 600;
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.improver-range {
    font-size: 10px;
    color: var(--text-muted);
}

/* =====================================================
   RECENT EVALUATIONS
   ===================================================== */

.recent-eval-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.recent-eval-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.recent-eval-avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
}

.recent-eval-info {
    flex: 1;
    min-width: 0;
}

.recent-eval-player {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.recent-eval-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.recent-eval-rating {
    font-size: 14px;
    font-weight: 600;
}

.recent-eval-change {
    font-size: 11px;
    margin-left: 4px;
}

.recent-eval-change.positive {
    color: #00d4aa;
}

.recent-eval-change.negative {
    color: #e74c3c;
}

/* =====================================================
   DRILL RECOMMENDATIONS
   ===================================================== */

.player-recommendations {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.player-recommendations h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(13px, 0.8vw + 9px, 15px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.player-recommendations h4 svg {
    color: #00d4aa;
}

.recommendations-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recommendation-card:hover {
    background: rgba(0, 212, 170, 0.08);
    border-color: rgba(0, 212, 170, 0.3);
    transform: translateX(4px);
}

.recommendation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.recommendation-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.recommendation-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
    white-space: nowrap;
}

.recommendation-badge.difficulty-beginner {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.recommendation-badge.difficulty-intermediate {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.recommendation-badge.difficulty-advanced {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.recommendation-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.recommendation-skill {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
}

.recommendation-skill.primary {
    color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
}

.recommendations-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 12px;
}

.recommendations-empty svg {
    display: block;
    margin: 0 auto 8px;
    opacity: 0.5;
}

.btn-view-all-drills {
    margin-top: 12px;
    font-size: 12px;
}

.recommendations-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* =====================================================
   ATTENDANCE BADGES (Feature 1)
   ===================================================== */

.col-attendance {
    width: 80px;
    text-align: center;
}

.attendance-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.attendance-badge.attendance-good {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.attendance-badge.attendance-fair {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.attendance-badge.attendance-poor {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.attendance-badge.attendance-none {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

/* Attendance chip for player sidebar */
.attendance-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.attendance-chip .chip-icon {
    font-size: 10px;
}

.attendance-chip.attendance-good {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.attendance-chip.attendance-fair {
    background: rgba(243, 156, 18, 0.15);
    border-color: rgba(243, 156, 18, 0.3);
    color: #f39c12;
}

.attendance-chip.attendance-poor {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

@media (max-width: 768px) {
    .col-attendance {
        width: 55px !important;
        padding: 8px 4px !important;
    }

    .attendance-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 32px;
    }
}

/* =====================================================
   TEAM COMPARISON (Feature 3)
   ===================================================== */

.modal-xlarge {
    max-width: 900px;
    width: 95%;
}

.comparison-selector h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.team-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.team-select-item {
    padding: 14px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-select-item:hover {
    border-color: rgba(0, 212, 170, 0.5);
    background: var(--bg-hover);
}

.team-select-item.selected {
    border-color: var(--accent);
    background: rgba(0, 212, 170, 0.1);
}

.team-select-item .team-select-icon {
    font-size: 20px;
}

.team-select-item .team-select-info {
    flex: 1;
    min-width: 0;
}

.team-select-item .team-select-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-select-item .team-select-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.team-select-item .team-select-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.team-select-item.selected .team-select-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.team-select-item.selected .team-select-check svg {
    display: block;
}

.team-select-item .team-select-check svg {
    display: none;
    width: 14px;
    height: 14px;
}

.comparison-content {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    margin-top: 8px;
}

.comparison-section {
    margin-bottom: 24px;
}

.comparison-section h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-chart-container {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.comparison-stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.comparison-stat-card .team-color-bar {
    height: 4px;
    border-radius: 2px;
    margin-bottom: 12px;
}

.comparison-stat-card .stat-team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.comparison-stat-card .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.comparison-stat-card .stat-row:last-child {
    border-bottom: none;
}

.comparison-stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.comparison-stat-card .stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-stat-card .stat-value.highlight {
    color: var(--accent);
}

/* Comparison team colors */
.team-color-1 { background: #00d4aa; }
.team-color-2 { background: #00a8ff; }
.team-color-3 { background: #f39c12; }
.team-color-4 { background: #9b59b6; }

@media (max-width: 768px) {
    .modal-xlarge {
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .modal-xlarge .modal-body {
        padding: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .team-selector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .team-select-item {
        padding: 10px;
        font-size: 13px;
    }

    .comparison-chart-container {
        height: 250px;
    }

    .comparison-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .comparison-stat-card {
        padding: 12px;
    }
}
