/* ===== Fonte Poppins (arquivos locais em fonts/, licença OFL) ===== */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/poppins-800.woff2) format('woff2'); }

/* ===== Tokens do kit de layout (styles/tokens.css) ===== */
:root {
  --brand-header: #00494F; --brand-turquesa: #00AE9D; --brand-lima: #C9D200;
  --page: #F2F6F6; --surface: #FFFFFF; --surface-2: #F5F8F8; --segment: #E4EBEC;
  --border: #E1E8E9; --border-input: #D5DFE0;
  --text: #0C2B31; --text-muted: #56676C; --text-placeholder: #8A9A9E;
  --accent-text: #007A70; --accent-soft: #E1F5F2; --accent-strong: #00494F;
  --primary-bg: #00494F; --primary-bg-hover: #003641; --primary-fg: #FFFFFF;
  --primary-disabled-bg: #E4EBEC; --primary-disabled-fg: #8A9A9E;
  --progress-track: #3E7B80; /* parte que falta da barra no botão (texto branco continua legível) */
  --header-bg: #00494F; --hover: #F2F6F6;
  --pos-bg: #E3F4E8; --pos-fg: #17803D;
  --warn-bg: #FFF1CC; --warn-fg: #8A5A00;
  --neg-bg: #FBE7E5; --neg-fg: #B3261E;
  --shadow-card: 0 1px 2px rgba(12,43,49,.04), 0 4px 16px rgba(12,43,49,.04);
  --shadow-header: 0 2px 12px rgba(0,40,46,.18);
  --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 64px; --sidebar-w: 240px; --sidebar-w-collapsed: 72px;
  color-scheme: light;
}
.dark {
  --page: #081316; --surface: #0F1D21; --surface-2: #14262B; --segment: #1C3035;
  --border: #1E3439; --border-input: #1E3439;
  --text: #E6F0F1; --text-muted: #9AB0B4; --text-placeholder: #6F878C;
  --accent-text: #4FE0CF; --accent-soft: rgba(43,208,190,.12); --accent-strong: #4FE0CF;
  --primary-bg: #2BD0BE; --primary-bg-hover: #4FE0CF; --primary-fg: #062A2E;
  --primary-disabled-bg: #1C3035; --primary-disabled-fg: #5E7A80;
  --progress-track: #1F8C81;
  --header-bg: #0F2A2F; --hover: #14262B; --brand-turquesa: #2BD0BE;
  --pos-bg: rgba(91,214,138,.12); --pos-fg: #5BD68A;
  --warn-bg: rgba(245,196,81,.12); --warn-fg: #F5C451;
  --neg-bg: rgba(255,138,128,.12); --neg-fg: #FF8A80;
  --shadow-card: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-sans); font-size: 13px; line-height: 1.5; background: var(--page); color: var(--text); overflow-x: hidden; transition: background-color .3s, color .3s; }
button, input { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-turquesa); outline-offset: 2px; }
h1, h2 { margin: 0; }

/* ===== Header ===== */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px 0 12px; background: var(--header-bg); box-shadow: var(--shadow-header); transition: background-color .3s; }
.hdr-left, .hdr-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: rgba(255,255,255,.9); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.icon-btn:focus-visible { outline: 2px solid var(--brand-lima); outline-offset: 0; }
.icon-btn.lg { width: 44px; height: 44px; }
.icon-btn svg.i { width: 18px; height: 18px; stroke-width: 2; }
.icon-btn.lg svg.i { width: 22px; height: 22px; }
.logo { height: 26px; width: auto; display: block; }
.dark .theme-moon, html:not(.dark) .theme-sun { display: none; }

