/* ==============================================
   ARQUIVO: ibexgo/assets/css/style.css
   ============================================== */

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

:root {
  --blue: #14539B;
  --gold: #F2B807;
  --white: #FFFFFF;
  --bg: #F6F8FB;
  --dark: #172033;
  --gray: #667085;
  --green: #12B76A;
  --red: #F04438;
  --orange: #F79009;
  --border: #E4E7EC;
  --shadow: 0 1px 4px rgba(20,40,80,.07), 0 4px 16px rgba(20,40,80,.06);
  --shadow-md: 0 4px 24px rgba(20,40,80,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  /* Largura maxima do conteudo. Ocupa a tela toda ate este ponto; a
     partir dai o bloco fica centralizado e param de esticar os cards e
     as linhas de "rotulo a esquerda / valor a direita".
     Trocar so aqui muda o app inteiro. */
  --content-max: 1600px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-text { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.brand-arrow { color: var(--gold); font-weight: 800; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(242,184,7,.1); color: var(--gold); border-left-color: var(--gold); }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.3);
  font-size: 13px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ===== TOPBAR ===== */
.main-wrapper { margin-left: var(--sidebar-w); flex: 1; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  /* A barra continua branca de ponta a ponta, mas titulo e botoes
     alinham com a coluna de conteudo. Sem isto, em tela larga o titulo
     fica colado na borda esquerda e os botoes na direita, com o
     conteudo centralizado no meio -- desalinhado. */
  padding: 0 max(24px, calc((100% - var(--content-max)) / 2 + 28px));
  position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--dark); }
.menu-toggle svg { width: 22px; height: 22px; fill: currentColor; }
.topbar-title { font-size: 17px; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ===== CONTENT ===== */
.content {
  flex: 1; padding: 28px 28px 72px;
  width: 100%; min-width: 0;
  max-width: var(--content-max);
  margin-left: auto; margin-right: auto;
}

/* ===== CARDS ===== */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-body { padding: 20px 24px; }
.card-header { padding: 18px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 14px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px 22px; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--dark); letter-spacing: -.5px; line-height: 1.2; word-break: break-word; overflow-wrap: break-word; }
.stat-value.green { color: var(--green); }
.stat-value.orange { color: var(--orange); }
.stat-value.red { color: var(--red); }
.stat-value.blue { color: var(--blue); }
/* Valores monetários nos KPI cards: escala menor para não estourar */
.stat-card .sv-currency { font-size: clamp(14px, 1.4vw, 20px); }
/* Nas células da tabela: tamanho fixo normal */
td.sv-currency { font-size: 14px !important; }

/* ===== EXCURSAO CARDS ===== */
.excursoes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.exc-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
}
.exc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.exc-card-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.exc-card-label { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.exc-card-info { flex: 1; }
.exc-card-name { font-size: 16px; font-weight: 700; color: var(--dark); }
.exc-card-dest { font-size: 13px; color: var(--gray); margin-top: 2px; }
.exc-card-date { font-size: 12px; color: var(--gray); background: var(--bg); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.exc-card-body { padding: 14px 20px; }
.exc-card-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.exc-card-row span:last-child { font-weight: 600; color: var(--dark); }
.exc-card-footer { padding: 12px 20px; background: var(--bg); display: flex; align-items: center; justify-content: space-between; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-green  { background: #DCFCE7; color: #16A34A; }
.badge-yellow { background: #FEF9C3; color: #A16207; }
.badge-orange { background: #FFEDD5; color: #C2410C; }
.badge-red    { background: #FEE2E2; color: #B91C1C; }
.badge-blue   { background: #DBEAFE; color: #1D4ED8; }
.badge-gray   { background: #F3F4F6; color: #6B7280; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: opacity .15s, transform .1s, background .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { opacity: 1; background: #1161b3; }
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover { opacity: 1; background: #e0aa00; }
.btn-outline { background: transparent; color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { opacity: 1; background: var(--bg); border-color: #c8cfd9; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 1; background: #d63027; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--dark);
  background: var(--white);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,83,155,.1); }
.form-control::placeholder { color: #b0b7c3; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* ===== TABLE ===== */
.table-wrapper { overflow-x: auto; max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
thead tr { background: var(--bg); }
th { padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; font-size: 14px; color: var(--dark); border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F9FAFB; }
/* `display:flex` num <td> tira a celula do algoritmo de tabela: o
   navegador cria uma celula anonima em volta e a coluna passa a esticar
   sozinha -- era a faixa vazia gigante ao lado dos botoes. */
.td-actions {
  display: table-cell;
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}
.td-actions > *     { vertical-align: middle; }
.td-actions > * + * { margin-left: 6px; }

/* Nome e documento precisam de espaco minimo. Sem isto o nome quebra em
   tres linhas e o codigo de reserva parte no meio, enquanto as colunas de
   dinheiro sobram largura. A data de nascimento com a idade ao lado
   ("10/04/2012 - 14 anos") fica numa linha so. */
#tabelaPassageiros td:first-child,
#tabelaPassageiros th:first-child { min-width: 200px; }
#tabelaPassageiros td:nth-child(2),
#tabelaPassageiros th:nth-child(2) { min-width: 150px; white-space: nowrap; }
#tabelaPassageiros td:nth-child(3) { min-width: 160px; }
#tabelaPassageiros .badge          { white-space: nowrap; display: inline-block; }
#tabelaPassageiros td.sv-currency,
#tabelaPassageiros th:nth-child(6),
#tabelaPassageiros th:nth-child(7),
#tabelaPassageiros th:nth-child(8) { width: 1%; white-space: nowrap; text-align: right; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--gray); background: none; border: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap;
  transition: color .15s;
}
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-btn:hover:not(.active) { color: var(--dark); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(23,32,51,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%; max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.96) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray); padding: 4px 8px; border-radius: 6px; line-height: 1; }
.modal-close:hover { background: var(--bg); color: var(--dark); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 960px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: var(--dark); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn .25s ease;
  min-width: 240px;
  display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--green);
  pointer-events: all;
}
.toast.error { border-left-color: var(--red); }
.toast.warn  { border-left-color: var(--orange); }
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }

/* ===== SEAT MAP ===== */
.seat-map-wrap { background: var(--bg); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.seat-bus { display: flex; flex-direction: column; gap: 8px; max-width: 340px; margin: 0 auto; }
.seat-row { display: grid; grid-template-columns: 1fr 1fr 40px 1fr 1fr; gap: 6px; align-items: center; }
.seat {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  transition: transform .1s, box-shadow .1s;
  min-height: 52px;
  text-align: center;
  line-height: 1.2;
  padding: 3px;
  overflow: hidden;
}
.seat:hover { transform: scale(1.06); box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.seat.free      { background: var(--white); border-color: var(--border); color: var(--gray); }
.seat.reserved  { background: #FEF9C3; border-color: #FDE047; color: #A16207; }
.seat.confirmed { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.seat.blocked   { background: #F3F4F6; border-color: #D1D5DB; color: #9CA3AF; cursor: not-allowed; }
.seat.cancelled { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray); }
.legend-dot { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid; flex-shrink: 0; }

/* ===== FINANCIAL SUMMARY ===== */
.fin-summary { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px 24px; }
.fin-bar-wrap { margin: 16px 0 8px; }
.fin-bar-track { background: var(--border); border-radius: 20px; height: 10px; overflow: hidden; }
.fin-bar-fill { height: 100%; border-radius: 20px; background: var(--green); transition: width .5s ease; }
.fin-bar-fill.orange { background: var(--orange); }
.fin-bar-fill.red { background: var(--red); }
.fin-msg { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.fin-msg.success { background: #DCFCE7; color: #166534; }
.fin-msg.warn    { background: #FFEDD5; color: #C2410C; }
.fin-msg.danger  { background: #FEE2E2; color: #B91C1C; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header-sub { font-size: 14px; color: var(--gray); margin-top: 2px; }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

/* ===== FILTER BAR ===== */
/* Barra de filtros: os campos dividem o espaço disponível em vez de terem
   largura fixa. Com largura fixa, um filtro a mais quebrava para a linha
   de baixo e ficava desalinhado do resto. */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar > .form-control { flex: 1 1 150px; min-width: 140px; max-width: 260px; }
/* A busca é o campo principal: ganha o dobro de espaço e nunca fica menor
   que o suficiente para ler o que se digita. */
.filter-bar > .search-input { flex: 2 1 220px; min-width: 200px; max-width: none; }
.search-input { flex: 1; min-width: 200px; }
/* Quando a barra divide a linha com botões de ação, ela precisa de um
   piso: sem isso o último filtro era espremido para a linha de baixo e
   ficava solto, desalinhado dos demais. Abaixo desse piso, a barra inteira
   desce e ocupa a largura toda — os filtros continuam juntos. */
.flex-between > .filter-bar { min-width: 420px; }

/* ===== EXCURSAO DETAIL ===== */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--blue); text-decoration: none; margin-bottom: 18px; cursor: pointer; background: none; border: none; }
.back-link:hover { text-decoration: underline; }
.back-link svg { width: 16px; height: 16px; fill: currentColor; }
.exc-detail-hero { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 24px 28px; margin-bottom: 24px; }
.exc-detail-hero h1 { font-size: 22px; font-weight: 700; }
.exc-detail-hero .sub { opacity: .75; font-size: 14px; margin-top: 4px; }
.exc-detail-hero { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 24px 28px; margin-bottom: 24px; }
.exc-detail-hero h1 { font-size: 22px; font-weight: 700; }
.exc-detail-hero .sub { opacity: .75; font-size: 14px; margin-top: 4px; }
.exc-detail-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 18px; }
.exc-hero-stat { background: rgba(255,255,255,.12); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; overflow: hidden; }
.exc-hero-stat-wide { grid-column: span 2; }
.exc-hero-stat .label { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exc-hero-stat .value { font-size: 18px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exc-hero-stat .hero-currency { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray); }
.empty-state svg { width: 56px; height: 56px; fill: var(--border); margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }

/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ===== COLOR PICKER ===== */
.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: border-color .1s, transform .1s; }
.color-opt:hover { transform: scale(1.15); }
.color-opt.selected { border-color: var(--dark); }

/* ===== STATUS RÁPIDO (select inline na tabela) ===== */
.status-select {
  font-size: 12px; font-weight: 600;
  border: none; border-radius: 20px;
  padding: 3px 8px; cursor: pointer;
  appearance: none; outline: none;
  background: #F3F4F6; color: #6B7280;
}
.status-select.confirmado { background: #DCFCE7; color: #16A34A; }
.status-select.reservado  { background: #FEF9C3; color: #A16207; }
.status-select.pendente   { background: #FFEDD5; color: #C2410C; }
.status-select.cancelado  { background: #FEE2E2; color: #B91C1C; }

/* ===== RELATÓRIOS ===== */
.relatorios-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.relatorio-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 22px 24px; }
.relatorio-card-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.relatorio-card-icon svg { width: 22px; height: 22px; fill: currentColor; }
.relatorio-card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.relatorio-card-desc { font-size: 13px; color: var(--gray); margin-bottom: 16px; line-height: 1.5; }
.icon-blue   { background: #EFF6FF; color: var(--blue); }
.icon-green  { background: #F0FDF4; color: var(--green); }
.icon-orange { background: #FFF7ED; color: var(--orange); }
.icon-gold   { background: #FEFCE8; color: #A16207; }
.icon-red    { background: #FFF1F2; color: var(--red); }
.icon-gray   { background: var(--bg); color: var(--gray); }

/* ===== BACKUP PAGE ===== */
.backup-info-card { background: #FFFDF5; border: 1px solid #F2E8B0; border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 18px 22px; max-width: 680px; }

/* ===== WHATSAPP BUTTON ===== */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #25D366;
  text-decoration: none;
  margin-left: 6px;
  vertical-align: middle;
  transition: opacity .15s;
}
.wa-btn:hover { opacity: .75; }
.wa-btn svg { width: 16px; height: 16px; }

.btn-wa {
  background: #25D366;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.btn-wa:hover { opacity: .85; }

/* ===== COBRANÇAS ===== */
.badge-blue { background: #DBEAFE; color: #1D4ED8; }

/* ===== CONFIGURAÇÕES ===== */
.cfg-section { max-width: 680px; }

/* ===== PRINT ===== */
@media print {
  .sidebar, .topbar, .tabs, .back-link, .btn, .no-print, .license-footer-bar { display: none !important; }
  .main-wrapper { margin-left: 0; }
  .content { padding: 0; max-width: 100%; }
  body { background: #fff; font-size: 13px; }
  .exc-detail-hero { border-radius: 0; }
  table { page-break-inside: auto; }
  tr { page-break-inside: avoid; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .menu-toggle { display: flex; }
  .content { padding: 16px 14px 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .excursoes-grid { grid-template-columns: 1fr; }
  .exc-detail-stats { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .relatorios-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .exc-detail-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MENU RECOLHIVEL (desktop) =====
   Nada de novo no menu: as MESMAS opcoes, so mais estreitas. A largura
   inteira sai de --sidebar-w, que .sidebar e .main-wrapper ja usam, entao
   redefinir a variavel no <body> move os dois de uma vez.
   O texto some com font-size:0 porque o rotulo e um no de texto solto
   dentro do <a>, sem elemento proprio para esconder. */
body.menu-recolhido { --sidebar-w: 62px; }
body.menu-recolhido .sidebar-brand    { padding: 20px 0 16px; text-align: center; }
body.menu-recolhido .brand-text       { font-size: 0; }
body.menu-recolhido .brand-text b::after { content: 'iG'; font-size: 17px; color: #fff; }
body.menu-recolhido .nav-item {
  font-size: 0; gap: 0; justify-content: center;
  padding: 12px 0; border-left-width: 3px;
}
body.menu-recolhido .nav-item svg      { width: 20px; height: 20px; }
body.menu-recolhido .nav-ext-ico       { display: none; }
body.menu-recolhido .nav-novo-dot      { right: 12px; top: 8px; }
body.menu-recolhido .sidebar-footer    { font-size: 0; padding: 14px 0; justify-content: center; }
body.menu-recolhido .sidebar-footer small { font-size: 10px; }
body.menu-recolhido .license-sidebar   { display: none; }
/* Rotulo flutuante ao passar o mouse: sem ele o menu recolhido vira
   adivinhacao de icone. */
body.menu-recolhido .nav-item::after {
  content: attr(data-tip);
  position: absolute; left: calc(var(--sidebar-w) + 6px);
  background: var(--dark); color: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  padding: 6px 10px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .12s;
  z-index: 200;
}
body.menu-recolhido .nav-item { position: relative; }
body.menu-recolhido .nav-item:hover::after { opacity: 1; }

.menu-recolher {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--gray); cursor: pointer;
}
.menu-recolher:hover { background: var(--bg); color: var(--dark); }
.menu-recolher svg { width: 18px; height: 18px; fill: currentColor; transition: transform .2s; }
body.menu-recolhido .menu-recolher svg { transform: rotate(180deg); }
@media (min-width: 769px) { .menu-recolher { display: flex; } }
/* No celular o menu ja e uma gaveta: recolher nao faz sentido e nao pode
   estragar o layout existente. */
@media (max-width: 768px) {
  body.menu-recolhido { --sidebar-w: 220px; }
  body.menu-recolhido .nav-item { font-size: 14px; gap: 10px; justify-content: flex-start; padding: 10px 20px; }
  body.menu-recolhido .nav-item::after { display: none; }
  body.menu-recolhido .brand-text { font-size: 20px; }
  body.menu-recolhido .brand-text b::after { content: none; }
  body.menu-recolhido .sidebar-footer { font-size: 13px; padding: 16px 20px; justify-content: space-between; }
  body.menu-recolhido .license-sidebar { display: block; }
}
@media print { .menu-recolher { display: none !important; } }

/* ===== OVERLAY SIDEBAR (mobile) ===== */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(23,32,51,.4); z-index: 99; }
.sidebar-overlay.visible { display: block; }

/* ===== MISC ===== */
.text-gray   { color: var(--gray); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-orange { color: var(--orange); }
.text-blue   { color: var(--blue); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; justify-content: center; }

/* ===== FORM SECTIONS ===== */
.form-section-title {
  font-size: 12px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 12px;
}

/* ===== RESERVA GRUPOS ===== */
.reserva-grupo { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.reserva-grupo-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; background: var(--bg); gap: 12px; }
.reserva-grupo-header:hover { background: #edf0f5; }
.reserva-grupo-body { padding: 0 0 8px; }

/* ===== PLANNER STYLES ===== */
.planner-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.planner-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.planner-steps { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.planner-step {
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  background: var(--bg); color: var(--gray); border: 1px solid var(--border); cursor: pointer;
  transition: all .15s;
}
.planner-step.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.planner-step.done { background: var(--green-light); color: #166534; border-color: #86EFAC; }
.sim-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sim-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, transform .1s; }
.sim-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sim-card-header { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; }
.sim-card-color { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.sim-card-info { flex: 1; }
.sim-card-nome { font-size: 15px; font-weight: 700; }
.sim-card-body { padding: 12px 18px; }
.sim-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--gray); padding: 4px 0; }
.sim-row span:last-child { font-weight: 600; color: var(--dark); }
.sim-card-footer { padding: 12px 18px; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.result-status-bar { border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.result-bar-green  { background: var(--green-light); }
.result-bar-yellow { background: var(--yellow-light); }
.result-bar-red    { background: var(--red-light); }
.result-status-icon { font-size: 24px; flex-shrink: 0; }
.result-status-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.result-status-msg { font-size: 14px; }
.result-detail-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.result-detail-row:last-child { border-bottom: none; }
.plano-final-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.plano-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--gray); }
.plano-nome { font-size: 24px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 6px; }
.plano-meta { font-size: 14px; color: var(--gray); margin-bottom: 16px; }
.plano-obs { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14px; margin: 16px 0; }
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.checklist-item:hover { background: var(--bg); }
.checklist-item input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

/* ===== DASHBOARD ===== */
.dash-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.dash-title { font-size: 26px; font-weight: 700; color: var(--dark); letter-spacing: -.5px; }
.dash-sub   { font-size: 13px; color: var(--gray); margin-top: 3px; }

/* KPI row */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.dash-kpi {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .1s;
  cursor: default;
}
.dash-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dash-kpi-lucro {
  background: linear-gradient(135deg, var(--blue) 0%, #1a6fd4 100%);
  border-color: var(--blue);
}
.dash-kpi-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-kpi-icon svg { width: 18px; height: 18px; fill: currentColor; }
.dash-kpi-body { display: flex; flex-direction: column; gap: 3px; }
.dash-kpi-val  { font-size: 20px; font-weight: 700; color: var(--dark); letter-spacing: -.4px; line-height: 1.1; }
.dash-kpi-currency { font-size: clamp(13px,1.3vw,19px); }
.dash-kpi-lbl  { font-size: 11px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: .4px; }
.dash-kpi-trend { font-size: 11px; font-weight: 500; margin-top: auto; }
.trend-green  { color: #16A34A; }
.trend-orange { color: var(--orange); }
.trend-blue   { color: var(--blue); }
.trend-gray   { color: var(--gray); }

/* Chart row */
.dash-charts-row {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 16px;
  margin-bottom: 20px;
}
.dash-chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.dash-chart-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.dash-chart-title  { font-size: 14px; font-weight: 700; color: var(--dark); }
.dash-chart-sub    { font-size: 12px; color: var(--gray); margin-top: 2px; }
.dash-chart-wide   { /* takes 1fr = majority */ }

/* Bottom row */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.dash-section-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

/* Próximas excursões row */
.dash-exc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s;
  border-radius: 4px; margin: 0 -4px; padding-left: 4px; padding-right: 4px;
}
.dash-exc-row:hover { background: var(--bg); }
.dash-exc-row:last-child { border-bottom: none; }
.dash-exc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Responsive dashboard */
@media (max-width: 1100px) {
  .dash-kpi-row    { grid-template-columns: repeat(3, 1fr); }
  .dash-charts-row { grid-template-columns: 1fr 1fr; }
  .dash-chart-wide { grid-column: 1 / -1; }
  .dash-bottom-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .dash-kpi-row    { grid-template-columns: repeat(2, 1fr); }
  .dash-charts-row { grid-template-columns: 1fr; }
  .dash-bottom-row { grid-template-columns: 1fr; }
  .dash-kpi-val    { font-size: 17px; }
}
@media (max-width: 480px) {
  .dash-kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ===== BACKUP SISTEMA ===== */

/* Indicador no topbar */
.bkp-indicator {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: opacity .15s;
}
.bkp-indicator:hover { opacity: .8; }
.bkp-indicator::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; flex-shrink:0; }
.bkp-ok      { background:#DCFCE7; color:#16A34A; }
.bkp-atencao { background:#FEF9C3; color:#A16207; }
.bkp-risco   { background:#FFEDD5; color:#C2410C; }
.bkp-critico { background:#FEE2E2; color:#B91C1C; }

/* Lista de histórico */
.backup-hist-list { display: flex; flex-direction: column; gap: 8px; }
.backup-hist-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); transition: box-shadow .15s;
}
.backup-hist-item:hover { box-shadow: var(--shadow); }
.backup-hist-main  { flex: 1; min-width: 0; }
.backup-hist-nome  { font-size: 13px; font-weight: 600; color: var(--dark); word-break: break-all; margin-bottom: 6px; }
.backup-hist-meta  { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.backup-hist-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-thumb {
  position: absolute; inset: 0; background: #D1D5DB;
  border-radius: 22px; cursor: pointer; transition: background .2s;
}
.toggle-thumb::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.toggle-switch input:checked + .toggle-thumb { background: var(--green); }
.toggle-switch input:checked + .toggle-thumb::before { transform: translateX(18px); }

/* ===== PARCELAS ===== */
.parcelas-preview {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
  margin-top: 4px;
}
.parcelas-title { font-size: 12px; font-weight: 600; color: var(--gray); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.parcela-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border);
  gap: 8px;
}
.parcela-row:last-child { border-bottom: none; }
.parcela-row span:nth-child(2) { font-variant-numeric: tabular-nums; }
.parcela-row span:last-child { color: var(--gray); font-size: 12px; }

/* ===== MODAL FORM SECTIONS (card-style) ===== */
.form-section {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px 8px;
  margin-bottom: 16px;
}
.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.form-section-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(20,83,155,.12);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.form-section-icon svg {
  width: 17px; height: 17px;
  fill: currentColor;
}
.form-section.section-highlight .form-section-icon {
  background: rgba(20,83,155,.12);
  color: var(--blue);
}
.form-section.section-money .form-section-icon {
  background: rgba(22,163,74,.12);
  color: #16A34A;
}
.form-section.section-parcela .form-section-icon {
  background: rgba(161,98,7,.12);
  color: #A16207;
}
.form-section.section-status .form-section-icon {
  background: rgba(100,100,100,.1);
  color: var(--gray);
}
.form-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: .2px;
}
.form-section-sub {
  font-size: 11px;
  color: var(--gray);
  margin-top: 1px;
}
.form-section.section-highlight {
  border-color: var(--blue);
  background: rgba(20,83,155,.04);
}
.form-section.section-highlight .form-section-icon {
  background: var(--blue);
}
.form-section.section-money {
  border-color: #16A34A;
  background: rgba(22,163,74,.04);
}
.form-section.section-money .form-section-icon {
  background: #16A34A;
}
.form-section.section-parcela {
  border-color: var(--gold);
  background: rgba(242,184,7,.06);
}
.form-section.section-parcela .form-section-icon {
  background: #A16207;
}
/* Busca cliente — destaque */
.cliente-search-box {
  background: linear-gradient(135deg, rgba(20,83,155,.07) 0%, rgba(20,83,155,.03) 100%);
  border: 2px dashed rgba(20,83,155,.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.cliente-search-box label {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Modal cliente — seção do histórico mais limpa */
.modal-cliente-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-cliente-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.modal-cliente-header h4 svg {
  width: 16px; height: 16px;
  fill: var(--blue);
  flex-shrink: 0;
}
.cliente-search-box label svg {
  width: 15px; height: 15px;
  fill: var(--blue);
  flex-shrink: 0;
}
/* valor-final destaque */
.valor-final-destaque {
  background: rgba(20,83,155,.06);
  border: 1.5px solid rgba(20,83,155,.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  text-align: center;
}

/* ===== LOADING OVERLAY ===== */
#loadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(23,32,51,.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#loadingOverlay.visible { display: flex; }
.loading-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(20,83,155,.18);
  font-size: 14px;
  color: var(--blue);
  font-weight: 500;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(20,83,155,.15);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ===== RODAPÉ DE LICENÇA ===== */
.license-footer-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #EDF2F8;
  border-top: 1px solid rgba(20,83,155,.15);
  color: rgba(20,83,155,.7);
  font-size: 11px;
  text-align: center;
  padding: 4px 16px;
  z-index: 100;
  pointer-events: none;
  font-weight: 500;
  letter-spacing: .2px;
}
/* ── CAMPO DE MOEDA (máscara BR) ───────────────────────────────────── */
.moeda-wrap { position: relative; width: 100%; }
.moeda-wrap .moeda-prefixo {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 600; color: #8a93a3;
  pointer-events: none; z-index: 1;
}
.moeda-wrap .moeda-input {
  padding-left: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.moeda-wrap .moeda-input[readonly] { background: var(--light); cursor: default; }
/* O valor final tem prefixo próprio no destaque; mantém centralizado */
.valor-final-destaque.moeda-input { text-align: center; padding-left: 13px; }

/* Mobile: teclado numérico ocupa a tela — campo maior e alvo de toque folgado */
@media (max-width: 480px) {
  .moeda-wrap .moeda-input { font-size: 16px; padding-top: 11px; padding-bottom: 11px; }
  .moeda-wrap .moeda-prefixo { font-size: 13px; }
}
/* ── EXCLUSÃO DE CLIENTES (seleção em lote) ──────────────────────────── */
.cli-check-cell {
  width: 36px;
  text-align: center;
  padding-left: 8px !important;
  padding-right: 4px !important;
}
.cli-check-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--blue);
  margin: 0;
  vertical-align: middle;
}
.cli-check-lock {
  font-size: 11px;
  opacity: .28;
  user-select: none;
  line-height: 1;
}
.cli-btn-del {
  color: var(--red);
  border-color: #F5C6C2;
}
.cli-btn-del:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.cli-barra-lote {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 30;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  box-shadow: 0 -2px 14px rgba(16, 24, 40, .10);
}
.cli-barra-lote.ativa { display: flex; }
#cliBarraTexto {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.cli-barra-acoes {
  display: flex;
  gap: 8px;
}
.cli-btn-del-lote {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
}
.cli-btn-del-lote:hover { filter: brightness(.92); }

@media (max-width: 768px) {
  .cli-barra-lote {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    margin-top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #cliBarraTexto { text-align: center; }
  .cli-barra-acoes > .btn { flex: 1; }
}

/* ── VENDEDORES (ranking) ────────────────────────────────────────────── */
.vnd-pos {
  text-align: center;
  white-space: nowrap;
  color: var(--gray, #667085);
}
.vnd-medalha { font-size: 15px; line-height: 1; }
.vnd-num {
  font-size: 12px;
  font-weight: 700;
  margin-left: 2px;
}
.vnd-num.vnd-podio { color: var(--blue); }
.vnd-barra {
  height: 3px;
  border-radius: 2px;
  background: #EAECF0;
  margin-top: 5px;
  overflow: hidden;
  min-width: 60px;
}
.vnd-barra > span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--blue);
}
.vnd-sem td { background: #FAFBFC; }
.vnd-sem .vnd-pos { opacity: .4; }
.vnd-aviso {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FFF8E6;
  border: 1px solid #F5DFA0;
  font-size: 13px;
  color: #7A5C00;
}

@media (max-width: 768px) {
  .vnd-barra { min-width: 40px; }
  .vnd-medalha { font-size: 13px; }
}

/* Vendedor desativado — visível, opaco, reativável */
.vnd-inativo td { opacity: .5; background: #FCFCFD; }
.vnd-inativo td:last-child { opacity: 1; }
.vnd-inativo b { text-decoration: line-through; text-decoration-thickness: 1px; }
.vnd-inativo .vnd-barra > span { background: var(--gray, #98A2B3); }
.vnd-tag-inativo {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 20px;
  background: #EAECF0;
  color: #667085;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  vertical-align: middle;
}
.vnd-btn-reativar {
  background: #E7F5EC;
  color: #127A3D;
  border: 1px solid #B7E4C7;
}
.vnd-btn-reativar:hover { background: #127A3D; border-color: #127A3D; color: #fff; }

/* Aviso no select de vendedor (form do passageiro) */
.vnd-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--gray, #667085);
}

/* ── DASHBOARD: filtro de período ────────────────────────────────────── */
.dash-periodo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.dash-periodo-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
  padding: 4px;
}
.dash-per-btn {
  border: none;
  background: transparent;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray, #667085);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.dash-per-btn:hover { background: var(--bg, #F6F8FB); color: var(--dark, #101828); }
.dash-per-btn.ativo { background: var(--blue); color: #fff; }
.dash-per-btn.ativo:hover { background: var(--blue); color: #fff; }
.dash-periodo-info {
  font-size: 12px;
  color: var(--gray, #667085);
}
.dash-periodo-info b { color: var(--dark, #101828); }

@media (max-width: 768px) {
  .dash-periodo { flex-direction: column; align-items: stretch; }
  .dash-periodo-btns { justify-content: space-between; }
  .dash-per-btn { flex: 1; text-align: center; padding: 8px 6px; font-size: 12px; }
  .dash-periodo-info { text-align: center; }
}

/* Aviso de período sem movimento */
.dash-per-vazio {
  margin: -6px 0 18px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #FFF8E6;
  border: 1px solid #F5DFA0;
  font-size: 12.5px;
  color: #7A5C00;
}
.dash-per-vazio b { color: #5C4600; }
.btn-link-inline {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}

/* KPI: rótulo em uma linha só — trava contra quebra em qualquer idioma/texto */
.dash-kpi-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── AUDITORIA: candidatos de valor a restaurar ─────────────────────── */
.aud-cand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 9px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.aud-cand:hover { border-color: var(--blue); background: #FAFCFF; }
.aud-cand input[type="radio"] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.aud-cand:has(input:checked) { border-color: var(--blue); background: #F4F8FD; }
.aud-cand-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aud-cand-val { font-size: 15px; color: var(--dark, #101828); }
.aud-cand-lbl { font-size: 12.5px; font-weight: 600; color: #475467; }
.aud-cand-obs { font-size: 11.5px; color: var(--gray, #667085); line-height: 1.4; }

/* ── CONFIG: taxas de cartão ─────────────────────────────────────────── */
.tx-modo-opts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tx-modo {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .12s, background .12s;
}
.tx-modo:hover { border-color: var(--blue); }
.tx-modo.ativo { border-color: var(--blue); background: #F4F8FD; }
.tx-modo input[type="radio"] {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.tx-modo-obs {
  font-size: 11.5px;
  color: var(--gray, #667085);
  line-height: 1.45;
}
#tabelaTaxas th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--gray, #667085);
}
#tabelaTaxas td { padding: 6px 8px; }

/* ── Busca de titular (dependentes/acompanhantes) ───────────────────── */
.busca-titular-res { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.busca-titular-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; padding: 8px 10px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--dark);
}
.busca-titular-item:hover { background: #EFF6FF; border-color: var(--blue); }
.busca-titular-item span { font-size: 11px; color: var(--gray); }
.busca-titular-vazio { margin-top: 6px; font-size: 12px; color: var(--gray); }

/* ── Categorias de custo (Configurações) ────────────────────────────── */
.cat-lista { display: flex; flex-direction: column; gap: 6px; }
.cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; font-size: 14px;
}
.cat-nome { flex: 1; font-weight: 500; }
.cat-uso  { font-size: 11px; color: var(--gray); }
.cat-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .3px; color: #667085; background: #EAECF0;
  padding: 2px 7px; border-radius: 20px;
}
.cat-btn-del { background: #FEE2E2; color: #B91C1C; }
.cat-btn-del:hover { background: #B91C1C; color: #fff; }

/* ── Falha ao abrir o banco (outra aba segurando a versão) ──────────── */
.db-bloqueado {
  max-width: 480px; margin: 64px auto; padding: 28px;
  text-align: center; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fff;
}
.db-bloqueado h2 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.db-bloqueado p  { font-size: 14px; color: var(--gray); line-height: 1.5; margin-bottom: 18px; }



/* ═══ TOOLBAR DE LISTAGEM ═════════════════════════════════════════════
   Duas faixas: busca em cima ocupando a largura toda (é a ação mais
   frequente), filtros e botões dividindo a faixa de baixo. Antes tudo
   disputava a mesma linha e o último filtro caía solto no canto. */
.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.toolbar-busca { width: 100%; }
.toolbar-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.toolbar-filtros { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 300px; min-width: 0; }
.toolbar-filtros > .form-control { flex: 0 1 200px; min-width: 150px; }
.toolbar-acoes { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ═══ HOSPEDAGEM / ROOMING LIST ═══════════════════════════════════════ */
.hosp-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.hosp-nome { font-size: 18px; font-weight: 700; color: var(--dark); margin: 0 0 3px; }
.hosp-meta { font-size: 12px; color: var(--gray); line-height: 1.5; }
.hosp-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.hosp-sep { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* Painel de quem ainda não tem quarto — o que falta resolver fica à vista */
.sem-quarto-box {
  border: 1px solid #FEC84B; background: #FFFCF5;
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px;
}
.sem-quarto-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sem-quarto-lista { display: flex; flex-wrap: wrap; gap: 6px; }
.sem-quarto-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; font-size: 13px; font-family: inherit; color: var(--dark);
  cursor: pointer;
}
.sem-quarto-item:hover { border-color: var(--blue); background: #EFF6FF; }

/* Cartões de quarto: a cor da borda dá o estado sem precisar ler número */
.quartos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.quarto-card {
  border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: var(--radius); background: #fff; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.quarto-vazio    { color: var(--gray); font-size: 13px; font-style: italic; }
.quarto-card.quarto-vazio    { border-left-color: #D0D5DD; }
.quarto-card.quarto-parcial  { border-left-color: #F79009; }
.quarto-card.quarto-cheio    { border-left-color: var(--green); }
.quarto-card.quarto-excedido { border-left-color: var(--red); background: #FFFBFA; }

.quarto-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.quarto-tipo { display: block; font-size: 11px; color: var(--gray); margin-top: 2px; }
.quarto-lot  { font-size: 13px; font-weight: 700; color: var(--gray); white-space: nowrap; }
.quarto-ocupantes { display: flex; flex-direction: column; gap: 4px; }
.quarto-pax {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 0; border-bottom: 1px solid #F2F4F7;
}
.quarto-pax:last-child { border-bottom: none; }
.quarto-btn-out { background: transparent; color: var(--gray); padding: 2px 6px; min-height: 0; }
.quarto-btn-out:hover { background: #FEE2E2; color: #B91C1C; }
.quarto-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.quarto-btn-del { background: #FEE2E2; color: #B91C1C; }
.quarto-btn-del:hover { background: #B91C1C; color: #fff; }

/* Escolha de quarto a partir do passageiro */
.quarto-opcoes { display: flex; flex-direction: column; gap: 6px; }
.quarto-opcao {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px;
  align-items: center; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 14px; color: var(--dark); cursor: pointer;
}
.quarto-opcao:hover { border-color: var(--blue); background: #EFF6FF; }
.quarto-opcao-cheio { opacity: .6; }
.quarto-opcao-num  { font-weight: 600; }
.quarto-opcao-tipo { font-size: 12px; color: var(--gray); }
.quarto-opcao-lot  { font-weight: 700; font-size: 13px; }
.quarto-opcao-nomes { grid-column: 1/-1; font-size: 11px; color: var(--gray); }


/* ═══ CENTRAL DE ATUALIZAÇÕES ═════════════════════════════════════════ */
.nov-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--border); background: #fff;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--gray); position: relative;
}
.nov-btn:hover { border-color: var(--blue); color: var(--blue); }
/* Verde enquanto a novidade não foi lida; volta ao neutro depois. Verde
   comunica "tem coisa nova e boa" — azul se confundiria com o resto da
   interface, que já é azul. */
.nov-btn-novo { background: #E7F7EE; border-color: #A6E9C5; color: #067647; font-weight: 700; }
.nov-btn-novo:hover { background: #12B76A; border-color: #12B76A; color: #fff; }
.nov-btn-novo .nov-badge { background: #12B76A; }
.nov-badge {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #F04438; border: 2px solid #fff;
}

.nov-intro {
  font-size: 14px; color: var(--gray); line-height: 1.55;
  margin-bottom: 22px; max-width: 640px;
}
.nov-versao { margin-bottom: 30px; }
.nov-versao-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.nov-versao-tit { font-size: 19px; font-weight: 700; color: var(--dark); line-height: 1.3; }
.nov-versao-sub { font-size: 13px; color: var(--gray); margin-top: 4px; max-width: 560px; line-height: 1.5; }
.nov-versao-tag { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nov-versao-data { font-size: 12px; color: var(--gray); }
.nov-tag-novo {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  background: #12B76A; color: #fff; padding: 3px 9px; border-radius: 20px;
}

.nov-lista { display: flex; flex-direction: column; gap: 8px; }
.nov-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.nov-card-head {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 14px 16px; cursor: pointer; text-align: left;
  background: none; border: none; font-family: inherit; color: var(--dark);
}
.nov-card-head:hover { background: #F8FBFF; }
.nov-icone { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.nov-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nov-card-tit { font-size: 15px; font-weight: 600; line-height: 1.3; }
.nov-card-res { font-size: 13px; color: var(--gray); line-height: 1.45; }
/* A seta é o convite para expandir: precisa ser vista de longe e ter
   área de toque própria. Antes eram 13px de texto solto no canto. */
.nov-seta {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  color: var(--blue); background: #EFF6FF;
  transition: background .15s, color .15s;
}
.nov-card-head:hover .nov-seta { background: var(--blue); color: #fff; }
.nov-card-det {
  padding: 0 16px 16px 48px;
  border-top: 1px solid #F2F4F7; margin-top: -1px; padding-top: 14px;
}
.nov-card-det ul { margin: 0; padding-left: 18px; }
.nov-card-det li { font-size: 13px; color: var(--gray); line-height: 1.6; margin-bottom: 7px; }
.nov-card-det li:last-child { margin-bottom: 0; }
.nov-card-det b { color: var(--dark); }

.nov-rodape {
  font-size: 13px; color: var(--gray); text-align: center;
  padding: 20px 0 8px; border-top: 1px solid var(--border);
}


/* ═══ ABA DE ASSENTOS ═════════════════════════════════════════════════ */
.seat-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }

.seat-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.seat-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.seat-ctrl { display: flex; flex-direction: column; gap: 3px; }
.seat-ctrl label { font-size: 11px; color: var(--gray); font-weight: 500; }
.seat-ctrl .form-control { min-height: 36px; padding: 6px 9px; font-size: 13px; width: 78px; }
.seat-ctrl-wide .form-control { width: auto; min-width: 210px; }
.seat-check {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; color: var(--gray); padding-bottom: 8px; white-space: nowrap;
}
.seat-check input { width: 16px; height: 16px; cursor: pointer; }


/* Licença na base do menu — usada apenas no celular */
.license-sidebar { display: none; }

/* ═══ NAVEGAÇÃO DE RODAPÉ (celular) ═══════════════════════════════════
   Oculta por padrão; aparece só abaixo de 768px. Leva os destinos mais
   usados para a área que o polegar alcança sem reposicionar a mão. */
.bottomnav { display: none; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVO — CELULAR E TABLET
   Tudo dentro de media query: acima de 768px nada muda.
   Princípio: uma coluna, hierarquia clara, nada espremido lado a lado.
   Tabelas mantêm a forma de tabela e rolam na horizontal — comparar
   passageiros linha a linha é mais rápido do que ler cartões empilhados.
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Contenção: nada pode ultrapassar a largura da tela ─────────── */
  html, body { max-width: 100%; overflow-x: hidden; }
  .main-wrapper, .content { max-width: 100%; min-width: 0; }
  img, canvas, svg, video { max-width: 100%; }
  /* Palavra longa (e-mail, código) não estica mais o layout inteiro */
  .content, .card, .stat-card, .dash-kpi { overflow-wrap: anywhere; }

  /* ── Uma coluna. Formulário lado a lado em 396px é ilegível ─────── */
  .form-row { grid-template-columns: 1fr !important; }

  /* Grades escritas em style="" direto no JS (modais de cliente, de
     pagamentos, cartões do Planejador). Três ou mais colunas em 370px
     quebram o número no meio — "R$ 2.100,0 / 0". Caem para duas. */
  [style*="grid-template-columns:repeat(3"]:not(.seat-row),
  [style*="grid-template-columns:repeat(4"]:not(.seat-row),
  [style*="grid-template-columns:repeat(5"]:not(.seat-row),
  [style*="grid-template-columns: repeat(3"]:not(.seat-row),
  [style*="grid-template-columns: repeat(4"]:not(.seat-row),
  [style*="grid-template-columns: repeat(5"]:not(.seat-row),
  [style*="grid-template-columns:1fr 1fr 1fr"]:not(.seat-row) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Painéis com coluna lateral fixa (1fr 320px) empilham.
     `.seat-row` fica de fora: a fileira de assentos é 1fr 1fr 26px 1fr 1fr
     e casaria com o seletor abaixo, achatando o mapa do ônibus em uma
     coluna. O desenho do veículo precisa manter a forma em qualquer tela. */
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns:1fr 280px"],
  [style*="grid-template-columns:1fr 1fr"]:not([style*="1fr 1fr 1fr"]):not(.seat-row) {
    grid-template-columns: 1fr !important;
  }

  /* Valor monetário nunca quebra no meio do número. O tamanho só é
     reduzido dentro de modais, onde a coluna é estreita — os KPIs do
     dashboard continuam grandes, que é a leitura principal da tela. */
  .stat-value, .dash-kpi-val, .sv-currency { white-space: nowrap; }
  .stat-card { padding: 10px 12px; }
  .stat-label { font-size: 10px; line-height: 1.3; letter-spacing: .2px; }
  .modal .stat-value,
  .modal-body .stat-value { font-size: 15px !important; }
  .modal .stat-card,
  .modal-body .stat-card { padding: 8px 10px; text-align: left; }
  .dash-charts-row,
  .dash-bottom-row,
  .sim-cards-grid,
  .relatorios-grid,
  .excursoes-grid { grid-template-columns: 1fr !important; }
  /* Cartões de número ficam em 2 colunas: cabem lado a lado e evitam
     uma coluna interminável de rolagem só para ver os totais. */
  .stats-grid,
  .dash-kpi-row,
  .exc-detail-stats { grid-template-columns: repeat(2, 1fr) !important; }
  /* Com metade da largura o valor precisa encolher para não quebrar.
     Medido para caber "R$ 1.236.665,26" num aparelho de 390px. */
  .dash-kpi { padding: 12px 13px; gap: 8px; }
  .dash-kpi-val { font-size: 18px; letter-spacing: -.5px; }
  .dash-kpi-currency { font-size: 17px; }
  .dash-kpi-icon { width: 30px; height: 30px; }
  .dash-kpi-icon svg { width: 15px; height: 15px; }
  .dash-kpi-lbl { font-size: 10px; letter-spacing: .3px; }
  .dash-kpi-trend { font-size: 10px; }

  /* ── Botões de sistema: hambúrguer e fechar ─────────────────────
     Os dois são os controles mais tocados do app e os menores da tela:
     o menu tinha ~30px de alvo e o X do modal ~26px. Ambos passam a 44px,
     o mínimo confortável para o dedo, sem mudar o desenho do ícone. */
  .menu-toggle {
    width: 44px; height: 44px;
    /* Sem isto o flex encolhe o botão quase a zero quando a topbar tem
       muitas ações (Backup, Exportar, Editar, Excluir na tela da
       excursão) — o menu some justamente onde mais se precisa dele. */
    flex-shrink: 0;
    margin-left: -8px;            /* mantém o alinhamento óptico à borda */
    padding: 0;
    align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--bg);
  }
  .menu-toggle svg { width: 26px; height: 26px; }
  .menu-toggle:active { background: rgba(16,24,40,.06); }

  .modal-close {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    font-size: 24px;
    margin-right: -6px;
  }
  .modal-close:active { background: var(--bg); color: var(--dark); }

  /* ── Topbar: título não pode empurrar os botões ─────────────────── */
  .topbar { padding: 0 12px; gap: 10px; }
  #topbarTitle {
    flex: 1 1 auto; min-width: 0;
    font-size: 16px; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* Na tela da excursão o título fica vazio (o nome está no cabeçalho
     colorido). Sem conteúdo ele não deve reservar espaço. */
  #topbarTitle:empty { flex: 0 0 0; margin: 0; }
  /* As ações rolam lateralmente em vez de espremer o resto da barra. */
  #topbarActions {
    display: flex; gap: 6px; min-width: 0;
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  #topbarActions::-webkit-scrollbar { display: none; }
  #topbarActions .btn { padding: 8px 10px; font-size: 12px; min-height: 36px; flex-shrink: 0; white-space: nowrap; }
  #backupIndicator, #novidadesIndicator { flex-shrink: 0; }

  /* ── Abas rolam em vez de quebrar ───────────────────────────────── */
  .tabs, .planner-steps, .dash-periodo-btns {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar,
  .planner-steps::-webkit-scrollbar,
  .dash-periodo-btns::-webkit-scrollbar { display: none; }
  .tab-btn, .planner-step, .dash-per-btn { flex-shrink: 0; white-space: nowrap; }

  /* ── Cabeçalhos empilham, botões dividem a linha ────────────────── */
  .page-header, .dash-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-header > div:last-child,
  .dash-header > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-header > div:last-child .btn,
  .dash-header  > div:last-child .btn { flex: 1 1 auto; justify-content: center; }

  /* Mesmo cuidado da toolbar: em coluna o flex-basis de 150/220px do
     desktop viraria altura e esticaria cada campo. */
  .filter-bar { flex-direction: column; gap: 8px; }
  .filter-bar > .form-control,
  .filter-bar > .search-input,
  .filter-bar select {
    flex: 0 0 auto !important;
    max-width: 100% !important; width: 100%;
    min-height: 44px; height: 44px;
  }
  .filter-bar textarea.form-control { height: auto; }

  /* Toolbar no celular: cada faixa vira uma coluna. Os botões dividem a
     largura entre si em vez de estourar para fora da tela. */
  /* Em coluna, o `flex-basis` passa a valer para a ALTURA: o
     `flex: 1 1 300px` do desktop esticava cada select para ~150px de
     altura. No celular os itens usam a altura natural. */
  .toolbar-row { flex-direction: column; align-items: stretch; }
  .toolbar-filtros { flex-direction: column; flex: 0 0 auto; }
  .toolbar-filtros > .form-control {
    flex: 0 0 auto; max-width: none; width: 100%;
    min-height: 44px; height: 44px;
  }
  .toolbar-acoes { width: 100%; }
  .toolbar-acoes .btn { flex: 1 1 auto; justify-content: center; min-width: 120px; }

  /* ── Alvos de toque ─────────────────────────────────────────────── */
  .btn { min-height: 42px; padding: 10px 16px; }
  .btn-sm { min-height: 38px; padding: 8px 12px; font-size: 13px; }
  /* Exceção: botão dentro de <label> é controle auxiliar (toggle R$ / %).
     Com 38px de altura ele empurrava o rótulo e desalinhava o campo. */
  label .btn, label .btn-sm {
    min-height: 26px !important;
    padding: 3px 10px !important;
    font-size: 12px !important;
  }
  /* Rótulo com controle à direita: respiro entre texto e botões */
  .form-label[style*="space-between"] { gap: 12px; align-items: center; }
  .form-label[style*="space-between"] > span { flex-shrink: 0; }
  .form-control, select.form-control, input.form-control {
    min-height: 44px;
    font-size: 16px;   /* < 16px faz o iOS dar zoom ao focar */
  }
  textarea.form-control { min-height: 80px; }

  /* ── Gráficos dentro do cartão ──────────────────────────────────── */
  .dash-chart-card { overflow: hidden; }
  .dash-chart-card canvas { max-width: 100%; height: auto; }

  /* ── Tabelas: forma preservada, rolagem lateral ─────────────────── */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  .table-wrapper table { min-width: 620px; }
  th, td { white-space: nowrap; }
  .td-actions { white-space: nowrap; }

  /* Primeira coluna ancorada: ao arrastar para o lado, o nome continua
     visível. Sem isso o usuário rola até a coluna Saldo e já não sabe
     de quem é a linha — é o problema clássico de tabela no celular. */
  .table-wrapper table th:first-child,
  .table-wrapper table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    white-space: normal;
    min-width: 148px;
    max-width: 190px;
    box-shadow: 1px 0 0 var(--border), 6px 0 8px -6px rgba(16,24,40,.18);
  }
  .table-wrapper table thead th:first-child { z-index: 3; background: var(--bg); }
  .table-wrapper table tbody tr:hover td:first-child { background: #F9FAFB; }
  /* Coluna de seleção é estreita e não deve ficar ancorada */
  .table-wrapper table td.cli-check-cell,
  .table-wrapper table th.cli-check-cell {
    min-width: 0; max-width: none;
    box-shadow: none;
  }
  /* Texto auxiliar sob o nome (telefone, parcela vencida) fica contido */
  .table-wrapper table td:first-child > div,
  .table-wrapper table td:first-child span { max-width: 100%; }

  /* ── Modais em tela cheia ───────────────────────────────────────── */
  .modal-overlay { padding: 0 !important; align-items: stretch !important; }
  .modal, .modal-xl, .modal-lg {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .modal-body { max-height: calc(100vh - 132px) !important; padding: 16px 14px !important; }
  .modal-header { padding: 10px 14px !important; gap: 10px; }
  .modal-header h3, .modal-header > *:first-child {
    flex: 1; min-width: 0;
    font-size: 16px; line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .modal-footer { position: sticky; bottom: 0; background: #fff; padding: 12px 14px !important; }

  /* Seções do formulário: respiro entre blocos, sem aperto interno */
  .form-section { padding: 14px 12px; }
  .form-section-header { gap: 10px; margin-bottom: 12px; }
  .form-group { margin-bottom: 14px; }
  .form-label { font-size: 13px; margin-bottom: 6px; }
  .form-hint { font-size: 12px; line-height: 1.4; }

  /* Campo de dinheiro: prefixo e valor alinhados na mesma linha */
  .moeda-wrap { display: flex; align-items: center; }
  .moeda-prefixo { flex-shrink: 0; }
  .moeda-input { flex: 1; min-width: 0; }

  /* ── Barra de navegação no rodapé ───────────────────────────────── */
  .bottomnav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(16,24,40,.06);
    /* Respeita a faixa de gestos do iPhone */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bottomnav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    padding: 7px 2px 6px; min-height: 54px;
    background: none; border: none; cursor: pointer;
    font-family: inherit; font-size: 10px; font-weight: 600;
    color: var(--gray); letter-spacing: .1px;
  }
  .bottomnav-item svg { width: 21px; height: 21px; fill: currentColor; }
  .bottomnav-item.ativo { color: var(--blue); }
  .bottomnav-item:active { background: var(--bg); }

  /* O indicador de novidades sai do topo: ali disputa espaço com Backup,
     Exportar, Editar e Excluir, e já existe no menu lateral. */
  .nov-btn { display: none !important; }

  /* ── Rodapé de licença: menor, mas continua FIXO ────────────────── */
  /* É injetado com body.appendChild e o body é `display:flex`. Tirar o
     position:fixed o torna item flex irmão do conteúdo — o texto longo
     esmaga o .main-wrapper e a tela some. */
  /* A barra flutuante sai de cena: entre ela e a navegação de rodapé,
     sobrava pouca área útil. A licença passa a viver na base do menu,
     continuando visível a um toque. */
  .license-footer-bar { display: none !important; }
  /* Com 13 itens mais a licença, o menu não cabe em telas curtas — a
     lista rola e os blocos do rodapé ficam sempre ancorados. */
  .sidebar-nav { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .license-sidebar, .sidebar-footer { flex-shrink: 0; }
  .sidebar-footer { padding: 10px 20px; }

  .license-sidebar {
    display: block;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.42);
    font-size: 10px; line-height: 1.45; text-align: left;
    overflow-wrap: anywhere;
  }
  .content { padding: 16px 14px 74px; }

  /* Escolha de colunas: 2 por linha no celular */
  .col-grid { grid-template-columns: repeat(2, 1fr); }

  /* ── Atualizações no celular ────────────────────────────────────── */
  /* O rótulo sai e fica só o sino: espaço no topo é disputado. */
  .nov-btn span:not(.nov-badge) { display: none; }
  .nov-btn { padding: 7px 9px; }
  .nov-versao-head { flex-direction: column; gap: 8px; }
  .nov-card-det { padding-left: 20px; }
  .nov-seta { width: 36px; height: 36px; font-size: 22px; }

  /* ── Hospedagem no celular ──────────────────────────────────────── */
  .quartos-grid { grid-template-columns: 1fr !important; }
  .hosp-header { flex-direction: column; align-items: stretch; }
  .hosp-acoes { flex-wrap: wrap; }
  .hosp-acoes .btn { flex: 1 1 auto; justify-content: center; }
  .quarto-acoes .btn { flex: 1 1 auto; justify-content: center; }
  .sem-quarto-item { padding: 9px 14px; font-size: 14px; }

  /* ── Aba de assentos no celular ─────────────────────────────────── */
  /* O resumo desce para baixo do mapa: no celular a informação principal
     é o desenho, não o painel lateral. */
  .seat-layout { grid-template-columns: 1fr !important; gap: 16px; }

  /* Cada controle ocupa a linha inteira, com o rótulo acima do campo —
     lado a lado eles se espremiam e o seletor de formato ficava ilegível. */
  .seat-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .seat-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .seat-ctrl { width: 100%; }
  .seat-ctrl .form-control,
  .seat-ctrl-wide .form-control { width: 100% !important; min-width: 0; min-height: 44px; font-size: 16px; }
  .seat-check { padding: 4px 0 0; white-space: normal; font-size: 13px; }

  /* O mapa cabe na tela: assentos menores e sem largura fixa em px. */
  .seat-map-wrap { padding: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .seat-bus { max-width: 100% !important; }
  .seat-row { gap: 4px; }
  /* Sem teto, um layout 1+1 esticaria cada assento para ~140px e o
     quadrado ficaria maior que o dedo que vai tocá-lo. */
  .seat { font-size: 9px; border-width: 1px; max-width: 72px; margin: 0 auto; }
  .seat span:first-child { font-size: 9px !important; }
  .seat span:last-child  { font-size: 9px !important; }
  .seat-legend { flex-wrap: wrap; gap: 8px; font-size: 11px; }
  .seat-andar { margin: 10px 0 4px; font-size: 11px; }
  .cap-aviso { font-size: 12px; padding: 9px 11px; }

  /* ── Linhas "título à esquerda / ação à direita" ─────────────────
     Todas seguem o mesmo padrão: em tela estreita o texto e o botão
     disputam a linha e um corta o outro. Empilham, com o botão
     alinhado à esquerda para criar uma coluna de leitura única. */
  .modal-cliente-header,
  .dash-chart-header,
  .card-header,
  .backup-hist-item,
  .exc-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .modal-cliente-header .btn,
  .dash-chart-header .btn { align-self: flex-start; }
  .backup-hist-actions { flex-wrap: wrap; }
  .backup-hist-actions .btn { flex: 1 1 auto; }

  /* Cabeçalho de reserva: código e total lado a lado ficam apertados */
  .reserva-grupo-header { flex-wrap: wrap; gap: 8px; }

  /* Auditoria: checkbox, texto e ação numa coluna legível */
  .aud-cand { flex-wrap: wrap; gap: 10px; }
  .aud-cand-body { flex: 1 1 100%; }

  /* Abas de Configurações rolam em vez de quebrar em duas fileiras */
  [data-cfg-tab] { flex-shrink: 0; white-space: nowrap; }

  /* Modo de repasse da taxa: opções empilhadas */
  .tx-modo-opts { flex-direction: column; align-items: stretch; gap: 8px; }

  /* Cartões do Planejador e de excursão */
  .sim-card-header, .sim-card-footer,
  .exc-card-header { flex-wrap: wrap; gap: 8px; }
  .plano-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .result-detail-row, .parcela-row { gap: 10px; }

  /* Seletor de cor não pode transbordar */
  .color-picker-row { flex-wrap: wrap; gap: 8px; }

  /* Checklist: caixa e texto alinhados pelo topo */
  .checklist-item { align-items: flex-start; gap: 10px; }

  /* Cartões de relatório: ícone acima do texto, alvo grande */
  .relatorio-card { padding: 16px 14px; }

  /* Toasts não podem cobrir a tela inteira */
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
}

/* ── Telas estreitas ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Duas colunas também nos aparelhos estreitos — uma só deixava a tela
     longa demais para ler os indicadores. */
  .dash-kpi-row,
  .stats-grid,
  .exc-detail-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-kpi-val { font-size: 17px; }
  .dash-kpi-currency { font-size: 15px; }
  .stat-value { font-size: 17px; }

  .content { padding: 12px 10px 74px; }
  .page-header h1, .dash-title { font-size: 20px; }

  /* Hero da excursão: título grande quebrava sobre os botões */
  .exc-detail-hero { padding: 16px 14px; }
  .exc-detail-hero h1 { font-size: 20px; line-height: 1.25; }
  .exc-detail-hero .sub { font-size: 12px; line-height: 1.5; }

}

/* Marcador de titular da reserva */
.badge-titular {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 20px; background: #EFF6FF; color: #14539B;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  vertical-align: middle;
}
.form-hint.hint-alerta { color: #B54708; font-weight: 500; }

/* ── Dependentes do titular (dentro do cadastro do passageiro) ──────── */
.dep-box {
  border: 1px solid #B2DDFF; background: #F5FAFF;
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px;
}
.dep-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.dep-lista { display: flex; flex-direction: column; }
.dep-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; padding: 6px 0; border-bottom: 1px solid #E0F0FF;
}
.dep-item:last-child { border-bottom: none; }
.dep-nome { min-width: 0; overflow-wrap: anywhere; }
.dep-eu .dep-nome { font-weight: 600; }
.dep-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid #B2DDFF;
  font-size: 13px; color: var(--gray);
}
.dep-total b { font-size: 15px; }

/* Contador de resultados dos filtros */
.filtro-contador {
  font-size: 12px; color: var(--gray);
  margin: -6px 0 10px; min-height: 16px;
}

/* ── Escolha do modo de importação (substituir x combinar) ──────────── */
.imp-resumo {
  font-size: 13px; color: var(--gray); line-height: 1.5;
  padding: 10px 12px; background: var(--bg);
  border-radius: 8px; margin-bottom: 14px;
}
.imp-opcao {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-family: inherit; color: var(--dark);
}
.imp-opcao:hover { border-color: var(--blue); background: #F8FBFF; }
.imp-opcao-tit { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.imp-opcao-txt { font-size: 13px; color: var(--gray); line-height: 1.45; }
.imp-numeros {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--gray);
}
.imp-numeros b { color: var(--dark); font-size: 14px; }
.imp-nota { margin-top: 8px; font-size: 11px; color: var(--gray); line-height: 1.4; }
.imp-opcao-risco:hover { border-color: #F04438; background: #FFFBFA; }
.imp-nota-risco { color: #B42318; font-weight: 500; }

/* ── Escolha de colunas do relatório ────────────────────────────────── */
.col-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.col-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; cursor: pointer; background: #fff;
}
.col-opt:hover { border-color: var(--blue); background: #F8FBFF; }
.col-opt input { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.col-opt-fixa { opacity: .65; cursor: default; background: var(--bg); }
.col-opt-fixa:hover { border-color: var(--border); background: var(--bg); }

/* ── Novidades no menu lateral ──────────────────────────────────────── */
/* A barra é escura, então o verde entra como texto e ponto luminoso —
   fundo verde sólido brigaria com o item ativo. */
.nav-item-novo { color: #6CE9A6 !important; font-weight: 600; }
.nav-item-novo svg { fill: #6CE9A6; }
.nav-item-novo:hover { color: #A6F4C5 !important; }
.nav-novo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #12B76A; margin-left: auto; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(18,183,106,.25);
  animation: navNovoPulse 2.2s ease-in-out infinite;
}
@keyframes navNovoPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(18,183,106,.25); }
  50%      { box-shadow: 0 0 0 5px rgba(18,183,106,.10); }
}
/* Sem novidade o ponto não é renderizado (o JS esconde). */

/* ── Links externos no menu (Tutoriais, Suporte) ────────────────────── */
.nav-sep {
  height: 1px; margin: 10px 16px 8px;
  background: rgba(255,255,255,.12);
}
.nav-item-ext { position: relative; }
.nav-ext-ico {
  margin-left: auto; font-size: 11px; opacity: .5;
}
.nav-item-ext:hover .nav-ext-ico { opacity: 1; }

/* ── Mapa de assentos: topo e corredor ──────────────────────────────── */
.seat-topo {
  background: #e5e7eb; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #555; margin-bottom: 14px;
}
/* No formato de lista não há "frente do veículo" — o rótulo vira neutro */
.seat-topo-lista {
  background: transparent; border: 1px dashed var(--border);
  color: var(--gray); font-weight: 500;
}
.seat-aisle {
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 11px;
}

/* Separador de piso no double decker */
.seat-andar {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 6px; font-size: 12px; font-weight: 700;
  color: var(--gray); text-transform: uppercase; letter-spacing: .5px;
}
.seat-andar::before, .seat-andar::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Aviso de conferência da capacidade do veículo */
.cap-aviso {
  background: #FFFAEB; border: 1px solid #FEC84B;
  border-radius: var(--radius-sm); padding: 10px 13px;
  margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: #93370D;
}
.cap-aviso b { color: #7A2E0E; }

/* ═══ RELATÓRIO NA PRÓPRIA PÁGINA ═════════════════════════════════════
   Usado no celular, onde abrir aba nova é bloqueado, e no computador
   quando o popup é barrado. */
#printOverlay {
  position: fixed; inset: 0; z-index: 400;
  background: #fff; display: flex; flex-direction: column;
}
.print-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: #fff; flex-shrink: 0;
}
.print-titulo {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.print-fechar {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg); border-radius: 8px;
  font-size: 18px; color: var(--gray); cursor: pointer;
}
.print-fechar:active { background: #E4E7EC; }
.print-imprimir {
  flex-shrink: 0; min-height: 40px; padding: 8px 16px;
  border: none; border-radius: 8px; cursor: pointer;
  background: var(--blue); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600;
}
.print-corpo {
  flex: 1; overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 14px 40px; color: #222;
}
/* O conteúdo vem do gerador de PDF e traz medidas de papel */
.print-corpo table { width: 100%; font-size: 12px; }
.print-corpo { font-size: 13px; }

/* Enquanto o relatório está aberto, o app não rola por baixo */
body.com-relatorio { overflow: hidden; }

@media print {
  /* Só o relatório vai para o papel: sem menu, sem barras, sem rodapé
     de navegação. É isto que faz o "Salvar como PDF" do celular sair
     com o documento certo. */
  body.com-relatorio > *:not(#printOverlay) { display: none !important; }
  body.com-relatorio #printOverlay { position: static; }
  body.com-relatorio .print-bar { display: none !important; }
  body.com-relatorio .print-corpo { overflow: visible; padding: 0; }
}