/* Campaigns Page Specific Styles */

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

.page-header h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    color: #1e293b;
}

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

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

.stat-card {
    padding: 1.25rem;
    text-align: left;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.text-success { color: #10b981; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.text-muted { color: #64748b; font-size: 0.875rem; }
.text-center { text-align: center; }

/* Billing Info */
.billing-info-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.billing-info-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: #1e293b;
}

.billing-info-card p {
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    color: #64748b;
}

.billing-rate-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4f46e5;
}

/* Filters */
.filters-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar {
    margin-bottom: 1rem;
}

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

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-controls select {
    flex: 1;
    min-width: 120px;
}

/* Table & Mobile Cards */
.table-card {
    padding: 0;
    overflow: hidden;
}

.desktop-view { display: block; }
.mobile-view { display: none; }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.status-active { background: #d1fae5; color: #065f46; }
.status-paused { background: #fef3c7; color: #92400e; }
.status-pending { background: #dbeafe; color: #1e40af; }
.status-draft { background: #e2e8f0; color: #475569; }
.status-completed { background: #f3f4f6; color: #374151; }

/* Action Buttons in Table */
.action-btn {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    color: #64748b;
}
.action-btn:hover { background: #f8fafc; }
.action-btn.danger { color: #ef4444; border-color: #fecaca; }

/* Mobile Cards */
.mobile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.mobile-card-header h3 { margin: 0; font-size: 1rem; }
.mobile-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}
.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}
.mobile-card-actions .btn { flex: 1; }

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
}
.page-btn.active { background: #4f46e5; color: white; border-color: #4f46e5; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Details Modal */
.campaign-modal {
    max-width: 800px;
    width: 100%;
}
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem;
}
.detail-section {
    margin-bottom: 2rem;
}
.detail-section h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.detail-item {
    display: flex;
    flex-direction: column;
}
.detail-item label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}
.detail-item span {
    font-size: 0.9rem;
    color: #1e293b;
    word-break: break-word;
}

/* Ad Preview in Modal */
.ad-preview-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    background: #f8fafc;
}
.ad-preview-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.ad-preview-container {
    display: flex;
    justify-content: center;
}
.ad-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}
.ad-card.mobile-mode { max-width: 280px; }
.ad-header {
    display: flex;
    align-items: center;
    padding: 0.75rem;
}
.ad-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
.ad-title { font-weight: 600; font-size: 0.9rem; margin: 0; }
.ad-sponsored { font-size: 0.75rem; color: #64748b; }
.ad-media { width: 100%; aspect-ratio: 16/9; background: #e2e8f0; }
.ad-media img, .ad-media video { width: 100%; height: 100%; object-fit: cover; }
.ad-content { padding: 1rem; text-align: left; }
.ad-content h5 { margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.ad-content p { margin: 0 0 1rem 0; font-size: 0.875rem; color: #64748b; }
.ad-cta {
    display: block;
    text-align: center;
    padding: 0.5rem;
    background: #4f46e5;
    color: #fff;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-view { display: none; }
    .mobile-view { display: block; }
    .billing-info-card { flex-direction: column; text-align: center; gap: 1rem; }
    .detail-grid { grid-template-columns: 1fr; }
}