/* ===== Sidebar ===== */
.shell { display: flex; min-height: calc(100vh - var(--header-h)); }
.sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); width: var(--sidebar-w); flex-shrink: 0; overflow: hidden auto; background: var(--surface); border-right: 1px solid var(--border); transition: width .3s, background-color .3s; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; }
.nav-group { padding: 4px 12px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); white-space: nowrap; }
.nav-item { width: 100%; height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 500; letter-spacing: -.01em; cursor: pointer; text-align: left; transition: background-color .2s, color .2s; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-item[aria-current="page"] svg.i { stroke-width: 2.1; }
.nav-item span { white-space: nowrap; }
.menu-fechado .sidebar { width: var(--sidebar-w-collapsed); }
.menu-fechado .nav-group, .menu-fechado .nav-item span { display: none; }
.menu-fechado .nav-item { justify-content: center; padding: 0; }

/* ===== Página ===== */
main { flex: 1; min-width: 0; }
.page { max-width: 1360px; margin: 0 auto; padding: 32px 40px 64px; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-enter { animation: pageEnter .4s cubic-bezier(.16,1,.3,1) backwards; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.page-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tool-ic { width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary-fg); }
.tool-ic svg.i { width: 26px; height: 26px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.lead { margin: 2px 0 0; font-size: 14px; color: var(--text-muted); }

/* Ferramenta: área de trabalho larga + painel lateral fixo */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.work { min-width: 0; border-radius: 16px; transition: box-shadow .2s; }
.work.over { box-shadow: 0 0 0 3px var(--brand-turquesa); }
.panel { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; }
.panel h2 { font-size: 17px; font-weight: 600; margin-bottom: 18px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); padding: 24px; transition: background-color .3s, border-color .3s; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 600; }
.card-head .sub { margin: 0; font-size: 12px; color: var(--text-muted); }
.card-head .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.label { display: block; margin: 0 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.panel .label:not(:first-child) { margin-top: 20px; }
.desc { margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
.hint { margin: 0 0 16px; font-size: 12px; color: var(--text-muted); }
.fine { margin: 12px 0 0; font-size: 11px; color: var(--text-placeholder); text-align: center; }

/* Área de arrastar */
.drop { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 40px 24px; text-align: center; cursor: pointer; border: 2px dashed var(--border-input); border-radius: 16px; background: var(--surface); transition: background-color .2s, border-color .2s; }
.drop:hover, .work.over .drop { border-color: var(--brand-turquesa); background: var(--accent-soft); }
.drop-icon { width: 72px; height: 72px; margin-bottom: 12px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.drop:hover .drop-icon { background: var(--surface); }
.drop-icon svg.i { width: 32px; height: 32px; }
.drop strong { font-size: 18px; font-weight: 600; }
.drop small { color: var(--text-muted); font-size: 13px; max-width: 420px; }
.drop .btn { margin-top: 18px; pointer-events: none; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 12px; border: 0; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.btn.primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn.primary:hover { background: var(--primary-bg-hover); }
.btn.primary:disabled { background: var(--primary-disabled-bg); color: var(--primary-disabled-fg); cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 10px; }
.btn.block { width: 100%; margin-top: 12px; }
.panel .btn.primary.block { margin-top: 24px; height: 48px; font-size: 14px; }
.btn svg.i { width: 16px; height: 16px; stroke-width: 2; }
.btn.busy svg.i { animation: spin 1s linear infinite; }
/* Botão com barra de progresso: a parte feita fica na cor normal do botão. */
.btn.primary.prog:disabled { background: linear-gradient(90deg, var(--primary-bg) var(--p, 0%), var(--progress-track) var(--p, 0%)); color: var(--primary-fg); cursor: progress; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Opções em lista (rádio) */
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: color-mix(in srgb, var(--brand-turquesa) 50%, transparent); }
.opt input { appearance: none; width: 18px; height: 18px; margin: 0; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--border-input); background: var(--surface); transition: border .15s; }
.opt input:checked { border: 5px solid var(--brand-turquesa); }
.opt:has(input:checked) { border-color: var(--brand-turquesa); background: var(--accent-soft); }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-txt b { font-size: 13px; font-weight: 600; }
.opt-txt small { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.chip { font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--segment); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.opt:has(input:checked) .chip { background: var(--surface); color: var(--accent-text); }

/* Interruptor */
.switch { display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 38px; height: 22px; flex-shrink: 0; border-radius: 999px; background: var(--segment); transition: background-color .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand-turquesa); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand-turquesa); outline-offset: 2px; }
.switch-txt { display: flex; flex-direction: column; }
.switch-txt b { font-size: 13px; font-weight: 600; }
.switch-txt small { font-size: 12px; color: var(--text-muted); }

/* Controle segmentado */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--segment); }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(12,43,49,.1); }
.seg button svg.i { width: 16px; height: 16px; }
.seg.wide { max-width: 880px; margin-bottom: 24px; flex-wrap: wrap; }
.seg.wide button { height: 40px; font-size: 13px; }

/* Campos */
.field { display: block; margin-top: 18px; }
.field input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--border-input); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: var(--text-placeholder); }
.field input:focus { outline: none; border-color: var(--brand-turquesa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-turquesa) 20%, transparent); }
.field input.invalid { border-color: var(--neg-fg); }
.help { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.help.err { color: var(--neg-fg); }

/* Resumo de números */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--surface-2); }
.stats .label { margin: 0 0 2px !important; font-size: 10px; }
.stats b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pos-txt { color: var(--pos-fg); }

