/* ===== CSS Variables ===== */
:root {
    --primary: #1B3A5C;
    --primary-light: #2a5a8c;
    --primary-dark: #0f2540;
    --accent: #E87722;
    --accent-light: #f09050;
    --white: #FFFFFF;
    --bg: #F5F5F5;
    --bg-card: #FFFFFF;
    --text: #1a1a1a;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;

    /* Status Colors */
    --status-neu: #E87722;
    --status-angerufen: #3B82F6;
    --status-nicht-erreicht: #EF4444;
    --status-termin: #F59E0B;
    --status-probearbeit: #84CC16;
    --status-eingestellt: #22C55E;
    --status-absage: #9CA3AF;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* ===== Login Screen ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.login-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 8px;
}

.login-card h2 {
    text-align: center;
    color: var(--text-light);
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.2s;
    background: var(--bg-card);
    color: var(--text);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.1);
}

.login-error {
    background: #FEE2E2;
    color: #DC2626;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.btn-danger {
    background: #EF4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #DC2626;
}

/* ===== Header ===== */
.header {
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-btn, .refresh-btn, .dark-mode-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
}

.alert-btn:hover, .refresh-btn:hover, .dark-mode-toggle:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.alert-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.user-btn:hover {
    background: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    margin-top: 4px;
}

.user-dropdown-info {
    padding: 12px 16px;
}

.user-dropdown-info strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.user-dropdown-info small {
    color: var(--text-muted);
    font-size: 12px;
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-light);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg);
}

/* ===== Alert Panel ===== */
.alert-panel {
    position: fixed;
    top: 56px;
    right: 0;
    width: 400px;
    max-height: calc(100vh - 56px);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    overflow-y: auto;
}

.alert-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

.alert-panel-header h3 {
    font-size: 16px;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 4px;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text);
}

.alert-panel-body {
    padding: 12px;
}

.alert-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.1s;
}

.alert-item:hover {
    transform: translateX(2px);
}

.alert-item.alert-urgent {
    background: #FEE2E2;
    border-left: 4px solid #EF4444;
}

.alert-item.alert-warning {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
}

.alert-item .alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-item .alert-subtitle {
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== Filters Bar ===== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.filter-select, .filter-select-sm {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
}

.filter-select-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.filter-input {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text);
}

.custom-date-range span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Tab Content ===== */
.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* ===== KPI Bar ===== */
.kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.kpi-value.kpi-highlight {
    color: var(--accent);
}

.kpi-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Dashboard Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.chart-wrapper {
    position: relative;
    height: 260px;
    width: 100%;
}

.chart-wrapper-lg {
    position: relative;
    height: 350px;
    width: 100%;
}

.dashboard-recent-card {
    max-height: 350px;
    overflow-y: auto;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.recent-list .recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    cursor: pointer;
}

