/* ==========================================================================
   Standardized List View Styles
   Shared across all table/list pages: stats strip, filter bar, table,
   action buttons, pagination footer, responsive breakpoints.
   Design tokens align with design/tokens/* and list-card pattern.
   ========================================================================== */

:root {
    --ls-space-1: 0.25rem;
    --ls-space-2: 0.5rem;
    --ls-space-3: 0.75rem;
    --ls-space-4: 1rem;
    --ls-space-5: 1.5rem;
    --ls-radius-sm: 0.375rem;
    --ls-radius-md: 0.5rem;
    --ls-radius-lg: 0.75rem;
    --ls-color-fg-default: #1a202c;
    --ls-color-fg-muted: #6b7280;
    --ls-color-fg-subtle: #9ca3af;
    --ls-color-fg-strong: #111827;
    --ls-color-border: #e5e7eb;
    --ls-color-border-light: #f3f4f6;
    --ls-color-bg-surface: #fff;
    --ls-color-bg-page: #f8f9fa;
    --ls-color-bg-hover: #f9fafb;
    --ls-color-bg-table-head: #fafafa;
    --ls-color-bg-filter: #f7f7f7;
    --ls-color-bg-filter-gradient-start: #f9fafb;
    --ls-color-accent: #4f46e5;
    --ls-color-accent-focus-ring: rgba(79, 70, 229, 0.1);
    --ls-color-danger: #ef4444;
    --ls-color-danger-hover: #dc2626;
    --ls-color-filter-active-border: #d1d5db;
    --ls-color-filter-active-bg: #f3f4f6;
    --ls-color-stat-alert-border: #fecaca;
    --ls-shadow-stat-hover: rgba(17, 24, 39, 0.14);
    --ls-shadow-loading: rgba(255, 255, 255, 0.7);
    /* Horizontal rhythm: list title, filter panel, table block, pagination */
    --ls-list-gutter: 1.5rem;
    --ls-filter-reveal-duration: 0.4s;
    --ls-filter-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- List shell (scoped from dashboard-shell-styles for list pages) ---------- */
.list-product-view {
    background-color: var(--ls-color-bg-page);
    min-height: 100%;
}

.list-product-view .page-title .btn {
    margin-left: 5px;
    border-radius: var(--ls-radius-lg);
    font-weight: 500;
}

.list-product-view .page-title .btn-light {
    background-color: #fef2f2;
    border-color: #fef2f2;
    color: var(--ls-color-danger);
}

.list-product-view .page-title .btn-danger {
    background-color: var(--ls-color-danger);
    border-color: var(--ls-color-danger);
}

.list-product-view .page-title .btn-danger:hover {
    background-color: var(--ls-color-danger-hover);
    border-color: var(--ls-color-danger-hover);
}

/* ---------- Action Strip (contextual call-to-action bar above lists) ---------- */
.ls-action-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ls-space-3);
    padding: 0.75rem var(--ls-list-gutter);
    border-radius: var(--ls-radius-lg);
    border-left: 4px solid transparent;
    margin-bottom: var(--ls-space-3);
    animation: ls-strip-enter 0.25s var(--ls-filter-reveal-ease) both;
}

@keyframes ls-strip-enter {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ls-action-strip { animation: none; }
}

/* Tone variants */
.ls-action-strip--warning {
    background: #fffbeb;
    border-color: #d97706;
    color: #92400e;
}
.ls-action-strip--danger {
    background: #fff1f2;
    border-color: #ef4444;
    color: #991b1b;
}
.ls-action-strip--success {
    background: #f0fdf4;
    border-color: #059669;
    color: #065f46;
}
.ls-action-strip--info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}
.ls-action-strip--muted {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #6b7280;
}

