/* Libtro — sistema de design (identidade em BRAND.md). Claro é o padrão; escuro só redefine as variáveis.
   Os valores-base em :root são os do escuro e o claro sobrescreve (os testes de contraste leem assim).
   data-theme no <html>: light | dark | system (system segue prefers-color-scheme sem JavaScript). */
@font-face {
  font-family: "Inter";
  src: url("/static/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* títulos e textos de destaque (SIL OFL 1.1, ver static/fonts/OFL.txt) */
@font-face {
  font-family: "DM Serif Display";
  src: url("/static/fonts/dm-serif-display-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* superfícies: marrom quase preto, puxado para o vinho da marca */
  --bg: #1b1010;
  --surface: #241615;
  --surface-2: #2f1d1c;
  --surface-3: #3b2524;
  --hover: rgb(255 225 224 / 0.035);
  --line: rgb(255 225 224 / 0.07);
  --line-strong: rgb(255 225 224 / 0.14);
  --line-hover: rgb(255 225 224 / 0.28);
  /* texto */
  --text: #fff1f0;
  --text-2: #ebc9c7;
  --text-3: #c99f9d;
  /* marca: no escuro o acento é o salmão (o vinho não tem contraste sobre fundo escuro) */
  --accent: #ffafad;
  --accent-600: #e8a8a7;
  --accent-700: #c98382;
  --accent-300: #ffafad;
  --accent-soft: rgb(255 175 173 / 0.14);
  --accent-line: rgb(255 175 173 / 0.40);
  --accent-ring: rgb(255 175 173 / 0.9);
  --grad: linear-gradient(135deg, #ffc2c0, #ffafad);
  --on-primary: #4f2a29;
  --grad-text: linear-gradient(135deg, #ffe1e0, #ffafad);
  --nav-active: rgb(255 175 173 / 0.10);
  --field: #170d0d;
  /* estados */
  --ok: #34d399;
  --ok-soft: rgb(52 211 153 / 0.12);
  --ok-text: #a7f3d0;
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / 0.12);
  --warn-text: #fde68a;
  --danger: #ff7a6e;
  --danger-soft: rgb(248 113 113 / 0.12);
  --danger-text: #ff9b8f;
  --danger-line: rgb(248 113 113 / 0.3);
  --info: #8ab4f8;
  --blue-text: #a8c8ff;
  --blue-soft: rgb(96 165 250 / 0.14);
  /* formatos */
  --fmt-epub: #b9a8ff;
  --fmt-pdf: #ffb38a;
  --fmt-docx: #8ab4f8;
  /* vidro, destaques de fundo e sombras */
  --glass: rgb(27 16 16 / 0.86);
  --glass-strong: rgb(59 37 36 / 0.96);
  --hero: radial-gradient(70% 70% at 20% 20%, rgb(130 44 42 / 0.38), transparent 70%), linear-gradient(180deg, #231515, #1b1010);
  --drop-tint: rgb(255 175 173 / 0.08);
  --panel-tint: rgb(255 175 173 / 0.04);
  --bg-glow: rgb(130 44 42 / 0.2);
  --bg-art-1: rgb(130 44 42 / 0.30); --bg-art-2: rgb(79 42 41 / 0.40);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 14px 32px -12px rgb(0 0 0 / 0.65);
  --shadow-glow: 0 6px 20px -10px rgb(255 175 173 / 0.3);
  --scrim: rgb(10 4 4 / 0.7);
  --wash: rgb(255 175 173 / 0.3);
  /* prestígio: cores dos ranks 1 a 7 (@ e badge) e degradê do rank 8; contraste >= 4,5:1 sobre surface e bg */
  --rk-1: #b8b2c7; --rk-2: #7cc8f0; --rk-3: #5edacb; --rk-4: #7edd9a;
  --rk-5: #f5d06a; --rk-6: #ffb37a; --rk-7: #ff9cc6; --rk-8a: #fcd34d; --rk-8b: #d8b4fe;
  /* barra flutuante do celular, chips fortes, campos preenchidos e tons pastel dos cartões-pasta */
  --dock-bg: #0f0808; --dock-fg: #d9b5b3; --dock-active-bg: #ffafad; --dock-active-fg: #4f2a29;
  --ink: #ffafad; --on-ink: #4f2a29; --field-fill: #2a1918;
  --tint-1: #3a2322; --tint-2: #40261f; --tint-3: #37212a; --tint-4: #3a2b22;
  /* escala */
  --font: "Inter", system-ui, "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 160ms var(--ease);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fff6f5;
  --surface: #ffffff;
  --surface-2: #ffedec;
  --surface-3: #ffe1e0;
  --hover: rgb(130 44 42 / 0.05);
  --line: rgb(79 42 41 / 0.10);
  --line-strong: rgb(79 42 41 / 0.18);
  --line-hover: rgb(79 42 41 / 0.32);
  --text: #2b1514;
  --text-2: #5c3533;
  --text-3: #7a4a48;
  --accent: #822c2a;
  --accent-600: #6e2523;
  --accent-700: #4f2a29;
  --accent-300: #822c2a;
  --accent-soft: rgb(232 168 167 / 0.28);
  --accent-line: rgb(130 44 42 / 0.38);
  --accent-ring: rgb(130 44 42 / 0.9);
  --grad: linear-gradient(135deg, #9a3835, #822c2a);
  --on-primary: #ffffff;
  --grad-text: linear-gradient(135deg, #822c2a, #b8504c);
  --nav-active: rgb(232 168 167 / 0.34);
  --field: #ffffff;
  --ok: #16794a;
  --ok-soft: rgb(22 163 74 / 0.12);
  --ok-text: #1d6b44;
  --warn: #a35a08;
  --warn-soft: rgb(217 119 6 / 0.13);
  --warn-text: #8a4a06;
  --danger: #c0281d;
  --danger-soft: rgb(220 38 38 / 0.1);
  --danger-text: #b0261c;
  --danger-line: rgb(220 38 38 / 0.3);
  --info: #2b5fb8;
  --blue-text: #2b5fb8;
  --blue-soft: rgb(59 130 246 / 0.12);
  --fmt-epub: #6d5bd0;
  --fmt-pdf: #d9480f;
  --fmt-docx: #2563eb;
  --glass: rgb(255 246 245 / 0.88);
  --glass-strong: rgb(255 255 255 / 0.96);
  --hero: radial-gradient(70% 80% at 15% 10%, rgb(255 175 173 / 0.38), transparent 70%), radial-gradient(60% 70% at 90% 90%, rgb(232 168 167 / 0.32), transparent 70%), #fff6f5;
  --drop-tint: rgb(130 44 42 / 0.06);
  --panel-tint: rgb(255 175 173 / 0.10);
  --bg-glow: rgb(255 175 173 / 0.30);
  --bg-art-1: rgb(255 175 173 / 0.30); --bg-art-2: rgb(232 168 167 / 0.24);
  --shadow-sm: 0 1px 2px rgb(79 42 41 / 0.06), 0 1px 1px rgb(79 42 41 / 0.03);
  --shadow-md: 0 16px 36px -16px rgb(79 42 41 / 0.24);
  --shadow-glow: 0 8px 22px -10px rgb(130 44 42 / 0.45);
  --scrim: rgb(43 21 20 / 0.38);
  --wash: rgb(255 175 173 / 0.55);
  --rk-1: #5e5a6b; --rk-2: #0b6e9e; --rk-3: #0f766e; --rk-4: #166534;
  --rk-5: #854d0e; --rk-6: #b93e0c; --rk-7: #b0185a; --rk-8a: #854d0e; --rk-8b: #6d28d9;
  --dock-bg: #2b1514; --dock-fg: #ebc9c7; --dock-active-bg: #ffe1e0; --dock-active-fg: #4f2a29;
  --ink: #4f2a29; --on-ink: #ffffff; --field-fill: #fff1f0;
  --tint-1: #ffe1e0; --tint-2: #ffd8d3; --tint-3: #f7dede; --tint-4: #f6e6dc;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
  color-scheme: light;
  --bg: #fff6f5;
  --surface: #ffffff;
  --surface-2: #ffedec;
  --surface-3: #ffe1e0;
  --hover: rgb(130 44 42 / 0.05);
  --line: rgb(79 42 41 / 0.10);
  --line-strong: rgb(79 42 41 / 0.18);
  --line-hover: rgb(79 42 41 / 0.32);
  --text: #2b1514;
  --text-2: #5c3533;
  --text-3: #7a4a48;
  --accent: #822c2a;
  --accent-600: #6e2523;
  --accent-700: #4f2a29;
  --accent-300: #822c2a;
  --accent-soft: rgb(232 168 167 / 0.28);
  --accent-line: rgb(130 44 42 / 0.38);
  --accent-ring: rgb(130 44 42 / 0.9);
  --grad: linear-gradient(135deg, #9a3835, #822c2a);
  --on-primary: #ffffff;
  --grad-text: linear-gradient(135deg, #822c2a, #b8504c);
  --nav-active: rgb(232 168 167 / 0.34);
  --field: #ffffff;
  --ok: #16794a;
  --ok-soft: rgb(22 163 74 / 0.12);
  --ok-text: #1d6b44;
  --warn: #a35a08;
  --warn-soft: rgb(217 119 6 / 0.13);
  --warn-text: #8a4a06;
  --danger: #c0281d;
  --danger-soft: rgb(220 38 38 / 0.1);
  --danger-text: #b0261c;
  --danger-line: rgb(220 38 38 / 0.3);
  --info: #2b5fb8;
  --blue-text: #2b5fb8;
  --blue-soft: rgb(59 130 246 / 0.12);
  --fmt-epub: #6d5bd0;
  --fmt-pdf: #d9480f;
  --fmt-docx: #2563eb;
  --glass: rgb(255 246 245 / 0.88);
  --glass-strong: rgb(255 255 255 / 0.96);
  --hero: radial-gradient(70% 80% at 15% 10%, rgb(255 175 173 / 0.38), transparent 70%), radial-gradient(60% 70% at 90% 90%, rgb(232 168 167 / 0.32), transparent 70%), #fff6f5;
  --drop-tint: rgb(130 44 42 / 0.06);
  --panel-tint: rgb(255 175 173 / 0.10);
  --bg-glow: rgb(255 175 173 / 0.30);
  --bg-art-1: rgb(255 175 173 / 0.30); --bg-art-2: rgb(232 168 167 / 0.24);
  --shadow-sm: 0 1px 2px rgb(79 42 41 / 0.06), 0 1px 1px rgb(79 42 41 / 0.03);
  --shadow-md: 0 16px 36px -16px rgb(79 42 41 / 0.24);
  --shadow-glow: 0 8px 22px -10px rgb(130 44 42 / 0.45);
  --scrim: rgb(43 21 20 / 0.38);
  --wash: rgb(255 175 173 / 0.55);
  --rk-1: #5e5a6b; --rk-2: #0b6e9e; --rk-3: #0f766e; --rk-4: #166534;
  --rk-5: #854d0e; --rk-6: #b93e0c; --rk-7: #b0185a; --rk-8a: #854d0e; --rk-8b: #6d28d9;
  --dock-bg: #2b1514; --dock-fg: #ebc9c7; --dock-active-bg: #ffe1e0; --dock-active-fg: #4f2a29;
  --ink: #4f2a29; --on-ink: #ffffff; --field-fill: #fff1f0;
  --tint-1: #ffe1e0; --tint-2: #ffd8d3; --tint-3: #f7dede; --tint-4: #f6e6dc;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* fundo: dois halos estáticos e suaves nas cores da marca (fixos, atrás do conteúdo; o conteúdo usa z-index:1) */
.bg-blobs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, var(--bg-art-1), transparent 70%),
    radial-gradient(55vmax 45vmax at 100% 100%, var(--bg-art-2), transparent 70%);
}
.bg-blobs i { display: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; line-height: 1.25; }
h1 { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 2vw, 2.7rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; }
h2 { font-size: 1.08rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent-300); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; } }
code { font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.tabbar a:focus-visible, .toast :focus-visible { outline-color: var(--dock-active-bg); }
[hidden] { display: none !important; }

.icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--text-3); }
.small { font-size: 0.86rem; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.between { justify-content: space-between; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.clip { overflow-wrap: anywhere; }
ul.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- estrutura ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 16px; height: calc(100dvh - 32px); display: flex; flex-direction: column; gap: var(--sp-5);
  margin: 16px 0 16px 16px; padding: 20px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--text); font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--grad); color: var(--on-primary); box-shadow: var(--shadow-glow); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--text-2); font-weight: 550; transition: background var(--t), color var(--t);
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); font-weight: 650; }
.nav a[aria-current="page"] .icon { color: var(--on-ink); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-3); }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--accent-300); font-weight: 650; }
.content-col { display: flex; flex-direction: column; min-height: 100dvh; }
.main { flex: 1; padding: var(--sp-6) clamp(16px, 4vw, 56px) 72px; min-width: 0; }
.container { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); }
.page-head p { color: var(--text-2); font-size: 1rem; max-width: 62ch; }
.topbar, .tabbar { display: none; }

