:root {
  --bg-page: #F8F9FA;
  --bg-card: #FFFFFF;
  --bg-sidebar: #1A1A2E;
  --blue-lg: #1E3A8A;
  --yellow-lg: #FBBF24;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --urgent-green: #10B981;
  --urgent-yellow: #F59E0B;
  --urgent-red: #EF4444;

  /* legados — usados no form/loading/mensagem */
  --azul: #1E3A8A;
  --azul-claro: #2563EB;
  --dourado: #FBBF24;
  --branco: #FFFFFF;
  --cinza-claro: #F8F9FA;
  --cinza: #E5E7EB;
  --texto: #111827;
  --texto-secundario: #6B7280;
  --sucesso: #10B981;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
}

/* ── Layout master-detail ───────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#tela-painel {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  background: var(--bg-page);
}

/* Formulário começa oculto e expande ao lado */
#tela-form {
  flex: 0 0 0px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--branco);
  transition: flex-basis 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid transparent;
}

body.form-aberto #tela-form {
  flex: 0 0 420px;
  overflow-y: auto;
  border-left-color: var(--cinza);
}

/* ── Overlays (loading e mensagem) ─────────────────────── */
.tela-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  flex-direction: column;
  z-index: 200;
  background: var(--cinza-claro);
}

.tela-overlay.ativa { display: flex; }

/* ── Sidebar slim ───────────────────────────────────────── */
.sidebar-slim {
  width: 64px;
  flex-shrink: 0;
  height: 100%;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 20px;
}

.sidebar-logo {
  padding: 4px 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  align-items: center;
  flex: 1;
}

.sidebar-item {
  position: relative;
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: #6B7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.sidebar-item:hover {
  background: rgba(255,255,255,0.07);
  color: #FFFFFF;
}

.sidebar-item.ativo {
  color: #FFFFFF;
  border-left-color: var(--yellow-lg);
  background: rgba(255,255,255,0.07);
}

.sidebar-item:focus-visible {
  outline: 2px solid var(--yellow-lg);
  outline-offset: -2px;
}

.sidebar-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--blue-lg);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.sidebar-badge:empty { display: none; }

.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-primary);
  color: white;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
}

.sidebar-item:hover .sidebar-tooltip { opacity: 1; }

/* ── Área principal ─────────────────────────────────────── */
.painel-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Header base (form/mensagem) ────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--azul), var(--azul-claro));
  color: var(--branco);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 12px rgba(24,64,224,0.25);
  flex-shrink: 0;
}

/* ── Header do painel (branco) ──────────────────────────── */
.painel-main .header {
  background: var(--branco);
  color: var(--text-primary);
  padding: 0 20px;
  height: 58px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-sub-painel {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  margin-right: auto;
}

.header-titulo {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--branco);
  text-align: right;
  opacity: 0.9;
}

.btn-voltar {
  background: none; border: none; color: var(--branco);
  font-size: 15px; cursor: pointer; padding: 4px 8px;
  border-radius: 8px; font-family: inherit;
}
.btn-voltar:hover { background: rgba(255,255,255,0.15); }
.btn-voltar:focus-visible { outline: 2px solid var(--dourado); outline-offset: 2px; }

.btn-fechar-form {
  margin-left: auto;
  background: none; border: none; color: var(--branco);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
  border-radius: 8px; font-family: inherit; line-height: 1;
  opacity: 0.8; transition: opacity 0.15s;
}
.btn-fechar-form:hover { opacity: 1; background: rgba(255,255,255,0.15); }

