/* =====================================================
   REFRACT — Liquid Glass (iOS-style glassmorphism)
   Fonts: Chakra Petch (display/UI) + IBM Plex Mono (data)
   Painéis de vidro fosco flutuando sobre a aurora.
   ===================================================== */

:root {
  --bg:          #070b14;

  /* Vidro fosco translúcido */
  --glass:       rgba(20, 28, 42, 0.42);
  --glass-2:     rgba(30, 40, 58, 0.50);
  --glass-3:     rgba(40, 52, 74, 0.58);
  --glass-solid: rgba(14, 20, 31, 0.78);

  /* Bordas e luz */
  --line:        rgba(255, 255, 255, 0.10);
  --line-hi:     rgba(255, 255, 255, 0.22);
  --hilite:      rgba(255, 255, 255, 0.14);

  --text:        #eaf1f9;
  --muted:       #9fb0c6;
  --muted-2:     #6c7c95;

  --accent:      #5fd4ff;
  --accent-hi:   #aceaff;
  --accent-lo:   #2a9fce;
  --acc-rgb:     95, 212, 255;

  --amber:       #ffc46b;
  --green:       #4fe6ad;
  --red:         #ff6b86;

  --radius:      20px;
  --radius-sm:   14px;
  --radius-xs:   10px;

  --blur:        blur(22px) saturate(150%);
  --blur-lite:   blur(12px) saturate(140%);

  --shadow:      0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm:   0 8px 24px rgba(0, 0, 0, 0.35);
}

/* O atributo [hidden] deve sempre esconder, mesmo quando o elemento tem uma
   classe com display próprio (ex.: .ap-view/.cookie-notice usam display:flex).
   Sem isto, a especificidade da classe vence o display:none da UA e o toggle
   por elemento.hidden no JS não funciona. */
[hidden] { display: none !important; }

/* ---- Tema claro (bege suave) ---- */
html[data-theme="light"] {
  --bg:          #efe7d7;

  --glass:       rgba(255, 255, 255, 0.74);
  --glass-2:     rgba(255, 255, 255, 0.84);
  --glass-3:     rgba(255, 255, 255, 0.92);
  --glass-solid: rgba(251, 247, 238, 0.96);

  --line:        rgba(60, 50, 35, 0.12);
  --line-hi:     rgba(60, 50, 35, 0.22);
  --hilite:      rgba(60, 50, 35, 0.10);

  --text:        #14110a;
  --muted:       #3a3326;
  --muted-2:     #544b39;

  --accent:      #176a8c;
  --accent-hi:   #155f7e;
  --accent-lo:   #0f4861;
  --acc-rgb:     23, 106, 140;

  --amber:       #c98a2b;
  --green:       #1f9e74;
  --red:         #d65066;

  --shadow:      0 18px 50px rgba(120, 100, 70, 0.18);
  --shadow-sm:   0 8px 24px rgba(120, 100, 70, 0.14);
}

/* Troca de tema suave — só depois do load (classe theme-ready do theme.js). */
html.theme-ready body,
html.theme-ready .console-bar,
html.theme-ready .dropzone,
html.theme-ready .panel,
html.theme-ready .footer,
html.theme-ready .account-pop,
html.theme-ready .theme-toggle {
  transition: background-color .3s ease, color .3s ease,
              border-color .3s ease, box-shadow .3s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Chakra Petch', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 44px 20px 56px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Camadas de fundo: aurora WebGL + véu leve + ruído sutil ---- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 30%, transparent 45%, rgba(7,11,20,.34) 100%),
    linear-gradient(180deg, rgba(7,11,20,.14), rgba(7,11,20,.34));
}

/* No tema claro o véu vira uma vinheta quente sutil (não escurece a tela). */
html[data-theme="light"] .bg-veil {
  background:
    radial-gradient(ellipse 120% 90% at 50% 30%, transparent 55%, rgba(120,100,70,.10) 100%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(120,100,70,.10));
}

/* ---- Controles internos no tema claro ----
   Os campos/sliders/accordions usam um "branco por cima" (rgba(255,255,255,..))
   pensado pro fundo escuro. No claro isso vira branco-sobre-branco e some.
   Aqui trocamos por um tom escuro translúcido pra dar superfície ao controle. */
html[data-theme="light"] .select-wrap select,
html[data-theme="light"] .slider-row,
html[data-theme="light"] .text-input,
html[data-theme="light"] .accordion,
html[data-theme="light"] .file-item,
html[data-theme="light"] .seg-btn,
html[data-theme="light"] .preset-chip {
  background: rgba(60, 50, 35, 0.05);
}
html[data-theme="light"] .select-wrap select:hover,
html[data-theme="light"] .text-input:hover,
html[data-theme="light"] .file-item:hover,
html[data-theme="light"] .seg-btn:hover,
html[data-theme="light"] .preset-chip:hover,
html[data-theme="light"] .accordion.open,
html[data-theme="light"] .accordion-trigger:hover {
  background: rgba(60, 50, 35, 0.09);
}

/* Dropdown nativo aberto: fundo claro em vez do escuro #11161f */
html[data-theme="light"] .select-wrap select option {
  background: #fbf7ee;
  color: var(--text);
}