/* seletor de tema (sistema / claro / escuro) */
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: background var(--t), color var(--t), transform var(--t); }
.theme-toggle:hover { color: var(--text); background: var(--surface-3); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .ic-sun { display: none; }
.theme-toggle .ic-moon { display: grid; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: grid; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .theme-toggle .ic-sun { display: grid; }
  :root[data-theme="system"] .theme-toggle .ic-moon { display: none; }
}
/* transição suave entre temas: só dura o instante da troca (classe .theme-anim colocada pelo app.js) */
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  /* ai-design-check-ignore-next-line interface-speed -- troca de tema, não resposta a clique */
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease), fill 0.45s var(--ease), stroke 0.45s var(--ease) !important;
}
html.theme-anim::after {
  content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(120% 90% at 85% 0%, var(--wash), transparent 62%);
  animation: theme-wash 0.7s ease-out forwards;
}
@keyframes theme-wash { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: none !important; }
  html.theme-anim::after { display: none; }
}
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
.theme-switch button { display: grid; place-items: center; width: 32px; height: 28px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-3); cursor: pointer; transition: background var(--t), color var(--t), box-shadow var(--t); }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); position: sticky; top: 0; z-index: 20;
    padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  }
  .topbar .btn-icon, .topbar .theme-toggle { width: 42px; height: 42px; min-height: 42px; border: 1px solid var(--line); background: var(--surface); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; position: fixed; inset: auto 12px calc(12px + env(safe-area-inset-bottom)) 12px; z-index: 30;
    padding: 8px; background: var(--dock-bg); border: 0; border-radius: var(--r-pill); box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.55);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 4px; border-radius: var(--r-pill); color: var(--dock-fg); font-size: 0.68rem; font-weight: 600; }
  .tabbar a .icon { width: 20px; height: 20px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a { position: relative; }
  .tabbar .nav-badge { position: absolute; top: 0; right: calc(50% - 22px); min-width: 16px; padding: 0 4px; margin: 0; font-size: 0.65rem; }
  .tabbar a[aria-current="page"] { color: var(--dock-active-fg); background: var(--dock-active-bg); }
  .tabbar a[aria-current="page"] .icon { color: var(--dock-active-fg); }
  .main { padding: 20px 16px 120px; }
}

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.card-pad { padding: var(--sp-5); }
@media (max-width: 560px) { .card-pad { padding: 20px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 20px var(--sp-5) var(--sp-2); }
.card-head p { color: var(--text-3); font-size: 0.86rem; }
a.card { transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent-line); text-decoration: none; }
.section-label { color: var(--text); font-size: 1.05rem; font-weight: 650; letter-spacing: 0; text-transform: none; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-pill); font: 600 0.92rem/1 var(--font);
  color: var(--text); background: var(--surface-2); cursor: pointer; white-space: nowrap;
  transition: transform var(--t), background var(--t), border-color var(--t), box-shadow var(--t), opacity var(--t);
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: var(--on-primary); box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn-secondary { border-color: var(--line-strong); background: var(--surface); }
.btn-secondary:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--hover); }
.btn-danger { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger-line); }
.btn-danger:hover { filter: brightness(0.96); background: var(--danger-soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.85rem; border-radius: var(--r-pill); }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn.htmx-request { pointer-events: none; opacity: 0.75; }
.btn.htmx-request::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin 0.7s linear infinite; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 0.86rem; font-weight: 600; color: var(--text-2); }
.hint { font-size: 0.8rem; color: var(--text-3); }
.input, .select {
  width: 100%; min-height: 48px; padding: 0 16px; background: var(--field-fill); color: var(--text);
  border: 1px solid transparent; border-radius: var(--r-md); font: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover { border-color: var(--line-strong); }
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft); background: var(--field); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d87a3' stroke-width='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 12px center; }
.select-sm { min-height: 38px; font-size: 0.84rem; border-radius: var(--r-pill); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); font-weight: 600; font-size: 0.88rem;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.pill:hover span { border-color: var(--accent-line); color: var(--text); }
.pill input:checked + span { background: var(--ink); border-color: transparent; color: var(--on-ink); box-shadow: none; }
.pill input:focus-visible + span { outline: 2px solid var(--accent-ring); outline-offset: 2px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; font-size: 0.9rem; border: 0; }
.alert .icon { margin-top: 2px; }
.alert-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok-text); }
.alert-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-text); }
.alert-error { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.alert-info { background: var(--tint-1); border-color: transparent; color: var(--text-2); }
.alert-info .icon { color: var(--accent-300); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 0.76rem; font-weight: 650; border: 1px solid transparent; white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge-pending { background: var(--surface-3); color: var(--text-2); }
.badge-running { background: var(--accent-soft); color: var(--accent-300); border-color: transparent; }
.badge-running .icon { animation: spin 1s linear infinite; }
.badge-completed { background: var(--ok-soft); color: var(--ok-text); }
.badge-failed { background: var(--danger-soft); color: var(--danger-text); }
.badge-cancelled { background: var(--surface-3); color: var(--text-3); }
.badge-expired { background: var(--warn-soft); color: var(--warn-text); }

.bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
/* ai-design-check-ignore-next-line interface-speed -- barra de progresso acompanha o trabalho, não um clique */
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width 0.4s var(--ease); position: relative; overflow: hidden; }
.bar.is-running > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.4), transparent); animation: shimmer 1.4s linear infinite; }
.bar.is-pending > i { background: var(--text-3); }

