:root {
  --bg-base: #09090d;
  --bg-surface: #121218;
  --bg-card: rgba(24, 24, 32, 0.7);
  --bg-card-hover: rgba(32, 32, 44, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.5);
  --text-main: #f4f4f7;
  --text-muted: #9494a3;
  --text-dim: #606070;
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.25);
  --primary-hover: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Glass Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 12, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--primary);
}

.nav-tabs {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

/* Layout */
.main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.75rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overview Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.stat-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

/* Action Bars */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-box {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 440px;
}

.search-box input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

select, input[type="text"], input[type="number"], textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.15s;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* Data Table */
.table-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

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

thead {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.725rem;
  letter-spacing: 0.05em;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.anime-cell {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.anime-cover {
  width: 42px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #202028;
  flex-shrink: 0;
}

.anime-info-title {
  font-weight: 600;
  color: #fff;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anime-info-sub {
  font-size: 0.725rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-releasing {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-finished {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.badge-other {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal,
.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: #181824;
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.25s ease-out;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.error {
  border-color: rgba(244, 63, 94, 0.4);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Auth Login Screen */
.hidden {
  display: none !important;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.12), transparent 50%), var(--bg-base);
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fca5a5;
  font-size: 0.8rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  text-align: left;
}

/* Importer Styles */
.importer-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.importer-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  gap: 1.25rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.importer-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-sm);
}

.importer-thumb {
  width: 90px;
  height: 125px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.importer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.importer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.importer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.importer-subtitles {
  font-size: 0.785rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.importer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.id-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.id-badge.al {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.id-badge.mal {
  background: rgba(46, 81, 162, 0.2);
  border-color: rgba(46, 81, 162, 0.4);
  color: #bfdbfe;
}

.id-badge.tvdb {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.id-badge.tmdb {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

.sama-match-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.8rem;
}

.sama-match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sama-seasons-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.25);
  flex-wrap: wrap;
}

.sama-season-select {
  flex: 1;
  min-width: 220px;
  max-width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  font-size: 0.775rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.sama-season-select:focus {
  border-color: #34d399;
}

.sama-match-title {
  color: #a7f3d0;
  font-weight: 600;
}

.sama-match-slug {
  font-size: 0.725rem;
  color: #6ee7b7;
  font-family: monospace;
}

.importer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .importer-card {
    flex-direction: column;
  }
  .importer-thumb {
    width: 100%;
    height: 160px;
  }
}

/* Mapping Store Filter Chips */
.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chip.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
  font-weight: 700;
}

/* Mapping Table Elements */
.map-thumb {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-slug {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-dim);
}

.badge-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-mapped {
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-imported {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Toolbar Control Groups */
.toolbar-group-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.5rem;
}

.toolbar-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0 0.25rem;
  user-select: none;
}

/* Floating Bulk Action Bar */
.floating-bulk-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(99, 102, 241, 0.45);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(99, 102, 241, 0.25);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 100;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
}

.floating-bulk-bar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.floating-bulk-badge {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.table-row-selected {
  background: rgba(99, 102, 241, 0.08) !important;
}

.map-chk {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
}

/* Scraper Anime & Seasons Editor Modal */
.season-edit-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
  position: relative;
}

.season-edit-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.season-edit-card.is-scan-card {
  border-color: rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.03);
}

.season-edit-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.season-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  align-items: end;
}

.season-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.season-edit-field label {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.season-edit-field input,
.season-edit-field select {
  height: 30px;
  font-size: 0.775rem;
  padding: 0 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  width: 100%;
}

.season-edit-field input:focus,
.season-edit-field select:focus {
  border-color: var(--primary);
  outline: none;
}

/* ==========================================================================
   Catalog Bulk Selection & Actions Bar
   ========================================================================== */
.catalog-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
  animation: fadeIn 0.2s ease-out;
}

.catalog-bulk-bar.hidden {
  display: none !important;
}

.bulk-bar-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.bulk-count-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.bulk-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-row-selected {
  background: rgba(139, 92, 246, 0.12) !important;
}

.catalog-check {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

/* ==========================================================================
   Comprehensive Anime Edit Studio Modal
   ========================================================================== */
.modal-anime-edit {
  max-width: 980px !important;
  width: 95vw !important;
  max-height: 92vh !important;
  display: flex;
  flex-direction: column;
}

.modal-anime-edit .modal-body {
  overflow-y: auto;
  max-height: calc(92vh - 145px);
  padding: 1.25rem 1.5rem;
}

.anime-modal-header-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.anime-edit-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  overflow-x: auto;
  white-space: nowrap;
}

.anime-edit-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.95rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.anime-edit-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.anime-edit-tab.active {
  color: #fff;
  border-bottom-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.anime-tab-pane {
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.anime-tab-pane.active {
  display: block;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr;
  }
}

.artwork-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.artwork-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.artwork-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.artwork-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.artwork-thumb-container {
  width: 100%;
  height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.artwork-thumb-container.tall {
  height: 160px;
}

.artwork-thumb-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.artwork-thumb-empty {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.taxonomy-pill-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.65rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.tax-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.tax-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tax-pill.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.external-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.external-link-btn:hover {
  color: var(--primary);
}

.field-help-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ==========================================================================
   En cours (Airing Worklist) Enhancements
   ========================================================================== */
.air-filter-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.air-filter-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.5) !important;
}

.air-filter-card.active {
  border-color: #6366f1 !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.08) !important;
}

.air-tab-pill {
  transition: all 0.15s ease;
  user-select: none;
}

.air-tab-pill:hover {
  transform: translateY(-1px);
}

.air-tab-pill.active {
  background: #6366f1 !important;
  color: #fff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}


