/* =============================================
   ADMIN PANEL STYLES - Tunisian Football Federation
   Feuille de Match Generator v3.0
   Admin Dashboard, Data Management & Settings
   ============================================= */

/* =============================================
   1. MAIN NAVIGATION
   ============================================= */
.main-nav {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn i {
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--gradient-red);
    border-color: rgba(200, 16, 46, 0.5);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.nav-btn.active i {
    color: var(--white);
}

.nav-btn .nav-text {
    pointer-events: none;
}

/* =============================================
   2. ADMIN CONTAINER
   ============================================= */
.admin-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 1.5rem;
    position: relative;
    z-index: 10;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header-title .admin-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-red);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    box-shadow: var(--shadow-glow-red);
    flex-shrink: 0;
}

.admin-header-title h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.admin-header-title p {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.1rem;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================================
   3. ADMIN TABS
   ============================================= */
.admin-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
}

.admin-tab i {
    font-size: 0.9rem;
}

.admin-tab:hover {
    color: var(--gray-200);
    background: rgba(255, 255, 255, 0.03);
}

.admin-tab.active {
    color: var(--red-primary);
    border-bottom-color: var(--red-primary);
    background: rgba(200, 16, 46, 0.05);
}

.admin-tab.active i {
    color: var(--red-primary);
}

.admin-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-family: var(--font-latin);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--gray-400);
}

.admin-tab.active .tab-badge {
    background: rgba(200, 16, 46, 0.2);
    color: var(--red-light);
}

/* =============================================
   4. ADMIN CONTENT
   ============================================= */
.admin-content {
    padding: 1.5rem;
    min-height: 400px;
}

.admin-tab-panel {
    display: none;
    animation: adminFadeIn 0.35s ease;
}

.admin-tab-panel.active {
    display: block;
}

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

/* =============================================
   5. ADMIN TOOLBAR
   ============================================= */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-toolbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.admin-toolbar-search .search-input-wrapper {
    position: relative;
    flex: 1;
}

.admin-toolbar-search .search-input-wrapper i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 0.85rem;
    pointer-events: none;
}

.admin-toolbar-search input {
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    color: var(--white);
    transition: all var(--transition-base);
}

.admin-toolbar-search input::placeholder {
    color: var(--gray-500);
}

.admin-toolbar-search input:focus {
    outline: none;
    border-color: var(--red-primary);
    background: rgba(200, 16, 46, 0.08);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.admin-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-add:hover::before {
    left: 100%;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-add i {
    font-size: 0.9rem;
}

/* =============================================
   6. TEAM CARDS (ADMIN)
   ============================================= */
.team-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.team-card-admin {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.team-card-admin:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 16, 46, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(200, 16, 46, 0.1);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.team-card-header .team-shield-admin {
    width: 48px;
    height: 48px;
    background: var(--gradient-red);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.team-card-header .team-card-title {
    flex: 1;
    min-width: 0;
}

.team-card-header .team-card-title h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-card-header .team-card-title .team-short-name {
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.team-card-body {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-card-body .team-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.team-card-body .team-info-row i {
    width: 18px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.team-card-body .team-info-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.team-card-footer .player-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-900);
}

.team-card-footer .player-count-badge i {
    font-size: 0.65rem;
}

.team-card-footer .team-card-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* =============================================
   7. PLAYERS TABLE (ADMIN)
   ============================================= */
.admin-players-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 16, 46, 0.3) rgba(0, 0, 0, 0.2);
}

.admin-players-table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.admin-players-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.admin-players-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(200, 16, 46, 0.3);
    border-radius: 3px;
}

.admin-players-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 16, 46, 0.5);
}

.admin-players-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 550px;
}

.admin-players-table thead {
    background: rgba(200, 16, 46, 0.15);
    border-bottom: 2px solid rgba(200, 16, 46, 0.3);
}