.tile { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 16px; background: var(--tint-1); color: var(--accent-300); }
.tile-epub { color: var(--fmt-epub); background: color-mix(in srgb, var(--fmt-epub) 13%, transparent); }
.tile-pdf { color: var(--fmt-pdf); background: color-mix(in srgb, var(--fmt-pdf) 13%, transparent); }
.tile-docx { color: var(--fmt-docx); background: color-mix(in srgb, var(--fmt-docx) 13%, transparent); }
.tile-lg { width: 52px; height: 52px; border-radius: 18px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 861px) { .tabs { flex-wrap: wrap; overflow: visible; } }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: 0.88rem; white-space: nowrap; transition: background-color var(--t), color var(--t), box-shadow var(--t); }
.tab:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.tab[aria-selected="true"] .icon { color: var(--on-ink); }
.count { padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: 0.72rem; font-weight: 650; }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--text-2); font-size: 0.86rem; font-weight: 600; cursor: pointer; background: var(--surface); font-family: inherit; transition: background-color var(--t), border-color var(--t), color var(--t); }
.chip:hover { border-color: var(--accent-line); color: var(--text); text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: transparent; color: var(--on-ink); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: var(--sp-6) var(--sp-4); color: var(--text-2); }
.empty .tile { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-300); }
.empty h3 { font-size: 1rem; color: var(--text); }
.empty p { max-width: 42ch; font-size: 0.9rem; color: var(--text-3); }

