/* ==========================================================================
   Unified Stylesheet — Social Media System
   Merges: review, face-labeler, shoot-logger
   Dark theme (#0f0f0f), shared color palette via CSS custom properties
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --border: #2a2a2a;
    --border-light: #1e1e1e;
    --text: #e0e0e0;
    --text-dim: #999;
    --text-muted: #666;
    --text-faint: #555;
    --white: #fff;
    --blue: #4a9eff;
    --blue-hover: #3a8eef;
    --blue-bg: #1a2540;
    --green: #4ade80;
    --green-bg: #0d3320;
    --green-dark-bg: #1a2a1a;
    --red: #ef4444;
    --red-bg: #3b1111;
    --gold: #fbbf24;
    --gold-bg: #3a2800;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Menlo", "Monaco", monospace;
}

/* Global tap highlight for iOS */
a, button, [onclick] {
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.12);
}

/* --------------------------------------------------------------------------
   2. Shared Base (reset, body, links, containers)
   -------------------------------------------------------------------------- */

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

a {
    color: var(--blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) {
    .container { max-width: 768px; }
}
@media (min-width: 1024px) {
    .container { max-width: 960px; }
}

/* Shared: empty state (used by review, labeler, shoots) */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Shared: toast base (review uses .toast.visible, labeler uses .toast.show) */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

/* Review toast trigger */
.toast.visible {
    opacity: 1;
}

/* Labeler toast trigger (green bg, bottom-slide animation) */
.toast.show {
    bottom: 24px;
    background: var(--green);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   3. Nav Bar (shared navigation)
   -------------------------------------------------------------------------- */
.nav-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #141414;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-bar .nav-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    margin-right: auto;
}
.nav-bar .nav-brand:hover {
    text-decoration: none;
}

.nav-bar .nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s;
    white-space: nowrap;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.15);
}
.nav-bar .nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}
.nav-bar .nav-link:active {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}
.nav-bar .nav-link.active {
    color: var(--blue);
    background: var(--blue-bg);
}

/* --------------------------------------------------------------------------
   4. Dashboard / Home Page — Mobile-first
   -------------------------------------------------------------------------- */
.dashboard {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 16px;
}
@media (min-width: 768px) {
    .dashboard { max-width: 720px; }
}
@media (min-width: 1024px) {
    .dashboard { max-width: 960px; }
}

.dashboard h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.section-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 480px) {
    .section-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

.section-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.1s;
    /* Big tap target — minimum 48px tall */
    min-height: 48px;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.15);
}
.section-card:hover {
    border-color: var(--blue);
    transform: translateY(-1px);
    text-decoration: none;
}
.section-card:active {
    transform: scale(0.98);
    border-color: var(--blue);
}

.section-card .card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.section-card h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.section-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}

/* Count badges on cards */
.badge {
    display: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    white-space: nowrap;
    flex-shrink: 0;
}
.badge.has-count {
    display: inline;
}

.section-group {
    margin-bottom: 24px;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* Pipeline summary bar */
.pipeline-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.pipe-stat {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}
.pipe-stat .pipe-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.pipe-stat .pipe-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   5. Review-Specific Styles
   -------------------------------------------------------------------------- */

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.header .badge {
    background: var(--blue);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.header-nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

/* Queue cards */
.queue-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin: 8px 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.queue-card:hover {
    border-color: var(--blue);
}
.queue-card:active {
    border-color: var(--blue);
    transform: scale(0.99);
}

.queue-card .thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--border);
}

.queue-card .info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.queue-card .theme-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-card .caption-preview {
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-card .meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
}

