/* Bulk page is wrapped in .rankbot-v2 — align its tokens to the Sunset Premium system. */
.rb-bulk-wrap {
    --rb-primary: #7e57c2;
    --rb-primary-hover: #6d4ab0;
    --rb-grad: linear-gradient(135deg, #ff5f6d 0%, #ff9966 35%, #f06292 65%, #7e57c2 100%);
    --rb-bg: #faf8fb;
    --rb-card-bg: #ffffff;
    --rb-border: #ece9f1;
    --rb-border-strong: #d9d4e3;
    --rb-text-main: #14111f;
    --rb-text-secondary: #6b6580;
    --rb-danger: #dc2626;
}

.rb-bulk-wrap {
    max-width: none;
    width: auto;            /* fill the admin content area without overflowing off-screen */
    margin: 10px 0;
    padding: 0 20px 96px 0; /* right gap so the table never touches the edge; room for bottom bar */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--rb-text-main);
    box-sizing: border-box;
}

.rb-bulk-wrap * {
    box-sizing: border-box;
}

/* Disabled state for action buttons (prevents confusing "clickable" look) */
.rb-bulk-wrap button:disabled,
.rb-bulk-wrap .rb-run-one:disabled,
.rb-bulk-wrap .rb-icon-btn-secondary:disabled,
.rb-bulk-wrap .rb-btn-auto-lg:disabled,
.rb-bulk-wrap [data-bulk-action]:disabled,
.rb-bulk-wrap [data-selected-action]:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.rb-sticky-bar.rb-locked {
    opacity: 0.7;
}

/* Active job row (queued/processing) */
.rb-row-active-job {
    background: #f8fafc;
}

/* Header */
.rb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px; /* More header spacing */
}

/* ... */
/* Styles for Status Tabs */
.rb-status-tabs {
    display: inline-flex;
    background: #f3f4f6; /* Lighter bg */
    padding: 4px; /* More breathing room */
    border-radius: 8px;
    gap: 4px;
    border: 1px solid var(--rb-border);
}
.rb-status-tab {
    position: relative;
    cursor: pointer;
}
.rb-status-tab input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.rb-status-tab .rb-tab-label {
    display: inline-block;
    padding: 8px 16px; /* Larger click targets */
    border-radius: 6px;
    font-size: 14px; /* Larger text */
    font-weight: 500;
    color: var(--rb-text-secondary);
    transition: all 0.2s;
}
.rb-status-tab input:checked + .rb-tab-label {
    background: #fff;
    color: var(--rb-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Softer shadow */
    font-weight: 600;
}

/* Dual Slider */
.rb-dual-slider {
    position: relative;
    height: 36px;
    width: 100%;
}
.rb-dual-slider input[type="range"] {
    position: absolute;
    pointer-events: none;
    -webkit-appearance: none;
    z-index: 2;
    height: 10px;
    width: 100%;
    opacity: 0;
    top: 5px; /* Alignment fix */
}
.rb-dual-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 16px;
    height: 16px;
    -webkit-appearance: none;
    background-color: white;
    border: 2px solid var(--rb-primary);
    border-radius: 50%;
    cursor: pointer;
}
.rb-dual-slider .rb-slider-track {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    position: absolute;
    top: 15px;
    z-index: 1;
}
.rb-dual-slider .rb-slider-range {
    height: 6px;
    background: var(--rb-primary);
    border-radius: 99px;
    position: absolute;
    top: 15px;
    z-index: 1;
}
/* Visual thumbs using pseudo-elements logic will be JS controlled, but let's use standard range inputs with opacity trick or just rely on native inputs styled properly */
/* Simplifying: The inputs should be visible for interaction. We use JS to update visual bar, but inputs need to be clickable. */
.rb-dual-slider input[type="range"] {
    opacity: 1;
    background: none; /* Transparent track so we see our custom divs */
    z-index: 3;
    top: 12px;
    margin: 0;
}
.rb-dual-slider input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
}
/* We need to offset the inputs slightly or handle pointer events cleverly so they don't block each other */
/* Actually, standard stacked range inputs are tricky. Let's assume JS will handle the z-index swapping or pointer events. */


.rb-filtered-grid .rb-filter-item {
    margin-bottom: 24px; /* More vertical space between rows if wrapped */
}

/* Card General */
.rb-card {
    background: var(--rb-card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); /* Enhanced shadow */
    border: 1px solid var(--rb-border);
    overflow: visible; /* Changed for dropdowns/popovers if needed */
    margin-bottom: 32px; /* Increased margin below cards */
}

