:root {
    --sidebar-width: 260px;
    --primary-color: #4e73df;
    --bg-light: #f8f9fc;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* SIDEBAR FIXED POSITIONING */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed; /* Keeps it on the screen while scrolling */
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.05);
}

/* MAIN CONTENT SPACING */
.main-content {
    margin-left: var(--sidebar-width); /* Push content to the right of sidebar */
    width: calc(100% - var(--sidebar-width)); /* Take up remaining width */
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
}

/* NAV LINK SPACING */
.nav-pills .nav-link {
    margin: 4px 12px; /* Add breathing room around menu items */
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.2rem;
    width: 25px; /* Keeps icons perfectly aligned vertically */
}

/* RESPONSIVENESS (Mobile) */
/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width)); /* Start off-screen */
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
    }
    
    .sidebar.show {
        left: 0; /* Slide in */
    }

    .main-content {
        margin-left: 0; /* Content takes full width */
        width: 100%;
        padding: 1rem;
    }

    /* Overlay to dim the background when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* Stat Cards Enhancement */
.stat-card {
    border-radius: 15px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Campaign Card Styling */
.campaign-card {
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.campaign-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

/* Status Badges */
.badge-running { background-color: rgba(28, 200, 138, 0.1); color: var(--success); border: 1px solid var(--success); }
.badge-paused { background-color: rgba(246, 194, 62, 0.1); color: var(--warning); border: 1px solid var(--warning); }
.badge-draft { background-color: rgba(133, 135, 150, 0.1); color: #858796; border: 1px solid #858796; }

/* Mini Stats within the list */
.stat-box {
    text-align: center;
    padding: 10px;
    border-right: 1px solid #edf0f5;
}

.stat-box:last-child { border-right: none; }

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2e3d50;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9ea8b9;
}

.toast {
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.bg-success {
    background-color: #1cc88a !important; /* Professional green */
}
.bg-success-subtle { background-color: #d1f7e4 !important; }
.bg-warning-subtle { background-color: #fff4e0 !important; }
.bg-info-subtle    { background-color: #e0f2ff !important; }
.badge.bg-success-subtle { background-color: #e6fcf5 !important; }
.badge.bg-info-subtle { background-color: #e7f5ff !important; }
.badge.bg-primary-subtle { background-color: #edf2ff !important; }
.badge.bg-danger-subtle { background-color: #fff5f5 !important; }

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #6c757d;
    padding: 15px;
    border-top: none;
    letter-spacing: 0.05rem;
}
.table tbody td {
    padding: 15px;
    background-color: #fcfdfe !important;
}

.btn-white {
    background: #fff;
    transition: all 0.2s ease;
}
.btn-white:hover {
    background: #f8f9fa;
    border-color: #adb5bd !important;
    transform: translateY(-1px);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Optional: Add a subtle pulse animation to the green dot */
.bg-success.status-dot {
    box-shadow: 0 0 0 rgba(25, 135, 84, 0.4);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(25, 135, 84, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

.stats-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
}

.progress-bar {
    background-color: #4e73df;
    border-radius: 10px;
}

h3 {
    letter-spacing: -0.5px;
}

/* Import Leads page enhancements */
.import-card {
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #f4f7ff);
    border: 1px solid #e4e9f7;
    box-shadow: 0 10px 30px rgba(18, 42, 85, 0.08);
    overflow: hidden;
}

.import-card .card-body {
    background: #ffffff;
    padding: 2rem;
}

.import-card .form-label {
    font-weight: 600;
    color: #344767;
}

.import-card .form-control {
    border: 1px solid #dbe4f7;
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(25, 39, 66, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.import-card .form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.20);
}

.import-card .btn-primary {
    border-radius: 10px;
    padding: 0.62rem 1.2rem;
    box-shadow: 0 8px 16px rgba(44, 89, 255, 0.16);
}

.import-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(44, 89, 255, 0.24);
}

.import-card pre {
    background: #f0f4ff;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.9rem;
    color: #3c4f75;
}

@media (max-width: 768px) {
    .import-card .card-body {
        padding: 1rem;
    }
}

.column-header-panel {
    border-top: 3px solid #4e73df;
    background: #f1f5ff;
    border: 1px solid #dbe4f7;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.column-header-panel h5 {
    font-size: 1rem;
    color: #2a3f73;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.column-header-panel .form-label {
    color: #374a86;
    font-weight: 600;
}
/* Hidden by default: the simple preview */
.simple-view-editor {
    background-color: #fff;
    border: 1px solid #ced4da;
    padding: .375rem .75rem;
    overflow-y: auto;
}

.simple-view-editor:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Optional: Make the HTML view look more "code-like" */
.html-view-editor {
    font-family: monospace;
    background-color: #212529;
    color: #00ff41; /* Matrix green code style */
}