/* menu de ações (details) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 210px; padding: 8px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md);
}
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent;
  color: var(--text-2); font: 550 0.88rem var(--font); text-align: left; cursor: pointer;
}
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.menu-list .danger { color: var(--danger-text); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* lista de arquivos / tarefas */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: var(--sp-3); padding: 14px 18px; border-top: 1px solid var(--line); transition: background var(--t); }
.item:first-child { border-top: 0; }
.item:hover { background: var(--hover); border-radius: 18px; }
.item:has(.row-check:checked) { background: var(--accent-soft); }
.item-title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--text-3); font-size: 0.82rem; margin-top: 2px; }
.item-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; }
.item-note { margin-top: 6px; font-size: 0.84rem; color: var(--text-2); }
.item-note.err { color: var(--danger-text); }
.item .bar { margin-top: 10px; max-width: none; }
@media (max-width: 640px) {
  .item { flex-wrap: wrap; }
  .item .item-actions { flex: 1 1 100%; justify-content: flex-start; padding-left: 54px; }
  .item .item-actions.single { flex: none; padding-left: 0; margin-left: auto; }
  .item:has(.item-actions.single) { flex-wrap: nowrap; }
}
.item-actions:empty { display: none; }
.check { appearance: none; flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--field); cursor: pointer; display: grid; place-items: center; transition: background-color var(--t), border-color var(--t), box-shadow var(--t); }
.check:hover { border-color: var(--accent); }
.check:checked { background: var(--accent); border-color: transparent; }
.check:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

.list-head { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); color: var(--text-3); font-size: 0.8rem; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.search { position: relative; flex: 1 1 220px; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 44px; border-radius: var(--r-pill); }

.selbar {
  position: sticky; bottom: 96px; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); justify-content: space-between;
  padding: 10px 14px; border-radius: var(--r-lg); background: var(--glass-strong); border: 1px solid var(--accent-line);
  box-shadow: var(--shadow-md);
}
@media (min-width: 861px) { .selbar { bottom: 20px; } }

.op-panel { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); background: linear-gradient(180deg, var(--panel-tint), transparent), var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.op-panel-head { display: flex; align-items: center; gap: var(--sp-3); }

