/* ═══════════════════════════════════════════════════════════════
   TAW ERP — Design System compartilhado
   Importe em todos os módulos: <link rel="stylesheet" href="../../shared/taw.css">
═══════════════════════════════════════════════════════════════ */

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

:root {
  --teal:       #00B3A4;
  --teal-dark:  #009688;
  --teal-light: #E0F5F3;
  --black:      #0A0A0A;
  --surface:    #F4F5F7;
  --white:      #FFFFFF;
  --border:     #DFE1E6;
  --border-dark:#C1C7D0;
  --text-1:     #172B4D;
  --text-2:     #5E6C84;
  --text-3:     #97A0AF;
  --error:      #DE350B;
  --error-bg:   #FFEBE6;
  --fs-xs:      11px;
  --fs-sm:      12px;
  --fs-md:      13px;
  --fs-base:    14px;
}

html, body { height: 100%; }
html { overflow-y: auto; scrollbar-gutter: stable; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--surface);
  color: var(--text-1);
  font-size: var(--fs-base);
  line-height: 1.4;
}

/* ══ TOPBAR ══════════════════════════════════════════════════════════════ */
.topbar {
  background: var(--black);
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #1f1f1f;
}
.topbar-logo {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--teal);
  letter-spacing: -1px;
  line-height: 1;
  text-decoration: none;
}
.topbar-divider {
  width: 1px; height: 20px;
  background: #2a2a2a;
}
.topbar-module {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #888;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar-nav a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #666;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: .3px;
  transition: color .12s, background .12s;
}
.topbar-nav a:hover   { color: #ccc; background: #1a1a1a; }
.topbar-nav a.active  { color: var(--teal); }
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-badge {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: var(--text-3);
  font-size: var(--fs-xs);
  padding: 3px 9px;
  border-radius: 3px;
  font-weight: 500;
}

/* ══ LAYOUT ══════════════════════════════════════════════════════════════ */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

/* ══ PAGE TITLE ══════════════════════════════════════════════════════════ */
.page-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.page-title h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.3px;
}
.page-title span {
  font-size: var(--fs-sm);
  color: var(--text-3);
}

/* ══ PANEL ═══════════════════════════════════════════════════════════════ */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden; /* sem isso o fundo do .panel-header ultrapassa o canto arredondado */
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  /* Dentro de um container flex (caso do .modal-body), overflow != visible faz
     o min-height automático virar 0 — sem isto o card encolhe e corta o
     conteúdo em vez de manter o tamanho natural. */
  flex-shrink: 0;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #FAFBFC;
}
.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-indicator {
  width: 3px;
  height: 14px;
  background: var(--teal);
  border-radius: 2px;
}
.panel-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.panel-body { padding: 16px; }

/* ══ FORM GRID ═══════════════════════════════════════════════════════════ */
.form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.form-row:last-child { margin-bottom: 0; }
.fr-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
.fr-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.fr-3 { grid-template-columns: 1fr 1fr 1fr; }
.fr-2 { grid-template-columns: 1fr 1fr; }
.fr-1 { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

@media (max-width: 900px) {
  .fr-5, .fr-4 { grid-template-columns: 1fr 1fr; }
  .fr-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fr-5, .fr-4, .fr-3, .fr-2 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
}

/* ══ FIELD ═══════════════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.field label .req { color: var(--error); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--fs-md);
  color: var(--text-1);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  padding: 7px 10px;
  outline: none;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0,179,164,.15);
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.field input[type="number"] { font-variant-numeric: tabular-nums; }
.field select {
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397A0AF' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.pfx-wrap { position: relative; }
.pfx-wrap .pfx {
  position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-3); pointer-events: none;
}
.pfx-wrap input { padding-left: 28px !important; }

/* ══ FORM DIVIDER ════════════════════════════════════════════════════════ */
.form-section-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
  margin-bottom: 10px;
}

/* ══ SUBMIT ROW ══════════════════════════════════════════════════════════ */
.submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  background: #FAFBFC;
}

