/* Mailchimp Zielgruppen Dashboard - Stylesheet */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #007C89 0%, #005f6b 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.audience-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.audience-selector label {
    font-weight: 500;
    white-space: nowrap;
}

.audience-selector select {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 16px;
    min-width: 250px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.audience-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #007C89;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    font-size: 0.8em;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
}

.trend-positive { 
    background: #d4edda; 
    color: #155724; 
}

.trend-negative { 
    background: #f8d7da; 
    color: #721c24; 
}

/* Sections */
.section {
    background: white;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.section h2 {
    color: #007C89;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    color: #dc3545;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border-radius: 8px;
}

.success {
    color: #28a745;
    font-weight: bold;
}

/* Tab System */
.tab-navigation {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background-color: #f8f9fa;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #007C89;
}

.tab-button.active {
    background-color: white;
    color: #007C89;
    border-bottom-color: #007C89;
}

.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
}

/* Campaign specific styles */
.campaign-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.campaign-card:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.campaign-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.campaign-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 0.9em;
    color: #666;
}

.campaign-stat {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
}

.campaign-stat-value {
    font-weight: bold;
    color: #007C89;
    font-size: 1.1em;
}

.campaign-stat-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 450px;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.chart-controls select {
    padding: 6px 10px;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 180px;
}

.chart-controls label {
    font-weight: bold;
    font-size: 14px;
}

/* Responsive Design für Chart Controls */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .chart-controls > div {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        justify-content: center;
    }
    
    .chart-controls select {
        min-width: 200px;
    }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

thead tr {
    background-color: #f8f9fa;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #dee2e6;
}

th {
    font-weight: 600;
    color: #333;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Utility Classes */
.hidden { 
    display: none; 
}

.text-center { 
    text-align: center; 
}

.mb-20 { 
    margin-bottom: 20px; 
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .audience-selector {
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .audience-selector select {
        min-width: 200px;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #dee2e6;
        border-right: none;
    }
    
    .tab-button.active {
        border-bottom-color: #007C89;
        border-left: 3px solid #007C89;
    }
    
    .campaign-meta {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}
