/* ========================================================================
   Plex Recommendations — Dark Theme
   ======================================================================== */

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1e293b;
  --bg-card-hover: #253449;
  --bg-input: #0f172a;
  --accent: #e5a00d;
  --accent-hover: #f5b82e;
  --accent-dim: rgba(229, 160, 13, 0.15);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --transition: 0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Header / Nav ──────────────────────────────────────────────────────── */

.app-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.header-brand svg {
  width: 28px;
  height: 28px;
}

/* Burger button — hidden on desktop */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.burger-btn:hover span {
  background: var(--text-primary);
}

/* Sidebar — hidden on desktop */
.sidebar-overlay {
  display: none;
}

.sidebar {
  display: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.5rem;
}

.header-nav a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.header-nav a:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.header-nav a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.header-username {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

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

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 160, 13, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

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

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}

/* ── Toggle Button Group ───────────────────────────────────────────────── */

.btn-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.btn-group .btn-toggle {
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-right: 1px solid var(--border);
}

.btn-group .btn-toggle:last-child {
  border-right: none;
}

.btn-group .btn-toggle.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-group .btn-toggle:hover:not(.active) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ── Forms / Inputs ────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Stat Cards ────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card-value.accent {
  color: var(--accent);
}

.stat-card-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ── Genre Bar Chart ───────────────────────────────────────────────────── */

.genre-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.genre-chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.genre-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.genre-bar-row:hover {
  background: var(--accent-dim);
}

.genre-bar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  width: 110px;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-bar-track {
  flex: 1;
  height: 22px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.genre-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  min-width: 2px;
}

.genre-bar-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 40px;
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Genre Pills ───────────────────────────────────────────────────────── */

.genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.genre-pill:hover {
  background: var(--accent);
  color: #000;
}

.genre-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent-hover);
}

.genre-pill.excluded {
  background: var(--danger);
  color: #fff;
  border-color: #c0392b;
  text-decoration: line-through;
}

.genre-pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.genre-pill-selector .genre-pill {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-search {
  flex: 1;
  min-width: 200px;
}

.table-search input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.65rem center;
}

.table-search input:focus {
  outline: none;
  border-color: var(--accent);
}

.table-search input::placeholder {
  color: var(--text-muted);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-secondary);
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

th.sortable {
  cursor: pointer;
  transition: color var(--transition);
}

th.sortable:hover {
  color: var(--accent);
}

th.sorted {
  color: var(--accent);
}

th .sort-icon {
  display: inline-block;
  margin-left: 0.3rem;
  opacity: 0.4;
  font-size: 0.7rem;
}

th.sorted .sort-icon {
  opacity: 1;
}

td {
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

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

td.title-cell {
  color: var(--text-primary);
  font-weight: 500;
}

.table-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.table-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.table-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.pagination-buttons {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 1;
  flex-wrap: nowrap;
  overflow: hidden;
}

.pagination-size {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
  cursor: pointer;
}


.pagination-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 1.75rem;
  text-align: center;
  flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.pagination-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  user-select: none;
}

/* ── Badges ────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-warning {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-muted {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

.badge-rating {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.badge-source {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-source.tmdb {
  background: rgba(1, 180, 228, 0.15);
  color: #01b4e4;
}

.badge-source.ai {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

/* ── Recommendation Cards ──────────────────────────────────────────────── */

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.rec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.rec-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.rec-card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg-input);
}

.rec-card-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.rec-card-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.rec-card:hover .rec-card-dismiss {
  opacity: 1;
}

.rec-card-dismiss:hover {
  background: var(--danger);
  color: #fff;
}

.rec-card-body {
  padding: 0.85rem;
}

.rec-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.rec-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.rec-card-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rec-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.rec-card-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.rec-card-genres .genre-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
}

.rec-card-reason {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Controls Panel (Recommendations) ──────────────────────────────────── */

.controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.controls-row .form-group {
  margin-bottom: 0;
}

.controls-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.year-range-row .form-select {
  width: auto;
}

/* ── Filter Tabs ───────────────────────────────────────────────────────── */

.filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

/* ── Settings ──────────────────────────────────────────────────────────── */

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.settings-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.settings-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.settings-info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-info-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  word-break: break-all;
}

.settings-danger-zone {
  border-color: rgba(239, 68, 68, 0.3);
}

.settings-danger-zone .settings-section-title {
  color: var(--danger);
  border-bottom-color: rgba(239, 68, 68, 0.2);
}

