/* ============================================================
   FONTE DO SITE — para TROCAR a fonte, mexa só neste bloco.
   ------------------------------------------------------------
   Existem duas variáveis (lá embaixo no :root):
     • --font          -> texto geral (corpo do site)
     • --font-display  -> títulos, marca e destaques  (agora: Titillium)
   Quer UMA fonte só no site inteiro? Coloque o mesmo nome nas duas.

   COMO TROCAR:

   ▸ OPÇÃO A — fonte do Google Fonts (mais fácil):
       1. Em  https://fonts.google.com  escolha a fonte.
       2. Em "Get font" > "Get embed code", copie a linha do @import.
       3. Substitua o @import abaixo por essa linha.
       4. Troque o nome em --font / --font-display (ex.: 'Montserrat').

   ▸ OPÇÃO B — você tem o ARQUIVO da fonte (.woff2 / .ttf / .otf):
       1. Coloque o arquivo na pasta  public/  (ex.: public/MinhaFonte.woff2).
       2. Apague o @import do Google e descomente o @font-face abaixo,
          ajustando o nome do arquivo.
       3. Troque o nome em --font / --font-display para 'MinhaFonte'.

   Obs.: por segurança, o site só aceita fontes do Google Fonts OU
   arquivos na própria pasta public/ (fontes de outros sites são bloqueadas).
   ============================================================ */

/* Fonte TITILLIUM — arquivos locais em public/Titillium/ (um .otf por peso).
   Só os pesos realmente usados são baixados (o navegador busca sob demanda). */
