/* ==========================================================================
   _TEMPLATE-RBTO20.COM — DESIGN SYSTEM MASTER STYLESHEET
   Diretrizes oficiais: AI_AGENT_GUIDELINES.md
   Estética: Minimalismo Técnico, Dark Clean (#0b0e14), Teal Cirúrgico (#009688)
   Regra Absoluta: 100% Livre de Emojis em todo o código e interface.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DEFINIÇÃO TIPOGRÁFICA (JetBrains Mono Local + Fallback Web)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations'),
       url('assets/JetBrainsMono-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS & VARIÁVEIS OFICIAIS (:root)
   -------------------------------------------------------------------------- */
:root {
  /* Fundo & Superfícies */
  --bg-color: #0b0e14;                    /* Fundo global escuro profundo (nunca preto puro #000) */
  --card-bg: rgba(255, 255, 255, 0.015);  /* Fundo sutil de cartões e itens */
  --card-bg-hover: rgba(255, 255, 255, 0.03); /* Hover em superfícies neutras */

  /* Caixas de Entrada & Código */
  --code-bg: #080a0f;                     /* Fundo escuro de inputs, textareas e blocos <pre> */
  --code-header-bg: #0f131a;              /* Cabeçalho de caixas de código ou cartões */

  /* Destaque (Accent) — Teal Cirúrgico */
  --ds-teal-500: #009688;                 /* Teal primário oficial (links, botão accent, foco) */
  --ds-teal-400: #26a69a;                 /* Teal secundário / foco acessível */
  --ds-teal-subtle: rgba(0, 150, 136, 0.1);   /* Fundo suave em hover de botões/cartões */
  --ds-teal-border: rgba(0, 150, 136, 0.35);  /* Contorno destacado ativo */

  /* Textos & Contrastes */
  --text-primary: #ededed;               /* Texto primário de alto contraste (títulos, valores) */
  --text-secondary: #9aa4b2;             /* Texto de leitura, labels de formulários, descrições */
  --text-muted: #555e6d;                 /* Metadados, timestamps, rodapé, links de canto */

  /* Bordas & Divisores */
  --border-color: #21262d;               /* Borda universal de caixas, inputs e divisores */
  --border-hover: #30363d;               /* Borda durante estados interativos neutros */

  /* Status Tokens */
  --status-up: #009688;                   /* Operacional / Sucesso */
  --status-up-subtle: rgba(0, 150, 136, 0.12);
  --status-up-border: rgba(0, 150, 136, 0.35);

  --status-degraded: #d29922;             /* Instável / Alerta */
  --status-degraded-subtle: rgba(210, 153, 34, 0.12);
  --status-degraded-border: rgba(210, 153, 34, 0.35);

  --status-down: #f85149;                 /* Erro / Falha / Fora do Ar */
  --status-down-subtle: rgba(248, 81, 73, 0.12);
  --status-down-border: rgba(248, 81, 73, 0.35);

  --status-empty: #161b22;                /* Ausência de dados / Não monitorado */

  /* Tipografia Monospaçada */
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   3. RESET UNIVERSAL & ESTILOS BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 15px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.6;
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--ds-teal-500);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   4. ESTRUTURAS DE LAYOUT & AS 3 LARGURAS DE CONTÊINER
   -------------------------------------------------------------------------- */
.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  position: relative;
}

/* Centralização Vertical (Página Inicial ou Subpáginas sem Rolagem Longa) */
.site-wrapper.privacy-wrapper,
.site-wrapper.centered-wrapper {
  justify-content: center;
}

/* Largura 1: Hub de Links / Portal Pessoal (380px) */
.hub-frame,
.content-frame {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: auto 0;
}

/* Largura 2: Subpáginas Institucionais / Texto Focado (480px) */
.subpage-frame,
.privacy-page-frame {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: auto 0;
}

/* Largura 3: Aplicações, Dashboards, Sorteadores e Leitor (680px) */
.app-frame,
.pub-frame,
.publ-frame,
.status-frame {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 4.5rem;
}

/* --------------------------------------------------------------------------
   5. CABEÇALHO PADRÃO DE APLICAÇÃO & RETORNO
   -------------------------------------------------------------------------- */
.privacy-header,
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-brand-link {
  text-decoration: none;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.header-brand-link:hover .header-name {
  color: var(--ds-teal-500);
}

.header-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.publ-nav-actions,
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botão Início / Voltar: Texto padrão em branco com transição para Teal no hover */
.btn-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.btn-exit:hover,
.btn-exit:focus-visible {
  border-color: var(--ds-teal-500);
  color: var(--ds-teal-500);
  background: var(--ds-teal-subtle);
  outline: none;
}

.btn-exit-icon {
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   6. SELETOR DE MODOS (ABAS / TABS)
   -------------------------------------------------------------------------- */
.mode-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--card-bg-hover);
}

