/* Zero-stock live dashboard — dedicated bundle (cache separately from app.css) */

.zero-stock-run-card {
    padding: 1rem 1.25rem 0.75rem;
}

.zero-stock-run-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
}

.zero-stock-store-picker {
    flex: 1 1 100%;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.375rem;
    background: #fafafa;
    max-height: 280px;
    display: flex;
    flex-direction: column;
}

.zero-stock-store-picker-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.zero-stock-store-picker-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.zero-stock-store-picker-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 0.25rem;
}

.zero-stock-store-picker-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    margin: 0;
    cursor: pointer;
    font-size: 0.875rem;
}

.zero-stock-store-picker-row input {
    margin-top: 0.2rem;
}

.zero-stock-run-filters {
    flex: 1 1 420px;
    margin-bottom: 0 !important;
}

.zero-stock-run-actions {
    flex: 0 1 auto;
    margin-bottom: 0;
}

.zero-stock-scope-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.zero-stock-stats-card,
.zero-stock-diagnostics-card,
.zero-stock-breakdown-card,
.zero-stock-failed-items-card,
.zero-stock-preview-card,
.zero-stock-activity-card,
.zero-stock-stall-card {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.zero-stock-failed-items-card {
    scroll-margin-top: 5rem;
    border-color: #fecaca;
}

.zero-stock-failed-status {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #93c5fd;
    border-radius: 8px;
}

.zero-stock-failed-status-count {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #991b1b;
}

.zero-stock-failed-status-note {
    flex: 1 1 100%;
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #64748b;
}

.zero-stock-stats-strip {
    margin-bottom: 0;
}

.zsl-stat-loading {
    opacity: 0.55;
    font-style: italic;
}

.zero-stock-diagnostics-card {
    scroll-margin-top: 5rem;
    border-color: #fecaca;
}

.zero-stock-diag-error td {
    background: #fef2f2;
    color: #991b1b;
}

.zero-stock-diag-skip td {
    background: #fffbeb;
    color: #92400e;
}

#zero-stock-failure-breakdown {
    scroll-margin-top: 5rem;
}

#zero-stock-diagnostics,
#zero-stock-activity {
    scroll-margin-top: 5rem;
}

.zero-stock-diagnostics-anchor {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
}

.zero-stock-scroll-flash {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45);
    transition: box-shadow 0.3s ease;
}

.zero-stock-stats-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.zero-stock-stats-title {
    margin: 0;
    font-size: 1rem;
}

.zero-stock-stats-status {
    font-size: 0.85rem;
}

.zero-stock-stats-status-loading {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.zero-stock-stats-status-ready {
    color: #16a34a;
    font-weight: 500;
}

.zsl-inline-spinner {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: zsl-inline-spin 0.7s linear infinite;
}

@keyframes zsl-inline-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .zero-stock-run-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .zero-stock-run-actions {
        width: 100%;
    }
}

.ui-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    max-width: 1.15rem;
    max-height: 1.15rem;
    color: #475569;
    flex: 0 0 auto;
    flex-shrink: 0;
    overflow: hidden;
    vertical-align: middle;
}
.ui-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.zero-stock-live-pulse {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: zero-stock-pulse 1.6s ease-out infinite;
    flex-shrink: 0;
}
@keyframes zero-stock-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.zsl-dashboard,
.zsl-dashboard.card {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 1.35rem 1.5rem 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.07);
    border-radius: 12px;
}

