/* ============================================================
   Pulse Dashboard — AI AdOps Platform
   Palette from turndigital.eu:
   #5B2D8C → #8B3A9E → #B44A9E → #D65BA0
   Dark base: #0D1230 / #151D42 / #1A2347 / #222D52
   ============================================================ */

:root {
    --gradient-primary: linear-gradient(135deg, #5B2D8C 0%, #8B3A9E 30%, #B44A9E 70%, #D65BA0 100%);
    --gradient-primary-hover: linear-gradient(135deg, #6B3D9C 0%, #9B4AAE 30%, #C45AAE 70%, #E66BB0 100%);
    --accent: #B44A9E;
    --accent-light: #D65BA0;
    --accent-dark: #5B2D8C;
    --bg-base: #0D1230;
    --bg-card: #151D42;
    --bg-card-hover: #1A2347;
    --bg-input: #1A2347;
    --bg-elevated: #222D52;
    --border: #1E2A5E;
    --border-light: #2A3562;
    --border-accent: rgba(180, 74, 158, 0.25);
    --text-primary: #E8ECF4;
    --text-secondary: #8896B3;
    --text-dim: #5A6A8A;
    --text-bright: #FFFFFF;
    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.10);
    --error: #D65BA0;
    --error-bg: rgba(214, 91, 160, 0.12);
    --info: #8B3A9E;
    --info-bg: rgba(139, 58, 158, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.25);
    --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.35);
    --transition: 0.2s ease;
    --sidebar-width: 240px;
    --topbar-height: 56px;
}

[data-theme="light"] {
    --gradient-primary: linear-gradient(135deg, #5B2D8C 0%, #8B3A9E 30%, #B44A9E 70%, #D65BA0 100%);
    --accent: #8B3A9E; --accent-light: #7B329A; --accent-dark: #5B2D8C;
    --bg-base: #F4F5FA; --bg-card: #FFFFFF; --bg-card-hover: #F0F1F8;
    --bg-input: #F0F1F8; --bg-elevated: #E8EAF2;
    --border: #DFE2ED; --border-light: #D0D4E2; --border-accent: rgba(139, 58, 158, 0.18);
    --text-primary: #2E3248; --text-secondary: #5C6280; --text-dim: #8A8FAA; --text-bright: #1A1E32;
    --success: #10B981; --success-bg: rgba(16, 185, 129, 0.10);
    --warning: #D97706; --warning-bg: rgba(217, 119, 6, 0.08);
    --error: #B44A9E; --error-bg: rgba(180, 74, 158, 0.08);
    --info: #7B329A; --info-bg: rgba(123, 50, 154, 0.08);
    --shadow-card: 0 1px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 4px 20px rgba(0, 0, 0, 0.10);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== LOGIN ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-base);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(91, 45, 140, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(214, 91, 160, 0.08) 0%, transparent 50%);
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 380px;
    max-width: 90vw;
    box-shadow: var(--shadow-elevated);
}

.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-icon { font-size: 28px; color: var(--accent); }
.login-title { font-size: 1.6em; font-weight: 700; color: var(--text-bright); }
.login-subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; }

.login-error {
    background: var(--error-bg);
    border: 1px solid rgba(214, 91, 160, 0.3);
    color: var(--error);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    margin-bottom: 16px;
    font-size: 13px;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
}

.login-box input:focus { border-color: var(--accent); }

.login-box button {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xs);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
}

.login-box button:hover { opacity: 0.9; }
.login-footer { text-align: center; color: var(--text-dim); font-size: 12px; margin-top: 20px; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.brand-icon { font-size: 22px; color: var(--accent); }
.brand-text { font-size: 1.15em; font-weight: 700; color: var(--text-bright); }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: all var(--transition); cursor: pointer;
    position: relative;
}

.nav-item:hover { background: var(--bg-card-hover); color: var(--text-bright); }
.nav-item.active { background: var(--gradient-primary); color: white; box-shadow: 0 2px 12px rgba(180, 74, 158, 0.3); }
.nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }

.nav-badge {
    position: absolute; right: 10px;
    background: var(--error); color: white;
    font-size: 11px; font-weight: 700;
    padding: 2px 7px; border-radius: 10px;
    min-width: 20px; text-align: center;
}

.sidebar-user { padding: 12px 16px; border-top: 1px solid var(--border); }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-dim); text-transform: capitalize; }

.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); }
.sidebar-logout {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 11px 14px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-secondary);
    font-size: 14px; cursor: pointer; transition: all var(--transition);
}
.sidebar-logout:hover { background: var(--bg-card-hover); color: var(--error); }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 99;
}

/* ===== TOPBAR ===== */
.topbar {
    position: fixed; top: 0; left: var(--sidebar-width); right: 0;
    height: var(--topbar-height);
    background: rgba(13, 18, 48, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 24px; gap: 16px; z-index: 50;
}

[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.88); }