.tab-btn.is-active {
  background: var(--ds-teal-subtle);
  border-color: var(--ds-teal-500);
  color: var(--ds-teal-500);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. FORMULÁRIOS, INPUTS & TRATAMENTO SILENCIOSO DE ERROS
   -------------------------------------------------------------------------- */
/* Regra: Zero caixas externas envolventes. O formulário respira livremente. */
.setup-container,
.form-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-section {
  display: none;
  flex-direction: column;
  gap: 1.15rem;
}

.form-section.is-active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-field {
  width: 100%;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input-field:focus {
  border-color: var(--ds-teal-500);
  background: #0d1117;
}

/* Classe de Erro Silencioso (Borda e fundo avermelhados sem alert popups) */
.input-field.input-error,
.textarea-field.input-error {
  border-color: var(--status-down) !important;
  background-color: var(--status-down-subtle) !important;
}

.input-field::placeholder,
.textarea-field::placeholder {
  color: var(--text-muted);
}

/* Área de Texto Inteligente & Upload */
.textarea-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.textarea-field {
  width: 100%;
  min-height: 140px;
  max-height: 320px;
  resize: vertical;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 0.65rem 0.75rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.textarea-field:focus {
  border-color: var(--ds-teal-500);
  background: #0d1117;
}

.textarea-field.drag-over {
  border-color: var(--ds-teal-500);
  background: var(--ds-teal-subtle);
}

/* Barra de Status do Textarea */
.textarea-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.textarea-counter {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.counter-badge {
  color: var(--ds-teal-500);
  font-weight: 500;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Botões Auxiliares Compactos (.action-btn-sm) */
.action-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.action-btn-sm:hover,
.action-btn-sm:focus-visible {
  border-color: var(--ds-teal-500);
  color: var(--ds-teal-500);
  background: var(--ds-teal-subtle);
  outline: none;
}

/* Toggle Segmentado (ex.: Critérios de divisão) */
.segmented-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: var(--code-bg);
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.segmented-toggle.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.segmented-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.segmented-toggle-btn.is-active {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   8. MENUS EXPANSÍVEIS (ACCORDION) & CHECKBOXES
   -------------------------------------------------------------------------- */
.accordion-wrapper {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.accordion-details {
  list-style: none;
}

.accordion-details summary::-webkit-details-marker {
  display: none;
}

.accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  transition: color 0.15s ease;
}

.accordion-summary:hover {
  color: var(--text-primary);
}

.accordion-icon {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.accordion-details[open] .accordion-icon {
  transform: rotate(90deg);
}

.accordion-content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 0 0.25rem 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label:hover {
  color: var(--text-primary);
}

.checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.checkbox-input:checked {
  background: var(--ds-teal-500);
  border-color: var(--ds-teal-500);
}

.checkbox-input:checked::before {
  content: "✓";
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
}

/* Botão de Ação Primário do Formulário */
.btn-action-main {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ds-teal-500);
  background: var(--ds-teal-subtle);
  border: 1px solid var(--ds-teal-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn-action-main:hover,
.btn-action-main:focus-visible {
  border-color: var(--ds-teal-500);
  background: rgba(0, 150, 136, 0.2);
  color: #ffffff;
  outline: none;
}

.btn-action-main:active {
  transform: scale(0.99);
}

.btn-action-main:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   9. HIERARQUIA DE BOTÕES DE AÇÃO (.action-btn)
   -------------------------------------------------------------------------- */
/* Botão Neutro Padrão (Exportar, Copiar, Links) */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.action-btn:hover,
.action-btn:focus-visible {
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  color: var(--text-primary);
  outline: none;
}

/* Botão com Accent Color Único (Novo Sorteio / Prosseguir) */
.action-btn.btn-accent {
  color: var(--ds-teal-500);
  border-color: var(--ds-teal-border);
  background: var(--ds-teal-subtle);
}

.action-btn.btn-accent:hover,
.action-btn.btn-accent:focus-visible {
  border-color: var(--ds-teal-500);
  background: rgba(0, 150, 136, 0.2);
  color: #ffffff;
}

/* Pareamento de Altura para Inputs e Botões Integrados (34px) */
.paired-input-wrapper,
.verification-input-wrapper {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
}

.paired-input-wrapper .input-field,
.verification-input-wrapper .input-field {
  flex: 1;
  height: 34px;
  padding: 0 0.75rem;
  font-size: 0.75rem !important;
}

.paired-input-wrapper .action-btn,
.verification-input-wrapper .action-btn {
  white-space: nowrap;
  height: 34px;
  padding: 0 0.85rem;
}

/* --------------------------------------------------------------------------
   10. TELA DE RESULTADOS & CARTÕES INTERATIVOS
   -------------------------------------------------------------------------- */
.results-section {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.results-section.is-active {
  display: flex;
}

.results-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.results-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ds-teal-500);
}

.results-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.result-card {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  min-height: 64px;
  position: relative;
  transition: all 0.15s ease;
}

.result-card:hover {
  border-color: var(--ds-teal-border);
  background: #0d1117;
  transform: translateY(-1px);
}

.result-index {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.result-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

/* Modo Revelação / Suspense */
.result-card.is-hidden {
  cursor: pointer;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.01);
}

.result-card.is-hidden .result-value {
  filter: blur(8px);
  user-select: none;
  opacity: 0.2;
}

.result-card.is-hidden .reveal-prompt {
  display: block;
}

.reveal-prompt {
  display: none;
  position: absolute;
  font-size: 0.72rem;
  color: var(--ds-teal-500);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   10.1. COMPONENTES ESPECÍFICOS — PLATAFORMA GOOGLE DRIVE
   -------------------------------------------------------------------------- */
.select-field {
  width: 100%;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.select-field:focus {
  border-color: var(--ds-teal-500);
  background: #0d1117;
}

.select-field option {
  background: var(--bg-color);
  color: var(--text-primary);
}

.info-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  border-left: 2px solid var(--ds-teal-500);
  padding: 0.45rem 0.7rem;
  background: var(--card-bg);
  border-radius: 0 4px 4px 0;
  line-height: 1.5;
}

.id-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.id-summary-val {
  color: var(--ds-teal-500);
  font-weight: 500;
  word-break: break-all;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-item-card {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.link-item-card:hover {
  border-color: var(--border-hover);
  background: #0d1117;
}

.link-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.link-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.link-item-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  background: var(--card-bg);
  font-weight: 500;
}

.link-item-badge.badge-accent {
  color: var(--ds-teal-500);
  border-color: var(--ds-teal-border);
  background: var(--ds-teal-subtle);
}

.link-item-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.link-item-img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  margin-top: 0.35rem;
}

.input-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   11. BARRA DE EXPORTAÇÃO INTEGRADA (TXT / CSV)
   -------------------------------------------------------------------------- */
.export-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.export-actions-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.export-format-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  overflow: hidden;
  height: 32px;
  transition: border-color 0.15s ease;
}

.export-format-wrapper:hover {
  border-color: var(--border-hover);
}

.select-format {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0 0.5rem;
  height: 100%;
  outline: none;
  cursor: pointer;
}

.select-format option {
  background: var(--bg-color);
  color: var(--text-primary);
}

.btn-export-trigger {
  border-left: 1px solid var(--border-color) !important;
  border-top: none !important;
  border-bottom: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  height: 100% !important;
  padding: 0 0.75rem !important;
  color: var(--text-secondary) !important;
}

/* --------------------------------------------------------------------------
   12. PÁGINAS DE TEXTO / PRIVACIDADE / MARKDOWN
   -------------------------------------------------------------------------- */
.privacy-body,
.markdown-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.privacy-body p,
.markdown-body p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.privacy-body strong,
.markdown-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

.text-link {
  color: var(--ds-teal-500);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  text-underline-offset: 3px;
  font-size: 0.85rem;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.text-link:hover {
  color: #ffffff;
  text-decoration-color: var(--ds-teal-500);
}

/* --------------------------------------------------------------------------
   13. O RODAPÉ FIXO (.corner-privacy)
   -------------------------------------------------------------------------- */
.corner-privacy {
  position: fixed;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  right: max(1.75rem, env(safe-area-inset-right, 1.75rem));
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.72rem;
  z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.privacy-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.privacy-link:hover {
  color: var(--ds-teal-500);
  text-decoration-color: var(--ds-teal-500);
}

/* --------------------------------------------------------------------------
   14. TOAST DE FEEDBACK FLUTUANTE
   -------------------------------------------------------------------------- */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0d1117;
  border: 1px solid var(--ds-teal-500);
  color: var(--text-primary);
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-notice.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   15. AJUSTES RESPONSIVOS MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-wrapper {
    padding: 1rem 1rem 4.5rem 1rem;
  }

  .results-header-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .export-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .export-actions-group {
    justify-content: stretch;
  }

  .export-actions-group .action-btn,
  .export-actions-group .export-format-wrapper {
    flex: 1;
  }

  .corner-privacy {
    bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    right: max(1rem, env(safe-area-inset-right, 1rem));
  }
}
