* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #475569;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --background: #f1f5f9;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-width: 260px;
    --header-height: 70px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 0 20px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.nav-item.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
}

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

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--background);
}

.topbar {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Professional AI Status Badge */
.ai-status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.active {
    background: var(--success-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.status-indicator.inactive {
    background: var(--text-tertiary);
}

.status-indicator.active::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--success-color);
    opacity: 0;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        opacity: 0.6;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(1.4);
    }
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: #f8fafc;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

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

/* Content Container */
.content-container {
    padding: 32px;
    max-width: 1600px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.primary {
    background: #eff6ff;
    color: var(--primary-color);
}

.stat-icon.success {
    background: #f0fdf4;
    color: var(--success-color);
}

.stat-icon.danger {
    background: #fef2f2;
    color: var(--danger-color);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Filters */
.filters-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s;
}

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

/* Ads Grid */
.ads-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 200px;
}

.ad-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.ad-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.ad-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f1f5f9;
}

.ad-body {
    padding: 20px;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.ad-category {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 12px 0;
}

.ad-details {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.ad-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ad-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--surface);
    margin: 40px auto;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    display: flex;
    flex-direction: column;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 24px;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

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

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.gallery-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

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

.badge-primary {
    background: #eff6ff;
    color: var(--primary-color);
}

.badge-success {
    background: #f0fdf4;
    color: var(--success-color);
}

.badge-danger {
    background: #fef2f2;
    color: var(--danger-color);
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .ads-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.pagination-info {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
}

.pagination-info svg {
    flex-shrink: 0;
    margin-top: 2px;
}

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

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

/* AI Review Tabs */
.ai-tabs-container {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.ai-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-tab {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ai-tab.active {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.ai-tab-approve {
    border-color: #10b98140;
}

.ai-tab-approve.active {
    background: var(--success-color);
    border-color: var(--success-color);
}

.ai-tab-approve:hover:not(.active) {
    border-color: var(--success-color);
    color: var(--success-color);
}

.ai-tab-reject {
    border-color: #ef444440;
}

.ai-tab-reject.active {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.ai-tab-reject:hover:not(.active) {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.ai-tab-manual {
    border-color: #f59e0b40;
}

.ai-tab-manual.active {
    background: var(--warning-color);
    border-color: var(--warning-color);
}

.ai-tab-manual:hover:not(.active) {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.ai-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Bulk Actions */
.bulk-actions-container {
    background: var(--surface);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

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

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

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

.btn-bulk {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 50px;
}

.btn-bulk:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-bulk-all {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
}

.btn-bulk-all:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    border-color: var(--primary-dark);
    color: white;
}

.bulk-actions-container[data-action="approve"] .btn-bulk:hover {
    border-color: var(--success-color);
    color: var(--success-color);
}

.bulk-actions-container[data-action="approve"] .btn-bulk-all {
    background: linear-gradient(135deg, var(--success-color), #10b981);
    border-color: var(--success-color);
}

.bulk-actions-container[data-action="reject"] .btn-bulk:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.bulk-actions-container[data-action="reject"] .btn-bulk-all {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
    border-color: var(--danger-color);
}

/* AI Card Color Coding */
.ad-card[data-ai-status="APPROVE"] {
    border: 3px solid var(--success-color);
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05), white);
}

.ad-card[data-ai-status="REJECT"] {
    border: 3px solid var(--danger-color);
    background: linear-gradient(to bottom, rgba(239, 68, 68, 0.05), white);
}

.ad-card[data-ai-status="MANUAL"] {
    border: 3px solid var(--warning-color);
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.05), white);
}

.ad-card[data-ai-status="APPROVE"]:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.ad-card[data-ai-status="REJECT"]:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.ad-card[data-ai-status="MANUAL"]:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

/* AI Badge */
.ai-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.ai-badge-approve {
    background: var(--success-color);
    color: white;
}

.ai-badge-reject {
    background: var(--danger-color);
    color: white;
}

.ai-badge-manual {
    background: var(--warning-color);
    color: white;
}

/* AI Colored Border Cards */
.ad-card[data-ai-status="APPROVE"] {
    border: 3px solid var(--success-color) !important;
    box-shadow: 0 0 0 1px var(--success-color), var(--shadow-sm);
}

.ad-card[data-ai-status="REJECT"] {
    border: 3px solid var(--danger-color) !important;
    box-shadow: 0 0 0 1px var(--danger-color), var(--shadow-sm);
}

.ad-card[data-ai-status="MANUAL"] {
    border: 3px solid var(--warning-color) !important;
    box-shadow: 0 0 0 1px var(--warning-color), var(--shadow-sm);
}

/* AI Reason Display */
.ai-reason {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.03);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.ad-card[data-ai-status="APPROVE"] .ai-reason {
    border-left-color: var(--success-color);
    background: rgba(16, 185, 129, 0.08);
}

.ad-card[data-ai-status="REJECT"] .ai-reason {
    border-left-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.08);
}

.ad-card[data-ai-status="MANUAL"] .ai-reason {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.08);
}

/* AI Loading State */
.ai-reviewing {
    position: relative;
    overflow: hidden;
}

.ai-reviewing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Pagination */
.pagination-container {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

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

.pagination-info-text span {
    color: var(--text-primary);
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.pagination-pages {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-page:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-page.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination-size label {
    font-weight: 500;
}

.pagination-size select {
    padding: 6px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-size select:hover {
    border-color: var(--primary-color);
}

.pagination-size select:focus {
    outline: none;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .pagination-container {
        padding: 16px;
    }
    
    .pagination-controls {
        width: 100%;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .pagination-page {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-elevated: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --border-light: #1e293b;
}

[data-theme="dark"] .logo-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

[data-theme="dark"] .ad-card {
    background: var(--surface);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal {
    background: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] .modal-content {
    background: var(--surface);
    color: var(--text-primary);
}

/* ==================== RTL SUPPORT ==================== */
[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

[dir="rtl"] .topbar-right {
    flex-direction: row-reverse;
}

[dir="rtl"] .stats-grid {
    direction: rtl;
}

[dir="rtl"] .filters-grid {
    direction: rtl;
}

[dir="rtl"] .ads-grid {
    direction: rtl;
}

/* ==================== THEME & LANGUAGE TOGGLES ==================== */
.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    background: var(--surface);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    margin: 0 8px;
}

.btn-icon:hover {
    background: var(--surface-elevated);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#languageText {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
}

/* ==================== STATISTICS PAGE ==================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chart-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.chart-card canvas {
    max-height: 300px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        margin: 0 4px;
    }
}