@font-face { font-family: 'Titillium'; src: url('/Titillium/Titillium-Regular.otf') format('opentype'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Titillium'; src: url('/Titillium/Titillium-RegularItalic.otf') format('opentype'); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Titillium'; src: url('/Titillium/Titillium-Semibold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Titillium'; src: url('/Titillium/Titillium-Bold.otf') format('opentype'); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Titillium'; src: url('/Titillium/Titillium-Black.otf') format('opentype'); font-weight: 900; font-style: normal; font-display: swap; }


/* ================= Tema ================= */
:root {
  /* >>> Nomes das fontes: troque aqui depois de carregar a fonte acima <<< */
  --font: 'Titillium', "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: 'Titillium', "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bg: #09090b;             /* base neutra (quase preto) */
  --bg-soft: #121214;
  --card: #18181b;
  --card-hover: #232327;
  --line: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --brand: #ff7a1a;          /* laranja (CTA / destaque) */
  --brand-2: #ff9e4d;
  --accent: #6c8cff;
  --accent-2: #b06cff;
  --green: #35d0a5;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  /* Liquid glass (vidro fosco dos controles) */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-hover: rgba(255, 255, 255, 0.13);
  --glass-brd: rgba(255, 255, 255, 0.14);
  --glass-blur: saturate(1.6) blur(14px);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --ripple: rgba(255, 255, 255, 0.45);
}
:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f0f3f9;
  --line: #e2e7f0;
  --text: #141924;
  --muted: #667085;
  --shadow: 0 16px 40px rgba(20, 30, 60, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-hover: rgba(255, 255, 255, 0.78);
  --glass-brd: rgba(20, 25, 36, 0.10);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --ripple: rgba(20, 25, 36, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* O atributo hidden sempre esconde, mesmo com display definido por classe */
[hidden] { display: none !important; }
/* Fundo no html evita flash branco enquanto a página está oculta */
html { background: var(--bg); }
/* Anti-FOUC: esconde o conteúdo até o JS aplicar tema/configurações atuais */
/* Não escondemos mais a página inteira (opacity:0 atrasava o LCP). O tema e a cor
   já vêm aplicados no <head> pelo localStorage; só evitamos animar a transição no 1º paint. */
html.preload, html.preload * { transition: none !important; }
body { opacity: 1; transition: opacity 0.14s ease; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .brand, .hero h1, .detail-title, .prod-info h1, .pc-meta h2, .modal-info h2, .modal-form-body h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
/* Form controls não herdam a fonte por padrão — força o Titillium em TODOS eles */
button, input, textarea, select, optgroup { font-family: inherit; }

/* ===== Toggle de tema (sol/lua giratório) — Uiverse by zenonaiden_3341 ===== */
.theme-switch-wrap { display: inline-flex; align-items: center; flex: 0 0 auto; }
.theme-switch-wrap input[type="checkbox"] { display: none; }
.toggleSwitch { width: 38px; height: 38px; display: grid; border-radius: 50%; position: relative; place-items: center;
  cursor: pointer; transition: transform .2s ease; line-height: 1; overflow: hidden; }
.toggleSwitch .icon { grid-column: 1 / 1; grid-row: 1 / 1; width: 100%; height: 100%; display: grid; place-items: center;
  z-index: 2; transform-origin: center center; transition: transform 500ms ease, opacity 300ms ease; opacity: 0; pointer-events: none; }
.toggleSwitch .icon--moon { color: #212121; background-color: #e8e8e8; border-radius: 50%; }
.toggleSwitch .icon--sun { color: #e8e8e8; background-color: #212121; border-radius: 50%; }
.toggleSwitch .icon--moon, .toggleSwitch .icon--sun { transform: rotate(0deg) scale(0); opacity: 0; }
.theme-switch-wrap input:not(:checked) + .toggleSwitch .icon--sun { transform: rotate(360deg) scale(1); opacity: 1; }
.theme-switch-wrap input:not(:checked) + .toggleSwitch .icon--moon { transform: rotate(0deg) scale(0); opacity: 0; }
.theme-switch-wrap input:checked + .toggleSwitch .icon--moon { transform: rotate(360deg) scale(1); opacity: 1; }
.theme-switch-wrap input:checked + .toggleSwitch .icon--sun { transform: rotate(0deg) scale(0); opacity: 0; }
.theme-switch-wrap input:active + .toggleSwitch { transform: scale(0.94); }
.toggleSwitch .icon svg { fill: currentColor !important; width: 21px; height: 21px; }

/* Seção de aparência / tema nas configurações */
.theme-card .theme-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* Card "Complete seu perfil" (só nas configurações do perfil) */
.profile-completion {
  background: var(--card, #fff); border: 1px solid var(--line, #e6e6ef); border-radius: 16px;
  padding: 18px 20px; margin: 18px 0 6px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.profile-completion .pcpl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.profile-completion .pcpl-head h3 { margin: 0; font-size: 18px; }
.profile-completion .pcpl-pct { font-weight: 800; font-size: 20px; color: var(--brand); flex: 0 0 auto; }
.profile-completion .pcpl-bar { height: 8px; border-radius: 999px; background: var(--line, #e6e6ef); overflow: hidden; margin: 14px 0 6px; }
.profile-completion .pcpl-bar span { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s ease; }
.profile-completion.is-complete .pcpl-bar span { background: linear-gradient(90deg, #22c55e, #16a34a); }
.profile-completion.is-complete .pcpl-pct { color: #16a34a; }
.profile-completion .pcpl-tasks { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-completion .pcpl-task { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-top: 1px solid var(--line, #eee); }
.profile-completion .pcpl-task:first-child { border-top: 0; }
.profile-completion .pcpl-check { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--line, #d5d5e0); display: grid; place-items: center; color: #fff; }
.profile-completion .pcpl-task.done .pcpl-check { background: #22c55e; border-color: #22c55e; }
.profile-completion .pcpl-check .ico svg { width: 13px; height: 13px; stroke-width: 3; }
.profile-completion .pcpl-label { flex: 1; }
.profile-completion .pcpl-task.done .pcpl-label { color: var(--muted, #8a8aa0); text-decoration: line-through; }
.profile-completion .pcpl-go { flex: 0 0 auto; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  font-size: 13px; padding: 6px 14px; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.profile-completion .pcpl-go:hover { filter: brightness(1.06); }

/* Destaque temporário do campo ao clicar em "Preencher" */
.field-flash { animation: fieldFlash 1.4s ease; }
@keyframes fieldFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
  25% { box-shadow: 0 0 0 4px rgba(99,102,241,.28); }
}

/* ================= Botões ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #1a1200; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--card-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ================= Topbar (linha 1) ================= */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px clamp(14px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent-2)); color: #fff; font-size: 18px;
}
.brand span.name b { color: var(--brand); }
.brand-logo { height: 30px; width: auto; max-width: 190px; display: block; object-fit: contain; }
/* Logo (branca) fica escura no tema claro */
:root[data-theme="light"] .brand-logo { filter: brightness(0); }

.topsearch { flex: 1; max-width: 720px; margin: 0 auto; display: flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 14px; }
.topsearch input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 14px; outline: none; padding: 8px 0; }
.topsearch .divider { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.topsearch select { border: none; background: transparent; color: var(--muted); font-size: 13px; outline: none; cursor: pointer; margin-right: 8px; max-width: 130px; }
.topsearch select option { background: var(--bg-soft); color: var(--text); }
.topsearch .go { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; border: none; border-radius: 9px;
  padding: 8px 16px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 28%, transparent);
  transition: filter 0.15s, box-shadow 0.15s, transform 0.15s; }
.topsearch .go:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 42%, transparent); }

/* margin-left:auto garante o lado direito colado à direita mesmo nas páginas
   sem barra de busca (chats, perfil, enviar…), onde o espaçador some. */
.topright { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.coin-balance { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
  border: 1px solid color-mix(in srgb, #f5b301 45%, var(--line)); background: color-mix(in srgb, #f5b301 12%, transparent); font-size: 14px; }
.coin-balance b { color: #f5b301; }
.coin-icon { font-size: 15px; line-height: 1; }
/* Ícone da moeda (SVG). Escala junto com o texto do lugar onde aparece. */
.coin-ico { width: 1.2em; height: 1.2em; vertical-align: -0.22em; display: inline-block; flex-shrink: 0; }
.coin-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, #f5b301 16%, transparent); color: #e0a800; }
.proj-avatar { width: 34px; height: 34px; border-radius: 8px; overflow: hidden; flex-shrink: 0; cursor: pointer;
  display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-soft); font-size: 15px; }
.proj-avatar img { width: 100%; height: 100%; object-fit: cover; }
.proj-avatar:hover { border-color: var(--brand); }
.coins-field { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.coins-field input { width: 48px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); text-align: center; }
.pill.coins { background: color-mix(in srgb, #f5b301 16%, transparent); color: #e0a800; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 16px; }
.icon-btn:hover { background: var(--card-hover); }

#user-area { display: flex; align-items: center; gap: 8px; position: relative; }
.btn-login .menu-ico { margin-right: 0; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 30px; cursor: pointer; }
.user-chip:hover { background: var(--card-hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.uname { font-size: 14px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 190px; max-width: calc(100vw - 24px); padding: 6px; display: flex; flex-direction: column; z-index: 50; }
.user-menu[hidden] { display: none; }
.user-menu a, .user-menu button { text-align: left; padding: 10px 12px; border-radius: 8px; background: transparent; border: none; color: var(--text); cursor: pointer; font-size: 14px; }
.user-menu a:hover, .user-menu button:hover { background: var(--card-hover); }
/* Destaque DOURADO no "Painel admin" */
.user-menu .admin-link { color: #f1c34a; font-weight: 700;
  background: linear-gradient(90deg, color-mix(in srgb, #f1c34a 16%, transparent), color-mix(in srgb, #f1c34a 5%, transparent)); }
.user-menu .admin-link svg { color: #f1c34a; }
.user-menu .admin-link:hover { background: color-mix(in srgb, #f1c34a 26%, transparent); }
.user-menu .criar-link { color: var(--accent); font-weight: 700;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 5%, transparent)); }
.user-menu .criar-link svg { color: var(--accent); }
.user-menu .criar-link:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.menu-ico { vertical-align: -3px; margin-right: 6px; }
.btn-ico { vertical-align: -2px; margin-right: 6px; }
.herosearch .ico { display: inline-flex; align-items: center; }
.user-menu .muted-line { color: var(--muted); font-size: 12px; padding: 8px 12px 4px; border-top: 1px solid var(--line); margin-top: 4px; }

/* ================= Nav de categorias (linha 2) ================= */
.catnav { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 8px clamp(14px, 3vw, 36px);
  border-bottom: 1px solid var(--line); position: sticky; top: 63px; z-index: 25; background: var(--bg); }
.catnav::-webkit-scrollbar { height: 0; }
.catnav a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px; white-space: nowrap; cursor: pointer; }
.catnav a:hover { color: var(--brand); }
.catnav a.active { color: var(--brand); background: var(--card-hover); }
.catnav .spacer { flex: 1; }
/* Desktop: categorias centralizadas no meio; "Enviar arquivo" fixo à direita.
   NÃO trocar position (o sticky já ancora o absoluto); overflow:visible evita
   que o "Enviar arquivo" absoluto seja recortado (o overflow-x:auto recorta os 2 eixos). */
@media (min-width: 761px) {
  .catnav { justify-content: center; overflow: visible; }
  .catnav .spacer { display: none; }
  .catnav a[href="/enviar"], .catnav a[href="/enviar"]:hover {
    position: absolute; right: clamp(14px, 3vw, 36px); top: 50%; transform: translateY(-50%);
  }
}
.catmore { position: relative; display: inline-flex; }
.catmore-btn { font-family: inherit; color: var(--muted); font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px;
  border: none; background: transparent; cursor: pointer; white-space: nowrap; }
.catmore-btn:hover { color: var(--text); background: var(--card-hover); }
.catmore-panel { position: fixed; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; display: flex; flex-direction: column; min-width: 200px; max-height: 60vh; overflow-y: auto; z-index: 50; }
.catmore-panel[hidden] { display: none; }
.catmore-panel a { color: var(--muted); font-size: 14px; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.catmore-panel a:hover, .catmore-panel a.active { color: var(--text); background: var(--card-hover); }
.tag-new { background: var(--brand); color: #1a1200; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 5px; margin-left: 5px; vertical-align: middle; }

/* ================= Hero ================= */
.hero { position: relative; text-align: center; padding: clamp(48px, 9vw, 96px) 20px 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  /* Sem o brilho radial da marca no topo — ficaram só as estrelinhas. */
  background:
    radial-gradient(1px 1px at 15% 30%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 80% 25%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 65% 60%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 30% 70%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 90% 65%, rgba(255,255,255,.3), transparent),
    radial-gradient(1px 1px at 45% 20%, rgba(255,255,255,.3), transparent);
}
/* Tema claro não tem as estrelinhas e o brilho do topo foi removido: nada a pintar. */
:root[data-theme="light"] .hero::before { background: none; }
.hero > * { position: relative; z-index: 1; }
.hero-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: block; }
.hero h1 { font-size: clamp(34px, 6vw, 62px); margin: 0 0 16px; letter-spacing: -1px; line-height: 1.05; font-weight: 800; }
.hero h1 span { color: var(--brand); }
/* Animação de troca do texto de destaque do hero */
#hero-title .hero-accent { display: inline-block; will-change: opacity, transform; }
#hero-title .hero-accent.rot-out { opacity: 0; transform: translateY(-16px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
#hero-title .hero-accent.rot-in { animation: heroRotIn 0.48s var(--ease); }
@keyframes heroRotIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero p { color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 620px; margin: 0 auto 30px; }

.herosearch { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.herosearch .ico { padding: 0 6px 0 10px; color: var(--muted); }
.herosearch input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 16px; outline: none; }
.herosearch .divider { width: 1px; height: 26px; background: var(--line); }
.herosearch select { border: none; background: transparent; color: var(--muted); font-size: 14px; outline: none; cursor: pointer; padding: 0 6px; }
.herosearch .btn { padding: 12px 22px; }
.herosearch .btn-primary { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.herosearch .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 42%, transparent); }

/* ================= Cards de categoria ================= */
.cat-cards { max-width: 1180px; margin: 34px auto 0; padding: 0 clamp(14px, 3vw, 36px);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; min-height: 74px; }
.cat-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; cursor: pointer; transition: 0.15s; }
.cat-card:hover { border-color: var(--brand); transform: translateY(-2px); background: var(--card-hover); }
.cat-card .cc-info b { display: block; font-size: 15px; }
.cat-card .cc-info span { color: var(--muted); font-size: 12px; }
.cat-card .cc-thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; margin-left: auto; flex-shrink: 0;
  background: repeating-conic-gradient(#26262a 0% 25%, #1c1c1f 0% 50%) 50% / 14px 14px; }
.cat-card.extra-project { display: none; }
.more-card { font-family: inherit; text-align: left; border-style: dashed; }
.more-card .cc-info b { color: var(--brand); }
.more-card .more-thumb { display: grid; place-items: center; font-size: 20px; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* ================= Seção da galeria ================= */
.section { max-width: 1180px; margin: 56px auto 0; padding: 0 clamp(14px, 3vw, 36px); width: 100%; }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; margin: 0; }
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-filters select { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 13px; outline: none; }
.gallery-filters select:focus { border-color: var(--brand); }
/* Botão "Ver mais recursos" (home) + página /busca */
.more-recursos { display: flex; justify-content: center; margin: 10px 0 56px; }
.more-recursos[hidden] { display: none; }
.more-recursos-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; font-size: 15px; font-weight: 700; }
.more-recursos-btn .ico svg { width: 16px; height: 16px; }
.busca-page { padding-top: 24px; }
.busca-count { color: var(--muted); font-size: 14px; font-weight: 600; margin: 4px 0 0; }

/* ==========================================================================
   Widgets NATIVOS do navegador seguem o tema do site.
   Sem isto o Chrome desenha o popup do <select>, o ícone do <input type=date>
   e as barras de rolagem no esquema CLARO — daí o popup branco com texto
   quase invisível e o ícone preto no fundo cinza.
   ========================================================================== */
:root[data-theme="dark"] .dash { color-scheme: dark; }
:root[data-theme="light"] .dash { color-scheme: light; }

/* ==========================================================================
   Tooltip do próprio site (substitui o balão nativo do title=)
   Uso: data-tip="texto" [data-tip-pos="top"] [data-tip-align="right|left"]
   ========================================================================== */
.dash [data-tip] { position: relative; }
.dash [data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 60; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-4px) scale(.96); transform-origin: top center;
  background: var(--card); color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  font-size: 12px; font-weight: 600; line-height: 1.4;
  /* não herdar caixa alta/tracking do elemento (ex.: rótulo do KPI) e quebrar linha
     em vez de esticar por cima do card vizinho */
  text-transform: none; letter-spacing: normal; text-align: left;
  white-space: normal; width: max-content; max-width: 230px;
  padding: 7px 11px; border-radius: 9px; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6);
  opacity: 0; pointer-events: none; transition: opacity .15s cubic-bezier(.32,.72,0,1), transform .15s cubic-bezier(.32,.72,0,1); }
.dash [data-tip]::before {
  content: ""; position: absolute; z-index: 60; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%) translateY(-4px); border: 6px solid transparent;
  border-bottom-color: var(--card); opacity: 0; pointer-events: none;
  transition: opacity .15s cubic-bezier(.32,.72,0,1), transform .15s cubic-bezier(.32,.72,0,1); }
.dash [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.dash [data-tip]:hover::before, [data-tip]:focus-visible::before { opacity: 1; transform: translateX(-50%) translateY(0); }
/* variante acima (para elementos perto do rodapé) */
.dash [data-tip][data-tip-pos="top"]::after { top: auto; bottom: calc(100% + 10px); transform-origin: bottom center;
  transform: translateX(-50%) translateY(4px) scale(.96); }
.dash [data-tip][data-tip-pos="top"]::before { top: auto; bottom: calc(100% + 4px);
  border-bottom-color: transparent; border-top-color: var(--card); transform: translateX(-50%) translateY(4px); }
.dash [data-tip][data-tip-pos="top"]:hover::after { transform: translateX(-50%) translateY(0) scale(1); }
.dash [data-tip][data-tip-pos="top"]:hover::before { transform: translateX(-50%) translateY(0); }
/* variantes de alinhamento (evita sair da tela nas bordas) */
.dash [data-tip][data-tip-align="right"]::after { left: auto; right: 0; transform: translateX(0) translateY(-4px) scale(.96); transform-origin: top right; }
.dash [data-tip][data-tip-align="right"]:hover::after { transform: translateX(0) translateY(0) scale(1); }
.dash [data-tip][data-tip-align="left"]::after { left: 0; transform: translateX(0) translateY(-4px) scale(.96); transform-origin: top left; }
.dash [data-tip][data-tip-align="left"]:hover::after { transform: translateX(0) translateY(0) scale(1); }

/* ==========================================================================
   Dashboard de produção (/dash)
   Sistema: casca + núcleo com raios concêntricos, hairlines (nada de borda
   cinza dura), sombra difusa, motion com curva custom e numerais tabulares.
   ========================================================================== */
.dash {
  --dz: cubic-bezier(.32, .72, 0, 1);
  --shell-r: 22px; --shell-p: 6px; --core-r: 16px;
  --hair: color-mix(in srgb, var(--text) 9%, transparent);
  --wash: color-mix(in srgb, var(--text) 3.5%, transparent);
  --soft: 0 24px 48px -30px rgba(0, 0, 0, .55);
}
@keyframes dashIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes barGrow { from { transform: scaleY(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes barWide { from { transform: scaleX(0); } to { transform: none; } }
.dash .anim { animation: dashIn .55s var(--dz) both; animation-delay: calc(var(--i, 0) * 55ms); }
@media (prefers-reduced-motion: reduce) { .dash .anim, .dash .ch-bar, .dash .cat-fill { animation: none !important; } }

/* --- casca + núcleo (double-bezel) --- */
.d-shell { background: var(--wash); border: 1px solid var(--hair); border-radius: var(--shell-r); padding: var(--shell-p);
  box-shadow: var(--soft); transition: transform .5s var(--dz), border-color .5s var(--dz); }
.d-shell.lift:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 32%, var(--hair)); }
.d-core { position: relative; background: var(--card); border-radius: var(--core-r); padding: 18px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent); height: 100%; }
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.d-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; color: var(--muted); }
.d-note { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.d-empty { color: var(--muted); font-size: 13px; padding: 22px 0; text-align: center; }
.d-link { font-size: 11.5px; font-weight: 800; color: var(--brand); text-decoration: none; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 4px; transition: gap .3s cubic-bezier(.32,.72,0,1); }
.d-link::after { content: "→"; }
.d-link:hover { gap: 8px; }

/* card do usuário na barra lateral */
.ds-user { display: flex; align-items: center; gap: 11px; padding: 12px; margin-bottom: 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.ds-av { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 16px; }
.ds-av img { width: 100%; height: 100%; object-fit: cover; }
.ds-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ds-meta b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-mail { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-role { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent); padding: 2px 8px; border-radius: 999px; align-self: flex-start; margin-top: 4px; }

/* cabeçalho: mês + CTA */
.dash-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* distribuição por status */
.st-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 760px) { .st-grid { grid-template-columns: repeat(2, 1fr); } }
.st-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 13px;
  background: color-mix(in srgb, var(--sc) 10%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 26%, transparent); }
.st-tile.executada { --sc: var(--green); } .st-tile.retrabalho { --sc: #ffb020; }
.st-tile.reprovada { --sc: var(--danger); } .st-tile.sem_retorno { --sc: #8b93a1; }
.st-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); margin-bottom: 4px; }
.st-tile b { font-size: 23px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.st-lbl { font-size: 11px; color: var(--muted); font-weight: 700; }

/* portfólio */
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
.pf-card { display: block; border-radius: 13px; overflow: hidden; position: relative; text-decoration: none; color: #fff;
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); transition: transform .45s cubic-bezier(.32,.72,0,1); }
.pf-card:hover { transform: translateY(-3px); }
.pf-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg-soft); }
.pf-t { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-size: 11.5px; font-weight: 700;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Relatórios (admin) ===== */
.sp2 { grid-column: span 2; }
@media (max-width: 1080px) { .sp2 { grid-column: span 4; } }
@media (max-width: 640px) { .sp2 { grid-column: span 6; } }
.rep-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rep-sel { width: auto; min-width: 210px; }
.rep-donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 14px; }
.rep-donut { position: relative; width: 138px; height: 138px; flex: none; }
.rep-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rep-donut-mid { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.rep-donut-mid b { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.rep-donut-mid span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 800; margin-top: 4px; }
.rep-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 150px; }
.rep-leg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.rep-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rep-leg-l { flex: 1; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-leg b { font-weight: 800; font-variant-numeric: tabular-nums; }
.rep-leg i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; min-width: 42px; text-align: right; }
/* barra do dia com a fatia de executadas */
.rep-daybar { position: relative; flex: 1; min-width: 0; border-radius: 5px 5px 3px 3px; transform-origin: bottom;
  background: color-mix(in srgb, var(--brand) 38%, transparent);
  animation: barGrow .7s var(--dz) both; animation-delay: calc(var(--i) * 12ms); transition: filter .25s var(--dz); }
.rep-daybar.zero { background: color-mix(in srgb, var(--text) 7%, transparent); }
.rep-daybar:hover { filter: brightness(1.3); }
.rep-dayexec { position: absolute; left: 0; right: 0; bottom: 0; border-radius: inherit;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 60%, transparent)); }
/* tabelas */
.rep-table-wrap { margin-top: 14px; overflow-x: auto; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted);
  font-weight: 800; padding: 0 10px 9px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.rep-table td { padding: 10px; border-bottom: 1px solid color-mix(in srgb, var(--text) 5%, transparent); }
.rep-table tr:last-child td { border-bottom: none; }
.rep-table tbody tr:hover { background: var(--wash); }
.rep-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rep-tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.rep-role { font-size: 10.5px; color: var(--muted); font-weight: 700; }
/* impressão / PDF: só o relatório, em papel branco */
@media print {
  body.printing-report .topbar, body.printing-report .dash-side, body.printing-report .dash-rail,
  body.printing-report .rep-bar, body.printing-report .dash-actions, body.printing-report .cookie-bar { display: none !important; }
  body.printing-report .dash-layout { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.printing-report .d-shell { break-inside: avoid; box-shadow: none !important; border-color: #ccc !important; background: #fff !important; }
  body.printing-report .d-core { background: #fff !important; box-shadow: none !important; }
  body.printing-report .rep-table th, body.printing-report .rep-table td { border-color: #ddd !important; }
  body.printing-report { background: #fff !important; }
}

/* ===== Layout de 3 colunas: nav · conteúdo · painel ===== */
.dash-guard-wrap { max-width: 900px; margin: 24px auto; }
.dash-layout { display: grid; grid-template-columns: 246px minmax(0, 1fr) 304px; gap: 20px;
  max-width: 1560px; margin: 22px auto 70px; padding: 0 clamp(14px, 3vw, 32px); align-items: start; }
.dash-layout.no-rail { grid-template-columns: 246px minmax(0, 1fr); }
.dash-layout.no-rail .dash-rail { display: none; }
.dash-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 3px; }
.dash-side .side-title { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .18em; font-weight: 800;
  color: var(--muted); padding: 0 13px 10px; }
.dash-nav { display: flex; flex-direction: column; gap: 3px; }
.dash-nav button, .dash-nav a { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .3s var(--dz), color .3s var(--dz), border-color .3s var(--dz); }
.dash-nav button:hover, .dash-nav a:hover { background: var(--wash); color: var(--text); }
.dash-nav button.active { background: color-mix(in srgb, var(--brand) 15%, transparent);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent); color: var(--brand); font-weight: 800; }
.dash-nav .si { width: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.dash-nav .si svg { width: 18px; height: 18px; }
.nav-sep { height: 1px; background: var(--hair); margin: 13px 10px; }
.dash-side .ds-user { margin: 18px 0 0; }
.dash-main { min-width: 0; }
.dash-rail { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1300px) {
  .dash-layout, .dash-layout.no-rail { grid-template-columns: 224px minmax(0, 1fr); }
  .dash-rail { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}
@media (max-width: 900px) {
  .dash-layout, .dash-layout.no-rail { grid-template-columns: 1fr; }
  .dash-side { position: static; }
  .dash-rail { grid-template-columns: 1fr; }
}

/* ===== Hero do resumo do mês ===== */
.dhero { position: relative; border-radius: 24px; padding: 1px; margin-bottom: 16px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 50%, transparent),
    color-mix(in srgb, var(--accent) 35%, transparent) 45%, transparent 78%); }
.dhero-in { position: relative; border-radius: 23px; padding: 30px clamp(20px, 3vw, 36px);
  background: radial-gradient(720px 330px at 10% -20%, color-mix(in srgb, var(--brand) 24%, transparent), transparent 66%),
    radial-gradient(560px 300px at 94% 130%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%), var(--card);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent); }
.dhero-num { font-size: clamp(40px, 6vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1;
  margin: 12px 0 7px; font-variant-numeric: tabular-nums; }
.dhero-num em { font-style: normal; font-size: .44em; font-weight: 700; color: var(--muted); letter-spacing: -.02em; }
.dhero-sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.dhero-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 12%, transparent);
  overflow: hidden; max-width: 420px; }
.dhero-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, var(--brand), var(--accent)); animation: barWide .9s var(--dz) both; }
.dhero-pct { display: inline-block; margin-top: 9px; font-size: 11.5px; font-weight: 800; color: var(--brand); letter-spacing: .04em; }
.dhero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.d-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 13.5px; color: var(--text); border: 1px solid var(--hair);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  transition: transform .4s var(--dz), background .3s var(--dz); }
.d-ghost svg { width: 16px; height: 16px; }
.d-ghost:hover { background: color-mix(in srgb, var(--text) 11%, transparent); transform: translateY(-1px); }
.d-ghost:active { transform: scale(.98); }

/* ===== Painel da direita ===== */
.rail-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.rail-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; transition: background .3s var(--dz); }
.rail-row:hover { background: var(--wash); }
.feed { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.feed-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-radius: 10px; transition: background .3s var(--dz); }
.feed-row:hover { background: var(--wash); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--fc, var(--muted)); }
.feed-dot.executada { --fc: var(--green); } .feed-dot.retrabalho { --fc: #ffb020; }
.feed-dot.reprovada { --fc: var(--danger); } .feed-dot.sem_retorno { --fc: #8b93a1; }
.feed-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.feed-txt b { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-txt span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Portfólio em carrossel ===== */
.pf-wrap { position: relative; margin-top: 14px; }
.pf-row { display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding-bottom: 4px; scrollbar-width: none; }
.pf-row::-webkit-scrollbar { display: none; }
.pf-row .pf-card { flex: 0 0 170px; }
.pf-next { position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hair); background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--soft); transition: transform .4s var(--dz), background .3s var(--dz); z-index: 2; }
.pf-next svg { width: 16px; height: 16px; }
.pf-next:hover { background: color-mix(in srgb, var(--brand) 22%, var(--card)); }
.pf-next:active { transform: translateY(-50%) scale(.9); }

/* --- cabeçalho da página --- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 2px 0 22px; }
.d-eyebrow { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .2em; font-weight: 800;
  color: var(--brand); padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, transparent); }
.dash-head h1 { margin: 9px 0 3px; font-size: clamp(23px, 3vw, 31px); letter-spacing: -.02em; }
.dash-head .d-sub { color: var(--muted); font-size: 13.5px; margin: 0; }
.dash-month { display: inline-flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: var(--wash); border: 1px solid var(--hair); }
.dm-nav { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--card); color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: transform .4s var(--dz), background .3s var(--dz);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent); }
.dm-nav:hover { background: color-mix(in srgb, var(--brand) 24%, var(--card)); }
.dm-nav:active { transform: scale(.9); }
.dm-nav svg { width: 15px; height: 15px; }
#m-label { font-weight: 700; font-size: 13.5px; min-width: 146px; text-align: center; }

/* --- grade bento --- */
.d-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; align-items: start; }
.sp3 { grid-column: span 3; } .sp4 { grid-column: span 4; } .sp5 { grid-column: span 5; }
.sp6 { grid-column: span 6; } .sp7 { grid-column: span 7; } .sp8 { grid-column: span 8; }
.sp12 { grid-column: 1 / -1; }
@media (max-width: 1080px) { .sp3 { grid-column: span 6; } .sp4, .sp5, .sp6, .sp7, .sp8 { grid-column: 1 / -1; } }
@media (max-width: 540px) { .sp3 { grid-column: 1 / -1; } }

/* --- cards de métrica --- */
.kpi .d-core { display: flex; flex-direction: column; gap: 9px; min-height: 138px;
  background: radial-gradient(130px 130px at 100% 0%, color-mix(in srgb, var(--k) 24%, transparent), transparent 70%), var(--card); }
.kpi .k-ico { position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: var(--k); background: color-mix(in srgb, var(--k) 15%, transparent); }
.kpi .k-ico svg { width: 19px; height: 19px; }
.kpi b { font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: auto; }
.kpi .k-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--muted); align-self: flex-start; }
.kpi .k-lbl[data-tip] { cursor: help; text-decoration: underline dotted color-mix(in srgb, var(--muted) 55%, transparent); text-underline-offset: 4px; }
.kpi .k-lbl[data-tip]:hover { color: var(--text); }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.kpi.k1 { --k: var(--brand); } .kpi.k2 { --k: var(--accent); } .kpi.k3 { --k: #8b7bf6; } .kpi.k4 { --k: var(--green); }

/* --- gráfico de barras (produção por dia) --- */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 148px; margin-top: 16px; }
.ch-bar { flex: 1; min-width: 0; border-radius: 5px 5px 3px 3px; transform-origin: bottom; position: relative;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 40%, transparent));
  animation: barGrow .7s var(--dz) both; animation-delay: calc(var(--i) * 12ms); transition: filter .25s var(--dz); }
.ch-bar.zero { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ch-bar:hover { filter: brightness(1.25); }
.ch-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); opacity: 0;
  pointer-events: none; background: var(--card); border: 1px solid var(--hair); border-radius: 9px; padding: 5px 10px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--soft); transition: .25s var(--dz); z-index: 3; }
.ch-bar:hover .ch-tip { opacity: 1; transform: translateX(-50%); }
.chart-axis { display: flex; gap: 3px; margin-top: 9px; }
.chart-axis span { flex: 1; min-width: 0; text-align: center; font-size: 9.5px; color: var(--muted); font-weight: 700; }

/* --- anel da meta --- */
.meta-ring { display: flex; align-items: center; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.ring { position: relative; width: 130px; height: 130px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .r-bg { stroke: color-mix(in srgb, var(--text) 10%, transparent); }
.ring .r-fg { stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--dz); }
.ring-mid { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.ring-mid b { font-size: 27px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.ring-mid span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 800; margin-top: 5px; }
.meta-facts { display: flex; flex-direction: column; gap: 12px; min-width: 110px; }
.meta-fact b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; line-height: 1; }
.meta-fact span { font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 800; }
.meta-ok { color: var(--green); font-weight: 800; font-size: 12.5px; }
.meta-set { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); }

/* --- barras por categoria --- */
.cat-list { display: flex; flex-direction: column; gap: 3px; margin-top: 14px; }
.cat-row { display: grid; grid-template-columns: 22px minmax(88px, 148px) 1fr auto; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 11px; transition: background .3s var(--dz);
  animation: dashIn .5s var(--dz) both; animation-delay: calc(var(--i) * 45ms); }
.cat-row:hover { background: var(--wash); }
.cat-rank { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 10.5px;
  font-weight: 800; background: var(--wash); color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-row.top .cat-rank { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand); }
.cat-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-bar { height: 8px; border-radius: 999px; min-width: 60px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 8%, transparent); }
.cat-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 45%, transparent);
  animation: barWide .8s var(--dz) both; animation-delay: calc(var(--i) * 45ms); }
.cat-val { font-size: 14px; font-weight: 800; text-align: right; min-width: 50px; font-variant-numeric: tabular-nums; }
.cat-val i { display: block; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 620px) {
  .cat-row { grid-template-columns: 22px 1fr auto; row-gap: 8px; }
  .cat-bar { grid-column: 1 / -1; }
}

/* --- pódio + lista de ranking --- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; margin: 16px 0 6px; }
.pod { text-align: center; }
.pod .p-av { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 9px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--pc); }
.pod.p1 .p-av { width: 66px; height: 66px; font-size: 22px; }
.pod .p-av img { width: 100%; height: 100%; object-fit: cover; }
.pod .p-name { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .p-total { font-size: 17px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.pod .p-pos { font-size: 9.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.pod.p1 { --pc: #f5b301; } .pod.p2 { --pc: #aab2bd; } .pod.p3 { --pc: #cd7f32; }
.rank-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.rank-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; transition: background .3s var(--dz); }
.rank-row:hover { background: var(--wash); }
.rank-pos { width: 22px; text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.rank-av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 12.5px; }
.rank-av img { width: 100%; height: 100%; object-fit: cover; }
.rank-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-total { font-weight: 800; color: var(--brand); flex: none; font-variant-numeric: tabular-nums; }

/* --- linhas de atividade --- */
.act-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--wash);
  border: 1px solid transparent; transition: border-color .3s var(--dz), background .3s var(--dz); flex-wrap: wrap; }
.act-row:hover { border-color: var(--hair); }
.ar-date { font-size: 11px; font-weight: 800; color: var(--muted); width: 50px; flex: none; font-variant-numeric: tabular-nums; }
.ar-cat { font-weight: 700; font-size: 13.5px; }
.ar-x { color: var(--brand); font-weight: 800; font-size: 12px; }
.ar-user { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.ar-proj { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-min { font-size: 11.5px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.ar-del, .ar-edit { border: none; background: transparent; color: var(--muted); cursor: pointer; width: 26px; height: 26px;
  border-radius: 8px; display: grid; place-items: center; flex: none; transition: .3s var(--dz); }
.ar-del svg, .ar-edit svg { width: 13px; height: 13px; }
.ar-del:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.ar-edit:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
/* barra "editando registro" acima do formulário */
.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-size: 12.5px; font-weight: 700;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand); }
.edit-bar[hidden] { display: none; }
.edit-bar button { border: none; background: transparent; color: var(--muted); font: inherit; font-weight: 700;
  font-size: 12px; cursor: pointer; padding: 4px 10px; border-radius: 8px; transition: .2s var(--dz); }
.edit-bar button:hover { background: var(--wash); color: var(--text); }
.d-chip { font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.d-chip.executada { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.d-chip.retrabalho { background: color-mix(in srgb, #ffb020 20%, transparent); color: #e6a010; }
.d-chip.reprovada { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.d-chip.sem_retorno { background: var(--wash); color: var(--muted); border: 1px solid var(--hair); }

/* --- formulário --- */
.d-form { display: flex; flex-direction: column; gap: 18px; }
.f-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .f-row { grid-template-columns: 1fr; } }
.f-lbl { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.d-input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--hair); background: var(--wash);
  color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .3s var(--dz), box-shadow .3s var(--dz); }
.d-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
/* select do site (customselect) dentro do formulário da dash */
.d-form .cs-wrap { display: block; width: 100%; }
.d-form .cs-trigger { width: 100%; padding: 11px 13px; border-radius: 12px; font-size: 14px;
  border: 1px solid var(--hair); background: var(--wash); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.d-form .cs-trigger:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--hair)); background: var(--wash); }
.d-form .cs-trigger.open { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* --- date picker próprio (substitui o calendário nativo) --- */
.dp { position: relative; }
.dp-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.dp-field svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.dp-field:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--hair)); }
.dp-field[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.dp-pop { position: absolute; z-index: 70; top: calc(100% + 8px); left: 0; width: min(300px, 86vw);
  background: var(--wash); border: 1px solid var(--hair); border-radius: 18px; padding: 5px; box-shadow: var(--soft);
  animation: dashIn .2s var(--dz) both; }
.dp-core { background: var(--card); border-radius: 14px; padding: 12px; box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 7%, transparent); }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.dp-head b { font-size: 13.5px; letter-spacing: -.01em; }
.dp-nav { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--wash); color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: transform .35s var(--dz), background .3s var(--dz); }
.dp-nav svg { width: 14px; height: 14px; }
.dp-nav:hover { background: color-mix(in srgb, var(--brand) 22%, var(--card)); }
.dp-nav:active { transform: scale(.9); }
.dp-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-bottom: 5px; }
.dp-wd span { text-align: center; font-size: 9.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.dp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dp-day { min-width: 0; padding: 0; aspect-ratio: 1 / 1; border: none; background: transparent; color: var(--text); border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; display: grid; place-items: center;
  transition: background .2s var(--dz), color .2s var(--dz), transform .3s var(--dz); }
.dp-day:hover { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.dp-day:active { transform: scale(.9); }
.dp-day.empty { pointer-events: none; }
.dp-day.today { box-shadow: inset 0 0 0 1.4px color-mix(in srgb, var(--brand) 55%, transparent); color: var(--brand); }
.dp-day.sel { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-weight: 800;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 90%, transparent); }
.dp-foot { display: flex; justify-content: flex-end; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--hair); }
.dp-today { border: none; background: transparent; color: var(--brand); font: inherit; font-weight: 800; font-size: 12px;
  cursor: pointer; padding: 5px 11px; border-radius: 8px; transition: background .2s var(--dz); }
.dp-today:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }

/* select: seta própria + popup legível no tema escuro */
select.d-input { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 13px; }
select.d-input option { background-color: var(--card); color: var(--text); }
/* data: ícone do calendário acompanha o tema (nada de preto no fundo cinza) */
.d-input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; border-radius: 6px; padding: 3px;
  transition: opacity .2s var(--dz), background .2s var(--dz); }
