:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #101522;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(24, 32, 50, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand Accents */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.3);
  
  /* Status Colors */
  --color-safe: #10b981;
  --color-safe-bg: rgba(16, 185, 129, 0.12);
  --color-safe-border: rgba(16, 185, 129, 0.3);

  --color-sensitive: #f59e0b;
  --color-sensitive-bg: rgba(245, 158, 11, 0.12);
  --color-sensitive-border: rgba(245, 158, 11, 0.3);

  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.12);
  --color-danger-border: rgba(239, 68, 68, 0.3);

  --color-review: #8b5cf6;
  --color-review-bg: rgba(139, 92, 246, 0.12);
  --color-review-border: rgba(139, 92, 246, 0.3);

  /* Specific Category Bar Colors */
  --bar-porn: #f43f5e;
  --bar-hentai: #d946ef;
  --bar-sexy: #f59e0b;
  --bar-drawings: #06b6d4;
  --bar-neutral: #10b981;
  --bar-gore: #b91c1c;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Ambient glow orbs in the background */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-1 {
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
}
.glow-2 {
  top: 35%;
  right: -100px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(10, 13, 20, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-title span {
  background: linear-gradient(135deg, #818cf8, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Telemetry Status Pill */
.system-status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-safe);
  box-shadow: 0 0 8px var(--color-safe);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Content Layout */
.main-content {
  max-width: 1400px;
  margin: 1.8rem auto;
  padding: 0 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}
@media (max-width: 1024px) {
  .grid-two-col {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.3rem;
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}
.badge-subtle {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* User Meta in Form */
.user-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-glow);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-name {
  font-size: 0.92rem;
  font-weight: 700;
}
.user-handle {
  font-weight: 400;
  color: var(--text-dim);
}
.post-privacy {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Caption Input */
.caption-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  margin-bottom: 1.1rem;
  transition: var(--transition);
}
.caption-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 1.8rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.1rem;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}
.file-input-hidden {
  display: none;
}
.upload-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-text {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.dropzone-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Preview Inside Dropzone */
.preview-wrapper {
  position: relative;
  max-height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.image-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}
.btn-remove-preview {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-remove-preview:hover {
  background: var(--color-danger);
}

/* Preset Buttons */
.presets-section {
  margin-bottom: 1.3rem;
}
.presets-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}
.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.btn-preset {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.btn-preset:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Submit Button */
.btn-primary {
  width: 100%;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Feed Stream Container */
.feed-filter-tags {
  display: flex;
  gap: 0.4rem;
}
.tag-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}
.tag-pill.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.feed-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 400px;
  max-height: 680px;
  overflow-y: auto;
  padding-right: 0.4rem;
}
.feed-container::-webkit-scrollbar {
  width: 6px;
}
.feed-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

.empty-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
}
.empty-icon {
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty-feed h3 {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.empty-feed p {
  font-size: 0.82rem;
  max-width: 320px;
}

/* Social Media Post Card in Feed */
.social-post-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  position: relative;
  transition: var(--transition);
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.post-caption {
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

/* Post Media Wrapper & Sensitive Blur Overlay */
.post-media-box {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 420px;
  background: #000;
}
.post-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
}
.post-img.blurred {
  filter: blur(32px) brightness(0.65);
}

.blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(10, 13, 20, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  transition: opacity 0.3s ease;
}
.blur-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.blur-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--color-sensitive-bg);
  border: 1px solid var(--color-sensitive-border);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 700;
}
.blur-prompt {
  font-size: 0.82rem;
  color: #cbd5e1;
  max-width: 280px;
}
.btn-reveal-blur {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.btn-reveal-blur:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Post Footer & Telemetry Tag */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.post-stats {
  display: flex;
  gap: 1.2rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.stat-item:hover {
  color: var(--text-main);
}
.ai-audit-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
}
.ai-audit-pill.allow {
  background: var(--color-safe-bg);
  color: #34d399;
  border: 1px solid var(--color-safe-border);
}
.ai-audit-pill.sensitive {
  background: var(--color-sensitive-bg);
  color: #fbbf24;
  border: 1px solid var(--color-sensitive-border);
}
.ai-audit-pill.review {
  background: var(--color-review-bg);
  color: #c084fc;
  border: 1px solid var(--color-review-border);
}

/* TAB 2: INSPECTOR LAB STYLING */
.inspector-dropzone {
  min-height: 280px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 1.2rem;
  transition: var(--transition);
}
.inspector-dropzone:hover {
  border-color: var(--primary);
}
.inspector-prompt {
  text-align: center;
  color: var(--text-dim);
}
.inspector-prompt p {
  margin: 0.75rem 0 1rem;
  font-size: 0.9rem;
}
.inspector-preview-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.meta-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}
.meta-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.meta-val {
  font-size: 0.88rem;
  font-weight: 700;
  margin-top: 0.2rem;
  display: block;
}
.meta-val.highlight {
  color: #38bdf8;
}
.meta-val.code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #a78bfa;
}

/* Verdict Banner */
.verdict-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}
.verdict-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  flex-shrink: 0;
}
.verdict-title {
  font-size: 1.05rem;
  font-weight: 800;
}
.verdict-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* Dynamic Verdict Styles */
.verdict-banner.allow {
  background: var(--color-safe-bg);
  border-color: var(--color-safe-border);
}
.verdict-banner.allow .verdict-icon {
  background: var(--color-safe);
  color: #fff;
}
.verdict-banner.allow .verdict-title {
  color: #34d399;
}

