/* ===== Layout ===== */
body {
    background-color: #f0f2f5;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0d1b2a 0%, #1b2838 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
    transition: width 0.2s ease;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .fs-5,
.sidebar.collapsed small {
    display: none;
}

.sidebar .nav-link {
    color: #adb5bd;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.15s;
    white-space: nowrap;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.main-content {
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Cards ===== */
.card {
    border-radius: 12px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
}

/* ===== Campaign / Job cards ===== */
.campaign-card {
    transition: transform 0.15s, box-shadow 0.15s;
}

.campaign-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

/* ===== Log box ===== */
.log-box {
    min-height: 200px;
    max-height: 500px;
    font-size: 12px;
    line-height: 1.4;
}

/* ===== Buttons ===== */
.btn-xs {
    padding: 2px 8px;
    font-size: 12px;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
}

/* ===== Status badges ===== */
.badge-pendiente { background-color: #ffc107; color: #000; }
.badge-enviado { background-color: #198754; }
.badge-error { background-color: #dc3545; }
.badge-desuscrito { background-color: #6c757d; }
.badge-running { background-color: #0d6efd; }
.badge-completed { background-color: #198754; }
.badge-cancelled { background-color: #6c757d; }
.badge-idle { background-color: #0dcaf0; color: #000; }

/* ===== Table ===== */
.table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-top: none;
}

.table td {
    font-size: 13.5px;
    vertical-align: middle;
}

/* ===== Offcanvas ===== */
.offcanvas-header {
    background-color: #f8f9fa;
}

/* ===== Form controls ===== */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* ===== Tabs ===== */
.nav-tabs .nav-link {
    color: #6c757d;
    font-size: 14px;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    color: #0d6efd;
}

/* ===== Toast ===== */
.toast-container .toast {
    min-width: 280px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 64px;
    }
    .sidebar .nav-link span,
    .sidebar .fs-5,
    .sidebar small {
        display: none;
    }
}

/* ===== Progress bar animation ===== */
.progress-bar-striped.progress-bar-animated {
    animation: progress-bar-stripes 0.75s linear infinite;
}

/* ===== Scrollbar ===== */
.log-box::-webkit-scrollbar { width: 6px; }
.log-box::-webkit-scrollbar-track { background: #1a1a2e; }
.log-box::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