.d-input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: color-mix(in srgb, var(--brand) 25%, transparent); }
.seg { display: flex; flex-wrap: wrap; gap: 7px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--hair); background: var(--wash);
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .3s var(--dz); }
.seg span:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--hair)); }
.seg input:checked + span { background: color-mix(in srgb, var(--brand) 18%, transparent); border-color: var(--brand); color: var(--brand); }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--hair); background: var(--wash); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--card); color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: transform .35s var(--dz), background .3s var(--dz); }
.stepper button svg { width: 14px; height: 14px; }
.stepper button:hover { background: color-mix(in srgb, var(--brand) 22%, var(--card)); }
.stepper button:active { transform: scale(.88); }
.stepper input { width: 54px; text-align: center; border: none; background: transparent; color: var(--text); font: inherit;
  font-weight: 800; font-size: 16px; outline: none; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d-cta { display: inline-flex; align-items: center; gap: 10px; padding: 10px 11px 10px 22px; border-radius: 999px; border: none;
  cursor: pointer; font: inherit; font-weight: 800; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--brand) 90%, transparent);
  transition: transform .4s var(--dz), box-shadow .4s var(--dz); }
.d-cta:hover { transform: translateY(-1px); }
.d-cta:active { transform: scale(.98); }
.d-cta:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.d-cta i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center;
  transition: transform .4s var(--dz); }