.admin-players-table thead th {
    padding: 0.75rem 1rem;
    text-align: right;
    font-weight: 700;
    color: var(--gray-200);
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-players-table thead th:first-child {
    text-align: center;
    width: 50px;
}

.admin-players-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background var(--transition-fast);
}

.admin-players-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.admin-players-table tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.05);
}

.admin-players-table tbody tr:hover {
    background: rgba(200, 16, 46, 0.08);
}

.admin-players-table tbody td {
    padding: 0.6rem 1rem;
    color: var(--gray-300);
    vertical-align: middle;
}

.admin-players-table tbody td:first-child {
    text-align: center;
    font-family: var(--font-latin);
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.8rem;
}

.admin-players-table .player-name-cell {
    font-weight: 600;
    color: var(--white);
}

.admin-players-table .player-team-cell {
    color: var(--gray-400);
    font-size: 0.8rem;
}

.admin-players-table .player-actions-cell {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-start;
}

.player-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.35rem;
    background: var(--gradient-red);
    border-radius: var(--radius-md);
    font-family: var(--font-latin);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--white);
    box-shadow: 0 2px 6px rgba(200, 16, 46, 0.3);
}

/* =============================================
   8. STADIUM LIST
   ============================================= */
.admin-stadium-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stadium-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.stadium-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.stadium-item:nth-child(odd) {
    background: rgba(0, 0, 0, 0.1);
}

.stadium-item:hover {
    background: rgba(200, 16, 46, 0.08);
}

.stadium-item .stadium-icon {
    width: 36px;
    height: 36px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gold-primary);
    flex-shrink: 0;
}

.stadium-item .stadium-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stadium-item .stadium-city {
    font-size: 0.75rem;
    color: var(--gray-500);
    flex-shrink: 0;
}

.stadium-item .stadium-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* =============================================
   9. HISTORY CARDS
   ============================================= */
.history-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.history-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
}

.history-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(200, 16, 46, 0.1);
    border-bottom: 1px solid rgba(200, 16, 46, 0.2);
    font-family: var(--font-latin);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-300);
}

.history-date i {
    color: var(--red-primary);
    font-size: 0.85rem;
}

.history-date .history-time {
    margin-right: auto;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}

.history-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.history-teams .history-team-name {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-teams .history-vs {
    width: 36px;
    height: 36px;
    background: var(--gradient-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-latin);
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.3);
}

.history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.history-meta .meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.history-meta .meta-item i {
    font-size: 0.7rem;
    color: var(--gray-600);
}

.history-meta .history-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-meta .history-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

/* =============================================
   10. STATS SECTION
   ============================================= */
.stats-section {
    padding: 0;
}

.stats-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.stats-section .section-title i {
    color: var(--gold-primary);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--gold-primary);
}

.stat-card .stat-value {
    font-family: var(--font-latin);
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
}

.top-list {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.top-list .top-list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-200);
}

.top-list .top-list-header i {
    color: var(--gold-primary);
}

.top-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background var(--transition-fast);
}

.top-list-item:last-child {
    border-bottom: none;
}

.top-list-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.top-list-item .rank {
    width: 26px;
    height: 26px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-latin);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--gold-primary);
    flex-shrink: 0;
}

.top-list-item .rank.rank-1 {
    background: var(--gradient-gold);
    color: var(--gray-900);
    border-color: var(--gold-primary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.top-list-item .rank.rank-2 {
    background: rgba(192, 192, 192, 0.2);
    border-color: rgba(192, 192, 192, 0.4);
    color: #C0C0C0;
}

.top-list-item .rank.rank-3 {
    background: rgba(205, 127, 50, 0.2);
    border-color: rgba(205, 127, 50, 0.4);
    color: #CD7F32;
}

.top-list-item .item-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-list-item .item-count {
    font-family: var(--font-latin);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    flex-shrink: 0;
}

/* =============================================
   11. SETTINGS SECTION
   ============================================= */
.settings-section {
    padding: 0;
}

.settings-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group .settings-group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.35rem;
}

.settings-group .settings-group-title i {
    color: var(--gold-primary);
    font-size: 1rem;
}

.settings-group .settings-group-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base);
}

