/* =========================================================
   Manu Cavalcanti — Login e Painel
   Mesma identidade do site (roxo noite, laranja, Bricolage),
   com a contenção de uma ferramenta de trabalho: tudo legível,
   previsível e rápido de usar.
   ========================================================= */

@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/bricolage-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #140827;
  --bg-2: #1c0d35;
  --panel: #1a0b30;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --line: rgba(216, 180, 254, 0.14);
  --line-2: rgba(216, 180, 254, 0.28);

  --text: #f6efff;
  --muted: #bba8d8;
  --faint: #9a87b8;

  --orange: #f57c00;
  --orange-2: #ff9800;
  --gold: #ffd54f;
  --lilac: #c084fc;
  --green: #34d399;
  --danger: #ff6b81;
  --ink: #1a0b30;          /* texto escuro sobre laranja (contraste 6,8:1) */

  --font: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --side-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #4b2a78 var(--bg); scrollbar-width: thin; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* luz ambiente numa camada fixa (background-attachment: fixed redesenharia a tela a cada rolagem) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 70vh at 100% 100%, rgba(245, 124, 0, 0.14), transparent 70%),
    radial-gradient(60vw 60vh at 0% 0%, rgba(139, 40, 183, 0.28), transparent 70%);
}
::selection { background: var(--orange); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
label.btn:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 42px; padding: 0.55em 1.1em;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; white-space: nowrap; text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
.btn-sm { min-height: 34px; padding: 0.35em 0.85em; font-size: 0.85rem; }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { border-color: var(--line-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--lilac); background: var(--surface-2); }
.btn-quiet { color: var(--muted); }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: rgba(255, 107, 129, 0.45); }
.btn-danger:hover { background: rgba(255, 107, 129, 0.12); }
.btn[disabled], .btn.is-busy { opacity: 0.6; cursor: progress; }
.btn.is-busy .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 10px; color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.25; cursor: default; }
.icon-btn.danger:hover { color: var(--danger); background: rgba(255, 107, 129, 0.12); }
.icon-btn .ic { width: 20px; height: 20px; }

/* ---------- Campos ---------- */
.field { display: grid; gap: 0.35rem; }
.field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-row > .field + .field { margin-top: 0; }
.label { font-weight: 700; font-size: 0.92rem; display: flex; justify-content: space-between; gap: 1rem; }
.label .opt { font-weight: 400; color: var(--faint); }
.input, .textarea, .select {
  width: 100%; min-height: 44px;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: rgba(10, 4, 20, 0.45);
  color: var(--text);
  caret-color: var(--orange);
  transition: border-color 0.2s, background-color 0.2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); opacity: 0.8; }
