/* ── Gêneros inline (pills) ── */
.genero-tags-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 12px;
}
.genero-tag {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
  cursor: default;
  user-select: none;
  box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}
.genero-tag:nth-child(2) { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.genero-tag:nth-child(3) { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.genero-tag:nth-child(n+4) { background: linear-gradient(135deg, #4c1d95, #7c3aed); }

/* ── Reset & base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');
body {
  height: 100vh;
  background: linear-gradient(145deg, #e8eaf6 0%, #d1d5f0 50%, #c5c8ea 100%);
  display: flex; font-family: 'Nunito', sans-serif;
  overflow: hidden;
  position: relative;
}

/* ── Background orbs ── */
body::before, body::after {
  content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}
body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(167,139,250,0.18) 0%, transparent 70%);
  top: -100px; right: -100px;
}
body::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(108,122,224,0.12) 0%, transparent 70%);
  bottom: -80px; left: 50px;
}

/* ── Sidebar ── */
.sidebar {
  width: 200px;
  background: rgba(255,255,255,0.38);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.6);
  display: flex; flex-direction: column; align-items: stretch;
  padding: 20px 0 16px; gap: 2px; z-index: 10; position: relative;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Brand / Logo */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 16px;
  overflow: hidden;
  transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), gap 0.35s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-logo-img {
  width: 32px; height: 32px; object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(108,122,224,0.4));
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: 20px; font-weight: 900;
  color: #2d2f4a; letter-spacing: -0.5px;
  font-family: 'Nunito', sans-serif;
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
body.dark .sidebar-brand-name { color: #e0e0f0; }

/* Divider */
.sidebar-divider {
  height: 1px; background: rgba(108,122,224,0.15);
  margin: 0 14px 8px;
  transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav group */
.sidebar-nav {
  display: flex; flex-direction: column; gap: 2px; padding: 0 8px;
}

/* Spacer pushes settings + user to bottom */
.sidebar-spacer { flex: 1; }

.sidebar-logo {
  font-size: 22px; margin-bottom: 18px; filter: drop-shadow(0 2px 6px rgba(108,122,224,0.4));
  text-align: center;
}
.icon {
  width: auto; height: auto; border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  font-size: 20px; cursor: pointer;
  transition: background 0.2s, transform 0.15s, padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), gap 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: 0 8px;
  text-decoration: none;
  color: #5a5f80;
}
.icon:hover { background: rgba(108,122,224,0.10); transform: scale(1.02); color: #6c7ae0; }
.icon.active {
  background: linear-gradient(135deg, rgba(108,122,224,0.18), rgba(167,139,250,0.15));
  color: #6c7ae0;
}
.icon-svg {
  width: 20px; height: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.icon-svg svg { width: 20px; height: 20px; }
.icon-label {
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  max-width: 140px;
  opacity: 1;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.icon.active .icon-label { color: #6c7ae0; font-weight: 800; }
.icon.active::after {
  content: ''; position: absolute; right: -1px;
  width: 3px; height: 22px; border-radius: 2px 0 0 2px;
  top: 50%; transform: translateY(-50%);
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
}

body.dark .icon { color: #7880a8; }
body.dark .icon:hover { background: rgba(108,122,224,0.18); color: #a78bfa; }
body.dark .icon.active { background: rgba(108,122,224,0.22); color: #a78bfa; }
body.dark .icon.active .icon-label { color: #a78bfa; }

/* Settings icon positioned above divider */
#btnSettings { margin: 4px 8px 6px; }

/* User block */
.sidebar-user-block {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 4px;
  overflow: hidden;
  transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), gap 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-user-avatar-wrap {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  padding: 2px;
}
.sidebar-user-avatar {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; border: 2px solid white; display: block;
}
.sidebar-user-name {
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700;
  color: #2d2f4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 110px;
  opacity: 1;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
body.dark .sidebar-user-name { color: #e0e0f0; }
body.dark .sidebar-user-avatar { border-color: #1a1a2e; }

/* ══════════════════════════════════════
   SIDEBAR COLLAPSE TOGGLE BUTTON
══════════════════════════════════════ */
.sidebar-toggle-btn {
  position: absolute;
  left: 200px; /* matches sidebar width */
  top: 50%;
  transform: translateY(-50%) translateX(-50%);
  z-index: 20;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(108,122,224,0.35);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(108,122,224,0.2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  color: #6c7ae0;
}
.sidebar-toggle-btn svg { width: 13px; height: 13px; }
.sidebar-toggle-btn:hover {
  background: #6c7ae0; color: white;
  box-shadow: 0 4px 16px rgba(108,122,224,0.4);
}
body.dark .sidebar-toggle-btn {
  background: rgba(22,24,42,0.95);
  border-color: rgba(108,122,224,0.3);
  color: #a78bfa;
}
body.dark .sidebar-toggle-btn:hover { background: #6c7ae0; color: white; }

/* ── Collapsed state ── */
body.sidebar-collapsed .sidebar {
  width: 68px;
}
body.sidebar-collapsed .sidebar-brand-name,
body.sidebar-collapsed .icon-label,
body.sidebar-collapsed .sidebar-user-name {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
}
body.sidebar-collapsed .sidebar-brand {
  padding: 0 0 16px;
  gap: 0;
  justify-content: center;
}
body.sidebar-collapsed .icon {
  gap: 0;
  padding: 10px 0;
  margin: 0 10px;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-nav { padding: 0; }
body.sidebar-collapsed #btnSettings { margin: 4px 10px 6px; }
body.sidebar-collapsed .sidebar-divider {
  margin: 0 10px 8px;
}
body.sidebar-collapsed .sidebar-user-block {
  gap: 0;
  padding: 10px 0 4px;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-toggle-btn {
  left: 68px;
}
body.sidebar-collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

/* Toggle button left position transition */
.sidebar-toggle-btn {
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
}
.sidebar-toggle-btn svg {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Main container ── */
.container {
  flex: 1; padding: 36px 40px; overflow-y: auto; position: relative; z-index: 1;
}
.container::-webkit-scrollbar { width: 6px; }
.container::-webkit-scrollbar-thumb { background: rgba(108,122,224,0.25); border-radius: 10px; }

/* ── Perfil header ── */
.perfil {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 36px; padding: 20px 24px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 22px; border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 20px rgba(108,122,224,0.1);
  animation: fadeSlideIn 0.4s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.perfil-avatar-ring {
  width: 62px; height: 62px; border-radius: 50%; padding: 2.5px; flex-shrink: 0;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  box-shadow: 0 4px 16px rgba(108,122,224,0.4);
}
.perfil-avatar-ring img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; border: 2.5px solid white; display: block;
}
.perfil-text { flex: 1; }
.perfil-text h2 { font-size: 18px; font-weight: 800; color: #2d2f4a; line-height: 1.2; }
.perfil-text p  { font-size: 13px; color: #9095b8; margin-top: 2px; font-weight: 600; }
.perfil-stats {
  display: flex; gap: 20px; flex-shrink: 0; flex-wrap: wrap; justify-content: center;
}
.stat-item { text-align: center; }
.stat-item .num { font-size: 20px; font-weight: 800; color: #6c7ae0; line-height: 1; }
.stat-item .lbl { font-size: 11px; color: #9095b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── Categorias ── */
.categoria {
  background: rgba(255,255,255,0.52);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.85);
  padding: 22px 24px; border-radius: 24px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(108,122,224,0.08);
  animation: fadeSlideIn 0.4s ease both;
}
.categoria:nth-child(2) { animation-delay: 0.05s; }
.categoria:nth-child(3) { animation-delay: 0.1s; }
.categoria:nth-child(4) { animation-delay: 0.15s; }

.categoria-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.categoria-header-left { display: flex; align-items: center; gap: 10px; }
.categoria-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-assistindo { background: linear-gradient(135deg, #6c7ae0, #a78bfa); box-shadow: 0 0 8px rgba(108,122,224,0.5); }
.dot-assistidos { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.dot-para       { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.categoria h3 { font-size: 15px; font-weight: 800; color: #2d2f4a; }
.categoria-count {
  font-size: 12px; font-weight: 700; color: #6c7ae0;
  background: rgba(108,122,224,0.1); border-radius: 20px; padding: 3px 10px;
}

/* ── Lista / drag-scroll ── */
.lista {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  cursor: grab; user-select: none; -webkit-user-select: none;
  scroll-behavior: smooth;
}
.lista:active { cursor: grabbing; }
.lista::-webkit-scrollbar { height: 5px; }
.lista::-webkit-scrollbar-thumb { background: rgba(108,122,224,0.2); border-radius: 10px; }

/* empty state */
.lista-empty {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 16px;
  border: 2px dashed rgba(108,122,224,0.2);
  color: #b0b3d1; font-size: 13px; font-weight: 600;
  width: 100%; cursor: pointer; transition: border-color 0.2s, color 0.2s;
  user-select: none;
}
.lista-empty:hover { border-color: rgba(108,122,224,0.4); color: #6c7ae0; }

/* ── Card ── */
.card {
  width: 130px;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  border: 1.5px solid rgba(255,255,255,0.6);
  user-select: none; -webkit-user-select: none;
}
.card img {
  background: #e0e0e0; width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
.card:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 14px 30px rgba(108,122,224,0.22); }
.card-info {
  position: absolute; bottom: 0; left: 0; width: 100%;
  padding: 34px 10px 8px;
  background: linear-gradient(to top, rgba(20,15,40,0.95) 0%, transparent 100%);
  color: white;
}
.card-title { font-size: 12px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.card-badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  background: rgba(108,122,224,0.85); color: white;
  border-radius: 6px; padding: 1px 6px; margin-bottom: 5px;
}

/* ── Barra de progresso no card ── */
.eps-bar-wrap {
  width: 100%; height: 3px; background: rgba(255,255,255,0.2);
  border-radius: 99px; overflow: hidden; margin-top: 5px;
}
.eps-bar {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #6c7ae0);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.eps-label {
  font-size: 9px; color: rgba(255,255,255,0.7);
  margin-top: 2px; font-weight: 700; letter-spacing: 0.3px;
}

/* ── Botão flutuante ── */
.btn-add {
  position: fixed; bottom: 28px; right: 28px;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  font-size: 28px; cursor: pointer; z-index: 100;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  box-shadow: 0 8px 24px rgba(108,122,224,0.45);
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.btn-add:hover { transform: scale(1.08) rotate(90deg); box-shadow: 0 12px 30px rgba(108,122,224,0.55); }

/* ── Modal adicionar ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px); display: none;
  justify-content: center; align-items: center; z-index: 200;
}
.modal {
  background: rgba(255,255,255,0.96); padding: 28px; border-radius: 24px;
  width: min(360px, 96vw); display: flex; flex-direction: column; gap: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: popIn 0.25s ease;
}
.modal h2 { font-size: 18px; font-weight: 800; color: #2d2f4a; margin-bottom: 18px; }

/* Toggle Anime / Filme */
.modal-tipo-toggle {
  display: flex; gap: 6px; margin-bottom: 18px;
  background: rgba(108,122,224,0.08); border-radius: 16px; padding: 5px;
}
.tipo-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; font-family: 'Nunito', sans-serif;
  color: #9095b8; background: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.tipo-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.tipo-btn-ativo {
  background: white; color: #6c7ae0;
  box-shadow: 0 2px 10px rgba(108,122,224,0.2);
}
body.dark .modal-tipo-toggle { background: rgba(108,122,224,0.12); }
body.dark .tipo-btn-ativo { background: #2a2d48; color: #9ba4f0; box-shadow: 0 2px 10px rgba(108,122,224,0.15); }
.modal-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.modal-field-row { display: flex; gap: 10px; margin-bottom: 12px; width: 100%; }
.modal-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: #9095b8; }
.campo-obrigatorio { color: #e53e3e; }
.modal-field input, .modal-field select {
  padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid #e8eaf0; font-size: 14px;
  font-family: 'Nunito', sans-serif; color: #2d2f4a;
  background: #f5f6fb; outline: none; transition: border-color 0.2s;
}
.modal-field input:focus, .modal-field select:focus { border-color: #6c7ae0; }
.modal-field-row .modal-field input { padding: 10px 10px; width: 100%; box-sizing: border-box; }
.modal-field-row .modal-field { min-width: 0; }
.modal-botoes { display: flex; gap: 10px; margin-top: 8px; }
.modal-botoes button { flex: 1; padding: 12px; border-radius: 14px; border: none; cursor: pointer; font-size: 14px; font-weight: 700; font-family: 'Nunito', sans-serif; transition: opacity 0.2s; }
#salvar { background: linear-gradient(135deg, #6c7ae0, #a78bfa); color: white; box-shadow: 0 4px 14px rgba(108,122,224,0.35); }
#salvar:hover { opacity: 0.9; }
#fechar { background: #f0f1f8; color: #555; }
#fechar:hover { background: #e5e7f5; }

/* ── Modal detalhe ── */
/* ════════════════════════════════════════
   MODAL DETALHE — REDESIGN
   ════════════════════════════════════════ */
/* ══════════════════════════════════════
   MODAL DETALHE ANIME — redesign
══════════════════════════════════════ */

/* Overlay */
.modal-detalhe-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center; align-items: center;
  z-index: 200; padding: 16px;
}

/* Card */
.modal-detalhe {
  background: #fff;
  border-radius: 24px;
  width: min(400px, 100%);
  position: relative;
  box-shadow: 0 28px 72px rgba(0,0,0,0.28);
  animation: popIn 0.28s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 90vh;
  overflow-y: auto; overflow-x: hidden;
}
body.dark .modal-detalhe { background: #13141f; }

/* ── Hero ── */
.detalhe-hero {
  position: relative; width: 100%; height: 250px;
  flex-shrink: 0; border-radius: 24px 24px 0 0; overflow: hidden;
}
.detalhe-hero-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top; display: block;
}
.detalhe-hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0) 25%,
    rgba(0,0,0,0.7) 70%,
    rgba(0,0,0,0.94) 100%
  );
}

/* ── Fechar (canto sup esq) ── */
.dt-close-btn {
  position: absolute; top: 12px; left: 12px; z-index: 20;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.9);
  transition: background 0.18s, transform 0.15s;
}
.dt-close-btn svg { width: 16px; height: 16px; }
.dt-close-btn:hover { background: rgba(0,0,0,0.6); transform: scale(1.08); }

/* ── Botão ⋯ menu (canto sup dir) ── */
.dt-menu-btn {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.9);
  transition: background 0.18s, transform 0.15s;
}
.dt-menu-btn svg { width: 20px; height: 20px; }
.dt-menu-btn:hover { background: rgba(0,0,0,0.6); transform: scale(1.08); }
.dt-menu-btn.active { background: rgba(108,122,224,0.85); }

/* ── Dropdown do menu ── */
.dt-menu-dropdown {
  position: absolute; top: 50px; right: 12px; z-index: 30;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 200px;
  display: none;
  flex-direction: column;
  animation: dropIn 0.2s cubic-bezier(0.34,1.4,0.64,1);
}
.dt-menu-dropdown.open { display: flex; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.dark .dt-menu-dropdown {
  background: rgba(22,24,40,0.97);
  border-color: rgba(255,255,255,0.08);
}

.dt-menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: 11px;
  border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700;
  font-family: 'Nunito', sans-serif;
  color: #2d2f4a; text-align: left; width: 100%;
  transition: background 0.15s;
}
.dt-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; color: #6c7ae0; }
.dt-menu-item:hover { background: rgba(108,122,224,0.08); }
body.dark .dt-menu-item { color: #e0e0f0; }
body.dark .dt-menu-item:hover { background: rgba(108,122,224,0.12); }

/* Mover: item com select inline */
.dt-menu-move-wrap { cursor: default; gap: 11px; }
.dt-menu-move-wrap:hover { background: rgba(108,122,224,0.05); }
.dt-move-select {
  flex: 1; border: none; background: transparent;
  font-size: 13px; font-weight: 700;
  font-family: 'Nunito', sans-serif;
  color: #6c7ae0; outline: none; cursor: pointer;
}
body.dark .dt-move-select { color: #a78bfa; }

/* Divisor */
.dt-menu-divider {
  height: 1px; background: rgba(0,0,0,0.06);
  margin: 4px 6px;
}
body.dark .dt-menu-divider { background: rgba(255,255,255,0.06); }

/* Excluir — vermelho discreto */
.dt-menu-delete { color: #d93025; }
.dt-menu-delete svg { color: #d93025; }
.dt-menu-delete:hover { background: rgba(217,48,37,0.08) !important; }

/* ── Info no hero: título, nota, gêneros ── */
.detalhe-hero-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 18px 18px; z-index: 5;
}
.detalhe-hero-info h2 {
  font-size: 20px; font-weight: 900; color: #fff;
  line-height: 1.2; margin: 0 0 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.detalhe-hero-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.detalhe-nota-badge {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff; font-size: 13px; font-weight: 800;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.3px;
}
.detalhe-filme-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(180,140,255,0.25);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(180,140,255,0.5);
  color: #e8d5ff; font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.detalhe-filme-badge svg { width: 12px; height: 12px; fill: #d4aaff; flex-shrink: 0; }
.detalhe-hero-info .genero-tags-inline .genero-tag {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
}

/* ── Corpo ── */
.detalhe-body {
  padding: 20px 20px 28px;
  display: flex; flex-direction: column; gap: 20px;
}
body.dark .detalhe-body { color: #e0e0f0; }

/* ── Progresso de episódios ── */
/* ══════════════════════════════════════
   PROGRESSO DE EPISÓDIOS — REDESIGN
══════════════════════════════════════ */
.detalhe-eps-wrap { display: flex; flex-direction: column; }

.eps-block {
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(108,122,224,0.05);
  border: 1.5px solid rgba(108,122,224,0.1);
  border-radius: 16px; padding: 14px 16px;
}
body.dark .eps-block {
  background: rgba(108,122,224,0.08);
  border-color: rgba(108,122,224,0.18);
}

/* Linha topo: label + contagem */
.eps-header {
  display: flex; align-items: center; justify-content: space-between;
}
.eps-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.8px; color: #9095b8;
  font-family: 'Nunito', sans-serif;
}
.eps-count {
  font-size: 13px; font-weight: 800; color: #6c7ae0;
  font-family: 'Nunito', sans-serif;
}
.eps-count--done { color: #059669; }
body.dark .eps-label  { color: #5a5d7a; }
body.dark .eps-count  { color: #a78bfa; }
body.dark .eps-count--done { color: #34d399; }

/* Barra */
.eps-bar-wrap {
  height: 6px; background: rgba(108,122,224,0.12);
  border-radius: 99px; overflow: hidden;
}
.eps-bar {
  height: 100%;
  background: linear-gradient(90deg, #6c7ae0, #a78bfa);
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.eps-bar--done {
  background: linear-gradient(90deg, #34d399, #059669);
}
body.dark .eps-bar-wrap { background: rgba(108,122,224,0.2); }

/* Stepper row: − [n] / [total] ep. + */
.eps-stepper-row {
  display: flex; align-items: center; gap: 10px; justify-content: center;
}
.eps-step-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(108,122,224,0.1);
  color: #6c7ae0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s, transform 0.12s;
  flex-shrink: 0;
}
.eps-step-btn svg { width: 16px; height: 16px; }
.eps-step-btn:hover:not(:disabled) { background: rgba(108,122,224,0.22); transform: scale(1.08); }
.eps-step-btn:active:not(:disabled) { transform: scale(0.93); }
.eps-step-btn:disabled { opacity: 0.28; cursor: default; }
body.dark .eps-step-btn { background: rgba(108,122,224,0.15); color: #a78bfa; }
body.dark .eps-step-btn:hover:not(:disabled) { background: rgba(108,122,224,0.28); }

.eps-stepper-center {
  display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center;
}
.eps-num-input {
  width: 56px; padding: 7px 4px;
  border-radius: 10px; border: 2px solid #e8eaf0;
  font-size: 16px; font-weight: 800;
  font-family: 'Nunito', sans-serif; color: #2d2f4a;
  background: white; outline: none; text-align: center;
  transition: border-color 0.2s;
  /* hide number spinners */
  -moz-appearance: textfield;
}
.eps-num-input::-webkit-inner-spin-button,
.eps-num-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.eps-num-input:focus { border-color: #6c7ae0; }
.eps-total-input { color: #9095b8; border-style: dashed; }
.eps-total-input:focus { color: #2d2f4a; border-style: solid; border-color: #6c7ae0; }
body.dark .eps-num-input { background: #1e2035; color: #e0e0f0; border-color: #2a2d48; }
body.dark .eps-total-input { color: #5a5d7a; }
body.dark .eps-total-input:focus { color: #e0e0f0; }

.eps-stepper-sep {
  font-size: 15px; font-weight: 800; color: #d0d3e8;
  font-family: 'Nunito', sans-serif;
}
.eps-stepper-unit {
  font-size: 12px; font-weight: 700; color: #b0b5cc;
  font-family: 'Nunito', sans-serif;
}
body.dark .eps-stepper-sep { color: #3a3d58; }
body.dark .eps-stepper-unit { color: #4a4d68; }

/* ── Anotação pessoal ── */
.detalhe-obs-wrap { display: flex; flex-direction: column; gap: 7px; }

.detalhe-obs-header {
  display: flex; align-items: center; justify-content: space-between;
}
.detalhe-obs-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: #9095b8; font-family: 'Nunito', sans-serif;
  cursor: default;
}
.detalhe-obs-label svg { width: 13px; height: 13px; flex-shrink: 0; }
body.dark .detalhe-obs-label { color: #5a5d7a; }

/* Badge de autosave — aparece brevemente */
.detalhe-obs-autosave {
  font-size: 10px; font-weight: 800;
  color: #34d399; letter-spacing: 0.2px;
  opacity: 0; transition: opacity 0.35s;
}
.detalhe-obs-autosave.visible { opacity: 1; }

/* Hint permanente */
.detalhe-obs-hint {
  font-size: 10px; font-weight: 600; color: #c0c4d8;
  font-family: 'Nunito', sans-serif;
  margin: -2px 0 0; padding-left: 2px;
}
body.dark .detalhe-obs-hint { color: #3a3d58; }

#detalheObs {
  width: 100%; min-height: 72px; max-height: 160px;
  border-radius: 13px; padding: 11px 13px;
  border: 2px solid #e8eaf0; resize: none;
  font-size: 13px; font-family: 'Nunito', sans-serif;
  color: #444; background: #f7f8fc;
  outline: none; transition: border-color 0.2s;
  box-sizing: border-box; line-height: 1.5;
}
#detalheObs:focus { border-color: #6c7ae0; }
body.dark #detalheObs {
  background: #1e2035; color: #d0d0e8; border-color: #2a2d48;
}

/* ── Edit fields (injected by JS) ── */
.edit-fields-group {
  display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px;
}
.edit-data-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #9095b8;
}
body.dark .edit-data-label { color: #6068a0; }
.edit-capa-input {
  width: 100%; display: block; box-sizing: border-box;
  padding: 9px 12px; border-radius: 11px;
  border: 2px solid #e8eaf0; font-size: 12px;
  font-family: 'Nunito', sans-serif; color: #2d2f4a; background: #f7f8fc;
  outline: none; transition: border-color 0.2s;
}
.edit-capa-input:focus { border-color: #6c7ae0; }
body.dark .edit-capa-input { background: #1e2035; color: #e0e0f0; border-color: #2a2d48; }
.detalhe-edit-input {
  width: 100%; display: block; box-sizing: border-box;
  border: 2px solid rgba(255,255,255,0.35); border-radius: 12px;
  font-family: 'Nunito', sans-serif; color: #fff;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}
.detalhe-edit-input:focus {
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}
.detalhe-edit-nome { font-size: 18px; font-weight: 900; padding: 10px 14px; }
.detalhe-edit-nota {
  font-size: 14px; font-weight: 800; padding: 7px 14px;
  width: auto; min-width: 90px;
}
body.dark .detalhe-edit-input { background: rgba(255,255,255,0.1); }
body.dark .detalhe-edit-nota { color: #a78bfa; }

/* ── Modal de confirmação de exclusão ── */
.dt-confirm-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.dt-confirm-overlay.open { display: flex; }
.dt-confirm-modal {
  background: #fff; border-radius: 20px;
  padding: 28px 24px 22px;
  width: min(320px, 100%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: popIn 0.24s cubic-bezier(0.34,1.56,0.64,1);
}
body.dark .dt-confirm-modal { background: #1a1c2e; }
.dt-confirm-icon {
  width: 48px; height: 48px; border-radius: 16px;
  background: rgba(217,48,37,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.dt-confirm-icon svg { width: 22px; height: 22px; color: #d93025; }
.dt-confirm-title {
  font-size: 17px; font-weight: 900; color: #2d2f4a;
  margin: 0; font-family: 'Nunito', sans-serif;
}
body.dark .dt-confirm-title { color: #e0e0f0; }
.dt-confirm-desc {
  font-size: 13px; color: #8890b8; margin: 0; text-align: center;
  font-family: 'Nunito', sans-serif; line-height: 1.5;
}
.dt-confirm-actions {
  display: flex; gap: 10px; width: 100%; margin-top: 8px;
}
.dt-confirm-cancel, .dt-confirm-ok {
  flex: 1; padding: 12px;
  border-radius: 13px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 800;
  font-family: 'Nunito', sans-serif;
  transition: opacity 0.18s, transform 0.15s;
}
.dt-confirm-cancel:hover, .dt-confirm-ok:hover { opacity: 0.88; transform: translateY(-1px); }
.dt-confirm-cancel {
  background: rgba(108,122,224,0.08); color: #6c7ae0;
}
.dt-confirm-ok {
  background: linear-gradient(135deg, #d93025, #b91c1c);
  color: white; box-shadow: 0 4px 14px rgba(217,48,37,0.35);
}
body.dark .dt-confirm-cancel { background: rgba(108,122,224,0.12); color: #a78bfa; }

/* ── Filtros ── */
.categoria-actions { display: flex; align-items: center; gap: 8px; }
.filter-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; height: 26px;
  background: rgba(108,122,224,0.08);
  border: 1.5px solid rgba(108,122,224,0.18);
  border-radius: 20px; cursor: pointer;
  font-size: 11px; font-weight: 700;
  font-family: 'Nunito', sans-serif; color: #6c7ae0;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap; user-select: none;
}
.filter-btn:hover { background: rgba(108,122,224,0.16); border-color: rgba(108,122,224,0.35); transform: scale(1.04); }
.filter-btn[data-order="antigos"] { background: rgba(167,139,250,0.12); border-color: rgba(167,139,250,0.3); color: #7c5fbf; }
@keyframes filterPulse { 0%{transform:scale(1)} 40%{transform:scale(0.92)} 100%{transform:scale(1)} }
.filter-btn-pulse { animation: filterPulse 0.28s ease; }

/* ======= BUSCA ======= */
#searchOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px); display: none;
  justify-content: center; align-items: flex-start;
  padding-top: 60px; z-index: 300;
}
.search-panel {
  background: rgba(255,255,255,0.97); border-radius: 24px;
  width: min(520px, 96vw); max-height: 78vh; display: flex;
  flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: slideDown 0.3s ease;
}
@keyframes slideDown { from{transform:translateY(-30px);opacity:0} to{transform:translateY(0);opacity:1} }
.search-header { padding: 22px 22px 14px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 12px; }
.search-header input { flex: 1; border: none; outline: none; font-size: 17px; background: transparent; }
.search-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: #888; }
.search-body { overflow-y: auto; padding: 16px; flex: 1; }
.search-body h4 { color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.search-results { display: flex; flex-direction: column; gap: 10px; }
.search-result-item { display: flex; align-items: center; gap: 14px; background: #f7f7fa; border-radius: 14px; padding: 10px 14px; cursor: pointer; transition: background 0.2s, transform 0.15s; }
.search-result-item:hover { background: #eeeef8; transform: translateX(3px); }
.search-result-item img { width: 48px; height: 68px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #e0e0e0; }
.r-title { font-weight: 600; font-size: 14px; color: #222; }
.r-meta  { font-size: 12px; color: #888; margin-top: 3px; }
.r-score { font-size: 12px; color: #6c7ae0; font-weight: 600; margin-top: 2px; }
.search-spinner { text-align: center; color: #999; font-size: 14px; padding: 30px 0; }
.dots::after { content: ''; animation: dots 1.5s infinite; }
@keyframes dots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} 100%{content:''} }

/* ======= DETALHE BUSCA ======= */
#searchDetailOverlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); display: none; justify-content: center; align-items: center; z-index: 400; }
.search-detail-panel { background: white; border-radius: 24px; width: min(420px,96vw); max-height: 90vh; overflow-y: auto; position: relative; padding: 30px 28px 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: popIn 0.25s ease; }
.sd-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: #888; }
.sd-title { font-size: 20px; font-weight: 700; color: #222; margin-bottom: 14px; text-align: center; padding: 0 30px; line-height: 1.3; }
.sd-image-wrap { width: 170px; margin: 0 auto 14px; }
.sd-image-wrap img { width: 100%; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); background: #e0e0e0; min-height: 240px; object-fit: cover; }
.sd-studio { text-align: center; font-size: 13px; color: #6c7ae0; font-weight: 600; margin-bottom: 8px; }
.sd-desc { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 18px; max-height: 120px; overflow-y: auto; padding: 10px; background: #f8f8fb; border-radius: 10px; }
.sd-add-section { display: flex; flex-direction: column; gap: 8px; }
.sd-add-section label { font-size: 13px; font-weight: 600; color: #444; }
.sd-add-section select, .sd-add-section input[type="number"], .sd-add-section input[type="date"] { padding: 10px 12px; border-radius: 10px; border: 1px solid #ddd; font-size: 14px; background: #f7f7fa; font-family: 'Nunito', sans-serif; }
.sd-eps-row { display: flex; gap: 10px; }
.sd-eps-row > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sd-eps-row input { width: 100%; }
#sdAddBtn { padding: 12px; background: #6c7ae0; color: white; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; transition: background 0.2s; font-family: 'Nunito', sans-serif; }
#sdAddBtn:hover { background: #5563cc; }
#sdAddBtn:disabled { background: #aaa; cursor: default; }

/* ── DARK MODE ── */
body.dark {
  background: linear-gradient(145deg, #0f1117 0%, #161822 50%, #1a1c2e 100%);
  color: #f0f0f8;
}
body.dark::before { background: radial-gradient(circle, rgba(108,122,224,0.12) 0%, transparent 70%); }
body.dark::after  { background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%); }
body.dark .sidebar { background: rgba(15,17,28,0.7); border-right-color: rgba(255,255,255,0.05); }
body.dark .sidebar-divider { background: rgba(255,255,255,0.07); }
body.dark .perfil { background: rgba(20,22,38,0.75); border-color: rgba(255,255,255,0.06); }
body.dark .perfil-text h2 { color: #e8e8f8; }
body.dark .perfil-avatar-ring img { border-color: #0f1117; }
body.dark .categoria { background: rgba(20,22,38,0.7); border-color: rgba(255,255,255,0.06); }
body.dark .categoria h3 { color: #e0e0f0; }
body.dark .lista-empty { border-color: rgba(108,122,224,0.15); color: #555577; }
body.dark .lista-empty:hover { border-color: rgba(108,122,224,0.35); color: #6c7ae0; }
body.dark .card { border-color: rgba(255,255,255,0.08); }
body.dark .modal { background: rgba(20,22,38,0.97); color: #f0f0f8; }
body.dark .modal h2 { color: #e0e0f0; }
body.dark .modal-field input, body.dark .modal-field select { background: #1e2035; color: #e0e0f0; border-color: #2a2d48; }
body.dark .modal-field label { color: #6c7ae0; }
body.dark #fechar { background: #1e2035; color: #aaa; }
body.dark #fechar:hover { background: #252840; }
body.dark .edit-capa-input { background: #1e2035; color: #e0e0f0; border-color: #2a2d48; }
body.dark .detalhe-edit-nota { color: #a78bfa; }
body.dark .edit-data-label { color: #6068a0; }
body.dark .filter-btn { background: rgba(108,122,224,0.2); color: #a78bfa; }
body.dark .filter-btn:hover { background: rgba(108,122,224,0.35); }
body.dark .filter-btn[data-order="antigos"] { background: rgba(167,139,250,0.25); color: #c4b5fd; }
body.dark .search-panel, body.dark .search-detail-panel { background: rgba(20,22,38,0.98); color: #f1f1f1; }
body.dark .search-header { border-bottom-color: rgba(255,255,255,0.07); }
body.dark .search-header input { color: #f1f1f1; }
body.dark .search-result-item { background: rgba(30,32,50,0.9); }
body.dark .search-result-item:hover { background: rgba(40,43,65,0.9); }
body.dark .r-title { color: #eee; }
body.dark .sd-desc { background: #1e2035; color: #ccc; }
body.dark .sd-add-section select, body.dark .sd-add-section input { background: #1e2035; color: white; border-color: #2a2d48; }

/* ========================= */
/* SETTINGS                  */
/* ========================= */
/* ══════════════════════════════════════
   CONFIGURAÇÕES — NOVO DESIGN
══════════════════════════════════════ */

#paginaSettings {
  display: none; flex: 1;
  flex-direction: column;
  overflow-y: auto;
}

/* ── Wrapper geral ── */
.cfg-wrap {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: settingsFadeIn 0.3s ease;
}
@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header de conta ── */
.cfg-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(108,122,224,0.12);
}
/* Profile row: avatar + name side by side (flex on desktop, wraps on mobile) */
.cfg-header-profile-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

/* Avatar clicável para trocar foto */
.cfg-header-avatar-wrap {
  position: relative;
  width: 72px; height: 72px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
}
.cfg-header-avatar-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  padding: 3px;
  box-shadow: 0 4px 20px rgba(108,122,224,0.35);
  transition: box-shadow 0.2s;
}
.cfg-header-avatar-ring img {
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  border: 2.5px solid white; display: block;
  transition: filter 0.2s;
}
.cfg-avatar-overlay {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.cfg-avatar-overlay svg { width: 22px; height: 22px; color: white; }
.cfg-header-avatar-wrap:hover .cfg-avatar-overlay { opacity: 1; }
.cfg-header-avatar-wrap:hover .cfg-header-avatar-ring { box-shadow: 0 6px 24px rgba(108,122,224,0.55); }

/* Nome editável inline */
.cfg-header-info { flex: 1; }
.cfg-name-wrap {
  display: flex; align-items: center; gap: 6px;
  position: relative;
}
.cfg-header-name-input {
  font-size: 22px; font-weight: 900;
  color: #2d2f4a; letter-spacing: -0.4px;
  font-family: 'Nunito', sans-serif;
  border: none; outline: none; background: transparent;
  width: 100%; padding: 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  cursor: text;
}
.cfg-header-name-input:focus {
  border-bottom-color: #6c7ae0;
}
.cfg-header-name-input::placeholder { color: #c0c4d8; }
body.dark .cfg-header-name-input { color: #e0e0f0; }
body.dark .cfg-header-name-input::placeholder { color: #3a3d58; }
body.dark .cfg-header-name-input:focus { border-bottom-color: #a78bfa; }

.cfg-name-edit-icon {
  flex-shrink: 0; opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cfg-name-edit-icon svg { width: 14px; height: 14px; color: #6c7ae0; }
.cfg-name-wrap:focus-within .cfg-name-edit-icon { opacity: 0.9; }

.cfg-header-sub {
  font-size: 13px; color: #9095b8;
  font-weight: 600; margin: 3px 0 0;
}

/* Botão salvar no header */
.cfg-save-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  font-size: 14px;
  transition: opacity 0.18s, transform 0.15s, background 0.3s !important;
}
.cfg-save-btn.cfg-btn--saved {
  background: linear-gradient(135deg, #34d399, #059669) !important;
}

/* Modal para URL avançada */
.cfg-photo-modal {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(108,122,224,0.18);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(108,122,224,0.15);
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: -16px;
}
.cfg-photo-modal.visible { display: flex; animation: settingsFadeIn 0.2s ease; }
body.dark .cfg-photo-modal {
  background: rgba(20,22,38,0.95);
  border-color: rgba(108,122,224,0.25);
}
.cfg-photo-modal-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: #9095b8; margin: 0;
  font-family: 'Nunito', sans-serif;
}
.cfg-photo-modal-row { display: flex; gap: 8px; align-items: center; }
.cfg-photo-modal-row .cfg-input { flex: 1; padding: 8px 12px; background: rgba(108,122,224,0.06); border-radius: 8px; border: 1px solid rgba(108,122,224,0.15); }
body.dark .cfg-photo-modal-row .cfg-input { background: rgba(108,122,224,0.12); border-color: rgba(108,122,224,0.25); color: #e0e0f0; }
.cfg-photo-modal-close {
  font-size: 12px; color: #9095b8; background: none; border: none;
  cursor: pointer; font-family: 'Nunito', sans-serif; font-weight: 600;
  text-align: left; padding: 0;
}
.cfg-photo-modal-close:hover { color: #6c7ae0; }

/* Divider dentro do card */
.cfg-divider {
  height: 1px; background: rgba(0,0,0,0.05);
  margin: 0 18px;
}
body.dark .cfg-divider { background: rgba(255,255,255,0.05); }

/* Espaço interno nos cards de dados */
.cfg-data-card { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }

/* ── Footer da página de configurações ── */
.cfg-page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 0 8px;
  border-top: 1px solid rgba(108,122,224,0.08);
  margin-top: 8px;
}
body.dark .cfg-page-footer { border-top-color: rgba(255,255,255,0.05); }

.cfg-page-footer-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #b0b5cc;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  margin: 0;
  text-align: center;
}
.cfg-page-footer-hint svg {
  width: 14px; height: 14px;
  flex-shrink: 0;
  color: #c0c4d8;
}
.cfg-page-footer-hint strong { color: #8890b8; font-weight: 800; }
body.dark .cfg-page-footer-hint { color: #4a4d68; }
body.dark .cfg-page-footer-hint svg { color: #3a3d58; }
body.dark .cfg-page-footer-hint strong { color: #5a5d7a; }

/* Link discreto de voltar */
.cfg-back-link {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: #c0c4d8; font-family: 'Nunito', sans-serif;
  font-weight: 600; padding: 5px 10px; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.cfg-back-link:hover { color: #6c7ae0; background: rgba(108,122,224,0.07); }
body.dark .cfg-back-link { color: #3a3d58; }
body.dark .cfg-back-link:hover { color: #a78bfa; background: rgba(108,122,224,0.1); }

/* ── Aviso de importação ── */
.cfg-import-warn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  font-family: 'Nunito', sans-serif;
  line-height: 1.4;
}
.cfg-import-warn svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: #d97706;
}
body.dark .cfg-import-warn {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.2);
  color: #fbbf24;
}
body.dark .cfg-import-warn svg { color: #f59e0b; }

/* ── Botão de importar (âmbar/laranja sutil) ── */
.cfg-btn--warn {
  background: rgba(245,158,11,0.1);
  color: #92400e;
  border: 1.5px solid rgba(245,158,11,0.3);
}
.cfg-btn--warn:hover { background: rgba(245,158,11,0.18); }
body.dark .cfg-btn--warn {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.28);
}

/* Botão pequeno */
.cfg-btn--sm { padding: 6px 12px; font-size: 12px; }

body.dark .cfg-header { border-bottom-color: rgba(255,255,255,0.07); }
body.dark .cfg-header-avatar-ring img { border-color: #1a1a2e; }

/* Rodapé — agora só o link de voltar, sem botão salvar */
.cfg-footer { display: none; }

/* ── Grade de duas colunas ── */
.cfg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Coluna ── */
.cfg-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Seção com título ── */
.cfg-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cfg-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #9095b8;
  margin: 0;
  font-family: 'Nunito', sans-serif;
}
body.dark .cfg-section-title { color: #5a5d7a; }

/* ── Card base ── */
.cfg-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(108,122,224,0.07);
  overflow: hidden;
}
body.dark .cfg-card {
  background: rgba(25,27,42,0.75);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* ── Linha de campo de texto ── */
.cfg-row {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  gap: 5px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.cfg-row:last-child { border-bottom: none; }
body.dark .cfg-row { border-bottom-color: rgba(255,255,255,0.05); }

.cfg-label {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9095b8;
  font-family: 'Nunito', sans-serif;
}
body.dark .cfg-label { color: #5a5d7a; }

.cfg-input {
  border: none; outline: none;
  background: transparent;
  font-size: 15px; font-weight: 600;
  color: #2d2f4a;
  padding: 0;
  width: 100%;
  font-family: 'Nunito', sans-serif;
}
.cfg-input::placeholder { color: #c0c4d8; }
body.dark .cfg-input { color: #e0e0f0; }
body.dark .cfg-input::placeholder { color: #3a3d58; }

.cfg-input-url {
  font-size: 13px;
  color: #6c7ae0;
}
body.dark .cfg-input-url { color: #a78bfa; }

/* Linha de foto com sub-label e botão */
.cfg-row-photo { gap: 8px; }
.cfg-row-photo-labels {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cfg-row-photo-actions { display: flex; gap: 8px; }

.cfg-hint {
  font-size: 11px;
  color: #b0b5cc;
  font-family: 'Nunito', sans-serif;
}
body.dark .cfg-hint { color: #4a4d68; }

/* ── Toggle row ── */
.cfg-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 16px;
}
.cfg-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.cfg-toggle-title {
  font-size: 14px; font-weight: 700;
  color: #2d2f4a;
  font-family: 'Nunito', sans-serif;
}
body.dark .cfg-toggle-title { color: #e0e0f0; }

/* ── Card de dados (exportar / importar) ── */
.cfg-data-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
}
.cfg-data-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cfg-data-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cfg-data-icon svg { width: 18px; height: 18px; }
.cfg-data-icon--export {
  background: rgba(108,122,224,0.12);
  color: #6c7ae0;
}
.cfg-data-icon--import {
  background: rgba(52,211,153,0.12);
  color: #059669;
}
body.dark .cfg-data-icon--export { background: rgba(108,122,224,0.18); color: #a78bfa; }
body.dark .cfg-data-icon--import { background: rgba(52,211,153,0.15); color: #34d399; }

.cfg-data-title {
  font-size: 14px; font-weight: 700;
  color: #2d2f4a; margin: 0 0 1px;
  font-family: 'Nunito', sans-serif;
}
body.dark .cfg-data-title { color: #e0e0f0; }

/* ── Botões ── */
.cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: opacity 0.18s, transform 0.15s, box-shadow 0.18s;
  text-align: center;
  white-space: nowrap;
}
.cfg-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.cfg-btn:active { transform: scale(0.97); }

.cfg-btn--primary {
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  color: white;
  box-shadow: 0 4px 14px rgba(108,122,224,0.35);
}
.cfg-btn--secondary {
  background: rgba(108,122,224,0.1);
  color: #6c7ae0;
  border: 1.5px solid rgba(108,122,224,0.2);
}
.cfg-btn--ghost {
  background: rgba(255,255,255,0.7);
  color: #555;
  border: 1px solid rgba(0,0,0,0.09);
  backdrop-filter: blur(8px);
}
body.dark .cfg-btn--secondary {
  background: rgba(108,122,224,0.15);
  color: #a78bfa;
  border-color: rgba(108,122,224,0.3);
}
body.dark .cfg-btn--ghost {
  background: rgba(255,255,255,0.06);
  color: #aaa;
  border-color: rgba(255,255,255,0.1);
}

/* Galeria btn (reutilizado) */
.galeria-btn {
  font-size: 11px; font-weight: 700;
  font-family: "Nunito", sans-serif;
  padding: 5px 11px; border-radius: 8px;
  border: 1.5px solid rgba(108,122,224,0.3);
  background: rgba(108,122,224,0.07);
  color: #6c7ae0; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.galeria-btn:hover { background: rgba(108,122,224,0.16); transform: scale(1.03); }
body.dark .galeria-btn { border-color: rgba(167,139,250,0.35); background: rgba(167,139,250,0.1); color: #a78bfa; }

/* ── Rodapé agora é só o link de voltar ── */
/* .cfg-footer handled inside new_header_css */

/* Schedule toast (reutilizado) */
.schedule-toast {
  background: rgba(108,122,224,0.08);
  border: 1.5px solid rgba(108,122,224,0.2);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 12px; font-weight: 700;
  color: #6c7ae0;
  display: flex; align-items: center; gap: 8px;
  max-height: 0; overflow: hidden;
  opacity: 0; transform: translateY(-4px);
  transition:
    max-height 0.35s cubic-bezier(0.34,1.56,0.64,1),
    opacity    0.3s ease,
    transform  0.3s ease,
    margin-top 0.3s ease;
  margin-top: 0;
}
.schedule-toast.visible {
  max-height: 60px; opacity: 1;
  transform: translateY(0); margin-top: 4px;
}
body.dark .schedule-toast {
  background: rgba(108,122,224,0.12);
  border-color: rgba(108,122,224,0.25);
  color: #a78bfa;
}
.schedule-toast-icon { font-size: 15px; flex-shrink: 0; }

/* Import success */
.import-success-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(52,211,153,0.1);
  border: 1.5px solid rgba(52,211,153,0.3);
  border-radius: 10px;
  font-size: 12px; font-weight: 700;
  color: #059669;
  animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
body.dark .import-success-badge { color: #34d399; background: rgba(52,211,153,0.08); }
@keyframes badgePop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ══════════════════════════════════════
   TOGGLE SWITCH (dark mode, schedule)
══════════════════════════════════════ */
.toggle-switch { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: #d1d5e0; border-radius: 999px;
  cursor: pointer; transition: background 0.3s;
}
.toggle-track::after {
  content: ''; position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  background: white; border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track { background: #6c7ae0; }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(22px); }
body.dark .toggle-track { background: #2a2d48; }
body.dark .toggle-switch input:checked + .toggle-track { background: #6c7ae0; }

.esconder { display: none !important; }


/* ══════════════════════════════════════
   PÁGINA ESTATÍSTICAS
══════════════════════════════════════ */
#paginaStats {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(160deg, #f0f1fb 0%, #e8eaf6 100%);
  padding: 0;
}
body.dark #paginaStats { background: linear-gradient(160deg, #12141f 0%, #0f1117 100%); }

.stats-container {
  padding: 28px 20px 40px;
  display: flex; flex-direction: column; gap: 16px;
  max-width: 600px; margin: 0 auto; width: 100%;
}

.stats-header { margin-bottom: 4px; }
.stats-titulo {
  font-size: 26px; font-weight: 900;
  color: #2d2f4a; letter-spacing: -0.5px;
}
.stats-sub { font-size: 13px; color: #9095b8; font-weight: 600; margin-top: 2px; }
body.dark .stats-titulo { color: #e0e0f0; }
body.dark .stats-sub { color: #5a5d7a; }

/* Cards base */
.stats-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 24px rgba(108,122,224,0.08);
  padding: 20px;
  animation: fadeUp 0.4s ease both;
}
body.dark .stats-card {
  background: rgba(22,24,42,0.85);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
@keyframes fadeUp {
  from { opacity:0; transform: translateY(16px); }
  to   { opacity:1; transform: translateY(0); }
}
.stats-card:nth-child(2) { animation-delay: 0.05s; }
.stats-card:nth-child(3) { animation-delay: 0.1s; }
.stats-card:nth-child(4) { animation-delay: 0.15s; }
.stats-card:nth-child(5) { animation-delay: 0.2s; }

.stats-card-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.stats-card-icon { font-size: 28px; flex-shrink: 0; }
.stats-card-title {
  font-size: 15px; font-weight: 800; color: #2d2f4a; margin-bottom: 2px;
}
.stats-card-desc { font-size: 12px; color: #9095b8; }
body.dark .stats-card-title { color: #e0e0f0; }

.stats-empty { font-size: 13px; color: #b0b4cc; text-align: center; padding: 12px 0; }

/* Animes do mês */
.stats-mes-lista { display: flex; flex-direction: column; gap: 10px; }
.stats-mes-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(108,122,224,0.05);
  border-radius: 14px;
  border: 1px solid rgba(108,122,224,0.1);
}
.stats-mes-item img {
  width: 36px; height: 52px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.stats-mes-info { flex: 1; min-width: 0; }
.stats-mes-info strong {
  display: block; font-size: 13px; font-weight: 800;
  color: #2d2f4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stats-mes-info span { font-size: 11px; color: #9095b8; }
.stats-mes-nota { font-size: 12px; font-weight: 700; color: #6c7ae0; flex-shrink: 0; }
body.dark .stats-mes-item { background: rgba(108,122,224,0.08); border-color: rgba(108,122,224,0.15); }
body.dark .stats-mes-info strong { color: #e0e0f0; }

/* Gêneros */
.stats-generos { display: flex; flex-direction: column; gap: 10px; }
.stats-genero-row { display: flex; align-items: center; gap: 10px; }
.stats-genero-nome {
  font-size: 12px; font-weight: 700; color: #2d2f4a;
  width: 90px; flex-shrink: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stats-genero-bar-wrap {
  flex: 1; height: 10px; border-radius: 99px;
  background: rgba(108,122,224,0.1); overflow: hidden;
}
.stats-genero-bar {
  height: 100%; border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1);
  animation: barGrow 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes barGrow { from { width: 0 !important; } }
.stats-genero-count {
  font-size: 11px; font-weight: 800; color: #9095b8;
  width: 20px; text-align: right; flex-shrink: 0;
}
body.dark .stats-genero-nome { color: #d0d0e8; }
body.dark .stats-genero-bar-wrap { background: rgba(108,122,224,0.15); }

/* Duração */
.stats-card-highlight {
  background: linear-gradient(135deg, rgba(108,122,224,0.12) 0%, rgba(167,139,250,0.08) 100%);
  border-color: rgba(108,122,224,0.2);
  text-align: center;
}
.stats-duracao-icon { font-size: 48px; margin-bottom: 10px; }
.stats-duracao-texto {
  font-size: 15px; color: #2d2f4a; line-height: 1.5; margin-bottom: 6px;
}
.stats-duracao-texto strong { color: #6c7ae0; }
.stats-duracao-exemplos { font-size: 12px; color: #9095b8; }
body.dark .stats-duracao-texto { color: #d0d0e8; }

/* Tempo */
.stats-card-tempo {
  background: linear-gradient(135deg, #1a1c2e 0%, #16182a 100%);
  border-color: rgba(108,122,224,0.3);
  text-align: center; position: relative; overflow: hidden;
}
.stats-card-tempo::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.25) 0%, transparent 70%);
}
.stats-card-tempo::after {
  content: ""; position: absolute; bottom: -30px; left: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,122,224,0.2) 0%, transparent 70%);
}
.stats-tempo-icon { font-size: 40px; margin-bottom: 8px; position: relative; z-index: 1; }
.stats-tempo-label {
  font-size: 12px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px; position: relative; z-index: 1; line-height: 1.4;
}
.stats-tempo-valor {
  font-size: 28px; font-weight: 900; color: #ffffff;
  letter-spacing: -0.5px; margin-bottom: 6px;
  position: relative; z-index: 1;
}
.stats-tempo-eps { font-size: 11px; color: rgba(255,255,255,0.35); position: relative; z-index: 1; }

/* sidebar svg icons now use stroke via currentColor */

/* ── Busca local ── */
.busca-local-wrap { margin-bottom: 20px; }
.busca-local-inner {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 0 14px; gap: 10px;
  box-shadow: 0 4px 16px rgba(108,122,224,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.busca-local-inner:focus-within {
  border-color: rgba(108,122,224,0.5);
  box-shadow: 0 4px 20px rgba(108,122,224,0.15);
}
.busca-local-icon { flex-shrink: 0; display: flex; align-items: center; }
.busca-local-icon svg { width: 16px; height: 16px; fill: #9095b8; transition: fill 0.2s; }
.busca-local-inner:focus-within .busca-local-icon svg { fill: #6c7ae0; }
#buscaLocal {
  flex: 1; border: none; background: transparent;
  font-family: "Nunito", sans-serif;
  font-size: 14px; font-weight: 600;
  color: #2d2f4a; outline: none; padding: 13px 0;
}
#buscaLocal::placeholder { color: #b0b4cc; font-weight: 500; }
.busca-local-clear {
  display: none; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: #d0d3e8;
  color: #6c7ae0; font-size: 10px; font-weight: 900;
  cursor: pointer; flex-shrink: 0; transition: background 0.2s;
}
.busca-local-clear:hover { background: #b8bcda; }
body.dark .busca-local-inner { background: rgba(30,32,50,0.8); border-color: rgba(255,255,255,0.08); }
body.dark #buscaLocal { color: #e0e0f0; }
body.dark #buscaLocal::placeholder { color: #4a4d6a; }
body.dark .busca-local-icon svg { fill: #5a5d7a; }
body.dark .busca-local-inner:focus-within .busca-local-icon svg { fill: #a78bfa; }
body.dark .busca-local-clear { background: #2a2d48; color: #a78bfa; }

/* ── Botão compartilhar no modal de detalhe ── */
/* ── Botão compartilhar no card ── */
.card-share-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(108,122,224,0.9);
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
  transform: scale(1);
  transition: background 0.2s, transform 0.15s;
  z-index: 5;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.card-share-btn:hover { background: rgba(167,139,250,0.95); transform: scale(1.12); }
/* No desktop some quando não está em hover no card para não poluir */
@media (hover: hover) {
  .card-share-btn { opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s, background 0.2s; }
  .card:hover .card-share-btn { opacity: 1; transform: scale(1); }
}

/* ── Share overlay ── */
#shareOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 500;
}
.share-panel {
  background: rgba(255,255,255,0.97);
  border-radius: 28px 28px 0 0;
  width: 100%; max-width: 520px;
  padding: 12px 24px 40px;
  animation: sheetUp 0.3s ease;
  position: relative;
}
.share-panel::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.share-close {
  position: absolute; top: 20px; right: 20px;
  background: #f0f1f8; border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px;
  cursor: pointer; color: #666;
  display: flex; align-items: center; justify-content: center;
}
.share-anime-preview {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0 16px; border-bottom: 1px solid #eee; margin-bottom: 16px;
}
.share-anime-preview img {
  width: 48px; height: 68px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); flex-shrink: 0;
}
.share-anime-preview-info strong {
  display: block; font-size: 15px; font-weight: 800; color: #2d2f4a;
}
.share-anime-preview-info span {
  font-size: 13px; color: #6c7ae0; font-weight: 700;
}
.share-title {
  font-size: 18px; font-weight: 800; color: #2d2f4a; margin-bottom: 4px;
}
.share-sub {
  font-size: 13px; color: #9095b8; margin-bottom: 18px;
}
.share-options { display: flex; flex-direction: column; gap: 10px; }
.share-opt-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid #eee; background: #f7f7fb;
  cursor: pointer; text-align: left;
  font-family: 'Nunito', sans-serif;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.share-opt-btn:hover { background: #eeeef8; border-color: rgba(108,122,224,0.3); transform: translateX(3px); }
.share-opt-story { border-color: rgba(108,122,224,0.2); background: rgba(108,122,224,0.04); }
.share-opt-story:hover { background: rgba(108,122,224,0.1); border-color: rgba(108,122,224,0.4); }
.share-opt-xpost { border-color: rgba(0,0,0,0.15); background: rgba(0,0,0,0.03); }
.share-opt-xpost:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.3); }
.share-opt-xpost .share-opt-icon { font-family: serif; font-weight: 900; font-size: 20px; }
.share-opt-icon { font-size: 28px; flex-shrink: 0; }
.share-opt-text { flex: 1; }
.share-opt-text strong { display: block; font-size: 14px; font-weight: 800; color: #2d2f4a; }
.share-opt-text span { font-size: 12px; color: #9095b8; }
.share-opt-arrow { font-size: 20px; color: #c0c3e0; flex-shrink: 0; }

/* dark mode share */
body.dark .share-panel { background: rgba(20,22,38,0.98); }
body.dark .share-title { color: #e0e0f0; }
body.dark .share-sub { color: #6c6c8a; }
body.dark .share-anime-preview { border-bottom-color: rgba(255,255,255,0.08); }
body.dark .share-anime-preview-info strong { color: #e0e0f0; }
body.dark .share-opt-btn { background: rgba(30,32,50,0.9); border-color: rgba(255,255,255,0.08); }
body.dark .share-opt-btn:hover { background: rgba(40,43,65,0.9); }
body.dark .share-opt-text strong { color: #e0e0f0; }
body.dark .share-close { background: #1e2035; color: #aaa; }

/* ── Story Preview Overlay ── */
#storyPreviewOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 600;
  padding: 20px;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.story-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.story-preview-close {
  position: fixed; top: 16px; right: 16px;
  background: rgba(255,255,255,0.15); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  color: white; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.story-card-wrap {
  /* Altura fixa baseada na viewport para garantir que aparece */
  height: calc(100vh - 160px);
  max-height: 640px;
  width: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  flex-shrink: 0;
}

/* ── Story Card (a imagem em si) ── */
.story-card {
  /* largura calculada a partir da altura para manter 9:16 */
  height: 100%;
  width: calc((100vh - 160px) * 9 / 16);
  max-width: calc(640px * 9 / 16);
  background: linear-gradient(160deg, #1a1c2e 0%, #16182a 50%, #0f1117 100%);
  position: relative;
  overflow: hidden;
  font-family: "Nunito", sans-serif;
}

/* Orbs decorativos */
.story-card::before {
  content: "";
  position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.3) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.story-card::after {
  content: "";
  position: absolute; bottom: -60px; left: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,122,224,0.25) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Header Okiru */
.story-header {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; z-index: 10;
  padding: 14px 0 12px;
  background: rgba(15,17,23,0.5);
  backdrop-filter: blur(8px);
}
.story-header-icon { font-size: 18px; }
.story-header-name {
  font-size: 18px; font-weight: 800;
  color: white; letter-spacing: 0.5px;
}

/* Capa */
.story-capa-wrap {
  position: absolute; top: 0; left: 0; right: 0;
  height: 58%;
  z-index: 1;
}
.story-capa-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.story-capa-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 70%;
  background: linear-gradient(to bottom, transparent 0%, #0f1117 100%);
}

/* Conteúdo textual */
.story-content {
  position: absolute;
  bottom: 52px; left: 0; right: 0;
  padding: 0 20px;
  z-index: 5;
}
.story-anime-nome {
  font-size: 26px; font-weight: 900;
  color: #ffffff; line-height: 1.15;
  margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.story-meta {
  font-size: 11px; color: #a78bfa;
  font-weight: 700; margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.story-avaliacao {
  font-size: 15px; color: rgba(255,255,255,0.9);
  margin-bottom: 4px;
}
.story-avaliacao strong { color: #ffffff; font-size: 17px; }
.story-estrelas {
  font-size: 20px; letter-spacing: 2px;
  margin-bottom: 10px; color: #f59e0b;
}
.story-sinopse {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}

/* Rodapé */
.story-footer {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center; z-index: 5;
  font-size: 13px; font-weight: 800;
  color: rgba(108,122,224,0.7);
  letter-spacing: 1px;
}

/* Botão baixar */
.story-download-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  color: white; border: none; border-radius: 16px;
  font-size: 16px; font-weight: 800;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(108,122,224,0.45);
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.story-download-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.story-hint {
  font-size: 12px; color: rgba(255,255,255,0.4);
  font-family: "Nunito", sans-serif;
  margin: 0;
}

/* ── X Post Preview Overlay ── */
#xPostPreviewOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 600;
  padding: 20px;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.xpost-card-wrap {
  /* Proporção 1004:1743 ≈ 9:15.63 — altura baseada na viewport */
  height: calc(100vh - 160px);
  max-height: 640px;
  width: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  flex-shrink: 0;
}
.xpost-card {
  height: 100%;
  /* largura = altura * (1004/1743) */
  width: calc((100vh - 160px) * 1004 / 1743);
  max-width: calc(640px * 1004 / 1743);
  background: linear-gradient(160deg, #1a1c2e 0%, #16182a 50%, #0f1117 100%);
  position: relative;
  overflow: hidden;
  font-family: "Nunito", sans-serif;
}
.xpost-card::before {
  content: "";
  position: absolute; top: -80px; right: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.3) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.xpost-card::after {
  content: "";
  position: absolute; bottom: -60px; left: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,122,224,0.25) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.xpost-badge {
  position: absolute; top: 16px; right: 14px; z-index: 15;
  font-size: 16px; font-weight: 900; color: rgba(255,255,255,0.8);
  font-family: serif;
}

/* ── Toast ── */
#toastMsg {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,22,38,0.92);
  color: white; font-size: 14px; font-weight: 700;
  font-family: 'Nunito', sans-serif;
  padding: 12px 24px; border-radius: 99px;
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
#toastMsg.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════ */
@media (max-width: 768px) {
  body { flex-direction: column; height: 100dvh; overflow: hidden; }

  /* ─── Sidebar → bottom nav bar ─── */
  .sidebar {
    width: 100%; height: calc(64px + env(safe-area-inset-bottom, 0px));
    flex-direction: row; order: 2;
    padding: 0 4px env(safe-area-inset-bottom, 0px); gap: 0;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.55);
    justify-content: space-around; align-items: flex-start;
    padding-top: 6px;
    /* Reset transitions que atrapalham no mobile */
    transition: none;
    overflow: visible;
  }
  /* Ocultar elementos que não pertencem à nav bar mobile */
  .sidebar-brand    { display: none !important; }
  .sidebar-divider  { display: none !important; }
  .sidebar-spacer   { display: none !important; }
  .sidebar-toggle-btn { display: none !important; }
  /* Ocultar bloco do usuário da nav mobile — configurações já está no ícone */
  .sidebar-user-block { display: none !important; }
  /* Nav: itens ficam em linha */
  .sidebar-nav {
    display: contents !important;
    padding: 0 !important;
  }
  .icon-label { display: none !important; }
  .icon {
    width: 52px; height: 52px; border-radius: 16px;
    padding: 0; margin: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 0;
    /* Reset collapse transitions */
    transition: background 0.2s !important;
    max-width: unset; opacity: 1 !important;
  }
  .icon-svg svg { width: 22px; height: 22px; }
  .icon.active::after {
    right: auto; bottom: -1px; left: 50%; top: auto;
    transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 2px 2px 0 0;
  }
  #btnSettings { margin: 0 !important; }

  /* ─── Main container ─── */
  .container { flex: 1; order: 1; padding: 20px 16px 16px; overflow-y: auto; height: calc(100dvh - 64px); }
  .perfil { flex-direction: column; text-align: center; gap: 12px; padding: 18px 16px; margin-bottom: 20px; }
  .perfil-stats { justify-content: center; gap: 28px; }
  .perfil-text p { display: none; }
  .categoria { padding: 16px; border-radius: 20px; margin-bottom: 16px; }
  .categoria h3 { font-size: 14px; }
  .card { width: 112px; aspect-ratio: 2 / 3; }
  .card-title { font-size: 11px; }
  .btn-add { bottom: 76px; right: 18px; width: 52px; height: 52px; font-size: 24px; }

  /* ─── Modais ─── */
  .modal-overlay, .modal-detalhe-overlay { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: 24px 24px 0 0; padding: 24px 20px 32px; animation: sheetUp 0.3s ease; max-height: 90dvh; overflow-y: auto; }
  .modal::before { content: ''; display: block; width: 40px; height: 4px; background: rgba(0,0,0,0.12); border-radius: 2px; margin: 0 auto 18px; }
  .modal-detalhe { width: 100%; border-radius: 24px 24px 0 0; animation: sheetUp 0.3s ease; max-height: 92dvh; padding: 0; }
  .detalhe-hero { border-radius: 24px 24px 0 0; height: 220px; }
  .detalhe-body { padding: 14px 16px 20px; gap: 14px; }
  /* Dropdown menu: full-width no mobile */
  .dt-menu-dropdown { right: 8px; min-width: 180px; border-radius: 14px; }
  /* Inputs de ep: touch-friendly */
  .eps-input-field input { width: 64px; font-size: 17px; padding: 10px 4px; }
  /* Confirmação de exclusão */
  .dt-confirm-modal { padding: 24px 18px 18px; border-radius: 18px; }
  @keyframes sheetUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  #searchOverlay { padding-top: 0; align-items: flex-end; }
  .search-panel { width: 100%; border-radius: 24px 24px 0 0; max-height: 88dvh; animation: sheetUp 0.3s ease; }
  .search-panel::before { content: ''; display: block; width: 40px; height: 4px; background: rgba(0,0,0,0.12); border-radius: 2px; margin: 14px auto 0; flex-shrink: 0; }
  #searchDetailOverlay { align-items: flex-end; }
  .search-detail-panel { width: 100%; border-radius: 24px 24px 0 0; max-height: 92dvh; animation: sheetUp 0.3s ease; }
  .filter-btn { font-size: 10px; padding: 3px 8px; }
  .modal-field-row { flex-direction: column; gap: 0; }
  .sd-eps-row { flex-direction: column; }

  /* ═══════════════════════════════════════
     CONFIGURAÇÕES — MOBILE
  ═══════════════════════════════════════ */

  /* Página ocupa espaço livre acima da nav bar */
  #paginaSettings {
    padding: 0;
    overflow-y: auto;
    height: calc(100dvh - calc(64px + env(safe-area-inset-bottom, 0px)));
  }

  /* Wrapper sem padding extra — as seções têm padding próprio */
  .cfg-wrap { padding: 0 0 56px; gap: 0; max-width: 100%; }

  /* ── Header sticky no topo ──
     Avatar + nome em linha, botão Salvar em linha completa abaixo */
  .cfg-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px 16px;
    border-bottom: 1px solid rgba(108,122,224,0.1);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky; top: 0; z-index: 10;
  }
  body.dark .cfg-header {
    background: rgba(18,20,34,0.85);
  }

  /* Linha: avatar + nome */
  .cfg-header-profile-row { gap: 14px; }
  .cfg-header-avatar-wrap  { width: 50px; height: 50px; }
  .cfg-header-avatar-ring  { width: 50px; height: 50px; }
  .cfg-header-name-input   { font-size: 17px; }
  .cfg-header-sub          { font-size: 12px; margin-top: 1px; }

  /* Botão Salvar — largura total */
  .cfg-save-btn {
    width: 100%; padding: 13px;
    font-size: 15px; border-radius: 13px;
  }

  /* ── Grade de seções: coluna única ── */
  .cfg-grid { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .cfg-col  { gap: 0; }

  /* ── Seções com título ── */
  .cfg-section { padding: 20px 16px 4px; gap: 0; }
  .cfg-section-title { margin-bottom: 8px; padding-left: 2px; }

  /* ── Cards ── */
  .cfg-card {
    border-radius: 14px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: none;
  }
  body.dark .cfg-card { background: rgba(25,27,44,0.9); }

  /* Linhas e toggles com área de toque generosa */
  .cfg-row        { padding: 14px 16px; gap: 6px; }
  .cfg-toggle-row { padding: 14px 16px; min-height: 52px; }
  .cfg-data-card  { padding: 14px 16px; gap: 12px; }

  /* Impede zoom automático no iOS ao focar input */
  .cfg-input { font-size: 16px; }
  .cfg-label { font-size: 10px; }

  /* Linha de foto: empilha labels */
  .cfg-row-photo        { gap: 10px; }
  .cfg-row-photo-labels { flex-direction: column; gap: 1px; }

  /* ── Toggle switch: bolinha maior para toque ── */
  .toggle-switch { width: 50px; height: 28px; }
  .toggle-track::after { width: 22px; height: 22px; left: 3px; top: 3px; }
  .toggle-switch input:checked + .toggle-track::after { transform: translateX(22px); }

  /* ── Cards de dados (exportar/importar) ── */
  .cfg-data-icon { width: 34px; height: 34px; border-radius: 10px; }
  .cfg-data-icon svg { width: 16px; height: 16px; }
  .cfg-data-title { font-size: 14px; }

  /* Botões de ação: largura total */
  .cfg-btn--secondary,
  .cfg-btn--warn {
    width: 100%; padding: 12px 16px;
    justify-content: center; font-size: 14px;
  }
  /* Manter "Editar URL" compacto */
  .cfg-btn--sm { width: auto; padding: 7px 14px; }

  /* Aviso de importação */
  .cfg-import-warn { font-size: 12px; padding: 10px 12px; }

  /* ── Modal de URL de foto ── */
  .cfg-photo-modal { border-radius: 12px; padding: 14px 16px; margin: 0 0 10px; }
  .cfg-photo-modal-row { flex-direction: column; gap: 8px; }
  .cfg-photo-modal-row .cfg-btn--secondary { width: 100%; }

  /* ── Divider dentro de card ── */
  .cfg-divider { margin: 0 16px; }

  /* ── Footer ── */
  .cfg-page-footer {
    padding: 24px 16px 10px; gap: 10px;
    border-top-color: rgba(108,122,224,0.06);
  }
  .cfg-page-footer-hint {
    font-size: 11px; flex-wrap: wrap; justify-content: center; text-align: center;
  }
  .cfg-back-link { font-size: 12px; padding: 8px 16px; }
}

@media (max-width: 420px) {
  .container { padding: 16px 12px 12px; }
  .perfil { padding: 14px 12px; gap: 10px; }
  .perfil-avatar-ring { width: 52px; height: 52px; }
  .perfil-text h2 { font-size: 15px; }
  .stat-item .num { font-size: 17px; }
  .stat-item .lbl { font-size: 10px; }
  .perfil-stats { gap: 18px; }
  .categoria { padding: 14px 12px; }
  .card { width: 100px; aspect-ratio: 2 / 3; }
  .card-title { font-size: 10px; }
  .card-badge { font-size: 9px; }
  .btn-add { right: 14px; bottom: 80px; width: 48px; height: 48px; font-size: 22px; }
  .modal { padding: 20px 16px 28px; }
}

@media (hover: none) {
  .card:hover { transform: none; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
  .icon:hover { transform: none; background: transparent; }
  .search-result-item:hover { transform: none; }
  .btn-add:hover { transform: none; }
  .lista { cursor: default; }
}

/* ══════════════════════════════════════════
   EXPORTAR / IMPORTAR DADOS — settings cards
   Cole no final do style.css
══════════════════════════════════════════ */

/* ── Card de dados ── */
  to   { transform: scale(1);    opacity: 1; }
}
/* ── Link mangá na sidebar ── */
a.icon {
  text-decoration: none;
  color: inherit;
}
a.icon svg,
a.icon svg * { fill: none; }

/* ── Galeria no modal de adicionar ── */
.modal-field-header {
  display: flex; align-items: center; justify-content: space-between;
}
/* ── Stats: Dados Salvos ── */
.stats-storage-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.stats-storage-valor {
  font-size: 28px;
  font-weight: 900;
  color: #6c7ae0;
  line-height: 1;
}
body.dark .stats-storage-valor { color: #a78bfa; }
.stats-storage-de {
  font-size: 12px;
  color: #9095b8;
}
.stats-storage-bar-total-wrap {
  width: 100%;
  height: 8px;
  background: rgba(108,122,224,0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}
.stats-storage-bar-total {
  height: 100%;
  background: linear-gradient(90deg, #6c7ae0, #a78bfa);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 2px;
}
.stats-storage-pct {
  font-size: 11px;
  color: #9095b8;
  margin-bottom: 14px;
}
.stats-storage-itens {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-storage-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stats-storage-label {
  font-size: 12px;
  color: #6b7280;
  width: 130px;
  flex-shrink: 0;
}
body.dark .stats-storage-label { color: #9095b8; }
.stats-storage-size {
  font-size: 12px;
  font-weight: 700;
  color: #6c7ae0;
  white-space: nowrap;
}
body.dark .stats-storage-size { color: #a78bfa; }

/* ══════════════════════════════════════
   PRÓXIMAS TEMPORADAS
══════════════════════════════════════ */
.proximas-wrap {
  background: rgba(255,255,255,0.52);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 24px;
  margin-bottom: 22px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(108,122,224,0.08);
  animation: fadeSlideIn 0.4s ease both;
  animation-delay: 0.02s;
}
body.dark .proximas-wrap {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.07);
}

/* Header */
.proximas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.proximas-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.proximas-icon { font-size: 26px; flex-shrink: 0; }
.proximas-titulo {
  font-size: 15px;
  font-weight: 800;
  color: #2d2f4a;
  line-height: 1.2;
}
body.dark .proximas-titulo { color: #e0e0f0; }
.proximas-sub {
  font-size: 12px;
  color: #9095b8;
  margin-top: 2px;
  font-weight: 600;
}
body.dark .proximas-sub { color: #6b6f9a; }

.proximas-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.proximas-corpo {
  overflow: hidden;
  max-height: 9999px;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
  opacity: 1;
}
.proximas-corpo-fechado {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.proximas-fechar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(108,122,224,0.08);
  color: #9095b8;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.proximas-fechar:hover  { background: rgba(196,92,74,0.12); color: #c45c4a; transform: scale(1.1); }
.proximas-fechar:active { transform: scale(0.93); }
body.dark .proximas-fechar { background: rgba(255,255,255,0.06); color: #6b6f9a; }
body.dark .proximas-fechar:hover { background: rgba(196,92,74,0.15); color: #e07060; }
.proximas-btn {
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(108,122,224,0.35);
  transition: opacity 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.proximas-btn:hover  { opacity: 0.88; transform: translateY(-1px); }
.proximas-btn:active { transform: scale(0.97); }
.proximas-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* Loading */
.proximas-loading {
  margin-top: 18px;
}
.proximas-loading-bar {
  width: 100%;
  height: 5px;
  background: rgba(108,122,224,0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}
.proximas-loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6c7ae0, #a78bfa);
  border-radius: 99px;
  transition: width 0.5s ease;
}
.proximas-loading-texto {
  font-size: 12px;
  color: #9095b8;
  font-weight: 600;
  text-align: center;
}
body.dark .proximas-loading-texto { color: #6b6f9a; }

/* Resultados */
.proximas-resultados {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card de resultado */
.proximas-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 10px rgba(108,122,224,0.07);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: fadeSlideIn 0.35s ease both;
}
.proximas-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,122,224,0.15);
}
body.dark .proximas-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

.proximas-card-capa {
  width: 48px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.proximas-card-info { flex: 1; min-width: 0; }
.proximas-card-original {
  font-size: 11px;
  color: #9095b8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
body.dark .proximas-card-original { color: #6b6f9a; }
.proximas-card-nome {
  font-size: 14px;
  font-weight: 800;
  color: #2d2f4a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}
body.dark .proximas-card-nome { color: #e0e0f0; }

/* Pills de status */
.proximas-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.proximas-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.proximas-pill-airing {
  background: rgba(52,211,153,0.15);
  color: #059669;
  border: 1px solid rgba(52,211,153,0.3);
}
body.dark .proximas-pill-airing { background: rgba(52,211,153,0.1); color: #34d399; border-color: rgba(52,211,153,0.2); }
.proximas-pill-upcoming {
  background: rgba(108,122,224,0.12);
  color: #6c7ae0;
  border: 1px solid rgba(108,122,224,0.25);
}
body.dark .proximas-pill-upcoming { background: rgba(167,139,250,0.1); color: #a78bfa; border-color: rgba(167,139,250,0.2); }
.proximas-pill-date {
  background: rgba(245,158,11,0.1);
  color: #b45309;
  border: 1px solid rgba(245,158,11,0.25);
}
body.dark .proximas-pill-date { background: rgba(245,158,11,0.08); color: #f59e0b; border-color: rgba(245,158,11,0.2); }

.proximas-card-arrow {
  font-size: 18px;
  color: #c5c8e8;
  flex-shrink: 0;
}
body.dark .proximas-card-arrow { color: #3a3d5a; }

/* Vazio */
.proximas-vazio {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9095b8;
  font-weight: 600;
  padding: 14px 0 2px;
}
.proximas-vazio-icon { font-size: 20px; }
body.dark .proximas-vazio { color: #6b6f9a; }

/* Rodapé */
.proximas-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(108,122,224,0.08);
  padding-top: 12px;
  font-size: 11px;
  color: #b0b3d1;
  font-weight: 600;
}
body.dark .proximas-footer { border-color: rgba(255,255,255,0.05); color: #4a4d6a; }
.proximas-atualizar {
  background: none;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #6c7ae0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.proximas-atualizar:hover { background: rgba(108,122,224,0.08); }
body.dark .proximas-atualizar { color: #a78bfa; }

/* ══════════════════════════════════════
   SHARE STEP 2 — Seleção de Badges
══════════════════════════════════════ */

/* Botão voltar */
.share-step2-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #6c7ae0;
  cursor: pointer;
  padding: 0 0 12px 0;
  opacity: 0.8;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.share-step2-back:hover { opacity: 1; }
body.dark .share-step2-back { color: #a78bfa; }

/* Lista de badges */
.share-badge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 18px;
}

/* Mensagem quando não há badges */
.share-badge-empty {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  color: #9095b8;
  text-align: center;
  padding: 18px 0 6px;
}

/* Item — label clicável inteiro */
.share-badge-item {
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.share-badge-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}

/* Card interno */
.share-badge-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid rgba(108, 122, 224, 0.15);
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.share-badge-item:active .share-badge-item-inner {
  transform: scale(0.98);
}
.share-badge-item input:checked ~ .share-badge-item-inner {
  border-color: rgba(108, 122, 224, 0.55);
  background: rgba(108, 122, 224, 0.07);
}

body.dark .share-badge-item-inner {
  background: rgba(255,255,255,0.04);
  border-color: rgba(167,139,250,0.12);
}
body.dark .share-badge-item input:checked ~ .share-badge-item-inner {
  background: rgba(108,122,224,0.12);
  border-color: rgba(167,139,250,0.4);
}

/* Imagem da badge */
.share-badge-item-img {
  width: 44px;
  height: 44px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  box-shadow: none;
  background: transparent;
  flex-shrink: 0;
}

/* Formato redondo */
.share-badge-item-img.badge--redondo {
  border-radius: 50%;
  border: 2.5px solid rgba(167, 139, 250, 0.6);
  box-shadow: 0 4px 12px rgba(108, 122, 224, 0.3);
  object-fit: cover;
}

/* Texto */
.share-badge-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.share-badge-item-info strong {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #2d2f4a;
}
.share-badge-item-info span {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  color: #9095b8;
  line-height: 1.4;
}
body.dark .share-badge-item-info strong { color: #e0e0f0; }
body.dark .share-badge-item-info span   { color: #6b6f9a; }

/* Toggle visual */
.share-badge-item-toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(108, 122, 224, 0.3);
  background: transparent;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.share-badge-item input:checked ~ .share-badge-item-inner .share-badge-item-toggle {
  background: #6c7ae0;
  border-color: #6c7ae0;
}
.share-badge-item input:checked ~ .share-badge-item-inner .share-badge-item-toggle::after {
  content: '';
  position: absolute;
  top: 4px; left: 6px;
  width: 5px; height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}
body.dark .share-badge-item-toggle { border-color: rgba(167,139,250,0.25); }

/* Botão gerar */
.share-gerar-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #6c7ae0 0%, #a78bfa 100%);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 8px 24px rgba(108, 122, 224, 0.35);
  -webkit-tap-highlight-color: transparent;
}
.share-gerar-btn:hover  { opacity: 0.92; }
.share-gerar-btn:active { transform: scale(0.98); }

/* Animação de entrada do step2 */
#shareStep2 {
  animation: shareStep2In 0.25s ease;
}
@keyframes shareStep2In {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════
   BOTTOM NAV — mobile only
   Elemento independente, sem herança
   da sidebar desktop
══════════════════════════════════════ */
#bottomNav {
  display: none; /* oculto no desktop */
}

@media (max-width: 768px) {
  /* Esconde a sidebar desktop completamente */
  .sidebar,
  .sidebar-toggle-btn {
    display: none !important;
  }

  /* Body vira coluna */
  body {
    flex-direction: column !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  /* Container ocupa todo espaço restante */
  .container {
    flex: 1 !important;
    min-height: 0 !important;
    order: 1 !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  /* ── Bottom Nav ── */
  #bottomNav {
    display: flex;
    flex-direction: row;
    order: 2;
    flex-shrink: 0;
    width: 100%;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255,255,255,0.38);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.6);
    align-items: stretch;
    justify-content: stretch;
    z-index: 100;
  }

  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: #8890b0;
    text-decoration: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s, background 0.2s;
    border-radius: 0;
    padding: 0;
    margin: 0;
  }

  .bn-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .bn-item span {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  .bn-item.active {
    color: #6c7ae0;
  }

  .bn-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(135deg, #6c7ae0, #a78bfa);
    border-radius: 2px 2px 0 0;
  }

  .bn-item:active {
    background: rgba(108,122,224,0.1);
  }

  body.dark #bottomNav {
    background: rgba(15,17,28,0.85);
    border-top-color: rgba(255,255,255,0.06);
  }

  body.dark .bn-item { color: #5a6080; }
  body.dark .bn-item.active { color: #a78bfa; }

  /* btn-add acima do bottom nav */
  .btn-add {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 14px) !important;
  }
}

/* ══════════════════════════════════════
   MODAL EDITAR DETALHES — redesign
══════════════════════════════════════ */

/* Overlay */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.edit-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Card */
.edit-modal {
  width: min(440px, 100%);
  max-height: 88dvh;
  background: #fff;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28), 0 0 0 1px rgba(108,122,224,0.08);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.edit-modal-overlay.open .edit-modal {
  transform: translateY(0) scale(1);
}
body.dark .edit-modal {
  background: #16182a;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(108,122,224,0.15);
}

/* ── Bloco 1: Hero ── */
.edit-hero {
  position: relative;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}
.edit-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.edit-hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.72) 100%);
}
.edit-close-btn {
  position: absolute;
  top: 12px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s, transform 0.15s;
}
.edit-close-btn svg { width: 16px; height: 16px; }
.edit-close-btn:hover  { background: rgba(255,255,255,0.3); }
.edit-close-btn:active { transform: scale(0.92); }

.edit-hero-info {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 0 16px 14px;
  z-index: 2;
}
.edit-field-inline { margin-bottom: 8px; }
.edit-title-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 900;
  padding: 4px 0;
  outline: none;
  transition: border-color 0.2s;
}
.edit-title-input::placeholder { color: rgba(255,255,255,0.5); }
.edit-title-input:focus { border-bottom-color: rgba(255,255,255,0.85); }

.edit-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.edit-nota-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.edit-star {
  font-size: 16px;
  color: #fbbf24;
  line-height: 1;
  margin-top: -1px;
}
.edit-nota-input {
  width: 48px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255,255,255,0.45);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  padding: 2px 0;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.edit-nota-input::-webkit-inner-spin-button,
.edit-nota-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.edit-nota-input:focus { border-bottom-color: rgba(255,255,255,0.85); }
.edit-nota-suffix {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
}

/* Tags no hero — cinza claro, não roxo */
.edit-tags-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.edit-tag {
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}

/* ── Corpo scrollável ── */
.edit-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Seções ── */
.edit-section-label {
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9095b8;
  margin-bottom: 12px;
}
body.dark .edit-section-label { color: #4a4e72; }

/* ── Bloco 2: Progresso ── */
.edit-progress-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edit-progress-bar-track {
  width: 100%;
  height: 6px;
  background: #e9ebf5;
  border-radius: 99px;
  overflow: hidden;
}
body.dark .edit-progress-bar-track { background: #1e2035; }
.edit-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  border-radius: 99px;
  transition: width 0.3s ease;
  min-width: 4px;
}
.edit-progress-nums {
  display: flex;
  align-items: center;
  gap: 6px;
}
.edit-eps-input {
  width: 60px;
  padding: 6px 10px;
  border: 1.5px solid #e2e4f0;
  border-radius: 10px;
  background: #f8f9fd;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #2d2f4a;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}
.edit-eps-input::-webkit-inner-spin-button,
.edit-eps-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.edit-eps-input:focus { border-color: #6c7ae0; }
body.dark .edit-eps-input {
  background: #1e2035;
  border-color: #2a2d48;
  color: #e0e0f0;
}
.edit-eps-sep {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: #9095b8;
  font-weight: 700;
}
.edit-eps-label {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  color: #9095b8;
  font-weight: 700;
}

/* ── Bloco 3: Detalhes ── */
.edit-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f1f8;
}
body.dark .edit-detail-row { border-bottom-color: #1e2035; }
.edit-detail-row:last-of-type { border-bottom: none; }
.edit-detail-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #b0b5d8;
  display: flex;
  align-items: center;
}
.edit-detail-icon svg { width: 16px; height: 16px; }
.edit-detail-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edit-detail-fieldlabel {
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #b0b5d8;
}
.edit-detail-input {
  background: transparent;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #4a4f6a;
  outline: none;
  width: 100%;
  padding: 0;
  transition: color 0.2s;
}
.edit-detail-input:focus { color: #2d2f4a; }
body.dark .edit-detail-input { color: #8088b0; }
body.dark .edit-detail-input:focus { color: #c0c5e0; }

/* Date input cosmetics */
.edit-detail-input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.3;
  cursor: pointer;
}

/* ── Anotações ── */
.edit-obs-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px 14px;
  border: 1.5px solid #e2e4f0;
  border-radius: 14px;
  background: #f8f9fd;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #4a4f6a;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
  line-height: 1.6;
}
.edit-obs-textarea::placeholder { color: #c0c5da; }
.edit-obs-textarea:focus { border-color: #6c7ae0; }
body.dark .edit-obs-textarea {
  background: #1e2035;
  border-color: #2a2d48;
  color: #9095b8;
}

/* ── Rodapé fixo ── */
.edit-footer {
  flex-shrink: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f0f1f8;
}
body.dark .edit-footer {
  background: #16182a;
  border-top-color: #1e2035;
}
.edit-save-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: #e2e4f0;
  color: #9095b8;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.edit-save-btn.changed {
  background: linear-gradient(135deg, #6c7ae0, #a78bfa);
  color: #fff;
  box-shadow: 0 4px 18px rgba(108,122,224,0.4);
}
.edit-save-btn:active { transform: scale(0.98); }

/* Mobile */
@media (max-width: 500px) {
  .edit-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .edit-modal {
    width: 100%;
    max-height: 93dvh;
    border-radius: 24px 24px 0 0;
  }
}

/* ── Upload de capa ── */
.edit-capa-btn-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.edit-capa-thumb-wrap {
  position: relative;
  width: 56px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #f0f1f8;
  border: 2px dashed #d0d3ea;
  transition: border-color 0.2s;
}
body.dark .edit-capa-thumb-wrap {
  background: #1e2035;
  border-color: #2a2d48;
}
.edit-capa-thumb-wrap:hover { border-color: #6c7ae0; }

.edit-capa-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-capa-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108, 122, 224, 0.0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.edit-capa-thumb-overlay svg {
  width: 20px;
  height: 20px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.edit-capa-thumb-wrap:hover .edit-capa-thumb-overlay {
  background: rgba(0, 0, 0, 0.38);
}
.edit-capa-thumb-wrap:hover .edit-capa-thumb-overlay svg {
  opacity: 1;
}

.edit-capa-btn-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-capa-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #d0d3ea;
  background: #f8f9fd;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #4a4f6a;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.edit-capa-upload-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #6c7ae0;
}
.edit-capa-upload-btn:hover {
  border-color: #6c7ae0;
  background: #eef0fb;
  color: #2d2f4a;
}
.edit-capa-upload-btn:active {
  transform: scale(0.97);
}
body.dark .edit-capa-upload-btn {
  background: #1e2035;
  border-color: #2a2d48;
  color: #8088b0;
}
body.dark .edit-capa-upload-btn:hover {
  border-color: #6c7ae0;
  background: #22254a;
  color: #c0c5e0;
}

.edit-capa-hint {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #b0b5d8;
  letter-spacing: 0.3px;
}
.edit-capa-hint.has-file {
  color: #6c7ae0;
}
body.dark .edit-capa-hint { color: #4a4e72; }
body.dark .edit-capa-hint.has-file { color: #a78bfa; }