/* Sliders (qualidade + filtros): trilho e número visíveis no claro */
html[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track,
html[data-theme="light"] .filter-range { background: rgba(60, 50, 35, 0.16); }
html[data-theme="light"] .slider-val,
html[data-theme="light"] .filter-val { color: var(--accent-lo); }
html[data-theme="light"] .batch-track { background: rgba(60, 50, 35, 0.14); }

/* Toggle desligado: trilho visível no claro */
html[data-theme="light"] .toggle-thumb { background: rgba(60, 50, 35, 0.18); }

/* Reflexos especulares brancos (::before) que no claro viram um filme leitoso
   por cima do conteúdo do card — neutralizados no tema claro. */
html[data-theme="light"] .panel::before,
html[data-theme="light"] .dropzone::before { background: none; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- App Shell ---- */
.app {
  width: 100%;
  max-width: 1080px;
  position: relative;
  z-index: 2;
}

.dropzone {
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

.hidden { display: none !important; }

/* Superfície de vidro reutilizável */
.console-bar,
.dropzone,
.panel,
.preview-stage,
.slider-row,
.accordion,
.tabs,
.toast {
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

/* ---- Header / barra de console ---- */
.header {
  margin-bottom: 34px;
  animation: fade-down .6s cubic-bezier(.22,1,.36,1) both;
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--hilite);
  position: relative;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.wordmark-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 7px;
  color: var(--text);
  text-shadow: 0 0 24px rgba(var(--acc-rgb), .3);
}

.wordmark-zip {
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover { border-color: var(--line-hi); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Lua no escuro (padrão), pôr-do-sol no claro. */
.theme-toggle .ico-sunset { display: none; }
html[data-theme="light"] .theme-toggle .ico-moon { display: none; }
html[data-theme="light"] .theme-toggle .ico-sunset { display: inline-block; }

.wordmark-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink-cursor 1.4s steps(1) infinite;
}
@keyframes blink-cursor {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: .15; }
}

.console-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.st-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.st-sep {
  width: 1px;
  height: 12px;
  background: var(--line-hi);
}
.st-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: led-pulse 2.4s ease-in-out infinite;
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
#clock { color: var(--accent-hi); }

.header-sub {
  margin-top: 12px;
  padding-left: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}

/* ---- Dropzone ---- */
.dropzone {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 58px 28px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow), inset 0 1px 0 var(--hilite);
  transition: background .3s, border-color .3s, transform .3s, box-shadow .3s;
  animation: fade-up .65s .1s cubic-bezier(.22,1,.36,1) both;
}

/* Reflexo especular suave no topo do vidro */
.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.10), transparent 40%);
  pointer-events: none;
}

/* linha tracejada interna — "área de captura" */
.dropzone::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1.5px dashed var(--line-hi);
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: border-color .3s;
}
.dropzone:hover,
.dropzone.drag {
  border-color: rgba(var(--acc-rgb), .5);
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 40px rgba(var(--acc-rgb), .15), inset 0 1px 0 var(--hilite);
}
.dropzone:hover::after,
.dropzone.drag::after { border-color: rgba(var(--acc-rgb), .45); }

/* cantos de mira — discretos */
.dz-corner { display: none; }

.dz-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xs);
  background: rgba(var(--acc-rgb), .08);
  border: 1px solid var(--line);
  color: var(--accent);
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 var(--hilite);
  transition: transform .35s cubic-bezier(.22,1,.36,1), background .3s, color .3s, box-shadow .3s;
}
.dropzone:hover .dz-icon-wrap,
.dropzone.drag  .dz-icon-wrap {
  background: rgba(var(--acc-rgb), .16);
  color: var(--accent-hi);
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 0 28px rgba(var(--acc-rgb), .3), inset 0 1px 0 var(--hilite);
}

.dz-overline {
  position: relative;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.dz-title {
  position: relative;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.dz-sub {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-hi);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.link-btn:hover { color: #fff; }
html[data-theme="light"] .link-btn:hover { color: var(--text); }

.dz-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
  letter-spacing: 1px;
  transition: border-color .2s, color .2s, background .2s;
}
.dropzone:hover .tag { border-color: var(--line-hi); color: var(--text); }
.sep {
  width: 1px;
  height: 14px;
  background: var(--line-hi);
  display: inline-block;
}

/* ---- Panel ---- */
.panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--hilite);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  animation: fade-up .5s cubic-bezier(.22,1,.36,1) both;
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255,255,255,.08), transparent 35%);
  pointer-events: none;
}

/* ---- Panel Header ---- */
.panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.kinds-indicator { display: flex; gap: 6px; }

.kind-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.kind-chip.img {
  background: rgba(var(--acc-rgb), .12);
  border: 1px solid rgba(var(--acc-rgb), .3);
  color: var(--accent-hi);
}
.kind-chip.vid {
  background: rgba(255,196,107,.1);
  border: 1px solid rgba(255,196,107,.3);
  color: var(--amber);
}

/* ---- File List ---- */
.file-list {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-hi) transparent;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  animation: slide-in .3s cubic-bezier(.22,1,.36,1) both;
}
.file-item:hover { border-color: var(--line-hi); background: rgba(255,255,255,.07); transform: translateX(2px); }
.file-item.selected {
  border-color: rgba(var(--acc-rgb), .45);
  background: rgba(var(--acc-rgb), .1);
  box-shadow: inset 0 1px 0 var(--hilite);
}

.fi-thumb {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: rgba(0,0,0,.3);
  background-size: cover;
  background-position: center;
  position: relative;
}
.fi-thumb.video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-44%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent var(--muted);
}

.fi-kind {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.fi-kind.img {
  background: rgba(var(--acc-rgb), .12);
  border: 1px solid rgba(var(--acc-rgb), .25);
  color: var(--accent-hi);
}
.fi-kind.vid {
  background: rgba(255,196,107,.1);
  border: 1px solid rgba(255,196,107,.25);
  color: var(--amber);
}

.fi-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fi-dims {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted-2);
  flex-shrink: 0;
  letter-spacing: .3px;
}

.fi-size {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.fi-remove {
  background: none;
  border: none;
  color: var(--muted-2);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .2s, background .2s;
}
.fi-remove:hover {
  color: var(--red);
  background: rgba(255,107,134,.12);
}

/* ---- Workspace ---- */
.workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.ws-left {
  position: sticky;
  top: 24px;
  align-self: start;
}
.ws-right { min-width: 0; }

@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .ws-left { position: static; top: auto; }
  .console-status .st-item:nth-child(3) { display: none; }
}