.settings-action-btn i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.settings-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    transform: translateY(-1px);
}

.settings-action-btn.danger {
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.settings-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.dark-mode-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.dark-mode-switch .switch-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
}

.dark-mode-switch .switch-track {
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.dark-mode-switch .switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--gray-400);
    border-radius: 50%;
    transition: all var(--transition-base);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-switch .switch-track.active {
    background: rgba(200, 16, 46, 0.3);
    border-color: rgba(200, 16, 46, 0.5);
}

.dark-mode-switch .switch-track.active::after {
    right: calc(100% - 20px);
    background: var(--red-primary);
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.4);
}

.dark-mode-switch input[type="checkbox"] {
    display: none;
}

/* =============================================
   12. ADMIN MODALS
   ============================================= */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
}

.admin-modal.active {
    display: flex;
}

.admin-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.admin-modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(200, 16, 46, 0.1);
    animation: modalSlideIn 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 16, 46, 0.3) transparent;
}

.admin-modal-content::-webkit-scrollbar {
    width: 5px;
}

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

.admin-modal-content::-webkit-scrollbar-thumb {
    background: rgba(200, 16, 46, 0.3);
    border-radius: 10px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-modal-header h3 i {
    color: var(--red-primary);
    font-size: 1rem;
}

.admin-modal-header .modal-close-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-modal-header .modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
    transform: rotate(90deg);
}

.admin-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-modal-body .modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-modal-body .modal-field label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
}

.admin-modal-body .modal-field label i {
    color: var(--red-primary);
    font-size: 0.8rem;
}

.modal-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    color: var(--white);
    transition: all var(--transition-base);
}

.modal-input::placeholder {
    color: var(--gray-500);
}

.modal-input:focus {
    outline: none;
    border-color: var(--red-primary);
    background: rgba(200, 16, 46, 0.08);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.modal-select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    color: var(--white);
    transition: all var(--transition-base);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2rem;
}

.modal-select:focus {
    outline: none;
    border-color: var(--red-primary);
    background-color: rgba(200, 16, 46, 0.08);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.modal-select option {
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem;
}

.admin-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.1);
}

.admin-modal-footer .btn-modal-save {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: var(--gradient-red);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.admin-modal-footer .btn-modal-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

.admin-modal-footer .btn-modal-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base);
}

.admin-modal-footer .btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

/* =============================================
   13. CONFIRM MODAL
   ============================================= */
.confirm-modal-content {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    width: 100%;
    max-width: 380px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease;
}

.confirm-modal-content .confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--warning);
}