.d-cta i svg { width: 15px; height: 15px; }
.d-cta:hover i { transform: translateX(2px); }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* --- calendário (mapa de calor) --- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 2px; }
.cal-head span { text-align: center; font-size: 9.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.cal-cell { position: relative; min-height: 84px; border-radius: 11px; border: 1px solid var(--hair); background: var(--wash);
  color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 7px 8px; font: inherit; text-align: left; overflow: hidden;
  transition: transform .4s var(--dz), border-color .3s var(--dz), box-shadow .3s var(--dz); }
.cal-cell.empty { min-height: 0; }
/* etiquetas das demandas dentro do dia */
.cal-chips { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.cal-chip { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.cal-cell.lv3 .cal-chip, .cal-cell.lv4 .cal-chip { background: rgba(255, 255, 255, .22); color: #fff; }
.cal-more { font-size: 9.5px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.cal-cell.lv3 .cal-more, .cal-cell.lv4 .cal-more { color: rgba(255, 255, 255, .8); }
/* alternador Mês / Semana */
.cal-modes { display: inline-flex; gap: 3px; padding: 4px; border-radius: 999px; background: var(--wash); border: 1px solid var(--hair); }
.cal-modes button { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .3s var(--dz), color .3s var(--dz); }
.cal-modes button.on { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
/* visão semanal */
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wk-col { display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 10px; border-radius: 12px;
  border: 1px solid var(--hair); background: var(--wash); }
.wk-col.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent); }
.wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding-bottom: 7px;
  border-bottom: 1px solid var(--hair); }
.wk-dow { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.wk-num { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wk-col.today .wk-num { color: var(--brand); }
.wk-item { font-size: 11px; font-weight: 700; padding: 6px 8px; border-radius: 8px; border-left: 3px solid var(--wc, var(--muted));
  background: color-mix(in srgb, var(--text) 6%, transparent); }
.wk-item span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.wk-item.executada { --wc: var(--green); } .wk-item.retrabalho { --wc: #ffb020; }
.wk-item.reprovada { --wc: var(--danger); } .wk-item.sem_retorno { --wc: #8b93a1; }
.wk-empty { font-size: 10.5px; color: var(--muted); text-align: center; margin: auto 0; }
.cal-cell:hover { transform: translateY(-2px); border-color: var(--brand); }
.cal-cell.empty { border: none; background: transparent; pointer-events: none; }
.cal-num { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-cell.lv1 { background: color-mix(in srgb, var(--brand) 15%, transparent); }
.cal-cell.lv2 { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.cal-cell.lv3 { background: color-mix(in srgb, var(--brand) 48%, transparent); }
.cal-cell.lv4 { background: color-mix(in srgb, var(--brand) 70%, transparent); }
.cal-cell.lv3 .cal-num, .cal-cell.lv4 .cal-num, .cal-cell.lv3 .cal-badge, .cal-cell.lv4 .cal-badge { color: #fff; }
.cal-cell.today { box-shadow: inset 0 0 0 1.6px var(--brand); }
.cal-cell.today .cal-num { color: var(--brand); }
.cal-cell.selected { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cal-badge { font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); }
.cal-legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 14px; font-size: 10.5px;
  color: var(--muted); font-weight: 700; }
.cal-legend i { width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--hair); display: inline-block; }
.day-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.day-panel h4 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }


.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 60px; }
.card-img { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: 0.18s; }
.card-img:hover { border-color: var(--brand); transform: translateY(-3px); background: var(--card-hover); }
.thumb { aspect-ratio: 4 / 3; width: 100%; object-fit: cover;
  background: repeating-conic-gradient(#26262a 0% 25%, #1c1c1f 0% 50%) 50% / 22px 22px; }
.card-body { padding: 12px 14px; }
.card-title { font-weight: 600; font-size: 15px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.role-editor { --accent: #35d0a5; }
.role-designer { --accent: #b06cff; }
.role-webdesigner { --accent: #ff9e4d; }

.empty { text-align: center; color: var(--muted); padding: 40px; }
.empty a { color: var(--brand); }

/* Galeria em grade uniforme com proporção FIXA (3/4). O espaço de cada imagem já
   fica reservado antes dela carregar → a página não "pula" (evita CLS). */
/* Galeria masonry.
   BASE = layout de COLUNAS CSS (funciona SEM nenhum JS): empacotamento justo,
   sem buracos. É a rede de segurança — se o nav.js não carregar/rodar, ainda
   fica bonito (nunca vira grid quebrado).
   O layoutMasonry (nav.js) adiciona a classe .js-masonry e assume o layout,
   posicionando os cards de forma absoluta e fazendo banners ocuparem 2 colunas. */
.gallery-masonry { column-width: 210px; column-gap: 14px; margin-bottom: 60px; }
.gallery-masonry .card-img { display: block; width: 100%; margin: 0 0 14px;
  break-inside: avoid; -webkit-column-break-inside: avoid; }
.gallery-masonry .card-img .thumb { width: 100%; height: auto; aspect-ratio: auto; display: block; background: var(--bg-soft); }
@media (max-width: 600px) { .gallery-masonry:not(.js-masonry) { column-width: auto; column-count: 2; } }
/* Modo JS (masonry posicionado): desliga as colunas e usa posição absoluta. */
.gallery-masonry.js-masonry { columns: auto; column-width: auto; column-count: auto; position: relative; }
.gallery-masonry.js-masonry .card-img { position: absolute; top: 0; left: 0; width: auto; margin: 0; }

/* Overlay ao passar o mouse na imagem */
.card-hover { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px; opacity: 0; transition: opacity 0.2s var(--ease); pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, transparent 28%, transparent 52%, rgba(0,0,0,0.82) 100%); }
.card-img:hover .card-hover { opacity: 1; }
.ch-top, .ch-bottom { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ch-avatar, .ch-proj { width: 27px; height: 27px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 1.5px solid rgba(255,255,255,0.65); }
.ch-avatar { border-radius: 50%; }
.ch-proj { border-radius: 7px; }
.ch-avatar img, .ch-proj img { width: 100%; height: 100%; object-fit: cover; }
.ch-name { color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,0.7); }
.ch-title { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,0.75); }

/* Ícone de fogo (Em Alta) */
.fire-ico { width: 16px; height: 16px; vertical-align: -3px; }
.hot-badge .fire-ico { width: 13px; height: 13px; vertical-align: -2px; }

/* Em Alta — carrossel */
#hot-section .section-head h2 { display: inline-flex; align-items: center; gap: 6px; }
/* min-height reserva o espaço do carrossel ANTES de carregar (evita o "pula-pula"/CLS).
   A altura fixa do thumb (300px) deixa a reserva exata em qualquer largura de tela. */
.hot-carousel { overflow: hidden; min-height: 300px; }
.hot-track { display: flex; gap: 14px; transition: transform 0.6s var(--ease); }
.hot-track > .card-img { flex: 0 0 calc((100% - 56px) / 5); }
.hot-track .thumb { height: 300px; aspect-ratio: auto; }
@media (max-width: 600px) { .hot-carousel { min-height: 260px; } .hot-track .thumb { height: 260px; } }
@media (max-width: 900px) { .hot-track > .card-img { flex-basis: calc((100% - 28px) / 3); } }
@media (max-width: 600px) { .hot-track > .card-img { flex-basis: calc((100% - 14px) / 2); } }

.hot-card { position: relative; }
.hot-badge { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff6a00, #ff2d55); box-shadow: 0 4px 12px rgba(255, 45, 85, 0.35); }

/* ================= Modal ================= */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  max-width: 900px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer; font-size: 16px; }
.modal-body { display: grid; grid-template-columns: 1.3fr 1fr; }
.modal-preview { background: #0d0d0f; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-preview img { max-height: 70vh; border-radius: 8px; }
.modal-info { padding: 28px; }
.modal-info h2 { margin: 0 0 8px; font-size: 24px; }
.modal-info .desc { color: var(--muted); margin: 0 0 18px; }
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.info-row span:first-child { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tag { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); padding: 4px 10px; border-radius: 20px; font-size: 12px; transition: 0.15s; }
a.tag:hover { border-color: var(--brand); color: var(--brand); }
.fav-btn.active { border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.hot-badge.dl-badge { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.modal-info .btn { width: 100%; margin-top: 18px; font-size: 15px; padding: 13px; }

/* ================= Formulários / Auth ================= */
.page-wrap { max-width: 760px; margin: 40px auto 80px; padding: 0 20px; }
.auth-wrap { max-width: 440px; }
.page-wrap h1 { font-size: 30px; margin: 0 0 6px; }
.page-wrap .sub { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.form input, .form select, .form textarea { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 14px; outline: none; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
/* Campos ocupam a largura total e podem encolher — evita estouro em telas estreitas */
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-width: 0; }
.grid-2 > * { min-width: 0; }
.form hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }
.section-title { margin: 0; font-size: 16px; }

.dropzone { display: block; width: 100%; border: 2px dashed var(--line); border-radius: 14px; padding: 30px; text-align: center; cursor: pointer;
  transition: 0.15s; background: var(--bg-soft); position: relative; overflow: hidden; }
.mode-block { min-width: 0; }
.dropzone.dragover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.dz-empty b { color: var(--text); font-size: 16px; }
.dz-icon { font-size: 30px; }
.dz-preview { max-width: 100%; max-height: 240px; margin: 0 auto; border-radius: 10px; display: block; }
.dz-video { width: 100%; max-height: 320px; background: #000; }

/* Opções de capa do vídeo (escolha do produtor) */
.poster-picker { margin-top: 12px; }
.poster-options { display: flex; gap: 8px; flex-wrap: wrap; }
.poster-opt { padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--bg-soft); width: 92px; aspect-ratio: 16 / 10; transition: border-color 0.15s; }
.poster-opt:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.poster-opt.selected { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.poster-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Campo de arquivo editável/fonte (opcional) */
.dz-source { padding: 18px; }
.dz-source-empty { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); }
.dz-source-empty b { color: var(--text); font-size: 14px; }
.dz-source-file { font-size: 14px; color: var(--text); }
.src-clear { display: inline-flex; margin-left: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--card-hover);
  color: var(--muted); align-items: center; justify-content: center; cursor: pointer; font-size: 11px; vertical-align: middle; }
.src-clear:hover { background: var(--danger); color: #fff; }

/* Seletor de modo de envio (admin) */
.mode-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-opt { flex: 1 1 auto; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--muted); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.15s; white-space: nowrap; }
.mode-opt:hover { color: var(--text); border-color: var(--card-hover); }
.mode-opt.active { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  background: color-mix(in srgb, var(--brand) 12%, transparent); }

/* Prévias das várias imagens (webdesigner) */
.gallery-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.gallery-prev { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; }
.gallery-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-prev.is-cover { outline: 2px solid var(--brand); outline-offset: -2px; }
.gallery-prev.dragging { opacity: 0.4; }
.gallery-prev.drag-over { outline: 2px dashed var(--brand); outline-offset: -2px; }
.cover-tag { position: absolute; left: 6px; bottom: 6px; background: var(--brand); color: #1a1200; font-size: 10px;
  font-weight: 800; padding: 2px 7px; border-radius: 20px; pointer-events: none; }
.gallery-prev .btn-cover { position: absolute; left: 4px; right: 4px; bottom: 4px; background: rgba(0,0,0,0.7); color: #fff;
  font-size: 10.5px; font-weight: 700; text-align: center; padding: 5px 4px; border: none; border-radius: 6px; cursor: pointer;
  font-family: inherit; transition: background 0.15s; }
.gallery-prev .btn-cover:hover { background: var(--brand); color: #1a1200; }
.gallery-prev .rm-img { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.gallery-prev .rm-img:hover { background: var(--danger); }
.gallery-hint { margin: 4px 0 0; }

.form-footer { display: flex; align-items: center; gap: 12px 16px; margin-top: 8px; flex-wrap: wrap; }

/* Barra de progresso do envio */
.upload-progress { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.up-track { flex: 1; height: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.up-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.2s ease; }
.up-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; min-width: 96px; text-align: right; }
.form-msg { font-size: 14px; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--danger); }

.tabs { display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 5px; margin-bottom: 20px; }
.tabs button { flex: 1; padding: 10px; border: none; background: transparent; color: var(--muted); font-weight: 600; border-radius: 8px; cursor: pointer; }
.tabs button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 7px;
  border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.pending-row { align-items: center; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-switch a { color: var(--brand); cursor: pointer; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* Campo de checkbox estilizado (aceite de termos) */
.checkbox-field { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; margin: 4px 0 8px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
  transition: border-color 0.15s, background 0.15s; }
.checkbox-field:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.checkbox-field > input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-box { flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: #fff; margin-top: 1px; transition: background 0.15s, border-color 0.15s; }
.cf-box svg { color: #fff; }
/* O "✓" se DESENHA quando marca (stroke-dashoffset) e a caixa dá um "pop". */
.cf-box svg polyline { stroke-dasharray: 26; stroke-dashoffset: 26; transition: stroke-dashoffset 0.3s var(--ease) 0.05s; }
.checkbox-field > input:checked + .cf-box { background: var(--brand); border-color: var(--brand); animation: cfPop 0.24s var(--ease); }
.checkbox-field > input:checked + .cf-box svg polyline { stroke-dashoffset: 0; }
@keyframes cfPop { 0% { transform: scale(0.82); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }
.checkbox-field > input:focus-visible + .cf-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
.cf-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cf-label { font-size: 14px; font-weight: 600; color: var(--text); }
.cf-req { color: var(--danger); }
.cf-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cf-desc a { color: var(--brand); text-decoration: none; }
.cf-desc a:hover { text-decoration: underline; }
/* Feedback de validação animado (aparece com fade + slide) */
.cf-error { font-size: 12.5px; color: var(--danger); font-weight: 600; margin-top: 3px; display: inline-flex; align-items: center; gap: 5px;
  animation: cfErrIn 0.28s var(--ease); }
.cf-error::before { content: ""; width: 14px; height: 14px; flex-shrink: 0;
  background: currentColor; -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm-1 5h2v7h-2Zm0 9h2v2h-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Zm-1 5h2v7h-2Zm0 9h2v2h-2Z'/%3E%3C/svg%3E"); }
@keyframes cfErrIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.checkbox-field.has-error { animation: cfShake 0.3s var(--ease); }
@keyframes cfShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.checkbox-field.has-error { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.checkbox-field.has-error .cf-box { border-color: var(--danger); }

/* Página de login/cadastro (uma seção por vez) */
.auth-page { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; position: relative; }
.auth-page::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1px 1px at 15% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 80% 25%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 65% 60%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 30% 75%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,.3), transparent);
}
:root[data-theme="light"] .auth-page::before { background: none; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 430px; padding: 34px 30px; overflow: hidden; animation: popIn 0.35s var(--ease) both; }
.auth-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.auth-card h1 { text-align: center; font-size: 24px; margin: 6px 0 6px; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 0 0 24px; font-size: 14px; }

/* ===== Login/Cadastro — visual reformulado (estilo da referência) ===== */
.auth-card { max-width: 460px; padding: 42px 36px; }
.auth-card::before { display: none; }                 /* remove a faixa colorida do topo */
.auth-card h1 { font-size: clamp(34px, 8vw, 46px); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; line-height: 1.02; margin: 0 0 10px; }
.auth-card .sub { max-width: 340px; margin: 0 auto 30px; }
.auth-card .form { gap: 20px; }
.auth-card .field label { text-transform: uppercase; letter-spacing: .6px; font-size: 12px; font-weight: 700; }
.auth-card .form input:not([type="checkbox"]) {
  background: color-mix(in srgb, var(--bg-soft) 65%, #000 35%);
  border: 1px solid transparent; border-radius: 10px; padding: 15px 16px; font-size: 15px; font-weight: 600;
}
.auth-card .form input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 500; }
.auth-card .form input:not([type="checkbox"]):focus {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

/* Campo com ícone de validação (✓ verde / ✕ vermelho) */
.input-wrap { position: relative; }
.auth-card .input-wrap input { padding-right: 46px !important; }
.field-status {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 900;
}
.field-status.ok, .field-status.bad { display: inline-flex; animation: popIn .25s var(--ease); }
.field-status.ok { background: var(--green); }
.field-status.bad { background: var(--danger); }
.field-status.ok::before { content: "✓"; }
.field-status.bad::before { content: "✕"; }
.input-wrap:has(.field-status.bad) input { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }

/* Botão mostrar/ocultar senha (ícone SVG) dentro do campo */
.input-wrap.has-pw input, .auth-card .input-wrap.has-pw input { padding-right: 76px !important; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none;
  cursor: pointer; color: var(--muted); padding: 6px; display: inline-flex; align-items: center; border-radius: 8px; transition: color .15s, background .15s; }
.pw-toggle:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.pw-toggle svg { width: 20px; height: 20px; display: block; }
.input-wrap.has-pw .field-status { right: 44px; }

/* Balãozinho de erro (ex.: "Senha incorreta") — ABAIXO do campo, nunca sai da tela */
.field-error-bubble {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; max-width: 100%;
  background: color-mix(in srgb, var(--danger) 14%, var(--bg-soft));
  border: 1px solid color-mix(in srgb, var(--danger) 42%, transparent); color: var(--danger);
  font-size: 13px; font-weight: 700; padding: 9px 13px 9px 11px; border-radius: 11px;
  box-shadow: var(--shadow); animation: cfErrIn .25s var(--ease);
}
.field-error-bubble::before {
  content: "✕"; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Botão principal — azul grande (estilo da referência) */
.auth-card .btn-primary {
  background: linear-gradient(180deg, #3ba2ff 0%, #1f8bef 100%);
  color: #fff; text-transform: uppercase; font-weight: 800; letter-spacing: 1.2px; border-radius: 10px;
  box-shadow: 0 10px 22px rgba(31, 139, 239, .30), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.auth-card .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 30px rgba(31, 139, 239, .42), inset 0 1px 0 rgba(255, 255, 255, .28); }

/* Linha "Recuperar senha" (botão vermelho + texto de ajuda) */
.reset-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.btn-reset {
  flex: none; background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  text-transform: uppercase; font-weight: 800; font-size: 12px; letter-spacing: .5px;
  padding: 10px 14px; border-radius: 9px; cursor: pointer; transition: .15s;
}
.btn-reset:hover { background: color-mix(in srgb, var(--danger) 30%, transparent); }
.reset-help { color: var(--muted); font-size: 13px; line-height: 1.35; }

@media (max-width: 760px) {
  .field-error-bubble { position: static; transform: none; left: auto; margin-top: 8px; white-space: normal; }
}

.notice { background: color-mix(in srgb, var(--brand) 10%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 12px; padding: 14px 16px; color: var(--text); font-size: 14px; margin-bottom: 20px; }

/* ================= Página de projeto (sidebar + resultados) ================= */
.project-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; max-width: 1320px; margin: 24px auto 60px; padding: 0 clamp(14px, 3vw, 36px); align-items: start; }
.filters-sidebar { position: sticky; top: 120px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.filters-sidebar h3 { margin: 0 0 14px; font-size: 15px; }
.filter-group { margin-bottom: 18px; }
.filter-group h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-item { text-align: left; padding: 8px 10px; border-radius: 8px; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.filter-item:hover { background: var(--card-hover); color: var(--text); }
.filter-item.active { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); font-weight: 600; }

.project-main { min-width: 0; }
.project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.project-head h1 { margin: 0 0 4px; font-size: 26px; }
.project-head select { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 13px; }
.muted-text { color: var(--muted); font-size: 13px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* Cards de "Meus envios" com ações de editar/remover */
/* min-width:0 deixa o card ENCOLHER no grid (senão o título "nowrap" força largura
   cheia e vira 1 coluna gigante no celular). Vale para o item e para o miolo. */
.upload-card { display: flex; flex-direction: column; min-width: 0; }
.upload-card .card-img { flex: 1; min-width: 0; }
.upload-card .card-body { min-width: 0; }
.upload-actions { display: flex; gap: 8px; margin-top: 8px; min-width: 0; }
.upload-actions .btn { flex: 1; min-width: 0; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.date-row { display: flex; gap: 8px; align-items: center; }
.date-row input { flex: 1; min-width: 0; }
.date-row .btn { flex-shrink: 0; }

/* ---------- Painel admin: lista de usuários + detalhe ---------- */
.user-search { margin-bottom: 12px; }
.user-search input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 14px; }
.user-rows { display: flex; flex-direction: column; gap: 6px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); cursor: pointer; transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.user-row:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--card-hover); }
.user-row .au-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.ur-ident { display: flex; flex-direction: column; min-width: 0; }
.ur-ident b { font-size: 14.5px; }
.ur-ident .au-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-meta { color: var(--muted); font-size: 12.5px; margin-left: auto; white-space: nowrap; }
.ur-go { color: var(--muted); font-size: 22px; line-height: 1; flex-shrink: 0; }
@media (max-width: 560px) { .ur-meta { display: none; } }

.user-detail #user-back { margin-bottom: 14px; }
.ud-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ud-head .avatar.big { width: 56px; height: 56px; font-size: 22px; flex-shrink: 0; }
.ud-ident { min-width: 0; }
.ud-ident h3 { margin: 0; font-size: 18px; }
.ud-head .au-tags { margin-left: auto; }
.ud-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ud-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-family: inherit; font-size: 14px; padding: 8px 12px; cursor: pointer; }
.ud-tab:hover { color: var(--text); }
.ud-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.req-admin-list { display: flex; flex-direction: column; gap: 8px; }
.req-admin-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--text); }
.req-admin-item:hover { border-color: var(--brand); }
.req-admin-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.rai-info { display: flex; flex-direction: column; min-width: 0; }
.rai-info b { font-size: 14px; }
.req-admin-item .pill { margin-left: auto; white-space: nowrap; }
.pill.req-pendente { background: #7a5b00; color: #ffd873; }
.pill.req-entregue { background: #14532d; color: #86efac; }
.pill.req-recusada { background: #5b1a1a; color: #fca5a5; }

/* ---------- Logs / auditoria (admin) ---------- */
.logs-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.logs-bar input { flex: 1; min-width: 160px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 14px; }
.log-rows { display: flex; flex-direction: column; }
.log-row { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: none; }
.log-ic { font-size: 17px; line-height: 1.5; flex-shrink: 0; width: 24px; text-align: center; }
.log-main { min-width: 0; }
.log-msg { font-size: 14px; line-height: 1.45; }
.log-meta { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill.log-tag { background: var(--card-hover); color: var(--muted); font-weight: 600; }

/* Botões de gerenciar o próprio arquivo (página de detalhe) */
.owner-actions { display: flex; gap: 8px; margin-top: 12px; }
.owner-actions .btn { flex: 1; }

/* Favicon (aba Aparência do painel admin) */
.favicon-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.favicon-preview { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); object-fit: contain; padding: 3px; }
.gallery-portrait { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery-portrait .thumb { aspect-ratio: 3 / 4; }

/* ================= Página de detalhes do arquivo ================= */
.detail-page { max-width: 1180px; margin: 24px auto 60px; padding: 0 clamp(14px, 3vw, 36px); }
.back-link { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 16px; }
.back-link:hover { color: var(--text); }
.detail-top { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: start; }
.detail-left { min-width: 0; }
.detail-preview { position: relative; background: #0d0d0f; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-in; }
.detail-preview img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.detail-preview:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Dica "ver em tela cheia": degradê no rodapé, só ao passar o mouse (desktop) */
.preview-hint {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 34px 14px 14px; color: #fff; font-size: 13.5px; font-weight: 600;
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
  opacity: 0; transform: translateY(8px); transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}
@media (hover: hover) {
  .detail-preview:hover .preview-hint, .detail-preview:focus-visible .preview-hint { opacity: 1; transform: none; }
}
/* Em telas de toque (celular) não há hover: a dica não aparece, só o clique abre */
@media (hover: none) { .preview-hint { display: none; } }

/* Visualizador em tela cheia (lightbox) */
.lightbox { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92); padding: 24px; cursor: zoom-out; animation: ccUp 0.2s var(--ease) both; }
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 12px 50px rgba(0,0,0,0.6); }
.lightbox-close { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.14); color: #fff; font-size: 20px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* Vídeo, galeria de miniaturas e botão "Ver site ao vivo" na página do arquivo */
.detail-preview.media-video { padding: 0; background: #000; cursor: default; }
.detail-preview.media-video video { width: 100%; max-height: 70vh; display: block; background: #000; border-radius: 8px; }
/* Setas do carrossel da galeria */
.media-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px);
  opacity: 0.85; transition: background 0.15s, opacity 0.15s; }
.media-nav:hover { background: rgba(0,0,0,0.8); opacity: 1; }
.media-nav.prev { left: 10px; }
.media-nav.next { right: 10px; }
@media (max-width: 480px) { .media-nav { width: 34px; height: 34px; } }
.media-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.media-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line);
  background: var(--bg-soft); cursor: pointer; padding: 0; flex: 0 0 auto; transition: border-color 0.15s; }
.media-thumb:hover { border-color: var(--card-hover); }
.media-thumb.active { border-color: var(--brand); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-site-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 2px 0 14px; }
/* Botão/box do arquivo editável (fonte) */
.src-dl { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin-top: 4px; line-height: 1.25; }
.src-meta { font-size: 12px; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.src-current { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; overflow-wrap: anywhere; }

/* Selo de vídeo/galeria nos cards */
.card-img { position: relative; }
.media-badge { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,0.62); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(3px); pointer-events: none; }
.play-badge { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.play-badge span { width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; backdrop-filter: blur(3px); }

/* Prévia de vídeo no hover: o <video> cobre o card e some/aparece com fade (leve). */
.card-video .thumb-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.25s; z-index: 1; background: #0d0d0f; pointer-events: none; }
.card-video.playing .thumb-video { opacity: 1; }

.detail-actions { display: flex; align-items: center; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.pillbtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; }
.pillbtn:hover { background: var(--card-hover); border-color: var(--brand); }

/* Botão "Salvar" = coração animado (Uiverse by catraco), adaptado ao layout */
.heart-container {
  --heart-color: rgb(255, 91, 137);
  position: relative;
  width: 38px;
  height: 38px;
  transition: .3s;
  flex: none;
}
.heart-container .checkbox {
  position: absolute; width: 100%; height: 100%; opacity: 0; z-index: 20; cursor: pointer;
}
.heart-container .svg-container {
  width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;
}
.heart-container .svg-outline,
.heart-container .svg-filled { fill: var(--heart-color); position: absolute; width: 26px; height: 26px; }
.heart-container .svg-filled { animation: keyframes-svg-filled 1s; display: none; }
.heart-container .svg-celebrate {
  position: absolute; animation: keyframes-svg-celebrate .5s; animation-fill-mode: forwards;
  display: none; stroke: var(--heart-color); fill: var(--heart-color); stroke-width: 2px;
}
.heart-container .checkbox:checked ~ .svg-container .svg-filled { display: block; }
.heart-container .checkbox:checked ~ .svg-container .svg-celebrate { display: block; }
@keyframes keyframes-svg-filled {
  0% { transform: scale(0); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); filter: brightness(1.5); }
}
@keyframes keyframes-svg-celebrate {
  0% { transform: scale(0); }
  50% { opacity: 1; filter: brightness(1.5); }
  100% { transform: scale(1.4); opacity: 0; display: none; }
}

.colors-box { margin: 6px 0 18px; }
.colors-title { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.colors { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 6px; }
.swatch { width: 46px; height: 46px; border-radius: 50%; background: var(--c); border: 1px solid var(--line); position: relative; padding: 0; cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.swatch:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.swatch-pct { position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); background: rgba(10, 13, 19, 0.82); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; line-height: 1.4; pointer-events: none; }
.title-swatch { display: inline-block; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); vertical-align: -4px; }

/* Tooltip das amostras de cor */
.color-tip { position: fixed; transform: translate(-50%, -100%); background: #121214; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; box-shadow: var(--shadow); z-index: 300; pointer-events: none; display: flex; flex-direction: column; gap: 1px; white-space: nowrap;
  font-size: 12.5px; opacity: 0; visibility: hidden; transition: opacity 0.12s var(--ease); }
.color-tip.show { opacity: 1; visibility: visible; }
.color-tip b { font-size: 13px; color: var(--text); }
.color-tip span { color: var(--muted); }
.color-tip .ct-hint { font-size: 11px; margin-top: 2px; }

.info-card { padding: 20px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.info-item span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.info-item b { font-size: 14px; }
.info-desc { color: var(--text); font-size: 14.5px; margin: 0 0 16px; line-height: 1.6; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
/* Ícones SVG inline (herdam a cor do texto quando monocromáticos) */
.svg-ic { width: 1.05em; height: 1.05em; vertical-align: -0.18em; }

.detail-side { position: sticky; top: 120px; }
.detail-title { font-size: 26px; margin: 0 0 12px; line-height: 1.25; }
.proj-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
/* Badge de destaque do PROJETO (na página do arquivo) */
/* Projeto da arte: só a foto e o nome — sem barra/fundo atrás. */
.proj-badge { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; max-width: 100%;
  color: var(--text); text-decoration: none; transition: color 0.18s; }
.proj-badge:hover { color: var(--brand); }
.proj-badge-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
  background: var(--bg-soft); color: var(--brand); font-weight: 700; font-size: 15px; }
.proj-badge-av img { width: 100%; height: 100%; object-fit: cover; }
.proj-badge-name { font-size: 15.5px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.features { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.features li { position: relative; padding-left: 26px; font-size: 14px; }
.features li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.download-cta { width: 100%; font-size: 16px; padding: 15px; }
.download-cta span { opacity: 0.8; font-weight: 500; }
.detail-side .tags { margin: 16px 0; }

.producer-box { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); transition: 0.15s; color: inherit; }
.producer-box:hover { border-color: var(--brand); background: var(--card-hover); }
.producer-box b { display: block; font-size: 15px; }
.avatar.big { width: 44px; height: 44px; font-size: 18px; }

.detail-related { margin-top: 48px; }
.detail-related .section-head h2 { font-size: 22px; }

@media (max-width: 860px) {
  .detail-top { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ================= Solicitação (na página do arquivo) ================= */
.cta-note { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; font-size: 14px; text-align: center; }
.cta-note.pending { border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.cta-note.refused { border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); margin-bottom: 10px; }
/* Modal de solicitação */
.modal-form-card { max-width: 480px; overflow: visible; }
.modal-form-body { padding: 28px; }
.modal-form-body h2 { margin: 0 0 4px; font-size: 22px; }
.modal-form-body textarea, .modal-form-body input { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font-size: 14px; font-family: inherit; outline: none; width: 100%; }
.modal-form-body textarea:focus, .modal-form-body input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* ================= Sino de notificações ================= */
.notif-wrap { position: relative; }
.notif-toggle { position: relative; }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.notif-panel { position: absolute; top: 48px; right: 0; width: 340px; max-width: 90vw; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); z-index: 45; overflow: hidden; }
.notif-panel[hidden] { display: none; }
.notif-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.notif-head h1 { margin: 0 0 4px; }
.notif-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--card-hover); }
.notif-item.unread { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.notif-item.unread .notif-msg::before { content: "●"; color: var(--brand); margin-right: 6px; font-size: 10px; vertical-align: middle; }
.notif-msg { font-size: 14px; line-height: 1.4; }
.notif-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; }

/* ================= Perfil público do produtor (estilo Designi) ================= */
.produtor-page { max-width: 1180px; margin: 0 auto 60px; padding: 0 clamp(14px, 3vw, 36px); }
.prod-top { margin-bottom: 8px; }

/* Banner com mosaico dos trabalhos */
.prod-banner { position: relative; height: 210px; border-radius: 0 0 18px 18px; overflow: hidden;
  margin: 0 calc(-1 * clamp(14px, 3vw, 36px));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--bg)), var(--bg)); }
.prod-mosaic { position: absolute; inset: 0; display: flex; gap: 6px; filter: blur(2px) brightness(0.5); transform: scale(1.06); }
.prod-mosaic img { height: 100%; flex: 1 0 140px; object-fit: cover; }
.prod-banner-fade { position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 25%, transparent) 0%, var(--bg) 100%); }

/* Card do avatar sobreposto ao banner */
.prod-card { position: relative; display: flex; align-items: flex-end; gap: 22px; margin-top: -62px; padding: 0 4px 4px; flex-wrap: wrap; }
.prod-avatar { width: 120px; height: 120px; border-radius: 24px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 4px solid var(--bg); box-shadow: var(--shadow); }
.prod-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prod-avatar .avatar-initial { color: #fff; font-size: 48px; font-weight: 800; }
.prod-headinfo { flex: 1; min-width: 0; padding-bottom: 6px; }
.prod-headinfo h1 { margin: 0 0 8px; font-size: 30px; }
.prod-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prod-edit { align-self: flex-end; }

/* Barra de estatísticas */
/* Paginação (envios do produtor) */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.pager button { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease); }
.pager button:hover:not(:disabled):not(.active) { border-color: var(--brand); color: var(--brand); }
.pager button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; cursor: default; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .pg-nav { font-size: 18px; line-height: 1; }
.pager .pg-gap { color: var(--muted); padding: 0 2px; user-select: none; }

.prod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 22px; }
.prod-stat { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.ps-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.ps-icon svg { display: block; }
.prod-stat b { font-size: 22px; display: block; line-height: 1.1; }
.prod-stat span { color: var(--muted); font-size: 13px; }

/* ================= Minha conta (layout com menu lateral) ================= */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; max-width: 1120px; margin: 24px auto 70px; padding: 0 clamp(14px, 3vw, 36px); align-items: start; }
.account-side { position: sticky; top: 120px; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; margin: 0 0 8px; padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; margin-bottom: 22px; }
.side-nav button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border-radius: 10px; border: none;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 500; font-family: inherit; }
.side-nav button:hover { background: var(--card-hover); color: var(--text); }
.side-nav button.active { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 600; }
.side-nav .si { width: 20px; text-align: center; }
.side-count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.side-nav button.active .side-count { background: var(--brand); color: #1a1200; }

.account-main { min-width: 0; }
.account-main h1 { font-size: 28px; margin: 0 0 4px; }
.account-main .sub { color: var(--muted); margin: 0 0 24px; }

.profile-cover { position: relative; height: 170px; border-radius: 16px; overflow: hidden; margin-bottom: -46px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, var(--bg)), var(--bg)); }
.cover-edit-btn { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(4px); transition: 0.15s; }
.cover-edit-btn:hover { background: rgba(0, 0, 0, 0.7); }

.profile-card { display: flex; align-items: center; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 30px; }
.profile-card-overlap { position: relative; z-index: 1; }

/* Capa (imagem única) no perfil público */
.prod-cover { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.pc-avatar { position: relative; width: 84px; height: 84px; border-radius: 50%; cursor: pointer; flex-shrink: 0; display: block; }
.pc-avatar-box { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.pc-avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.pc-avatar-box .avatar-initial { color: #fff; font-size: 36px; font-weight: 700; }
.pc-avatar-edit { position: absolute; bottom: 0; right: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; }
.pc-avatar:hover .pc-avatar-edit { background: var(--brand); }
.pc-meta { min-width: 0; }
.pc-meta h2 { margin: 0 0 4px; font-size: 22px; overflow-wrap: anywhere; }
.pc-email { color: var(--muted); margin: 0 0 10px; font-size: 14px; overflow-wrap: anywhere; }
.pc-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.pill.role { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }

/* ===== Perfil "hero" (avatar com anel + nível, barra de coins, tiles) ===== */
.profile-hero { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; margin-bottom: 28px; }
.profile-hero .profile-cover { height: 160px; border-radius: 0; margin-bottom: 0; }
.ph-body { position: relative; padding: 0 22px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ph-avatar.pc-avatar { width: 112px; height: 112px; margin: -60px 0 0; z-index: 2; }
.ph-avatar .pc-avatar-box { box-shadow: 0 0 0 4px var(--card), 0 0 0 7px color-mix(in srgb, var(--brand) 65%, transparent); }
.ph-avatar .pc-avatar-box .avatar-initial { font-size: 46px; }
.ph-level-badge { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); min-width: 30px; height: 26px;
  padding: 0 8px; border-radius: 999px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
  font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--card); box-shadow: 0 3px 10px color-mix(in srgb, var(--brand) 45%, transparent); z-index: 3; }
.ph-body h2 { margin: 14px 0 6px; font-size: 26px; }
.ph-body .pc-email { margin: 0 0 12px; }
.ph-body .pc-badges { justify-content: center; margin-bottom: 4px; align-items: center; }
/* Perfil público do produtor: mesmo hero, centralizado e com largura própria */
.prod-hero { max-width: 1040px; margin: 20px auto 0; }
.pill.prod-since { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); font-weight: 600; }
.prod-edit-hero { margin-top: 14px; }

.ph-level { width: 100%; max-width: 480px; margin: 18px auto 4px; }
.ph-level-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.ph-level-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ph-level-pct { font-size: 12.5px; color: var(--brand); font-weight: 800; flex: none; }
.ph-bar { height: 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.ph-bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .5s var(--ease); box-shadow: 0 0 12px color-mix(in srgb, var(--brand) 55%, transparent); }

.ph-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; margin-top: 22px; width: 100%; }
.ph-stat { flex: 1 1 84px; max-width: 130px; min-width: 78px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 8px; border-radius: 12px; }
.ph-stat:hover { background: var(--bg-soft); }
.ph-stat-ico { color: var(--brand); display: inline-flex; }
.ph-stat-ico svg { width: 20px; height: 20px; }
.ph-stat b { font-size: 17px; font-weight: 800; line-height: 1; }
.ph-stat-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Sidebar: contador suave (conquistas) + botão Sair no rodapé */
.side-count.side-count-soft { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand);
  border-radius: 999px; padding: 0 7px; width: auto; }
.side-logout { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--danger); font: inherit;
  font-weight: 600; cursor: pointer; margin-top: 4px; }
.side-logout:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.side-logout .si { width: 20px; text-align: center; }

@media (max-width: 600px) {
  .profile-hero .profile-cover { height: 120px; }
  .ph-avatar.pc-avatar { width: 92px; height: 92px; margin-top: -50px; }
  .ph-body h2 { font-size: 22px; }
  .ph-stat { flex-basis: 72px; padding: 10px 6px; }
  .ph-stat b { font-size: 15px; }
}

.account-section { margin-bottom: 28px; }
.acc-head { margin-bottom: 12px; }
.acc-head h3 { margin: 0; font-size: 16px; }
.acc-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.acc-head.danger h3 { color: var(--danger); }
.danger-card { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.danger-card b { display: block; margin-bottom: 4px; }

@media (max-width: 820px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; min-width: 0; }
  /* Menu da conta vira "chips" que QUEBRAM em várias linhas: todos os botões
     ficam sempre visíveis dentro da tela (nada some fora da borda). */
  .side-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  .side-nav button { white-space: nowrap; flex: 0 1 auto; padding: 9px 13px; }
}

/* ================= Solicitações (no perfil) ================= */
.req-filters { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-chip { padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.filter-chip:hover { color: var(--text); }
.filter-chip.active { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }

.request-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.rq-thumb { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; flex-shrink: 0;
  background: repeating-conic-gradient(#26262a 0% 25%, #1c1c1f 0% 50%) 50% / 16px 16px; }
.rq-info { flex: 1; min-width: 0; }
.rq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.rq-title { font-weight: 700; font-size: 16px; }
.rq-title:hover { color: var(--brand); }
.rq-line { display: flex; gap: 10px; font-size: 13px; margin-top: 6px; }
.rq-line span { color: var(--muted); min-width: 80px; }
.rq-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.rq-actions .btn { padding: 8px 14px; font-size: 13px; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.status-pendente { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.status-entregue { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.status-recusada { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

/* ================= Painel admin — visual profissional ================= */
.admin-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.admin-hero-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow); }
.admin-hero h1 { margin: 0 0 2px; font-size: 26px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stat { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.admin-stat .as-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
  background: color-mix(in srgb, var(--brand) 14%, transparent); }
.admin-stat b { font-size: 22px; display: block; line-height: 1.1; }
.admin-stat span:last-child { color: var(--muted); font-size: 13px; }

.tabs { gap: 4px; }

/* Cartão de usuário */
.admin-user { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.au-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.au-avatar { width: 46px; height: 46px; font-size: 18px; flex-shrink: 0; }
.au-ident { flex: 1; min-width: 0; }
.au-ident .u-name { width: 100%; max-width: 340px; font-size: 16px; font-weight: 700; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); }
.au-ident .u-name:hover { border-color: var(--line); }
.au-ident .u-name:focus { border-color: var(--brand); background: var(--bg-soft); outline: none; }
.au-email { color: var(--muted); font-size: 13px; margin-top: 2px; padding-left: 10px; }
.au-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.au-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.au-f { display: flex; flex-direction: column; gap: 5px; }
.au-f > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.au-f select, .au-f input { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 14px; outline: none; }
.au-f select:focus, .au-f input:focus { border-color: var(--brand); }

.au-perms-wrap { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 14px; }
.au-perms-title { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.au-perms { display: flex; flex-wrap: wrap; gap: 14px; }
.au-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Switch (toggle) */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line); border-radius: 24px; cursor: pointer; transition: 0.2s; }
.switch .slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Selos de status */
.pill.status-approved { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.pill.status-pending { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.pill.status-rejected { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

/* ================= Painel admin ================= */
.add-row { display: flex; gap: 10px; }
.add-row input { flex: 1; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); }
.admin-user { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.au-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.au-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.au-controls select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); }
.au-perms { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--brand); width: 16px; height: 16px; }
.remember-chk { display: flex; margin: 2px 0 14px; font-size: 13.5px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pill.admin { background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand); }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.admin-row .p-name { flex: 1; min-width: 160px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); }
.order-btns { display: flex; flex-direction: column; gap: 2px; }
.order-btns button { width: 26px; height: 18px; line-height: 1; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); border-radius: 5px; cursor: pointer; font-size: 9px; }
.order-btns button:disabled { opacity: 0.35; cursor: not-allowed; }
.order-num { width: 22px; text-align: center; color: var(--muted); font-weight: 700; }
.order-num.featured { color: var(--brand); }
/* Alça de arraste + indicadores de drop na ordenação de projetos */
.p-grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 30px;
  color: var(--muted); cursor: grab; border-radius: 6px; touch-action: none; }
.p-grip:hover { color: var(--brand); background: var(--card-hover); }
.p-grip:active { cursor: grabbing; }
.admin-row.dragging { opacity: .5; }
.admin-row.drag-over-top { box-shadow: inset 0 3px 0 -1px var(--brand); }
.admin-row.drag-over-bottom { box-shadow: inset 0 -3px 0 -1px var(--brand); }

/* Seção "Nossa equipe" — cabeçalho central + carrossel com selo de verificado */
.team-section { text-align: center; }
.team-head { max-width: 640px; margin: 0 auto 26px; }
.team-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.team-title { font-size: clamp(26px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -0.5px; }
.team-title span { color: var(--brand); }
.team-sub { color: var(--muted); margin: 0; font-size: 15px; }

.team-carousel { position: relative; }
.team-track { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; padding: 6px 4px; scrollbar-width: none; }
.team-track::-webkit-scrollbar { height: 0; }
.team-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: background 0.15s, border-color 0.15s, opacity 0.15s; }
.team-arrow:hover { background: var(--card-hover); border-color: var(--brand); }
.team-arrow.prev { left: -8px; }
.team-arrow.next { right: -8px; }
.team-arrow.hidden { opacity: 0; pointer-events: none; }

.team-card { flex: 0 0 auto; width: 170px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 26px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--text);
  transition: transform 0.18s, border-color 0.18s, background 0.18s; }
.team-card:hover { border-color: var(--brand); transform: translateY(-4px); background: var(--card-hover); }
.team-avatar-wrap { position: relative; margin-bottom: 8px; }
.team-avatar { width: 74px; height: 74px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 28px; font-weight: 700; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-avatar .avatar-initial { color: #fff; }
.team-verified { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; border: 3px solid var(--card); }
.team-card:hover .team-verified { border-color: var(--card-hover); }
.team-name { font-size: 15px; overflow-wrap: anywhere; max-width: 100%; }
.team-count { font-size: 12.5px; color: var(--muted); }
@media (max-width: 480px) { .team-card { width: 142px; padding: 20px 12px; } .team-arrow { width: 36px; height: 36px; } .team-arrow.prev { left: -4px; } .team-arrow.next { right: -4px; } }

/* ================= Conquistas (perfil) ================= */
.ach-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.ach-chip { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.ach-chip:hover { color: var(--text); border-color: var(--brand); }
.ach-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ach-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); position: relative; opacity: 0.62; filter: grayscale(0.5); transition: all 0.15s; }
.ach-card.done { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.ach-card.done::before { content: ''; position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 60%); }
.ach-ico { flex: none; width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--bg-soft); border-radius: 12px; color: var(--muted); }
.ach-ico svg { width: 26px; height: 26px; }
.ach-card.done .ach-ico { background: color-mix(in srgb, var(--brand) 16%, var(--bg-soft)); color: var(--brand); }
.ach-body { flex: 1; min-width: 0; }
.ach-title { font-weight: 800; font-size: 15px; color: var(--text); }
.ach-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ach-bar { height: 6px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 9px 0 4px; }
.ach-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ach-prog { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ach-when { font-size: 11.5px; color: var(--brand); font-weight: 700; margin-top: 6px; }
.ach-coins { flex: none; font-weight: 800; font-size: 13px; color: #f5b301; white-space: nowrap; }
.ach-card.secret .ach-title, .ach-card.secret .ach-desc { font-style: italic; }

/* Toast de conquista desbloqueada (comemorativo, discreto) */
.ach-toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.ach-toast { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--line));
  border-radius: 14px; padding: 12px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); max-width: 340px;
  animation: achpop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ach-toast .att-ico { flex: none; color: var(--brand); display: grid; place-items: center; }
.ach-toast .att-ico svg { width: 30px; height: 30px; }
.ach-toast .att-txt { min-width: 0; }
.ach-toast .att-k { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); }
.ach-toast .att-t { font-weight: 800; color: var(--text); }
.ach-toast .att-c { font-size: 12px; color: #f5b301; font-weight: 700; }
@keyframes achpop { from { transform: translateY(16px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* Ranking / mural de conquistas */
.rank-head { margin-bottom: 18px; }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--text); transition: all 0.15s; }
.rank-row:hover { border-color: var(--brand); transform: translateX(2px); }
.rank-row.top { border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--card)), var(--card)); }
.rank-pos { font-size: 20px; font-weight: 800; width: 40px; text-align: center; flex: none; color: var(--muted); }
.rank-row.top .rank-pos { font-size: 24px; }
.rank-av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 18px; font-weight: 700; }
.rank-av img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rank-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-role { font-size: 12px; color: var(--muted); }
.rank-stats { display: flex; gap: 14px; flex: none; font-weight: 700; font-size: 14px; }
.rank-badges { color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.rank-coins { color: #f5b301; display: inline-flex; align-items: center; gap: 5px; }
.rank-badges svg { width: 15px; height: 15px; }
@media (max-width: 480px) { .rank-stats { flex-direction: column; gap: 2px; font-size: 13px; text-align: right; } .rank-pos { width: 30px; } }

/* Autocomplete de produtores (estilo Google) abaixo da barra de busca.
   Fica no <body> (position:fixed) e é posicionado por JS — assim não é cortado
   pelo overflow:hidden do .hero. left/top/width vêm inline do script. */
.search-ac { position: fixed; z-index: 200;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); padding: 6px; }
.search-ac[hidden] { display: none; }
.sac-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; }
.sac-item:hover, .sac-item.active { background: var(--card-hover); }
.sac-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 16px; font-weight: 700; }
.sac-av img { width: 100%; height: 100%; object-fit: cover; }
.sac-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.sac-txt b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sac-sub { font-size: 12px; color: var(--muted); }
.sac-go { color: var(--muted); flex: none; }
.sac-item:hover .sac-go, .sac-item.active .sac-go { color: var(--brand); }
/* Autocomplete v2: seções (Recentes / Em alta), chip de categoria, thumb, ícone/limpar */
.search-ac { max-height: 62vh; overflow-y: auto; }
.sac-head { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 9px 12px 4px; }
.sac-head:first-child { padding-top: 4px; }
.sac-cat { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; flex: none; white-space: nowrap; }
.sac-item:hover .sac-cat, .sac-item.active .sac-cat { border-color: var(--brand); color: var(--brand); }
.sac-av.sac-thumb { border-radius: 8px; background: var(--bg-soft); }
.sac-av.sac-ico { background: var(--bg-soft); color: var(--muted); }
.sac-av.sac-ico svg { width: 17px; height: 17px; }
/* ícone de lupa injetado à esquerda (barras que não têm) + botão de limpar */
.search-ico { display: inline-flex; align-items: center; color: var(--muted); padding: 0 4px 0 8px; flex: none; }
.search-ico svg { width: 16px; height: 16px; }
.search-clear { border: none; background: transparent; color: var(--muted); cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; padding: 0; }
.search-clear:hover { background: var(--card-hover); color: var(--text); }
.search-clear svg { width: 14px; height: 14px; }

.footer { border-top: 1px solid var(--line); text-align: center; color: var(--muted); padding: 32px 24px; font-size: 13px; margin-top: 40px; }
.footer-logo { display: block; margin: 0 auto 14px; max-height: 75px; max-width: 260px; width: auto; }
.footer-text { margin: 0 auto; max-width: 640px; line-height: 1.6; white-space: pre-line; }
.footer-links { margin: 10px 0 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }

@media (max-width: 860px) {
  .project-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
}

/* ================= Responsivo ================= */
/* Utilitário: topsearch invisível (páginas internas) fica realmente oculto */
.topsearch[style*="hidden"] { display: none !important; }

@media (max-width: 1000px) { .cat-cards { grid-template-columns: repeat(3, 1fr); } }

/* ---- Tablet / celular grande ---- */
@media (max-width: 760px) {
  /* Evita rolagem horizontal no celular. Tem que ser no HTML *e* no body:
     só no body, o transbordo "escapa" para o <html> e a página ainda rola de lado
     (era o que fazia a tela "passar" da largura no celular). */
  html, body { overflow-x: hidden; }
  /* Cabeçalho em duas linhas. Mantém z-index alto (o topbar tem backdrop-filter, que
     cria contexto de empilhamento); sem isso o menu do usuário fica ATRÁS da home. */
  .topbar { position: relative; z-index: 40; flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .catnav { position: static; top: auto; padding: 8px 14px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .brand-logo { height: 26px; max-width: 150px; }
  .topright { margin-left: auto; gap: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .uname { display: none; }                    /* chip só com avatar */
  .topsearch { display: flex; order: 5; flex-basis: 100%; max-width: none; margin: 0; }

  .hero { padding: 40px 16px 26px; }
  .hero h1 { font-size: clamp(26px, 8vw, 40px); }
  .hero p { font-size: 15px; }
  .herosearch { flex-wrap: wrap; padding: 8px; }
  .herosearch input { flex: 1 1 140px; font-size: 15px; }
  .herosearch .divider, .herosearch select { display: none; }
  .herosearch .btn { flex: 1 1 100%; justify-content: center; }

  .cat-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gallery, .gallery-portrait { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  .modal { padding: 14px; }
  .modal-body { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  .tabs { overflow-x: auto; }
  .tabs button { white-space: nowrap; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Filtros da página de projeto viram chips horizontais */
  .filter-list { flex-direction: row; flex-wrap: wrap; }
  .filter-item { border: 1px solid var(--line); border-radius: 20px; padding: 7px 12px; }
  .filter-item.active { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

  /* Painel admin: linhas quebram melhor */
  .admin-row { gap: 8px; }
  .admin-row .p-name { flex: 1 1 100%; min-width: 0; }
  .au-controls { width: 100%; justify-content: flex-start; }

  /* --- Detalhe / edição de usuário (admin) no celular --- */
  .admin-tab .card { padding: 14px; }
  .user-detail { min-width: 0; }
  /* Cabeçalho: avatar + nome/e-mail + selos, tudo quebrando sem estourar */
  .ud-head { flex-wrap: wrap; gap: 10px 12px; }
  .ud-head .avatar.big { width: 46px; height: 46px; font-size: 18px; }
  .ud-ident { flex: 1 1 140px; min-width: 0; }
  .ud-ident h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .ud-head .au-email { display: block; padding-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .ud-head .au-tags { margin-left: 0; flex-basis: 100%; }  /* selos descem, não empurram */
  /* Abas roláveis na horizontal em vez de espremer */
  .ud-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ud-tabs::-webkit-scrollbar { height: 0; }
  .ud-tab { white-space: nowrap; flex: 0 0 auto; }
  /* Campos: uma coluna, largura total — nada corta */
  .au-grid { grid-template-columns: 1fr; gap: 12px; }
  .au-f input, .au-f select { width: 100%; max-width: none; }
  /* Botões de ação em largura total, empilhados */
  .au-actions { justify-content: stretch; }
  .au-actions .btn { flex: 1 1 100%; justify-content: center; }

  /* --- Página "Minha conta / Editar perfil" no celular --- */
  .card { padding: 16px; }                         /* mais respiro em telas pequenas */
  .account-main h1 { font-size: 23px; }
  .account-layout { margin-top: 14px; }
  .pc-avatar { width: 72px; height: 72px; }
  .pc-meta h2 { font-size: 19px; }
  /* Cartão do perfil empilha (foto em cima), sem estourar */
  .profile-card { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  /* Botão do rodapé do formulário ocupa a largura toda e a mensagem vai pra linha de baixo */
  .form-footer { align-items: stretch; }
  .form-footer .btn { width: 100%; justify-content: center; }
  .form-footer .form-msg { text-align: center; }
  /* Campo com botão ao lado (código de verificação): botão desce se faltar espaço */
  .date-row { flex-wrap: wrap; }
  .date-row input { flex: 1 1 140px; }
  .date-row .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- Celular pequeno ---- */
@media (max-width: 480px) {
  .cat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery, .gallery-portrait { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero h1 { font-size: 26px; }
  .card-body { padding: 10px 11px; }
  .card-title { font-size: 14px; }

  .prod-banner { height: 150px; }
  .prod-card { margin-top: -52px; gap: 14px; }
  .prod-avatar { width: 88px; height: 88px; border-radius: 20px; }
  .prod-headinfo h1 { font-size: 22px; }
  .prod-stats { grid-template-columns: 1fr; }
  .profile-cover { height: 130px; margin-bottom: -40px; }

  .modal-info { padding: 20px; }
  .modal-form-body { padding: 20px; }
  .card { padding: 18px; }

  .request-card { flex-direction: column; }
  .rq-thumb { width: 100%; height: 150px; }
  .rq-actions { flex-direction: column; }
  .rq-actions .btn { width: 100%; }
}

/* ================= Dropdown customizado (substitui <select> nativo) ================= */
.cs-wrap { position: relative; display: inline-block; vertical-align: middle; }
/* Quando um select está ABERTO, eleva a área acima da galeria (senão o menu
   fica atrás das imagens). Lifta o wrap e o cabeçalho da seção que o contém. */
.section-head { position: relative; }
.section-head:has(.cs-trigger.open), .cs-wrap:has(.cs-trigger.open) { z-index: 100; }
.cs-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cs-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 14px; cursor: pointer; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); white-space: nowrap; }
.cs-trigger:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.cs-trigger.open { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.cs-trigger .cs-label { overflow: hidden; text-overflow: ellipsis; }
.cs-trigger .cs-placeholder { color: var(--muted); }
.cs-arrow { flex-shrink: 0; opacity: 0.7; transition: transform 0.18s var(--ease); }
.cs-trigger.open .cs-arrow { transform: rotate(180deg); }

.cs-panel { position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; z-index: 1000; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 320px; overflow-y: auto;
  animation: csIn 0.14s var(--ease) both; }
.cs-panel[hidden] { display: none; }
@keyframes csIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cs-option { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.cs-option:hover { background: var(--card-hover); }
.cs-option.selected { color: var(--brand); font-weight: 600; }
.cs-option.selected::after { content: "✓"; margin-left: auto; font-weight: 700; }
.cs-option.disabled { color: var(--muted); cursor: default; opacity: 0.6; }
.cs-option.disabled:hover { background: transparent; }

/* ================= Refinamento visual (estilo Designi) ================= */
/* Barra de rolagem moderna */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Seleção de texto */
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }

/* Transições suaves globais */
a, button, .card-img, .cat-card, .btn, .filter-item, .filter-chip, .side-nav button, .catnav a,
.nav a, .icon-btn, .user-chip, .producer-box, .info-item, .pillbtn, input, select, textarea, .coin-balance {
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    transform 0.18s var(--ease), box-shadow 0.25s var(--ease), opacity 0.18s var(--ease);
}

/* Animações de entrada */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(6px); } to { opacity: 1; transform: none; } }

.hero h1 { animation: fadeInUp 0.55s var(--ease) both; }
.hero p { animation: fadeInUp 0.55s 0.06s var(--ease) both; }
.herosearch { animation: fadeInUp 0.55s 0.12s var(--ease) both; }
.cat-cards { animation: fadeInUp 0.55s 0.18s var(--ease) both; }
.profile-card, .prod-header, .detail-top { animation: fadeInUp 0.45s var(--ease) both; }

/* Modais surgem com um leve "pop" */
.modal-card { animation: popIn 0.2s var(--ease) both; }
.modal-backdrop { animation: fadeInUp 0.2s var(--ease) both; }

/* Botões com micro-interação */
.btn { will-change: transform; }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary { box-shadow: var(--glass-hi), 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { box-shadow: var(--glass-hi), 0 10px 26px color-mix(in srgb, var(--brand) 40%, transparent); }
.icon-btn:hover { transform: translateY(-1px); }

/* ============================================================
   LIQUID GLASS — vidro fosco nos botões e controles + ripple no clique
   ============================================================ */
/* Controles secundários viram vidro fosco translúcido */
.btn-ghost, .icon-btn, .coin-balance, .user-chip, .pillbtn, .filter-chip,
.mode-opt, .cs-trigger, .team-arrow, .notif-toggle {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-hi), 0 4px 16px rgba(0, 0, 0, 0.16);
}
.btn-ghost:hover, .icon-btn:hover, .coin-balance:hover, .user-chip:hover, .pillbtn:hover,
.filter-chip:hover, .mode-opt:hover, .cs-trigger:hover, .team-arrow:hover, .notif-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--glass-brd));
}
/* "Formato" dentro da barra de busca: sem caixa cinza — só texto + seta */
.herosearch .cs-trigger, .topsearch .cs-trigger,
.herosearch .cs-trigger:hover, .topsearch .cs-trigger:hover,
.herosearch .cs-trigger.open, .topsearch .cs-trigger.open {
  background: transparent; border-color: transparent; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 6px 4px; color: var(--muted); }
.herosearch .cs-trigger:hover, .topsearch .cs-trigger:hover { color: var(--text); }

/* Cantos mais arredondados (estilo iOS) */
.btn { border-radius: 13px; }
.icon-btn, .notif-toggle { border-radius: 12px; }

/* Alvos do ripple: precisam conter o efeito */
.btn, .icon-btn, .coin-balance, .user-chip, .pillbtn, .filter-chip,
.mode-opt, .cs-trigger, .notif-toggle {
  position: relative; overflow: hidden;
}
/* Setas de carrossel já são position:absolute — NÃO trocar pra relative, só recortar */
.team-arrow, .media-nav { overflow: hidden; }
/* Ondinha que surge no ponto do clique */
.ripple {
  position: absolute; border-radius: 50%; background: var(--ripple);
  transform: scale(0); pointer-events: none; z-index: 0;
  animation: rippleAnim 0.55s ease-out forwards;
}
@keyframes rippleAnim { to { transform: scale(2.4); opacity: 0; } }
/* Mantém texto/ícone acima da ondinha (nunca aplicar ao próprio ripple) */
.btn > *:not(.ripple), .pillbtn > *:not(.ripple), .user-chip > *:not(.ripple),
.coin-balance > *:not(.ripple), .filter-chip > *:not(.ripple), .mode-opt > *:not(.ripple),
.cs-trigger > *:not(.ripple), .team-arrow > *:not(.ripple), .media-nav > *:not(.ripple) { position: relative; z-index: 1; }
/* leve "afundar" ao pressionar */
.btn:active, .icon-btn:active, .pillbtn:active, .coin-balance:active, .user-chip:active,
.filter-chip:active, .mode-opt:active, .notif-toggle:active { transform: scale(0.97); }
/* Setas centralizadas: preservar o translateY ao pressionar */
.team-arrow:active, .media-nav:active { transform: translateY(-50%) scale(0.94); }

/* ============================================================
   SWITCH on/off (Uiverse by Galahhad) — caixinhas de confirmação
   Classe PRÓPRIA .gswitch p/ NÃO colidir com o .switch do admin (usuários)
   ============================================================ */
.switch-field { display: flex; align-items: center; gap: 14px; margin: 2px 0; }
.switch-field .switch-text { color: var(--text); font-size: 14px; line-height: 1.4; cursor: pointer; }
.gswitch {
  --switch-width: 46px;
  --switch-height: 24px;
  --switch-bg: rgb(131, 131, 131);
  --switch-checked-bg: rgb(0, 218, 80);
  --switch-offset: calc((var(--switch-height) - var(--circle-diameter)) / 2);
  --switch-transition: all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
  --circle-diameter: 18px;
  --circle-bg: #fff;
  --circle-shadow: 1px 1px 2px rgba(146, 146, 146, 0.45);
  --circle-checked-shadow: -1px 1px 2px rgba(163, 163, 163, 0.45);
  --circle-transition: var(--switch-transition);
  --icon-transition: all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
  --icon-cross-color: var(--switch-bg);
  --icon-cross-size: 6px;
  --icon-checkmark-color: var(--switch-checked-bg);
  --icon-checkmark-size: 10px;
  --effect-width: calc(var(--circle-diameter) / 2);
  --effect-height: calc(var(--effect-width) / 2 - 1px);
  --effect-bg: var(--circle-bg);
  --effect-border-radius: 1px;
  --effect-transition: all .2s ease-in-out;
  display: inline-block;
  flex: none;
}
.gswitch input { display: none; }
.gswitch svg { transition: var(--icon-transition); position: absolute; height: auto; }
.gswitch .checkmark { width: var(--icon-checkmark-size); color: var(--icon-checkmark-color); transform: scale(0); }
.gswitch .cross { width: var(--icon-cross-size); color: var(--icon-cross-color); }
.gswitch .slider {
  box-sizing: border-box; width: var(--switch-width); height: var(--switch-height);
  background: var(--switch-bg); border-radius: 999px; display: flex; align-items: center;
  position: relative; transition: var(--switch-transition); cursor: pointer;
}
.gswitch .circle {
  width: var(--circle-diameter); height: var(--circle-diameter); background: var(--circle-bg);
  border-radius: inherit; box-shadow: var(--circle-shadow); display: flex; align-items: center;
  justify-content: center; transition: var(--circle-transition); z-index: 1; position: absolute;
  left: var(--switch-offset);
}
.gswitch .slider::before {
  content: ""; position: absolute; width: var(--effect-width); height: var(--effect-height);
  left: calc(var(--switch-offset) + (var(--effect-width) / 2)); background: var(--effect-bg);
  border-radius: var(--effect-border-radius); transition: var(--effect-transition);
}
.gswitch input:checked + .slider { background: var(--switch-checked-bg); }
.gswitch input:checked + .slider .checkmark { transform: scale(1); }
.gswitch input:checked + .slider .cross { transform: scale(0); }
.gswitch input:checked + .slider::before { left: calc(100% - var(--effect-width) - (var(--effect-width) / 2) - var(--switch-offset)); }
.gswitch input:checked + .slider .circle { left: calc(100% - var(--circle-diameter) - var(--switch-offset)); box-shadow: var(--circle-checked-shadow); }

/* Cards: zoom suave na imagem + sombra ao passar o mouse */
.card-img .thumb { transition: transform 0.4s var(--ease); }
.card-img:hover .thumb { transform: scale(1.05); }
.card-img:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); }
.cat-card:hover { box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35); }
.cat-card .cc-thumb { transition: transform 0.4s var(--ease); }
.cat-card:hover .cc-thumb { transform: scale(1.08) rotate(-2deg); }

/* Estrelas do hero piscando suavemente */
@keyframes twinkle { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.hero::before { animation: twinkle 6s ease-in-out infinite; }

/* Brand com leve destaque ao passar o mouse */
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-mark { transition: transform 0.25s var(--ease); }

/* Links de navegação com realce */
.catnav a:hover, .nav a:hover { transform: translateY(-1px); }

/* ---------- Modal de confirmação próprio ---------- */
.confirm-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.confirm-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); animation: cfFade 0.18s ease both; }
.confirm-card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; box-shadow: var(--shadow); animation: cfPop 0.2s var(--ease) both; }
.confirm-title { margin: 0 0 8px; font-size: 19px; }
.confirm-msg { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-actions .btn { min-width: 116px; }
.confirm-modal.closing .confirm-card { animation: cfPopOut 0.15s ease both; }
.confirm-modal.closing .confirm-backdrop { animation: cfFadeOut 0.15s ease both; }
@keyframes cfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cfFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes cfPop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes cfPopOut { from { opacity: 1; } to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@media (max-width: 480px) { .confirm-actions { flex-direction: column-reverse; } .confirm-actions .btn { width: 100%; } }

/* ---------- Animações de entrada (surgir suave, leve) ---------- */
@keyframes fadeUp2 { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeSoft { from { opacity: 0; } to { opacity: 1; } }
.hero, .admin-hero, .detail-top, .prod-header, .account-section,
.card:not(.card-img), .admin-stat, .project-head, .section-head {
  animation: fadeUp2 0.5s var(--ease) both;
}
/* Cards da galeria: só fade (não mexe no transform, pra não quebrar o hover-lift) */
.card-img, .cat-card { animation: fadeSoft 0.5s var(--ease) both; }

/* Respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Páginas de texto (política de cookies etc.) ---------- */
.legal { line-height: 1.65; }
.legal h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 6px; }
.legal .sub { color: var(--muted); margin: 0 0 26px; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal h3 { font-size: 16px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.legal p { color: var(--text); margin: 0 0 12px; }
.legal ul { margin: 8px 0 12px; padding-left: 20px; color: var(--muted); }
.legal li { margin: 4px 0; }
.legal code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.legal-cat { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--bg-soft); margin: 12px 0; }
.legal-cat h3 .pill { font-size: 11px; padding: 3px 9px; }

/* ============================================================
   Consentimento de cookies (LGPD) — banner, modal e botão flutuante
   ============================================================ */
.cc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  padding: 14px; display: flex; justify-content: center;
  animation: ccUp 0.4s var(--ease) both;
}
@keyframes ccUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cc-banner-in {
  width: 100%; max-width: 960px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cc-banner-txt { flex: 1 1 340px; min-width: 260px; }
.cc-banner-txt strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cc-banner-txt p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cc-banner-txt a, .cc-modal-sub a { color: var(--brand); text-decoration: none; }
.cc-banner-txt a:hover, .cc-modal-sub a:hover { text-decoration: underline; }
.cc-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.cc-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal[hidden] { display: none; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.cc-modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; animation: ccUp 0.28s var(--ease) both;
}
.cc-modal-card h2 { margin: 0 0 6px; font-size: 20px; }
.cc-modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cc-modal-close { position: absolute; top: 12px; right: 12px; background: transparent; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 6px; border-radius: 8px; }
.cc-modal-close:hover { color: var(--text); background: var(--card-hover); }
.cc-cats { display: flex; flex-direction: column; gap: 12px; }
.cc-cat { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--bg-soft); }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-title { font-weight: 600; font-size: 15px; }
.cc-cat-desc { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.cc-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 20px; }

/* switch */
.cc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider { position: absolute; inset: 0; cursor: pointer; background: var(--line); border-radius: 24px; transition: background .2s; }
.cc-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.cc-switch input:checked + .cc-slider { background: var(--brand); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(18px); }
.cc-switch.locked { opacity: 0.65; }
.cc-switch.locked .cc-slider { cursor: not-allowed; }

@media (max-width: 640px) {
  .cc-banner-actions { width: 100%; }
  .cc-banner-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   CHAT DAS SOLICITAÇÕES — página /chats + widget flutuante
   ============================================================ */
/* Pílulas de status (compartilhadas página + widget) */
.ci-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; display: inline-block; }
.ci-status.st-pend  { background: color-mix(in srgb, #f5b301 22%, transparent); color: #f5b301; }
.ci-status.st-done  { background: color-mix(in srgb, #38bdf8 22%, transparent); color: #38bdf8; }
.ci-status.st-appr  { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }
.ci-status.st-final { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.ci-status.st-rej   { background: color-mix(in srgb, var(--danger) 22%, transparent); color: var(--danger); }

/* Botão verde de aprovar/finalizar */
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { filter: brightness(1.08); }

/* Badge no item do menu do usuário */
#menu-chats { display: flex; align-items: center; }
.menu-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }

/* ---------- Página /chats ---------- */
.chats-page { max-width: 1760px; margin: 0 auto; padding: 18px clamp(10px, 2vw, 20px) 34px; }
.chats-layout { display: grid; grid-template-columns: 330px 1fr 300px; gap: 16px; height: calc(100vh - 66px - 52px); min-height: 500px; }
/* Sem chat aberto o painel some e a conversa ocupa o espaço */
.chats-layout:not(.chat-open) { grid-template-columns: 330px 1fr; }

/* ---- Painel lateral do chat ---- */
.chat-side { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.chat-side::-webkit-scrollbar { width: 6px; }
.chat-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

/* Controles do chat no painel: empilhados em largura total (nunca quebram) */
.cs-controls { display: flex; flex-direction: column; gap: 8px; }
.cs-controls .btn { width: 100%; justify-content: center; }
/* Com o painel visível, os controles do cabeçalho sairiam duplicados — escondemos lá.
   Abaixo de 1180px o painel some e eles voltam ao cabeçalho (nada some da tela). */
@media (min-width: 1181px) {
  .chat-head-actions .ch-decide { display: none; }
}

/* Barra de atalhos (linha de botões redondos) */
.cs-actions { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.cs-act { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); display: grid; place-items: center; cursor: pointer;
  text-decoration: none; transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease); }
.cs-act:hover { border-color: var(--brand); color: var(--brand); }
.cs-act.hl { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.cs-act.hl:hover { filter: brightness(1.08); color: #fff; }
.cs-act .ico svg { width: 18px; height: 18px; }
/* tooltip do próprio site (mesmo padrão do canvas) */
.cs-act[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px); background: var(--card); color: var(--text);
  border: 1px solid var(--line); padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap; opacity: 0; pointer-events: none; box-shadow: var(--shadow); z-index: 2000;
  transition: opacity .14s var(--ease), transform .14s var(--ease); }
.cs-act[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Cartões (Participantes / Mídia) */
.cs-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.cs-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.cs-count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.cs-empty { margin: 4px 0; font-size: 12.5px; color: var(--muted); }

/* Participantes */
.cs-members { display: flex; flex-direction: column; gap: 2px; }
.cs-member { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px;
  text-decoration: none; color: var(--text); transition: background .15s var(--ease); }
.cs-member:hover { background: var(--card-hover); }
.cs-av { width: 34px; height: 34px; flex: none; }
.cs-av img, .cs-av .avatar-initial { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; font-size: 13px; }
.cs-m-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-you { font-style: normal; color: var(--muted); font-weight: 500; }
.cs-role { flex: none; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cs-role-admin { color: var(--brand); }
/* Botão "Adicionar membro" (admin) */
.cs-add-member { width: 100%; margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.cs-add-member:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, transparent); }
.cs-add-member .ico svg { width: 15px; height: 15px; }
/* Modal de adicionar membro (reaproveita .del-modal/.del-card) */
.am-card { max-width: 420px; }
.am-search { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 14px; outline: none; }
.am-search:focus { border-color: var(--brand); }
.am-list { margin-top: 8px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.am-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; border: none;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.am-item:hover { background: var(--card-hover); }
.am-item .am-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Vincular Discord dentro da modal de adicionar membro */
.am-link { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.am-link-lbl { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.am-link-lbl .ico svg { width: 15px; height: 15px; color: var(--brand); }
.am-link-sel { width: 100%; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 13.5px; outline: none; }
.am-link-sel:focus { border-color: var(--brand); }
.am-link-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* Grupos de mídia/docs/links */
.cs-groups { display: flex; flex-direction: column; }
.cs-group + .cs-group { border-top: 1px solid var(--line); }
.cs-g-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 2px; border: none;
  background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cs-g-ico { width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--bg-soft);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); }
.cs-g-ico .ico svg { width: 15px; height: 15px; }
.cs-g-label { flex: 1; text-align: left; }
.cs-g-chev { color: var(--muted); display: inline-flex; transition: transform .2s var(--ease); }
.cs-g-chev .ico svg { width: 15px; height: 15px; }
.cs-group.open .cs-g-chev { transform: rotate(180deg); }
.cs-g-body { display: none; padding-bottom: 10px; }
.cs-group.open .cs-g-body { display: block; }

/* Tira horizontal de fotos (igual à referência) */
.cs-photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cs-photos::-webkit-scrollbar { height: 5px; }
.cs-photos::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.cs-photo { flex: none; width: 116px; height: 116px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft); }
.cs-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease); }
.cs-photo:hover img { transform: scale(1.06); }

/* Lista de arquivos e links */
.cs-files { display: flex; flex-direction: column; gap: 2px; }
.cs-file, .cs-link { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px;
  text-decoration: none; color: var(--text); transition: background .15s var(--ease); }
.cs-file:hover, .cs-link:hover { background: var(--card-hover); }
.cs-f-ico { width: 32px; height: 32px; flex: none; border-radius: 9px; overflow: hidden; background: var(--bg-soft);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.cs-f-ico img { width: 100%; height: 100%; object-fit: cover; }
.cs-f-ico .ico svg { width: 14px; height: 14px; }
.cs-f-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cs-f-txt b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-f-txt span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chats-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.chats-list-head { padding: 15px 16px 11px; border-bottom: 1px solid var(--line); }
.chats-list-head h1 { margin: 0; font-size: 22px; }
.chats-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
/* Filtros do chat: um controle segmentado (trilha única), não botões soltos.
   Não quebra linha — se não couber, rola na horizontal. */
.chat-filters { display: flex; flex-wrap: nowrap; gap: 3px; margin-top: 12px; padding: 4px;
  border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.chat-filters::-webkit-scrollbar { display: none; }
.chat-filter { flex: none; font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  border: none; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s var(--ease), color .2s var(--ease); }
.chat-filter:hover { color: var(--text); background: var(--card-hover); }
.chat-filter.active { background: var(--brand); color: #fff;
  box-shadow: 0 2px 10px -3px color-mix(in srgb, var(--brand) 70%, transparent); }
.chat-filter .cf-n { font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-filter.active .cf-n { background: rgba(255, 255, 255, .26); color: #fff; }
.chats-items { flex: 1; overflow-y: auto; }
.chat-item { display: flex; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: none; background: transparent; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; color: var(--text); }
.chat-item:hover { background: var(--card-hover); }
.chat-item.active { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.ci-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); font-weight: 700; font-size: 14px; }
.ci-avatar.ci-art { border-radius: 11px; }
.ci-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ci-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 11px; color: var(--muted); flex: none; }
.ci-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-meta { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ci-who { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
/* Destaque de não-lidas (estilo WhatsApp): título em negrito + fundo sutil + bolinha verde */
.chat-item.has-unread { background: color-mix(in srgb, var(--green) 7%, transparent); }
.chat-item.has-unread .ci-title { font-weight: 800; color: var(--text); }
.chat-item.has-unread .ci-last { color: var(--text); font-weight: 600; }
/* Chat SELECIONADO: barra lateral + fundo mais forte (vence o hover e o "não lido") */
.chat-item.active, .chat-item.active.has-unread { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.chat-item.active { position: relative; box-shadow: inset 3px 0 0 var(--brand); }
.chat-item.active:hover { background: color-mix(in srgb, var(--brand) 24%, transparent); }
.chat-item.active .ci-title { color: var(--brand); font-weight: 800; }
.chats-empty { padding: 30px 16px; text-align: center; color: var(--muted); }

.chat-view { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.chat-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 10px; text-align: center; padding: 20px; }
.ce-ico { font-size: 44px; opacity: .55; }
.chat-conv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-back { display: none; border: none; background: transparent; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ch-thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ch-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-people { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-hint { font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 2px; }
.chat-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-messages { flex: 1; overflow-y: auto; padding: 8px 2px 16px; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 45%, transparent); }
/* Impede que os itens (card de especificações, mensagens) ENCOLHAM quando o chat enche
   — sem isso o flexbox comprime o card e ele "some". Devem manter a altura e rolar. */
.chat-messages > * { flex-shrink: 0; }

/* Card de especificações (briefing + prazo) no topo do chat */
#chat-spec-slot { flex: none; }
.chat-spec { margin: 12px 14px 8px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 12px; overflow: hidden; }
.spec-head { width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--line); color: var(--text); cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--brand) 8%, transparent); }
.spec-h-title { flex: 1; }
.spec-chevron { color: var(--muted); transition: transform .2s var(--ease); font-size: 12px; }
.chat-spec.collapsed .spec-chevron { transform: rotate(-90deg); }
.chat-spec.collapsed .spec-head { border-bottom: none; }
.chat-spec.collapsed .spec-body, .chat-spec.collapsed .spec-foot { display: none; }
/* Limite de altura: as especificações NUNCA tomam a tela toda. Se o conteúdo for
   grande (moodboard, muitas referências), rola DENTRO do painel. O overscroll-behavior
   impede que o scroll "vaze" e mexa na conversa por trás. */
.spec-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
  max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) { .spec-body { max-height: 46vh; } }
.spec-row { display: flex; flex-direction: column; gap: 3px; }
.spec-k { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.spec-v { font-size: 14px; line-height: 1.5; color: var(--text); word-break: break-word; }
.spec-deadline { color: #f5b301; font-weight: 600; }
.spec-empty { color: var(--muted); font-size: 13px; }
.spec-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* Mensagens estilo Discord (tudo à esquerda, sem balões, agrupadas) */
.msg-row { position: relative; display: flex; gap: 14px; padding: 3px 14px; }
.msg-row:not(.grouped) { margin-top: 14px; }
.chat-date-sep + .msg-row, .chat-spec + .msg-row { margin-top: 6px; }
.msg-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.msg-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); font-weight: 700; font-size: 14px; }
.msg-av img { width: 100%; height: 100%; object-fit: cover; }
.msg-gutter { width: 40px; flex: none; text-align: right; font-size: 10px; color: var(--muted); visibility: hidden; padding-top: 3px; }
.msg-row.grouped:hover .msg-gutter { visibility: visible; }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.msg-name { font-weight: 600; font-size: 14px; }
.msg-ts { font-size: 11px; color: var(--muted); }
.msg-text { font-size: 14.5px; line-height: 1.5; color: var(--text); word-break: break-word; }
.msg-edited { font-size: 10px; color: var(--muted); }
.msg-row.is-delivery { background: color-mix(in srgb, var(--green) 7%, transparent); border-left: 3px solid var(--green); padding-left: 11px; }
.cm-admin { background: var(--brand); color: #0b0b0d; font-size: 9px; padding: 0 5px; border-radius: 8px; text-transform: uppercase; letter-spacing: .3px; align-self: center; }
.chat-sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 4px 12px; border-radius: 20px; text-align: center; margin: 10px auto; }

/* Data separadora ("13 de julho de 2026") */
.chat-date-sep { display: flex; align-items: center; gap: 12px; margin: 14px 16px 4px; color: var(--muted); font-size: 12px; }
.chat-date-sep::before, .chat-date-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-date-sep span { font-weight: 600; }

/* Anexo */
.cm-attach { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--text); text-decoration: none; margin-top: 4px; max-width: 320px; }
.cm-attach:hover { border-color: var(--brand); }
.cm-att-name { font-weight: 600; word-break: break-all; }
.cm-att-size { color: var(--muted); flex: none; }

/* Quote de resposta */
.msg-reply-quote { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--brand); padding: 1px 8px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-reply-quote b { color: var(--text); }

/* Reações */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reaction-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); cursor: pointer; }
.reaction-chip span { font-size: 11px; font-weight: 700; color: var(--muted); }
.reaction-chip.mine { background: color-mix(in srgb, var(--brand) 18%, transparent); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.reaction-chip.mine span { color: var(--brand); }

/* Barra de ações no hover + dropdown */
.msg-actions { position: absolute; top: -14px; right: 12px; display: none; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 2px; box-shadow: var(--shadow); z-index: 2; }
.msg-row:hover .msg-actions { display: flex; }
.msg-actions button { border: none; background: transparent; cursor: pointer; width: 30px; height: 28px; border-radius: 6px; font-size: 15px; color: var(--text); display: grid; place-items: center; }
.msg-actions button:hover { background: var(--card-hover); }
.msg-menu { position: fixed; z-index: 80; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.mm-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; color: var(--text); font-size: 13.5px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.mm-item:hover { background: var(--card-hover); }
.mm-item.danger { color: var(--danger); }
.mm-ico { width: 20px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mm-ico svg { width: 16px; height: 16px; }
.emoji-pop { position: fixed; z-index: 85; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 5px; }
.emoji-pop button { border: none; background: transparent; cursor: pointer; font-size: 20px; width: 36px; height: 36px; border-radius: 8px; transition: transform .1s; }
.emoji-pop button:hover { background: var(--card-hover); transform: scale(1.15); }

/* Banner de resposta + edição inline + toast */
.reply-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; color: var(--muted); }
.rb-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-txt b { color: var(--text); }
.rb-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.edit-ta { width: 100%; border: 1px solid var(--brand); background: var(--bg-soft); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 14px; font-family: inherit; resize: none; outline: none; }
.edit-actions { display: flex; gap: 6px; margin-top: 6px; }
.chat-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); z-index: 90; opacity: 0; pointer-events: none; transition: .25s; font-size: 13.5px; }
.chat-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Nome do remetente clicável */
a.msg-name { text-decoration: none; }
a.msg-name:hover { text-decoration: underline; }

/* Botão "+" e menu do compose */
.chat-plus-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: border-color .15s, color .15s, background .15s; }
.chat-plus-btn:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.chat-plus-btn svg { transition: transform .22s var(--ease); }
.chat-plus-btn.open { border-color: var(--brand); color: var(--brand); }
.chat-plus-btn.open svg { transform: rotate(135deg); }
.compose-menu { position: fixed; z-index: 82; min-width: 232px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; transform-origin: bottom left; animation: composePop .16s var(--ease); }
@keyframes composePop { from { opacity: 0; transform: translateY(10px) scale(.95); } to { opacity: 1; transform: none; } }
.compose-menu .cmp-item { opacity: 0; animation: cmpItemIn .22s var(--ease) forwards; }
.compose-menu .cmp-item:nth-child(1) { animation-delay: .03s; }
.compose-menu .cmp-item:nth-child(2) { animation-delay: .07s; }
.compose-menu .cmp-item:nth-child(3) { animation-delay: .11s; }
@keyframes cmpItemIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.cmp-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; color: var(--text); font-size: 14px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.cmp-item:hover { background: var(--card-hover); }
.cmp-item.ok { color: var(--green); font-weight: 600; }
.chip-deliver { color: var(--green); }

/* Imagem exibida inline + download */
.cm-image { margin-top: 4px; }
.cm-image img { max-width: min(340px, 100%); max-height: 340px; border-radius: 10px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.cm-image-dl { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.cm-image-dl:hover { color: var(--brand); }

/* Galeria em grade (várias imagens numa mensagem — estilo Discord/WhatsApp) */
.cm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 4px;
  width: min(340px, 100%); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.cm-tile { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-soft); }
.cm-tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: transform .18s var(--ease); }
.cm-tile:hover img { transform: scale(1.04); }
/* Quantidade ímpar (>1): a última imagem ocupa a linha inteira, como no Discord */
.cm-grid > .cm-tile:last-child:nth-child(odd) { grid-column: span 2; aspect-ratio: 16 / 9; }

/* Barra de "Enviando N arquivos — XX MB" (acima do compose) */
.chat-uploading { display: flex; align-items: center; gap: 12px; margin: 8px 14px 0; padding: 10px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.chat-uploading .cu-ico { width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--card);
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); }
.chat-uploading .cu-ico .ico svg { width: 17px; height: 17px; }
.chat-uploading .cu-main { flex: 1; min-width: 0; }
.chat-uploading .cu-label { font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.chat-uploading .cu-track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.chat-uploading .cu-fill { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .15s linear; }
.chat-uploading .cu-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--muted); display: grid; place-items: center; }
.chat-uploading .cu-x:hover { background: var(--card); color: var(--danger); }

/* Card de referência */
.cm-ref { display: flex; align-items: center; gap: 10px; margin-top: 4px; max-width: 340px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 8px 10px; text-decoration: none; color: var(--text); }
.cm-ref:hover { border-color: var(--brand); }
.cm-ref-thumb { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-soft); }
.cm-ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-ref-ico { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; flex: none; }
.cm-ref-info { min-width: 0; display: flex; flex-direction: column; }
.cm-ref-info b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-ref-url { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Modal "Adicionar referência" */
.ref-modal { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: cwPop .15s var(--ease); }
.ref-card { width: 100%; max-width: 460px; max-height: 86vh; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.ref-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ref-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.ref-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ref-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; display: block; margin-bottom: 6px; }
.ref-linkrow { display: flex; gap: 8px; }
.ref-linkrow input { flex: 1; min-width: 0; }
.ref-body input { border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; width: 100%; }
.ref-body input:focus { border-color: var(--brand); }
.ref-note { margin-top: 8px; }
.ref-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.ref-or::before, .ref-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ref-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ref-loading { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }
.ref-thumb { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 10px; overflow: hidden; cursor: pointer; padding: 0; display: flex; flex-direction: column; color: var(--text); }
.ref-thumb:hover { border-color: var(--brand); }
.ref-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ref-thumb span { font-size: 11px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-thumb.sel { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent); }
.ref-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ref-selinfo { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ícones da barra rápida + atalho de excluir (aparece só com Shift, estilo Discord) */
.msg-actions button svg { width: 15px; height: 15px; }
.msg-actions .msg-delbtn { display: none; color: var(--danger); }
body.shift-held .msg-row:hover .msg-actions { display: flex; }
body.shift-held .msg-row:hover .msg-delbtn { display: grid; }

/* Modal de excluir mensagem (preview + dica do Shift) */
.del-modal { position: fixed; inset: 0; z-index: 96; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; animation: cwPop .15s var(--ease); }
.del-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.del-head { display: flex; align-items: center; justify-content: space-between; }
.del-head b { font-size: 18px; }
.del-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.del-sub { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }

/* ===== Visualizador de imagem do chat (lightbox estilo Discord) ===== */
body.lb-open { overflow: hidden; }
.img-lightbox { position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column;
  background: rgba(0, 0, 0, .86); backdrop-filter: blur(3px); animation: cwPop .14s var(--ease); }
.ilb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); flex: none; }
.ilb-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ilb-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 15px; }
.ilb-av img { width: 100%; height: 100%; object-fit: cover; }
.ilb-who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; color: #fff; }
.ilb-who b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ilb-time { font-size: 12px; color: rgba(255, 255, 255, .65); }
.ilb-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.ilb-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; border: none; background: transparent; color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .14s; }
.ilb-btn svg { width: 20px; height: 20px; }
.ilb-btn:hover { background: rgba(255, 255, 255, .16); }
.ilb-btn.ilb-close:hover { background: var(--danger); }
/* Tooltip próprio do site (substitui o title nativo do navegador) */
.ilb-btn[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-4px) scale(.96); transform-origin: top center;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; letter-spacing: .1px; white-space: nowrap; padding: 6px 10px; border-radius: 9px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none;
  transition: opacity .15s var(--ease), transform .15s var(--ease); z-index: 12; }
.ilb-btn[data-tip]::before {
  content: ""; position: absolute; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%) translateY(-4px); border: 6px solid transparent; border-bottom-color: var(--card);
  opacity: 0; pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease); z-index: 12;
  filter: drop-shadow(0 -1px 0 var(--line)); }
.ilb-btn[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.ilb-btn[data-tip]:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
/* último botão (Fechar) alinha o balão à direita p/ não sair da tela */
.ilb-btn.ilb-close[data-tip]::after { left: auto; right: 0; transform: translateX(0) translateY(-4px) scale(.96); transform-origin: top right; }
.ilb-btn.ilb-close[data-tip]:hover::after { transform: translateX(0) translateY(0) scale(1); }
.ilb-stage { position: relative; flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; padding: 8px 16px 12px; }
.ilb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; cursor: zoom-in;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5); user-select: none; transform-origin: center center; will-change: transform; }
.ilb-img.zoomed { cursor: grab; }
.ilb-stage.grabbing .ilb-img { cursor: grabbing; }
/* setas de navegação da galeria */
.ilb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer; display: grid; place-items: center; z-index: 3;
  transition: background .2s var(--ease), transform .2s var(--ease); }
.ilb-nav:hover { background: rgba(0, 0, 0, .78); }
.ilb-nav:active { transform: translateY(-50%) scale(.92); }
.ilb-nav svg { width: 22px; height: 22px; }
.ilb-prev { left: 14px; } .ilb-next { right: 14px; }
.ilb-count { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, .72); margin-right: 10px; white-space: nowrap; }
/* tira de miniaturas */
.ilb-strip { display: flex; gap: 8px; justify-content: center; align-items: center; flex: none;
  padding: 8px 16px 16px; overflow-x: auto; scrollbar-width: none; }
