/* ─── Reset & Root ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:   #0b0b18;
  --bg-secondary: #10101e;
  --bg-surface:   #17172a;
  --bg-elevated:  #1c1c32;
  --bg-card:      #131324;
  --accent:       #e94560;
  --accent-hover: #ff5a77;
  --accent-dim:   rgba(233,69,96,0.12);
  --accent-glow:  rgba(233,69,96,0.25);
  --text-primary: #eaeaf4;
  --text-secondary:#9292ae;
  --text-muted:   #58586e;
  --border:       #252540;
  --border-light: #353558;
  --green:  #2ecc71;
  --yellow: #f39c12;
  --red:    #e74c3c;
  --blue:   #3498db;
  --gray:   #7f8c8d;
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #c0364f 100%);
  --gradient-page:   linear-gradient(135deg, #0b0b18 0%, #0e0e1f 50%, #0b0b16 100%);
  --gradient-sidebar:linear-gradient(180deg, #10101e 0%, #0d0d1a 100%);
}

html, body, #app {
  height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary); color: var(--text-primary);
  -webkit-font-smoothing: antialiased; font-size: 14px;
}

.page-content { background: var(--gradient-page); }

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Layout ────────────────────────────────────────────────────── */
#app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.sidebar {
  width: 220px; min-width: 220px; background: var(--gradient-sidebar);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.app-icon {
  width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.sidebar-logo span { font-weight: 700; font-size: 16px; letter-spacing: -0.5px; }

.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.sidebar-bottom { padding: 8px; border-top: 1px solid var(--border); }

.nav-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 10px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s; text-decoration: none;
  font-size: 13px; font-weight: 500; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim); color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.hamburger { display: none; }
.sidebar-backdrop { display: none; }

.page-header {
  height: 52px; background: rgba(16,16,30,0.85); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px; flex-shrink: 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.page-title { font-size: 14px; font-weight: 600; flex: 1; }

.page-content { flex: 1; overflow-y: auto; }

/* ─── Tabs ──────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; }
.tab {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; border: none;
  background: none; color: var(--text-secondary); transition: all 0.15s;
}
.tab:hover { background: var(--bg-elevated); color: var(--text-primary); }
.tab.active { background: var(--gradient-accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }
.tab svg { width: 13px; height: 13px; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.15s; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gradient-accent); color: #fff; box-shadow: 0 2px 10px var(--accent-glow); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-secondary {
  background: var(--bg-elevated); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }
.btn-ghost {
  background: none; color: var(--text-secondary); padding: 6px 10px;
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c0392b; }
.btn-icon {
  background: none; border: none; padding: 6px; border-radius: 6px;
  color: var(--text-muted); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-icon.danger:hover { color: var(--red); }
.btn-icon svg { width: 15px; height: 15px; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ─── Toolbar ───────────────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
}
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.count-label { color: var(--text-muted); font-size: 12px; }

/* ─── Filters ───────────────────────────────────────────────────── */
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-btn {
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: none; background: var(--bg-elevated);
  color: var(--text-secondary); transition: all 0.15s;
}
.filter-btn:hover { color: var(--text-primary); }
.filter-btn.active { background: var(--gradient-accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }

/* ─── Search ────────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap svg.search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-muted); pointer-events: none;
}
.search-input {
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary);
  border-radius: 8px; padding: 7px 32px 7px 32px; font-size: 13px; width: 220px;
  outline: none; transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center;
}

/* ─── Form inputs ───────────────────────────────────────────────── */
input[type=text], input[type=password], input[type=number], select, textarea {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: 8px; padding: 7px 12px;
  font-size: 13px; outline: none; transition: border-color 0.15s;
  font-family: inherit;
}
input[type=text]::placeholder,
input[type=password]::placeholder,
input[type=number]::placeholder,
textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--bg-elevated); }
textarea { resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-light); box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.04) inset; }

/* ─── Poster grid ───────────────────────────────────────────────── */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px; padding: 20px;
}