/* ---- Pré-visualização ao vivo ---- */
.preview-wrap {
  margin: 4px 0 2px;
  animation: slide-in .35s cubic-bezier(.22,1,.36,1) both;
}
.preview-stage {
  position: relative;
  height: clamp(300px, 56vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--hilite);
  background-color: rgba(4,6,10,.5);
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}

.preview-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(18px) brightness(.7);
  object-fit: cover;
}
.preview-media {
  position: relative;
  z-index: 1;
  display: block;
  object-fit: fill;
  max-width: none;
  transform-origin: center center;
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              width .25s cubic-bezier(.22,1,.36,1),
              height .25s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 6px 28px rgba(0,0,0,.5);
}
.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.preview-overlay.vignette {
  mix-blend-mode: normal;
  background: radial-gradient(ellipse at center,
              transparent 45%, rgba(0,0,0,.9) 130%);
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}
.pv-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-dims {
  color: var(--accent-hi);
  flex-shrink: 0;
  letter-spacing: .4px;
  background: rgba(var(--acc-rgb), .1);
  border: 1px solid rgba(var(--acc-rgb), .25);
  border-radius: 999px;
  padding: 3px 10px;
}
.preview-hint {
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: .3px;
}

.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,16,24,.5);
  border: 1px solid var(--line-hi);
  color: var(--text);
  cursor: pointer;
  z-index: 4;
  backdrop-filter: var(--blur-lite);
  -webkit-backdrop-filter: var(--blur-lite);
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.preview-nav:hover {
  background: rgba(var(--acc-rgb), .25);
  border-color: var(--accent);
  color: var(--accent-hi);
  transform: translateY(-50%) scale(1.08);
}
.preview-nav.prev { left: 12px; }
.preview-nav.next { right: 12px; }

.preview-count {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent-hi);
  background: rgba(10,16,24,.5);
  border: 1px solid rgba(var(--acc-rgb), .25);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: var(--blur-lite);
  -webkit-backdrop-filter: var(--blur-lite);
}

/* Régua de corte do vídeo */
.trim-timeline {
  position: relative;
  height: 8px;
  margin-top: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  cursor: pointer;
}
.tt-region {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 999px;
  background: rgba(var(--acc-rgb), .35);
  box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent);
}
.tt-playhead {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 0;
  width: 2px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(255,255,255,.85);
  transition: left .1s linear;
}

/* ---- Abas ---- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 5px;
  box-shadow: inset 0 1px 0 var(--hilite);
}
.tab {
  position: relative;
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  font: 600 12px 'Chakra Petch', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, background .25s, box-shadow .25s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent-hi);
  background: rgba(var(--acc-rgb), .14);
  box-shadow: inset 0 1px 0 var(--hilite), 0 2px 10px rgba(var(--acc-rgb), .15);
}
.tab-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slide-in .3s cubic-bezier(.22,1,.36,1) both;
}

/* ---- Controls ---- */
.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 130px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.field-label::before {
  content: '';
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.field-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0;
  text-transform: none;
}

.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  appearance: none;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 11px 36px 11px 14px;
  font: 600 13px 'Chakra Petch', sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.select-wrap select:hover { border-color: var(--line-hi); background: rgba(255,255,255,.08); }
.select-wrap select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .15);
}
.select-wrap select option { background: #11161f; color: var(--text); }
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

/* ---- Slider de qualidade ---- */
.slider-row {
  margin-bottom: 14px;
  padding: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 var(--hilite);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.slider-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--accent-hi);
}

.slider-track-wrap {
  position: relative;
  height: 6px;
}

.slider-fill {
  position: absolute;
  top: 0; left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent));
  border-radius: 999px;
  pointer-events: none;
  transition: width .1s;
  z-index: 1;
}

input[type="range"] {
  position: relative;
  z-index: 2;
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  margin-top: -6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 0 0 4px rgba(var(--acc-rgb), .3);
  transition: box-shadow .2s, transform .2s;
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 0 0 6px rgba(var(--acc-rgb), .4);
  transform: scale(1.1);
}

/* ---- Accordion ---- */
.accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255,255,255,.03);
  transition: border-color .2s, background .2s;
}
.accordion:hover,
.accordion.open { border-color: var(--line-hi); }
.accordion.open { background: rgba(255,255,255,.05); }

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font: 600 12px 'Chakra Petch', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.accordion-trigger:hover { background: rgba(255,255,255,.04); }

.acc-arrow {
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  flex-shrink: 0;
  color: var(--muted);
}
.accordion.open .acc-arrow { transform: rotate(180deg); color: var(--accent); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.22,1,.36,1);
}
.accordion.open .accordion-body { max-height: 300px; }

.acc-inner {
  padding: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.acc-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.text-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 11px 14px;
  font: 500 13px 'IBM Plex Mono', monospace;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.text-input:hover { border-color: var(--line-hi); background: rgba(255,255,255,.08); }
.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .15);
}
.text-input::placeholder { color: var(--muted-2); }

/* ---- Toggle Switch ---- */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 40px;
  height: 23px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; position: absolute; }
.toggle-thumb {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .25s, border-color .25s;
}
.toggle-thumb::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 15px; height: 15px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
  transition: transform .25s cubic-bezier(.22,1,.36,1), background .25s;
}
.toggle-switch input:checked + .toggle-thumb {
  background: rgba(var(--acc-rgb), .55);
  border-color: rgba(var(--acc-rgb), .6);
}
.toggle-switch input:checked + .toggle-thumb::after {
  transform: translateX(17px);
}
.toggle-label {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Ghost Button ---- */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-xs);
  padding: 9px 14px;
  cursor: pointer;
  font: 600 11px 'Chakra Petch', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.ghost-btn:hover {
  color: var(--text);
  border-color: var(--line-hi);
  background: rgba(255,255,255,.09);
  transform: translateY(-1px);
}
.ghost-btn:active { transform: translateY(0); }