/* ── Botão + Nova ───────────────────────────────────────── */
.btn-nova {
  background: var(--yellow-lg);
  color: var(--bg-sidebar);
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nova:hover { background: #F0B01C; }
.btn-nova:focus-visible { outline: 2px solid var(--bg-sidebar); outline-offset: 3px; }

/* ── Abas ───────────────────────────────────────────────── */
.abas {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Abas dentro do header do painel */
.painel-main .header .abas {
  border-bottom: none;
  padding: 0;
  background: transparent;
  height: 100%;
}

.aba {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 16px;
  height: 58px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aba.ativa {
  color: var(--blue-lg);
  border-bottom-color: var(--blue-lg);
}

.aba:focus-visible { outline: 2px solid var(--blue-lg); outline-offset: -2px; }

.badge {
  background: var(--blue-lg);
  color: white;
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ── Lista de cotações ──────────────────────────────────── */
.lista-cotacoes {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  align-content: start;
  background: var(--bg-page);
}

.estado-vazio {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 48px 24px;
  font-size: 16px;
}

/* ── Cards de cotação ───────────────────────────────────── */
.card-cotacao {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border-left: 4px solid var(--cinza);
  transition: box-shadow 0.2s, transform 0.15s;
}

.card-cotacao:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.card-cotacao--urgente-verde   { border-left-color: var(--urgent-green); }
.card-cotacao--urgente-amarelo { border-left-color: var(--urgent-yellow); }
.card-cotacao--urgente-vermelho { border-left-color: var(--urgent-red); }
.card-cotacao--enviada         { border-left-color: var(--sucesso); }

.card-cotacao-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.card-rota {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.card-cliente {
  background: #DBEAFE;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-lg);
}

.tag-portal {
  background: #dbeafe;
  color: #1e40af;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.card-cotacao-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.card-cotacao-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tag-tempo {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tag-pendente { font-size: 12px; color: var(--text-secondary); }
.tag-enviada  { font-size: 12px; color: var(--sucesso); font-weight: 600; }

.btn-ver-msg {
  background: var(--blue-lg);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-ver-msg:hover { background: var(--yellow-lg); color: var(--bg-sidebar); }
.btn-ver-msg:focus-visible { outline: 2px solid var(--blue-lg); outline-offset: 3px; }

/* ── Formulário ─────────────────────────────────────────── */
.form-container {
  padding: 24px 20px;
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.campo-grupo { margin-bottom: 14px; }

.campo-grupo label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-secundario);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.campo-grupo input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--cinza);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: var(--branco);
  color: var(--texto);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.campo-grupo input:focus {
  border-color: var(--azul-claro);
  box-shadow: 0 0 0 3px rgba(34,85,255,0.12);
}

.iata-input { text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }

.iata-hint {
  display: block;
  font-size: 12px;
  color: var(--azul-claro);
  margin-top: 4px;
  min-height: 16px;
}

/* ── Autocomplete dropdown ──────────────────────────────── */
.autocomplete-wrap { position: relative; }

.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 16px);
  left: 0; right: 0;
  background: var(--branco);
  border: 2px solid var(--azul-claro);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(34,85,255,0.15);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}

.autocomplete-dropdown.aberto { display: block; }

.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--cinza);
  transition: background 0.1s;
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.ativo { background: var(--cinza-claro); }

.ac-item-iata {
  font-size: 14px;
  font-weight: 700;
  color: var(--azul);
  min-width: 36px;
  letter-spacing: 0.5px;
}

.ac-item-loc {
  font-size: 13px;
  color: var(--texto-secundario);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campo-duplo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.obrigatorio { color: var(--azul-claro); }

/* ── Botão flexível ─────────────────────────────────────── */
.btn-flexivel {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--cinza);
  border-radius: var(--radius);
  background: var(--branco);
  color: var(--texto-secundario);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.btn-flexivel.ativo {
  border-color: var(--azul-claro);
  background: #eef4ff;
  color: var(--azul-claro);
}

.btn-flexivel:focus-visible { outline: 2px solid var(--azul-claro); outline-offset: 2px; }

/* ── Contadores ─────────────────────────────────────────── */
.contador-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--branco);
  border: 2px solid var(--cinza);
  border-radius: var(--radius);
  width: 100%;
}

.contador-info { display: flex; flex-direction: column; gap: 2px; }
.contador-nome { font-size: 14px; font-weight: 600; color: var(--texto); }
.contador-hint { font-size: 11px; color: var(--texto-secundario); }
.contador-ctrl { display: flex; align-items: center; gap: 14px; }

.contador-ctrl span {
  font-size: 18px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
  color: var(--texto);
}

.btn-contador {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--blue-lg);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-contador:hover { background: var(--azul-claro); }
.btn-contador:active { transform: scale(0.93); }
.btn-contador:focus-visible { outline: 2px solid var(--azul-claro); outline-offset: 3px; }

/* ── Botão buscar ───────────────────────────────────────── */
.btn-buscar {
  width: 100%;
  margin-top: 10px;
  padding: 17px;
  background: var(--dourado);
  color: #111;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 3px 10px rgba(255,230,0,0.35);
}

.btn-buscar:hover { background: #F0B01C; }
.btn-buscar:active { transform: scale(0.98); }
.btn-buscar:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

/* ── Loading ────────────────────────────────────────────── */
#tela-loading {
  background: linear-gradient(160deg, #1840e0 0%, #2255FF 55%, #4d7fff 100%);
}

.loading-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  gap: 20px;
}

.aviao-animado {
  font-size: 60px;
  will-change: transform;
  animation: voar 2s ease-in-out infinite;
}

@keyframes voar {
  0%, 100% { transform: translateX(-10px) translateY(0) rotate(-2deg); }
  50%       { transform: translateX(10px) translateY(-10px) rotate(2deg); }
}

.loading-container h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--branco);
}

.progress-track {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--dourado);
  border-radius: 10px;
  width: 0%;
  animation: progresso 12s ease-out forwards;
}