/* upload */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-6) var(--sp-5); text-align: center; cursor: pointer;
  border: 2px dashed var(--accent-line); border-radius: var(--r-xl);
  background: radial-gradient(80% 140% at 50% 0%, var(--drop-tint), transparent 70%), var(--surface);
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.over { border-style: solid; border-color: var(--accent); transform: scale(1.005); background: radial-gradient(80% 140% at 50% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.dropzone .tile { width: 60px; height: 60px; border-radius: 20px; background: var(--grad); color: var(--on-primary); box-shadow: var(--shadow-glow); border: 0; }
.dropzone strong { font-size: 1.02rem; }
.dropzone .formats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.dropzone .formats .badge { background: var(--tint-1); color: var(--text-2); }
.uploads { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upl { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: pop 0.2s var(--ease); }
.upl[data-state="error"] { border-color: var(--danger-line); }
.upl[data-state="done"] { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.upl .state { font-size: 0.84rem; }
.upl .state.error { color: var(--danger-text); }
.upl .state.done { color: var(--ok-text); }
.upl .state.cancelled, .upl .state.waiting { color: var(--text-3); }
.upl .bar { margin-top: 6px; }
/* nome do arquivo: nunca quebra letra por letra; no máximo duas linhas, o resto vai para o title */
.upl > .grow { min-width: 0; }
.upl .item-title { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upl > .grow:first-child { flex: 2 1 0; }
.upl > .grow:nth-child(2) { flex: 1 1 0; }
.upl .btn, .upl .btn-icon { flex: none; }
@media (max-width: 640px) {
  .upl { flex-wrap: wrap; row-gap: 8px; }
  .upl > .grow:first-child { flex: 1 1 100%; }  /* o nome ocupa a linha de cima inteira */
  .upl > .grow:nth-child(2) { flex: 1 1 0; min-width: 7rem; }  /* status e barra ao lado dos botões */
  .upl .btn:not(.btn-icon) { margin-left: auto; }
}

/* grids */
.grid { display: grid; gap: var(--sp-4); }
.grid-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-ops { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lib-grid { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1380px) { .lib-grid { grid-template-columns: minmax(0, 1fr) 320px; } .lib-side { position: sticky; top: 24px; } }
@media (max-width: 900px) { .grid-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-stats { grid-template-columns: minmax(0, 1fr); } .grid-ops { grid-template-columns: minmax(0, 1fr); } }
.stat { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); }
.stat-value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stat-label { color: var(--text-3); font-size: 0.84rem; }
.op-card { display: flex; flex-direction: column; gap: 10px; padding: var(--sp-4); color: var(--text); transition: transform var(--t), border-color var(--t), background var(--t), box-shadow var(--t); }
.op-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.op-card p { color: var(--text-3); font-size: 0.84rem; }
.meter { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }

/* toasts + modal */
.toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
@media (max-width: 860px) { .toasts { bottom: 100px; } }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--dock-bg); color: var(--dock-active-bg); border: 0; box-shadow: var(--shadow-md); animation: slide 0.25s var(--ease); font-size: 0.9rem; }
.toast-success .icon { color: color-mix(in srgb, var(--ok) 45%, var(--dock-active-bg)); } .toast-error .icon { color: color-mix(in srgb, var(--danger) 40%, var(--dock-active-bg)); } .toast-warn .icon { color: color-mix(in srgb, var(--warn) 50%, var(--dock-active-bg)); } .toast-info .icon { color: var(--dock-active-bg); }
dialog { padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); max-width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--scrim); }
.dialog-body { padding: 28px 28px 12px; display: flex; flex-direction: column; gap: var(--sp-3); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 28px 28px; }
@media (max-width: 560px) {
  dialog { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 28px 28px 0 0; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}

/* autenticação */
.auth { position: relative; z-index: 1; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-hero { display: flex; flex-direction: column; justify-content: center; gap: var(--sp-5); margin: 16px; padding: clamp(24px, 6vw, 80px); border-radius: 32px; color: var(--text); background: radial-gradient(70% 60% at 85% 15%, var(--accent-soft), transparent 70%), linear-gradient(160deg, var(--tint-1), var(--tint-2)); }
.auth-hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem); max-width: 14ch; }
.auth-hero h1 em { font-style: normal; background: none; color: var(--accent-300); }
.auth-points { display: flex; flex-direction: column; gap: 14px; color: var(--text-2); }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.auth-points li .tile { background: var(--surface); }
.auth-form { display: grid; place-items: center; padding: var(--sp-5); }
.auth-card { width: min(420px, 100%); padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
@media (max-width: 860px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-hero { margin: 12px; padding: 24px 20px; gap: var(--sp-4); } .auth-points { display: none; } .auth-hero h1 { max-width: none; font-size: 1.7rem; } }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.htmx-added { animation: pop 0.2s var(--ease); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

/* utilitários finais */
.link { color: var(--accent-300); text-decoration: underline; cursor: pointer; }
.spin { animation: spin 1s linear infinite; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }

.dropzone.compact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-4); row-gap: 2px; align-items: center; text-align: left; padding: var(--sp-4) var(--sp-5); }
.dropzone.compact .tile { grid-row: span 3; }
.dropzone.compact .formats { justify-content: flex-start; }
@media (max-width: 560px) { .dropzone.compact { grid-template-columns: minmax(0, 1fr); text-align: center; } .dropzone.compact .tile { grid-row: auto; margin: 0 auto; } .dropzone.compact .formats { justify-content: center; } }

/* ---------- contas, comunidade e administração ---------- */
.btn-ok { background: var(--grad); color: var(--on-primary); box-shadow: var(--shadow-glow); }
.btn-ok:hover { filter: brightness(1.06); background: var(--grad); }
.nav-sep { height: 1px; margin: 8px 12px; background: var(--line); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar img { border-radius: 50%; }
.user-chip { color: var(--text); padding: 6px; border-radius: 18px; transition: background var(--t); }
.user-chip:hover { background: var(--hover); text-decoration: none; }
.user-chip[aria-current="page"] { background: var(--surface-2); }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-3); cursor: pointer; }
.input-btn:hover { color: var(--text); background: var(--hover); }
.field-error { color: var(--danger-text); font-size: 0.82rem; }
.textarea { min-height: 120px; padding: 12px 16px; border-radius: var(--r-md); resize: vertical; line-height: 1.5; }

dialog.welcome { width: min(460px, calc(100vw - 32px)); max-width: none; border-color: var(--accent-line); }
dialog.welcome::backdrop { background: var(--scrim); }
.cred { display: flex; flex-direction: column; gap: 6px; }
.cred-value { padding: 10px 12px; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--line-strong); font-weight: 650; overflow-wrap: anywhere; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-4); margin: 0; }
.kv dt { color: var(--text-3); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kv dd { margin: 2px 0 0; color: var(--text); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); line-height: 1.6; }
.prose.rich { white-space: normal; }
.prose.rich h3, .prose.rich h4, .prose.rich h5 { color: var(--text); margin: 14px 0 6px; font-size: 1rem; }
.prose.rich ul { padding-left: 20px; margin: 8px 0; }
.prose.rich p { margin: 8px 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); }

.timeline { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); }
.timeline li { display: flex; gap: 12px; }
.timeline .dot { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.badge-fb-new { background: var(--surface-3); color: var(--text-2); }
.badge-fb-reviewing { background: var(--blue-soft); color: var(--blue-text); }
.badge-fb-in_progress { background: var(--accent-soft); color: var(--accent-300); border-color: transparent; }
.badge-fb-done { background: var(--ok-soft); color: var(--ok-text); }
.badge-fb-rejected { background: var(--danger-soft); color: var(--danger-text); }
.badge-cat-bug { background: var(--danger-soft); color: var(--danger-text); }
.badge-cat-suggestion { background: var(--warn-soft); color: var(--warn-text); }
.badge-cat-improvement { background: var(--blue-soft); color: var(--blue-text); }
.badge-kind-feature { background: var(--accent-soft); color: var(--accent-300); }
.badge-kind-improvement { background: var(--blue-soft); color: var(--blue-text); }
.badge-kind-fix { background: var(--ok-soft); color: var(--ok-text); }
.badge-kind-security { background: var(--danger-soft); color: var(--danger-text); }
.badge-kind-other { background: var(--surface-3); color: var(--text-2); }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; padding: 10px 14px; background: var(--surface-2); color: var(--text-3); font-size: 0.76rem; font-weight: 650; letter-spacing: 0; text-transform: none; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child { border-top-left-radius: 14px; }
.table th:last-child { border-top-right-radius: 14px; }
.table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.scroll { overflow-x: auto; }
ul.alerts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: var(--warn-text); font-size: 0.84rem; }
ul.alerts li { display: flex; gap: 6px; align-items: flex-start; }
ul.alerts .icon { margin-top: 3px; }