.verdict-banner.sensitive {
  background: var(--color-sensitive-bg);
  border-color: var(--color-sensitive-border);
}
.verdict-banner.sensitive .verdict-icon {
  background: var(--color-sensitive);
  color: #fff;
}
.verdict-banner.sensitive .verdict-title {
  color: #fbbf24;
}

.verdict-banner.block {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
}
.verdict-banner.block .verdict-icon {
  background: var(--color-danger);
  color: #fff;
}
.verdict-banner.block .verdict-title {
  color: #f87171;
}

.verdict-banner.review {
  background: var(--color-review-bg);
  border-color: var(--color-review-border);
}
.verdict-banner.review .verdict-icon {
  background: var(--color-review);
  color: #fff;
}
.verdict-banner.review .verdict-title {
  color: #c084fc;
}

/* 5-Class Probability Bars */
.prob-section {
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 1rem;
}

.prob-row {
  margin-bottom: 0.85rem;
}
.prob-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.prob-name {
  color: var(--text-main);
}
.prob-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

.prob-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.prob-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-porn { background: var(--bar-porn); }
.bar-hentai { background: var(--bar-hentai); }
.bar-sexy { background: var(--bar-sexy); }
.bar-drawings { background: var(--bar-drawings); }
.bar-neutral { background: var(--bar-neutral); }
.bar-gore { background: var(--bar-gore); }

/* JSON Viewer */
.json-viewer-section {
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}
.json-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.btn-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.json-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #38bdf8;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* TAB 3: BATCH SCANNER STYLING */
.batch-summary-bar {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.summary-chip {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}
.chip-total { background: rgba(255, 255, 255, 0.08); color: #fff; }
.chip-safe { background: var(--color-safe-bg); color: #34d399; }
.chip-blur { background: var(--color-sensitive-bg); color: #fbbf24; }
.chip-block { background: var(--color-danger-bg); color: #f87171; }

.batch-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
  min-height: 250px;
}
.batch-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 3rem 1rem;
  text-align: center;
}
.batch-empty h3 {
  font-size: 1.05rem;
  margin: 0.8rem 0 0.3rem;
  color: var(--text-muted);
}

.batch-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}
.batch-thumb-wrap {
  width: 100%;
  height: 150px;
  position: relative;
  background: #000;
}
.batch-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.batch-thumb.blurred {
  filter: blur(16px);
}
.batch-item-info {
  padding: 0.75rem;
}
.batch-filename {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.4rem;
}
.batch-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* TAB 4: SETTINGS FORM */
.max-w-content {
  max-width: 800px;
  margin: 0 auto;
}
.thresholds-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.threshold-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}
@media (max-width: 768px) {
  .threshold-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
.th-label-group label {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
}
.th-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  max-width: 440px;
}
.th-slider-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
}
.th-slider-group input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}
.th-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  color: #38bdf8;
  min-width: 42px;
  text-align: right;
}

/* Buttons */
.btn-secondary {
  padding: 0.6rem 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  padding: 0.6rem 1.1rem;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  color: #a5b4fc;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover {
  background: rgba(99, 102, 241, 0.15);
}

/* Violation Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.25s ease;
}
.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-card {
  width: 100%;
  max-width: 460px;
  background: #141927;
  border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(239, 68, 68, 0.2);
  overflow: hidden;
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.modal-danger {
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid var(--color-danger-border);
}
.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.modal-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-body {
  padding: 1.4rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.violation-details {
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-danger);
  font-size: 0.8rem;
}
.violation-details strong {
  display: block;
  margin-bottom: 0.2rem;
  color: #fff;
}

.modal-footer {
  padding: 1rem 1.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: #1e2638;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}
.toast.success { border-color: var(--color-safe); }
.toast.error { border-color: var(--color-danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.hidden {
  display: none !important;
}