.poster-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: all 0.2s; position: relative;
}
.poster-card:hover { border-color: rgba(233,69,96,0.6); transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 4px 16px rgba(233,69,96,0.2); }

.poster-img-wrap { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--bg-elevated); }
.poster-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.poster-placeholder svg { width: 36px; height: 36px; }
.poster-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--bg-primary); }
.poster-bar-fill { height: 100%; background: var(--accent); }

.poster-info { padding: 8px 10px 10px; }
.poster-title { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.poster-meta { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* ─── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; padding: 2px 6px;
  border-radius: 4px; font-size: 11px; font-weight: 500; border: 1px solid;
}
.badge-green  { background: rgba(46,204,113,0.15); color: var(--green);  border-color: rgba(46,204,113,0.3);  }
.badge-red    { background: rgba(231,76,60,0.15);  color: var(--red);    border-color: rgba(231,76,60,0.3);   }
.badge-yellow { background: rgba(243,156,18,0.15); color: var(--yellow); border-color: rgba(243,156,18,0.3);  }
.badge-blue   { background: rgba(52,152,219,0.15); color: var(--blue);   border-color: rgba(52,152,219,0.3);  }
.badge-gray   { background: rgba(127,140,141,0.15);color: var(--gray);   border-color: rgba(127,140,141,0.3); }
.badge-accent { background: rgba(233,69,96,0.15);  color: var(--accent); border-color: rgba(233,69,96,0.3);   }
.poster-badge { position: absolute; top: 6px; left: 6px; }
.poster-badge-right { position: absolute; top: 6px; right: 6px; }

/* ─── Tables ────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 16px; border-bottom: 1px solid rgba(42,42,69,0.5); font-size: 13px; }
.data-table tr:hover td { background: var(--bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── Progress bar ──────────────────────────────────────────────── */
.progress { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; transition: width 0.3s; background: var(--gradient-accent); }

/* ─── Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  width: 100%; overflow: hidden; max-height: 92vh; display: flex; flex-direction: column;
  animation: fadeUp 0.2s ease;
}
.modal-sm  { max-width: 440px; }
.modal-md  { max-width: 680px; }
.modal-lg  { max-width: 900px; }
.modal-xl  { max-width: 1100px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { flex: 1; overflow-y: auto; overflow-x: auto; padding: 20px; }
.modal-footer {
  display: flex; gap: 8px; padding: 16px 20px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}

/* ─── Series detail modal ───────────────────────────────────────── */
.detail-banner {
  position: relative; height: 140px; background: var(--bg-elevated);
  overflow: hidden; flex-shrink: 0;
}
.detail-banner img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.detail-banner-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--bg-surface) 0%, transparent 60%);
}
.detail-banner-content {
  position: absolute; inset: 0; display: flex;
  align-items: flex-end; padding: 14px 18px; gap: 14px;
}
.detail-poster { width: 60px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.detail-info h2 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.detail-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.close-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.5); border: none; border-radius: 6px;
  color: var(--text-primary); cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 6px; z-index: 2;
}
.close-btn:hover { background: rgba(0,0,0,0.8); }
.close-btn svg { width: 16px; height: 16px; }

/* ─── Action bar ────────────────────────────────────────────────── */
.action-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}