/* Lista de arquivos (Comprimir) */
.file-list { list-style: none; margin: 8px 0 0; padding: 0; }
.file { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.file:first-child { border-top: 0; }
.file-ic { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--neg-bg); color: var(--neg-fg); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.file .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.file .meta b { color: var(--text); font-weight: 600; }
.file .actions { grid-row: 1 / span 2; grid-column: 3; display: flex; align-items: center; gap: 6px; }
.bar { height: 6px; border-radius: 999px; overflow: hidden; background: var(--segment); }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand-turquesa); transition: width .25s; }
.file .bar { grid-column: 2 / -1; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.pos { background: var(--pos-bg); color: var(--pos-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.neg { background: var(--neg-bg); color: var(--neg-fg); }
.badge.neutral { background: var(--segment); color: var(--text-muted); }
.mini { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text-muted); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.mini:hover { background: var(--surface-2); color: var(--text); }
.mini.danger:hover { background: var(--neg-bg); color: var(--neg-fg); border-color: transparent; }
.mini svg.i { width: 15px; height: 15px; stroke-width: 2; }

/* Miniaturas de páginas */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; font-size: 12px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; }
.legend span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.thumb { position: relative; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s, opacity .2s; }
.thumb[draggable="true"] { cursor: grab; }
.thumb:hover { border-color: color-mix(in srgb, var(--brand-turquesa) 50%, transparent); box-shadow: var(--shadow-card); }
.thumb.dragging { opacity: .35; }
.thumb.excluded { opacity: .45; }
.thumb.excluded .pv::after { content: "Fora da conversão"; position: absolute; inset: auto 8px 8px; padding: 2px 6px; border-radius: 6px; background: var(--surface); font-size: 10px; font-weight: 600; text-align: center; color: var(--text-muted); }
.pv { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.pv canvas, .pv img { display: block; max-width: 86%; max-height: 86%; background: #fff; box-shadow: 0 1px 3px rgba(12,43,49,.18); transition: transform .25s; }
.pv .loading { width: 60%; aspect-ratio: .71; border-radius: 4px; background: linear-gradient(90deg, var(--segment), var(--surface), var(--segment)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cap { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 600; }
.cap .src { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--text-muted); font-weight: 500; }
.cap .src em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb .tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.thumb:hover .tools, .thumb:focus-within .tools { opacity: 1; }
.thumb .tools .mini { box-shadow: 0 1px 4px rgba(12,43,49,.15); }

/* ===== Início ===== */
.nav-group.spaced { padding-top: 20px; }
.hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 44px 48px; border-radius: 20px; background: var(--header-bg); color: #fff; }
.hero::before { content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(0,174,157,.35), transparent 70%); pointer-events: none; }
.hero-txt { position: relative; max-width: 620px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--brand-lima); font-size: 12px; font-weight: 600; }
.hero-tag svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.hero h1 { margin-top: 16px; font-size: 38px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #fff; }
.hero p { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.82); }
.hero .btn { margin-top: 24px; height: 46px; }
.btn.lime { background: var(--brand-lima); color: #062A2E; }
.btn.lime:hover { background: #D7DF2E; }
.hero-art { position: relative; width: 240px; flex-shrink: 0; }

.home-head { margin: 40px 0 16px; }
.home-head h2, .about-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.home-head p, .about-head p { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }

.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tool-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.tool-card:hover { border-color: var(--brand-turquesa); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(12,43,49,.1); }
.tool-card h3 { margin: 18px 0 6px; font-size: 17px; font-weight: 600; }
.tool-card p { margin: 0; font-size: 13px; color: var(--text-muted); }
.tool-card ul { list-style: none; margin: 16px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tool-card li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tool-card li::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--brand-turquesa); }
.tool-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-text); }
.tool-card .go svg.i { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .2s; }
.tool-card:hover .go svg.i { transform: translateX(4px); }

.about { margin-top: 40px; padding: 32px; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.about-item { display: flex; gap: 14px; }
.about-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.about-ic svg.i { width: 22px; height: 22px; }
.about-item h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.about-item p { margin: 0; font-size: 13px; color: var(--text-muted); }

@media (max-width: 1100px) {
  .tool-cards, .about-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 720px) {
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 30px; }
}

/* Converter: Word */
.keeps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.keeps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.keeps svg.i { width: 18px; height: 18px; flex-shrink: 0; color: var(--pos-fg); }

/* Aviso rápido */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--surface); font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: var(--neg-fg); color: #fff; }

/* Tarefas em andamento (no topo, ao lado do modo escuro) */
.tasks { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tasks[hidden] { display: none; }
.task { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 200px; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background-color .2s; animation: task-in .25s ease-out; }
.task:hover { background: rgba(255,255,255,.18); }
.task:focus-visible { outline: 2px solid var(--brand-lima); outline-offset: 0; }
.task-txt { display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1; }
.task-txt b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-txt em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.task-bar { display: block; height: 4px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.task-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand-lima); transition: width .25s; }
.task-more { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 600; }
@keyframes task-in { from { opacity: 0; transform: translateY(-4px); } }

/* Aviso de tarefa concluída em outra tela */
.notices { position: fixed; top: calc(var(--header-h) + 12px); right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.notice { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(12,43,49,.18); animation: notice-in .3s ease-out; }
.notice-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--pos-bg); color: var(--pos-fg); }
.notice.err .notice-ic { background: var(--neg-bg); color: var(--neg-fg); }
.notice-ic svg.i { width: 18px; height: 18px; stroke-width: 2.4; }
.notice-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notice-txt b { font-size: 13px; font-weight: 600; }
.notice-txt small { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.notice .btn.sm { background: var(--primary-bg); color: var(--primary-fg); }
.notice .btn.sm:hover { background: var(--primary-bg-hover); }
.notice-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); display: grid; place-items: center; cursor: pointer; }
.notice-x:hover { background: var(--hover); color: var(--text); }
.notice-x svg.i { width: 14px; height: 14px; }
.dark .notice { box-shadow: 0 12px 32px rgba(0,0,0,.45); }
@keyframes notice-in { from { opacity: 0; transform: translateY(-8px); } }