.range { width: 100%; accent-color: var(--accent); height: 28px; }
.range:disabled { opacity: 0.4; }
.range-out { margin-left: 8px; color: var(--accent-300); font-weight: 650; }

.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.guest-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.guest-banner { border-color: var(--accent-line); }

/* métricas: gráfico de barras em CSS puro e seletor de período */
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); border: 0; align-self: flex-start; }
.seg-item { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); color: var(--text-2); font-size: 0.88rem; font-weight: 500; }
.seg-item:hover { text-decoration: none; color: var(--text); }
.seg-item[aria-current="true"] { background: var(--ink); color: var(--on-ink); }
.bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, 1.2vw, 10px); height: 190px; align-items: stretch; }
.bar-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; padding-bottom: 20px; }
.bar-col > i { display: block; width: 100%; max-width: 40px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--accent); opacity: 0.85; transition: opacity var(--t); }
.bar-col:hover > i { opacity: 1; }
.bar-val { font-size: 0.74rem; color: var(--text-3); height: 18px; line-height: 18px; }
.bar-lbl { position: absolute; bottom: 0; font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }
.rank { width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; }

/* tema na tela de entrada e foco/movimento */
.auth-theme { position: absolute; z-index: 3; top: 16px; right: 16px; }
.auth-hero .brand { padding: 0; }
.nav a:active, .tabbar a:active { transform: scale(0.98); }
.tts-summary { padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); font-size: 0.88rem; }

/* painel de ações do arquivo (depois do upload ou ao escolher uma ação) */
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.02rem; border-radius: var(--r-pill); }
.act-panel { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); border-color: var(--accent-line); scroll-margin-top: 84px; animation: pop 0.2s var(--ease); }
.act-head { display: flex; align-items: center; gap: var(--sp-3); }
.act-head h2 { font-size: 1.15rem; }
.act-lead { color: var(--text-2); }
.act-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
@media (max-width: 900px) { .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.act-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--sp-4); border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color var(--t), transform var(--t), box-shadow var(--t); }
button.act-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.act-card.is-off { opacity: 0.75; cursor: default; background: var(--surface-2); border-style: dashed; }
.act-step { display: flex; align-items: center; gap: var(--sp-3); }
.act-run { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding-top: var(--sp-2); }
.menu-list button { white-space: normal; }

/* narração: amostra e configurações avançadas */
.preview-row { flex-direction: row; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
#preview-status.err { color: var(--danger-text); }
.adv { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.adv > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; color: var(--text-2); }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform var(--t); }
.adv[open] > summary::after { transform: rotate(-135deg); }
.adv-sum { font-weight: 400; margin-left: 4px; }
.adv-body { padding: 4px 14px 16px; }
.act-panel .op-panel { padding: 0; border: 0; background: none; }
.act-panel .op-panel-head { display: none; }
.selbar .btn-primary { min-height: 46px; padding: 0 22px; font-size: 0.98rem; }

/* cartões de arquivo: áreas distintas (seleção, ícone, texto, ações) em vez de uma linha única que se espreme.
   Largura = a da própria lista (container query), não a da janela: a fila lateral muda o espaço disponível. */