@keyframes progresso {
  0%   { width: 5%; }
  33%  { width: 38%; }
  66%  { width: 72%; }
  100% { width: 88%; }
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.step {
  background: rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  text-align: left;
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.35s;
}

.step.ativo {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.30);
  color: var(--branco);
  font-weight: 600;
}

.step.done {
  background: rgba(34,197,94,0.12);
  border-color: rgba(134,239,172,0.35);
  color: #86efac;
}

/* ── Mensagem WhatsApp ──────────────────────────────────── */
.msg-tabs {
  display: flex;
  border-bottom: 2px solid var(--cinza);
  background: var(--branco);
  padding: 0 16px;
}

.msg-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
  margin-bottom: -2px;
}

.msg-tab.ativa {
  color: var(--blue-lg);
  border-bottom-color: var(--blue-lg);
}

.mensagem-container {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.mensagem-preview {
  background: #e5f7e5;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  font-family: monospace;
  color: #1a1a1a;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.acoes-mensagem { display: flex; flex-direction: column; gap: 10px; }

.btn-copiar, .btn-whatsapp {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: block;
  transition: opacity 0.2s;
}

.btn-copiar { background: var(--blue-lg); color: white; border: none; }
.btn-whatsapp { background: #25d366; color: white; border: none; }
.btn-copiar:hover, .btn-whatsapp:hover { opacity: 0.88; }
.btn-copiar:focus-visible, .btn-whatsapp:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--texto);
  color: white;
  padding: 12px 20px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.3s;
  z-index: 999;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  text-align: center;
}

.toast.visivel { transform: translateX(-50%) translateY(0); }

/* ── Erro ───────────────────────────────────────────────── */
.mensagem-erro {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius);
  padding: 16px;
  color: #991b1b;
  text-align: center;
  margin: 20px 16px;
}

/* ── Resultados (tela legada) ───────────────────────────── */
.resultados-container { padding: 16px; flex: 1; overflow-y: auto; }

.card-combo {
  background: var(--branco);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color 0.2s;
  cursor: pointer;
}

.card-combo:hover { border-color: var(--azul-claro); }
.card-combo.destaque-1 { border-color: #FFD700; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-voo {
  background: var(--cinza-claro);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.card-voo-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--texto-secundario);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.card-voo-rota {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.card-voo-rota .hora { color: var(--texto); }
.card-voo-rota .seta { color: var(--texto-secundario); font-size: 14px; }
.card-voo-rota .cia { font-size: 13px; color: var(--texto-secundario); font-weight: 500; margin-left: auto; }

.card-voo-info {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--texto-secundario);
}

