/* ============================================
   PRESSEPORTAL PRO — Design System CSS
   Version: 0.1.0
   Made with <3 by CREATIVPIXEL
   ============================================ */

/* --- Self-Hosted Fonts (DSGVO-konform) --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Primary */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --primary-50: #EFF6FF;

    /* Neutrals */
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;

    /* Status */
    --success: #059669;
    --success-light: #D1FAE5;
    --success-dark: #065F46;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --warning-dark: #92400E;
    --error: #DC2626;
    --error-light: #FEE2E2;
    --error-dark: #991B1B;
    --info: #7C3AED;
    --info-light: #EDE9FE;
    --info-dark: #5B21B6;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Border & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --border: 1px solid #D1D5DB;
    --border-light: 1px solid #E5E7EB;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);

    /* Layout */
    --sidebar-width: 256px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;
    --content-max-width: 1280px;
}

/* --- Typography --- */
.text-display { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.text-h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.text-h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.text-h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.text-body { font-size: 1rem; font-weight: 400; line-height: 1.5; }
.text-body-sm { font-size: 0.875rem; font-weight: 400; line-height: 1.5; }
.text-caption { font-size: 0.75rem; font-weight: 400; line-height: 1.4; }
.text-label { font-size: 0.875rem; font-weight: 500; line-height: 1.4; }

.text-gray-500 { color: var(--gray-500); }
.text-gray-700 { color: var(--gray-700); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-white { color: var(--white); }

/* --- Layout: App Shell --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 30;
    transition: transform 0.2s ease-out;
}

.sidebar-header {
    padding: var(--space-5);
    border-bottom: var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    height: var(--topbar-height);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.875rem;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) 0;
    overflow-y: auto;
}

.nav-section {
    padding: var(--space-2) var(--space-4);
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    padding: var(--space-2) var(--space-3);
    margin-top: var(--space-2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    margin: 1px var(--space-2);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-item svg, .nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-sub-item {
    padding-left: calc(var(--space-3) + 20px + var(--space-3));
    font-size: 0.8125rem;
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: var(--border-light);
    text-align: center;
}

.sidebar-footer span {
    font-size: 0.6875rem;
    color: var(--gray-400);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--gray-700);
}

.page-content {
    flex: 1;
    padding: var(--space-6) var(--space-8);
    max-width: var(--content-max-width);
    width: 100%;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border-color: var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--primary); }

.btn-danger {
    background: var(--error);
    color: var(--white);
    border-color: var(--error);
}
.btn-danger:hover { background: #B91C1C; }

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--primary-50); }

.btn-sm { padding: var(--space-2) var(--space-3); font-size: 0.8125rem; }
.btn-lg { padding: var(--space-3) var(--space-6); font-size: 1rem; min-height: 48px; }

.btn-icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-1);
}

.form-label .required {
    color: var(--error);
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 var(--space-3);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-light);
}

.form-input::placeholder {
    color: var(--gray-400);
}

textarea.form-input {
    height: auto;
    padding: var(--space-3);
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-1);
}

.form-error {
    font-size: 0.75rem;
    color: var(--error);
    margin-top: var(--space-1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* --- Cards --- */
.card {
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    padding: var(--space-4) var(--space-5);
    border-top: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* --- Stat Cards --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    font-size: 1.25rem;
}

.stat-card-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.green { background: var(--success-light); color: var(--success); }
.stat-card-icon.purple { background: var(--info-light); color: var(--info); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-draft { background: var(--gray-100); color: var(--gray-700); }
.badge-draft .badge-dot { background: var(--gray-500); }

.badge-pending { background: var(--warning-light); color: var(--warning-dark); }
.badge-pending .badge-dot { background: var(--warning); }

.badge-approved { background: var(--primary-light); color: #1E40AF; }
.badge-approved .badge-dot { background: var(--primary); }

.badge-published { background: var(--success-light); color: var(--success-dark); }
.badge-published .badge-dot { background: var(--success); }

.badge-scheduled { background: var(--info-light); color: var(--info-dark); }
.badge-scheduled .badge-dot { background: var(--info); }

.badge-failed { background: var(--error-light); color: var(--error-dark); }
.badge-failed .badge-dot { background: var(--error); }

.badge-sent { background: var(--success-light); color: var(--success-dark); }
.badge-sent .badge-dot { background: var(--success); }

.badge-verified { background: var(--success-light); color: var(--success-dark); }
.badge-verified .badge-dot { background: var(--success); }

/* --- Tables --- */
.table-container {
    overflow-x: auto;
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
}

th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: var(--border);
}

td {
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: var(--border-light);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.tag-remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 0.875rem;
    line-height: 1;
}
.tag-remove:hover { opacity: 1; }

/* --- Avatar --- */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.6875rem; }
.avatar-lg { width: 44px; height: 44px; font-size: 1rem; }

/* --- Activity / Audit Log --- */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.activity-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.4;
}

.activity-text strong {
    color: var(--gray-900);
    font-weight: 600;
}

.activity-diff {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-input .form-input {
    padding-left: 36px;
}

.search-input .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* --- Dropdown / Select --- */
.tenant-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
}

.tenant-selector:hover {
    border-color: var(--primary);
}

.tenant-selector-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-right: var(--space-1);
}