.zsl-banner { padding: 0.65rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.875rem; }
.zsl-banner-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.zsl-banner-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.zsl-banner-warn { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.zsl-banner-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.zsl-banner-muted { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.zsl-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid #e2e8f0;
}
.zsl-page-title-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }
.zsl-page-title-row > .ui-icon {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    max-width: 1.35rem;
    max-height: 1.35rem;
}
.zsl-page-title { margin: 0; font-size: 1.2rem; font-weight: 600; color: #0f172a; }
.zsl-title-icon { width: 1.35rem; height: 1.35rem; color: #2563eb; }
.zsl-page-subtitle { margin: 0.35rem 0 0; font-size: 0.8125rem; color: #64748b; }
.zsl-dot { margin: 0 0.35rem; }
.zsl-live-tag { color: #16a34a; font-weight: 600; }
.zsl-page-header-right { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8125rem; color: #64748b; white-space: nowrap; }
.zsl-clock-icon { width: 1rem; height: 1rem; }

.zsl-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}
.zsl-card-title {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.zsl-card-title-icon { width: 1rem; height: 1rem; flex-shrink: 0; }

section.zsl-card.zsl-store-summary {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}
.zsl-store-summary-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.zsl-store-summary-body { flex: 1; min-width: 0; }
.zsl-store-summary-icon .ui-icon { width: 1.65rem; height: 1.65rem; max-width: 1.65rem; max-height: 1.65rem; }
.zsl-store-company { margin: 0 0 0.65rem; font-size: 1.25rem; font-weight: 600; color: #0f172a; }
.zsl-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.zsl-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}
.zsl-badge-store-id { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.zsl-badge-platform-shopify { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.zsl-badge-platform-woo { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.zsl-badge-platform-default { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.zsl-badge-op-active { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.zsl-badge-op-done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.zsl-badge-op-fail { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.zsl-badge-op-warn { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.zsl-badge-op-pending { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }

.zsl-progress-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}
.zsl-progress-summary-single {
    grid-template-columns: 1fr;
}
.zsl-progress-summary-single > .zsl-card-title { margin-bottom: 0.75rem; }
.zsl-progress-summary-col { min-width: 0; }
.zsl-progress-summary-divider { width: 1px; background: #e2e8f0; align-self: stretch; }
.zsl-overall-progress-wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: nowrap; }
.zsl-overall-meta { font-size: 0.875rem; color: #475569; min-width: 0; }
.zsl-overall-count { margin: 0 0 0.25rem; font-weight: 600; color: #0f172a; }
.zsl-overall-pct-text { margin: 0; color: #64748b; }
.zsl-overall-subtext { margin: 0 0 0.25rem; font-size: 0.8125rem; }

/* Fixed size — prevents full-width SVG blow-up if any rule conflicts */
.zsl-circular-progress {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
    min-height: 5.5rem;
    max-height: 5.5rem;
    flex: 0 0 5.5rem;
    flex-shrink: 0;
}
.zsl-circular-progress-svg {
    display: block;
    width: 5.5rem;
    height: 5.5rem;
    max-width: 5.5rem;
    max-height: 5.5rem;
}
.zsl-circular-progress-track { fill: none; stroke: #e2e8f0; stroke-width: 8; }
.zsl-circular-progress-fill {
    fill: none;
    stroke: #2563eb;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s ease;
}
.zsl-circular-progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.zsl-circular-progress-pct { font-size: 1.1rem; font-weight: 700; color: #1d4ed8; }

.zsl-store-push-meta { margin: 0 0 0.5rem; font-size: 0.875rem; color: #475569; }
.zsl-hprogress-row { display: flex; align-items: center; gap: 0.75rem; }
.zsl-hprogress {
    flex: 1;
    min-width: 0;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.zsl-hprogress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 999px;
    transition: width 0.35s ease;
}
.zsl-hprogress-pct { font-size: 0.8125rem; font-weight: 600; color: #2563eb; min-width: 2.5rem; text-align: right; }
.zsl-progress-lg { height: 10px; }

.zsl-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: start;
}
.zsl-main-grid-two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.zsl-grid-card { margin-bottom: 0; height: 100%; }

.zsl-variant-panel {
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
}
.zsl-variant-primary { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 700; color: #1e3a8a; }
.zsl-variant-secondary { margin: 0; font-size: 0.875rem; color: #475569; }

.zsl-product-list { list-style: none; margin: 0; padding: 0; max-height: 14rem; overflow-y: auto; }
.zsl-product-list-item {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.zsl-product-list-item::before { content: "•"; position: absolute; left: 0; color: #94a3b8; }
.zsl-product-list-item-current { font-weight: 600; color: #1e3a5f; }
.zsl-product-list-item-current::before { color: #2563eb; }
.zsl-product-now-pushing { font-size: 0.8125rem; line-height: 1.4; }
.zsl-product-more { font-style: italic; color: #64748b; border-bottom: none; }
.zsl-link-btn {
    margin-top: 0.75rem;
    padding: 0;
    border: none;
    background: none;
    color: #2563eb;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
.zsl-link-btn:hover { text-decoration: underline; }

.zsl-pipeline-vertical,
.zsl-pipeline-vertical ol {
    list-style: none !important;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.zsl-pipeline-item { list-style: none !important; margin: 0; padding: 0; }
.zsl-pipeline-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.8125rem;
}
.zsl-pipeline-step-label {
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #334155;
}
.zsl-pipeline-step-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.zsl-pipeline-step-done { background: #f0fdf4; border-color: #bbf7d0; }
.zsl-pipeline-step-done .zsl-pipeline-step-status { color: #16a34a; }
.zsl-pipeline-step-active { background: #eff6ff; border-color: #93c5fd; }
.zsl-pipeline-step-active .zsl-pipeline-step-status { color: #2563eb; }
.zsl-pipeline-step-fail { background: #fef2f2; border-color: #fecaca; }
.zsl-pipeline-step-pending { background: #f8fafc; border-color: #e2e8f0; }
.zsl-pipeline-step-skip { background: #f8fafc; border-color: #e2e8f0; }
.zsl-pipeline-connector { text-align: center; color: #94a3b8; font-size: 0.85rem; padding: 0.2rem 0; line-height: 1; }
.zsl-step-check { width: 0.9rem; height: 0.9rem; color: #16a34a; flex-shrink: 0; }
.zsl-spinner {
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: zsl-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes zsl-spin { to { transform: rotate(360deg); } }

.zsl-run-totals { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.zsl-run-totals-grid { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-end; }
.zsl-run-total-value { display: block; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.zsl-run-total-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
}
.zsl-run-total-pushed .zsl-run-total-value { color: #16a34a; }
.zsl-run-total-failed .zsl-run-total-value { color: #dc2626; }
.zsl-run-total-skipped .zsl-run-total-value { color: #64748b; }
.zsl-view-logs-btn { display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.zsl-btn-icon { width: 1rem; height: 1rem; }
.zsl-idle-hint { margin: 0 0 1rem; font-size: 0.875rem; }

.zsl-skeleton-block {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: zsl-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
    min-height: 3rem;
    margin-bottom: 0.75rem;
}
.zsl-skeleton-header { min-height: 4rem; }
.zsl-skeleton-store { min-height: 5rem; }
.zsl-skeleton-progress { min-height: 6rem; }
.zsl-skeleton-totals { min-height: 4rem; }
.zsl-skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@keyframes zsl-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 992px) {
    .zsl-progress-summary { grid-template-columns: 1fr; }
    .zsl-progress-summary-divider { width: 100%; height: 1px; }
    .zsl-main-grid { grid-template-columns: 1fr; }
    .zsl-skeleton-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .zsl-dashboard.card { padding: 1rem; }
    .zsl-page-header { flex-direction: column; align-items: flex-start; }
    .zsl-run-totals { flex-direction: column; align-items: stretch; }
    .zsl-view-logs-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .zsl-spinner, .zsl-skeleton-block, .zero-stock-live-pulse { animation: none !important; }
    .zsl-circular-progress-fill, .zsl-hprogress-bar { transition: none; }
}

.zero-stock-activity-card {
    scroll-margin-top: 5rem;
}

.zero-stock-activity-header {
    margin-bottom: 0.75rem;
}

.zero-stock-activity-filters {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-bottom: 0.75rem;
}

.zero-stock-activity-actions {
    margin-bottom: 0.75rem;
}