/* ---- Botão primário (glass glossy) ---- */
.convert-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), .9) 0%, rgba(42,159,206,.9) 100%);
  color: #04222b;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  padding: 17px;
  font: 700 14px 'Chakra Petch', sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  margin-top: 22px;
  box-shadow: 0 10px 30px rgba(var(--acc-rgb), .3), inset 0 1px 0 rgba(255,255,255,.5);
  transition: filter .2s, transform .15s, box-shadow .2s;
}
.convert-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(var(--acc-rgb), .45), inset 0 1px 0 rgba(255,255,255,.5);
}
.convert-btn:active { transform: translateY(0); }
.convert-btn:disabled {
  filter: grayscale(.6) brightness(.6);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* reflexo glossy no topo do botão */
.convert-btn::before {
  content: '';
  position: absolute;
  inset: 0 0 50% 0;
  background: linear-gradient(180deg, rgba(255,255,255,.3), transparent);
  pointer-events: none;
}

.convert-btn-shine {
  position: absolute;
  top: -50%;
  left: -80%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.45) 50%, transparent 60%);
  transform: skewX(-20deg);
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
  0%   { left: -80%; }
  30%  { left: 120%; }
  100% { left: 120%; }
}

.convert-btn-text { position: relative; z-index: 1; }

/* ---- Results ---- */
.results {
  position: relative;
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 var(--hilite);
  animation: slide-in .35s cubic-bezier(.22,1,.36,1) both;
}
.result-item.done   { border-color: rgba(79,230,173,.4); }
.result-item.failed { border-color: rgba(255,107,134,.4); }

.result-state {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--line-hi);
}
.result-state.spin {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-hi);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  background: none;
}
.result-state.ok  { background: var(--green); box-shadow: 0 0 10px var(--green); width: 9px; height: 9px; }
.result-state.err { background: var(--red);   box-shadow: 0 0 10px var(--red);   width: 9px; height: 9px; }

.result-body {
  flex: 1;
  min-width: 0;
}

.r-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.r-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.size-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.size-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}
.size-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1s cubic-bezier(.22,1,.36,1);
  width: 0;
}
.size-bar-fill.down { background: var(--green); }
.size-bar-fill.up   { background: var(--amber); }
.size-bar-fill.same { background: var(--muted); }

.size-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.size-label.down { color: var(--green); }
.size-label.up   { color: var(--amber); }

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-hi);
  color: var(--text);
  border-radius: var(--radius-xs);
  padding: 10px 16px;
  font: 600 11px 'Chakra Petch', sans-serif;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
  gap: 6px;
}
.download-btn:hover {
  background: rgba(var(--acc-rgb), .14);
  border-color: var(--accent);
  color: var(--accent-hi);
  transform: translateY(-1px);
}
.r-err {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--red);
  word-break: break-word;
}

/* ---- Barra de progresso (vídeo) ---- */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.progress-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 6px,
    var(--accent-lo) 6px 12px
  );
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(var(--acc-rgb), .4);
  transition: width .4s cubic-bezier(.22,1,.36,1);
  animation: stripe-flow 1.2s linear infinite;
}
@keyframes stripe-flow {
  to { background-position: -17px 0; }
}
.progress-pct {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--accent-hi);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 34px;
  text-align: right;
}

/* ---- Segmented control ---- */
.seg-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.seg-btn {
  flex: 1;
  min-width: 56px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-xs);
  padding: 10px;
  font: 600 11px 'IBM Plex Mono', monospace;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.seg-btn:hover { color: var(--text); border-color: var(--line-hi); background: rgba(255,255,255,.07); }
.seg-btn.active {
  color: var(--accent-hi);
  border-color: var(--accent);
  background: rgba(var(--acc-rgb), .14);
  box-shadow: inset 0 1px 0 var(--hilite);
}
.seg-group.looks { flex-wrap: wrap; }
.seg-group.looks .seg-btn { flex: 0 1 auto; min-width: 0; }

/* ---- Presets ---- */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.preset-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, transform .15s;
}
.preset-chip:hover { border-color: var(--line-hi); background: rgba(255,255,255,.07); transform: translateY(-1px); }
.preset-chip.active {
  border-color: var(--accent);
  background: rgba(var(--acc-rgb), .12);
  box-shadow: inset 0 1px 0 var(--hilite);
}
.preset-chip .pc-label {
  font: 600 12px 'Chakra Petch', sans-serif;
  color: var(--text);
}
.preset-chip .pc-dim {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted-2);
}
.preset-chip.active .pc-dim { color: var(--accent-hi); }
.preset-group-label {
  grid-column: 1 / -1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted-2);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.preset-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---- Filtros ---- */
.filters { display: flex; flex-direction: column; gap: 13px; }
.filter-row { display: flex; flex-direction: column; gap: 6px; }
.filter-head {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .5px;
}
.filter-val { color: var(--accent-hi); }
.filter-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  accent-color: var(--accent);
  cursor: pointer;
}
.filter-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(var(--acc-rgb), .6);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.filter-range::-moz-range-thumb {
  width: 15px; height: 15px; border: 2px solid rgba(var(--acc-rgb), .6);
  border-radius: 50%; background: #fff;
}
.edit-actions { display: flex; justify-content: flex-end; }

/* ---- Bulk download ---- */
.bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.download-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--acc-rgb), .12);
  border: 1px solid var(--accent);
  color: var(--accent-hi);
  border-radius: var(--radius-xs);
  padding: 12px 20px;
  font: 700 12px 'Chakra Petch', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--hilite);
  transition: background .2s, box-shadow .2s, transform .15s;
}
.download-all-btn:hover {
  background: rgba(var(--acc-rgb), .2);
  box-shadow: 0 0 24px rgba(var(--acc-rgb), .3);
  transform: translateY(-1px);
}
.download-all-btn:disabled { opacity: .5; cursor: default; box-shadow: none; }