#lib-list { container-type: inline-size; }
.file-row {
  display: grid; align-items: center; column-gap: var(--sp-3); row-gap: 10px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "chk tile info menu";
}
.file-row > .row-check { grid-area: chk; }
.file-row > .tile { grid-area: tile; }
.file-row > .grow { grid-area: info; min-width: 0; }
.file-row > .item-actions { grid-area: menu; flex-wrap: nowrap; justify-content: flex-end; padding-left: 0; margin-left: 0; flex: none; }
.file-row .item-title { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* outras abas (conversão em lote etc.): botões do arquivo descem para baixo do texto em lista estreita */
@container (max-width: 560px) {
  .file-row:has(> .item-actions:not(.single)) { grid-template-areas: "chk tile info" ". . menu"; grid-template-columns: auto auto minmax(0, 1fr); }
  .file-row:has(> .item-actions:not(.single)) > .item-actions { justify-content: flex-start; flex-wrap: wrap; }
}

.remember { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.remember .check { margin-top: 2px; }
.remember .hint { display: block; margin-top: 2px; }

/* filtros da biblioteca (Todos, Conversão, Tradução, Narração, Kindle): barra segmentada e compacta.
   Separada das abas genéricas (.tabs), que continuam iguais nas telas de administração e configurações. */
.filter-bar {
  display: inline-flex; align-items: stretch; gap: 8px; padding: 0; max-width: 100%; align-self: flex-start;
  background: transparent; border-radius: var(--r-md);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-pill); scroll-snap-align: start;
  background: var(--surface); color: var(--text-2); font-size: 0.86rem; font-weight: 600; white-space: nowrap;
  transition: background var(--t), color var(--t), box-shadow var(--t), border-color var(--t);
}
.filter:hover { color: var(--text); background: var(--surface); border-color: var(--accent-line); text-decoration: none; }
.filter .icon { width: 15px; height: 15px; }
.filter[aria-selected="true"] {
  background: var(--ink); color: var(--on-ink); font-weight: 650; border-color: transparent;
  box-shadow: none;
}
.filter[aria-selected="true"] .icon { color: var(--on-ink); }
.filter-count {
  min-width: 1.4em; font-size: 0.72rem; font-weight: 500; color: var(--text-3);
  font-variant-numeric: tabular-nums; text-align: center; opacity: 0.85;
}
.filter[aria-selected="true"] .filter-count { color: var(--on-ink); opacity: 0.8; }
.filter:focus-visible { outline-offset: -2px; }
@media (max-width: 560px) {
  .filter { flex: 0 0 auto; padding: 0 11px; min-height: 40px; font-size: 0.84rem; }
  .filter-bar { padding: 0; }
}

/* @ de usuário: cor do prestígio (rk-N); o botão abre o cartão da conta */
.nick, .nick-link { font-weight: 650; color: var(--text); }
.nick-link { all: unset; cursor: pointer; font-weight: 650; color: var(--text); border-bottom: 1px dotted var(--text-3); }
.nick-link:hover { border-bottom-color: currentColor; }
.nick-link:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }
.nick.rk-1, .nick-link.rk-1 { color: var(--rk-1); }
.nick.rk-2, .nick-link.rk-2 { color: var(--rk-2); }
.nick.rk-3, .nick-link.rk-3 { color: var(--rk-3); }
.nick.rk-4, .nick-link.rk-4 { color: var(--rk-4); }
.nick.rk-5, .nick-link.rk-5 { color: var(--rk-5); }
.nick.rk-6, .nick-link.rk-6 { color: var(--rk-6); }
.nick.rk-7, .nick-link.rk-7 { color: var(--rk-7); }
.nick.rk-8, .nick-link.rk-8 { color: var(--rk-8a); } /* fallback sem recorte de texto */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .nick.rk-8, .nick-link.rk-8 {
    background: linear-gradient(90deg, var(--rk-8a), var(--rk-8b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* pílula do rank (ícone + nome). A cor vem de --rk, definida por classe */
.rank-badge {
  --rk: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 0.76rem; font-weight: 650; white-space: nowrap; color: var(--rk);
  border: 1px solid color-mix(in srgb, var(--rk) 40%, transparent);
  background: color-mix(in srgb, var(--rk) 13%, transparent);
}
.rank-badge.rk-1 { --rk: var(--rk-1); }
.rank-badge.rk-2 { --rk: var(--rk-2); }
.rank-badge.rk-3 { --rk: var(--rk-3); }
.rank-badge.rk-4 { --rk: var(--rk-4); }
.rank-badge.rk-5 { --rk: var(--rk-5); }
.rank-badge.rk-6 { --rk: var(--rk-6); }
.rank-badge.rk-7 { --rk: var(--rk-7); }
.rank-badge.rk-8 { --rk: var(--rk-8a); }
.rank-badge .icon { width: 14px; height: 14px; }
.rank-pos { min-width: 2.4em; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
dialog.user-dialog { width: min(520px, calc(100vw - 32px)); max-width: none; }

/* início: envio em destaque, resumo em uma faixa e operações logo abaixo */
.hero-drop .dropzone { padding: var(--sp-6) var(--sp-5); min-height: 190px; justify-content: center; }
.hero-drop .dropzone strong { font-size: 1.15rem; }
.stat-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; color: var(--text-2); font-size: 0.9rem; }
.stat-item { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; color: var(--text-2); }
.stat-item .icon { color: var(--accent-300); }
.stat-item strong { color: var(--text); }
.op-card.is-off { opacity: 0.7; cursor: default; background: var(--surface-2); }
.op-card.is-off:hover { transform: none; box-shadow: none; }
.badge-cat-other { background: var(--surface-3); color: var(--text-2); }

/* ---------- Fase 2: saudação, seções e pastas ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 1.12rem; font-weight: 650; color: var(--text); }
.section-more { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px; font-size: 0.88rem; font-weight: 600; color: var(--accent-300); text-decoration: none; }
.section-more:hover { text-decoration: underline; }
.section-more .icon { width: 16px; height: 16px; }

.greet { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.greet-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.greet-sub { font-size: 0.9rem; font-weight: 600; color: var(--text-3); }
.greet-text > p:last-child { color: var(--text-2); }
.greet-avatar { flex: none; display: grid; padding: 3px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tint-2); box-shadow: var(--shadow-sm); }
.greet-avatar .avatar, .greet-avatar img { width: 52px; height: 52px; }
@media (max-width: 860px) { .greet-avatar .avatar, .greet-avatar img { width: 44px; height: 44px; } }

.folders { display: grid; gap: 16px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); } .folder { min-height: 150px; } }
.folder {
  --f: var(--tint-1);
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 20px 20px; min-height: 168px; margin-top: 14px;
  background: var(--f); color: var(--text); border-radius: 8px 26px 26px 26px;
  transition: transform var(--t), box-shadow var(--t);
}
.folder::before {
  content: ""; position: absolute; left: 0; top: -14px; width: 46%; height: 22px;
  background: var(--f); border-radius: 14px 14px 0 0;
}
.folder::after {
  content: ""; position: absolute; top: -10px; left: calc(46% - 6px); width: 20px; height: 12px;
  background: var(--f); border-radius: 0 14px 0 0; transform: skewX(28deg);
}
.folder-1 { --f: var(--tint-1); }
.folder-2 { --f: var(--tint-2); }
.folder-3 { --f: var(--tint-3); }
.folder-4 { --f: var(--tint-4); }
.folder-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface); color: var(--accent-300); box-shadow: var(--shadow-sm); }
.folder strong { font-size: 1.02rem; font-weight: 650; }
.folder p { font-size: 0.86rem; color: var(--text-2); }
.folder-go { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); }
a.folder { transition: transform var(--t), box-shadow var(--t); }
a.folder:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.folder.is-off { opacity: 0.7; cursor: default; }
.folder.is-off .folder-go { display: none; }

/* ilustração da marca (templates/_illus.html): só variáveis, acompanha claro/escuro */
.illus { display: block; width: 100%; max-width: 360px; height: auto; }
.illus .il-bg { fill: var(--tint-1); }
.illus .il-shadow { fill: var(--line-strong); }
.illus .il-b1 { fill: var(--accent); }
.illus .il-b2 { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.illus .il-b3 { fill: var(--accent-700); }
.illus .il-band { fill: var(--tint-2); }
.illus .il-page { fill: var(--surface); }
.illus .il-open { fill: var(--surface); stroke: var(--accent-700); stroke-width: 3; stroke-linejoin: round; }
.illus .il-open-page { fill: var(--field-fill); stroke: var(--accent-700); stroke-width: 2; stroke-linejoin: round; }
.illus .il-line { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
.illus .il-star { fill: var(--accent); }
.illus .il-star-sm { fill: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.illus .il-dot { fill: var(--tint-2); }
.auth-illus { max-width: 300px; margin: 0 0 var(--sp-2); }
@media (max-width: 860px) { .auth-illus { display: none; } }

/* ---------- mensagens privadas ---------- */
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--grad); color: var(--on-primary); font-size: 0.72rem; font-weight: 700; text-align: center; }
.msg-unread:empty { display: none; }
.msg-top .nav-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; padding: 0 4px; font-size: 0.65rem; }
.msg-row { text-decoration: none; color: inherit; }
.msg-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); max-height: 60vh; overflow-y: auto; }
.msg { max-width: min(560px, 92%); padding: 10px 14px; border-radius: var(--r-md, 12px); background: var(--surface-2); border: 1px solid var(--line); }
.msg-mine { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.msg-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-top { position: relative; }

/* ---------- área pública (visitantes sem login) e rodapé ---------- */
.pub { min-height: 100dvh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.pub-bar { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; position: sticky; top: 0; z-index: 20; padding: 10px clamp(16px, 4vw, 56px); border-bottom: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.pub-nav { display: flex; gap: var(--sp-4); margin-right: auto; }
.pub-nav a { color: var(--text-2); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: var(--r-pill); }
.pub-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.pub-main { flex: 1; padding: var(--sp-6) clamp(16px, 4vw, 56px) var(--sp-6); min-width: 0; }
.site-foot { width: 100%; margin: 0; z-index: 5; background: transparent; border-top: 0; font-size: .75rem; }
.site-foot-in { max-width: 1040px; margin: 0 auto; padding: 6px clamp(16px,4vw,56px); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; color: var(--text-2); }
.site-foot-in p { margin: 0; overflow-wrap: anywhere; }
.site-foot-in nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.site-foot a { display: inline-block; padding: 4px 2px; color: var(--text-3); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.app .site-foot { position: fixed; bottom: 0; left: 300px; right: 0; width: auto; margin: 0; z-index: 5; }
.pub .site-foot { position: sticky; bottom: 0; margin-top: auto; }
.legal h2 { font-size: 1.15rem; margin-top: var(--sp-5); }
.legal ul { padding-left: 1.2rem; list-style: disc; display: flex; flex-direction: column; gap: 4px; }
.legal .pending { background: var(--surface-2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; }
.howto a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
@media (max-width: 860px) { .app .site-foot { position: static; left: auto; right: auto; padding-bottom: 76px; } .pub .site-foot { padding-bottom: 0; } }

/* ---------- espaço complementar da tela de processamento ---------- */
.ad-slot { margin: var(--sp-3) var(--sp-4) var(--sp-4); padding: var(--sp-3); border: 1px dashed var(--line); border-radius: var(--r-md, 12px); display: flex; flex-direction: column; gap: 6px; min-height: 64px; max-width: 100%; overflow: hidden; }
.ad-slot[hidden] { display: none; }
.ad-slot[data-ad-state="filled"] { border-style: solid; }
.ad-body { min-height: 40px; }
.ad-hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--text-2); }

/* renomear: edição inline na lista (o nome some e o campo aparece no lugar) */
.rename-form { display: flex; gap: var(--sp-2); align-items: center; width: 100%; min-width: 0; }
.rename-form .rename-input { flex: 1 1 auto; min-width: 0; min-height: 34px; font-weight: 600; }
.rename-form > .muted { flex: none; }

/* renomear: editor em lote (diálogo largo, grade de campos) */
#rename-dialog { width: min(680px, 94vw); max-width: none; }
/* diálogos de largura própria viram folha no celular (vencem as regras de largura acima) */
@media (max-width: 560px) {
  dialog.welcome, #rename-dialog, dialog.user-dialog { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 28px 28px 0 0; }
}
.rename-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.rename-grid .field { min-width: 0; }
.rename-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .rename-grid { grid-template-columns: minmax(0, 1fr); } }
.rename-check { display: flex; align-items: flex-start; gap: 10px; min-height: 42px; font-size: 0.9rem; color: var(--text-2); cursor: pointer; }
.rename-check .check { margin-top: 2px; }
.rn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); background: transparent; color: var(--text-2); font: 600 0.8rem/1 var(--font); cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.rn-chip:hover { background: var(--hover); color: var(--text); border-color: var(--accent-line); }
.rename-preview-box { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; background: var(--surface-2); }
.rename-preview-box:empty { display: none; }
.rename-prev { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
.rename-prev li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.rp-old { color: var(--text-2); text-decoration: line-through; }
.rp-new { font-weight: 600; }
.rp-same { color: var(--text-2); font-weight: 400; }

/* fila de tarefas: nomes longos em uma linha com reticências; mensagens limitadas a 2 linhas */
li.item { min-width: 0; }
.item-title.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; overflow-wrap: normal; }
.item-note { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
li.item[data-task-id][hidden] { display: none; }
.head-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; }
.hist-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.hist-bar .chips { min-width: 0; }
.hist-bar > .btn { margin-left: auto; }

/* fila lateral: ações em linha própria para o nome ter largura */
.lib-side .item { flex-wrap: wrap; }
.lib-side .item .item-actions { flex: 1 1 100%; justify-content: flex-start; padding-left: 54px; }

/* aviso de cookies (visitantes e telas de entrada): fixo no rodapé, acima do conteúdo */
.cookie-notice {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60;
  width: min(640px, calc(100vw - 32px)); display: flex; align-items: center; gap: var(--sp-4);
  padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); font-size: 0.84rem; color: var(--text-2);
}
.cookie-notice p { margin: 0; flex: 1; }
.cookie-notice .btn { flex: none; }
@media (max-width: 560px) {
  .cookie-notice { flex-direction: column; align-items: stretch; }
}

/* preparo de PDF (texto/OCR): pílula discreta; opções de envio compactas; botões indisponíveis */
.prep-pill {
  display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--tint-2); border: 1px solid transparent; color: var(--text-2); font-size: .76rem; white-space: nowrap;
}
.prep-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .prep-pill::before { animation: prep-pulse 1.6s ease-in-out infinite; }
}
@keyframes prep-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.upload-opts { margin-top: 8px; font-size: .84rem; }
.upload-opts .adv-body { padding: 2px 14px 12px; display: grid; gap: 8px; }
.upload-opts label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.menu-op[disabled] { opacity: .55; cursor: not-allowed; }

.more-row { display: flex; align-items: center; gap: var(--sp-3); color: inherit; text-decoration: none; min-height: 48px; }
.more-row:hover { text-decoration: none; }
.more-row .icon:last-child { color: var(--text-3); }