.round-badge {
    background: var(--gold-bg);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Review page — image */
.review-image {
    width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

/* Scores row */
.scores-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.score-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

.score-badge.good {
    background: var(--green-bg);
    color: var(--green);
}

.score-badge.mid {
    background: var(--gold-bg);
    color: var(--gold);
}

.score-badge.bad {
    background: var(--red-bg);
    color: var(--red);
}

/* Component card */
.component-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: opacity 0.2s, border-color 0.2s;
}

.component-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.component-card.approved {
    border-color: var(--green);
}

.component-card.rejected {
    border-color: var(--red);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 12px 14px;
}

.card-body .field {
    margin-bottom: 8px;
}

.card-body .field-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-body .field-value {
    font-size: 14px;
    color: #ccc;
    word-break: break-word;
}

.hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hashtag {
    font-size: 12px;
    color: var(--blue);
    background: var(--blue-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Decision toggles */
.decision-toggles {
    display: flex;
    gap: 8px;
}

.decision-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.decision-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.decision-btn.approve.active {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}

.decision-btn.reject.active {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}

/* Idea loop — mobile-friendly decision buttons */
.idea-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.idea-actions .decision-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    min-height: 48px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.idea-actions .decision-btn:active {
    transform: scale(0.96);
}

.idea-actions .decision-btn.approve.active {
    background: var(--green-bg);
    border-color: var(--green);
    color: var(--green);
}

.idea-actions .decision-btn.reject.active {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}

/* Rejection tags — always visible, muted until .lit */
.rejection-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    opacity: 0.35;
    transition: opacity 0.2s;
}

.rejection-tags.lit {
    opacity: 1;
}

.tag-pill {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    min-height: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.tag-pill:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.tag-pill.active {
    background: var(--red-bg);
    border-color: var(--red);
    color: var(--red);
}

/* Cascade warning */
.cascade-warning {
    font-size: 12px;
    color: var(--gold);
    padding: 6px 14px;
    border-top: 1px solid var(--border);
}

/* Note textarea */
.note-area {
    display: none;
    padding: 0 14px 12px;
}

.note-area.visible {
    display: block;
}

.note-area textarea {
    width: 100%;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    padding: 8px;
    resize: vertical;
    min-height: 60px;
}

.note-area textarea:focus {
    outline: none;
    border-color: var(--blue);
}

/* Auto-rejected badge */
.auto-rejected-badge {
    font-size: 11px;
    color: var(--red);
    background: var(--red-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Approve All shortcut button */
.btn-approve-all {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: var(--green-bg);
    color: var(--green);
    border: 2px solid var(--green);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(74, 222, 128, 0.15);
    transition: all 0.15s;
}
.btn-approve-all:hover {
    background: var(--green);
    color: var(--bg);
}
.btn-approve-all:active {
    transform: scale(0.97);
    background: var(--green);
    color: var(--bg);
}

/* Submit bar */
.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 100;
}

.submit-btn {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: block;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.submit-btn.approve-all {
    background: var(--green-bg);
    color: var(--green);
}

.submit-btn.has-rejections {
    background: var(--gold-bg);
    color: var(--gold);
}

.submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Prior rounds collapsible */
.prior-rounds {
    margin: 12px 0;
}

.prior-rounds summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0;
}

.prior-round-item {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    margin: 4px 0;
    font-size: 13px;
}

.prior-round-item .round-label {
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 4px;
}

/* Analytics page */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.bar-chart {
    margin: 16px 0;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.bar-label {
    font-size: 12px;
    color: var(--text-dim);
    width: 120px;
    text-align: right;
    flex-shrink: 0;
}

.bar-fill {
    height: 20px;
    background: var(--blue);
    border-radius: 4px;
    transition: width 0.3s;
    min-width: 2px;
}

.bar-count {
    font-size: 12px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.code-table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
}

.code-table th {
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.code-table td {
    font-size: 13px;
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
}

.time-filter {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.time-filter button {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
}

.time-filter button.active {
    background: var(--blue-bg);
    border-color: var(--blue);
    color: var(--blue);
}

/* Spacing for fixed submit bar */
.review-content {
    padding-bottom: 80px;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. Labeler-Specific Styles
   -------------------------------------------------------------------------- */

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #141414;
}
.top-bar h1 { font-size: 1rem; font-weight: 600; color: var(--white); }
.top-bar a { color: var(--blue); text-decoration: none; font-size: 0.82rem; }
.top-bar a:hover { text-decoration: underline; }
.session-info { font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }

.progress-bar-wrap {
    padding: 0 24px;
    background: #141414;
    padding-bottom: 12px;
}
.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.progress-label { font-size: 0.75rem; color: #888; }
.progress-track {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Main layout */
.main {
    display: flex;
    height: calc(100vh - 80px);
}

/* Comparison panel (left, dominant) */
.compare-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow-y: auto;
}

.prompt-bar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.prompt-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
}
.prompt-text {
    font-size: 0.85rem;
    color: #ccc;
    font-family: var(--font-mono);
}

.pair-container {
    display: flex;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.image-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
.image-card:hover { border-color: var(--blue); }
.image-card.selected { border-color: var(--green); box-shadow: 0 0 20px rgba(74, 222, 128, 0.15); }
.image-card.rejected { border-color: var(--red); }
.image-card.tied { border-color: var(--blue); box-shadow: 0 0 20px rgba(74, 158, 255, 0.15); }
.image-card:active { transform: scale(0.98); border-color: var(--blue); }
.image-card.selected:active { border-color: var(--green); }
.image-card.rejected:active { border-color: var(--red); }

.image-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    z-index: 2;
    display: none;
}
.image-card.selected .badge { display: block; background: var(--green); color: var(--bg); }
.image-card.rejected .badge { display: block; background: var(--red); color: var(--white); }
.image-card.tied .badge { display: block; background: var(--blue); color: var(--white); }

/* Star button */
.star-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.star-btn:hover { background: rgba(0, 0, 0, 0.7); border-color: var(--gold); }
.star-btn:active { transform: scale(0.9); }
.star-btn .star-icon { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.5; transition: all 0.2s; }
.star-btn.active { background: var(--gold-bg); border-color: var(--gold); }
.star-btn.active .star-icon { fill: var(--gold); stroke: var(--gold); }

.image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    min-height: 300px;
    position: relative;
}
.image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-footer {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
}
.card-label { font-size: 0.78rem; font-weight: 600; color: #888; }
.card-score { font-size: 0.72rem; color: var(--text-faint); font-family: var(--font-mono); }

.pair-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-shrink: 0;
}
.btn-tie {
    padding: 8px 20px;
    background: var(--border);
    color: #888;
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-tie:hover { background: #333; color: #ccc; }
.btn-tie:active { transform: scale(0.97); opacity: 0.9; }

.keyboard-hints {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    flex-shrink: 0;
}
.hint { font-size: 0.7rem; color: #444; }
.hint kbd {
    display: inline-block;
    padding: 1px 6px;
    background: #222;
    border: 1px solid #333;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #888;
    margin-right: 3px;
}

/* Annotation panel (right sidebar) */
.annotation-panel {
    width: 320px;
    border-left: 1px solid var(--border-light);
    background: #141414;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.annotation-panel.hidden { display: none; }

.anno-header { padding: 16px; border-bottom: 1px solid var(--border-light); }
.anno-header h2 {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 4px;
}
.anno-subtitle { font-size: 0.78rem; color: var(--red); }

.feature-grid {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.feature-grid .feature-btn.span-full { grid-column: 1 / -1; }

.feature-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 6px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    min-height: 68px;
    position: relative;
}
.feature-btn:hover { border-color: #444; }
.feature-btn:active { transform: scale(0.96); border-color: var(--blue); }
.feature-btn.active { background: #2a1a1a; border-color: var(--red); }

.feature-label { font-size: 0.78rem; color: #ccc; text-align: center; line-height: 1.2; }
.feature-btn.active .feature-label { color: var(--red); }

.feature-key {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.6rem;
    color: #444;
    font-family: var(--font-mono);
    padding: 1px 4px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.anno-notes { padding: 12px 16px; }
.anno-notes textarea {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #ccc;
    font-size: 0.82rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}
.anno-notes textarea:focus { outline: none; border-color: var(--blue); }
.anno-notes label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.anno-footer { padding: 16px; margin-top: auto; border-top: 1px solid var(--border-light); }
.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-submit:hover { background: var(--blue-hover); }
.btn-submit:active { transform: scale(0.97); opacity: 0.9; }
.btn-submit:disabled { opacity: 0.3; cursor: default; }
.btn-submit.submitted { background: var(--green); color: var(--bg); }

.skip-row { display: flex; justify-content: center; margin-top: 8px; }
.btn-skip {
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px 8px;
}
.btn-skip:hover { color: #888; }
.btn-skip:active { transform: scale(0.97); opacity: 0.9; }

/* Scores sidebar panel */
.scores-section { padding: 12px 16px; border-top: 1px solid var(--border-light); }
.scores-section h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 8px;
}
.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.score-axis { font-size: 0.78rem; color: #888; }
.score-values { display: flex; gap: 12px; }
.score-val {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 44px;
    text-align: center;
}
.score-val.good { background: var(--green-dark-bg); color: var(--green); }
.score-val.mid { background: #2a2a1a; color: var(--gold); }
.score-val.bad { background: #2a1a1a; color: var(--red); }
.score-header {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 4px;
}
.score-col-label {
    font-size: 0.65rem;
    color: #444;
    text-transform: uppercase;
    min-width: 44px;
    text-align: center;
}

/* Mobile labeler — stack images, hide sidebar */
@media (max-width: 767px) {
    .main {
        flex-direction: column;
        height: auto;
    }
    .compare-panel {
        flex: 1;
        min-height: auto;
    }
    .pair-container {
        flex-direction: column;
        gap: 12px;
    }
    .image-card {
        max-width: 100%;
    }
    .annotation-panel {
        width: 100%;
        height: auto;
        max-height: none;
        overflow-y: visible;
        border-left: none;
        border-top: 1px solid var(--border);
    }
    .keyboard-hints {
        display: none;
    }
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .feature-btn.span-full {
        grid-column: span 3;
    }
}

/* Sessions page */
.sessions-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}
.sessions-page h2 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 16px;
}

.create-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 32px;
}
.create-form label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.create-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #ccc;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-bottom: 12px;
}
.create-form input[type="text"]:focus { outline: none; border-color: var(--blue); }
.btn-create {
    padding: 10px 20px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.btn-create:hover { background: var(--blue-hover); }
.btn-create:active { transform: scale(0.97); opacity: 0.9; }
.btn-create:disabled { opacity: 0.3; cursor: default; }

.session-table {
    width: 100%;
    border-collapse: collapse;
}
.session-table th {
    text-align: left;
    font-size: 0.72rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.session-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.82rem;
}
.session-table tr:hover td { background: var(--card-bg); }
.session-table a { color: var(--blue); text-decoration: none; }
.session-table a:hover { text-decoration: underline; }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}
.status-badge.in_progress { background: #2a2a1a; color: var(--gold); }
.status-badge.completed { background: var(--green-dark-bg); color: var(--green); }

/* Manifest list */
.manifest-list {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.manifest-list .session-table { margin: 0; }
.manifest-list .session-table td { border-color: var(--border-light); }
.manifest-list .session-table tr:hover td { background: var(--border-light); }

.btn-select {
    padding: 4px 12px;
    background: var(--border);
    color: #888;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-select:hover { background: #333; color: #ccc; }
.btn-select:active { transform: scale(0.97); opacity: 0.9; }
.btn-select.btn-selected {
    background: var(--green-dark-bg);
    border-color: var(--green);
    color: var(--green);
}

/* --------------------------------------------------------------------------
   7. Shoots-Specific Styles
   -------------------------------------------------------------------------- */

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 24px;
}

/* Form sections */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.field {
    margin-bottom: 12px;
}

.field:last-child {
    margin-bottom: 0;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field-row .field {
    flex: 1;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #aaa;
    margin-bottom: 4px;
}

select, input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--blue);
}

input[type="text"]::placeholder {
    color: var(--text-faint);
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #ccc;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--blue);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--blue-hover);
}
.btn-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--border);
    color: #ccc;
    border: 1px solid #333;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-secondary:hover {
    background: #333;
}
.btn-secondary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-danger {
    background: #2a1a1a;
    color: #e55;
    border: 1px solid #3a2020;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #3a2020;
}
.btn-danger:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-danger:disabled, .btn-secondary:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Logger page */
.logger-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.shoot-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.chip {
    display: inline-block;
    padding: 4px 10px;
    background: #1e2a3a;
    border: 1px solid #2a3a4a;
    border-radius: 100px;
    font-size: 0.75rem;
    color: #8ab4f8;
}

.logger-controls {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.btn-log {
    display: block;
    width: 100%;
    padding: 18px;
    margin-top: 12px;
    background: #1a3a1a;
    color: var(--green);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 2px solid #2a4a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-log:hover:not(:disabled) {
    background: #2a4a2a;
    border-color: var(--green);
}
.btn-log:active:not(:disabled) {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-log:disabled {
    opacity: 0.3;
    cursor: default;
}

.btn-log.logged {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

/* Log list */
.log-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.log-list-header h2 {
    margin-bottom: 0;
}

.log-actions {
    display: flex;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--card-bg);
}

tbody tr:hover {
    background: var(--card-bg);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #888;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-remove:hover {
    background: #3a2020;
    color: #e55;
}
.btn-remove:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* Editable select component */
.editable-select select {
    margin-bottom: 0;
}

.select-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.add-wrap {
    display: flex;
    gap: 4px;
    flex: 1;
}

.add-input {
    flex: 1;
    padding: 5px 8px !important;
    font-size: 0.78rem !important;
    background: #0a0a0a !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    color: #ccc !important;
}

.add-input::placeholder {
    color: #444 !important;
}

.btn-select-action {
    padding: 4px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-select-add {
    background: var(--green-dark-bg);
    color: var(--green);
    border-color: #2a3a2a;
}

.btn-select-add:hover {
    background: #2a3a2a;
}
.btn-select-add:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-select-remove {
    background: #2a1a1a;
    color: #e55;
    border-color: #3a2020;
}

.btn-select-remove:hover {
    background: #3a2020;
}
.btn-select-remove:active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* optgroup styling */
select optgroup {
    color: #888;
    font-weight: 600;
}

select option {
    color: var(--text);
    background: #111;
    padding: 4px;
}

/* Benchmark (real photo) toggle */
.benchmark-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}
.benchmark-btn:hover { background: rgba(0, 0, 0, 0.7); border-color: #2dd4bf; color: #2dd4bf; }
.benchmark-btn:active { transform: scale(0.95); opacity: 0.8; }
.benchmark-btn.active { background: rgba(45, 212, 191, 0.15); border-color: #2dd4bf; color: #2dd4bf; }
.benchmark-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.benchmark-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}
.benchmark-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.benchmark-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2dd4bf;
    color: #0f0f0f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 6;
}
.benchmark-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    z-index: 6;
}
.benchmark-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.benchmark-nav:hover { background: rgba(0, 0, 0, 0.7); color: #fff; }
.benchmark-nav:active { transform: translateY(-50%) scale(0.9); }
.benchmark-nav.prev { left: 8px; }
.benchmark-nav.next { right: 8px; }

/* --------------------------------------------------------------------------
   14. Video Studio
   -------------------------------------------------------------------------- */

/* Layout */
.studio-page { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }
.studio-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; }
.studio-header h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 600; color: var(--white); }
.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.back-link { color: var(--blue); text-decoration: none; font-size: 0.85rem; display: inline-block; margin-bottom: 8px; }
.back-link:hover { text-decoration: underline; }

/* Stat cards row */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--white); }
.stat-label { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Create project card */
.studio-create-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 28px; }
.studio-create-card h2 { margin: 0 0 16px; font-size: 1.1rem; color: var(--white); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 5px; font-weight: 500; }
.field input[type="text"],
.select-input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; color: var(--text); font-size: 0.9rem; font-family: var(--font-sans); }
.field input[type="text"]:focus,
.select-input:focus { outline: none; border-color: var(--blue); }
.field-row { display: flex; gap: 14px; }
.file-input { font-size: 0.85rem; color: var(--text-dim); }

/* Buttons */
.btn-primary { display: block; width: 100%; padding: 12px 20px; background: var(--blue); color: var(--white); border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.15s; font-family: var(--font-sans); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { padding: 8px 16px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); font-size: 0.85rem; cursor: pointer; font-family: var(--font-sans); transition: border-color 0.15s, color 0.15s; }
.btn-secondary:hover { border-color: var(--text-dim); color: var(--text); }
.btn-secondary:active { transform: scale(0.97); opacity: 0.9; }
.btn-small { padding: 5px 12px; font-size: 0.78rem; }
.btn-success { background: var(--green); border-color: var(--green); color: #000; }
.action-row { display: flex; gap: 12px; align-items: center; }

/* Project list (queue cards) */
.projects-list { display: flex; flex-direction: column; gap: 8px; }
.queue-card { display: flex; align-items: center; gap: 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.queue-card:hover { border-color: var(--blue); }
.queue-card:active { border-color: var(--blue); transform: scale(0.99); }
.queue-card .info { flex: 1; min-width: 0; }
.queue-card .theme-text { display: block; font-weight: 600; color: var(--white); font-size: 0.95rem; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-card .caption-preview { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 6px; }
.queue-card .meta { display: flex; gap: 8px; align-items: center; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; }

/* Chips / badges */
.chip { display: inline-block; padding: 3px 10px; background: var(--border); border-radius: 12px; font-size: 0.75rem; color: var(--text-dim); }
.chip-crm { background: var(--blue-bg); color: var(--blue); }
.chip-cloud { background: var(--green-bg); color: var(--green); }

/* Stitch status badges */
.stitch-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stitch-status.draft { background: var(--border); color: var(--text-dim); }
.stitch-status.stitching { background: var(--gold-bg); color: var(--gold); }
.stitch-status.stitched { background: var(--green-bg); color: var(--green); }
.stitch-status.scheduled { background: var(--blue-bg); color: var(--blue); }
.stitch-status.failed { background: var(--red-bg); color: var(--red); }

/* CRM info panel */
.crm-info-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; }
.crm-info-row { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.crm-info-row:last-child { margin-bottom: 0; }
.crm-info-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 600; min-width: 120px; }
.mono { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); }

/* Bookend cards (intro/outro on project page) */
.bookend-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.bookend-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.bookend-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bookend-header h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.06em; }
.bookend-status { font-size: 0.75rem; font-weight: 500; }
.bookend-status.status-pending { color: var(--text-muted); }
.bookend-status.status-logged { color: var(--gold); }
.bookend-status.status-done { color: var(--green); }

/* Transcript textarea */
.transcript-box { margin-bottom: 14px; }
.transcript-editable { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px; color: var(--text); font-size: 0.9rem; font-family: var(--font-sans); line-height: 1.5; resize: none; min-height: 150px; transition: border-color 0.15s; }
.transcript-editable:focus { outline: none; border-color: var(--blue); }
.transcript-editable::placeholder { color: var(--text-muted); }

/* Log session button */
.btn-log-session { display: block; width: 100%; padding: 14px; border: 2px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; transition: all 0.2s; font-family: var(--font-sans); }
.btn-log-session:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-log-session.intro:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-log-session.outro:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-log-session:active:not(:disabled) { transform: scale(0.97); opacity: 0.9; }
.btn-log-session.logged { border-color: var(--green); color: var(--green); background: var(--green-bg); cursor: default; }
.btn-log-session:disabled { opacity: 0.6; cursor: not-allowed; }

/* Recording session page */
.session-phases { display: flex; gap: 0; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.phase-step { flex: 1; padding: 12px; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); background: var(--card-bg); border-right: 1px solid var(--border); transition: all 0.2s; }
.phase-step:last-child { border-right: none; }
.phase-step.active { color: var(--white); background: var(--blue-bg); }
.phase-step.completed { color: var(--green); }

.session-progress { margin-bottom: 20px; }
.progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.progress-label { font-size: 0.82rem; color: var(--text-dim); }
.progress-track { width: 100%; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.4s ease; }

.session-current-video { margin-bottom: 24px; }
.session-video-title { font-size: 1.1rem; color: var(--white); margin: 0 0 14px; }
.video-preview { margin-bottom: 16px; border-radius: 10px; overflow: hidden; background: #000; }
.video-preview video { width: 100%; display: block; max-height: 400px; }
.log-btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.session-skip-row { text-align: center; }

/* Auto-advance bar */
.auto-advance-bar { position: relative; height: 36px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.auto-advance-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--green-bg); }
.auto-advance-text { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.82rem; color: var(--text-dim); }

.session-done-msg { background: var(--green-bg); border: 1px solid rgba(74, 222, 128, 0.2); border-radius: 10px; padding: 20px; color: var(--green); text-align: center; font-size: 0.95rem; }

/* Session log table */
.session-log { margin-top: 24px; }
.session-log h2 { font-size: 1rem; color: var(--text-dim); margin: 0 0 10px; }
.session-log table { width: 100%; border-collapse: collapse; }
.session-log th { text-align: left; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.session-log td { padding: 8px 10px; font-size: 0.85rem; color: var(--text); border-bottom: 1px solid var(--border-light); }

/* Batch upload */
.upload-batch-section { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.upload-batch-row { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.upload-batch-label { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 10px; }
.upload-batch-info { font-size: 0.78rem; color: var(--text-dim); margin-top: 8px; }

/* Mapping table */
.mapping-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.mapping-table th { text-align: left; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.mapping-table td { padding: 8px 10px; font-size: 0.85rem; color: var(--text); border-bottom: 1px solid var(--border-light); }
.mapping-mismatch td { color: var(--red); }

.upload-progress-msg { margin-top: 12px; font-size: 0.85rem; color: var(--text-dim); padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; }
.upload-progress-msg.success { color: var(--green); border-color: rgba(74, 222, 128, 0.2); }
.upload-progress-msg.error { color: var(--red); border-color: rgba(239, 68, 68, 0.2); }

/* Stitch progress */
.stitch-progress-bar { margin-top: 16px; }
.stitch-errors { margin-top: 8px; font-size: 0.82rem; color: var(--red); }
.session-stitch-info { font-size: 0.92rem; color: var(--text-dim); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.modal-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; width: 90%; max-width: 560px; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 1.1rem; color: var(--white); }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 1.5rem; cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--white); }
.modal-close:active { transform: scale(0.9); }
.modal-body { padding: 16px 20px; overflow-y: auto; }

/* CRM import items */
.crm-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-light); gap: 12px; }
.crm-item:last-child { border-bottom: none; }
.crm-item-info { flex: 1; min-width: 0; }
.crm-item-title { display: block; font-weight: 600; color: var(--white); font-size: 0.9rem; }
.crm-item-meta { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.crm-item-url { display: block; font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-import { flex-shrink: 0; }

/* Empty / loading states */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.9rem; }
.empty-state a { color: var(--blue); }
.loading { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }

/* Inline log buttons on queue cards */
.queue-card .log-btns { display: flex; gap: 6px; flex-shrink: 0; }
.btn-log-inline { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-dim); font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: var(--font-sans); transition: all 0.15s; white-space: nowrap; }
.btn-log-inline:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-log-inline.intro:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-log-inline.outro:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-log-inline:active:not(:disabled) { transform: scale(0.97); opacity: 0.9; }
.btn-log-inline.logged { border-color: var(--green); color: var(--green); background: var(--green-bg); cursor: default; font-size: 0.72rem; }
.btn-log-inline:disabled { opacity: 0.6; cursor: not-allowed; }
.chip-logged { background: var(--gold-bg); color: var(--gold); }
.chip-done { background: var(--green-bg); color: var(--green); }

/* Batch upload section (dashboard) */
.batch-upload-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-top: 32px; }
.batch-upload-section h2 { margin: 0 0 4px; font-size: 1.1rem; color: var(--white); }
.batch-upload-section > .subtitle { margin: 0 0 18px; font-size: 0.82rem; color: var(--text-dim); }
.upload-dropzone { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; transition: all 0.2s; padding: 20px; text-align: center; }
.upload-dropzone input[type="file"] { display: none; }
.dropzone-text { font-size: 0.9rem; color: var(--text-muted); }
.upload-dropzone:hover, .upload-dropzone.drag-over { border-color: var(--blue); background: rgba(74, 158, 255, 0.04); }
.upload-dropzone.drag-over .dropzone-text { color: var(--blue); }
.upload-dropzone.has-files { border-color: var(--green); border-style: solid; background: var(--green-bg); }
.upload-dropzone.has-files .dropzone-text { color: var(--green); font-weight: 600; }
.chip-intro { background: var(--blue-bg); color: var(--blue); }
.chip-outro { background: var(--gold-bg); color: var(--gold); }

/* Stitch section (dashboard) */
.stitch-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }

/* Responsive */
@media (max-width: 640px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .bookend-cards { grid-template-columns: 1fr; }
    .field-row { flex-direction: column; gap: 0; }
    .studio-header { flex-direction: column; }
    .queue-card { flex-direction: column; align-items: stretch; }
    .queue-card .log-btns { justify-content: flex-end; }
}

/* --------------------------------------------------------------------------
   Starred Images Gallery
   -------------------------------------------------------------------------- */
.starred-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}
.starred-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.starred-header h1 { font-size: 1.4rem; font-weight: 600; }
.starred-actions { display: flex; gap: 10px; }
.starred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.starred-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: opacity 0.2s, border-color 0.2s;
}

/* --------------------------------------------------------------------------
   Mobile bottom tab bar
   -------------------------------------------------------------------------- */
.bottom-tabs {
    display: none;
}

@media (max-width: 640px) {
    /* Hide top nav links on mobile, keep brand */
    .nav-bar .nav-link {
        display: none;
    }

    /* Show bottom tabs */
    .bottom-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #141414;
        border-top: 1px solid var(--border-light);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .bottom-tabs .tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 4px 6px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        -webkit-tap-highlight-color: rgba(74, 158, 255, 0.15);
        transition: color 0.15s;
    }
    .bottom-tabs .tab:hover,
    .bottom-tabs .tab:active {
        color: var(--white);
        text-decoration: none;
    }
    .bottom-tabs .tab svg {
        opacity: 0.6;
    }
    .bottom-tabs .tab:active svg {
        opacity: 1;
    }

    /* Add padding to body so content doesn't hide behind bottom bar */
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
    }
}

/* Success card after approval */
.success-card {
    text-align: center;
    padding: 40px 20px;
    max-width: 480px;
    margin: 40px auto;
}
.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.success-card h2 {
    font-size: 1.4rem;
    color: var(--white);
    margin: 0 0 8px;
}
.success-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0 0 20px;
}
.schedule-details {
    text-align: left;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.schedule-detail-row {
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.schedule-detail-row:last-child {
    border-bottom: none;
}
.success-actions {
    margin-top: 16px;
}
.btn-next-post {
    display: inline-block;
    padding: 14px 28px;
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.15);
}
.btn-next-post:active {
    transform: scale(0.97);
}

/* Auto-approve banner for high-score posts */
.auto-approve-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--green-bg), rgba(74, 222, 128, 0.15));
    border: 2px solid var(--green);
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--green);
    -webkit-tap-highlight-color: rgba(74, 222, 128, 0.15);
    transition: all 0.15s;
}
.auto-approve-banner:active {
    transform: scale(0.97);
}
.auto-approve-icon {
    font-size: 20px;
}