.ilb-strip::-webkit-scrollbar { display: none; }
.ilb-thumb { flex: 0 0 62px; width: 62px; height: 62px; padding: 0; border-radius: 9px; overflow: hidden;
  border: 2px solid transparent; background: rgba(255, 255, 255, .08); cursor: pointer; opacity: .55;
  transition: opacity .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.ilb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ilb-thumb:hover { opacity: .9; }
.ilb-thumb.on { opacity: 1; border-color: var(--brand); transform: translateY(-2px); }
@media (max-width: 600px) {
  .ilb-thumb { flex-basis: 48px; width: 48px; height: 48px; }
  .ilb-nav { width: 38px; height: 38px; } .ilb-nav svg { width: 18px; height: 18px; }
  .ilb-prev { left: 8px; } .ilb-next { right: 8px; }
}
.lb-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 13px; z-index: 5000; opacity: 0;
  transition: opacity .18s, transform .18s; pointer-events: none; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.lb-toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
@media (max-width: 600px) { .ilb-btn { width: 36px; height: 36px; } .ilb-btn svg { width: 18px; height: 18px; } }
.del-preview { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 340px; overflow-y: auto; }
.del-preview .cm-image img { max-height: 220px; }
.del-tip { font-size: 12.5px; color: var(--muted); margin: 14px 0; line-height: 1.55; }
.del-tip b:first-child { color: var(--green); display: block; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; margin-bottom: 2px; }
.del-actions { display: flex; gap: 10px; }
.del-actions .btn { flex: 1; justify-content: center; }

/* Menções @ (destaque no texto + dropdown de autocomplete) */
.mention { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention-pop { position: fixed; z-index: 86; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: 240px; overflow-y: auto; }
.mn-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; color: var(--text); font-size: 14px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.mn-item.active, .mn-item:hover { background: var(--card-hover); }
.mn-name { font-weight: 600; }
.mn-role { font-size: 11px; color: var(--muted); }

/* Composer estilo "card" arredondado (inspirado no compositor moderno):
   textarea em cima, barra de ações embaixo (+ à esquerda, enviar circular à direita). */
.chat-compose { display: flex; flex-direction: column; gap: 8px; margin: 10px 14px 16px; padding: 12px 12px 10px 18px;
  border: 1px solid var(--line); border-radius: 26px; background: var(--bg-soft); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.chat-compose:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent); }
.chat-compose-bar { display: flex; align-items: center; gap: 8px; }
.ccb-spacer { flex: 1; }
.chat-attach-chip { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; padding-right: 6px; }
.cchip { font-size: 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.cchip-ref { padding: 4px 8px 4px 4px; }
.cchip-thumb { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex: none; }
.cchip-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cac-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
#chat-input { width: 100%; resize: none; border: none; background: transparent; color: var(--text); border-radius: 0;
  padding: 4px 6px 0 0; font-size: 15px; font-family: inherit; outline: none; max-height: 168px; line-height: 1.45; }
#chat-input::placeholder { color: var(--muted); }
/* Botão de enviar circular de alto contraste (branco no escuro / escuro no claro) */
.chat-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .15s var(--ease), opacity .15s; }
.chat-send:hover { transform: scale(1.06); }
.chat-send:active { transform: scale(.96); }
.chat-send:disabled { opacity: .4; cursor: default; transform: none; }
.chat-deliver-toggle { flex: none; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.chat-deliver-toggle input { accent-color: var(--green); }
.chat-readonly { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- Widget flutuante ---------- */
#chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.cw-fab { position: relative; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
  display: grid; place-items: center; transition: transform .15s; }
.cw-fab:hover { transform: translateY(-2px) scale(1.03); }
.cw-fab:active { transform: scale(.95); }
.cw-fab-badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.cw-panel { position: absolute; right: 0; bottom: 70px; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 120px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; animation: cwPop .18s var(--ease); }
@keyframes cwPop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.cw-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--card)), var(--card)); }
.cw-head > b { font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-head-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.cw-head-t b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-all { font-size: 12px; color: var(--brand); font-weight: 600; }
.cw-x, .cw-back { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; }
.cw-back { font-size: 24px; color: var(--text); }
.cw-body { flex: 1; overflow-y: auto; }
.cw-body.cw-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cw-loading { padding: 34px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.cw-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 10px; border: 1px solid transparent; background: transparent; border-radius: 12px; cursor: pointer; color: var(--text); transition: .15s; }
.cw-item:hover { background: var(--card-hover); border-color: var(--line); }
.cw-it-thumb { width: 46px; height: 46px; border-radius: 11px; overflow: hidden; flex: none; background: var(--bg-soft); }
.cw-it-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cw-it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cw-it-main b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-it-last { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-it-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.cw-it-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.cw-body.cw-conv { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; background: color-mix(in srgb, var(--bg) 45%, transparent); }
.cw-msg { max-width: 82%; align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; border-bottom-left-radius: 4px; padding: 7px 11px; display: flex; flex-direction: column; gap: 2px; }
.cw-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--brand) 16%, var(--card)); border-color: color-mix(in srgb, var(--brand) 30%, transparent); border-bottom-left-radius: 12px; border-bottom-right-radius: 4px; }
.cw-au { font-size: 11px; font-weight: 700; color: var(--brand); }
.cw-tx { font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.cw-tm { font-size: 9.5px; color: var(--muted); align-self: flex-end; }
.cw-att { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; margin-top: 2px; word-break: break-all; }
.cw-att:hover { border-color: var(--brand); }
.cw-sys { align-self: center; font-size: 11.5px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 10px; border-radius: 20px; text-align: center; }
.cw-ro { align-self: center; font-size: 12px; color: var(--muted); padding: 6px; text-align: center; }
.cw-compose { display: flex; align-items: center; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.cw-attach { flex: none; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; }
.cw-attach:hover { border-color: var(--brand); }
#cw-input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); border-radius: 20px; padding: 9px 14px; font-size: 13.5px; outline: none; }
#cw-input:focus { border-color: var(--brand); }
.cw-send { flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; cursor: pointer; font-size: 15px; }
.cw-send:disabled { opacity: .5; cursor: default; }

/* Telas médias: não cabe a 3ª coluna — o painel sai e o chat respira */
@media (max-width: 1180px) {
  .chats-layout, .chats-layout:not(.chat-open) { grid-template-columns: 330px 1fr; }
  .chat-side { display: none !important; }
}

/* ---------- Chat no mobile ---------- */
@media (max-width: 760px) {
  .chats-page { padding: 12px 10px 24px; }
  .chats-layout, .chats-layout:not(.chat-open) { grid-template-columns: 1fr; height: calc(100vh - 120px); min-height: 420px; }
  .chats-layout.chat-open .chats-list { display: none; }
  .chats-layout:not(.chat-open) .chat-view { display: none; }
  .chat-back { display: block; }
  /* Cabeçalho compacto no mobile (o título estava estourando a tela) */
  .chat-head { gap: 8px; padding: 10px 12px; }
  .ch-thumb { width: 38px; height: 38px; }
  .ch-info b { font-size: 14px; }
  .chat-head-actions { gap: 6px; }
  .chat-head-actions .btn { padding: 6px 9px; font-size: 12px; }
  .msg-row { gap: 10px; padding: 3px 10px; }
  .cm-image img, .cm-ref, .cm-attach { max-width: 100%; }
  #chat-widget { right: 14px; bottom: 14px; }
  .cw-panel { width: calc(100vw - 28px); height: 70vh; }
  /* iOS/Android não dão zoom ao focar inputs com fonte >= 16px */
  input, textarea, select { font-size: 16px !important; }
}

/* --- Ícones SVG (data-ico, injetados pelo nav.js) --- */
.ico{display:inline-flex;align-items:center;justify-content:center;width:1em;height:1em;line-height:0;vertical-align:-0.125em;flex:none;}
.ico svg{width:1em;height:1em;display:block;}
.btn .ico,button .ico{width:1.05em;height:1.05em;}

/* --- Briefing automático com IA (modal de solicitar arte) --- */
.ai-brief{margin-bottom:14px}
.ai-brief-open{width:100%;justify-content:center;gap:8px;border:1px dashed var(--border,#333)}
.ai-brief-panel{margin-top:10px;padding:14px;border:1px solid var(--border,#333);border-radius:12px;background:rgba(255,255,255,.03)}
.ai-brief-panel .field{margin-bottom:10px}
.ai-plats{display:flex;flex-wrap:wrap;gap:8px 14px}
.ai-plats .chk{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:14px}
.ai-brief-actions{display:flex;gap:8px;margin-top:6px}
.ai-brief-actions .btn{flex:1;justify-content:center}

/* ===== Loader do hamster (telas de carregamento) ===== */
.hamster-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; padding:44px 16px; min-height:200px; }
/* Dentro de uma grade (galeria), o loader ocupa todas as colunas para ficar centralizado */
.gallery-masonry .hamster-loading { position: static; width: 100%; }
.gallery .hamster-loading, .gallery-portrait .hamster-loading { grid-column: 1 / -1; width: 100%; }
.hamster-loading .hamster-label { color: var(--muted, #9aa3af); font-size:14px; }

.wheel-and-hamster {
  --dur: 1s;
  position: relative;
  width: 12em;
  height: 12em;
  font-size: 14px;
}

.wheel-and-hamster .wheel,
.wheel-and-hamster .hamster,
.wheel-and-hamster .hamster div,
.wheel-and-hamster .spoke {
  position: absolute;
}

.wheel-and-hamster .wheel,
.wheel-and-hamster .spoke {
  border-radius: 50%;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.wheel-and-hamster .wheel {
  background: radial-gradient(100% 100% at center,hsla(0,0%,60%,0) 47.8%,hsl(0,0%,60%) 48%);
  z-index: 2;
}

.wheel-and-hamster .hamster {
  animation: hamster var(--dur) ease-in-out infinite;
  top: 50%;
  left: calc(50% - 3.5em);
  width: 7em;
  height: 3.75em;
  transform: rotate(4deg) translate(-0.8em,1.85em);
  transform-origin: 50% 0;
  z-index: 1;
}

.wheel-and-hamster .hamster__head {
  animation: hamsterHead var(--dur) ease-in-out infinite;
  background: hsl(30,90%,55%);
  border-radius: 70% 30% 0 100% / 40% 25% 25% 60%;
  box-shadow: 0 -0.25em 0 hsl(30,90%,80%) inset,
		0.75em -1.55em 0 hsl(30,90%,90%) inset;
  top: 0;
  left: -2em;
  width: 2.75em;
  height: 2.5em;
  transform-origin: 100% 50%;
}

.wheel-and-hamster .hamster__ear {
  animation: hamsterEar var(--dur) ease-in-out infinite;
  background: hsl(0,90%,85%);
  border-radius: 50%;
  box-shadow: -0.25em 0 hsl(30,90%,55%) inset;
  top: -0.25em;
  right: -0.25em;
  width: 0.75em;
  height: 0.75em;
  transform-origin: 50% 75%;
}

.wheel-and-hamster .hamster__eye {
  animation: hamsterEye var(--dur) linear infinite;
  background-color: hsl(0,0%,0%);
  border-radius: 50%;
  top: 0.375em;
  left: 1.25em;
  width: 0.5em;
  height: 0.5em;
}

.wheel-and-hamster .hamster__nose {
  background: hsl(0,90%,75%);
  border-radius: 35% 65% 85% 15% / 70% 50% 50% 30%;
  top: 0.75em;
  left: 0;
  width: 0.2em;
  height: 0.25em;
}

.wheel-and-hamster .hamster__body {
  animation: hamsterBody var(--dur) ease-in-out infinite;
  background: hsl(30,90%,90%);
  border-radius: 50% 30% 50% 30% / 15% 60% 40% 40%;
  box-shadow: 0.1em 0.75em 0 hsl(30,90%,55%) inset,
		0.15em -0.5em 0 hsl(30,90%,80%) inset;
  top: 0.25em;
  left: 2em;
  width: 4.5em;
  height: 3em;
  transform-origin: 17% 50%;
  transform-style: preserve-3d;
}

.wheel-and-hamster .hamster__limb--fr,
.wheel-and-hamster .hamster__limb--fl {
  clip-path: polygon(0 0,100% 0,70% 80%,60% 100%,0% 100%,40% 80%);
  top: 2em;
  left: 0.5em;
  width: 1em;
  height: 1.5em;
  transform-origin: 50% 0;
}

.wheel-and-hamster .hamster__limb--fr {
  animation: hamsterFRLimb var(--dur) linear infinite;
  background: linear-gradient(hsl(30,90%,80%) 80%,hsl(0,90%,75%) 80%);
  transform: rotate(15deg) translateZ(-1px);
}

.wheel-and-hamster .hamster__limb--fl {
  animation: hamsterFLLimb var(--dur) linear infinite;
  background: linear-gradient(hsl(30,90%,90%) 80%,hsl(0,90%,85%) 80%);
  transform: rotate(15deg);
}

.wheel-and-hamster .hamster__limb--br,
.wheel-and-hamster .hamster__limb--bl {
  border-radius: 0.75em 0.75em 0 0;
  clip-path: polygon(0 0,100% 0,100% 30%,70% 90%,70% 100%,30% 100%,40% 90%,0% 30%);
  top: 1em;
  left: 2.8em;
  width: 1.5em;
  height: 2.5em;
  transform-origin: 50% 30%;
}

.wheel-and-hamster .hamster__limb--br {
  animation: hamsterBRLimb var(--dur) linear infinite;
  background: linear-gradient(hsl(30,90%,80%) 90%,hsl(0,90%,75%) 90%);
  transform: rotate(-25deg) translateZ(-1px);
}

.wheel-and-hamster .hamster__limb--bl {
  animation: hamsterBLLimb var(--dur) linear infinite;
  background: linear-gradient(hsl(30,90%,90%) 90%,hsl(0,90%,85%) 90%);
  transform: rotate(-25deg);
}

.wheel-and-hamster .hamster__tail {
  animation: hamsterTail var(--dur) linear infinite;
  background: hsl(0,90%,85%);
  border-radius: 0.25em 50% 50% 0.25em;
  box-shadow: 0 -0.2em 0 hsl(0,90%,75%) inset;
  top: 1.5em;
  right: -0.5em;
  width: 1em;
  height: 0.5em;
  transform: rotate(30deg) translateZ(-1px);
  transform-origin: 0.25em 0.25em;
}

.wheel-and-hamster .spoke {
  animation: spoke var(--dur) linear infinite;
  background: radial-gradient(100% 100% at center,hsl(0,0%,60%) 4.8%,hsla(0,0%,60%,0) 5%),
		linear-gradient(hsla(0,0%,55%,0) 46.9%,hsl(0,0%,65%) 47% 52.9%,hsla(0,0%,65%,0) 53%) 50% 50% / 99% 99% no-repeat;
}

@keyframes hamster {
  from, to { transform: rotate(4deg) translate(-0.8em,1.85em); }
  50% { transform: rotate(0) translate(-0.8em,1.85em); }
}
@keyframes hamsterHead {
  from, 25%, 50%, 75%, to { transform: rotate(0); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(8deg); }
}
@keyframes hamsterEye {
  from, 90%, to { transform: scaleY(1); }
  95% { transform: scaleY(0); }
}
@keyframes hamsterEar {
  from, 25%, 50%, 75%, to { transform: rotate(0); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(12deg); }
}
@keyframes hamsterBody {
  from, 25%, 50%, 75%, to { transform: rotate(0); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-2deg); }
}
@keyframes hamsterFRLimb {
  from, 25%, 50%, 75%, to { transform: rotate(50deg) translateZ(-1px); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-30deg) translateZ(-1px); }
}
@keyframes hamsterFLLimb {
  from, 25%, 50%, 75%, to { transform: rotate(-30deg); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(50deg); }
}
@keyframes hamsterBRLimb {
  from, 25%, 50%, 75%, to { transform: rotate(-60deg) translateZ(-1px); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(20deg) translateZ(-1px); }
}
@keyframes hamsterBLLimb {
  from, 25%, 50%, 75%, to { transform: rotate(20deg); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-60deg); }
}
@keyframes hamsterTail {
  from, 25%, 50%, 75%, to { transform: rotate(30deg) translateZ(-1px); }
  12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(10deg) translateZ(-1px); }
}
@keyframes spoke {
  from { transform: rotate(0); }
  to { transform: rotate(-1turn); }
}

/* ===== Home: faixa única no topo (projetos + Enviar arquivo) ===== */
.topbar-home .topbar-projects { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: visible; margin: 0 10px; scrollbar-width: none; }
.topbar-home .topbar-projects::-webkit-scrollbar { height: 0; }
.topbar-home #catnav-projects > a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px; white-space: nowrap; text-decoration: none; }
.topbar-home #catnav-projects > a:hover { color: var(--brand); }
.topbar-home #catnav-projects > a.active { color: var(--brand); background: var(--card-hover); }
.topbar-enviar { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; padding: 7px 10px; border-radius: 8px; white-space: nowrap; text-decoration: none; }
.topbar-enviar:hover { color: var(--brand); }
.topbar-enviar svg { width: 16px; height: 16px; }
/* Botão "Criar demanda" no topo (membros/admin) — pílula com degradê azul */
.topbar-criar { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 1px solid transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); transition: filter .15s var(--ease), transform .15s var(--ease); }
.topbar-criar:hover { filter: brightness(1.08); transform: translateY(-1px); }
.topbar-criar svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .topbar-criar span { display: none; } .topbar-criar { padding: 8px 10px; }
  /* No celular o "Enviar arquivo" injetado fica só com o ícone (não some, pois saiu do menu) */
  .topbar-enviar-injected { display: inline-flex !important; padding: 7px 8px; }
  .topbar-enviar-injected span { display: none; } }
@media (max-width: 760px) {
  .topbar-home .topbar-projects { order: 5; flex-basis: 100%; margin: 6px 0 0; }
}
@media (max-width: 560px) {
  /* Em telas pequenas o "Enviar arquivo" continua acessível pelo menu do avatar */
  .topbar-enviar { display: none !important; }
}

/* Painel de notificações: em telas estreitas, fixa na borda direita (não estoura pra fora) */
@media (max-width: 760px) {
  .notif-panel { position: fixed; top: 60px; right: 8px; left: auto; width: min(340px, calc(100vw - 16px)); max-width: none; }
}

/* Observação opcional da atividade (dashboard de produção) */
.d-area { resize: vertical; min-height: 76px; line-height: 1.45; font-family: inherit; }
.f-hint { display: block; margin-top: 6px; font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-align: right; font-variant-numeric: tabular-nums; }
.ar-note { flex-basis: 100%; margin-top: 2px; padding-left: 2px; font-size: 12px; line-height: 1.45;
  color: var(--muted); border-left: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
  padding-left: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Painel admin: opção "pode excluir os próprios arquivos" */
.au-delown { margin-top: 12px; }
.au-delown-hint { margin: 6px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

/* Painel admin > Discord: demandas que não subiram para o Discord.
   Tudo com prefixo .dlq- para não esbarrar em nada do resto do site. */
.dlq-empty { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dlq-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 14px; }
.dlq-headtext { flex: 1 1 320px; min-width: 0; }
.dlq-title { margin: 0 0 4px; font-size: 16px; }
.dlq-sub { margin: 0; max-width: 62ch; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.dlq-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dlq-feedback { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 32%, transparent); }
.dlq-feedback.erro { background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.dlq-rows { display: flex; flex-direction: column; gap: 8px; }
.dlq-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--bg-soft); cursor: pointer; }
.dlq-row:hover { background: var(--card-hover); }
.dlq-row input { flex: none; accent-color: var(--brand); }
.dlq-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dlq-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlq-meta { color: var(--muted); font-size: 11.5px; }
.dlq-status { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px;
  background: var(--glass-bg); border: 1px solid var(--glass-brd); color: var(--muted); }
@media (max-width: 560px) {
  .dlq-actions { width: 100%; }
  .dlq-actions .btn { flex: 1 1 auto; }
  .dlq-main b { white-space: normal; }
}
.dlq-periodo { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.dlq-periodo select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 12.5px; }