.confirm-modal-content .confirm-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.confirm-modal-content .confirm-message {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.confirm-modal-content .confirm-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.confirm-modal-content .btn-confirm-yes {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.5rem;
    background: var(--gradient-red);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.confirm-modal-content .btn-confirm-yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

.confirm-modal-content .btn-confirm-no {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-base);
}

.confirm-modal-content .btn-confirm-no:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

/* =============================================
   14. DARK MODE ADJUSTMENTS
   ============================================= */
body.dark-mode .admin-container {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .admin-header {
    background: rgba(0, 0, 0, 0.15);
}

body.dark-mode .admin-tabs {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .team-card-admin {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .team-card-admin:hover {
    border-color: rgba(200, 16, 46, 0.25);
}

body.dark-mode .team-card-header {
    background: rgba(0, 0, 0, 0.1);
}

body.dark-mode .team-card-footer {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .stat-card {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .history-card {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .settings-group {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .admin-players-table thead {
    background: rgba(200, 16, 46, 0.1);
}

body.dark-mode .admin-players-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .admin-players-table tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.15);
}

body.dark-mode .stadium-item:nth-child(even) {
    background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .stadium-item:nth-child(odd) {
    background: rgba(0, 0, 0, 0.15);
}

body.dark-mode .top-list {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .admin-modal-content {
    background: linear-gradient(135deg, #141c2b 0%, #0a0f18 100%);
}

body.dark-mode .confirm-modal-content {
    background: linear-gradient(135deg, #141c2b 0%, #0a0f18 100%);
}

body.dark-mode .modal-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .modal-select {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .dark-mode-switch .switch-track {
    background: rgba(200, 16, 46, 0.3);
    border-color: rgba(200, 16, 46, 0.5);
}

body.dark-mode .dark-mode-switch .switch-track::after {
    right: calc(100% - 20px);
    background: var(--red-primary);
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.4);
}

/* =============================================
   15. ADMIN ACTION BUTTONS
   ============================================= */
.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    color: var(--info);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.45);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.45);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-900);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-export::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-export:hover::before {
    left: 100%;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-import {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-import::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-import:hover::before {
    left: 100%;
}

.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: transparent;
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--error);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

/* =============================================
   16. EMPTY STATES
   ============================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-600);
    margin-bottom: 1.25rem;
    animation: pulse 3s ease-in-out infinite;
}

.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.empty-state .empty-message {
    font-size: 0.85rem;
    color: var(--gray-600);
    max-width: 350px;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.empty-state .empty-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: var(--gradient-red);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.empty-state .empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

/* =============================================
   17. PLAYER COUNT BADGE
   ============================================= */
.player-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
}

.player-count-badge i {
    font-size: 0.65rem;
}

/* =============================================
   19. FOOTER STYLES
   ============================================= */
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand .footer-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.8;
}

.footer-brand .footer-brand-text {
    font-family: var(--font-latin);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-dedication {
    padding: 0.5rem 0;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.footer-dedication p {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-primary);
    line-height: 1.6;
}

.footer-dedication .dedication-name {
    font-weight: 800;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-dedication .dedication-icon {
    color: var(--gold-primary);
    font-size: 0.9rem;
    margin: 0 0.25rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-links a i {
    font-size: 0.7rem;
}

.footer-links a:hover {
    color: var(--gold-primary);
}

.footer-links .footer-separator {
    width: 3px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 50%;
    flex-shrink: 0;
}

/* =============================================
   20. SCROLLBAR STYLING
   ============================================= */
.admin-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 16, 46, 0.3) rgba(0, 0, 0, 0.2);
}

.admin-container::-webkit-scrollbar {
    width: 6px;
}

.admin-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.admin-container::-webkit-scrollbar-thumb {
    background: rgba(200, 16, 46, 0.3);
    border-radius: 3px;
}

.admin-container::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 16, 46, 0.5);
}

.admin-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 16, 46, 0.3) rgba(0, 0, 0, 0.2);
}

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

.admin-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.admin-content::-webkit-scrollbar-thumb {
    background: rgba(200, 16, 46, 0.3);
    border-radius: 3px;
}

.admin-content::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 16, 46, 0.5);
}

.admin-tabs {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 16, 46, 0.2) transparent;
}

/* =============================================
   18. RESPONSIVE BREAKPOINTS
   ============================================= */