/* ══ BOTÕES ══════════════════════════════════════════════════════════════ */
.btn {
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  border: none;
  border-radius: 3px;
  padding: 8px 18px;
  cursor: pointer;
  letter-spacing: .2px;
  transition: background .12s, box-shadow .12s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { background: var(--text-3); cursor: not-allowed; }
.btn-ghost {
  background: none;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-dark); color: var(--text-1); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #bf2600; }
.form-feedback {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 3px;
  display: none;
}
.form-feedback.error {
  display: block;
  background: var(--error-bg);
  color: var(--error);
}

/* ══ TABLE TOOLBAR ═══════════════════════════════════════════════════════ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.record-count {
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-weight: 600;
}
.btn-icon {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  padding: 5px 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: border-color .12s, color .12s;
}
.btn-icon:hover { border-color: var(--teal); color: var(--teal); }
.btn-icon.loading { opacity: .5; cursor: default; }
.search-input {
  font-family: inherit;
  font-size: var(--fs-sm);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  padding: 5px 10px;
  outline: none;
  color: var(--text-1);
  background: var(--white);
  transition: border-color .12s;
  width: 180px;
}
.search-input:focus { border-color: var(--teal); }

/* ══ TABLE ═══════════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto; overflow-y: hidden;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}
thead tr {
  background: #F4F5F7;
  border-bottom: 2px solid var(--border-dark);
}
thead th {
  text-align: left;
  padding: 9px 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:hover { color: var(--teal); }
thead th .sort-icon { margin-left: 4px; opacity: .4; font-size: 10px; }
thead th.sorted .sort-icon { opacity: 1; color: var(--teal); }
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .08s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #F8F9FA; }
tbody td {
  padding: 9px 12px;
  color: var(--text-1);
  vertical-align: middle;
}
td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
td.muted { color: var(--text-3); font-size: var(--fs-sm); }
.cell-title {
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-sub {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 2px;
}

/* ══ STATUS BADGES ═══════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.badge-planejada { background: #FFFAE6; color: #974F0C; border: 1px solid #FFE380; }
.badge-aprovada  { background: #E3FCEF; color: #064;    border: 1px solid #ABF5D1; }
.badge-concluida { background: #DEEBFF; color: #0747A6; border: 1px solid #B3D4FF; }
.badge-paga      { background: #E3FCEF; color: #064;    border: 1px solid #57D9A3; }
.badge-negada    { background: #FFEBE6; color: #BF2600; border: 1px solid #FFBDAD; }

/* ══ EMPTY / LOADING ═════════════════════════════════════════════════════ */
.table-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: var(--fs-md);
}
.table-state strong { display: block; font-size: 15px; color: var(--text-2); margin-bottom: 4px; }

/* ══ FORM FIELDS (modal) ═════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-input,
.form-select {
  font-family: inherit;
  font-size: var(--fs-md);
  color: var(--text-1);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 3px;
  padding: 7px 10px;
  outline: none;
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0,179,164,.15);
}
.form-input[disabled],
.form-select[disabled] { background: var(--surface); color: var(--text-3); cursor: not-allowed; }
.form-input.invalid,
.form-select.invalid { border-color: var(--error); box-shadow: 0 0 0 2px rgba(222,53,11,.12); }
.campo-erro { display: none; font-size: var(--fs-xs); color: var(--error); font-weight: 600; }
.form-select {
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397A0AF' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.form-section-title {
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-3);
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}

/* ══ MODAL ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
/* Quando há sidebar+topbar, o overlay cobre apenas a área de conteúdo */
body.with-nav .modal-overlay { left: 210px; top: 48px; }