/* Generation failure alert banner */
.gen-alert {
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--red);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Idea Loop — Batch Review UX Improvements
   -------------------------------------------------------------------------- */

/* Header progress indicator */
.batch-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
}
.progress-count {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.progress-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, box-shadow 0.2s;
}
.progress-dot.decided {
    background: var(--green);
    box-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
}

/* Floating "Next" nav pill */
.idea-nav-pill {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}
.idea-nav-pill:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: var(--blue);
    color: var(--blue);
}
.idea-nav-pill:active {
    transform: scale(0.94);
}

/* Highlight pulse when navigating to a card */
@keyframes idea-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(74, 158, 255, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0); }
}
.component-card.highlight-pulse {
    animation: idea-pulse 0.8s ease-out;
    border-color: var(--blue);
}

/* Approve remaining bulk action */
.btn-approve-remaining {
    display: block;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 20px;
    background: transparent;
    color: var(--green);
    border: 1.5px solid var(--green);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: rgba(74, 222, 128, 0.15);
    margin-bottom: 16px;
}
.btn-approve-remaining:hover {
    background: var(--green-bg);
}
.btn-approve-remaining:active {
    transform: scale(0.97);
    background: var(--green-bg);
}

/* Rejection hint text */
.rejection-hint {
    font-size: 12px;
    font-style: italic;
    color: var(--gold);
    opacity: 0.75;
    padding: 0 14px 10px;
    min-height: 0;
    transition: opacity 0.2s;
}
.rejection-hint:empty {
    display: none;
}

