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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card-icon {
    font-size: 2.5rem;
}

.card-content h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

.campaigns-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.campaigns-section h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.campaign-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
}

.campaign-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.campaign-header h3 {
    font-size: 1.2rem;
    color: #2c3e50;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-paused {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-draft {
    background-color: #f8d7da;
    color: #721c24;
}

.campaign-description {
    color: #555;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.campaign-dates {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.campaign-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-primary:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #27ae60;
}

.btn-secondary:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.btn-info {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-info:hover {
    background-color: #8e44ad;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: #7f8c8d;
}

.campaign-info {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.info-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.info-card p {
    margin: 0;
    font-size: 1rem;
}

.charts-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.charts-section-detail {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-wrapper {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-wrapper h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.series-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.series-meta code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}

.campaign-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.campaign-details h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.targets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.target-item {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
}

.target-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.target-label {
    font-weight: 600;
    color: #2c3e50;
}

.target-url {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.target-url:hover {
    text-decoration: underline;
}

.target-regex {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.no-data {
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    header h1 {
        font-size: 1.8rem;
    }

    .campaign-actions {
        flex-direction: column;
    }
}
