* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #000000; --primary-light: #333; --bg: #FFFFFF;
  --bg-secondary: #F9FAFB; --bg-tertiary: #F3F4F6; --card: #FFFFFF;
  --card-border: #E5E7EB; --text: #111827; --text-muted: #6B7280; --danger: #EF4444; --success: #10B981; --yellow: #F59E0B; --dark: #111827;
}
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-secondary); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--card-border); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.logo { font-size: 20px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.rep-badge { background: var(--card); padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 13px; }
.nav-link:hover { color: var(--primary); }

main { display: grid; grid-template-columns: 280px 1fr 320px; gap: 16px; padding: 16px; height: calc(100vh - 56px); }

/* Queue panel */
.queue-panel { background: var(--card); border-radius: 12px; padding: 14px; overflow-y: auto; }
.queue-header h3 { font-size: 14px; color: var(--primary); margin-bottom: 8px; }
.queue-filters { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.filter-pill { padding: 4px 10px; border: 1px solid var(--card-border); border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 11px; cursor: pointer; }
.filter-pill:hover { border-color: var(--primary); }
.filter-pill.active { border-color: var(--primary); background: rgba(255,215,0,0.12); color: var(--primary); font-weight: 600; }
.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-card { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.queue-card:hover { border-color: rgba(255,215,0,0.3); }
.queue-card.selected { border-color: var(--primary); }
.queue-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.queue-card-header h4 { font-size: 13px; }
.queue-card p { font-size: 11px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.open { background: var(--yellow); }
.status-dot.under_review { background: cornflowerblue; }
.status-dot.approved { background: var(--success); }
.status-dot.rejected { background: var(--danger); }
.status-dot.auto_refunded { background: var(--danger); }
.loading { color: var(--text-muted); font-style: italic; font-size: 13px; }
.empty-msg { color: var(--text-muted); font-size: 13px; }

/* Replay panel */
.replay-panel { background: var(--card); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.replay-panel h3 { font-size: 14px; color: var(--primary); margin-bottom: 10px; }
.replay-placeholder, .evidence-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 14px; }
.hidden { display: none !important; }
.video-container { flex: 1; background: #000; border-radius: 8px; overflow: hidden; min-height: 300px; }
.video-container video { width: 100%; height: 100%; object-fit: contain; }
.replay-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.replay-offset { font-size: 12px; color: var(--text-muted); }
.btn { padding: 8px 16px; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; background: rgba(255,255,255,0.08); color: var(--text); }
.btn-sm:hover { background: rgba(255,255,255,0.15); }

/* Evidence panel */
.evidence-panel { background: var(--card); border-radius: 12px; padding: 14px; overflow-y: auto; }
.evidence-panel h3 { font-size: 14px; color: var(--primary); margin-bottom: 10px; }
.dispute-details { font-size: 13px; margin-bottom: 12px; padding: 10px; background: rgba(0,0,0,0.2); border-radius: 8px; }
.dispute-details p { margin-bottom: 4px; }
.dispute-details .label { color: var(--text-muted); font-size: 11px; }
.evidence-gallery { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.evidence-item { border-radius: 8px; overflow: hidden; border: 1px solid var(--card-border); }
.evidence-item img { width: 100%; display: block; cursor: pointer; }
.evidence-item video { width: 100%; display: block; }
.rep-actions label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.rep-actions textarea { width: 100%; padding: 8px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--bg-secondary); color: var(--text); font-size: 13px; resize: vertical; margin-bottom: 10px; }
.action-buttons { display: flex; flex-direction: column; gap: 6px; }
.btn-approve { background: var(--success); color: var(--dark); width: 100%; text-align: center; }
.btn-reject { background: var(--danger); color: white; width: 100%; text-align: center; }
.btn-review { background: rgba(100,149,237,0.3); color: cornflowerblue; width: 100%; text-align: center; }
.btn-approve:hover { filter: brightness(1.1); }
.btn-reject:hover { filter: brightness(1.1); }
.btn-review:hover { filter: brightness(1.2); }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--primary); border: none; color: white; padding: 12px 24px; border-radius: 8px; font-size: 14px; z-index: 1100; transition: transform 0.3s ease; }
.toast.visible { transform: translateX(-50%) translateY(0); }

/* Media popup modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal-overlay.visible { display: flex; }
.media-modal { position: relative; max-width: 90vw; max-height: 90vh; }
.media-close { position: absolute; top: -30px; right: 0; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.media-full { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.ev-zoom { text-align: center; font-size: 10px; color: var(--text-muted); padding: 2px 0; cursor: pointer; }

/* Resolution banner */
.resolution-banner { position: fixed; top: 0; left: 0; right: 0; text-align: center; font-size: 18px; font-weight: 700; padding: 16px; z-index: 1200; transform: translateY(-100%); transition: transform 0.3s ease; }
.resolution-banner.visible { transform: translateY(0); }
.resolution-banner.approved { background: var(--success); color: var(--dark); }
.resolution-banner.rejected { background: var(--danger); color: white; }
.resolution-banner.under_review { background: cornflowerblue; color: white; }

/* Status text in details */
.status-text { font-weight: 700; text-transform: uppercase; }
.status-text.open { color: var(--primary); }
.status-text.under_review { color: cornflowerblue; }
.status-text.approved { color: var(--success); }
.status-text.rejected { color: var(--danger); }

.evidence-item { cursor: pointer; position: relative; }
.evidence-item video { pointer-events: none; }

.header-nav { display: flex; gap: 8px; align-items: center; }
.header-nav a { color: #6B7280; text-decoration: none; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 8px; transition: all 0.15s; }
.header-nav a:hover { color: #111827; background: #F3F4F6; }
.header-nav a.active { color: #111827; font-weight: 700; background: #F3F4F6; }