.rb-card-header {
    padding: 24px 32px; /* Increased padding */
    background: #fff;
    font-weight: 600;
    font-size: 16px; /* Larger header text */
    color: var(--rb-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--rb-border);
}

.rb-card-body {
    padding: 32px; /* Increased padding */
    border-top: none; 
    background: #fff; /* Keep white for cleaner look, removed grey bg for filters */
}

/* Filter Grid Spacing */
.rb-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px; /* Increased gap */
    align-items: start;
}

/* Updated Sticky Bar */
.rb-sticky-bar {
    position: fixed;
    bottom: 40px; /* Higher */
    /* Left is set by JS now */
    left: 50%; 
    transform: translateX(-50%) translateY(200%);
    background: #111827; /* Darker */
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Deep shadow */
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 480px; /* Even wider */
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.08);
}


.rb-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--rb-text-main);
    margin: 0;
}

/* Card General */
.rb-card {
    background: var(--rb-card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid var(--rb-border);
    overflow: hidden;
    margin-bottom: 20px;
}

.rb-card-header {
    padding: 16px 24px;
    background: #fff;
    font-weight: 600;
    font-size: 15px;
    color: var(--rb-text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; /* Hide default summary marker */
}
.rb-card-header::-webkit-details-marker {
    display: none;
}

.rb-card-body {
    padding: 24px;
    border-top: 1px solid var(--rb-border);
    background: #f9fafb;
}

/* Filter Summary Chevron Animation */
.rb-summary-chevron {
    transition: transform 0.2s ease;
}
details[open] .rb-summary-chevron {
    transform: rotate(180deg);
}

/* Filter Grid */
.rb-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}
.rb-filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rb-filter-item.rb-span-full {
    grid-column: 1 / -1; /* Full width */
}
/* Responsive Grid */
@media (max-width: 1200px) {
    .rb-filter-grid { grid-template-columns: repeat(2, 1fr); }
    .rb-filter-item.rb-span-full { grid-column: span 2; }
}
@media (max-width: 768px) {
    .rb-filter-grid { grid-template-columns: 1fr; }
}

/* Form Elements */
.rb-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rb-text-main);
}

.rb-input, .rb-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--rb-border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
.rb-input:focus, .rb-select:focus {
    border-color: var(--rb-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Checkbox Pills */
.rb-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rb-checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--rb-border);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.rb-checkbox-pill:hover {
    border-color: #d1d5db;
    background: #fdfdfd;
}
.rb-checkbox-pill input:checked + span {
    font-weight: 500;
    color: var(--rb-primary);
}
.rb-checkbox-pill:has(input:checked) {
    border-color: var(--rb-primary);
    background: #eef2ff;
}

/* Filter Actions */
.rb-filter-actions {
    flex-direction: row;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 2px;
}

/* Buttons — aligned to the v2 Sunset system */
.rb-bulk-wrap .rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--rb-border-strong);
    background: #fff;
    color: var(--rb-text-main);
    text-decoration: none;
    line-height: normal;
}
.rb-bulk-wrap .rb-btn:hover {
    background: var(--rb-bg);
    border-color: var(--rb-primary);
    color: var(--rb-primary);
    transform: translateY(-1px);
}
.rb-bulk-wrap .rb-btn:focus {
    box-shadow: 0 0 0 3px rgba(126,87,194,.18);
    outline: none;
}
.rb-bulk-wrap .rb-btn-primary,
.rb-bulk-wrap .rb-btn-primary:hover {
    background-color: #f06292;
    background-image: var(--rb-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px -8px rgba(240,98,146,.5), inset 0 1px 0 rgba(255,255,255,.25);
}
.rb-bulk-wrap .rb-btn-primary:hover { transform: translateY(-2px); }
.rb-bulk-wrap .rb-btn-secondary {
    background: #fff;
    border-color: var(--rb-border-strong);
    color: var(--rb-text-main);
}
.rb-bulk-wrap .rb-btn-secondary:hover {
    background: var(--rb-bg);
    border-color: var(--rb-primary);
    color: var(--rb-primary);
}
.rb-bulk-wrap .rb-btn-dark {
    background: #14111f;
    color: #fff;
    border: 1px solid #2a2538;
}
.rb-bulk-wrap .rb-btn-dark:hover { background: #2a2538; color: #fff; }
.rb-bulk-wrap .rb-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}
.rb-bulk-wrap .rb-btn-icon {
    padding: 6px;
    color: var(--rb-text-secondary);
    background: transparent;
    border-color: transparent;
}
.rb-bulk-wrap .rb-btn-icon:hover {
    background: var(--rb-bg);
    color: var(--rb-primary);
}

/* Table */
.rb-table-container {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--rb-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}
.rb-table {
    width: 100%;
    border-collapse: collapse;
}
.rb-table th {
    background: #f9fafb;
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rb-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--rb-border);
}
.rb-table td {
    padding: 14px 16px; /* slightly taller rows */
    border-bottom: 1px solid var(--rb-border);
    font-size: 14px;
    color: var(--rb-text-main);
    vertical-align: middle;
}
.rb-table tr:hover td {
    background: #fafafa;
}
.rb-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.rb-table tr:hover .rb-row-actions {
    opacity: 1;
}