/* ---- Toasts ---- */
.toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 40px));
}
.toast {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: var(--glass-2);
  border: 1px solid var(--line-hi);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-xs);
  padding: 12px 15px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--hilite);
  animation: toast-in .3s cubic-bezier(.22,1,.36,1) both;
}
.toast.warn  { border-left-color: var(--amber); }
.toast.error { border-left-color: var(--red); }
.toast.out {
  animation: toast-out .35s ease both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

/* ---- Footer ---- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: .5px;
}
.footer-ver { color: var(--muted-2); letter-spacing: 1.5px; }

/* ---- Animations ---- */
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   Conta de usuário — botão + popover de vidro
   ===================================================== */
.console-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font: 600 12px 'Chakra Petch', sans-serif;
  letter-spacing: .8px;
  box-shadow: inset 0 1px 0 var(--hilite);
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.account-btn:hover {
  background: rgba(var(--acc-rgb), .12);
  border-color: rgba(var(--acc-rgb), .4);
  transform: translateY(-1px);
}
.account-btn.is-auth { padding-left: 6px; }

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), .9), var(--accent-lo));
  color: #04222b;
  flex-shrink: 0;
  font: 700 12px 'Chakra Petch', sans-serif;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.account-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 880px) {
  .console-right { gap: 10px; }
  .account-label { display: none; }
  .account-btn { padding: 6px; }
}

/* ---- Hambúrguer + drawer mobile do cabeçalho ---- */
.nav-toggle {
  display: none;              /* escondido no desktop */
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--glass);
  cursor: pointer;
  flex: none;
}
.nav-toggle:hover { border-color: var(--line-hi); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .28s ease;
  z-index: 190;
}
.nav-backdrop.open { opacity: 1; }

@media (max-width: 720px) {
  /* header acima do drawer p/ o hambúrguer/X seguir clicável (drawer foi
     movido pro body pelo nav.js; header cria stacking context pela animação) */
  .header { position: relative; z-index: 230; }
  .nav-toggle { display: flex; position: relative; z-index: 210; }
  .console-bar { justify-content: flex-start; gap: 12px; }

  /* console-right vira um drawer que desliza da esquerda */
  .console-right {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(80vw, 300px);
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 74px 20px 28px;
    background: var(--bg);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 44px rgba(0, 0, 0, .45);
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
    z-index: 200;
    overflow-y: auto;
  }
  .console-right.open { transform: translateX(0); }

  /* ordem e aparência dos itens dentro do drawer (login em cima) */
  .console-right .account-btn {
    order: 1;
    justify-content: center;
    padding: 11px 14px;
    border-radius: var(--radius-xs);
  }
  .console-right .account-label { display: inline; max-width: none; }
  .console-right .lang-toggle { order: 2; align-self: stretch; justify-content: center; }
  .console-right .theme-toggle { order: 3; align-self: flex-start; margin-right: 0; }
  .console-right .console-status {
    order: 4;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .console-status .st-sep { display: none; }
}

/* ---- Backdrop discreto (não escurece tudo, só captura cliques) ---- */
.account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4,6,12,.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
}
.account-backdrop.open { opacity: 1; }

/* ---- Popover (canto superior direito) ---- */
.account-pop {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 61;
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  border-radius: var(--radius);
  background: var(--glass-2);
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow), inset 0 1px 0 var(--hilite);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transform-origin: top right;
  opacity: 0;
  transform: translateX(28px) translateY(-8px) scale(.94);
  pointer-events: none;
  transition: opacity .32s cubic-bezier(.22,1,.36,1),
              transform .42s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.account-pop.open {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  pointer-events: auto;
}

/* brilho ambiente que "respira" atrás do conteúdo */
.ap-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--acc-rgb), .35), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: ap-breathe 6s ease-in-out infinite;
}
@keyframes ap-breathe {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%      { opacity: .9; transform: scale(1.12); }
}

.ap-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ap-overline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.ap-close {
  display: inline-flex;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
}
.ap-close:hover { color: var(--text); background: rgba(255,255,255,.1); transform: rotate(90deg); }

.ap-view {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slide-in .3s cubic-bezier(.22,1,.36,1) both;
}

.ap-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
}
.ap-sub {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: -6px;
}

.ap-form { display: flex; flex-direction: column; gap: 12px; }
.ap-field { display: flex; flex-direction: column; gap: 8px; }
.ap-submit { margin-top: 4px; }

.ap-error {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--red);
  margin: -4px 0;
}

/* ---- Cota / uso ---- */
.ap-quota {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  box-shadow: inset 0 1px 0 var(--hilite);
}
.ap-quota-head {
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 9px;
}
.ap-quota-head span:last-child { color: var(--accent-hi); }
.ap-quota-track {
  height: 7px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}
.ap-quota-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-lo), var(--accent));
  box-shadow: 0 0 10px rgba(var(--acc-rgb), .5);
  transition: width .6s cubic-bezier(.22,1,.36,1), background .3s;
}
.ap-quota-fill.full {
  background: linear-gradient(90deg, var(--amber), var(--red));
  box-shadow: 0 0 10px rgba(255,107,134,.5);
}
.ap-quota-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 9px;
  line-height: 1.5;
}

/* ---- Bloco do usuário logado ---- */
.ap-user {
  display: flex;
  align-items: center;
  gap: 13px;
}
.ap-user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(var(--acc-rgb), .9), var(--accent-lo));
  color: #04222b;
  font: 700 19px 'Chakra Petch', sans-serif;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 14px rgba(var(--acc-rgb), .3);
  text-transform: uppercase;
}
.ap-user-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ap-user-email {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-plan-badge {
  align-self: flex-start;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(var(--acc-rgb), .12);
  border: 1px solid rgba(var(--acc-rgb), .3);
  color: var(--accent-hi);
}
.ap-plan-badge.pro {
  background: linear-gradient(135deg, rgba(255,196,107,.2), rgba(var(--acc-rgb), .15));
  border-color: rgba(255,196,107,.4);
  color: var(--amber);
}

.ap-upgrade { width: 100%; justify-content: center; }
.ap-logout { width: 100%; justify-content: center; }

/* ---- Aviso de código de acesso enviado (popover de conta) ---- */
.ap-sent {
  margin: 2px 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--accent-hi);
  background: rgba(var(--acc-rgb), .10);
  border: 1px solid rgba(var(--acc-rgb), .28);
  border-radius: 10px;
}