/* ===========================================
   Round 3: 23 workflow improvements
   =========================================== */

/* --- Review: queue bulk-reject, score gradients, rejection chips, smart suggestions, inline notes --- */

/* --------------------------------------------------------------------------
   Prior rejection chips (inline on component cards)
   -------------------------------------------------------------------------- */
.prior-rejection-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 12px 2px;
}
.rejection-chip {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Smart rejection suggestions
   -------------------------------------------------------------------------- */
.smart-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 4px;
}
.suggestion-pill {
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.15s;
}
.suggestion-pill:hover {
    border-color: var(--text-dim);
    color: var(--text-dim);
}
.suggestion-pill.active {
    background: var(--red-bg);
    color: var(--red);
    border-style: solid;
    border-color: var(--red);
}

/* --------------------------------------------------------------------------
   Inline rejection note (inside component card body)
   -------------------------------------------------------------------------- */
.inline-note {
    margin-top: 8px;
}
.inline-note-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    font-family: var(--font-sans);
    padding: 6px 10px;
    transition: min-height 0.15s ease;
    min-height: 32px;
    resize: none;
}
.inline-note-input:focus {
    outline: none;
    border-color: var(--blue);
    min-height: 60px;
}
.inline-note-input.expanded {
    min-height: 60px;
}

/* --- Dashboard: card status, schedule popover, breadcrumbs, gen retry --- */

/* --------------------------------------------------------------------------
   Dashboard UI enhancements
   -------------------------------------------------------------------------- */

/* Card status lines — secondary hint text */
.card-status {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

/* Schedule preview popover */
.pipe-stat-clickable {
    cursor: pointer;
    position: relative;
}
.pipe-stat-clickable:hover {
    border-color: var(--blue);
}

.schedule-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 240px;
    z-index: 100;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.schedule-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #1e1e1e;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.popover-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.popover-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
}
.popover-row:last-child {
    border-bottom: none;
}
.popover-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.popover-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.popover-time {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}
.popover-cat {
    font-size: 11px;
    color: var(--text-muted);
}
.popover-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
}

/* Breadcrumb pipeline flow */
.breadcrumb-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    background: rgba(26, 26, 26, 0.7);
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    padding: 0 12px;
}
.bc-step {
    color: var(--text-faint);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
    padding: 2px 4px;
}
a.bc-step:hover {
    color: var(--text);
    text-decoration: none;
}
.bc-step.bc-active {
    color: var(--blue);
    border-bottom: 1.5px solid var(--blue);
}
.bc-arrow {
    color: var(--text-faint);
    font-size: 10px;
    opacity: 0.5;
}

/* Gen-alert retry button */
.gen-alert {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gen-alert #gen-alert-text {
    flex: 1;
}
.gen-retry-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-sans);
}
.gen-retry-btn:hover {
    background: var(--red);
    color: var(--white);
}
.gen-retry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Labeler: keymap overlay, side-by-side benchmark, focus rings, score summary --- */

/* --------------------------------------------------------------------------
   Labeler UI Improvements — Keymap, Side-by-Side, Keyboard, Score Summary
   -------------------------------------------------------------------------- */

/* 1. Visual Keymap Overlay */
.keymap-toggle-btn {
    background: none;
    border: 1px solid #333;
    color: #666;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
    white-space: nowrap;
}
.keymap-toggle-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.keymap-overlay {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 300;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;
    max-width: 360px;
}
.keymap-overlay.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.keymap-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.keymap-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin: 10px 0 6px;
}
.keymap-section-label:first-of-type {
    margin-top: 0;
}

.keymap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
}

.keymap-key {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.72rem;
    color: #999;
    text-align: center;
    transition: all 0.15s;
    white-space: nowrap;
}
.keymap-key kbd {
    display: inline-block;
    background: #222;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 0 4px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-right: 3px;
    min-width: 16px;
    text-align: center;
}
.keymap-key.active {
    background: #2a1a1a;
    border-color: var(--red);
    color: var(--red);
}
.keymap-key.active kbd {
    background: #3b1111;
    border-color: var(--red);
    color: var(--red);
}
.keymap-key.keymap-wide {
    grid-column: 1 / -1;
}
.keymap-key.keymap-action {
    background: #111;
    border-color: #2a2a2a;
    color: #888;
}

.keymap-dismiss {
    margin-top: 10px;
    text-align: center;
    font-size: 0.65rem;
    color: #444;
}
.keymap-dismiss kbd {
    display: inline-block;
    background: #222;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 0 4px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: #666;
}