/* Badges */
.rb-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
}
.rb-badge-blue { background: #eff6ff; color: #1e40af; }
.rb-badge-gray { background: #f3f4f6; color: #374151; }
.rb-badge-green { background: #ecfdf5; color: #065f46; }

/* Sticky Selection Bar */
.rb-sticky-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    background: #1f2937;
    color: white;
    padding: 10px 20px;
    border-radius: 100px; /* Pill shape */
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 320px;
    border: 1px solid rgba(255,255,255,0.1);
}
.rb-sticky-bar.is-visible {
    transform: translateX(-50%) translateY(0);
}
.rb-sticky-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Progress Section */
.rb-progress-container {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--rb-border);
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.rb-progress-track {
    height: 10px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
}
.rb-progress-bar {
    height: 100%;
    background: var(--rb-primary);
    width: 0%;
    border-radius: 99px;
    transition: width 0.3s ease;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
    animation: rb-progress-stripes 1s linear infinite;
}
@keyframes rb-progress-stripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* Pagination */
.rb-mini-pagination {
    display: flex;
    gap: 4px;
}
.rb-mini-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--rb-border);
    background: white;
    text-decoration: none;
    color: var(--rb-text-main);
    font-size: 13px;
}
.rb-mini-pagination .page-numbers.current {
    background: var(--rb-primary);
    color: white;
    border-color: var(--rb-primary);
}

/* Pagination Footer */
.rb-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--rb-border);
}

.rb-per-page-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rb-label-sm {
    font-size: 13px;
    font-weight: 500;
    color: var(--rb-text-secondary);
}

.rb-input-number-sm {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--rb-border);
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    color: var(--rb-text-main);
}
.rb-input-number-sm:focus {
    border-color: var(--rb-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.rb-pagination-list {
    display: flex;
    gap: 6px;
}

.rb-pagination-list .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--rb-text-main);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--rb-border);
    transition: all 0.2s;
    font-weight: 500;
}