/* ── Login Page ────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo svg {
  width: 64px;
  height: 64px;
  margin: 0 auto;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.login-btn {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gate-form .input {
  text-align: center;
  font-size: 1rem;
  padding: 0.75rem 1rem;
}

.login-status {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.login-status.error {
  color: var(--danger);
}

/* Server selection */

.server-list {
  list-style: none;
  margin-top: 1rem;
}

.server-item {
  padding: 0.85rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.server-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.server-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.server-item-arrow {
  color: var(--text-muted);
}

/* ── Loading Spinner ───────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.loading-state-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* ── Toast Notifications ───────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 280px;
  max-width: 420px;
  animation: toast-in 0.3s ease forwards;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.toast.removing {
  animation: toast-out 0.25s ease forwards;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-info {
  border-left: 3px solid var(--accent);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  line-height: 1.3;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 1rem;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* ── Empty States ──────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ── Confirmation Dialog ───────────────────────────────────────────────── */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease;
}

.dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.dialog-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.dialog-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Detail Modal ─────────────────────────────────────────────────────── */

.detail-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-modal-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.4);
  transform: scale(1.1);
}

.detail-modal-poster {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 1.5rem 0 -2rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.detail-modal-poster-placeholder {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin: 1.5rem 0 -2rem 1.5rem;
  flex-shrink: 0;
}

.detail-modal-header-info {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  flex: 1;
  min-width: 0;
}

.detail-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.detail-modal-year {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-left: 0.5rem;
}

.detail-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.detail-modal-close:hover { background: rgba(0,0,0,0.8); }

.detail-modal-body {
  padding: 2.5rem 1.5rem 1.5rem;
}

.detail-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.detail-modal-overview {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.detail-modal-reason {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.detail-modal-reason-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.detail-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.detail-modal-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

/* ── View Tabs ─────────────────────────────────────────────────────────── */

.view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.view-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.view-tab:hover {
  color: var(--text-primary);
}

.view-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Batch Cards (History) ─────────────────────────────────────────────── */

.batch-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.batch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

.batch-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.batch-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.batch-card-date {
  font-weight: 600;
  font-size: 0.95rem;
}

.batch-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.batch-card-ai-badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.batch-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.batch-detail-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.batch-detail-date {
  font-weight: 600;
}

.batch-detail-actions {
  margin-left: auto;
}

/* ── Chat Modal ────────────────────────────────────────────────────────── */

.chat-modal {
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

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

.chat-modal-header .detail-modal-close {
  position: static;
  background: var(--bg-secondary);
  color: var(--text-muted);
}

.chat-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.chat-model-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.chat-message-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.chat-message-content {
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}

.chat-system {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid #8b5cf6;
}
.chat-system .chat-message-role { color: #8b5cf6; }

.chat-user {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
}
.chat-user .chat-message-role { color: #3b82f6; }

.chat-assistant {
  background: rgba(229, 160, 13, 0.1);
  border-left: 3px solid var(--accent);
}
.chat-assistant .chat-message-role { color: var(--accent); }

/* ── Misc Utilities ────────────────────────────────────────────────────── */

.text-accent {
  color: var(--accent);
}

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

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-sm { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

/* Touch device: always show dismiss button, disable hover transforms */
@media (hover: none), (pointer: coarse) {
  .rec-card-dismiss {
    opacity: 1;
  }

  .rec-card:hover {
    transform: none;
    box-shadow: none;
  }

  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn-primary:hover:not(:disabled) {
    transform: none;
  }
}

/* ── Burger / Sidebar — kicks in at 1024px ─────────────────────────────── */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .header-username {
    display: none;
  }

  .header-right {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

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

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .sidebar-username {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
  }

  .sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all var(--transition);
  }

  .sidebar-close:hover {
    color: var(--text-primary);
    background: var(--accent-dim);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    flex: 1;
  }

  .sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition);
    min-height: 48px;
  }

  .sidebar-nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-dim);
  }

  .sidebar-nav-link.active {
    color: var(--accent);
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
  }

  .sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }

  .sidebar-logout {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0 0.75rem;
    height: 56px;
  }

  .header-brand {
    font-size: 1.1rem;
    gap: 0.35rem;
  }

  .header-brand svg {
    width: 24px;
    height: 24px;
  }

  .page-container {
    padding: 0.75rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .stat-card {
    padding: 0.85rem;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  /* Rec grid */
  .rec-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .rec-card-dismiss {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .rec-card-body {
    padding: 0.65rem;
  }

  .rec-card-title {
    font-size: 0.85rem;
  }

  /* Controls */
  .controls-panel {
    padding: 1rem;
  }

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .controls-actions {
    margin-top: 0.75rem;
  }

  .controls-actions .btn {
    width: 100%;
  }

  /* Buttons - touch targets */
  .btn {
    min-height: 44px;
    padding: 0.65rem 1.25rem;
  }

  .btn-sm {
    min-height: 40px;
    padding: 0.45rem 0.85rem;
  }

  .btn-icon {
    min-width: 44px;
    min-height: 44px;
    padding: 0.6rem;
  }

  .btn-group .btn-toggle {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
  }

  /* Genre pills - touch targets */
  .genre-pill {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .genre-pill-selector .genre-pill {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    min-height: 36px;
  }

  /* Filter tabs - touch targets */
  .filter-tab {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    display: inline-flex;
    align-items: center;
  }

  .view-tab {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  /* Tables */
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .table-search {
    min-width: 0;
  }

  .table-search input {
    min-height: 44px;
  }

  .table-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .pagination-info {
    justify-content: center;
  }

  .pagination-buttons {
    justify-content: center;
  }

  .pagination-btn {
    min-width: 32px;
    min-height: 36px;
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
  }

  /* Form inputs - touch targets */
  .form-input,
  .form-select {
    min-height: 44px;
    padding: 0.65rem 0.85rem;
  }

  .form-select {
    padding-right: 2rem;
  }

  /* Genre chart */
  .genre-bar-label {
    width: 80px;
    font-size: 0.7rem;
  }

  .genre-bar-row {
    min-height: 36px;
    padding: 0.35rem 0;
  }

  /* Settings */
  .settings-info-grid {
    grid-template-columns: 1fr;
  }

  .settings-section {
    padding: 1rem;
  }

  /* Login */
  .login-card {
    padding: 2rem 1.5rem;
  }

  /* Dialogs */
  .dialog {
    padding: 1.5rem;
    width: 95%;
  }

  .form-row {
    flex-direction: column;
  }

  /* Modals */
  .detail-modal {
    width: 98%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .detail-modal-poster {
    width: 80px;
    height: 120px;
    margin: 1rem 0 -1.5rem 1rem;
  }

  .detail-modal-poster-placeholder {
    width: 80px;
    height: 120px;
    margin: 1rem 0 -1.5rem 1rem;
    font-size: 1.8rem;
  }

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

  .detail-modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .detail-modal-body {
    padding: 2rem 1rem 1rem;
  }

  .chat-modal {
    width: 98%;
    max-height: 92vh;
  }

  .chat-modal-header {
    padding: 1rem;
  }

  .chat-modal-body {
    padding: 1rem;
  }

  .chat-message-content {
    font-size: 0.8rem;
    max-height: 250px;
  }

  /* Batch detail */
  .batch-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .batch-detail-actions {
    margin-left: 0;
    width: 100%;
  }

  .batch-detail-actions .btn {
    width: 100%;
  }

  .batch-card {
    padding: 0.85rem 1rem;
  }

  /* Toasts - bottom full width */
  #toast-container {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  /* Year range selects */
  .year-range-row {
    flex-wrap: wrap;
  }

  .year-range-row .form-select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .page-container {
    padding: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-card-value {
    font-size: 1.25rem;
  }

  .stat-card-label {
    font-size: 0.7rem;
  }

  .rec-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .rec-card-body {
    padding: 0.5rem;
  }

  .rec-card-title {
    font-size: 0.8rem;
  }

  .rec-card-reason {
    font-size: 0.7rem;
    -webkit-line-clamp: 2;
  }

  .rec-card-genres .genre-pill {
    font-size: 0.6rem;
    padding: 0.1rem 0.35rem;
    min-height: auto;
  }

  .header-brand span {
    display: none;
  }

  .header-nav a {
    padding: 0.5rem 0.45rem;
    font-size: 0.75rem;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .controls-panel {
    padding: 0.75rem;
  }

  .genre-bar-label {
    width: 65px;
    font-size: 0.65rem;
  }

  /* Login */
  .login-card {
    padding: 1.5rem 1rem;
  }

  .login-title {
    font-size: 1.25rem;
  }

  /* Batch info wraps nicely */
  .batch-card-meta {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .batch-detail-info {
    flex-direction: column;
    gap: 0.35rem;
  }

  /* Filter tabs scroll horizontally */
  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.15rem;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex-shrink: 0;
  }
}