/* 2. Side-by-Side Benchmark Mode */
.sbs-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 6px;
    cursor: pointer;
    user-select: none;
}
.sbs-toggle input[type="checkbox"] {
    accent-color: #2dd4bf;
    width: 14px;
    height: 14px;
    cursor: pointer;
}
.sbs-label {
    font-size: 0.7rem;
    color: #555;
    transition: color 0.15s;
}
.sbs-toggle:hover .sbs-label {
    color: #888;
}

.pair-container.sbs-mode {
    gap: 8px;
}
.pair-container.sbs-mode .image-card {
    flex: 1;
}

.sbs-ref-column {
    flex: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    border: 2px solid #2dd4bf;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
}
.sbs-ref-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sbs-ref-column .benchmark-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2dd4bf;
    color: #0f0f0f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 6;
}
.sbs-ref-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}
.sbs-ref-nav .benchmark-nav {
    position: static;
    transform: none;
    width: 28px;
    height: 28px;
    font-size: 18px;
}
.sbs-ref-nav .benchmark-nav:active {
    transform: scale(0.9);
}
.sbs-ref-nav .benchmark-counter {
    position: static;
    transform: none;
    font-size: 11px;
}

/* 3. Focus Ring Styles for Keyboard Navigation */
.image-card:focus {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}
.image-card:focus:not(:focus-visible) {
    outline: none;
}
.image-card:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.feature-btn:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}
.feature-btn:focus:not(:focus-visible) {
    outline: none;
}
.feature-btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.btn-tie:focus-visible,
.btn-submit:focus-visible,
.btn-skip:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}
.btn-tie:focus:not(:focus-visible),
.btn-submit:focus:not(:focus-visible),
.btn-skip:focus:not(:focus-visible) {
    outline: none;
}

.anno-notes textarea:focus-visible {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.25);
}

/* 4. Quick Score Summary */
.score-summary {
    text-align: center;
    font-size: 12px;
    font-family: var(--font-mono);
    color: #666;
    margin-top: 8px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
    min-height: 0;
}
.score-summary.visible {
    opacity: 1;
}
.summary-higher {
    color: var(--green);
    font-weight: 600;
}
.summary-lower {
    color: var(--text-muted);
}
.summary-driver {
    color: #555;
    font-style: italic;
    font-family: var(--font-sans);
}

/* Mobile: hide keymap overlay and sbs toggle */
@media (max-width: 767px) {
    .keymap-overlay {
        display: none;
    }
    .sbs-toggle {
        display: none;
    }
    .keymap-toggle-btn {
        display: none;
    }
}

/* --- Video: upload progress, bulk create, stitch progress, workflow state --- */

/* --------------------------------------------------------------------------
   15. Video Studio — Upload Progress & Bulk Create
   -------------------------------------------------------------------------- */

/* Bulk create button in header */
.btn-bulk-create {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: border-color 0.15s, color 0.15s;
}
.btn-bulk-create:hover { border-color: var(--blue); color: var(--blue); }
.btn-bulk-create:active { transform: scale(0.97); }

/* Responsive: upload progress and workflow steps */
@media (max-width: 640px) {
    .upload-file-bar { width: 60px; }
    .card-workflow-state { flex-wrap: wrap; }
    .card-stitch-progress { flex-wrap: nowrap; }
}

/* --- Analytics: sparklines --- */

/* --------------------------------------------------------------------------
   15. Analytics Sparklines
   -------------------------------------------------------------------------- */
.sparkline {
    display: inline-block;
    vertical-align: middle;
}

.bar-row .bar-label {
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== Round 4 Section 1: Dashboard + Schedule + Shortcuts (a4431a45) ========== */

/* --------------------------------------------------------------------------
   16. Pending Actions — "What's Next" (Dashboard)
   -------------------------------------------------------------------------- */
.pending-actions {
    margin-bottom: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.pa-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 10px 16px 6px;
}
.pa-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.12);
}
.pa-row:hover {
    background: rgba(255,255,255,0.03);
    text-decoration: none;
}
.pa-row:active {
    background: rgba(255,255,255,0.06);
}
.pa-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.pa-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.pa-arrow {
    font-size: 20px;
    color: var(--text-faint);
    flex-shrink: 0;
    font-weight: 300;
}

/* --------------------------------------------------------------------------
   17. 24-Hour Timeline (Dashboard)
   -------------------------------------------------------------------------- */
.day-timeline {
    margin-bottom: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
}
.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.timeline-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.timeline-link {
    font-size: 11px;
    color: var(--blue);
    text-decoration: none;
}
.timeline-link:hover {
    text-decoration: underline;
}
.timeline-track {
    position: relative;
    height: 24px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: visible;
}
.timeline-now {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--blue);
    border-radius: 1px;
    z-index: 2;
    box-shadow: 0 0 6px rgba(74, 158, 255, 0.5);
}
.timeline-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.15s;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.timeline-dot:hover {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 4;
}
.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 9px;
    color: var(--text-faint);
    padding: 0 2px;
}

/* --------------------------------------------------------------------------
   18. Keyboard Shortcuts Modal (Global)
   -------------------------------------------------------------------------- */
.shortcuts-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.shortcuts-modal {
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
    overflow: hidden;
}
.shortcuts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}
.shortcuts-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.shortcuts-close:hover {
    color: var(--white);
}
.shortcuts-body {
    padding: 12px 18px 18px;
}
.sc-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-top: 12px;
}
.sc-section-title:first-child {
    margin-top: 0;
}
.sc-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    align-items: center;
}
.sc-key kbd {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--white);
    min-width: 28px;
    text-align: center;
}
.sc-desc {
    font-size: 13px;
    color: var(--text-dim);
}

/* Shortcut hint in footer */
.shortcut-hint {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--text-faint);
    cursor: pointer;
    z-index: 50;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.shortcut-hint:hover {
    opacity: 1;
}
.shortcut-hint kbd {
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 10px;
}
@media (max-width: 640px) {
    .shortcut-hint {
        bottom: 68px;
        right: 12px;
    }
}

/* --------------------------------------------------------------------------
   19. Data Freshness Indicator (Global)
   -------------------------------------------------------------------------- */
.data-freshness {
    position: fixed;
    bottom: 10px;
    left: 12px;
    font-size: 10px;
    color: var(--text-faint);
    cursor: pointer;
    z-index: 50;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    transition: color 0.3s, background 0.3s;
}
.data-freshness:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-dim);
}
.data-freshness.fresh {
    color: var(--green);
}
.data-freshness.stale {
    color: var(--gold);
}
.data-freshness.old {
    color: var(--text-faint);
}
@media (max-width: 640px) {
    .data-freshness {
        bottom: 68px;
        left: 12px;
    }
}

/* ========== Round 4 Section 2: Review Pipeline + Gen Status (a6535d96) ========== */

/* ==========================================================================
   16. Package Detail Page
   ========================================================================== */
.pkg-detail {
    padding-bottom: 40px;
}

.pkg-section {
    margin-bottom: 24px;
}

.pkg-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.variant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.variant-cell {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
}

.variant-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 8px 0 4px;
}

.variant-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.variant-cell a {
    display: block;
}

.variant-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    color: var(--text-faint);
    font-size: 12px;
    background: #111;
}

.pkg-platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.pkg-platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pkg-platform-header strong {
    text-transform: capitalize;
    color: var(--white);
    font-size: 14px;
}