/* Programa do Windows fechado com a página ainda aberta (js/vida.js) */
.fechado { position: fixed; left: 50%; top: calc(var(--header-h) + 12px); transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; gap: 2px; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--neg-fg); color: #fff; font-size: 13px; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.fechado b { font-weight: 600; }

/* Bolinha no menu: tem resultado pronto nessa ferramenta */
.nav-item { position: relative; }
.nav-item.has-news::after { content: ""; position: absolute; top: 10px; left: 28px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-turquesa); box-shadow: 0 0 0 2px var(--surface); }
.menu-fechado .nav-item.has-news::after { left: calc(50% + 6px); }

@media (max-width: 720px) {
  .task { width: 130px; }
  .task:nth-child(n+2) { display: none; }
}
@media print { .notices, .tasks { display: none !important; } }

@media (max-width: 1180px) {
  .tool { grid-template-columns: 1fr; }
  .panel { position: static; }
}
@media (max-width: 720px) {
  .page { padding: 24px 16px 48px; }
  .page-head { margin-bottom: 20px; }
  .tool-ic { width: 48px; height: 48px; }
  h1 { font-size: 24px; }
  .logo { height: 20px; }
  .drop { min-height: 300px; }
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
/* ===== Comprimir: limite de tamanho ===== */

.auto-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; line-height: 1.4; }
.auto-note svg.i { width: 16px; height: 16px; margin-top: 1px; }
.limit { margin-top: 20px; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--text-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.select select { appearance: none; width: 100%; height: 44px; padding: 0 40px 0 14px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.select select:hover { border-color: color-mix(in srgb, var(--brand-turquesa) 50%, var(--border-input)); }
.select select:focus { outline: none; border-color: var(--brand-turquesa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-turquesa) 20%, transparent); }
.limit.on .select select { border-color: var(--brand-turquesa); background: var(--accent-soft); color: var(--accent-text); }
.select option { background: var(--surface); color: var(--text); font-weight: 500; }
.limit-custom { margin-top: 10px; }
/* Dropdown com visual próprio */
.select.dd::after { content: none; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 44px; padding: 0 12px 0 14px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s, color .2s; }
.dd-btn:hover { border-color: color-mix(in srgb, var(--brand-turquesa) 50%, var(--border-input)); }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--brand-turquesa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-turquesa) 20%, transparent); }
.limit.on .dd-btn { border-color: var(--brand-turquesa); background: var(--accent-soft); color: var(--accent-text); }
.dd-chev { width: 18px; height: 18px; color: var(--text-muted); transition: transform .25s cubic-bezier(.3,.7,.4,1); }
.dd.open .dd-chev { transform: rotate(180deg); color: var(--accent-text); }
.dd-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 320px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(12,43,49,.16), 0 2px 6px rgba(12,43,49,.06); outline: none;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top center; transition: opacity .16s ease, transform .2s cubic-bezier(.3,.7,.4,1), visibility 0s linear .2s; }
.dd.up .dd-list { top: auto; bottom: calc(100% + 6px); transform: translateY(6px) scale(.98); transform-origin: bottom center; }
.dd.open .dd-list { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .2s cubic-bezier(.3,.7,.4,1), visibility 0s; }
.dd-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background-color .12s; }
.dd-list li.active { background: var(--surface-2); }
.dd-list li[aria-selected="true"] { background: var(--accent-soft); }
.dd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dd-txt b { font-size: 13px; font-weight: 600; }
.dd-txt small { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.dd-list li[aria-selected="true"] b { color: var(--accent-text); }
.dd-list li svg.i { width: 16px; height: 16px; stroke-width: 2.4; color: var(--accent-text); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s; }
.dd-list li[aria-selected="true"] svg.i { opacity: 1; transform: none; }
.dark .dd-list { box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.dd.open .dd-list li { animation: dd-item .22s cubic-bezier(.3,.7,.4,1) backwards; }
.dd.open .dd-list li:nth-child(2) { animation-delay: .02s; } .dd.open .dd-list li:nth-child(3) { animation-delay: .04s; }
.dd.open .dd-list li:nth-child(4) { animation-delay: .06s; } .dd.open .dd-list li:nth-child(5) { animation-delay: .08s; }
.dd.open .dd-list li:nth-child(6) { animation-delay: .1s; }
@keyframes dd-item { from { opacity: 0; transform: translateY(-4px); } }
.limit-custom:not([hidden]) { animation: dd-item .22s cubic-bezier(.3,.7,.4,1); }
.auto-note:not([hidden]) { animation: dd-item .25s cubic-bezier(.3,.7,.4,1); }

.num-field { display: flex; align-items: center; height: 44px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--surface); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.num-field:focus-within { border-color: var(--brand-turquesa); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-turquesa) 20%, transparent); }
.num-field input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0 4px 0 14px; background: transparent; font-size: 15px; font-weight: 600; outline: none; }
.num-field span { padding: 0 14px 0 4px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.num-field.invalid { border-color: var(--neg-fg); }
.limit .help { margin-top: 8px; }
.file .meta .lvl { color: var(--text-muted); }

/* ===== Miniaturas: abrir ampliada ===== */
.pv[role="button"] { cursor: zoom-in; }
.pv .zoom-hint { position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(12,43,49,.72); color: #fff; opacity: 0; transition: opacity .15s; pointer-events: none; }
.pv .zoom-hint svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.thumb:hover .zoom-hint, .pv:focus-visible .zoom-hint { opacity: 1; }
.thumb.excluded .zoom-hint { display: none; }

/* ===== Visualizador de página ampliada ===== */
.viewer { width: min(1100px, calc(100vw - 48px)); height: calc(100vh - 48px); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,.35); overflow: hidden; }
.viewer[open] { display: flex; flex-direction: column; animation: vw-in .18s ease-out; }
.viewer::backdrop { background: rgba(6,26,30,.72); backdrop-filter: blur(3px); }
@keyframes vw-in { from { opacity: 0; transform: scale(.98); } }
.vw-head { display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border); }
.vw-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vw-line { display: flex; align-items: center; gap: 10px; }
.vw-line b { font-size: 16px; font-weight: 600; }
.vw-title .src { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--text-muted); }
.vw-title .src em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-acts { display: flex; gap: 8px; }
.vw-acts .btn.danger:hover { background: var(--neg-bg); color: var(--neg-fg); border-color: transparent; }
.vw-close { width: 38px; height: 38px; }
.vw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; background: var(--surface-2); }
.vw-stage { height: 100%; min-height: 0; overflow: auto; display: grid; place-items: start; padding: 24px 0; overscroll-behavior: contain; }
/* margin auto centraliza a página quando ela cabe; maior que a área, ela começa no canto e a rolagem alcança tudo */
.vw-stage canvas { display: block; margin: auto; width: calc(var(--fit-w) * var(--z, 1)); max-width: none; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 6px 28px rgba(12,43,49,.22); cursor: zoom-in; }
.vw-stage.zoom canvas { cursor: grab; }
.vw-stage.zoom.dragging canvas { cursor: grabbing; }
.vw-stage .loading { margin: auto; width: min(420px, 60%); aspect-ratio: .71; border-radius: 4px; background: linear-gradient(90deg, var(--segment), var(--surface), var(--segment)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.vw-stage .vw-err { margin: auto; color: var(--neg-fg); font-weight: 500; }
.vw-nav { justify-self: center; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-card); transition: background-color .2s, opacity .2s; }
.vw-nav:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent-text); }
.vw-nav:disabled { opacity: .3; cursor: default; }
.vw-foot { margin: 0; padding: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); text-align: center; }
/* Visualizar o comprimido (alternar com o original) */
.cmp-seg { flex: none; }
.cmp-seg button { height: 32px; padding: 0 12px; }
.cmp-size { font-weight: 500; opacity: .75; }
.cmp.is-orig .vw-stage canvas { outline: 3px solid var(--warn-fg); outline-offset: 3px; }
@media (max-width: 720px) { .cmp-seg { order: 2; width: 100%; } }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); font: 600 11px/18px var(--font-sans); text-align: center; }
@media (max-width: 720px) {
  .viewer { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .vw-head { flex-wrap: wrap; padding: 12px 12px 12px 16px; }
  .vw-acts { order: 3; width: 100%; }
  .vw-acts .btn { flex: 1; }
  .vw-body { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .vw-nav { width: 36px; height: 36px; }
  .vw-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .page-enter, .dd-list li, .limit-custom, .auto-note, .task, .notice { animation: none !important; } * { transition: none !important; } }