/* 1200px - Large desktop adjustments */
@media (max-width: 1200px) {
    .team-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-actions {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* 1024px - Tablet landscape */
@media (max-width: 1024px) {
    .admin-header {
        padding: 1rem 1.25rem;
    }

    .admin-header-title h2 {
        font-size: 1.15rem;
    }

    .admin-content {
        padding: 1.25rem;
    }

    .team-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .history-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-toolbar-search {
        max-width: none;
    }

    .admin-toolbar-actions {
        justify-content: flex-start;
    }
}

/* 768px - Tablet portrait */
@media (max-width: 768px) {
    .main-nav {
        padding: 0.4rem 0.5rem;
    }

    .nav-btn .nav-text {
        display: none;
    }

    .nav-btn {
        padding: 0.5rem;
        min-width: 40px;
        justify-content: center;
    }

    .nav-btn i {
        margin: 0;
    }

    .admin-container {
        margin-top: 1rem;
        border-radius: var(--radius-xl);
    }

    .admin-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        padding: 1rem;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-tabs {
        padding: 0 0.75rem;
    }

    .admin-tab {
        padding: 0.7rem 0.85rem;
        font-size: 0.8rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .team-cards-grid {
        grid-template-columns: 1fr;
    }

    .history-cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .admin-modal-content {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }

    .confirm-modal-content {
        max-width: calc(100vw - 2rem);
    }

    .settings-actions {
        grid-template-columns: 1fr;
    }

    .footer-links {
        gap: 0.6rem;
    }

    .footer-links a {
        font-size: 0.7rem;
    }

    .history-teams .history-team-name {
        font-size: 0.85rem;
    }

    .history-teams .history-vs {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }

    .admin-players-table {
        font-size: 0.8rem;
    }

    .admin-players-table thead th {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }

    .admin-players-table tbody td {
        padding: 0.5rem 0.75rem;
    }
}

/* 480px - Mobile */
@media (max-width: 480px) {
    .main-nav .container {
        gap: 0.35rem;
    }

    .nav-btn {
        padding: 0.4rem;
        min-width: 36px;
        font-size: 0.85rem;
    }

    .admin-container {
        margin-top: 0.75rem;
        border-radius: var(--radius-lg);
    }

    .admin-header {
        padding: 0.75rem;
    }

    .admin-header-title .admin-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .admin-header-title h2 {
        font-size: 1rem;
    }

    .admin-header-title p {
        font-size: 0.7rem;
    }

    .admin-tabs {
        padding: 0 0.5rem;
    }

    .admin-tab {
        padding: 0.6rem 0.65rem;
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .admin-tab .tab-badge {
        display: none;
    }

    .admin-content {
        padding: 0.75rem;
    }

    .admin-toolbar {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .admin-toolbar-actions {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .btn-add {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .team-card-header {
        padding: 0.75rem;
    }

    .team-card-header .team-shield-admin {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .team-card-header .team-card-title h4 {
        font-size: 0.9rem;
    }

    .team-card-body {
        padding: 0.5rem 0.75rem;
    }

    .team-card-footer {
        padding: 0.6rem 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

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

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .history-teams {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .history-teams .history-team-name {
        font-size: 0.8rem;
    }

    .history-date {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .history-meta {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .history-meta .meta-info {
        gap: 0.5rem;
    }

    .history-meta .meta-item {
        font-size: 0.7rem;
    }

    .admin-modal {
        padding: 0.5rem;
    }

    .admin-modal-content {
        max-width: 100%;
        border-radius: var(--radius-xl);
    }

    .admin-modal-header {
        padding: 1rem;
    }

    .admin-modal-header h3 {
        font-size: 1rem;
    }

    .admin-modal-body {
        padding: 1rem;
    }

    .admin-modal-footer {
        padding: 0.75rem 1rem;
    }

    .confirm-modal-content {
        max-width: 100%;
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }

    .confirm-modal-content .confirm-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .confirm-modal-content .confirm-title {
        font-size: 1rem;
    }

    .confirm-modal-content .confirm-message {
        font-size: 0.8rem;
    }

    .settings-group {
        padding: 1rem;
    }

    .settings-group .settings-group-title {
        font-size: 0.9rem;
    }

    .settings-group .settings-group-desc {
        font-size: 0.75rem;
    }

    .settings-action-btn {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state .empty-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .empty-state .empty-title {
        font-size: 1rem;
    }

    .empty-state .empty-message {
        font-size: 0.8rem;
    }

    .btn-edit {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .btn-delete {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .btn-export {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .btn-import {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .btn-reset {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .stadium-item {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .stadium-item .stadium-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .stadium-item .stadium-name {
        font-size: 0.8rem;
    }

    .stadium-item .stadium-city {
        display: none;
    }

    .top-list-item {
        padding: 0.5rem 0.75rem;
    }

    .top-list-item .item-name {
        font-size: 0.8rem;
    }

    .top-list-item .rank {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .footer-dedication p {
        font-size: 0.8rem;
    }

    .footer-dedication .dedication-name {
        font-size: 0.85rem;
    }

    .footer-brand .footer-brand-text {
        font-size: 0.65rem;
    }

    .player-num-badge {
        min-width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .player-count-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    .dark-mode-switch .switch-track {
        width: 42px;
        height: 24px;
    }

    .dark-mode-switch .switch-track::after {
        width: 16px;
        height: 16px;
    }

    .dark-mode-switch .switch-track.active::after {
        right: calc(100% - 18px);
    }

    .dark-mode-switch .switch-label {
        font-size: 0.8rem;
    }
}

/* =============================================
   CHART BAR STYLES
   ============================================= */
.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.chart-bar-row:last-child {
    border-bottom: none;
}

.chart-label {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-300);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: var(--gradient-red);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
    min-width: 4px;
}

.chart-bar.stadium-bar {
    background: var(--gradient-gold);
}

.chart-value {
    flex-shrink: 0;
    font-family: var(--font-latin);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-500);
    min-width: 24px;
    text-align: center;
}

.chart-empty {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* =============================================
   UTILITY ANIMATIONS
   ============================================= */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* =============================================
   21. HISTORY TOOLBAR (Search/Filter)
   ============================================= */
.history-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.history-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    position: relative;
}

.history-search-wrapper i {
    position: absolute;
    right: 0.75rem;
    color: var(--gray-500);
    font-size: 0.85rem;
    pointer-events: none;
}

.history-search-wrapper input {
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    color: var(--white);
    transition: all var(--transition-base);
}

.history-search-wrapper input::placeholder {
    color: var(--gray-500);
}

.history-search-wrapper input:focus {
    outline: none;
    border-color: var(--red-primary);
    background: rgba(200, 16, 46, 0.08);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.history-filter-select {
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 130px;
}

.history-filter-select:focus {
    outline: none;
    border-color: var(--red-primary);
    background: rgba(200, 16, 46, 0.08);
}

.history-filter-select option {
    background: var(--gray-800);
    color: var(--white);
}

/* =============================================
   22. ENHANCED HISTORY CARDS
   ============================================= */
.history-card-clickable {
    cursor: pointer;
}

.history-card-clickable:hover {
    border-color: rgba(200, 16, 46, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(200, 16, 46, 0.1);
}

.history-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.35rem 0.75rem;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    font-family: var(--font-latin);
    font-size: 1rem;
    font-weight: 900;
    color: var(--gray-900);
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 2px;
}

.history-round-badge {
    margin-right: auto;
    padding: 0.15rem 0.5rem;
    background: rgba(200, 16, 46, 0.15);
    border: 1px solid rgba(200, 16, 46, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--red-light);
}

.history-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.25rem 1rem 0.5rem;
}

.history-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}

.history-stat-badge.goals {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10B981;
}

.history-stat-badge.goals i {
    font-size: 0.6rem;
}

.history-stat-badge.cards {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #F59E0B;
}

.history-stat-badge.cards i {
    font-size: 0.55rem;
}

/* =============================================
   23. MATCH DETAIL MODAL
   ============================================= */
.match-detail-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.match-detail-body {
    padding: 0 !important;
    gap: 0 !important;
}

.match-detail-footer {
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Score Header */
.detail-score-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.08) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-team-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.detail-team-shield {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
}

.detail-team-shield.home-shield {
    background: var(--gradient-red);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.detail-team-shield.away-shield {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.detail-team-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-coach {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.detail-score-col {
    flex-shrink: 0;
}

.detail-score-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    font-family: var(--font-latin);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.detail-score-display.has-score {
    background: var(--gradient-gold);
    border-color: var(--gold-primary);
    color: var(--gray-900);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.detail-score-edit-icon {
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.detail-score-display:hover .detail-score-edit-icon {
    opacity: 0.7;
}

.detail-score-display:hover {
    transform: scale(1.05);
}

/* Info Bar */
.detail-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.detail-info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.detail-info-item i {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Detail Sections */
.detail-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-200);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.detail-section-title:hover {
    background: rgba(255, 255, 255, 0.04);
}

.detail-section-title i:first-child {
    color: var(--red-primary);
    font-size: 0.85rem;
}

.detail-collapse-icon {
    margin-right: auto;
    font-size: 0.7rem;
    color: var(--gray-500);
    transition: transform var(--transition-base);
}

.detail-section.collapsed .detail-collapse-icon {
    transform: rotate(-90deg);
}

.detail-section.collapsed .detail-section-body {
    display: none;
}

.detail-section-body {
    padding: 0.75rem 1.5rem 1rem;
}

.detail-empty-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    padding: 1rem 0;
}

/* Referees Grid */
.referees-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.referee-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.referee-role {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
}

.referee-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-200);
}

/* Lineups */
.lineups-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.lineup-col-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-align: center;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(200, 16, 46, 0.3);
}

.lineup-group {
    margin-bottom: 0.75rem;
}

.lineup-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0;
}

.lineup-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.lineup-player:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lineup-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.25rem;
    background: var(--gradient-red);
    border-radius: var(--radius-sm);
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
}

.lineup-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-300);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-icon {
    font-size: 0.65rem;
    flex-shrink: 0;
}

.lineup-icon.sub-icon {
    color: #3B82F6;
}

.lineup-icon.yellow-icon {
    color: #F59E0B;
}

.lineup-icon.red-icon {
    color: #EF4444;
}

/* Events Timeline */
.events-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.event-minute {
    font-family: var(--font-latin);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--gray-400);
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.event-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.event-icon-goal {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.event-icon-yellow {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #F59E0B;
}

.event-icon-red {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.event-icon-substitution {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3B82F6;
}

.event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.event-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
}

.event-player {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-team-label {
    font-size: 0.65rem;
    color: var(--gray-600);
}

.event-delete-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.65rem !important;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.event-item:hover .event-delete-btn {
    opacity: 1;
}

.btn-add-event {
    margin-right: auto;
    width: 26px;
    height: 26px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    color: #10B981;
    font-size: 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-add-event:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.1);
}

/* =============================================
   24. SCORE EDIT MODAL
   ============================================= */
.score-edit-modal-content {
    max-width: 400px;
}

.score-edit-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.score-edit-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.score-edit-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-input {
    width: 80px !important;
    text-align: center;
    font-family: var(--font-latin) !important;
    font-size: 1.75rem !important;
    font-weight: 900 !important;
    padding: 0.5rem !important;
}

.score-edit-separator {
    font-family: var(--font-latin);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gray-500);
    margin-top: 1.2rem;
}

/* =============================================
   25. EVENT ADD MODAL (Enhanced)
   ============================================= */
.event-add-modal-content {
    max-width: 520px;
}

/* Event Type Cards */
.event-type-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.event-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
}

.event-type-card i {
    font-size: 1.2rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.event-type-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-2px);
}

/* Type card active states */
.event-type-card.active[data-type="goal"] {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10B981;
}
.event-type-card.active[data-type="goal"] i { color: #10B981; transform: scale(1.15); }

.event-type-card.active[data-type="yellow"] {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.5);
    color: #F59E0B;
}
.event-type-card.active[data-type="yellow"] i { color: #F59E0B; transform: scale(1.15); }

.event-type-card.active[data-type="red"] {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.5);
    color: #EF4444;
}
.event-type-card.active[data-type="red"] i { color: #EF4444; transform: scale(1.15); }

.event-type-card.active[data-type="substitution"] {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.5);
    color: #3B82F6;
}
.event-type-card.active[data-type="substitution"] i { color: #3B82F6; transform: scale(1.15); }

/* 2-col row for team + minute */
.event-row-2col {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Team Toggle Buttons */
.event-team-toggle {
    display: flex;
    gap: 0.5rem;
}

.event-team-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    font-family: var(--font-arabic);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-team-btn i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.event-team-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.event-team-btn.active {
    background: rgba(200, 16, 46, 0.12);
    border-color: rgba(200, 16, 46, 0.5);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(200, 16, 46, 0.2);
}

.event-team-btn.active i {
    color: var(--red-primary);
}

/* Minute Wrapper */
.event-minute-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.event-minute-wrapper .modal-input {
    padding-left: 1.75rem;
    text-align: center;
    font-family: var(--font-latin);
    font-weight: 700;
}

.event-minute-tick {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-latin);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gray-500);
    pointer-events: none;
}

/* Player Autocomplete Dropdown (inside event modal) */
.event-add-modal-content .autocomplete-dropdown {
    max-height: 200px;
}

.event-add-modal-content .autocomplete-dropdown.active {
    display: block;
}

.event-add-modal-content .autocomplete-dropdown .autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.autocomplete-dropdown .autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-dropdown .autocomplete-item:hover,
.autocomplete-dropdown .autocomplete-item.highlighted {
    background: rgba(200, 16, 46, 0.1);
}

.ac-player-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.2rem;
    background: var(--gradient-red);
    border-radius: var(--radius-sm);
    font-family: var(--font-latin);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
}

.ac-player-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-player-role-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    flex-shrink: 0;
}

.event-player-role-tag.starter {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.event-player-role-tag.sub {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #F59E0B;
}

/* Dark mode for event modal */
body.dark-mode .event-type-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .event-team-btn {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .autocomplete-dropdown {
    background: linear-gradient(135deg, #141c2b 0%, #0a0f18 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

/* =============================================
   26. DARK MODE - NEW COMPONENTS
   ============================================= */
body.dark-mode .history-toolbar {
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .history-search-wrapper input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .history-filter-select {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .detail-score-header {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.05) 0%, rgba(0, 0, 0, 0.15) 100%);
}

body.dark-mode .detail-info-bar {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .referee-item {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .event-item {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.04);
}

/* =============================================
   27. RESPONSIVE - NEW COMPONENTS (768px)
   ============================================= */
@media (max-width: 768px) {
    .history-toolbar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .history-search-wrapper {
        min-width: 100%;
        max-width: none;
    }

    .history-filter-select {
        flex: 1;
        min-width: 0;
    }

    .match-detail-modal-content {
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .detail-score-header {
        padding: 1rem;
        gap: 0.75rem;
        flex-direction: row;
    }

    .detail-team-name {
        font-size: 0.8rem;
        max-width: 100px;
    }

    .detail-team-shield {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .detail-score-display {
        font-size: 1.2rem;
        padding: 0.4rem 0.75rem;
    }

    .detail-info-bar {
        gap: 0.75rem;
        padding: 0.6rem 1rem;
    }

    .detail-info-item {
        font-size: 0.75rem;
    }

    .detail-section-title {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .detail-section-body {
        padding: 0.5rem 1rem 0.75rem;
    }

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

    .lineups-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .score-edit-modal-content {
        max-width: calc(100vw - 1rem);
    }

    .event-add-modal-content {
        max-width: calc(100vw - 1rem);
    }

    .event-type-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-row-2col {
        flex-direction: column;
        gap: 0.75rem;
    }

    .event-row-2col .modal-field {
        flex: 1 !important;
    }

    .event-team-toggle {
        flex-direction: column;
        gap: 0.35rem;
    }

    .match-detail-footer {
        justify-content: center;
    }

    .match-detail-footer .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}