/* Modal principal de registro: cobre toda a área de conteúdo (padrão Conta Azul) */
.modal-overlay.modal-overlay--full {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  background: var(--white);
}
body.with-nav .modal-overlay--full { left: 210px; top: 48px; right: 0; bottom: 0; }
.modal-fullscreen {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: 0; box-shadow: none; animation: none;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  flex: 0 0 auto; background: var(--white);
}
.modal-header h2 { font-size: 15px; font-weight: 700; margin: 0; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; overflow-y: auto; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--border);
  flex: 0 0 auto; background: #FAFBFC;
}
.btn-secondary {
  font-family: inherit; font-size: var(--fs-sm); font-weight: 700;
  background: none; color: var(--text-2);
  border: 1.5px solid var(--border); border-radius: 3px;
  padding: 8px 18px; cursor: pointer; letter-spacing: .2px;
  transition: border-color .12s, color .12s;
}
.btn-secondary:hover { border-color: var(--border-dark); color: var(--text-1); }
.btn-secondary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary:disabled:hover { border-color: var(--border); color: var(--text-2); }
.btn-delete-confirm { background: var(--error) !important; color: #fff !important; }
.modal-box {
  background: var(--white);
  border-radius: 4px;
  padding: 36px 32px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  animation: popIn .2s ease;
}
@keyframes popIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.modal-icon-wrap {
  width: 56px; height: 56px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.modal-box h2 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-box p  { font-size: var(--fs-md); color: var(--text-2); line-height: 1.6; margin-bottom: 24px; }

/* ══ AUTOCOMPLETE ════════════════════════════════════════════════════════ */
.ac-wrap { position: relative; }
.ac-list {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
  list-style: none;
  margin: 0; padding: 4px 0;
}
.ac-list.open { display: block; }
.ac-list li {
  padding: 7px 12px;
  font-size: var(--fs-md);
  color: var(--text-1);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-list li:hover,
.ac-list li.ac-active { background: var(--teal-light); color: var(--teal-dark); }

/* ══ COMBOBOX (busca + criação rápida, estilo Conta Azul — shared/combobox.js) ══
   Diferente do autocomplete simples acima (.ac-*, usado só em Viagens): aqui
   o campo tem um estado fechado igual a um <select> (.cbx-trigger, sem texto
   de busca visível) que ao clicar abre um painel com busca + "+ Novo" +
   lista + "Mostrar mais" — não é o mesmo componente, não reaproveita .ac-*. */
.cbx-wrap { position: relative; }
.cbx-trigger { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx-panel {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1px solid var(--border-dark); border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  z-index: 200;
}
.cbx-panel.open { display: block; }
/* Escapa do overflow:hidden de .panel / <td> — mesma técnica usada pelo
   menu ⋮ (kebab) das listas: reposiciona com position:fixed calculado via
   getBoundingClientRect() do campo, em vez de depender do fluxo normal. */
.cbx-panel.cbx-panel--fixed { position: fixed; z-index: 300; }
.cbx-search-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-bottom: 1px solid var(--border);
}
.cbx-search-input {
  flex: 1; min-width: 0; border: none; outline: none;
  font-family: inherit; font-size: var(--fs-sm); color: var(--text-1);
  padding: 4px 2px;
}
.cbx-btn-novo {
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  background: none; border: none; cursor: pointer;
  color: var(--teal-dark); font-weight: 700; font-size: var(--fs-sm);
  padding: 4px 8px; border-radius: 3px;
}
.cbx-btn-novo:hover { background: var(--teal-light); }
.cbx-btn-novo.disabled { opacity: .4; pointer-events: none; }
.cbx-list {
  list-style: none; margin: 0; padding: 4px 0;
  max-height: 220px; overflow-y: auto;
}
.cbx-list li {
  padding: 8px 12px; font-size: var(--fs-md); color: var(--text-1); cursor: pointer;
}
.cbx-list li:hover,
.cbx-list li.cbx-active { background: var(--teal-light); color: var(--teal-dark); }
.cbx-list li.cbx-selecionado { background: var(--teal); color: var(--white); }
.cbx-list li.cbx-vazio { color: var(--text-3); cursor: default; }
.cbx-list li.cbx-vazio:hover { background: none; }
.cbx-mostrar-mais {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px; border-top: 1px solid var(--border);
  color: var(--teal-dark); font-weight: 700; font-size: var(--fs-sm);
  cursor: pointer;
}
.cbx-mostrar-mais:hover { background: var(--surface); }

/* ══ SIDEBAR ═════════════════════════════════════════════════════════════ */
.erp-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 210px;
  background: #111214;
  border-right: 1px solid #1f2023;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
}
.erp-sidebar-logo {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #1f2023;
  text-decoration: none;
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--teal);
  letter-spacing: -1px;
  line-height: 1;
  flex-shrink: 0;
}
.erp-sidebar-logo span {
  font-size: 10px;
  font-weight: 700;
  color: #444;
  letter-spacing: 1px;
  font-family: inherit;
}
.erp-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  gap: 1px;
}
.erp-nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #444;
  padding: 12px 8px 4px;
}
.erp-nav-section:first-child { padding-top: 4px; }
.erp-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #888;
  transition: background .1s, color .1s;
}
.erp-nav-item:hover { background: #1a1c1f; color: #ccc; }
.erp-nav-item.active { background: #0d2e2c; color: var(--teal); }
.erp-nav-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }
.erp-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ajuste de layout quando sidebar está presente */
body.with-nav .topbar {
  position: fixed;
  top: 0; left: 210px; right: 0;
}
body.with-nav {
  padding-top: 48px;
  padding-left: 210px;
}

/* ══ TOPBAR USER ═════════════════════════════════════════════════════════ */
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #aaa;
}
.topbar-user-role {
  font-size: var(--fs-xs);
  color: #555;
  background: #1a1a1a;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid #2a2a2a;
}
.topbar-logout {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  font-family: inherit;
  transition: color .12s, background .12s;
}
.topbar-logout:hover { color: #ccc; background: #1a1a1a; }

/* ══ SYNC BANNER ═════════════════════════════════════════════════════════ */
.sync-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #FFF8E1;
  border: 1px solid #FFD54F;
  border-radius: 4px;
  font-size: var(--fs-sm);
  color: #5D4037;
  margin-bottom: 10px;
}
.sync-banner .sync-spinner {
  width: 14px; height: 14px;
  border: 2px solid #FFD54F;
  border-top-color: #F57F17;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sync-ok  { color: var(--teal-dark); font-weight: 600; }

/* ══ ANEXOS / UPLOAD DE ARQUIVO ══════════════════════════════════════════
   Usado por Viagens e Vendas (upload pro Supabase Storage). Movido do CSS
   local de Viagens pra cá quando Vendas passou a reusar o mesmo padrão. ══ */
.anexo-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 3px;
  font-size: var(--fs-sm);
}
.anexo-icon { font-size: 18px; flex-shrink: 0; }
.anexo-info { flex: 1; min-width: 0; }
.anexo-nome {
  font-weight: 600; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.anexo-meta { font-size: var(--fs-xs); color: var(--text-3); margin-top: 1px; }
.anexo-actions { display: flex; gap: 4px; flex-shrink: 0; }
.btn-anexo {
  background: none; border: 1px solid var(--border); border-radius: 3px;
  padding: 3px 8px; font-size: var(--fs-xs); cursor: pointer;
  font-family: inherit; font-weight: 600; color: var(--text-2);
  transition: all .1s; text-decoration: none; display: inline-flex; align-items: center;
}
.btn-anexo:hover { border-color: var(--teal); color: var(--teal); }
.btn-anexo.danger:hover { border-color: var(--error); color: var(--error); }
.upload-zone {
  border: 1.5px dashed var(--border-dark); border-radius: 3px;
  padding: 16px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .12s, background .12s;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--teal); background: var(--teal-light); }
.upload-zone input { display: none; }
.upload-zone .uz-label { font-size: var(--fs-md); font-weight: 600; color: var(--text-2); }
.upload-zone .uz-hint  { font-size: var(--fs-xs); color: var(--text-3); }
.upload-progress {
  display: none; margin-top: 8px; font-size: var(--fs-sm);
  color: var(--text-2); font-weight: 600; text-align: center;
}
.upload-progress.show { display: block; }
.sync-err { color: var(--error); }