/* ─── Season/Episode list ───────────────────────────────────────── */
.season-group { margin-bottom: 8px; }
.season-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-elevated); border-radius: 8px;
  cursor: pointer; user-select: none;
}
.season-header:hover { background: var(--border); }
.season-title { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 13px; }
.season-chevron { width: 16px; height: 16px; transition: transform 0.2s; }
.season-chevron.open { transform: rotate(90deg); }
.episode-list { margin-top: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.episode-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  border-bottom: 1px solid rgba(42,42,69,0.5); font-size: 12px;
}
.episode-row:last-child { border-bottom: none; }
.episode-row:hover { background: var(--bg-elevated); }
.episode-row.unmonitored { opacity: 0.45; }
.ep-num { color: var(--text-muted); width: 26px; flex-shrink: 0; font-size: 11px; }
.ep-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-airdate { color: var(--text-muted); flex-shrink: 0; width: 90px; text-align: right; font-size: 11px; }
.ep-quality { color: var(--text-muted); flex-shrink: 0; width: 70px; text-align: right; font-size: 11px; }
.ep-status { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; letter-spacing: 0.02em; }
.ep-downloaded { background: rgba(68,207,110,0.15); color: #44cf6e; }
.ep-missing    { background: rgba(233,69,96,0.15);  color: #e94560; }
.ep-unaired    { background: rgba(120,120,140,0.15); color: var(--text-muted); }
.ep-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.monitor-btn { background: none; border: none; cursor: pointer; padding: 3px; display: flex; align-items: center; color: var(--text-muted); }
.monitor-btn:hover { color: var(--accent); }
.monitor-btn.monitored { color: var(--accent); }
.monitor-btn svg { width: 14px; height: 14px; }

/* ─── Edit form grid ────────────────────────────────────────────── */
.edit-panel { padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; padding-top: 18px; }
.checkbox-label { font-size: 13px; color: var(--text-secondary); }

/* ─── Queue / Torrent items ─────────────────────────────────────── */
.queue-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
}
.queue-item-header { display: flex; align-items: flex-start; gap: 10px; }
.queue-item-name { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.queue-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ─── Stats bar ─────────────────────────────────────────────────── */
.stats-bar { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-item svg { width: 13px; height: 13px; }

/* ─── Toast ─────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 360px;
  animation: fadeUp 0.2s ease;
}
.toast-icon svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-msg { flex: 1; font-size: 13px; line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; }
.toast-close svg { width: 14px; height: 14px; }
.toast.success .toast-icon svg { color: var(--green); }
.toast.error   .toast-icon svg { color: var(--red);   }
.toast.warning .toast-icon svg { color: var(--yellow); }
.toast.info    .toast-icon svg { color: var(--blue);   }

/* ─── Dashboard ─────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; align-items: stretch; }
.service-card { display: block; text-decoration: none; cursor: pointer; transition: all 0.2s; }
.service-card:hover { transform: translateY(-1px); }
/* height:100% ensures every card in a row is the same height */
.service-card .card { transition: border-color 0.2s; height: 100%; min-height: 120px; display: flex; flex-direction: column; }
.service-card:hover .card { border-color: rgba(233,69,96,0.4); }
.service-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.service-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-icon svg { width: 16px; height: 16px; color: #fff; }
.service-name { font-weight: 700; font-size: 15px; flex: 1; color: #fff; }
.service-stat { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.service-stat-label { color: var(--text-secondary); font-weight: 400; }
.service-stat-value { font-weight: 600; color: #fff; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; align-items: stretch; }
.stat-card { text-align: center; text-decoration: none; display: block; }
.stat-card .card { padding: 20px; transition: border-color 0.2s; height: 100%; }
.stat-card:hover .card { border-color: rgba(233,69,96,0.4); }
.stat-number { font-size: 30px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 6px; font-weight: 500; }

/* ─── Skeleton shimmer ──────────────────────────────────────────── */
@keyframes sk-shimmer { 0%,100% { opacity:.35 } 50% { opacity:.7 } }
.sk-line {
  height: 11px; border-radius: 6px;
  background: var(--bg-elevated);
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk-num {
  color: transparent !important;
  background: var(--bg-elevated); border-radius: 6px;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

/* ─── Settings ──────────────────────────────────────────────────── */
.settings-section { margin-bottom: 16px; }
.settings-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.settings-section-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #fff; }

/* ─── Spinner ───────────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; }
.spinner-lg { width: 40px; height: 40px; }
.spinner-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; gap: 12px; }
.spinner-wrap p { color: var(--text-muted); font-size: 13px; }

/* ─── Empty state ───────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ─── Pagination ────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); }
.pagination span { font-size: 13px; color: var(--text-secondary); }

/* ─── Overview text ─────────────────────────────────────────────── */
.overview { color: var(--text-secondary); font-size: 13px; line-height: 1.6; padding: 12px 18px; border-bottom: 1px solid var(--border); }

/* ─── Missing episode list ──────────────────────────────────────── */
.miss-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.miss-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid rgba(42,42,69,0.5);
}
.miss-item:last-child { border-bottom: none; }
.miss-item:hover { background: var(--bg-elevated); }
.miss-ep {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.02em;
}
.miss-info { flex: 1; min-width: 0; }
.miss-series { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miss-title { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miss-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ─── History item ──────────────────────────────────────────────── */
.history-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid rgba(42,42,69,0.5); }
.history-row:hover { background: var(--bg-elevated); }
.history-row:last-child { border-bottom: none; }
.history-icon svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Add result ────────────────────────────────────────────────── */
.search-result {
  display: flex; gap: 12px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-card);
  cursor: pointer; transition: border-color 0.15s; margin-bottom: 8px;
}
.search-result:hover { border-color: rgba(233,69,96,0.4); }
.search-result.added { opacity: 0.5; cursor: default; }
.result-poster { width: 40px; height: 58px; object-fit: cover; border-radius: 5px; flex-shrink: 0; background: var(--bg-elevated); }
.result-info { flex: 1; min-width: 0; }
.result-title { font-weight: 500; font-size: 13px; }
.result-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.result-overview { font-size: 12px; color: var(--text-secondary); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ─── Utils ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-blue { color: var(--blue); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); margin-bottom: 12px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.speed-green { color: var(--green); }
.speed-blue { color: var(--blue); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Login overlay ─────────────────────────────────────────────── */
#login-overlay {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.login-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px 36px;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-logo { display: flex; align-items: center; gap: 12px; }
.login-logo .app-icon { width: 44px; height: 44px; border-radius: 12px; }
.login-app-name { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
#login-body { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.login-subtitle { font-size: 15px; font-weight: 600; color: var(--text-primary); text-align: center; }
.login-hint {
  font-size: 12px; color: var(--text-secondary); text-align: center; line-height: 1.5;
  max-width: 280px;
}
.login-spinner { color: var(--text-secondary); font-size: 13px; }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; justify-content: center; }

/* ─── Server/Stats page ─────────────────────────────────────────── */
.server-container { padding: 16px; max-width: 900px; margin: 0 auto; }

.disk-item { margin-bottom: 14px; }
.disk-item:last-child { margin-bottom: 0; }
.disk-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 13px; }
.disk-path { font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.disk-sizes { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.disk-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.disk-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.disk-fill.low    { background: var(--green); }
.disk-fill.medium { background: var(--yellow); }
.disk-fill.high   { background: var(--red); }

.health-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-left: 3px solid transparent;
  background: var(--bg-elevated); border-radius: 6px; margin-bottom: 8px;
}
.health-item:last-child { margin-bottom: 0; }
.health-item.error   { border-left-color: var(--red); }
.health-item.warning { border-left-color: var(--yellow); }
.health-item.notice  { border-left-color: var(--blue); }
.health-source { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-top: 2px; padding: 1px 6px; border-radius: 8px; color: #fff; }
.health-source.sonarr { background: #3a7bd5; }
.health-source.radarr { background: #f5a623; }
.health-msg   { font-size: 13px; flex: 1; }
.health-type  { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.dl-chart { display: flex; align-items: flex-end; gap: 4px; height: 80px; margin-bottom: 8px; }
.dl-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.dl-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; transition: height 0.3s ease; }
.dl-bar.ok   { background: var(--green); }
.dl-bar.fail { background: var(--red); }
.dl-bar-label { font-size: 9px; color: var(--text-muted); white-space: nowrap; }
.dl-chart-empty { text-align: center; padding: 20px; color: var(--text-secondary); font-size: 13px; }

.dl-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dl-row:last-child { border-bottom: none; }
.dl-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dl-status.ok   { background: var(--green); }
.dl-status.fail { background: var(--red); }
.dl-name  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-size  { color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.dl-date  { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }

/* ─── Light theme ───────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:    #f0f0f6;
  --bg-secondary:  #ffffff;
  --bg-surface:    #e6e6f0;
  --bg-elevated:   #f8f8fc;
  --bg-card:       #ffffff;
  --text-primary:  #1a1a2e;
  --text-secondary:#5a5a78;
  --text-muted:    #8080a0;
  --border:        #d0d0e0;
  --border-light:  #b8b8d0;
}
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-secondary); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: var(--border); }

/* ─── Appearance settings ───────────────────────────────────────── */
.theme-toggle { display: flex; gap: 8px; }
.theme-btn {
  flex: 1; padding: 10px 16px; border-radius: 8px;
  border: 2px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.theme-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.theme-btn.active { border-color: var(--accent); color: var(--accent); background: var(--bg-card); }

/* ─── Calendar ──────────────────────────────────────────────────── */
.cal-container { padding: 16px; max-width: 1100px; margin: 0 auto; }

.cal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.cal-header h2 { font-size: 20px; font-weight: 700; flex: 1; }
.cal-nav-btns { display: flex; gap: 6px; }

.cal-legend { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin-bottom: 2px;
}
.cal-weekday {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 0;
}

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-cell {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; min-height: 90px; padding: 6px;
  cursor: default; transition: border-color 0.15s;
  display: flex; flex-direction: column;
}
.cal-cell:hover { border-color: var(--border-light); }
.cal-cell.has-events { cursor: pointer; }
.cal-cell.has-events:hover { border-color: var(--accent); }
.cal-cell.other-month { opacity: 0.35; }
.cal-cell.today .cal-day-num {
  background: var(--accent); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.cal-day-num {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 4px; line-height: 1;
}
.cal-cell.today .cal-day-num { color: #fff; }

.cal-events { display: flex; flex-direction: column; gap: 2px; overflow: hidden; flex: 1; }

.cal-event-pill {
  display: block; font-size: 11px; font-weight: 500;
  padding: 2px 5px; border-radius: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
  color: #fff;
}
.cal-event-pill.sonarr { background: rgba(58, 123, 213, 0.7); }
.cal-event-pill.radarr { background: rgba(245, 166, 35, 0.7); }
.cal-event-pill.more   { background: var(--bg-elevated); color: var(--text-secondary); font-size: 10px; }

.cal-event-dot { display: none; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cal-event-dot.sonarr { background: #3a7bd5; }
.cal-event-dot.radarr { background: #f5a623; }
.cal-dots { display: none; }

/* Calendar day modal */
.cal-modal-date {
  font-size: 18px; font-weight: 700; margin-bottom: 14px;
  color: var(--text-primary);
}
.cal-modal-event {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cal-modal-event:last-child { border-bottom: none; }
.cal-modal-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; color: #fff;
  margin-top: 2px;
}
.cal-modal-badge.sonarr { background: #3a7bd5; }
.cal-modal-badge.radarr { background: #f5a623; }
.cal-modal-info { flex: 1; min-width: 0; }
.cal-modal-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cal-modal-sub { font-size: 12px; color: var(--text-secondary); }

/* ─── Plex Streams ──────────────────────────────────────────────── */
.plex-stream {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.plex-stream:last-child { border-bottom: none; }
.plex-thumb {
  width: 72px; height: 108px; border-radius: 6px;
  background: var(--bg-elevated); background-size: cover; background-position: center;
  flex-shrink: 0; border: 1px solid var(--border);
}
.plex-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
}
.plex-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.plex-title {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.plex-meta { font-size: 12px; color: var(--text-secondary); }
.plex-progress-row { display: flex; align-items: center; gap: 0; margin-top: 2px; }
.plex-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.plex-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.plex-state {
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px;
}
.plex-state.state-playing { background: rgba(46,204,113,0.15); color: var(--green); }
.plex-state.state-paused  { background: rgba(243,156,18,0.15);  color: var(--yellow); }
.plex-badge {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  background: var(--bg-elevated); color: var(--text-secondary);
}
.plex-badge.badge-transcode { background: rgba(233,69,96,0.12); color: var(--accent); }
.plex-badge.badge-direct    { background: rgba(52,152,219,0.12); color: var(--blue); }

/* ─── Media cards (Trakt / TMDB) ───────────────────────────────── */
.media-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.media-row::-webkit-scrollbar { height: 4px; }
.media-card {
  flex: 0 0 120px; display: flex; flex-direction: column;
}
.media-poster {
  position: relative;
  width: 120px; height: 180px; border-radius: 8px;
  background: var(--bg-elevated); background-size: cover; background-position: center;
  overflow: hidden; flex-shrink: 0; margin-bottom: 7px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
.media-in-lib {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(46, 204, 113, 0.88); color: #fff;
  font-size: 10px; font-weight: 700; text-align: center; padding: 4px 0;
}
.media-add-btn {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(233, 69, 96, 0.9); color: #fff; border: none;
  font-size: 11px; font-weight: 700; padding: 5px 0; cursor: pointer;
  opacity: 0; transition: opacity 0.15s;
}
.media-card:hover .media-add-btn { opacity: 1; }
.media-add-btn.added { background: rgba(46, 204, 113, 0.9); opacity: 1; }
.media-add-btn:disabled { cursor: default; }
.media-title {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--text-primary);
}
.media-meta {
  font-size: 11px; color: var(--text-secondary); margin-top: 2px;
}

/* ─── PWA Install Banner ────────────────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(18,18,34,0.97);
  border-top: 1px solid var(--border-light);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.5);
}
.pwa-banner.show { transform: translateY(0); }
.pwa-banner-icon { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; box-shadow: 0 2px 12px var(--accent-glow); }
.pwa-banner-text { flex: 1; min-width: 0; }
.pwa-banner-text strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pwa-banner-text span { font-size: 12px; color: var(--text-secondary); }
.pwa-install-btn { flex-shrink: 0; }
.pwa-banner-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px 8px; font-size: 18px;
  flex-shrink: 0; line-height: 1; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.pwa-banner-close:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE  (≤ 768px)  — collapsible left icon sidebar
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Left icon sidebar — hidden off-screen by default ──────── */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 64px; min-width: 64px; height: 100%;
    flex-direction: column;
    border-right: 1px solid var(--border); border-top: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 51;
    transform: translateX(-64px);
    transition: transform 0.22s ease;
  }

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

  /* ─── Backdrop ───────────────────────────────────────────────── */
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; z-index: 50;
    background: rgba(0,0,0,0.45);
  }
  #app.sidebar-open .sidebar-backdrop { display: block; }

  .sidebar-logo {
    padding: 12px 0; justify-content: center;
  }
  .sidebar-logo span { display: none; }
  .sidebar-logo .user-avatar-wrap { display: none; }

  .sidebar-nav {
    flex: 1; padding: 4px 0; overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
  }

  .sidebar-bottom { padding: 4px 0; border-top: 1px solid var(--border); }

  .nav-label { display: none; }

  .nav-item {
    flex-direction: column; gap: 3px;
    padding: 10px 4px; justify-content: center; align-items: center;
    font-size: 9px; border-radius: 6px; min-height: auto; text-align: center;
    width: 100%;
  }

  .nav-item svg { width: 20px; height: 20px; }

  /* ─── Main — always full width, sidebar overlays ────────────── */
  .main {
    width: 100%;
    margin-left: 0;
    padding-bottom: 0;
  }

  /* ─── Hamburger button ───────────────────────────────────────── */
  .hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; border: none;
    background: none; cursor: pointer; color: var(--text-secondary);
    flex-shrink: 0; padding: 6px;
  }
  .hamburger:hover { background: var(--bg-elevated); color: var(--text-primary); }
  .hamburger svg { width: 20px; height: 20px; }

  /* ─── Page header ────────────────────────────────────────────── */
  .page-header { padding: 0 12px; height: 48px; }
  .page-title  { font-size: 15px; }

  /* ─── Touch-friendly tap targets ────────────────────────────── */
  .btn      { min-height: 40px; padding: 9px 14px; }
  .btn-icon { min-width: 38px; min-height: 38px; padding: 9px; }
  .btn-icon svg { width: 17px; height: 17px; }
  .tab      { min-height: 36px; padding: 7px 12px; }
  .filter-btn { min-height: 34px; padding: 7px 12px; }

  /* ─── 16 px font prevents iOS from auto-zooming on input focus ─ */
  input[type=text],
  input[type=password],
  input[type=number],
  select,
  textarea      { font-size: 16px; padding: 10px 12px; }
  .search-input { font-size: 16px; padding: 10px 36px 10px 36px; width: 100%; }

  /* ─── Toolbar: stack vertically, full-width search ──────────── */
  .toolbar       { padding: 8px 12px; gap: 8px; }
  .toolbar-right { margin-left: 0; }
  .search-wrap   { width: 100%; }

  /* ─── Poster grid: smaller min-width = more columns ─────────── */
  .poster-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px; padding: 12px;
  }

  /* ─── Modals: slide up from bottom edge ─────────────────────── */
  .modal-overlay  { padding: 0; align-items: flex-end; }
  .modal          { border-radius: 20px 20px 0 0; max-height: 94dvh; max-height: 94vh; }
  .modal-sm,
  .modal-md,
  .modal-lg,
  .modal-xl       { max-width: 100%; }
  .modal-body     { padding: 16px; }
  .modal-header,
  .modal-footer   { padding: 14px 16px; }

  /* ─── Episode rows: drop narrow fixed-width columns ─────────── */
  .ep-quality { display: none; }
  .ep-airdate { width: auto; }
  .ep-num   { width: 22px; }
  .ep-title { font-size: 12px; }

  /* ─── Form grid: single column on narrow screens ─────────────── */
  .form-grid { grid-template-columns: 1fr; }

  /* ─── Queue / torrent items ──────────────────────────────────── */
  .queue-item        { padding: 10px 12px; }
  .queue-item-name   { font-size: 12px; }

  /* ─── Toast: lift above bottom nav, span full width ─────────── */
  #toast-container {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    right: 12px; left: 12px;
  }
  .toast { min-width: unset; max-width: 100%; }

  /* ─── Dashboard grids ────────────────────────────────────────── */
  .dash-grid  { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  /* ─── Detail banner ──────────────────────────────────────────── */
  .detail-banner         { height: 150px; }
  .detail-info h2        { font-size: 16px; }
  .detail-banner-content { padding: 12px 14px; gap: 10px; }
  .detail-poster         { width: 52px; height: 78px; }

  /* ─── Action bar ─────────────────────────────────────────────── */
  .action-bar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }

  /* ─── Overview text ──────────────────────────────────────────── */
  .overview { padding: 10px 14px; font-size: 12px; }

  /* ─── Data table: horizontal scroll wrapper ──────────────────── */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ─── Pagination ─────────────────────────────────────────────── */
  .pagination { padding: 10px 12px; }

  /* ─── Search result cards ────────────────────────────────────── */
  .search-result { padding: 10px; }

  /* ─── History rows ───────────────────────────────────────────── */
  .history-row { padding: 10px 14px; }

  /* ─── Larger close button on modals ─────────────────────────── */
  .close-btn { padding: 10px; }
  .close-btn svg { width: 18px; height: 18px; }

  /* ─── Monitor toggle hit area ────────────────────────────────── */
  .monitor-btn { padding: 6px; }

  /* ─── Season header ──────────────────────────────────────────── */
  .season-header { padding: 12px 14px; }

  /* ─── Calendar mobile overrides ─────────────────────────────── */
  .cal-header { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .cal-header h2 { font-size: 16px; }
  .cal-grid { gap: 1px; }
  .cal-cell { min-height: 60px; padding: 4px; }
  .cal-event-pill { display: none; }
  .cal-event-dot { display: block; }
  .cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
}

