/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s;
    font-family: inherit;
}

.tab-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* Chart Section */
.chart-section,
.recent-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin: 2rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chart-section h3,
.recent-section h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.5rem;
}

#productsChart {
    display: grid;
    gap: 1rem;
}

.product-chart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.product-chart-item strong {
    color: #1e293b;
    font-weight: 700;
    font-size: 1rem;
}

.product-chart-item div {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Recent Purchases */
.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f1f5f9;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--success-color);
    transition: all 0.3s;
}

.purchase-item:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.purchase-info {
    flex: 1;
}

.purchase-info strong {
    color: #1e293b;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.purchase-info small {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.purchase-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--white);
    font-weight: 700;
    font-size: 1.75rem;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    background: #ffffff;
    color: #1e293b;
    box-shadow: var(--shadow);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.search-box input::placeholder {
    color: #94a3b8;
}

/* Users List */
.users-list {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
    background: #ffffff;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background: #f8fafc;
}

.user-info {
    flex: 1;
}

.user-info .user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.user-info .user-email {
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 500;
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.admin {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.badge.banned {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.user-stats {
    display: flex;
    gap: 1.5rem;
    margin-right: 1.5rem;
    text-align: center;
}

.user-stat {
    display: flex;
    flex-direction: column;
}

.user-stat-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.125rem;
}

.user-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Purchases List */
.purchases-list {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.purchase-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    transition: all 0.3s;
    background: #ffffff;
}

.purchase-list-item:last-child {
    border-bottom: none;
}

.purchase-list-item:hover {
    background: #f8fafc;
}

.purchase-user {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.purchase-user div {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.purchase-product {
    color: #475569;
    font-weight: 600;
    font-size: 0.9375rem;
}

.purchase-date {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.status-badge.completed {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.status-badge.pending {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    background: #ffffff;
    color: #1e293b;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

/* Config Section */
.config-section {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.config-section h2 {
    margin-bottom: 2rem;
    color: #1e293b;
    font-weight: 700;
}

.config-section .form-group {
    margin-bottom: 1.5rem;
}

.config-section .form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .user-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .user-stats {
        margin-right: 0;
        justify-content: space-around;
    }

    .user-actions {
        width: 100%;
        justify-content: stretch;
    }

    .user-actions .btn {
        flex: 1;
    }

    .purchase-list-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .config-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .chart-section,
    .recent-section {
        padding: 1.5rem;
    }
}