/* ---- Reenviar código (link discreto sob o botão Entrar) ---- */
.ap-resend {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 6px 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--accent-hi);
  text-align: center;
  cursor: pointer;
  transition: opacity .15s ease;
}
.ap-resend:hover:not(:disabled) { text-decoration: underline; }
.ap-resend:disabled {
  color: var(--muted, #8a93a6);
  cursor: default;
  opacity: .7;
}
.ap-resend-alt {
  margin-top: 2px;
  color: var(--muted, #8a93a6);
  font-size: 12px;
}

/* ---- Editor bloqueado (recurso PRO) ---- */
#editPane { position: relative; }

.tab-pane.locked > :not(.edit-lock) {
  filter: blur(3px) saturate(.7);
  opacity: .45;
  pointer-events: none;
  user-select: none;
}

.edit-lock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* Sem isto, o display:flex acima sobrepõe o atributo [hidden]: o cadeado
   PRO continua visível (e bloqueando cliques) para admin/PRO. */
.edit-lock[hidden] { display: none; }

.edit-lock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 26px 28px;
  text-align: center;
  background: var(--glass-solid);
  border: 1px solid rgba(var(--acc-rgb), .25);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

.edit-lock-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--amber);
  background: rgba(255, 196, 107, .12);
  border: 1px solid rgba(255, 196, 107, .35);
  border-radius: 50%;
}

.edit-lock-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}

.edit-lock-sub {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Tela de planos (modal Liquid Glass) ---------------------------- */
.plans-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 12, 18, 0.55); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease; padding: 24px;
}
/* Sem esta regra, o display:flex acima sobrepõe o atributo [hidden] e o
   overlay (invisível, opacity:0) fica capturando TODOS os cliques da página. */