.rb-pagination-list .page-numbers.current {
    background: var(--rb-primary);
    border-color: var(--rb-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.rb-pagination-list .page-numbers:hover:not(.current) {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #000;
}

.rb-pagination-list .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    color: var(--rb-text-secondary);
}

/* ============================================================
   v2.0 Sunset harmonization (scoped to .rb-bulk-wrap so it wins
   over the older blue styles from rankbot-admin-views.css).
   ============================================================ */

/* Search */
.rb-bulk-wrap .rb-search-wrap input { border-radius: 10px; border-color: var(--rb-border-strong); }
.rb-bulk-wrap .rb-search-wrap input:focus { border-color: var(--rb-primary); box-shadow: 0 0 0 3px rgba(126,87,194,.18); }

/* Status segmented tabs */
.rb-bulk-wrap .rb-status-tabs-group { background: var(--rb-bg); }
.rb-bulk-wrap .rb-status-radio:checked + .rb-status-label { background: #fff; color: var(--rb-primary); box-shadow: 0 1px 3px rgba(126,87,194,.18); }

/* Filter pills */
.rb-bulk-wrap .rb-pill-check span { border-radius: 8px; border-color: var(--rb-border-strong); }
.rb-bulk-wrap .rb-pill-check input:checked + span {
    border-color: var(--rb-primary);
    background: linear-gradient(135deg, rgba(255,95,109,.10), rgba(126,87,194,.10));
    color: var(--rb-primary);
    font-weight: 600;
}

/* Row "Auto-Optimize" button → sunset gradient */
.rb-bulk-wrap .rb-btn-auto-lg {
    background-image: var(--rb-grad); background-color: #f06292;
    box-shadow: 0 4px 12px -2px rgba(240,98,146,.4);
}
.rb-bulk-wrap .rb-btn-auto-lg:hover { background-image: var(--rb-grad); filter: brightness(1.04); transform: translateY(-2px); }
.rb-bulk-wrap .rb-icon-btn-secondary { border-radius: 8px; border-color: var(--rb-border-strong); }
.rb-bulk-wrap .rb-icon-btn-secondary:hover { border-color: var(--rb-primary); color: var(--rb-primary); }

/* Checkboxes — native, recolored + comfortable size */
.rb-bulk-wrap input[type="checkbox"] {
    accent-color: #7e57c2;
    width: 18px; height: 18px;
    border-radius: 5px;
    cursor: pointer;
    vertical-align: middle;
}
.rb-bulk-wrap .check-column { width: 44px; }

/* Table polish */
.rb-bulk-wrap .rb-table-container { border-radius: 14px; border-color: var(--rb-border); }
.rb-bulk-wrap .rb-table th { background: var(--rb-bg); letter-spacing: .04em; }
.rb-bulk-wrap .rb-table tr:hover td { background: var(--rb-bg); }
.rb-bulk-wrap .rb-row-active-job { background: linear-gradient(90deg, rgba(255,95,109,.05), rgba(126,87,194,.05)); }
.rb-bulk-wrap .rb-badge-blue { background: #dbeafe; color: #2563eb; }
.rb-bulk-wrap .rb-badge-green { background: #dcfce7; color: #16a34a; }
.rb-bulk-wrap .rb-badge-gray { background: var(--rb-bg); color: var(--rb-text-secondary); }
.rb-bulk-wrap .rb-job-status-pill { background: linear-gradient(135deg, rgba(255,95,109,.12), rgba(126,87,194,.12)) !important; color: #7e57c2 !important; }

/* Pagination current → sunset gradient */
.rb-bulk-wrap .rb-mini-pagination .page-numbers.current,
.rb-bulk-wrap .rb-pagination-list .page-numbers.current {
    background-image: var(--rb-grad); background-color: #f06292; border-color: transparent; color: #fff;
}
.rb-bulk-wrap .rb-input-number-sm:focus { border-color: var(--rb-primary); box-shadow: 0 0 0 3px rgba(126,87,194,.18); }

/* Persistent bottom action bar — refined dark-violet glass */
.rb-bulk-wrap ~ #rb-selected-bar,
#rb-selected-bar.rb-sticky-bar {
    background: linear-gradient(135deg, #1a1230 0%, #241636 100%);
    border: 1px solid rgba(126,87,194,.35);
    box-shadow: 0 24px 48px -12px rgba(20,17,31,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
    padding: 12px 16px 12px 20px;
    min-width: 520px; max-width: min(820px, 92vw);
    gap: 18px;
}
#rb-selected-bar .rb-bar-ico {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.10); color: #ffb3bd;
}
#rb-selected-bar .rb-bar-ico.ok { color: #86efac; }
#rb-selected-bar .rb-bar-ico .dashicons { font-size: 18px; width: 18px; height: 18px; }
#rb-selected-bar .rb-btn-dark {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff;
}
#rb-selected-bar .rb-btn-dark:hover { background: rgba(255,255,255,.16); color: #fff; }
#rb-selected-bar .rb-btn[disabled], #rb-selected-bar .rb-btn:disabled { opacity: .5; }

/* AI Stream — compact so the queue table stays the focus */
.rb-bulk-wrap #rb-ai-stream { height: 150px !important; }
.rb-bulk-wrap #rb-ai-stream-idle .dashicons { font-size: 34px !important; width: 34px !important; height: 34px !important; }
.rb-bulk-wrap #rb-ai-stream-card .rb-card-header { padding: 12px 18px; }

/* Destructive / warning button variants (consistent shape, semantic colour) */
.rb-bulk-wrap .rb-btn-danger { color: #dc2626; border-color: #fecaca; background: #fff; }
.rb-bulk-wrap .rb-btn-danger:hover { background: #fef2f2; border-color: #f87171; color: #dc2626; }
.rb-bulk-wrap .rb-btn-warn { color: #b45309; border-color: #fed7aa; background: #fff; }
.rb-bulk-wrap .rb-btn-warn:hover { background: #fff7ed; border-color: #fb923c; color: #b45309; }
.rb-bulk-wrap .rb-actions-row { flex-wrap: wrap; gap: 8px; }

/* Leave room so the persistent bottom bar never covers the last rows / pagination */
.rb-bulk-wrap { padding-bottom: 96px; }

/* ============================================================
   v2.0 Filters — clean, grouped, modern (replaces the scattered toolbar)
   ============================================================ */
.rb-bulk-wrap .rb-filters2 { display: flex; flex-direction: column; gap: 18px; }
.rb-bulk-wrap .rb-filters2-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rb-bulk-wrap .rb-search2 { flex: 1; min-width: 240px; width: auto; }
.rb-bulk-wrap .rb-search2 input { height: 40px; border-radius: 10px; }

/* Segmented view control */
.rb-bulk-wrap .rb-seg { display: inline-flex; background: var(--rb-bg); border: 1px solid var(--rb-border); border-radius: 10px; padding: 3px; gap: 2px; }
.rb-bulk-wrap .rb-seg-item { position: relative; }
.rb-bulk-wrap .rb-seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rb-bulk-wrap .rb-seg-item span { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--rb-text-secondary); cursor: pointer; white-space: nowrap; transition: all .15s; user-select: none; }
.rb-bulk-wrap .rb-seg-item input:checked + span { background: #fff; color: var(--rb-primary); box-shadow: 0 1px 3px rgba(126,87,194,.22); }
.rb-bulk-wrap .rb-seg-item span:hover { color: var(--rb-text-main); }

/* Grouped filter grid */
.rb-bulk-wrap .rb-filter-grid { display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: start; }
.rb-bulk-wrap .rb-filter-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rb-bulk-wrap .rb-filter-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: #9a96ab; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rb-bulk-wrap .rb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-bulk-wrap .rb-pills .rb-pill-check { margin: 0; }
.rb-bulk-wrap .rb-pills .rb-pill-check span { padding: 7px 14px; border-radius: 99px; font-size: 13px; }
.rb-bulk-wrap .rb-score-badge { font-size: 12px; font-weight: 700; color: var(--rb-primary); background: linear-gradient(135deg, rgba(255,95,109,.12), rgba(126,87,194,.12)); border-radius: 99px; padding: 2px 10px; letter-spacing: 0; }
.rb-bulk-wrap .rb-filter-score { min-width: 220px; }
.rb-bulk-wrap .rb-filter-score .rb-dual-slider { margin-top: 14px; }

/* Footer */
.rb-bulk-wrap .rb-filters2-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--rb-border); }
.rb-bulk-wrap .rb-filters2-hint { font-size: 12px; color: var(--rb-text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.rb-bulk-wrap .rb-filters2-hint .dashicons { color: var(--rb-primary); font-size: 16px; width: 16px; height: 16px; }

/* Maintenance dropdown menu in the header */
.rb-bulk-wrap .rb-menu { position: relative; display: inline-block; }
.rb-bulk-wrap .rb-menu-btn { padding: 9px 10px; }
.rb-bulk-wrap .rb-menu-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }
.rb-bulk-wrap .rb-menu-list { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; z-index: 200; background: #fff; border: 1px solid var(--rb-border); border-radius: 12px; box-shadow: 0 24px 48px -12px rgba(20,17,31,.18), 0 8px 16px -4px rgba(20,17,31,.08); padding: 6px; display: none; }
.rb-bulk-wrap .rb-menu.open .rb-menu-list { display: block; }
.rb-bulk-wrap .rb-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--rb-text-main); transition: background .12s; }
.rb-bulk-wrap .rb-menu-item .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--rb-text-secondary); }
.rb-bulk-wrap .rb-menu-item:hover { background: var(--rb-bg); }
.rb-bulk-wrap .rb-menu-item.rb-menu-item-warn { color: #b45309; }
.rb-bulk-wrap .rb-menu-item.rb-menu-item-warn .dashicons { color: #d97706; }
.rb-bulk-wrap #rb-btn-clear-process:hover, .rb-bulk-wrap #rb-btn-clear-all-jobs:hover { background: #fef2f2; color: #dc2626; }
.rb-bulk-wrap #rb-btn-clear-process:hover .dashicons, .rb-bulk-wrap #rb-btn-clear-all-jobs:hover .dashicons { color: #dc2626; }
.rb-bulk-wrap .rb-menu-sep { height: 1px; background: var(--rb-border); margin: 6px 4px; }

/* "Unapplied changes" hint on the Apply button (unified filter model) */
.rb-bulk-wrap #rb-apply-btn { position: relative; }
.rb-bulk-wrap #rb-apply-btn .rb-apply-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.5); margin-left: 2px; }
.rb-bulk-wrap #rb-apply-btn.rb-dirty .rb-apply-dot { display: inline-block; animation: rb-apply-pulse 1.4s ease-in-out infinite; }
@keyframes rb-apply-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================================================
   Custom table checkboxes (sunset) + cross-sell promo block
   ============================================================ */
.rb-bulk-wrap .check-column input[type="checkbox"],
.rb-bulk-wrap #rb-select-all,
.rb-bulk-wrap input.rb-item {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; margin: 0;
    border: 1.5px solid var(--rb-border-strong); border-radius: 5px;
    background: #fff; cursor: pointer; position: relative;
    transition: border-color .15s, background .15s; vertical-align: middle; flex-shrink: 0;
}
.rb-bulk-wrap .check-column input[type="checkbox"]:hover,
.rb-bulk-wrap #rb-select-all:hover,
.rb-bulk-wrap input.rb-item:hover { border-color: var(--rb-primary); }
.rb-bulk-wrap .check-column input[type="checkbox"]:checked,
.rb-bulk-wrap #rb-select-all:checked,
.rb-bulk-wrap input.rb-item:checked {
    background-image: var(--rb-grad); background-color: #f06292; border-color: transparent;
}
.rb-bulk-wrap .check-column input[type="checkbox"]:checked::after,
.rb-bulk-wrap #rb-select-all:checked::after,
.rb-bulk-wrap input.rb-item:checked::after {
    content: ""; position: absolute; left: 5px; top: 1.5px;
    width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.rb-bulk-wrap .check-column input[type="checkbox"]:focus-visible,
.rb-bulk-wrap #rb-select-all:focus-visible,
.rb-bulk-wrap input.rb-item:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(126,87,194,.22); }
.rb-bulk-wrap .check-column { width: 46px; text-align: center; }

/* Cross-sell promo */
.rb-bulk-wrap .rb-promo {
    margin-top: 16px; border: 1px solid var(--rb-border); border-radius: 16px; overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #fdf6f9 100%);
    box-shadow: 0 1px 2px rgba(20,17,31,.06);
}
.rb-bulk-wrap .rb-promo-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; border-bottom: 1px solid var(--rb-border);
}
.rb-bulk-wrap .rb-promo-title { font-size: 15px; font-weight: 800; color: var(--rb-text-main); display: flex; align-items: center; gap: 8px; }
.rb-bulk-wrap .rb-promo-title .dashicons { color: var(--rb-primary); }
.rb-bulk-wrap .rb-promo-sub { font-size: 12px; color: var(--rb-text-secondary); margin-top: 2px; }
.rb-bulk-wrap .rb-promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 16px 18px; }
.rb-bulk-wrap .rb-promo-card {
    position: relative; display: block; text-decoration: none; border: 1px solid var(--rb-border);
    border-radius: 12px; padding: 16px; background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.rb-bulk-wrap .rb-promo-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(126,87,194,.28); border-color: rgba(126,87,194,.35); }
.rb-bulk-wrap .rb-promo-featured { border-color: rgba(126,87,194,.35); background: linear-gradient(135deg, rgba(255,95,109,.06), rgba(126,87,194,.06)); }
.rb-bulk-wrap .rb-promo-ico {
    width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--rb-grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(240,98,146,.5); margin-bottom: 10px;
}
.rb-bulk-wrap .rb-promo-ico .dashicons { font-size: 20px; width: 20px; height: 20px; }
.rb-bulk-wrap .rb-promo-name { font-size: 14px; font-weight: 700; color: var(--rb-text-main); }
.rb-bulk-wrap .rb-promo-desc { font-size: 12px; color: var(--rb-text-secondary); margin: 4px 0 10px; line-height: 1.5; }
.rb-bulk-wrap .rb-promo-cta { font-size: 13px; font-weight: 700; color: var(--rb-primary); }
.rb-bulk-wrap .rb-promo-badge {
    position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    color: #fff; background: var(--rb-grad); border-radius: 99px; padding: 2px 9px; box-shadow: 0 2px 8px -2px rgba(240,98,146,.5);
}