.tag-direto { color: var(--sucesso); font-weight: 600; }
.tag-escala { color: #f59e0b; }

.card-pagamento {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--cinza);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preco-principal { font-size: 22px; font-weight: 800; color: var(--azul); }
.preco-detalhe { font-size: 12px; color: var(--texto-secundario); }

.destaque-texto {
  background: linear-gradient(135deg, #fff8e7, #fff3cc);
  border: 1px solid var(--dourado);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: #7a5c00;
  margin-top: 8px;
}

.footer-acao {
  padding: 16px;
  background: var(--branco);
  border-top: 1px solid var(--cinza);
}

.btn-msg {
  width: 100%;
  padding: 14px;
  background: var(--dourado);
  color: var(--texto);
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ── Bottom Sheet (mobile) ──────────────────────────────────── */
.bs-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  -webkit-tap-highlight-color: transparent;
}
.bs-backdrop.aberto { display: block; }

.bs-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 92dvh;
  background: var(--branco);
  border-radius: 20px 20px 0 0;
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  overflow: hidden;
}
.bs-sheet.aberto { transform: translateY(0); }

.bs-handle {
  width: 40px; height: 4px;
  background: var(--cinza);
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.bs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 16px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--cinza);
}

.bs-rota {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.bs-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.bs-fechar {
  background: var(--cinza-claro);
  border: none;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
  margin-left: 8px;
}

.bs-tabs {
  display: flex;
  border-bottom: 2px solid var(--cinza);
  flex-shrink: 0;
}

.bs-tab {
  flex: 1;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: -2px;
  transition: color 0.15s;
}

.bs-tab.ativa {
  color: var(--blue-lg);
  border-bottom-color: var(--blue-lg);
}

.bs-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  background: var(--cinza-claro);
}

.bs-mensagem-texto {
  background: #e5f7e5;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  font-family: monospace;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  word-break: break-word;
}

.bs-footer {
  display: none;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 10px;
  border-top: 1px solid var(--cinza);
  flex-shrink: 0;
  background: var(--branco);
}
.bs-footer.visivel { display: flex; }

.bs-btn-copiar, .bs-btn-whatsapp {
  flex: 1;
  height: 52px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  -webkit-tap-highlight-color: transparent;
}
.bs-btn-copiar { background: var(--blue-lg); color: white; }
.bs-btn-whatsapp { background: #25d366; color: white; }
.bs-btn-copiar:active { opacity: 0.8; transform: scale(0.97); }
.bs-btn-whatsapp:active { opacity: 0.8; transform: scale(0.97); }

/* ── Mobile (< 600px) ───────────────────────────────────── */
@media (max-width: 599px) {
  .sidebar-slim { display: none; }
  .logo-sub-painel { display: none; }

  .painel-main .header { padding: 0 12px; gap: 8px; }

  /* + Nova vira FAB fixo no canto inferior direito */
  .btn-nova {
    position: fixed;
    bottom: 28px;
    right: 16px;
    z-index: 100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    font-size: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  }
  .btn-nova::before {
    content: '+';
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    color: var(--bg-sidebar);
  }

  /* empurra a lista para não ficar atrás do FAB */
  .lista-cotacoes {
    grid-template-columns: 1fr;
    padding: 12px;
    padding-bottom: 96px;
    gap: 10px;
  }
}

/* ── Tablet (≥ 600px) ───────────────────────────────────── */
@media (min-width: 600px) {
  .form-container { padding: 32px 24px; }

  .lista-cotacoes {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 20px;
    gap: 14px;
  }
}

/* ── Desktop (≥ 900px) ──────────────────────────────────── */
@media (min-width: 900px) {
  .lista-cotacoes {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    padding: 24px;
    gap: 16px;
  }

  #tela-form .form-container { max-width: 600px; padding: 40px 32px; }

  #tela-loading .loading-container { max-width: 480px; margin: 0 auto; }

  #tela-mensagem .mensagem-container { max-width: 560px; margin: 0 auto; padding: 32px 24px; }
}