.input:hover, .textarea:hover { border-color: rgba(216, 180, 254, 0.42); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--orange); background: rgba(10, 4, 20, 0.6); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: 0.84rem; color: var(--faint); }
.hint.ok { color: var(--green); }
.hint.warn { color: var(--gold); }
.field-error { font-size: 0.84rem; color: var(--danger); display: flex; gap: 0.35rem; align-items: center; }
.counter { font-weight: 400; color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.counter.over { color: var(--danger); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 3rem; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 50%; margin-top: -18px; }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.input-icon .input { padding-left: 2.5rem; }

/* escolha segmentada (rádios) */
.seg { display: flex; flex-wrap: wrap; gap: 0.4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 0.35rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 38px; padding: 0.4em 0.9em;
  border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 0.9rem; font-weight: 700;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.seg input:hover + span { color: var(--text); border-color: var(--lilac); }
.seg input:checked + span { color: var(--text); border-color: var(--orange); background: rgba(245, 124, 0, 0.14); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* nota em estrelas */
.stars-input { display: flex; gap: 0.15rem; border: 0; padding: 0; margin: 0; }
.stars-input legend { padding: 0; margin-bottom: 0.35rem; }
.stars-input label { position: relative; color: var(--line-2); cursor: pointer; }
.stars-input input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stars-input .ic { width: 30px; height: 30px; }
.stars-input label.on { color: var(--gold); }
.stars-input input:focus-visible + .ic { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* interruptor */
.switch { display: flex; align-items: center; gap: 0.85rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative; width: 50px; height: 28px; flex: none;
  border-radius: 999px; background: #3a2858; border: 1px solid var(--line-2);
  transition: background-color 0.25s;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text); transition: transform 0.25s var(--ease);
}
.switch input:checked + .switch-track { background: var(--green); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(22px); background: #062b1f; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Carregando (antes de confirmar o login) ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.boot p { display: flex; align-items: center; gap: 0.6rem; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--orange); animation: spin 0.8s linear infinite; }

/* ---------- Estrutura do painel ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.6rem;
  padding: 1.4rem 1rem;
  background: rgba(13, 7, 24, 0.75);
  border-right: 1px solid var(--line);
}
.side-brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.5rem; text-decoration: none; }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--orange); background: var(--bg-2); }
.side-brand strong { display: block; font-size: 1rem; line-height: 1.2; }
.side-brand small { color: var(--gold); font-size: 0.8rem; }

.side-nav { display: grid; gap: 0.2rem; }
.side-nav a {
  display: flex; align-items: center; gap: 0.7rem;
  min-height: 44px; padding: 0 0.75rem;
  border-radius: 10px; text-decoration: none;
  color: var(--muted); font-weight: 700;
  transition: color 0.2s, background-color 0.2s;
}
.side-nav a:hover { color: var(--text); background: var(--surface-2); }
.side-nav a[aria-current="page"] { color: var(--text); background: rgba(245, 124, 0, 0.14); box-shadow: inset 0 0 0 1px rgba(245, 124, 0, 0.45); }
.side-nav .ic { width: 20px; height: 20px; }
.side-nav .count { margin-left: auto; font-size: 0.8rem; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 400; }

.side-foot { margin-top: auto; display: grid; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.side-foot a, .side-foot button {
  display: flex; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0 0.75rem;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.92rem;
  transition: color 0.2s, background-color 0.2s;
}
.side-foot a:hover, .side-foot button:hover { color: var(--text); background: var(--surface-2); }
.who { padding: 0.25rem 0.75rem; font-size: 0.8rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 2.2rem clamp(1rem, 3.5vw, 3rem) 4rem; max-width: 1100px; width: 100%; }

.banner {
  display: flex; gap: 0.7rem; align-items: flex-start;
  margin-bottom: 1.5rem; padding: 0.9rem 1rem;
  border-radius: var(--r-md); border: 1px solid rgba(255, 107, 129, 0.45);
  background: rgba(255, 107, 129, 0.1); color: #ffd6dd; font-size: 0.92rem;
}
.banner .ic { color: var(--danger); margin-top: 2px; }
.banner a { color: var(--gold); }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.view-head h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); }
.view-head p { margin-top: 0.35rem; color: var(--muted); max-width: 60ch; }

/* ---------- Listas ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: 0.6rem 0.6rem 0.6rem 0.6rem;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s, background-color 0.2s;
}
.row:hover { border-color: var(--line-2); background: var(--surface-2); }
.row-thumb {
  width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #2a0f4d, #140827); position: relative;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-thumb.is-vertical img { object-fit: contain; background: #0a0414; }
.row-thumb.round { width: 52px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--lilac); }
.row-thumb .ic { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; color: var(--lilac); opacity: 0.6; }
.row-main { min-width: 0; }
.row-title { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.row-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; margin-top: 0.15rem; font-size: 0.85rem; color: var(--muted); }
.row-meta .ic { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; margin-right: 0.25rem; }
.row-quote { margin-top: 0.15rem; font-size: 0.88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-actions { display: flex; align-items: center; gap: 0.15rem; }
.row-actions .btn { margin: 0 0.35rem; }
.tag-feature {
  flex: none; font-size: 0.72rem; font-weight: 700; padding: 0.15em 0.55em; border-radius: 6px;
  background: rgba(245, 124, 0, 0.18); color: var(--orange-2);
}
.confirming { color: var(--danger) !important; background: rgba(255, 107, 129, 0.12) !important; width: auto !important; padding: 0 0.7rem; font-size: 0.85rem; font-weight: 700; gap: 0.3rem; display: inline-flex !important; }

.empty {
  padding: 2.5rem 1.5rem; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted);
}
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 0.3rem; }
.skeleton-row { height: 76px; border-radius: var(--r-md); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- Configurações ---------- */
.cards { display: grid; gap: 1.2rem; }
.card { padding: 1.4rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.card h2 { font-size: 1.25rem; display: flex; align-items: center; gap: 0.55rem; }
.card h2 .ic { color: var(--orange-2); }
.card > p { margin-top: 0.4rem; color: var(--muted); max-width: 70ch; }
.card form, .card .card-body { margin-top: 1.2rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; align-items: center; }
.status-text { font-size: 0.9rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem 1rem; font-size: 0.92rem; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.code {
  margin: 1rem 0 0; padding: 1rem; border-radius: var(--r-md);
  background: #0b0516; border: 1px solid var(--line);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.82rem; line-height: 1.55;
  color: #e9dcff; overflow-x: auto; white-space: pre;
}
.steps { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: 0.35rem; }
.steps strong { color: var(--text); }

/* ---------- Editor (gaveta lateral) ---------- */
.editor {
  margin: 0 0 0 auto; padding: 0;
  width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  border: 0; border-left: 1px solid var(--line-2);
  background: var(--panel); color: var(--text);
}
.editor[open] { display: flex; animation: slide-in 0.35s var(--ease); }
.editor::backdrop { background: rgba(8, 3, 16, 0.7); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.editor form { display: flex; flex-direction: column; width: 100%; height: 100%; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: 1.35rem; }
.editor-body { flex: 1; overflow-y: auto; padding: 1.4rem; overscroll-behavior: contain; }
.editor-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: rgba(13, 7, 24, 0.6); }

/* ---------- Capa / foto ---------- */
.imgfield { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.imgfield-preview {
  position: relative; width: 168px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #2a0f4d, #140827); border: 1px solid var(--line-2);
  display: grid; place-items: center;
}
.imgfield.is-vertical .imgfield-preview { width: 96px; aspect-ratio: 9 / 16; }
.imgfield.round .imgfield-preview { width: 88px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--lilac); }
.imgfield-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgfield-empty { font-size: 0.78rem; color: var(--faint); text-align: center; padding: 0.5rem; }
.imgfield-tag { position: absolute; left: 6px; bottom: 6px; font-size: 0.7rem; font-weight: 700; padding: 0.1em 0.45em; border-radius: 5px; background: rgba(10, 4, 20, 0.8); }
.imgfield-side { display: grid; gap: 0.55rem; }
.imgfield-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.imgfield details summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.imgfield details summary:hover { color: var(--text); }
.imgfield details .input { margin-top: 0.5rem; }
.imgfield.is-drop .imgfield-preview { border-color: var(--orange); }

/* ---------- Seletor de quadro do vídeo ---------- */
.picker { width: min(560px, 94vw); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--panel); color: var(--text); }
.picker::backdrop { background: rgba(8, 3, 16, 0.8); }
.picker-body { padding: 1.2rem; display: grid; gap: 0.9rem; }
.picker video { width: 100%; max-height: 58vh; border-radius: 10px; background: #000; }
.picker input[type="range"] { width: 100%; accent-color: var(--orange); }
.picker-foot { display: flex; justify-content: flex-end; gap: 0.6rem; padding: 0 1.2rem 1.2rem; }

/* ---------- Avisos rápidos ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; display: grid; gap: 0.5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.8rem 1rem; border-radius: var(--r-md);
  background: #241043; border: 1px solid var(--line-2);
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.7);
  font-size: 0.92rem;
  animation: toast-in 0.3s var(--ease);
}
.toast .ic { margin-top: 2px; }
.toast.ok .ic { color: var(--green); }
.toast.err { border-color: rgba(255, 107, 129, 0.5); }
.toast.err .ic { color: var(--danger); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.login-card {
  width: min(420px, 100%);
  padding: 2.2rem;
  border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: rgba(26, 11, 48, 0.88);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.login-brand { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.6rem; }
.login-brand img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--orange); background: var(--bg-2); }
.login-brand strong { display: block; font-size: 1.05rem; }
.login-brand small { color: var(--gold); }
.login h1 { font-size: 1.9rem; }
.login-sub { margin-top: 0.35rem; color: var(--muted); }
.login form { margin-top: 1.6rem; }
.login .btn-primary { width: 100%; margin-top: 1.4rem; min-height: 48px; font-size: 1rem; }
.login-msg { margin-top: 1rem; font-size: 0.9rem; padding: 0.7rem 0.85rem; border-radius: var(--r-sm); display: flex; gap: 0.5rem; align-items: flex-start; }
.login-msg .ic { margin-top: 2px; }
.login-msg.err { background: rgba(255, 107, 129, 0.1); border: 1px solid rgba(255, 107, 129, 0.4); color: #ffd6dd; }
.login-msg.err .ic { color: var(--danger); }
.login-msg.ok { background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: #c9f5e4; }
.login-msg.ok .ic { color: var(--green); }
.login-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; font-size: 0.9rem; }
.login-links button, .login-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; }
.login-links button:hover, .login-links a:hover { color: var(--text); }

@media (max-width: 480px) { .login-card { padding: 1.5rem; } }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  html { scroll-padding-top: 120px; }   /* o topo fixo não cobre o item focado */
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; z-index: 20; height: auto;
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.8rem;
    padding: 0.6rem 0.8rem;
    border-right: 0; border-bottom: 1px solid var(--line);
    background: rgba(13, 7, 24, 0.97);
  }
  .side-brand { padding: 0; }
  .side-brand img { width: 34px; height: 34px; }
  .side-brand small { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; gap: 0.2rem; }
  .side-foot a, .side-foot button { padding: 0 0.6rem; min-height: 38px; }
  .side-foot .label-text { display: none; }
  .who { display: none; }
  .side-nav { order: 3; width: 100%; min-width: 0; display: flex; gap: 0.3rem; overflow-x: auto; scrollbar-width: none; margin: 0 -0.8rem; padding: 0 0.8rem; }
  .side-nav::-webkit-scrollbar { display: none; }
  /* indica que dá para arrastar para o lado */
  .side-nav { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .side-nav a { flex: none; min-height: 38px; padding: 0 0.8rem; font-size: 0.9rem; }
  .side-nav .count { margin-left: 0.2rem; }

  .main { padding: 1.4rem 1rem 3rem; }
  .row { grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; }
  .row-thumb { width: 84px; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 0.4rem; }
  .field-row { grid-template-columns: 1fr; }
  .field-row > .field + .field { margin-top: 1.1rem; }
  .imgfield { grid-template-columns: 1fr; }
  .editor { width: 100vw; border-left: 0; }
  .view-head .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.plain-fieldset { border: 0; padding: 0; margin: 1.1rem 0 0; min-width: 0; }
.plain-fieldset .field + .field { margin-top: 0.5rem; }
.notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
  margin-bottom: 1rem; padding: 0.8rem 1rem;
  border-radius: var(--r-md); border: 1px solid rgba(255, 213, 79, 0.35); background: rgba(255, 213, 79, 0.08);
  font-size: 0.92rem; color: #fff3cf;
}
.row-socials { display: inline-flex; gap: 0.35rem; color: var(--muted); }
.row-socials .ic { width: 15px; height: 15px; margin: 0; }
.row-stars { color: var(--gold); display: inline-flex; gap: 1px; }
.row-stars .ic { width: 14px; height: 14px; margin: 0; }
.avatar-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #8b28b7, #f57c00); }

/* ---------- Redes sociais (Configurações) ---------- */
.nets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0.8rem; }
.net-row {
  margin: 0; min-width: 0;
  display: grid; gap: 0.45rem;
  padding: 0.85rem 0.9rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: rgba(10, 4, 20, 0.25);
  align-content: start;
}
.net-name { float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.15rem; }
.net-name .ic { width: 16px; height: 16px; color: var(--orange-2); }
.at-input { position: relative; }
.at-input > span { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.at-input .input { padding-left: 1.85rem; }
.at-input.no-at .input { padding-left: 0.8rem; }
.net-url { font-size: 0.86rem; }
.net-row .field-error { margin-top: 0.1rem; }

/* ---------- Lista de vídeos: filtro e busca ---------- */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.7rem 1rem; margin-bottom: 0.6rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--lilac); }
.filter-chip[aria-pressed="true"] { color: var(--text); border-color: var(--orange); background: rgba(245, 124, 0, 0.14); }
.filter-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.filter-chip .n { font-size: 0.78em; color: var(--faint); font-variant-numeric: tabular-nums; }
.list-search { flex: 1 1 220px; max-width: 320px; }
.list-search .input { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.list-hint { margin: 0 0 0.9rem; font-size: 0.84rem; color: var(--faint); }
.list-hint strong { color: var(--muted); }

/* ---------- Arrastar pelas setas ---------- */
.mover { display: inline-flex; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.mover:hover { background: rgba(255, 255, 255, 0.03); cursor: grab; }
.mover .icon-btn:disabled { pointer-events: none; }   /* o "segurar" funciona mesmo na seta apagada */
.row { position: relative; }
.list.is-sorting .row:not(.is-dragging) { transition: transform 0.18s var(--ease, ease); }
.row.is-dragging {
  z-index: 5;
  border-color: var(--orange);
  background: var(--panel, #1a0b30);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(245, 124, 0, 0.35);
  cursor: grabbing;
}
body.is-dragging-row, body.is-dragging-row * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

@media (max-width: 860px) {
  .list-search { max-width: none; flex-basis: 100%; }
}

