/* ============================================
   MODERN ADMIN DASHBOARD CSS
   Afro Football Club - Professional Design
   ============================================ */

:root {
    --primary: #002147;
    --primary-dark: #001B3A;
    --primary-light: #003366;
    --secondary: #FFD700;
    --secondary-dark: #E6C200;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --dark: #1a1a2e;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   ADMIN WRAPPER & LAYOUT
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
}

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--secondary);
    padding: 5px;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
}

.sidebar-header p {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav ul li {
    margin-bottom: 5px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-nav ul li a i {
    width: 22px;
    font-size: 1.1rem;
}

.sidebar-nav ul li a:hover {
    background: rgba(255,215,0,0.1);
    color: var(--secondary);
    border-left-color: var(--secondary);
    padding-left: 25px;
}

.sidebar-nav ul li a.active {
    background: rgba(255,215,0,0.15);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.nav-title {
    color: var(--secondary);
    font-size: 11px;
    padding: 15px 20px 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    list-style: none;
}

.nav-title:first-of-type {
    padding-top: 0;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: #f0f2f5;
}

/* Header */
.admin-header {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid #e9ecef;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header h1 i {
    color: var(--secondary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-cancel, .btn-reset {
    background: var(--gray);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-cancel:hover, .btn-reset:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    padding: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 55px;
    height: 55px;
    background: rgba(0,33,71,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 28px;
    color: var(--primary);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    padding: 0 25px 25px;
}

.chart-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.chart-container h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    margin: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid #e9ecef;
}

.table-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--primary);
    color: white;
    padding: 14px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.active, .badge.success, .badge.paid {
    background: #d4edda;
    color: #155724;
}

.badge.warning, .badge.pending {
    background: #fff3cd;
    color: #856404;
}

.badge.danger, .badge.expired {
    background: #f8d7da;
    color: #721c24;
}

.badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid #e9ecef;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: flex-end;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}

/* Form Sections */
.form-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid #e9ecef;
}

.form-section h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.form-section h3 i {
    color: var(--secondary);
    margin-right: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-icon.view { background: var(--info); color: white; }
.btn-icon.edit { background: var(--warning); color: #333; }
.btn-icon.delete { background: var(--danger); color: white; }
.btn-icon.print { background: var(--gray); color: white; }
.btn-icon.promote { background: var(--success); color: white; }
.btn-icon.reset { background: var(--success); color: white; }

.btn-icon:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
}

/* Avatars */
.avatar-img, .player-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: var(--shadow-xl);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
}

.modal-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.3s ease;
    background: none;
    border: none;
}

.close-modal:hover {
    color: var(--danger);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
}

.empty-state i {
    font-size: 64px;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        left: -280px;
    }
    .admin-sidebar.active {
        left: 0;
    }
    .admin-main {
        margin-left: 0;
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    .filter-row {
        grid-template-columns: 1fr;
    }
    .table-container {
        overflow-x: auto;
    }
    .data-table {
        min-width: 800px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}