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

:root {
  --primary: #000000;
  --primary-light: #333333;
  --bg: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --card: #FFFFFF;
  --card-border: #E5E7EB;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --yellow: #F59E0B;
  --yellow-dark: #D97706;
  --dark: #111827;
  --darker: #000000;
  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;
}

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; }

.auto-refresh {
  font-size: 12px;
  color: var(--success);
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}
.nav-link:hover { color: var(--primary); background: var(--bg-tertiary); }

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 1px;
  background: var(--card-border);
  padding: 0;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: var(--bg);
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

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

/* Main */
main { padding: 20px 24px; max-width: 1200px; margin: 0 auto; }

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.feed-header h2 { font-size: 18px; color: var(--text); }

.feed-controls { display: flex; gap: 8px; }

.feed-controls select {
  padding: 8px 12px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 13px;
}

.btn-refresh {
  padding: 8px 16px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn-refresh:hover { border-color: var(--primary); }

/* Detection cards */
.detections-feed { display: flex; flex-direction: column; gap: 12px; }

.detection-card {
  display: flex;
  gap: 16px;
  background: var(--card);
  border-radius: 10px;
  padding: 16px;
  border-left: 4px solid var(--danger);
  transition: opacity 0.3s;
}

.detection-card.reviewed { border-left-color: var(--success); opacity: 0.7; }
.detection-card.false-positive { border-left-color: var(--warning); opacity: 0.7; }

.detection-thumb {
  width: 160px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  background: #F3F4F6;
  flex-shrink: 0;
}

.detection-body { flex: 1; min-width: 0; }

.detection-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.detection-time { font-size: 13px; color: var(--text-muted); }

.detection-method {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.method-bedrock { background: #F3E8FF; color: #7C3AED; }
.method-rekognition { background: #EFF6FF; color: #2563EB; }

.detection-violations { margin-bottom: 8px; }

.violation-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #FEF2F2;
  color: var(--danger);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 4px;
}

.detection-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detection-meta span { margin-right: 16px; }

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

.btn-action {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm { background: var(--success); color: white; }
.btn-confirm:hover { background: #26c466; }
.btn-fp { background: var(--warning); color: white; }
.btn-fp:hover { background: #e69500; }

.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

.review-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}
.status-pending { color: var(--warning); }
.status-confirmed { color: var(--success); }
.status-false-positive { color: var(--text-muted); }

.loading, .empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.lightbox.visible { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 36px;
  color: var(--text-muted);
  cursor: pointer;
}
.lightbox-close:hover { color: var(--text); }

.detection-thumb { cursor: pointer; }
.detection-thumb:hover { opacity: 0.8; }

.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; }

/* Model breakdown table */
.model-breakdown { margin-bottom: 20px; }
.model-breakdown h3 { color: var(--yellow); font-size: 15px; margin-bottom: 10px; }
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.breakdown-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid rgba(255,255,255,0.1); color: var(--text-muted); font-weight: 600; }
.breakdown-table td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.breakdown-table tr:hover { background: rgba(255,255,255,0.03); }
.cell-confirmed { color: var(--success); font-weight: 600; }
.cell-fp { color: var(--danger); font-weight: 600; }