.recent-item:hover {
    background: var(--bg);
    margin: 0 -8px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item .recent-name {
    font-weight: 500;
}

.recent-item .recent-meta {
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== Candidates Table ===== */
.candidates-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    flex: 1;
    max-width: 350px;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: none;
    padding: 8px 0;
    font-size: 13px;
    width: 100%;
    outline: none;
    color: var(--text);
}

.toolbar-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.candidates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.candidates-table th {
    background: var(--bg);
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}

.candidates-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.candidates-table th.sortable:hover {
    color: var(--primary);
}

.sort-icon::after {
    content: '↕';
    margin-left: 4px;
    opacity: 0.3;
}

.candidates-table th.sort-asc .sort-icon::after {
    content: '↑';
    opacity: 1;
}

.candidates-table th.sort-desc .sort-icon::after {
    content: '↓';
    opacity: 1;
}

.candidates-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.candidates-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.candidates-table tbody tr:hover {
    background: var(--bg);
}

.candidates-table tbody tr.alert-row-urgent {
    animation: pulse-red 2s infinite;
}

.candidates-table tbody tr.alert-row-warning {
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { background: transparent; }
    50% { background: #FEE2E2; }
}

@keyframes pulse-yellow {
    0%, 100% { background: transparent; }
    50% { background: #FEF3C7; }
}

.alert-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-left: 6px;
    animation: blink 1.5s infinite;
}

.alert-tag-urgent {
    background: #EF4444;
    color: white;
}

.alert-tag-warning {
    background: #F59E0B;
    color: white;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-select {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    appearance: auto;
}

.status-select-large {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    width: 100%;
    background: var(--bg-card);
    color: var(--text);
}

.status-neu { background: rgba(232,119,34,0.15); color: #C2610A; }
.status-angerufen { background: rgba(59,130,246,0.15); color: #1D4ED8; }
.status-nicht-erreicht { background: rgba(239,68,68,0.15); color: #DC2626; }
.status-termin { background: rgba(245,158,11,0.15); color: #B45309; }
.status-probearbeit { background: rgba(132,204,22,0.15); color: #4D7C0F; }
.status-eingestellt { background: rgba(34,197,94,0.15); color: #15803D; }
.status-absage { background: rgba(156,163,175,0.2); color: #6B7280; }

.channel-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.channel-funnel {
    background: rgba(59,130,246,0.1);
    color: #2563EB;
}

.channel-whatsapp {
    background: rgba(34,197,94,0.1);
    color: #16A34A;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.pagination {
    display: flex;
    gap: 4px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:hover:not(.active) {
    background: var(--bg);
}

/* ===== Funnel ===== */
.funnel-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.funnel-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.funnel-step {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.funnel-bar-wrapper {
    flex: 1;
    position: relative;
}

.funnel-bar {
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: width 0.6s ease;
}

.funnel-bar .funnel-count {
    position: absolute;
    right: 16px;
    font-weight: 700;
}

.funnel-dropoff {
    width: 120px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 4px;
}

.funnel-dropoff.high-dropoff {
    color: #EF4444;
}

.funnel-dropoff.normal-dropoff {
    color: var(--text-muted);
}

.funnel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.funnel-table th, .funnel-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.funnel-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
}

/* ===== Ads ===== */
.ads-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ads-table th, .ads-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.ads-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
}

.ads-table tr.best-ad {
    background: rgba(34,197,94,0.08);
}

.ads-table tr.worst-ad {
    background: rgba(239,68,68,0.08);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    font-size: 18px;
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-light);
}

.detail-row {
    display: flex;
    padding: 6px 0;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-light);
    min-width: 120px;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    resize: vertical;
    margin-bottom: 8px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
}

/* ===== Activity Timeline ===== */
.activity-timeline {
    border-left: 2px solid var(--border);
    margin-left: 8px;
    padding-left: 20px;
}

.activity-item {
    position: relative;
    padding-bottom: 16px;
    font-size: 13px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-card);
}

.activity-item .activity-time {
    font-size: 11px;
    color: var(--text-muted);
}

.activity-item .activity-text {
    margin-top: 2px;
}

.activity-item .activity-user {
    font-weight: 600;
    color: var(--primary);
}

/* ===== Settings ===== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.settings-card {
    align-self: start;
}

.setting-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text);
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

.setting-info {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.form-row input {
    flex: 1;
}

.position-item, .budget-item, .user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    background: var(--bg);
}

.position-item .position-name, .budget-item .budget-info, .user-item .user-info {
    font-weight: 500;
}

.budget-item .budget-amount {
    color: var(--accent);
    font-weight: 600;
}

.user-item .user-role {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ===== Utility ===== */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

.response-time-good { color: #22C55E; }
.response-time-ok { color: #F59E0B; }
.response-time-bad { color: #EF4444; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    z-index: 500;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s forwards;
}

.toast.toast-success { background: #22C55E; }
.toast.toast-error { background: #EF4444; }

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.refresh-btn.spinning svg {
    animation: spin 1s linear infinite;
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.6;
}

/* ===== Campaign Form ===== */
.campaign-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.checkbox-group {
    display: flex;
    gap: 16px;
    padding-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ===== Campaign Table ===== */
.campaigns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.campaigns-table th, .campaigns-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.campaigns-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg);
    letter-spacing: 0.5px;
}

.campaigns-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.campaigns-table tbody tr:hover {
    background: var(--bg);
}

.camp-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.camp-status-aktiv {
    background: rgba(34,197,94,0.15);
    color: #15803D;
}

.camp-status-pausiert {
    background: rgba(245,158,11,0.15);
    color: #B45309;
}

.camp-status-beendet {
    background: rgba(156,163,175,0.2);
    color: #6B7280;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* ===== Campaign Detail KPIs ===== */
.camp-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.camp-kpi {
    background: var(--bg);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
}

.camp-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.camp-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* ===== Quick Links ===== */
.quick-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.quick-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Wide Modal ===== */
.modal-wide {
    max-width: 900px;
}

/* ===== Campaign Form Card ===== */
.campaign-form-card {
    margin-bottom: 0;
}

/* ===== Auto-Sync Badge ===== */
.camp-auto-sync-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #22C55E, #16a34a);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== Settings Card Wide ===== */
.settings-card-wide {
    grid-column: 1 / -1;
}

/* ===== Toast Info ===== */
.toast.toast-info {
    background: var(--primary);
}