/* --- User Menu --- */
.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
}

.user-menu:hover {
    background: var(--gray-100);
}

.user-menu-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.user-menu-role {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

/* --- Notification Bell --- */
.notification-bell {
    position: relative;
    padding: var(--space-2);
    cursor: pointer;
    border-radius: var(--radius-md);
    color: var(--gray-500);
    font-size: 1.25rem;
}

.notification-bell:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--error);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* --- Toasts --- */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    min-width: 320px;
    max-width: 400px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.875rem;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: var(--success-light);
    border-left: 4px solid var(--success);
    color: var(--success-dark);
}

.toast-error {
    background: var(--error-light);
    border-left: 4px solid var(--error);
    color: var(--error-dark);
}

.toast-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.125rem;
    background: none;
    border: none;
    color: inherit;
}
.toast-close:hover { opacity: 1; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Wizard Steps --- */
.wizard-steps {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-8);
    padding: 0 var(--space-4);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-400);
}

.wizard-step.active {
    color: var(--primary);
}

.wizard-step.completed {
    color: var(--success);
}

.wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 2px solid currentColor;
    flex-shrink: 0;
}

.wizard-step.active .wizard-step-number {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.wizard-step.completed .wizard-step-number {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.wizard-step-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    margin: 0 var(--space-3);
    min-width: 32px;
}

.wizard-step-line.completed {
    background: var(--success);
}

/* --- Info Box --- */
.info-box {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.info-box-blue {
    background: var(--primary-50);
    border: 1px solid var(--primary-light);
    color: #1E40AF;
}

.info-box-green {
    background: var(--success-light);
    border: 1px solid #A7F3D0;
    color: var(--success-dark);
}

.info-box-yellow {
    background: var(--warning-light);
    border: 1px solid #FDE68A;
    color: var(--warning-dark);
}

/* --- Verification Status --- */
.verification-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.verification-verified {
    background: var(--success-light);
    color: var(--success-dark);
}

.verification-unverified {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.verification-none {
    background: var(--error-light);
    color: var(--error-dark);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 1.75rem;
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    max-width: 360px;
    margin: 0 auto var(--space-5);
}

/* --- Confirm Dialog --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    margin: var(--space-4);
    animation: modalIn 0.2s ease;
}

.modal-header {
    padding: var(--space-5) var(--space-5) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: var(--space-4) var(--space-5);
}

.modal-footer {
    padding: 0 var(--space-5) var(--space-5);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

@keyframes modalIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Section Divider --- */
.divider {
    border: none;
    border-top: var(--border-light);
    margin: var(--space-5) 0;
}

/* --- Misc Utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }

/* --- Responsive --- */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: flex;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        max-width: none;
    }

    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
    }

    .wizard-step span:not(.wizard-step-number) {
        display: none;
    }
}

/* --- Auth Layout (Login) --- */
.auth-layout {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    color: var(--white);
}

.auth-left-content {
    max-width: 420px;
    text-align: center;
}

.auth-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.auth-left p {
    font-size: 1.125rem;
    opacity: 0.85;
    line-height: 1.6;
}

.auth-left-features {
    margin-top: var(--space-8);
    text-align: left;
}

.auth-left-features li {
    list-style: none;
    padding: var(--space-2) 0;
    font-size: 0.9375rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: var(--white);
}

.auth-form {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-form-logo {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto var(--space-4);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-8);
    font-size: 0.75rem;
    color: var(--gray-400);
}

@media (max-width: 767px) {
    .auth-left {
        display: none;
    }

    .auth-right {
        flex: 1;
    }
}

/* --- Campaign Performance --- */
.campaign-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    border-bottom: var(--border-light);
}

.campaign-stat:last-child {
    border-bottom: none;
}

.campaign-stat-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.campaign-stat-bar {
    flex: 1;
    margin: 0 var(--space-4);
    height: 6px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.campaign-stat-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary);
    transition: width 0.3s ease;
}

.campaign-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 40px;
    text-align: right;
}

/* --- SMTP Config Help --- */
.smtp-providers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
}

.smtp-provider {
    padding: var(--space-2) var(--space-3);
    border: var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s;
}

.smtp-provider:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.smtp-provider strong {
    display: block;
    color: var(--gray-900);
    font-size: 0.8125rem;
}