.pkg-char-count {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.pkg-truncated {
    background: var(--gold-bg);
    color: var(--gold);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.pkg-platform-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.pkg-hashtags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pkg-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pkg-schedule-table th {
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.pkg-schedule-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.pkg-state-published {
    color: var(--green);
    font-weight: 600;
}

.pkg-state-scheduled {
    color: var(--blue);
    font-weight: 600;
}

.pkg-state-skipped {
    color: var(--text-muted);
}

.pkg-reddit-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.pkg-reddit-card .field {
    margin-bottom: 8px;
}

.pkg-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pkg-meta-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pkg-meta-item .field-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pkg-meta-item .field-value {
    font-size: 14px;
    color: var(--white);
    font-weight: 500;
}

.pkg-empty {
    color: var(--text-faint);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

/* ==========================================================================
   17. Generation Status Page
   ========================================================================== */
.gen-status-page {
    padding-bottom: 40px;
}

.gen-section {
    margin-bottom: 24px;
}

.gen-section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.gen-status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
}

.gen-running {
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.gen-idle {
    background: var(--green-dark-bg);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.gen-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(74, 158, 255, 0.2);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: gen-spin 0.8s linear infinite;
}

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

.gen-check {
    font-size: 22px;
}

.gen-error-box {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 14px;
}

.gen-error-pre {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--red);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 12px;
    line-height: 1.5;
}

.btn-retry-gen {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-retry-gen:hover {
    background: var(--red);
    color: var(--white);
}

.gen-stuck-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gen-stuck-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.gen-stuck-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gen-stuck-id {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--white);
    font-weight: 500;
}

.gen-stuck-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-force-complete {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-force-complete:hover {
    background: var(--gold);
    color: var(--bg);
}

.gen-no-stuck {
    color: var(--green);
    font-size: 13px;
    text-align: center;
    padding: 16px;
    background: var(--green-dark-bg);
    border-radius: 8px;
}

.gen-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gen-health-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.gen-health-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.gen-health-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   18. Review — Packaging Error & Retry
   ========================================================================== */
.packaging-error-box {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    text-align: left;
}

.packaging-error-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 6px;
}

.packaging-error-msg {
    font-size: 12px;
    color: rgba(239, 68, 68, 0.8);
    font-family: var(--font-mono);
    line-height: 1.5;
    word-break: break-word;
    margin-bottom: 12px;
}

.btn-retry-packaging {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-retry-packaging:hover {
    background: var(--red);
    color: var(--white);
}

.btn-retry-packaging:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-view-package {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    padding: 8px 0;
    margin-top: 8px;
    text-decoration: none;
}

.btn-view-package:hover {
    text-decoration: underline;
}

/* ==========================================================================
   19. Review — Swipe Gesture Overlay
   ========================================================================== */
.swipe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swipe-overlay.visible {
    /* opacity controlled by JS */
}

.swipe-overlay.swipe-right {
    background: rgba(74, 222, 128, 0.6);
}

.swipe-overlay.swipe-left {
    background: rgba(239, 68, 68, 0.6);
}

.swipe-overlay-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ========== Round 4 Section 3: Analytics + CSV + ARIA (a84ed1c0) ========== */

/* --------------------------------------------------------------------------
   16. Analytics — Root Cause Charts + CSV Export
   -------------------------------------------------------------------------- */

/* Export buttons row */
.analytics-export-btns {
    display: flex;
    gap: 8px;
}
.btn-export {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-export:hover {
    background: var(--blue-bg);
    border-color: var(--blue);
    color: var(--blue);
}
.btn-export:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Horizontal bar chart (approval by category) */
.analytics-hbar-chart {
    margin: 8px 0 16px;
}
.analytics-hbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.analytics-hbar-label {
    font-size: 12px;
    color: var(--text-dim);
    width: 120px;
    text-align: right;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.analytics-hbar-track {
    flex: 1;
    height: 22px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.analytics-hbar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
    min-width: 2px;
}
.analytics-hbar-fill.hbar-green { background: var(--green); }
.analytics-hbar-fill.hbar-yellow { background: var(--gold); }
.analytics-hbar-fill.hbar-red { background: var(--red); }
.analytics-hbar-value {
    font-size: 12px;
    color: var(--text);
    width: 100px;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

/* Round survival funnel */
.analytics-funnel {
    margin: 8px 0 16px;
}
.analytics-funnel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.analytics-funnel-label {
    font-size: 12px;
    color: var(--text-dim);
    width: 70px;
    text-align: right;
    flex-shrink: 0;
}
.analytics-funnel-bar-wrap {
    flex: 1;
    display: flex;
}
.analytics-funnel-bar {
    height: 28px;
    background: linear-gradient(90deg, var(--blue-bg), var(--blue));
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    transition: width 0.3s;
    min-width: 80px;
}
.analytics-funnel-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
}
.analytics-funnel-count {
    font-size: 11px;
    color: var(--text-muted);
    width: 60px;
    flex-shrink: 0;
    text-align: right;
}

/* Score threshold (two big numbers side by side) */
.analytics-score-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0 16px;
}
.analytics-score-card {
    padding: 20px 16px;
    border-radius: 10px;
    text-align: center;
}
.analytics-score-approved {
    background: var(--green-bg);
    border: 1px solid rgba(74, 222, 128, 0.2);
}
.analytics-score-rejected {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.analytics-score-number {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.analytics-score-approved .analytics-score-number { color: var(--green); }
.analytics-score-rejected .analytics-score-number { color: var(--red); }
.analytics-score-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* Cascade donut (CSS conic-gradient) */
.analytics-donut-wrap {
    margin: 8px 0 24px;
}
.analytics-donut-container {
    display: flex;
    align-items: center;
    gap: 24px;
}
.analytics-donut {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.analytics-donut-hole {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.analytics-donut-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.analytics-donut-sublabel {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.analytics-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.analytics-donut-legend-item {
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}
.analytics-donut-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   17. Labeler — Session Stats Panel
   -------------------------------------------------------------------------- */

.labeler-stats-toggle {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.labeler-stats-toggle[aria-pressed="true"] {
    background: var(--blue-bg);
    border-color: var(--blue);
    color: var(--blue);
}
.labeler-stats-toggle:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.labeler-session-stats {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 10px;
    padding: 12px 16px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.labeler-stats-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.labeler-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.labeler-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    font-family: var(--font-mono);
    line-height: 1;
}

.labeler-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.labeler-feature-freq {
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
}

.labeler-feat-chart-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.labeler-feat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.labeler-feat-name {
    font-size: 11px;
    color: var(--text-dim);
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.labeler-feat-bar-track {
    flex: 1;
    height: 14px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.labeler-feat-bar-fill {
    height: 100%;
    background: var(--red);
    border-radius: 3px;
    transition: width 0.3s;
    min-width: 2px;
}

.labeler-feat-count {
    font-size: 11px;
    color: var(--text-muted);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

/* ========== Round 4 Section 4: Video + Settings (a05c2696) ========== */

/* ==========================================================================
   16. Video Studio — Transcript Auto-Save, CRM Sync, Stitch Detail Modal
   ========================================================================== */

/* Queue card wrapper for transcript section */
.queue-card-wrap {
    margin: 8px 0;
}
.queue-card-wrap .queue-card {
    margin: 0;
    border-radius: 10px;
}
.queue-card-wrap .queue-card + .card-transcript-section {
    /* When transcript section follows, adjust card border radius */
}
/* Sibling combinator: if card-transcript-section exists after queue-card,
   adjust the card's bottom corners. Uses :has() with fallback. */
@supports selector(:has(*)) {
    .queue-card-wrap:has(.card-transcript-section) .queue-card {
        border-radius: 10px 10px 0 0;
    }
}

/* Card right actions (detail button + log buttons) */
.card-right-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

/* Stitch detail button */
.btn-stitch-detail {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-stitch-detail:hover {
    border-color: var(--blue);
    color: var(--blue);
}
.btn-stitch-detail:active {
    transform: scale(0.97);
}

/* CRM sync badges */
.chip-crm-synced {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.2);
}
.chip-crm-unsynced {
    background: var(--gold-bg);
    color: var(--gold);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* CRM sync button */
.btn-crm-sync {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.15s;
}
.btn-crm-sync:hover {
    border-color: var(--blue);
    color: var(--blue);
}
.btn-crm-sync.synced {
    border-color: var(--green);
    color: var(--green);
}
.btn-crm-sync.failed {
    border-color: var(--red);
    color: var(--red);
}

/* Inline transcript editing on project cards */
.card-transcript-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 10px 18px 14px;
    display: flex;
    gap: 14px;
}
.card-transcript-row {
    flex: 1;
    min-width: 0;
}
.card-transcript-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.transcript-dirty {
    color: var(--gold);
    font-weight: 700;
    margin-left: 2px;
}
.transcript-input-wrap {
    position: relative;
}
.card-transcript-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--text);
    font-size: 0.82rem;
    font-family: var(--font-sans);
    line-height: 1.4;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    transition: border-color 0.15s;
}
.card-transcript-input:focus {
    outline: none;
    border-color: var(--blue);
}
.card-transcript-input::placeholder {
    color: var(--text-muted);
}

/* Transcript save indicator */
.transcript-save-indicator {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    pointer-events: none;
    transition: opacity 0.2s;
}
.transcript-save-indicator.saving {
    color: var(--gold);
    background: var(--gold-bg);
}
.transcript-save-indicator.saved {
    color: var(--green);
    background: var(--green-bg);
}
.transcript-save-indicator.error {
    color: var(--red);
    background: var(--red-bg);
}

/* Stitch Detail Modal */
.stitch-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.stitch-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stitch-detail-full {
    grid-column: 1 / -1;
}
.stitch-detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stitch-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.stitch-error-box {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--red);
    margin-top: 12px;
    word-break: break-word;
}

/* Helper text color classes */
.text-green { color: var(--green); }

/* ==========================================================================
   17. Settings Pages — Platforms & Content Mix
   ========================================================================== */

/* Settings page layout */
.settings-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}
.settings-header {
    margin-bottom: 24px;
}
.settings-header h1 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
}

/* Settings tabs */
.settings-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.settings-tab {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.settings-tab:hover {
    color: var(--white);
    text-decoration: none;
}
.settings-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Platforms grid */
.platforms-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.platform-tier-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tier-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin: 0 0 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.starred-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: #111;
}
.starred-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Tap zones — invisible overlays on top/bottom halves */
.tap-zone {
    position: absolute;
    left: 0;
    right: 0;
    cursor: pointer;
}
.tap-top { top: 0; height: 50%; }
.tap-bottom { bottom: 0; height: 50%; }
.tap-top:hover { background: rgba(74, 158, 255, 0.12); }
.tap-bottom:hover { background: rgba(239, 68, 68, 0.12); }
/* Tier styles */
.starred-card.tier-s1 { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.starred-card.tier-s3 { opacity: 0.45; }
.tier-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}
.tier-badge-s1 { background: var(--blue); color: var(--white); }
.tier-badge-s2 { background: rgba(255,255,255,0.15); color: var(--text-dim); }
.tier-badge-s3 { background: var(--red); color: var(--white); }
.starred-counts { font-size: 0.85rem; font-weight: 400; color: var(--text-dim); }
.count-s1 { color: var(--blue); }
.count-s2 { color: var(--text-dim); }
.count-s3 { color: var(--red); }
.tier-select {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
}
.starred-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-save { background: var(--green); color: #000; font-weight: 600; }
.btn-save:hover { background: #3ecb70; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
@media (max-width: 640px) {
    .starred-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .starred-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.platform-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.platform-emoji {
    font-size: 1.2rem;
}
.platform-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    flex: 1;
}
.platform-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.platform-status-badge.platform-active {
    background: var(--green-bg);
    color: var(--green);
}
.platform-status-badge.platform-inactive {
    background: var(--border);
    color: var(--text-muted);
}
.platform-card-body {
    padding: 10px 16px;
}
.platform-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.82rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.platform-detail-row:last-child {
    border-bottom: none;
}
.platform-detail-label {
    color: var(--text-dim);
    font-weight: 500;
}

/* Content mix configuration */
.content-config-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.content-no-config {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
}
.content-no-config p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0 0 8px;
}
.content-no-config code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--blue);
}
.content-summary {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.content-table-wrap {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.content-table {
    width: 100%;
    border-collapse: collapse;
}
.content-table thead th {
    text-align: left;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.content-table tbody td {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.content-table tbody tr:last-child td {
    border-bottom: none;
}
.cat-name {
    font-weight: 600;
    color: var(--white);
}
.cat-pct {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    min-width: 50px;
    text-align: right;
}
.cat-pct.over {
    color: var(--red);
}
.cat-pct.under {
    color: var(--gold);
}
.cat-pct.on-target {
    color: var(--green);
}
.cat-bar-cell {
    width: 200px;
}
.cat-bar-stack {
    position: relative;
    height: 20px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.cat-bar-target {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(74, 158, 255, 0.2);
    border-right: 2px solid var(--blue);
    border-radius: 4px 0 0 4px;
}
.cat-bar-actual {
    position: absolute;
    top: 4px;
    left: 0;
    height: 12px;
    background: var(--green);
    border-radius: 3px;
    opacity: 0.7;
}
.content-legend {
    display: flex;
    gap: 20px;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.legend-target {
    background: rgba(74, 158, 255, 0.3);
    border: 1px solid var(--blue);
}
.legend-actual {
    background: var(--green);
    opacity: 0.7;
}

/* Responsive settings */
@media (max-width: 640px) {
    .card-transcript-section {
        flex-direction: column;
        gap: 10px;
    }
    .stitch-detail-grid {
        grid-template-columns: 1fr;
    }
    .cat-bar-cell {
        width: 100px;
    }
    .platform-card-body {
        padding: 8px 12px;
    }
}

/* ========== Round 4 Section 5: Labeler + Preference (a8c3cf07) ========== */

/* --------------------------------------------------------------------------
   16. Labeler Enhancements — Feature Insights, Performance Metrics, Sessions
   -------------------------------------------------------------------------- */

/* Performance metrics below progress bar */
.performance-metrics {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-align: right;
    padding-top: 4px;
    min-height: 18px;
}

/* Feature Insights toggle button */
.feature-insights-toggle {
    padding: 4px 16px 0;
    text-align: right;
}

.btn-insights-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-insights-toggle:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* Feature Insights panel */
.feature-insights-panel {
    margin: 8px 16px 4px;
    padding: 12px;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.insights-header {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.insight-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.insight-bar-label {
    font-size: 0.75rem;
    color: #ccc;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.insight-bar-track {
    flex: 1;
    height: 14px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.insight-bar-fill {
    height: 100%;
    background: var(--red);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.insight-bar-count {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    width: 30px;
    text-align: left;
    flex-shrink: 0;
}

.insights-recommendation {
    font-size: 0.75rem;
    color: var(--gold);
    margin-top: 8px;
    font-weight: 500;
}

/* Sessions page — enhanced resume cards */
.resume-card-enhanced {
    border-width: 2px;
}

.resume-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.resume-card-rate {
    font-size: 0.72rem;
    color: var(--blue);
    font-family: var(--font-mono);
}

.resume-card-time {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.resume-card-stars {
    font-size: 0.72rem;
    color: var(--gold);
}

.resume-card-action-enhanced {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg);
    background: var(--green);
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    margin-top: 4px;
    transition: background 0.15s;
}
.resume-card:hover .resume-card-action-enhanced {
    background: #5aef90;
}

/* ========== Round 4 Section 6: Consulting + Toast + Idea Loop (a9ade27e) ========== */

/* --------------------------------------------------------------------------
   16. Global Toast Notification System
   -------------------------------------------------------------------------- */
.global-toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 480px;
}

.global-toast {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.global-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.global-toast-hide {
    opacity: 0;
    transform: translateY(-12px);
}

.global-toast-success {
    background: var(--green-bg);
    border: 1px solid var(--green);
    color: var(--green);
}

.global-toast-error {
    background: var(--red-bg);
    border: 1px solid var(--red);
    color: var(--red);
}

.global-toast-info {
    background: var(--blue-bg);
    border: 1px solid var(--blue);
    color: var(--blue);
}

/* --------------------------------------------------------------------------
   17. Next Steps Panel (Idea Loop — Session Complete)
   -------------------------------------------------------------------------- */
.next-steps-panel {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.next-steps-icon {
    font-size: 18px;
    color: var(--gold);
    flex-shrink: 0;
    line-height: 1.4;
}

.next-steps-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}

.next-steps-action {
    display: inline-block;
    padding: 14px 24px;
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.next-steps-action:hover {
    background: var(--green);
    color: var(--bg);
    text-decoration: none;
}

.next-steps-action:active {
    transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   18. Idea Loop Dashboard — Enhanced Session Cards
   -------------------------------------------------------------------------- */
.session-card-enhanced {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.session-card-enhanced:hover {
    border-color: var(--blue);
}

.session-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 0;
}

.session-card-top .theme-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.session-rate {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.session-card-stats {
    padding: 4px 14px 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.session-stat-approved {
    color: var(--green);
}

.session-stat-rejected {
    color: var(--red);
}

.session-stat-sep {
    color: var(--text-muted);
    margin: 0 4px;
}

.session-rate-bar {
    height: 3px;
    background: var(--border);
    margin: 0 14px 10px;
    border-radius: 2px;
    overflow: hidden;
}

.session-rate-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.session-batch-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 8px;
    flex-wrap: wrap;
}

.session-batch-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.session-batch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    text-decoration: none;
    transition: background 0.15s;
}

.session-batch-link:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

/* ========== Round 5 Section 1: Review flow + confirm (aa92e9ab) ========== */

/* ==========================================================================
   Round 5 Workflow — Review Flow (Items 1, 2, 3, 5, 10)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Item 1: Post-approval schedule confirmation card
   -------------------------------------------------------------------------- */
.schedule-confirmation {
    margin: 16px 0;
    border-radius: 10px;
    overflow: hidden;
}
.sched-group {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
}
.sched-group-scheduled {
    background: var(--green-dark-bg);
    border: 1px solid rgba(74, 222, 128, 0.2);
}
.sched-group-skipped {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.sched-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.sched-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
}
.sched-row strong {
    text-transform: capitalize;
}
.sched-time {
    color: var(--text-dim);
    font-size: 13px;
    margin-left: auto;
}
.sched-skip-reason {
    color: var(--gold);
    font-size: 12px;
    margin-left: auto;
    font-style: italic;
}
.post-approve-links {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.btn-view-schedule {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--blue-bg);
    color: var(--blue);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-view-schedule:hover {
    background: rgba(74, 158, 255, 0.18);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Item 2: Post-reject card with Next Post / Back to Queue
   -------------------------------------------------------------------------- */
.post-reject-card {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
    margin: 40px auto;
}
.post-reject-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.post-reject-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.post-reject-msg {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.5;
}
.post-reject-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.post-reject-actions .btn-next-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    min-width: 180px;
}
.post-reject-actions .btn-next-post:hover {
    background: var(--blue-hover);
}
.post-reject-actions .btn-next-post:disabled {
    opacity: 0.6;
    cursor: wait;
}
.btn-back-queue {
    color: var(--text-dim);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
}
.btn-back-queue:hover {
    color: var(--text);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Item 3: Bulk reject confirmation modal
   -------------------------------------------------------------------------- */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.confirm-modal {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.confirm-modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.confirm-modal-msg {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 20px;
}
.confirm-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-family: var(--font-sans);
}
.confirm-modal-btn:active {
    transform: scale(0.97);
}
.confirm-modal-confirm {
    background: var(--red);
    color: var(--white);
}
.confirm-modal-confirm:hover {
    background: #dc2626;
}
.confirm-modal-cancel {
    background: var(--border);
    color: var(--text);
}
.confirm-modal-cancel:hover {
    background: #333;
}

/* --------------------------------------------------------------------------
   Item 5: Stuck packaging in gen_status
   -------------------------------------------------------------------------- */
.gen-stuck-packaging .btn-retry-packaging {
    background: var(--gold-bg);
    color: var(--gold);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.15s;
    white-space: nowrap;
}
.gen-stuck-packaging .btn-retry-packaging:hover {
    background: rgba(251, 191, 36, 0.2);
}
.gen-stuck-packaging .btn-retry-packaging:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* --------------------------------------------------------------------------
   Item 10: Bulk re-approve button in queue
   -------------------------------------------------------------------------- */
.bulk-bar-btn-reapprove {
    background: var(--blue) !important;
    color: var(--white);
}
.bulk-bar-btn-reapprove:hover {
    background: var(--blue-hover) !important;
}

/* ========== Round 5 Section 2: Queue sort + filter + archive (a1f4856f) ========== */

/* --------------------------------------------------------------------------
   Round 5 Group B — Queue Power User (Items 4, 6, 7, 8)
   -------------------------------------------------------------------------- */

/* Item 4: Skipped schedule entries in calendar */
.sched-card.skipped {
    opacity: 0.4;
    border-left-style: dashed;
}
.sched-card.skipped .sc-time {
    text-decoration: line-through;
    color: var(--text-muted);
}
.sc-skip-reason {
    font-size: 10px;
    color: var(--red);
    font-style: italic;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Item 6 + 7: Sort and rejection code dropdowns (use shared filter-bar styles) */

/* Item 8: View toggle (Queue / Archive) */
.view-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    width: fit-content;
}
.view-toggle-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.view-toggle-btn:hover {
    color: var(--text);
}
.view-toggle-btn.active {
    background: var(--blue-bg);
    color: var(--blue);
    font-weight: 600;
}

/* Archive status badges */
.archive-status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 4px;
}
.archive-badge-approved {
    background: var(--green-bg);
    color: var(--green);
}
.archive-badge-failed {
    background: var(--red-bg);
    color: var(--red);
}
.archive-badge-regen {
    background: var(--gold-bg);
    color: var(--gold);
}

/* Archive load more */
.archive-load-more {
    text-align: center;
    padding: 16px 0;
}
.archive-load-more-btn {
    background: var(--card-bg);
    color: var(--blue);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.15s;
}
.archive-load-more-btn:hover {
    border-color: var(--blue);
    background: var(--blue-bg);
}

/* ========== Round 5 Section 3: Cross-system navigation (a2720416) ========== */

/* ==========================================================================
   Round 5 — Cross-system navigation (Items 11-14)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Item 12: Clickable schedule cards
   -------------------------------------------------------------------------- */
a.sched-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
a.sched-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-left-width: 3px;
}

/* --------------------------------------------------------------------------
   Item 13: Lifecycle trail in idea loop
   -------------------------------------------------------------------------- */
.lifecycle-toggle {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.lifecycle-toggle:hover {
    color: var(--blue);
    border-color: var(--blue);
}
.lifecycle-toggle.active {
    color: var(--blue);
    border-color: var(--blue);
    background: var(--blue-bg);
}

.lifecycle-trail {
    padding: 0 14px 10px;
}

.lifecycle-steps {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0 4px;
}

.lifecycle-step {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
    min-width: 60px;
    text-align: center;
}

a.lifecycle-step:hover {
    border-color: var(--blue);
    background: var(--blue-bg);
}

.lifecycle-step.lifecycle-done {
    border-color: rgba(74, 222, 128, 0.3);
    background: var(--green-bg);
}

.lifecycle-step.lifecycle-active {
    border-color: rgba(245, 158, 11, 0.3);
    background: var(--gold-bg);
}

.lifecycle-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.lifecycle-detail {
    font-size: 11px;
    color: var(--text);
    font-weight: 500;
}

.lifecycle-arrow {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Item 14: Enhanced score breakdown bars in review
   -------------------------------------------------------------------------- */
.score-composite-hero {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 4px 12px;
}

.score-composite-value {
    font-size: 28px;
    font-weight: 800;
    font-family: var(--font-mono);
    line-height: 1;
}

.score-composite-value.good { color: var(--green); }
.score-composite-value.mid { color: var(--gold); }
.score-composite-value.bad { color: var(--red); }

.score-composite-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.score-bars-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.score-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

.score-bar-track {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.score-bar-value {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    width: 40px;
    flex-shrink: 0;
}

.score-bar-value.good { color: var(--green); }
.score-bar-value.mid { color: var(--gold); }
.score-bar-value.bad { color: var(--red); }

@media (max-width: 480px) {
    .score-bar-label {
        width: 70px;
        font-size: 11px;
    }
    .lifecycle-steps {
        gap: 4px;
    }
    .lifecycle-step {
        padding: 4px 8px;
        min-width: 50px;
    }
}

/* ========== Round 5 Section 4: Error handling + resilience (a385d4c2) ========== */

/* ==========================================================================
   Round 5 — Error Handling & Resilience (Items 9, 15, 16, 17)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Item 9: Generation History Strip (side-by-side comparison)
   -------------------------------------------------------------------------- */
.history-strip {
    margin: 12px 0 16px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.history-strip-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.history-strip-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.history-thumb {
    flex-shrink: 0;
    width: 72px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    background: var(--bg);
}

.history-thumb:hover {
    border-color: var(--blue);
    transform: scale(1.05);
}

.history-thumb-current {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3);
}

.history-thumb img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    display: block;
}

.history-thumb-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 5px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.history-thumb-round {
    font-weight: 700;
    color: var(--blue);
}

.history-thumb-score {
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.history-thumb-status {
    font-size: 10px;
}

/* --------------------------------------------------------------------------
   Item 15: Enhanced Toast with Details
   -------------------------------------------------------------------------- */
.toast-details-wrap {
    margin-top: 6px;
}

.toast-details-toggle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    cursor: pointer;
}

.toast-details-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.toast-details-content {
    margin-top: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 8px;
    border-radius: 4px;
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   Item 16: Stuck Packaging (gen_status page)
   -------------------------------------------------------------------------- */
.btn-retry-packaging {
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.btn-retry-packaging:hover {
    opacity: 0.85;
}

.btn-retry-packaging:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Item 17: Batch Recovery — Per-item Status Pills
   -------------------------------------------------------------------------- */
.batch-item-status {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.batch-item-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.batch-item-ok {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.batch-item-fail {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.batch-item-active {
    background: var(--blue-bg);
    color: var(--blue);
    border: 1px solid rgba(74, 158, 255, 0.2);
    animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(74, 158, 255, 0.2); }
    50% { border-color: rgba(74, 158, 255, 0.6); }
}

.batch-resume-btn {
    font-weight: 700;
}

.batch-resume-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Round 6: System Alerts (Dashboard)
   -------------------------------------------------------------------------- */
.system-alerts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.system-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.15s;
}
.system-alert:hover { opacity: 0.85; text-decoration: none; }
.system-alert-error { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.system-alert-warn { background: var(--gold-bg); color: var(--gold); border: 1px solid rgba(251,191,36,0.2); }
.sa-icon { font-size: 16px; flex-shrink: 0; }
.sa-text { flex: 1; }
.sa-arrow { color: inherit; opacity: 0.5; font-size: 18px; }

/* Retry All button */
.btn-retry-all {
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
}
.btn-retry-all:hover { background: var(--blue-hover); }
.btn-retry-all:disabled { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Round 6: Responsive + Package Source Link
   -------------------------------------------------------------------------- */
.pkg-source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s;
}
.pkg-source-link:hover {
    border-color: var(--blue);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Round 6: Publishing Results + Settings Edit
   -------------------------------------------------------------------------- */
.publish-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.publish-result-card {
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--text-muted);
    background: rgba(255,255,255,0.02);
}
.publish-result-card.pr-success { border-left-color: var(--green); }
.publish-result-card.pr-skipped { border-left-color: var(--gold); }
.publish-result-card.pr-pending { border-left-color: var(--blue); }
.pr-platform { font-weight: 600; font-size: 14px; color: var(--white); margin-bottom: 4px; }
.pr-state { font-size: 12px; color: var(--text-dim); text-transform: capitalize; }
.pr-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.pr-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.pr-post-id { font-size: 11px; color: var(--text-faint); margin-top: 4px; font-family: var(--font-mono); }
.pr-retries { font-size: 11px; color: var(--gold); margin-top: 2px; }

/* Settings edit */
.platform-edit-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: auto;
}
.platform-edit-btn:hover { border-color: var(--blue); color: var(--blue); }
.platform-edit-form { padding: 12px 0 0; border-top: 1px solid var(--border); margin-top: 12px; }
.edit-field { margin-bottom: 10px; }
.edit-field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.edit-field input, .edit-field select {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
}
.edit-actions { display: flex; gap: 8px; }
.btn-save { background: var(--blue); color: var(--white); border: none; padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-cancel { background: transparent; color: var(--text-dim); border: 1px solid var(--border); padding: 6px 16px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-edit-mix { background: transparent; border: 1px solid var(--border); color: var(--text-dim); padding: 6px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-bottom: 12px; }
.btn-edit-mix:hover { border-color: var(--blue); color: var(--blue); }
.content-edit-row { text-align: right; margin-bottom: 8px; }
.target-input { width: 60px; text-align: center; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 13px; }

/* Published indicator on schedule */
.sc-published { font-size: 10px; color: var(--green); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Round 6: Review UX + Analytics + Queue Preview
   -------------------------------------------------------------------------- */
/* Analytics deltas */
.stat-delta { font-size: 11px; font-weight: 600; margin-left: 6px; }
.stat-delta-up { color: var(--green); }
.stat-delta-down { color: var(--red); }
.stat-delta-neutral { color: var(--text-muted); }

/* Queue preview */
.queue-preview {
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
}
.qp-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.qp-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.qp-text { flex: 1; min-width: 0; }
.qp-caption { font-size: 13px; color: var(--text); line-height: 1.4; }
.qp-category { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.qp-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 10px;
    padding: 4px 8px;
    flex-shrink: 0;
}
.qp-toggle:hover { color: var(--blue); }

/* Queue search */
.queue-search {
    width: 100%;
    padding: 10px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.queue-search:focus {
    outline: none;
    border-color: var(--blue);
}
.queue-search::placeholder {
    color: var(--text-faint);
}
