body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-dark, #0c0c0c);
    color: var(--text-primary, #f0f0f0);
    min-height: 100vh;
}
.app-container {
    display: flex;
    min-height: 100vh;
}
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width, 200px);
    padding: 30px;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}
.page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}
.page-header p {
    margin: 8px 0 0;
    color: var(--text-secondary, #a0a0a0);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-create {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #60a5fa;
    /* WCAG AA: dark text #0f172a on #60a5fa = 6.85:1 contrast (was white #f0f0f0 = 2.23:1, FAIL) */
    color: #0f172a;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-create:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-create svg {
    flex-shrink: 0;
}
.view-toggle {
    display: flex;
    gap: 8px;
}
.view-toggle a {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}
.view-toggle a.active {
    background: #60a5fa;
    /* WCAG AA: dark #0f172a on #60a5fa = 6.85:1 contrast (was white = 2.23:1, FAIL AA) */
    color: #0f172a;
    font-weight: 600;
}
.view-toggle a:not(.active) {
    background: transparent;
    border: 1px solid var(--border-tint-soft);
    color: var(--text-secondary, #a0a0a0);
}
.view-toggle a:not(.active):hover {
    border-color: #60a5fa;
    color: var(--text-primary, #f0f0f0);
}
.access-denied {
    text-align: center;
    padding: 60px 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.access-denied h2 {
    color: #ef4444;
    margin-bottom: 12px;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-tint-medium);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-tint-strong);
    cursor: pointer;
    transition: all 0.2s;
}
.stat-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}
.stat-card.active {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary, #a0a0a0);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card .stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary, #f0f0f0);
}
.stat-card.pending .stat-value { color: #f59e0b; }
.stat-card.approved .stat-value { color: #10b981; }
.stat-card.live .stat-value { color: #8b5cf6; }
.stat-card.on_hold .stat-value { color: #9ca3af; }

/* Queue Table */
.queue-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-tint-soft);
    border-radius: 12px;
    overflow: hidden;
}
.queue-table th,
.queue-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-tint-medium);
}
.queue-table th {
    background: var(--bg-tint-medium);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #a0a0a0);
    font-weight: 600;
}
.queue-table tr:hover {
    background: var(--bg-tint-medium);
}
.queue-table tr:last-child td {
    border-bottom: none;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-badge.pending { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-badge.approved { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-badge.live { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.status-badge.on_hold { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.status-badge.needs_review {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    cursor: help;
}
.status-badge.image-integrity {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: help;
}
.status-badge.image-integrity.warning { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.status-badge.image-integrity.error { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Price Input */
.price-input {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-input input {
    width: 80px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-tint-soft);
    background: var(--bg-tint-strong);
    color: var(--text-primary, #f0f0f0);
    font-size: 14px;
}
.price-input input:focus {
    outline: none;
    border-color: #8b5cf6;
}
.price-display {
    color: #10b981;
    font-weight: 500;
}
.price-arrow {
    color: var(--text-secondary, #a0a0a0);
}

/* Action Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: #8b5cf6;
    color: var(--text-primary, #f0f0f0);
}
.btn-primary:hover {
    background: #7c3aed;
}
.btn-success {
    background: #10b981;
    color: var(--text-primary, #f0f0f0);
}
.btn-success:hover {
    background: #059669;
}
.btn-danger {
    background: #ef4444;
    color: var(--text-primary, #f0f0f0);
}
.btn-danger:hover {
    background: #dc2626;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-tint-soft);
    color: var(--text-secondary, #a0a0a0);
}
.btn-outline:hover {
    border-color: #8b5cf6;
    color: var(--text-primary, #f0f0f0);
}
.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Action Cell */
.action-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Play Button */
.btn-play {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.btn-play:hover {
    background: rgba(139, 92, 246, 0.3);
}
.btn-play.playing {
    background: #8b5cf6;
    color: var(--text-primary, #f0f0f0);
}
.btn-play svg {
    width: 14px;
    height: 14px;
}

/* View Button */
.btn-view {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}
.btn-view:hover {
    background: rgba(107, 114, 128, 0.3);
    color: var(--text-primary, #f0f0f0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #a0a0a0);
}
.empty-state h3 {
    color: var(--text-primary, #f0f0f0);
    margin-bottom: 8px;
}

/* Loading */
.loading-state {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary, #a0a0a0);
}

/* SKU Link */
.sku-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
}
.sku-link:hover {
    text-decoration: underline;
}

/* Cover Thumbnail */
.cover-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-tint-strong);
}

/* Artist/Title Cell */
.release-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.release-title {
    font-weight: 500;
    color: var(--text-primary, #f0f0f0);
}
.release-artist {
    font-size: 13px;
    color: var(--text-secondary, #a0a0a0);
}
.release-label {
    font-size: 12px;
    color: var(--text-muted, #8a8a8a);
}

/* Inline Assignee chooser (label-manager dropdown) */
.lm-assign {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lm-select {
    max-width: 130px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-tint-soft);
    background: var(--bg-tint-strong);
    color: var(--text-primary, #f0f0f0);
    font-size: 12px;
    cursor: pointer;
}
.lm-select:focus {
    outline: none;
    border-color: #8b5cf6;
}
.lm-select.lm-missing {
    border-color: #ef4444;
    color: #ef4444;
}
.lm-src {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
}
.lm-src-sku { color: #10b981; }
.lm-src-label { color: #3b82f6; }

/* Light-theme: the generic `body.label-light select` rule (label-light.css) forces
   a neutral border on every select — re-assert the red border on unassigned rows. */
body.label-light .lm-select.lm-missing {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: var(--text-primary, #f0f0f0);
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Search + pagination (2026-07-13 — SLACKER020V). The queue used to render the
   first 50 rows of a status and nothing else; these are the controls that make
   the other 419 reachable.
   ───────────────────────────────────────────────────────────────────────────── */
.queue-search {
    position: relative;
    display: flex;
    align-items: center;
}
.queue-search-input {
    width: 280px;
    padding: 8px 30px 8px 12px;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 8px;
    background: var(--bg-card, #161616);
    color: var(--text-primary, #f0f0f0);
    font-size: 13px;
}
.queue-search-input::placeholder { color: var(--text-secondary, #888); }
.queue-search-input:focus {
    outline: none;
    border-color: var(--accent-emphasis, #c4956a);
}
.queue-search-clear {
    position: absolute;
    right: 8px;
    border: none;
    background: none;
    color: var(--text-secondary, #888);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.queue-search-clear:hover { color: var(--text-primary, #f0f0f0); }

.queue-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}
.queue-pager-count {
    color: var(--text-secondary, #888);
    font-size: 13px;
}

.queue-manufacturing {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #2a2a2a);
}
.queue-manufacturing-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TO DO view — manufactured at a plant, not online for pre-order yet.
   These rows have NO submission, so no cover / price / artist: SKU + label only.
   ───────────────────────────────────────────────────────────────────────────── */
.stat-card.todo .stat-value { color: var(--accent-emphasis, #c4956a); }

.gap-table .gap-check { width: 36px; text-align: center; }
.gap-row.gap-review_manager,
.gap-row.gap-review_link { opacity: 0.92; }

.gap-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.gap-badge-ready { background: #10b981; }
.gap-badge-review_link { background: #3b82f6; }
.gap-badge-review_manager { background: #ef4444; }

.gap-sev {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border: 1px solid var(--border, #2a2a2a);
    color: var(--text-secondary, #888);
}
.gap-sev-lost { border-color: #ef4444; color: #ef4444; }
.gap-sev-critical { border-color: #f59e0b; color: #f59e0b; }
.gap-sev-urgent { border-color: #3b82f6; color: #3b82f6; }
.gap-late { color: #ef4444; font-weight: 600; }

/* Repress marker on a To-do row — the base release already exists, so the row
   must read "reactivate X", never "enter a new release". Same vocabulary as the
   preorder-gaps cockpit (one doctrine, several surfaces). */
.gap-repress {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid var(--border, #2a2a2a);
    color: var(--text-secondary, #888);
    text-decoration: none;
}
a.gap-repress:hover { border-color: var(--accent-emphasis, #c4956a); color: var(--accent-emphasis, #c4956a); }
.gap-repress-reactivate { border-color: #8b5cf6; color: #8b5cf6; }
.gap-repress-legacy { border-color: #f59e0b; color: #f59e0b; }
.gap-repress-resolved { border-color: #10b981; color: #10b981; }

.gap-reactivate-label {
    font-size: 11px;
    color: var(--text-secondary, #888);
    margin-right: 4px;
    white-space: nowrap;
}

.queue-bulk-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 8px;
    background: var(--bg-card, #161616);
}
.queue-bulk-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #f0f0f0);
    margin-right: auto;
}

/* Declare a pressing — the forward path for a plant that announces nothing.
   (2026-07-14, admin-queue TO DO view) */
.gap-declare-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 8px;
    background: var(--bg-card, #161616);
}
.gap-declare-hint {
    font-size: 12px;
    color: var(--text-secondary, #9a9a9a);
}

.declare-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* THEME-AUDITED: modal backdrop scrim — intentionally opaque in both themes */
    background: rgba(0, 0, 0, 0.6);
}
.declare-modal[hidden] { display: none; }

.declare-modal-card {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px 24px;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 10px;
    background: var(--bg-card, #161616);
}
.declare-modal-title {
    margin: 0 0 6px;
    font-size: 17px;
    color: var(--text-primary, #f0f0f0);
}
.declare-modal-sub {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary, #9a9a9a);
}

.declare-field { display: block; margin-bottom: 14px; }
.declare-field > span {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary, #9a9a9a);
}
.declare-field input,
.declare-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border, #2a2a2a);
    border-radius: 6px;
    background: var(--bg-input, #0f0f0f);
    color: var(--text-primary, #f0f0f0);
    font-size: 13px;
}
.declare-field small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
    color: var(--text-secondary, #9a9a9a);
}

.declare-error {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}
.declare-error[hidden] { display: none; }

.declare-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