.topbar-menu { display: none; background: none; border: none; color: var(--text-primary); font-size: 20px; cursor: pointer; }
.topbar-title { font-size: 1.1em; font-weight: 600; color: var(--text-bright); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.topbar-btn {
    position: relative; background: none; border: 1px solid var(--border-light);
    border-radius: var(--radius-xs); padding: 6px 10px;
    color: var(--text-secondary); cursor: pointer; font-size: 16px;
    transition: all var(--transition);
}
.topbar-btn:hover { border-color: var(--accent); color: var(--text-bright); }

.notif-dot {
    position: absolute; top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: var(--error); border-radius: 50%;
}

.theme-toggle {
    width: 36px; height: 36px;
    border: 1px solid var(--border-light); border-radius: var(--radius-xs);
    background: transparent; color: var(--text-secondary);
    cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { background: var(--bg-elevated); color: var(--text-bright); border-color: var(--accent); }

/* ===== PAGES ===== */
.page {
    display: none;
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}
.page.active { display: block; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.card-header h2 { font-size: 1em; font-weight: 600; color: var(--text-bright); }

/* ===== STATS ROW ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow-card);
}
.stat-card.accent { border-color: var(--border-accent); background: linear-gradient(135deg, rgba(91, 45, 140, 0.1), rgba(214, 91, 160, 0.05)); }
.stat-label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 1.8em; font-weight: 700; color: var(--text-bright); }
.stat-value-sm { font-size: 0.95em; font-weight: 500; }

/* ===== TOOLBAR ===== */
.page-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

select {
    padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-xs); color: var(--text-primary); font-size: 13px;
    outline: none; cursor: pointer;
}
select:focus { border-color: var(--accent); }

/* ===== BUTTONS ===== */
.btn-sm {
    padding: 7px 14px; border: 1px solid var(--border-light); border-radius: var(--radius-xs);
    background: transparent; color: var(--text-secondary); font-size: 13px;
    cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-sm:hover { background: var(--bg-elevated); color: var(--text-bright); border-color: var(--accent); }

.btn-accent {
    padding: 8px 16px; background: var(--gradient-primary); border: none;
    border-radius: var(--radius-xs); color: white; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: opacity var(--transition);
}
.btn-accent:hover { opacity: 0.9; }

.btn-success { border-color: var(--success); color: var(--success); }
.btn-success:hover { background: var(--success-bg); }
.btn-warning { border-color: var(--warning); color: var(--warning); }
.btn-warning:hover { background: var(--warning-bg); }

/* ===== CAMPAIGNS GRID ===== */
.campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.campaign-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; cursor: pointer; transition: all var(--transition);
    box-shadow: var(--shadow-card);
}
.campaign-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.campaign-card.platform-ms { border-left: 3px solid #7C3AED; }
.campaign-card.platform-eq { border-left: 3px solid #34D399; }

.campaign-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.campaign-name { font-size: 14px; font-weight: 600; color: var(--text-bright); margin-bottom: 8px; line-height: 1.3; }
.campaign-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.campaign-stats { display: flex; gap: 16px; margin-bottom: 10px; }
.campaign-stat-label { font-size: 11px; color: var(--text-dim); display: block; }
.campaign-stat-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.campaign-dates { font-size: 11px; color: var(--text-dim); }

.platform-badge {
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.platform-badge.mediasmart { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
.platform-badge.equativ { background: rgba(52, 211, 153, 0.15); color: #34D399; }

.status-dot {
    width: 10px; height: 10px; border-radius: 50%;
}
.status-dot.active { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.inactive { background: var(--text-dim); }

.status-pill {
    font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 500;
}
.status-pill.active { background: var(--success-bg); color: var(--success); }
.status-pill.inactive { background: rgba(90, 106, 138, 0.15); color: var(--text-dim); }

/* ===== RECOMMENDATIONS ===== */
.recs-list { display: flex; flex-direction: column; gap: 12px; }

.rec-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow-card);
}
.rec-card.severity-critical { border-left: 3px solid #EF4444; }
.rec-card.severity-warning { border-left: 3px solid var(--warning); }
.rec-card.severity-info { border-left: 3px solid var(--info); }
.rec-card.severity-suggestion { border-left: 3px solid var(--text-dim); }

.rec-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.rec-severity {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; border-radius: 3px; letter-spacing: 0.5px;
}
.rec-severity.critical { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.rec-severity.warning { background: var(--warning-bg); color: var(--warning); }
.rec-severity.info { background: var(--info-bg); color: var(--accent); }
.rec-severity.suggestion { background: rgba(90, 106, 138, 0.1); color: var(--text-dim); }

.rec-type { font-size: 12px; color: var(--text-secondary); text-transform: capitalize; }
.rec-time { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.rec-title { font-size: 14px; font-weight: 600; color: var(--text-bright); margin-bottom: 6px; }
.rec-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }

.rec-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-status {
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; text-transform: capitalize;
}
.rec-status.pending { background: var(--warning-bg); color: var(--warning); }
.rec-status.approved, .rec-status.auto_approved { background: var(--success-bg); color: var(--success); }
.rec-status.executed { background: rgba(52, 211, 153, 0.2); color: var(--success); }
.rec-status.rejected { background: var(--error-bg); color: var(--error); }
.rec-status.expired { background: rgba(90, 106, 138, 0.1); color: var(--text-dim); }
.rec-campaign { font-size: 11px; color: var(--text-dim); }

.rec-actions { display: flex; gap: 8px; margin-left: auto; }
.btn-approve {
    padding: 5px 12px; background: var(--success-bg); border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: var(--radius-xs); color: var(--success); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.btn-approve:hover { background: var(--success); color: white; }
.btn-reject {
    padding: 5px 12px; background: var(--error-bg); border: 1px solid rgba(214, 91, 160, 0.3);
    border-radius: var(--radius-xs); color: var(--error); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.btn-reject:hover { background: var(--error); color: white; }

/* ===== RULES ===== */
.rules-list { display: flex; flex-direction: column; gap: 12px; }
.rule-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow-card);
}
.rule-card.inactive { opacity: 0.5; }
.rule-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rule-name { font-size: 14px; font-weight: 600; color: var(--text-bright); }
.rule-type { font-size: 11px; color: var(--text-secondary); text-transform: capitalize; background: var(--bg-elevated); padding: 3px 8px; border-radius: 4px; }
.rule-condition { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.rule-stats { font-size: 11px; color: var(--text-dim); }

/* ===== AUDIT LOG ===== */
.audit-list { display: flex; flex-direction: column; gap: 8px; }
.audit-item {
    padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
}
.audit-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.audit-action { font-size: 13px; font-weight: 600; color: var(--text-bright); }
.audit-source {
    font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.audit-source.source-manual { background: rgba(136, 150, 179, 0.15); color: var(--text-secondary); }
.audit-source.source-ai { background: var(--info-bg); color: var(--accent); }
.audit-source.source-auto_rule { background: var(--warning-bg); color: var(--warning); }
.audit-source.source-system { background: rgba(90, 106, 138, 0.1); color: var(--text-dim); }
.audit-time { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.audit-detail { font-size: 12px; color: var(--text-secondary); display: flex; gap: 8px; flex-wrap: wrap; }
.audit-details-json { font-family: monospace; font-size: 11px; color: var(--text-dim); word-break: break-all; }

/* ===== SETTINGS ===== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
.settings-list { display: flex; flex-direction: column; gap: 8px; }
.settings-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.settings-item:last-child { border-bottom: none; }
.settings-meta { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.settings-form { display: flex; flex-direction: column; gap: 8px; }
.config-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.config-row label { color: var(--text-secondary); }
.config-row span { color: var(--text-bright); font-weight: 500; }
.user-email { color: var(--text-primary); }
.user-role-badge { font-size: 11px; background: var(--info-bg); color: var(--accent); padding: 2px 6px; border-radius: 3px; text-transform: capitalize; }
.org-name { color: var(--text-primary); font-weight: 500; }
.org-type { font-size: 11px; color: var(--text-secondary); text-transform: capitalize; }

/* ===== MODAL ===== */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6); z-index: 200;
    align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }

.modal-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); width: 500px; max-width: 95vw;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-elevated);
}
.modal-large { width: 720px; }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1em; font-weight: 600; color: var(--text-bright); }
.modal-close {
    background: none; border: none; color: var(--text-secondary);
    font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close:hover { background: var(--bg-elevated); color: var(--text-bright); }

.modal-body { padding: 20px; }
.modal-body label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; margin-top: 12px; }
.modal-body input, .modal-body select {
    width: 100%; padding: 10px 12px; background: var(--bg-input);
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    color: var(--text-primary); font-size: 14px; outline: none;
}
.modal-body input:focus, .modal-body select:focus { border-color: var(--accent); }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }

.modal-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.modal-section:last-child { border-bottom: none; margin-bottom: 0; }
.modal-section h3 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 11px; color: var(--text-dim); }

.action-buttons { display: flex; gap: 8px; }

.snapshot-table { overflow-x: auto; }
.snapshot-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.snapshot-table th { text-align: left; padding: 8px; color: var(--text-secondary); border-bottom: 1px solid var(--border); font-weight: 500; }
.snapshot-table td { padding: 8px; color: var(--text-primary); border-bottom: 1px solid var(--border); }

.edit-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 0;
    border-bottom: 1px solid var(--border); font-size: 12px; flex-wrap: wrap;
}
.edit-type { font-weight: 600; color: var(--text-secondary); text-transform: capitalize; }
.edit-field { color: var(--text-primary); }
.edit-status { font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.edit-status.applied { background: var(--success-bg); color: var(--success); }
.edit-status.failed { background: var(--error-bg); color: var(--error); }
.edit-time { font-size: 11px; color: var(--text-dim); margin-left: auto; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center; padding: 40px 20px;
    color: var(--text-dim); font-size: 14px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .topbar { left: 0; }
    .topbar-menu { display: block; }
    .page { margin-left: 0; }
    .campaigns-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}