.plans-overlay[hidden] { display: none; }
.plans-overlay.open { opacity: 1; }
.plans-modal {
  position: relative; width: min(720px, 96vw); max-height: 90vh; overflow: auto;
  background: rgba(22, 28, 38, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px; padding: 28px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(12px); transition: transform .3s ease;
}
html[data-theme="light"] .plans-modal {
  background: var(--glass-solid); border: 1px solid var(--line-hi); box-shadow: var(--shadow);
}
.plans-overlay.open .plans-modal { transform: translateY(0); }
.plans-close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  color: #cbd5e1; font-size: 26px; line-height: 1; cursor: pointer;
}
html[data-theme="light"] .plans-close { color: var(--muted); }
.plans-title { margin: 0 0 4px; font-size: 22px; color: #f1f5f9; }
html[data-theme="light"] .plans-title { color: var(--text); }
.plans-sub { margin: 0 0 20px; color: #94a3b8; font-size: 14px; }
html[data-theme="light"] .plans-sub { color: var(--muted); }
.plans-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .plans-cards { grid-template-columns: 1fr; } }
.plan-card {
  position: relative; border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px; padding: 20px; background: rgba(255, 255, 255, 0.03);
}
html[data-theme="light"] .plan-card { border: 1px solid var(--line); background: var(--glass); }
.plan-card.plan-pro { border-color: rgba(54, 214, 231, 0.55); }
.plan-badge {
  position: absolute; top: -10px; right: 14px; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; background: #36d6e7; color: #06222a;
  padding: 3px 8px; border-radius: 6px;
}
.plan-name { font-size: 13px; letter-spacing: .12em; color: #94a3b8; font-weight: 700; }
html[data-theme="light"] .plan-name { color: var(--muted); }
.plan-price { font-size: 24px; color: #f1f5f9; margin: 6px 0 14px; font-weight: 700; }
html[data-theme="light"] .plan-price { color: var(--text); }
.plan-feats { list-style: none; margin: 0; padding: 0; }
.plan-feats li { color: #cbd5e1; font-size: 14px; padding: 6px 0 6px 22px; position: relative; }
html[data-theme="light"] .plan-feats li { color: var(--muted); }
.plan-feats li::before {
  content: '✓'; position: absolute; left: 0; color: #36d6e7; font-weight: 700;
}
.plan-cta {
  margin-top: 16px; width: 100%; padding: 11px; border: none; border-radius: 8px;
  background: #36d6e7; color: #06222a; font-weight: 700; cursor: pointer;
  font-size: 15px; transition: filter .15s ease;
}
.plan-cta:hover { filter: brightness(1.08); }
.plan-cta:disabled { opacity: .6; cursor: default; }
.plan-cancel {
  margin-top: 10px; width: 100%; padding: 8px; border: none; background: none;
  color: #94a3b8; font-size: 13px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; transition: color .15s ease;
}
.plan-cancel:hover { color: #f87171; }
.plan-cancel:disabled { opacity: .6; cursor: default; }
html[data-theme="light"] .plan-cancel { color: var(--muted); }

/* ---- Áudio ---- */
.fi-kind.audio {
  background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(124, 58, 237, .25);
  color: #a78bfa;
}
.fi-thumb.audio {
  display: flex; align-items: center; justify-content: center;
  background: rgba(124, 58, 237, .12);
}
.fi-thumb.audio::after {
  content: "♪"; font-size: 18px; color: #a78bfa;
}
.kind-chip.aud {
  background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(124, 58, 237, .3);
  color: #a78bfa;
}

/* ---- Lote multi-arquivo ---- */
.batch-progress { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 8px; }
.batch-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.batch-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 6px,
    var(--accent-lo) 6px 12px
  );
  background-size: 200% 100%;
  box-shadow: 0 0 8px rgba(var(--acc-rgb), .35);
  transition: width .25s ease;
}
.batch-progress-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.batch-summary { width: 100%; margin-bottom: 8px; font-size: 13px; color: var(--text); }
.result-item.cancelled { opacity: .6; }
.r-cancelled { color: var(--muted); }
.result-audio { width: 100%; margin-top: 10px; }

/* Botão "Remover tudo" (lixeira) — variante de perigo, somente ícone */
.ghost-btn.danger { padding: 9px 11px; }
.ghost-btn.danger:hover {
  color: var(--red);
  border-color: rgba(255, 107, 134, .45);
  background: rgba(255, 107, 134, .10);
}

/* ---- Aba PDF ---- */
.fi-kind.pdf {
  background: rgba(214, 69, 80, .12);
  border: 1px solid rgba(214, 69, 80, .30);
  color: #f47a82;
}
.pdf-mode { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
#pdfPane .dropzone { margin-bottom: 14px; }
#pdfRunBtn { width: 100%; margin-top: 12px; }
#pdfRunBtn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== Home por categorias ===== */
.home { max-width: 1100px; margin: 0 auto; padding: 8px 0 40px; }
.home-overline { font-family: 'IBM Plex Mono', monospace; color: var(--accent, #5fd4ff); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 18px; }
.home-grid { display: flex; flex-direction: column; gap: 30px; }
.home-cat-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 14px; color: #e8eef5; }
html[data-theme="light"] .home-cat-title { color: var(--text); }
.home-cat-title svg { width: 22px; height: 22px; color: var(--accent, #5fd4ff); }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.ac { display: flex; align-items: center; gap: 13px; text-align: left; background: #161c24; border: 1px solid #2a323d; border-radius: 11px; padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; color: inherit; font: inherit; }
html[data-theme="light"] .ac { background: var(--glass); border: 1px solid var(--line); }
.ac:hover:not(.soon) { border-color: var(--accent, #5fd4ff); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.ac-ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: #1a222c; display: flex; align-items: center; justify-content: center; color: #9fb0c0; }
html[data-theme="light"] .ac-ico { background: var(--glass-2); color: var(--muted); }
.ac-ico svg { width: 20px; height: 20px; }
.ac:hover:not(.soon) .ac-ico { background: rgba(var(--acc-rgb), 0.14); color: var(--accent, #5fd4ff); }
.ac-text { display: flex; flex-direction: column; gap: 3px; }
.ac-title { font-weight: 700; font-size: 13.5px; color: #e8eef5; display: flex; align-items: center; gap: 7px; }
html[data-theme="light"] .ac-title { color: var(--text); }
.ac-desc { font-size: 12px; color: #8b96a4; line-height: 1.35; }
html[data-theme="light"] .ac-desc { color: var(--muted); }
.ac.soon { opacity: .5; cursor: not-allowed; }
.ac-soon { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: #caa15f; border: 1px solid #4a3f23; border-radius: 4px; padding: 1px 5px; text-transform: uppercase; }
html[data-theme="light"] .ac-soon { color: var(--amber); border: 1px solid var(--line-hi); }

/* ===== Cabeçalho de categoria + sub-nav ===== */
/* A navegação por categorias substitui a barra de abas antiga dentro do painel. */
#tabs { display: none; }
.cat-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto 14px; padding: 4px 0; }
/* display:flex acima sobrepõe o atributo [hidden]; restaura o ocultamento na Home. */
.cat-header[hidden] { display: none; }
.nav-back { display: inline-flex; align-items: center; gap: 6px; background: #161c24; border: 1px solid #2a323d; border-radius: 9px; padding: 8px 12px; color: #c7d0da; cursor: pointer; font: inherit; font-size: 13px; }
html[data-theme="light"] .nav-back { background: var(--glass); border: 1px solid var(--line); color: var(--muted); }
.nav-back:hover { border-color: var(--accent, #5fd4ff); color: #e8eef5; }
html[data-theme="light"] .nav-back:hover { color: var(--text); }
.cat-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: #e8eef5; }
html[data-theme="light"] .cat-title { color: var(--text); }
.cat-title svg { width: 18px; height: 18px; color: var(--accent, #5fd4ff); }
.subnav { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }
.pill { background: #161c24; border: 1px solid #2a323d; border-radius: 8px; padding: 7px 13px; font-size: 12px; color: #8b96a4; cursor: pointer; font: inherit; }
html[data-theme="light"] .pill { background: var(--glass); border: 1px solid var(--line); color: var(--muted); }
.pill:hover:not(.soon) { color: #e8eef5; border-color: #3a4550; }
html[data-theme="light"] .pill:hover:not(.soon) { color: var(--text); border-color: var(--line-hi); }
.pill.on { background: var(--accent, #5fd4ff); border-color: var(--accent, #5fd4ff); color: #0e1116; font-weight: 700; }
.pill.soon { opacity: .45; cursor: not-allowed; }

/* ===== Modo PDF: oculta a moldura de convert/edit, deixa só o pane de PDF.
   data-tool^="pdf" cobre pdf (imagens↔PDF), pdfmerge, pdfedit e pdfopt. ===== */
body[data-tool^="pdf"] .panel-header,
body[data-tool^="pdf"] #fileList,
body[data-tool^="pdf"] .ws-left,
body[data-tool^="pdf"] #results,
body[data-tool^="pdf"] #bulkActions { display: none !important; }
/* Botão "Adicionar mais PDFs" no Juntar (fora do .panel-header, que fica oculto) */
.add-more-btn { margin: 10px 0 4px; }
.opt-result { margin-top: 12px; font-size: 14px; line-height: 1.5; }
/* Nas telas de PDF a .ws-left some; sem isto o .ws-right cairia na coluna
   estreita do grid (encostado à esquerda). Vira coluna única centralizada. */
body[data-tool^="pdf"] .workspace {
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
}

/* ===== Rodapé expandido ===== */
.footer-expanded { display: block; padding: 28px 0 40px; }
.footer-cols {
  display: flex; flex-wrap: wrap; gap: 32px 56px;
  align-items: flex-start;
}
.footer-col { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.footer-h {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; opacity: .7;
  margin-bottom: 4px;
}
.footer-col a { color: inherit; text-decoration: none; opacity: .85; font-size: 14px; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-note { font-size: 12.5px; opacity: .7; max-width: 320px; line-height: 1.5; }
.footer-ver { font-family: "IBM Plex Mono", monospace; font-size: 11px; opacity: .5; margin-top: 6px; }

/* ===== Páginas de conteúdo (Como funciona / FAQ) ===== */
.content-page { max-width: 760px; margin: 0 auto; padding: 8px 0 24px; }
.content-h1 { font-family: "Chakra Petch", sans-serif; font-size: 30px; margin: 0 0 10px; }
.content-h2 { font-family: "Chakra Petch", sans-serif; font-size: 19px; margin: 28px 0 12px; opacity: .92; }
.content-lead { font-size: 16px; line-height: 1.6; opacity: .9; }
.content-list { line-height: 1.7; padding-left: 18px; }
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.step-n {
  flex: 0 0 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-family: "IBM Plex Mono", monospace;
  font-size: 13px; background: rgba(60,50,35,.10); border: 1px solid rgba(255,255,255,.12);
}
.faq-item {
  border: 1px solid rgba(255,255,255,.10); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px; background: rgba(60,50,35,.05);
}
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { margin-bottom: 8px; }
.faq-item p { margin: 0; line-height: 1.6; opacity: .88; }
.content-cta { display: inline-flex; margin-top: 28px; text-decoration: none; }

/* ===== Ajuda contextual (botão ? + popover) ===== */
.help-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: rgba(60,50,35,.06);
  border: 1px solid rgba(255,255,255,.12); color: inherit; cursor: pointer;
  opacity: .75; transition: opacity .15s ease, transform .15s ease;
}
.help-btn:hover { opacity: 1; }
.help-pop {
  position: fixed; z-index: 60; max-width: 320px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--glass, rgba(30,26,20,.92));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}
.help-pop.show { opacity: 1; transform: translateY(0); }
.help-pop-text { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; }
.help-pop-link { font-family: "IBM Plex Mono", monospace; font-size: 12px; text-decoration: none; opacity: .85; }
.help-pop-link:hover { opacity: 1; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .help-pop, .help-btn { transition: none; }
}

/* ===== Formulário de contato ===== */
.contact-form { max-width: 560px; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pick {
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(60,50,35,.06); border: 1px solid rgba(255,255,255,.14);
  color: inherit; opacity: .8; transition: opacity .15s ease;
}
.cat-pick:hover { opacity: 1; }
.cat-pick.on { background: var(--accent, #5fd4ff); border-color: var(--accent, #5fd4ff); color: #0e1116; font-weight: 700; opacity: 1; }
.contact-form textarea.text-input { resize: vertical; min-height: 120px; font-family: inherit; }
.ap-error.contact-ok { color: var(--accent, #5fd4ff); }

/* ===== Seletor de idioma ===== */
.lang-toggle {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px;
  background: rgba(60,50,35,.06); border: 1px solid rgba(255,255,255,.12);
}
.lang-opt {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; padding: 4px 8px; border-radius: 999px;
  background: transparent; border: none; color: inherit; cursor: pointer;
  opacity: .55; transition: opacity .15s ease, background .15s ease;
}
.lang-opt:hover { opacity: 1; }
.lang-opt.on { opacity: 1; background: var(--accent, #5fd4ff); color: #0e1116; }

/* PDF toolbox (Juntar/Editar) */
.panel-hint { font-size: .82rem; opacity: .7; }
.mg-grip { cursor: grab; opacity: .5; padding-right: 6px; user-select: none; }
.mg-item.dragging { opacity: .5; }
.mg-item[draggable="true"] { cursor: grab; }

/* PDF Editar — grade de miniaturas (Task 6) */
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.ed-tile { background: rgba(60,50,35,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 8px; cursor: grab; transition: opacity .15s; }
.ed-tile.dragging { opacity: .4; }
.ed-tile.removed { opacity: .35; outline: 2px solid #c0392b; }
.ed-thumb { display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.ed-canvas { max-width: 100%; height: auto; box-shadow: 0 2px 8px rgba(0,0,0,.25); border-radius: 3px; }
.ed-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ed-tools button { background: none; border: none; color: inherit; font-size: 1.1rem; cursor: pointer; opacity: .75; padding: 2px 6px; }
.ed-tools button:hover { opacity: 1; }
.ed-num { font-size: .78rem; opacity: .6; }

/* ===== Painel Admin ===== */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 20px; }
.admin-table th, .admin-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.10); }
.admin-table th { font-family: "IBM Plex Mono", monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.admin-msg { border: 1px solid rgba(255,255,255,.10); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; background: rgba(60,50,35,.05); }
.admin-msg-meta { font-size: 12px; opacity: .7; margin-bottom: 4px; }
.admin-msg-body { line-height: 1.5; white-space: pre-wrap; }

/* ===== Tela de planos: toggle Mensal/Anual + selo ===== */
.plan-toggle { display: inline-flex; gap: 2px; padding: 3px; margin: 8px 0;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(60,50,35,.06); }
.plan-toggle .pt-opt { border: 0; background: transparent; color: inherit;
  font: 600 12px 'Chakra Petch', sans-serif; padding: 5px 14px; border-radius: 999px;
  cursor: pointer; opacity: .7; }
.plan-toggle .pt-opt.active { background: var(--accent, #5fd4ff); color: #0e1116; opacity: 1; }

/* ===== Aviso de cookies essenciais ===== */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(20, 20, 28, 0.92); color: #e8e8ef;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem; backdrop-filter: blur(8px);
}
.cookie-notice-link { color: #9fd0ff; text-decoration: underline; }
.cookie-notice-ok {
  margin-left: auto; padding: 6px 14px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.plan-save { font-size: 12px; font-weight: 700; color: var(--accent, #5fd4ff); margin-bottom: 6px; }