.ls-action-strip__icon {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.ls-action-strip__body {
    display: flex;
    align-items: center;
    gap: var(--ls-space-2);
    flex: 1;
    min-width: 0;
}

.ls-action-strip__message {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

.ls-action-strip__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: currentColor;
    line-height: 1;
    flex-shrink: 0;
}

.ls-action-strip--warning .ls-action-strip__badge { color: #92400e; background: #fef3c7; }
.ls-action-strip--danger  .ls-action-strip__badge { color: #991b1b; background: #fee2e2; }
.ls-action-strip--success .ls-action-strip__badge { color: #065f46; background: #d1fae5; }
.ls-action-strip--info    .ls-action-strip__badge { color: #1e40af; background: #dbeafe; }
.ls-action-strip--muted   .ls-action-strip__badge { color: #374151; background: #e5e7eb; }

.ls-action-strip__actions {
    display: flex;
    align-items: center;
    gap: var(--ls-space-2);
    flex-shrink: 0;
}

.ls-action-strip__dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    color: currentColor;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    border-radius: var(--ls-radius-sm);
    transition: opacity 0.15s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.ls-action-strip__dismiss:hover { opacity: 1; }

/* Inside tab panels — rounded on all sides, slightly smaller */
.campaign-tab-pane .ls-action-strip {
    border-radius: var(--ls-radius-md);
}

/* Mobile: stack actions full-width */
@media (max-width: 575.98px) {
    .ls-action-strip__actions {
        width: 100%;
    }
    .ls-action-strip__actions .btn {
        flex: 1;
        text-align: center;
    }
}

/* ---------- Stats Strip (deliverables-standard KPI cards) ---------- */
.ls-stats-strip {
    margin-bottom: var(--ls-space-3);
    overflow: visible;
}

.ls-stats-strip > [class*="col-"] {
    overflow: visible;
}

.ls-stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    text-align: left;
    transform: translateY(0) scale(1);
    transform-origin: center center;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.ls-stat-card--filterable {
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .ls-stat-card:hover {
        box-shadow: 0 12px 28px var(--ls-shadow-stat-hover);
        transform: translateY(-4px) scale(1.1);
    }
}

.ls-stat-card:active {
    box-shadow: 0 12px 28px var(--ls-shadow-stat-hover);
    transform: translateY(-4px) scale(1.1);
}

.ls-stat-card--filterable:focus-visible {
    outline: 2px solid var(--ls-color-accent);
    outline-offset: 2px;
}

.ls-stat-card--active {
    box-shadow: 0 0 0 2px currentColor, 0 12px 28px var(--ls-shadow-stat-hover);
    transform: translateY(-4px) scale(1.04);
}

.ls-stat-card--secondary { color: #6b7280; }
.ls-stat-card--dark { color: #111827; }
.ls-stat-card--warning { color: #d97706; }
.ls-stat-card--info { color: #2563eb; }
.ls-stat-card--success { color: #059669; }
.ls-stat-card--danger { color: #dc2626; }
.ls-stat-card--primary { color: #7c3aed; }

@media (prefers-reduced-motion: reduce) {
    .ls-stat-card {
        transition: none;
    }

    @media (hover: hover) and (pointer: fine) {
        .ls-stat-card:hover {
            transform: none;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }
    }

    .ls-stat-card:active {
        transform: none;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    }

    .ls-stat-card--active {
        transform: none;
        box-shadow: 0 0 0 2px currentColor, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    }
}

.ls-stat-card .card-body {
    padding: var(--ls-space-3);
}

.ls-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ls-color-fg-muted);
    margin-bottom: var(--ls-space-1);
}

.ls-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ls-color-fg-strong);
}

.ls-stat-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--ls-color-border-light);
    color: #374151;
    white-space: nowrap;
}

.ls-stat-pill--secondary { background: var(--ls-color-border); color: #374151; }
.ls-stat-pill--dark      { background: #1f2937; color: #f9fafb; }
.ls-stat-pill--warning  { background: #fef3c7; color: #92400e; }
.ls-stat-pill--info     { background: #dbeafe; color: #1d4ed8; }
.ls-stat-pill--success  { background: #d1fae5; color: #065f46; }
.ls-stat-pill--danger   { background: #fee2e2; color: #991b1b; }
.ls-stat-pill--primary  { background: #ede9fe; color: #5b21b6; }

/* ---------- Admin utility classes ---------- */
.ls-badge--compact {
    font-size: 0.625rem;
    padding: 0.25rem 0.3125rem;
}

.ui-badge-xs {
    font-size: 0.7rem;
}

.is-disabled-link {
    pointer-events: none;
    opacity: 0.6;
}

.w-100px {
    width: 100px;
}

.w-30 {
    width: 30%;
}

.ui-lock-icon {
    font-size: 3.5rem;
    color: var(--theme-default, #7366ff);
    opacity: 0.75;
}

.ls-stat-card--alert {
    border: 1px solid var(--ls-color-stat-alert-border);
}

.ls-stats-strip .ls-stat-progress {
    height: 6px;
    background-color: var(--ls-color-border);
}

.ls-stats-strip .ls-stat-progress .progress-bar {
    border-radius: inherit;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Filter Bar ---------- */
.ls-filter-card {
    border-radius: 10px;
    margin-bottom: 0;
    border: 1px solid var(--ls-color-border);
}

.ls-filter-card .card-body {
    padding: var(--ls-space-4);
}

.ls-filter-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ls-space-2);
    margin-bottom: var(--ls-space-3);
}

.ls-filter-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
    min-width: 0;
}

.ls-filter-header h6 {
    margin-bottom: 0;
    font-weight: 600;
    color: #374151;
}

/* Filter panel: smooth height reveal (no display:none — works with list-scripts) */
.ls-filter-section {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition:
        grid-template-rows var(--ls-filter-reveal-duration) var(--ls-filter-reveal-ease),
        opacity 0.28s ease;
}

.ls-filter-section.ls-expanded {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
}

.ls-filter-section > .ls-filter-panel-inner {
    min-height: 0;
    overflow: hidden;
    transition: overflow 0s linear var(--ls-filter-reveal-duration);
}

.ls-filter-section.ls-expanded > .ls-filter-panel-inner {
    overflow: visible;
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .ls-filter-section {
        transition-duration: 0.01ms;
    }

    .ls-filter-section > .ls-filter-panel-inner {
        transition: none;
    }
}

.ls-filter-inline.ls-filter-card {
    border: none;
    border-radius: 0;
    background: transparent;
    margin: 0;
}

.ls-list-card > .ls-filter-inline .ls-filter-section.ls-expanded {
    border-top: 1px solid var(--ls-color-border);
    background: linear-gradient(180deg, var(--ls-color-bg-filter-gradient-start) 0%, var(--ls-color-bg-surface) 72%);
}

.ls-filter-panel-inner {
    padding: var(--ls-space-4) var(--ls-list-gutter);
}

/* Campaign-style filter fields: full height, soft fill, accent focus (not Bootstrap -sm) */
.ls-filter-card .form-control,
.ls-filter-card .form-select,
.ls-filter-card .ls-filter-input {
    min-height: 40px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: var(--ls-radius-md);
    background-color: var(--ls-color-bg-filter);
    border-color: var(--ls-color-border);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ls-filter-card .form-control:focus,
.ls-filter-card .form-select:focus,
.ls-filter-card .ls-filter-input:focus {
    border-color: var(--ls-color-accent);
    box-shadow: 0 0 0 3px var(--ls-color-accent-focus-ring);
    background-color: var(--ls-color-bg-surface);
}

/* Safety net: any stray -sm inside filter card matches campaign list sizing */
.ls-filter-card .form-control-sm,
.ls-filter-card .form-select-sm {
    min-height: 40px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: var(--ls-radius-md);
    background-color: var(--ls-color-bg-filter);
    border-color: var(--ls-color-border);
    font-size: 0.875rem;
}

.ls-filter-card .form-control-sm:focus,
.ls-filter-card .form-select-sm:focus {
    border-color: var(--ls-color-accent);
    box-shadow: 0 0 0 3px var(--ls-color-accent-focus-ring);
    background-color: var(--ls-color-bg-surface);
}

.ls-filter-title {
    font-weight: 600;
    color: #374151;
}

.ls-filter-status--embedded {
    color: var(--ls-color-fg-muted);
    padding-left: var(--ls-list-gutter) !important;
    padding-right: var(--ls-list-gutter) !important;
}

/* Icon-only clear beside filter title (label via Bootstrap tooltip + aria-label) */
.ls-filter-clear.ls-filter-clear--icon {
    width: 1.75rem;
    min-width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--ls-radius-sm);
    line-height: 1;
    color: var(--ls-color-fg-muted);
    border-color: var(--ls-color-border);
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ls-filter-clear.ls-filter-clear--icon i {
    font-size: 0.8125rem;
    line-height: 1;
    opacity: 0.9;
}

.ls-filter-clear.ls-filter-clear--icon:hover,
.ls-filter-clear.ls-filter-clear--icon:focus-visible {
    color: var(--ls-color-fg-default);
    background-color: var(--ls-color-border-light);
}

.ls-filter-clear.ls-filter-clear--icon:hover i,
.ls-filter-clear.ls-filter-clear--icon:focus-visible i {
    opacity: 1;
}

.ls-filter-clear.ls-filter-clear--icon:focus-visible {
    outline: 2px solid var(--ls-color-accent);
    outline-offset: 2px;
}

.js-ls-toggle-filter.is-active {
    border-color: var(--ls-color-filter-active-border);
    background-color: var(--ls-color-filter-active-bg) !important;
    font-weight: 600;
}

.ls-filter-toggle {
    position: relative;
    transition:
        transform 0.22s var(--ls-filter-reveal-ease),
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

/* Chevron: rotates when panel is open (aria-expanded from list-scripts) */
.ls-filter-toggle::after {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-left: 0.4rem;
    margin-bottom: 0.12em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    vertical-align: middle;
    opacity: 0.72;
    transition: transform var(--ls-filter-reveal-duration) var(--ls-filter-reveal-ease),
        opacity 0.2s ease;
}

.ls-filter-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
    margin-bottom: -0.05em;
    opacity: 0.9;
}

.ls-filter-toggle[aria-expanded="true"] {
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

@media (prefers-reduced-motion: reduce) {
    .ls-filter-toggle,
    .ls-filter-toggle::after {
        transition: none;
    }
}

.ls-filter-toggle .ls-filter-count {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--ls-color-danger);
    color: var(--ls-color-bg-surface);
    line-height: 1.4;
    min-width: 16px;
    text-align: center;
}

.ls-filter-status {
    font-size: 0.8rem;
    color: var(--ls-color-fg-muted);
}

/* ---------- List Card (table wrapper) ---------- */
.ls-list-card {
    border-radius: 10px;
    border: 1px solid var(--ls-color-border);
    overflow: visible;
}

.ls-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ls-space-2);
    padding: 1.125rem var(--ls-list-gutter) 1rem;
    border-bottom: 0;
}

.ls-list-header h5 {
    margin-bottom: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Table block: align edges with title row when card-body uses px-0 */
.ls-list-card > .card-body .list-product {
    padding-left: var(--ls-list-gutter);
    padding-right: var(--ls-list-gutter);
    padding-bottom: var(--ls-space-3);
}

.ls-list-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ls-space-2);
    align-items: center;
}

/* ---------- Table ---------- */
.ls-table {
    margin-bottom: 0;
}

.ls-sortable-col {
    cursor: pointer;
    user-select: none;
}

.ls-sortable-col:focus-visible {
    outline: 2px solid var(--ls-color-accent);
    outline-offset: -2px;
}

.ls-sortable-col:hover {
    background: var(--ls-color-bg-hover);
}

.ls-sortable-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.ls-sort-indicator {
    display: inline-flex;
    align-items: center;
    color: var(--ls-color-accent);
    font-size: 0.7rem;
}

.ls-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ls-color-fg-muted);
    border-bottom: 2px solid var(--ls-color-border);
    padding: 0.625rem 0.75rem;
    white-space: nowrap;
    background: var(--ls-color-bg-table-head);
}

.ls-table tbody td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid var(--ls-color-border-light);
}

.ls-table tbody tr:hover {
    background-color: var(--ls-color-bg-hover);
}

.ls-table tbody tr:last-child td {
    border-bottom: 0;
}

.ls-table .ls-empty-row td {
    text-align: center;
    padding: 2.5rem 0.75rem;
    color: var(--ls-color-fg-subtle);
}

.ls-table a.ls-table-link {
    color: var(--ls-color-fg-default);
    text-decoration: none;
    font-weight: 600;
}

.ls-table a.ls-table-link:hover {
    color: var(--ls-color-accent);
    text-decoration: underline;
}

/* ---------- Status badges ---------- */
.ls-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.ls-badge--success   { background: #d1fae5; color: #065f46; }
.ls-badge--warning   { background: #fef3c7; color: #92400e; }
.ls-badge--danger    { background: #fee2e2; color: #991b1b; }
.ls-badge--info      { background: #dbeafe; color: #1d4ed8; }
.ls-badge--secondary { background: #e5e7eb; color: #374151; }
.ls-badge--primary   { background: #ede9fe; color: #5b21b6; }
.ls-badge--dark      { background: #1f2937; color: #f9fafb; }
.ls-badge--draft     { background: #f3f4f6; color: #6b7280; }

/* ---------- Utilities ---------- */
.ls-disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

.ls-hidden {
    display: none !important;
}

/* ---------- Action Buttons ---------- */
.ls-actions {
    white-space: nowrap;
    vertical-align: middle;
    /* Shrink-wrap column so the cell does not steal width; min-width fits icon buttons in one row */
    width: 1%;
    min-width: 9rem;
}

/* Bootstrap .flex-wrap uses !important — override so row actions stay horizontal */
.ls-actions .d-inline-flex.flex-wrap {
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
}

.ls-actions .d-inline-flex {
    gap: var(--ls-space-1);
}

.ls-actions .btn {
    border-radius: var(--ls-radius-lg);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1;
    border: 1px solid var(--ls-color-border);
    background: var(--ls-color-bg-surface);
    color: #374151;
    transition: all 0.15s ease;
}

.ls-actions .btn:hover {
    background: var(--ls-color-border-light);
    border-color: var(--ls-color-filter-active-border);
}

.ls-actions .btn.text-danger:hover {
    background: #fef2f2;
    border-color: var(--ls-color-stat-alert-border);
    color: var(--ls-color-danger-hover);
}

.ls-actions form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

/* ---------- Pagination Footer ---------- */
.ls-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ls-space-2);
    padding: var(--ls-space-3) var(--ls-list-gutter);
    border-top: 1px solid var(--ls-color-border-light);
}

.ls-pagination-info {
    font-size: 0.8rem;
    color: var(--ls-color-fg-muted);
}

.ls-pagination-footer .pagination {
    margin-bottom: 0;
}

.ls-pagination-footer .pagination .page-link {
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid var(--ls-color-border);
    color: #374151;
}

.ls-pagination-footer .pagination .page-item.active .page-link {
    background-color: var(--ls-color-accent);
    border-color: var(--ls-color-accent);
    color: var(--ls-color-bg-surface);
}

.ls-pagination-footer .pagination .page-item.disabled .page-link {
    color: var(--ls-color-fg-subtle);
    background: transparent;
}

/* ---------- Media Thumbnails ---------- */
.ls-media-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--ls-radius-lg);
    background: var(--ls-color-border-light);
    border: 1px solid var(--ls-color-border);
}

.ls-media-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--ls-radius-lg);
    background: linear-gradient(135deg, var(--ls-color-border-light), var(--ls-color-border));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ls-color-fg-subtle);
    font-size: 1rem;
    border: 1px dashed var(--ls-color-filter-active-border);
}

.ls-media-thumb.rounded-circle,
.ls-media-placeholder.rounded-circle {
    border-radius: 999px !important;
}

/* ---------- Row Progress Bars ---------- */
.ls-row-progress {
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--ls-color-border);
    margin-top: 6px;
    max-width: 140px;
}

.ls-row-progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.25s ease;
}

/* ---------- Searchable Select (Select2 overrides scoped to filter card) ---------- */
.ls-filter-card .select2-container--bootstrap-5 {
    width: 100% !important;
}

.ls-filter-card .select2-container--bootstrap-5 .select2-selection {
    min-height: 40px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: var(--ls-radius-md);
    background-color: var(--ls-color-bg-filter);
    border-color: var(--ls-color-border);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ls-filter-card .ls-searchable-refreshing .select2-selection,
.ls-filter-card select[data-ls-searchable="true"][aria-busy="true"] + .select2-container .select2-selection {
    opacity: 0.82;
    cursor: progress;
    background: linear-gradient(90deg, var(--ls-color-bg-filter) 0%, var(--ls-color-bg-surface) 50%, var(--ls-color-bg-filter) 100%);
    background-size: 200% 100%;
    animation: ls-searchable-shimmer 1.2s linear infinite;
}

.ls-filter-card .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.ls-filter-card .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--ls-color-accent);
    box-shadow: 0 0 0 3px var(--ls-color-accent-focus-ring);
    background-color: var(--ls-color-bg-surface);
}

.ls-filter-card .select2-container--bootstrap-5 .select2-selection__rendered {
    color: var(--ls-color-fg-default);
    padding-left: 0.75rem;
}

.ls-filter-card .select2-container--bootstrap-5 .select2-selection__placeholder {
    color: var(--ls-color-fg-muted);
}

.ls-filter-card .select2-container--bootstrap-5 .select2-selection__clear {
    margin-right: 0.25rem;
    font-size: 1rem;
    color: var(--ls-color-fg-muted);
}

.ls-filter-card .select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: var(--ls-color-fg-default);
}

.ls-select2-dropdown {
    border-radius: var(--ls-radius-md);
    border-color: var(--ls-color-border);
    padding: 0.35rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    max-height: 50vh;
    z-index: 1060;
}

.ls-select2-dropdown .select2-search__field {
    border-radius: var(--ls-radius-sm);
    border-color: var(--ls-color-border);
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

.ls-select2-dropdown .select2-search__field:focus {
    border-color: var(--ls-color-accent);
    box-shadow: 0 0 0 2px var(--ls-color-accent-focus-ring);
}

.ls-select2-dropdown .select2-results__option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--ls-radius-sm);
}

.ls-select2-dropdown .select2-results__option--highlighted {
    background-color: var(--ls-color-bg-hover);
    color: var(--ls-color-fg-default);
}

.ls-select2-dropdown .select2-results__option--selected {
    background-color: var(--ls-color-accent-focus-ring);
    color: var(--ls-color-fg-default);
}

.ls-searchable-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.ls-searchable-option-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-option-count {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ls-color-fg-muted);
    background: var(--ls-color-border-light);
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 0.5rem;
    line-height: 1.4;
}

.ls-select2-dropdown .select2-results__message {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--ls-color-fg-muted);
    text-align: center;
}

@keyframes ls-searchable-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* RTL adjustments */
[dir="rtl"] .ls-searchable-option {
    flex-direction: row-reverse;
}

[dir="rtl"] .ls-option-count {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ls-filter-card .select2-container--bootstrap-5 .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0.75rem;
}

[dir="rtl"] .ls-filter-card .select2-container--bootstrap-5 .select2-selection__clear {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* Mobile: full-width dropdown, prevent iOS zoom on search input */
@media (max-width: 767.98px) {
    .ls-select2-dropdown {
        max-height: 60vh;
    }

    .ls-select2-dropdown .select2-search__field {
        font-size: 16px;
    }

    .ls-filter-card .select2-container--bootstrap-5 .select2-selection {
        min-height: 38px;
    }
}

/* ---------- Loading overlay ---------- */
.ls-table-loading {
    position: relative;
    min-height: 120px;
}

.ls-table-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ls-shadow-loading);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .d-none-mobile,
    .ls-table .d-none-mobile {
        display: none !important;
    }

    .ls-stat-value {
        font-size: 1.25rem;
    }

    .ls-stat-label {
        font-size: 0.62rem;
    }

    .ls-stat-pill {
        font-size: 0.62rem;
        padding: 2px 6px;
    }

    .ls-filter-card .row .col-md-2,
    .ls-filter-card .row .col-md-3,
    .ls-filter-card .row [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ls-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ls-space-3);
        padding: var(--ls-space-3) 1rem;
    }

    .ls-list-card > .card-body .list-product {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ls-pagination-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ls-filter-panel-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ls-filter-status--embedded {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .ls-list-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ls-list-header-actions .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.65rem;
    }

    .ls-table thead th {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .ls-table tbody td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .ls-actions .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

    .ls-pagination-footer {
        flex-direction: column;
        align-items: center;
        gap: var(--ls-space-3);
        padding: var(--ls-space-3);
    }

    .ls-pagination-footer .pagination .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .ls-filter-toggle {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .ls-filter-card .row .col-md-2,
    .ls-filter-card .row .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ---------- KPI strip entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
    @keyframes lsStatStripIn {
        from {
            transform: translateY(12px);
        }
        to {
            transform: translateY(0);
        }
    }

    .ls-stats-strip > [class*="col-"] {
        animation: lsStatStripIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .ls-stats-strip > [class*="col-"]:nth-child(1) { animation-delay: 0.03s; }
    .ls-stats-strip > [class*="col-"]:nth-child(2) { animation-delay: 0.06s; }
    .ls-stats-strip > [class*="col-"]:nth-child(3) { animation-delay: 0.09s; }
    .ls-stats-strip > [class*="col-"]:nth-child(4) { animation-delay: 0.12s; }
    .ls-stats-strip > [class*="col-"]:nth-child(5) { animation-delay: 0.15s; }
    .ls-stats-strip > [class*="col-"]:nth-child(6) { animation-delay: 0.18s; }
    .ls-stats-strip > [class*="col-"]:nth-child(7) { animation-delay: 0.21s; }
    .ls-stats-strip > [class*="col-"]:nth-child(8) { animation-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
    .ls-stats-strip > [class*="col-"] {
        animation: none;
    }
}

/* ---------- Creator directory card view (inside list-product-view) ---------- */
.list-product-view .social-profile.card {
    border-radius: var(--ls-radius-lg);
    border: 1px solid var(--ls-color-border);
    overflow: hidden;
}

/* ---------- Payment proof thumbnails (lists + modals) ---------- */
.ls-proof-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ls-proof-thumb {
    width: 38px;
    height: 38px;
    border-radius: var(--ls-radius-lg);
    border: 1px solid var(--ls-color-border);
    object-fit: cover;
    display: block;
}

.ls-proof-thumb-link:focus-visible {
    outline: 2px solid var(--ls-color-danger);
    outline-offset: 2px;
    border-radius: 10px;
}

.ls-proof-badge {
    font-size: 0.72rem;
    font-weight: 600;
}

.ls-proof-modal-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    background: var(--ls-color-border-light);
}

.ls-actions-stack {
    min-width: 7rem;
}

/* ---------- Deliverables list primitives ---------- */
.ls-deliverable-thumb {
    width: 48px;
    height: 48px;
}

.ls-row-progress--deliverable {
    max-width: 140px;
}

@media (max-width: 767.98px) {
    .ls-proof-thumb {
        width: 30px;
        height: 30px;
    }

    .ls-proof-badge {
        font-size: 0.66rem;
    }
}

/* ---------- Print ---------- */
@media print {
    .ls-filter-card,
    .ls-list-header-actions,
    .ls-actions,
    .ls-pagination-footer {
        display: none !important;
    }
}
