/* Admin Panel Styles */
.admin-container {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
    background: var(--bg-light);
}

.admin-header {
    text-align: center;
    margin-bottom: 3rem;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2) 0%, rgba(234, 88, 12, 0.2) 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 2px;
}

.admin-tab-btn:hover {
    color: var(--text-primary);
}

.admin-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

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

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    width: 300px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Table */
.table-container {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.admin-table thead {
    background: rgba(37, 99, 235, 0.05);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr {
    transition: all 0.2s;
}

.admin-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.admin-table .loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.3);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-user {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Statistics Content */
.stats-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.chart-container {
    margin-bottom: 2rem;
}

.chart-container h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.chart-box {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border-left: 4px solid #f97316;
}

.chart-item-label {
    flex: 1;
    color: #ffffff;
    font-weight: 600;
}

.chart-item-bar {
    flex: 2;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
}

.chart-item-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    transition: width 0.5s ease;
}

.chart-item-value {
    min-width: 60px;
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        padding: 2rem 0;
    }

    .admin-header h1 {
        font-size: 2rem;
    }

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

    .admin-tabs {
        flex-wrap: wrap;
    }

    .admin-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input {
        width: 100%;
    }

    .table-container {
        padding: 1rem;
    }

    .admin-table {
        font-size: 0.85rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }
}

