:root {
  /* Largura do sidebar legado (workspace); tokens em tokens.css */
  --sidebar-width: 322px;
  /* Cores Admin */
  --sla-ok: #198754;
  --sla-warn: #fd7e14;
  --sla-crit: #dc3545;
}

html {
  background-color: var(--bg-body);
}

body {
  background: linear-gradient(135deg, var(--bg-theme-from, var(--bg-body)), var(--bg-theme-to, #0B0F17));
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, sans-serif;
}

/* Densidade abaixo de Full HD (1366×768): encolhe rem/tokens sem zoom no documento. */
@media (min-width: 992px) and (max-width: 1600px) and (max-height: 820px) {
  html {
    font-size: 87.5%;
  }

  :root {
    --sidebar-width: 267px;
  }

  .remap-workspace-top {
    margin-bottom: 14px;
  }

  .remap-page-header__icon {
    font-size: 1.45rem;
  }

  .remap-page-header__title {
    font-size: 1.35rem;
  }

  .remap-resumo-pane__header {
    padding: 8px 10px;
  }

  .remap-resumo-pane__body {
    padding: 8px;
    gap: 8px;
  }
}

/* Temas de fundo (PreferÃÂªncias Ã¢ÂÂ bg_theme) Ã¢ÂÂ workspace cliente */
body[data-bg-theme="graphite"] {
  --bg-theme-from: #0d0d0d;
  --bg-theme-to: #111111;
}
body[data-bg-theme="midnight"] {
  --bg-theme-from: #05080f;
  --bg-theme-to: #0a1424;
}
body[data-bg-theme="forest"] {
  --bg-theme-from: #050c08;
  --bg-theme-to: #0a1810;
}
body[data-bg-theme="wine"] {
  --bg-theme-from: #100608;
  --bg-theme-to: #1a0c10;
}
body[data-bg-theme="slate"] {
  --bg-theme-from: #07090e;
  --bg-theme-to: #11161f;
}
body[data-bg-theme="ember"] {
  --bg-theme-from: #0e0805;
  --bg-theme-to: #1a1008;
}

/* ==========================================================================
   UTILITÃÂRIOS E TIPOGRAFIA (CORRIGIDO)
   ========================================================================== */
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; color: #000 !important; }
.bg-panel { background-color: var(--bg-panel) !important; color: var(--text-main); }
.border-accent { border-color: var(--accent) !important; }
.text-readable { color: var(--text-readable, #F8FAFC) !important; }
.text-muted-readable { color: var(--text-secondary, #94A3B8) !important; }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }

.text-success-light {
  color: #fff564; /* amarelo claro que nÃÂ£o morre no preto */
}

/* --- RESTAURAÃÂÃÂO DE CORES GLOBAIS --- */
.card, .table { color: var(--text-main); }

/* ForÃÂ§a o muted a usar sua variÃÂ¡vel cinza (#bbbbbb) */
.text-muted { color: var(--text-muted) !important; }

/* Garante que texto muted fique legÃÂ­vel quando passar o mouse na tabela (Admin) */
.table-hover tbody tr:hover .text-muted,
.table-hover tbody tr:hover .text-white-50 {
    color: var(--text-secondary, #94A3B8) !important;
}

.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Scrollbar Customizada */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: var(--bg-app, #0B0F17); }
.custom-scroll::-webkit-scrollbar-thumb { background: var(--border-medium, #223042); border-radius: 3px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* AnimaÃÂ§ÃÂµes */
.animate-fade { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   COMPONENTES DE FORMULÃÂRIO
   ========================================================================== */
.form-control, .form-select {
  background-color: var(--input-bg, var(--bg-input, #0B0F17));
  border: 1px solid var(--input-border, var(--border-color, #223042));
  color: var(--text-primary, #F8FAFC);
}

/* Input de ID do contrato (6 dÃ­gitos) â assinatura */
.contrato-id-input {
  max-width: 14rem;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.35em;
  font-weight: 700;
  border-color: var(--accent, #ffff00);
  border-width: 2px;
  color: #fff;
}
.contrato-id-input::placeholder {
  color: #777;
  letter-spacing: 0.35em;
}
.contrato-id-input:focus {
  border-color: var(--accent, #ffff00);
  box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.15);
  background-color: var(--input-bg);
  color: #fff;
}

/* ---- DieselHubDateInput (dd/mm/aaaa + calendÃÂ¡rio) ---- */
.dh-date-input {
  position: relative;
  display: block;
  width: 100%;
}
.dh-date-input__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.dh-date-input__text {
  padding-right: 2.35rem;
}
.dh-date-input__btn {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-muted, #aaa);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.dh-date-input__btn:hover:not(:disabled) {
  color: var(--segment-accent, var(--accent));
  background: rgba(255, 255, 255, 0.06);
}
.dh-date-input__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dh-date-cal {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 1080;
  min-width: 17.5rem;
  padding: 0.65rem;
  border: 1px solid var(--border-color, #495057);
  border-radius: 0.4rem;
  background: var(--bg-panel, #131B26);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.45);
  color: var(--text-main, #fff);
}
.dh-date-cal[hidden] { display: none !important; }
.dh-date-cal__head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}
.dh-date-cal__title {
  flex: 1;
  display: flex;
  gap: 0.25rem;
  min-width: 0;
}
.dh-date-cal__month,
.dh-date-cal__year {
  flex: 1;
  min-width: 0;
  background: var(--input-bg, #0B0F17);
  border: 1px solid var(--input-border, #223042);
  color: #fff;
  border-radius: 0.25rem;
  padding: 0.2rem 0.3rem;
  font-size: 0.8rem;
}
.dh-date-cal__nav {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-muted, #aaa);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.dh-date-cal__nav:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.dh-date-cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  margin-bottom: 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted, #aaa);
}
.dh-date-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}
.dh-date-cal__day {
  height: 1.85rem;
  padding: 0;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #fff;
  font-size: 0.8rem;
  cursor: pointer;
}
.dh-date-cal__day.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.dh-date-cal__day:hover {
  background: rgba(255, 255, 255, 0.08);
}
.dh-date-cal__day.is-today {
  box-shadow: inset 0 0 0 1px var(--segment-accent, var(--accent));
}
.dh-date-cal__day.is-selected {
  background: var(--segment-accent, var(--accent));
  color: #111;
  font-weight: 600;
}
.dh-date-cal__foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-color, #495057);
}
.dh-date-cal__today,
.dh-date-cal__clear {
  border: 0;
  background: transparent;
  color: var(--segment-accent, var(--accent));
  font-size: 0.78rem;
  padding: 0.15rem 0.25rem;
  cursor: pointer;
}
.dh-date-cal__today:hover,
.dh-date-cal__clear:hover {
  text-decoration: underline;
}
body.segment-gestao .dh-date-cal__day.is-selected,
body.segment-financeiro .dh-date-cal__day.is-selected {
  color: #111;
}
.form-control:focus, .form-select:focus {
  background-color: var(--bg-surface-elevated, #16202E);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(255,255,0,0.2);
  color: var(--text-primary, #F8FAFC);
}
.form-control:disabled,
.form-select:disabled,
.form-control[readonly]:not(:focus):not(.gestao-field-calculated) {
  background-color: var(--bg-surface, #131B26);
  color: var(--text-secondary, #94A3B8);
  border-color: var(--input-border, var(--border-color, #223042));
  opacity: 1;
}
.form-control.gestao-field-calculated,
.form-control.gestao-field-calculated[readonly] {
  background-color: var(--bg-surface, #131B26);
  color: var(--text-secondary, #94A3B8);
  opacity: 1;
}
.form-label { color: var(--text-readable, var(--text-primary, #F8FAFC)); font-weight: 500; margin-bottom: 8px; }
::placeholder { color: var(--text-light, #64748B) !important; opacity: 1; }
select option { background-color: var(--bg-surface, #131B26); color: var(--text-primary, #F8FAFC); padding: 10px; }

/* ==========================================================================
   CORREÃÂÃÂO DE BOTÃÂES (HOVER PRETO)
   ========================================================================== */
.btn-accent:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-outline-light:hover {
    color: #ffff00 !important;            /* Texto Amarelo */
    background-color: #5c5c5c !important; /* Fundo Cinza Escuro (quase preto) */
    border-color: #ffff00 !important;     /* SugestÃÂ£o: Borda amarela para combinar (efeito neon) */
}
.btn-outline-secondary:hover {
    color: #000 !important;
}
/* Hover do Bootstrap deixa texto preto com bg-transparent (ilegÃÂ­vel no painel escuro) */
.btn-outline-info:hover,
.btn-outline-info:focus-visible {
    color: var(--bs-info, #0dcaf0) !important;
    background-color: rgba(13, 202, 240, 0.12) !important;
    border-color: var(--bs-info, #0dcaf0) !important;
}
.modal-suporte-toggle .btn-check:checked + .btn-outline-info:hover {
    color: #000 !important;
    background-color: var(--bs-info, #0dcaf0) !important;
}

/* ==========================================================================
   LAYOUT: SIDEBAR E MAIN
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--sidebar-border, #223042);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: all 0.3s;
  overflow: hidden;
  max-height: 100vh;
  max-height: 100dvh;
}
.sidebar-header,
.sidebar > .mb-5 {
  flex-shrink: 0;
}
/* Miolo da nav: rola quando os links ultrapassam a altura da viewport */
.sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium, #223042) var(--bg-panel, #131B26);
}
.sidebar > .text-center.pb-2,
.sidebar > .p-3.border-top,
.sidebar > .mt-auto {
  flex-shrink: 0;
}
.sidebar > .p-3.border-top {
  border-top-color: var(--sidebar-border, #223042) !important;
}

/* Placeholders da sidebar Remap — aparência de .nav-link, sem interação */
button.nav-link.remap-sidebar-nav-placeholder,
button.nav-link.remap-sidebar-tool {
  width: calc(100% - 24px);
  text-align: left;
  background: transparent;
  color: var(--text-main);
  border: 0 solid transparent;
  border-left: 4px solid transparent;
}
button.nav-link.remap-sidebar-tool:hover,
button.nav-link.remap-sidebar-tool:focus {
  background: rgba(255, 255, 0, 0.1);
  color: var(--accent);
}
button.nav-link.remap-sidebar-tool.active {
  background: rgba(255, 255, 0, 0.2);
  color: var(--accent);
  border-left-color: var(--accent);
}
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert,
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert:hover,
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert:focus,
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert.active {
  color: #ef4444;
}
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert:hover,
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert:focus {
  background: rgba(239, 68, 68, 0.12);
}
button.nav-link.remap-sidebar-tool.remap-sidebar-tool--orig-alert.active {
  background: rgba(239, 68, 68, 0.18);
  border-left-color: #ef4444;
}
button.nav-link.remap-sidebar-nav-placeholder {
  cursor: default;
  pointer-events: none;
}
button.nav-link.remap-sidebar-nav-placeholder:hover,
button.nav-link.remap-sidebar-nav-placeholder:focus {
  background: transparent;
  color: var(--text-main);
}
.sidebar-footer-nav {
  flex-shrink: 0;
  padding-bottom: 4px;
}
.nav-link.remap-sidebar-resumo {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.nav-link.remap-sidebar-resumo i {
  color: var(--accent);
}
.nav-link.remap-sidebar-resumo:hover,
.nav-link.remap-sidebar-resumo:focus {
  color: var(--accent);
}
.nav-link.remap-sidebar-resumo:hover i,
.nav-link.remap-sidebar-resumo:focus i {
  color: var(--accent);
}
.nav-link.remap-sidebar-resumo.active {
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  color: var(--accent);
}
.nav-link.remap-sidebar-resumo.active i {
  color: var(--accent);
}
.sidebar-header {
  padding: 13px;
  border-bottom: 1px solid var(--sidebar-border, #223042);
  background: rgba(22, 22, 26, 0.82);
  text-align: center;
}
.nav-link {
  color: var(--text-main);
  padding: 14px 20px;
  margin: 4px 12px;
  border-radius: 10px;
  transition: all 0.2s;
  font-weight: 500;
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  border-left: 4px solid transparent;
}
.nav-link:hover { background: rgba(255,255,0,0.1); color: var(--accent); }
.nav-link.active { background: rgba(255,255,0,0.2); color: var(--accent); border-left-color: var(--accent); }
.nav-link i { margin-right: 12px; font-size: 1.2rem; }

.sidebar-footer-link--support {
  color: var(--bs-info, #0dcaf0);
}

.sidebar-segment-switcher {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  width: 100%;
}

.sidebar-segment-divider {
  display: inline-block;
  width: 1px;
  height: 20px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 2px;
}

.sidebar-segment-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0;
  margin: 0;
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sidebar-segment-btn i {
  margin-right: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.sidebar-segment-btn--home {
  color: #fff;
}

.sidebar-segment-btn--home:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-segment-btn--home.is-active {
  border-color: rgba(255, 255, 255, 0.55);
}

.sidebar-segment-btn--remap {
  color: var(--accent);
}

.sidebar-segment-btn--remap.is-active {
  border-color: var(--accent);
}

.sidebar-segment-btn--gestao {
  color: #02bd24;
}

.sidebar-segment-btn--gestao.is-active {
  border-color: #02bd24;
}

.sidebar-segment-btn--nuvem {
  color: var(--bs-info, #0dcaf0);
}

.sidebar-segment-btn--nuvem.is-active {
  border-color: var(--bs-info, #0dcaf0);
}

.sidebar-segment-btn--administrativo {
  color: #4e6bed;
}

.sidebar-segment-btn--administrativo.is-active {
  border-color: #4e6bed;
}

.sidebar-segment-btn--financeiro {
  color: #35c8b2;
}

.sidebar-segment-btn--financeiro.is-active {
  border-color: #35c8b2;
}

/* Rodapé simplificado: apenas "Tela Inicial" branca com label. */
.sidebar-segment-switcher--home-only {
  padding: 0;
}

.sidebar-segment-btn--home-only {
  width: 100%;
  height: auto;
  padding: 10px 14px;
  gap: 10px;
  background: #ffffff;
  color: #111;
  border: 1px solid #ffffff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.sidebar-segment-btn--home-only i {
  font-size: 1.15rem;
  color: #111;
  margin: 0;
}

.sidebar-segment-btn--home-only:hover,
.sidebar-segment-btn--home-only:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  outline: none;
}

.sidebar-segment-btn--home-only__label {
  flex: 1;
  text-align: left;
  color: inherit;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
}

.modal-suporte-toggle .btn-outline-info {
  color: var(--bs-info, #0dcaf0);
  border-color: rgba(13, 202, 240, 0.45);
}

.modal-suporte-toggle .btn-check:checked + .btn-outline-info {
  background-color: var(--bs-info, #0dcaf0);
  border-color: var(--bs-info, #0dcaf0);
  color: #000;
}

.sidebar-unread-card {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 53, 69, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, #8b1a1a 0%, #6b1414 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}

.sidebar-unread-card:hover {
  background: linear-gradient(145deg, #a32020 0%, #7a1818 100%);
  border-color: rgba(220, 53, 69, 0.75);
  color: #fff;
}

.sidebar-footer-link--support:hover {
  color: #fff;
  background: rgba(13, 202, 240, 0.12);
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: 40px;
  width: calc(100% - var(--sidebar-width));
}

/* Responsivo */
@media (max-width: 991px) {
  .sidebar { left: calc(-1 * var(--sidebar-width)); }
  .sidebar.show { left: 0; }
  .main-content { margin-left: 0; width: 100%; padding: 20px; }
}

/* ==========================================================================
   CARDS E COMPONENTES UI
   ========================================================================== */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: #fff;
}
.card-header {
  border-bottom: 1px solid var(--border-color);
}

/* BotÃÂµes de AÃÂ§ÃÂ£o (Dashboard) */
.btn-action {
  background: var(--bg-surface-elevated, #16202E);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  transition: 0.3s;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-action:hover {
  background: var(--bg-surface-hover, #16202E);
  border-color: var(--accent);
  transform: translateY(-5px);
}
.btn-action i { font-size: 2.5rem; margin-bottom: 15px; color: var(--accent); }

.btn-accent {
  background-color: var(--accent);
  color: #000;
  font-weight: bold;
  border: none;
}
.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-accent:disabled,
.btn-accent.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* BotÃÂ£o destacado da sidebar Remap (mesmo estilo do Financeiro / Nuvem) */
.remap-sidebar-btn-destaque {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% - 24px);
  margin: 4px 12px 4px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  border: none;
}

.remap-sidebar-btn-destaque i,
.remap-sidebar-btn-destaque .remap-acao-rapida-bolt {
  margin-right: 12px;
  font-size: 1.2rem;
  line-height: 1;
}

.remap-acao-rapida-bolt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

.remap-sidebar-btn-destaque:hover,
.remap-sidebar-btn-destaque:focus-visible {
  background-color: #5c5c5c !important;
  border-color: #ffff00 !important;
  color: #ffff00 !important;
  font-weight: 500;
  transform: none;
}

.remap-sidebar-btn-destaque:focus:not(:focus-visible) {
  background-color: var(--accent) !important;
  color: #000 !important;
  border-color: transparent !important;
  box-shadow: none;
  transform: none;
}

.remap-sidebar-btn-destaque--active {
  box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.55);
}

/* Workspace Remap — cabeçalho alinhado ao módulo Gestão */
body:has(.remap-tool-page:not(.d-none)) {
  overflow: hidden;
  height: 100vh;
}

.main-content:has(.remap-tool-page:not(.d-none)) {
  --remap-chat-clearance: 4rem;
  padding: 28px 32px 20px;
  padding-bottom: calc(20px + var(--remap-chat-clearance));
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.remap-tool-page:not(.d-none),
#area-workspace.remap-resumo-page:not(.d-none) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.remap-resumo-top {
  flex-shrink: 0;
}

.remap-resumo-row {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
}

.remap-resumo-row > [class*="col-"] {
  display: flex;
  min-height: 0;
  max-height: 100%;
}

.remap-resumo-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.remap-resumo-card--destaque {
  border-color: rgba(255, 255, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 100%;
  height: 100%;
}

.remap-resumo-dados-col {
  flex-direction: column;
}

.remap-resumo-card--dados {
  height: auto;
  max-height: 100%;
  overflow: auto;
  flex: 0 1 auto;
}

.remap-resumo-split {
  display: flex;
  align-items: stretch;
  min-height: 0;
}

.remap-resumo-pane {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.remap-resumo-pane + .remap-resumo-pane {
  border-left: 1px solid var(--border-color);
}

.remap-resumo-pane__header {
  padding: 10px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.remap-resumo-pane__header i {
  font-size: 1.2rem;
  color: var(--accent);
}

.remap-resumo-pane__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  background: var(--bg-panel);
}

.remap-resumo-btn-todas {
  align-self: center;
  margin-top: 10px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 400;
  color: #3b82f6;
  border-color: #3b82f6;
}

.remap-resumo-btn-todas:hover,
.remap-resumo-btn-todas:focus {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 400;
}

@media (max-width: 991.98px) {
  .remap-resumo-split {
    flex-direction: column;
  }

  .remap-resumo-pane + .remap-resumo-pane {
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

.remap-resumo-originalidade {
  background: var(--input-bg);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.remap-resumo-originalidade__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remap-resumo-originalidade__row .remap-resumo-control {
  flex: 1 1 auto;
  min-width: 0;
}

.remap-resumo-btn-diffs {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
}

.remap-resumo-anexo-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

input.remap-resumo-control[readonly] {
  background-color: var(--bg-surface-elevated, #16202E);
  color: #c8c8c8;
  pointer-events: none;
}

.remap-resumo-control--orig-ok {
  background: #14331d !important;
  color: #7dffa0 !important;
  border-color: #2e7d4f !important;
  font-weight: 700;
}

.remap-resumo-control--orig-bad {
  background: #3a1414 !important;
  color: #ff8a8a !important;
  border-color: #8a3030 !important;
  font-weight: 700;
}

.remap-resumo-control--orig-unk {
  background: var(--bg-surface-elevated, #16202E) !important;
  color: #c8c8c8 !important;
}

.prop-bin-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  min-width: 0;
}
.prop-bin-input-wrap .form-control,
.prop-bin-input-wrap .form-select {
  width: 100%;
  min-width: 0;
}
.prop-bin-field-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.prop-bin-field-actions .btn {
  font-weight: 400;
  font-size: 0.7rem;
  line-height: 1.2;
  padding: 0.12rem 0.4rem;
  white-space: nowrap;
}
.prop-bin-field-actions .prop-bin-pencil {
  padding: 0.12rem 0.32rem;
}
.prop-bin-field-actions .btn:hover {
  font-weight: 400;
}
.prop-bin-field-actions .prop-bin-confirm {
  background: #fd7e14;
  border-color: #fd7e14;
  color: #111;
}
.prop-bin-field-actions .prop-bin-confirm:hover {
  background: #e86e0c;
  border-color: #e86e0c;
  color: #111;
  font-weight: 400;
}
#btn-resumo-full-salvar-wrap.is-blocked {
  cursor: not-allowed;
}
#btn-resumo-full-salvar-wrap.is-blocked #btn-resumo-full-salvar:disabled {
  pointer-events: none;
}
#modalResumoTodasInfo .remap-resumo-control.prop-bin-field-is-invalid,
#modalResumoTodasInfo .form-select.prop-bin-field-is-invalid,
#modalResumoTodasInfo .form-control.prop-bin-field-is-invalid,
#modalResumoTodasInfo .ts-wrapper.prop-bin-field-is-invalid .ts-control {
  border-color: #e35d6a !important;
  box-shadow: 0 0 0 1px rgba(227, 93, 106, 0.35);
}
#modalResumoTodasInfo .remap-resumo-full-field.prop-bin-field-is-invalid > .remap-resumo-label {
  color: #e35d6a;
}
.prop-bin-psm-section {
  margin-top: 0.25rem;
}
.prop-bin-psm-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.55rem;
  padding: 0.75rem 0.9rem;
  background: rgba(148, 163, 184, 0.06);
  margin-bottom: 0.75rem;
}
.prop-bin-psm-value {
  min-height: calc(1.5em + 0.5rem + 2px);
  display: flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0.35rem;
}
.prop-bin-psm-chip {
  display: inline-block;
  margin: 0.15rem 0.25rem 0.15rem 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}
html[data-theme="light"] .prop-bin-psm-card {
  background: rgba(148, 163, 184, 0.1);
}
html[data-theme="light"] .prop-bin-psm-value {
  background: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .prop-bin-psm-chip {
  background: rgba(255, 255, 255, 0.75);
}

.prop-bin-input-wrap .ts-wrapper {
  width: 100%;
  min-width: 0;
}
.prop-bin-input-wrap .ts-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  font-size: 0.875rem;
}
#modalResumoTodasInfo .prop-bin-input-wrap .ts-wrapper.single .ts-control > .item {
  display: inline-block;
  color: #fff;
  max-width: calc(100% - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prop-bin-input-wrap {
  position: relative;
  overflow: visible;
}
#modalResumoTodasInfo .prop-bin-input-wrap .ts-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 0 !important;
  z-index: 40 !important;
}
.remap-resumo-full-body.is-modelo-open {
  overflow: visible;
}
.remap-resumo-full-modal:has(.ts-wrapper.dropdown-active) {
  overflow: visible;
}
#prop-bin-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2rem));
}
.prop-bin-toast {
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.prop-bin-toast--error {
  background: #3a1414;
  color: #ffb4b4;
  border: 1px solid #8a3030;
}
.prop-bin-toast--success {
  background: #143a22;
  color: #b6f0c8;
  border: 1px solid #2f8a4e;
}
.remap-resumo-full-modal[data-segment="nuvem"] .prop-bin-header,
.segment-nuvem .remap-resumo-full-header.prop-bin-header {
  background: var(--bs-info, #0dcaf0) !important;
  border-color: var(--bs-info, #0dcaf0) !important;
  color: #111 !important;
}
.remap-resumo-full-modal[data-segment="nuvem"] .btn-accent {
  background: var(--bs-info, #0dcaf0);
  border-color: var(--bs-info, #0dcaf0);
  color: #111;
}
.remap-resumo-full-modal[data-segment="nuvem"] .btn-accent:hover {
  background: #31d6ff;
  border-color: #31d6ff;
}


.remap-resumo-full-modal {
  overflow: visible;
}

.remap-resumo-full-modal .modal-content,
.remap-resumo-full-modal {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
}

.remap-resumo-full-header {
  padding: 0.85rem 1.1rem;
  flex-shrink: 0;
}

.remap-resumo-full-body {
  padding: 0.9rem 1.1rem 1rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.remap-resumo-full-footer {
  padding: 0.75rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.remap-resumo-full-footer__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.remap-resumo-full-modal.border-secondary {
  border-color: var(--border-color) !important;
}

.remap-resumo-chassi-renavam-wrap {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.remap-resumo-btn-chassi-renavam {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: #fff;
  background-color: transparent;
  border: 1px solid #7ecbff;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.remap-resumo-btn-chassi-renavam:hover,
.remap-resumo-btn-chassi-renavam:focus {
  color: #fff;
  font-weight: 400;
  background-color: rgba(126, 203, 255, 0.12);
  border-color: #9ad8ff;
  box-shadow: none;
}

.remap-resumo-btn-chassi-renavam:disabled {
  opacity: 0.55;
  color: #fff;
}

.remap-resumo-chassi-renavam-status,
.remap-resumo-id-txt-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.remap-resumo-full-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 0, 0.22);
}

.remap-resumo-full-meta__icon {
  font-size: 1.35rem;
  color: var(--accent);
  flex-shrink: 0;
}

.remap-resumo-full-meta__text {
  flex: 1 1 auto;
  min-width: 0;
}

.remap-resumo-full-meta__filename-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.remap-resumo-full-meta__filename {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.remap-resumo-full-meta__size {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
}

.remap-resumo-full-meta__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.remap-resumo-full-section {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.4rem 0 0.65rem;
}

.remap-resumo-full-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.55rem 0.65rem;
  margin-bottom: 1rem;
}

.remap-resumo-full-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.remap-resumo-full-field--span-2 { grid-column: span 2; }
.remap-resumo-full-field--span-3 { grid-column: span 3; }
.remap-resumo-full-field--span-4 { grid-column: span 4; }
.remap-resumo-full-field--span-12 { grid-column: span 12; }

@media (max-width: 768px) {
  .remap-resumo-full-field--span-2,
  .remap-resumo-full-field--span-3,
  .remap-resumo-full-field--span-4,
  .remap-resumo-full-field--span-12 {
    grid-column: span 12;
  }
}

.remap-resumo-card__header {
  padding: 10px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.remap-resumo-card__header i {
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.remap-resumo-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  min-width: 0;
}

.remap-resumo-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.remap-resumo-card__body--edicoes {
  justify-content: space-between;
}

.remap-resumo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  background: var(--input-bg);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.remap-resumo-grid--cliente {
  background: transparent;
  border: 0;
  padding: 0;
}

.remap-resumo-item--full {
  grid-column: span 2;
}

.remap-resumo-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.remap-resumo-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.remap-resumo-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remap-resumo-value--accent {
  color: var(--accent);
}

.remap-resumo-control {
  background-color: var(--bg-input, #0B0F17);
  border-color: var(--input-border, #223042);
  color: #f0f0f0;
  font-size: 0.8rem;
  min-height: 30px;
  padding: 0.2rem 0.45rem;
}

select.remap-resumo-control {
  background-color: var(--bg-input, #0B0F17);
  color: #f0f0f0;
}

.remap-resumo-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.15rem rgba(255, 255, 0, 0.18);
  color: #f0f0f0;
  background-color: var(--bg-surface-elevated, #16202E);
}

.remap-resumo-control--placa {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.remap-resumo-control--placa::placeholder {
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
}

#modalResumoTodasInfo .prop-bin-field--placa .remap-resumo-label {
  color: var(--accent);
  font-weight: 700;
}

#modalResumoTodasInfo .prop-bin-field--placa .remap-resumo-control--placa {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-color, #223042));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface-elevated, #16202E));
}

#modalResumoTodasInfo .prop-bin-field--placa .remap-resumo-control--placa:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

#modalResumoTodasInfo .prop-bin-field--placa .remap-resumo-control--placa.is-placa-looking {
  opacity: 0.72;
}

#modalResumoTodasInfo .prop-bin-placa-hint {
  font-size: 0.72rem;
  line-height: 1.2;
  opacity: 0.85;
}

.remap-resumo-control--arquivo,
input.remap-resumo-control.remap-resumo-control--arquivo[readonly] {
  color: #7ecbff;
  font-weight: 600;
}

.remap-resumo-control--id-destaque,
input.remap-resumo-control.remap-resumo-control--id-destaque[readonly],
.remap-resumo-control--id-destaque:focus {
  color: var(--accent);
  font-weight: 700;
}

input.remap-resumo-control[readonly],
select.remap-resumo-control:disabled {
  background-color: var(--bg-surface-elevated, #16202E);
  color: var(--text-secondary, #94A3B8);
  border-color: var(--border-color, #223042);
  pointer-events: none;
}

.remap-resumo-section {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
}

.remap-resumo-section--grow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.remap-resumo-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.remap-resumo-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.remap-resumo-check .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.remap-resumo-check .form-check-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.remap-resumo-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.remap-resumo-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.78rem;
}

.remap-resumo-attachment__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.remap-resumo-btn-x {
  background: transparent;
  border: none;
  color: #dc3545;
  padding: 0;
  line-height: 1;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.remap-resumo-btn-x:hover,
.remap-resumo-btn-x:focus {
  color: #ff6b7b;
}

.remap-resumo-btn-dashed {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border-color, #223042);
  color: #ccc;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.remap-resumo-btn-dashed:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 0, 0.04);
}

.remap-resumo-editions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.remap-resumo-editions-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 16px 12px;
}

.remap-resumo-editions-empty i {
  font-size: 1.8rem;
  color: var(--accent);
  opacity: 0.85;
}

.remap-resumo-editions-empty__title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.remap-resumo-editions-empty__hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 22rem;
}

.remap-resumo-edition {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.remap-resumo-edition__info {
  min-width: 0;
}

.remap-resumo-edition__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remap-resumo-edition__row i {
  color: var(--accent);
}

.remap-resumo-edition__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
}

.remap-resumo-edition__sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-left: 24px;
}

.remap-resumo-btn-gerar {
  background-color: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
}

.remap-resumo-btn-gerar:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.remap-resumo-btn-gerar:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1399px) {
  body:has(#area-workspace:not(.d-none)) {
    overflow: auto;
    height: auto;
  }

  .main-content:has(#area-workspace:not(.d-none)) {
    height: auto;
    overflow: visible;
    padding-bottom: calc(24px + var(--remap-chat-clearance, 3.75rem));
  }

  #area-workspace.remap-resumo-page:not(.d-none) {
    flex: none;
  }

  .remap-resumo-row > [class*="col-"] {
    max-height: none;
  }

  .remap-resumo-card--destaque {
    max-height: none;
    height: auto;
  }
}

.remap-workspace-top {
  margin-bottom: 24px;
}

.remap-workspace-top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.remap-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.remap-page-header__icon {
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

.remap-page-header__title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
}

.remap-workspace-meta {
  display: block;
  margin-top: 8px;
}

.remap-workspace-top__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.remap-workspace-btn-gerar-mod {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
}

.remap-workspace-btn-gerar-mod i {
  margin-right: 6px;
  color: var(--accent);
}

.remap-workspace-btn-gerar-mod:hover:not(:disabled),
.remap-workspace-btn-gerar-mod:focus-visible:not(:disabled) {
  color: var(--accent);
  background: rgba(255, 255, 0, 0.1);
  border-color: var(--accent);
}

.remap-workspace-btn-gerar-mod:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted, #888);
  border-color: var(--border-color, #223042);
  background: transparent;
}

.remap-workspace-btn-gerar-mod:disabled i {
  color: var(--text-muted, #888);
}

.remap-workspace-btn-encerrar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.remap-workspace-btn-encerrar i {
  margin-right: 6px;
}

.remap-tool-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.remap-modal-sm {
  max-width: 500px;
}

.modal-ticket-anexo {
  max-width: 640px;
}

.remap-acao-dialog {
  max-width: min(720px, 96vw);
}

.remap-acao-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.remap-acao-tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-main);
  cursor: pointer;
}

.remap-acao-tile:hover,
.remap-acao-tile:focus {
  border-color: rgba(255, 255, 0, 0.45);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text-main);
}

.remap-acao-tile__icon {
  flex-shrink: 0;
  width: 1.6rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--accent);
}

.remap-acao-tile--orig-alert .remap-acao-tile__icon {
  color: #ef4444;
}

.remap-acao-tile__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.remap-acao-tile__label {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.remap-acao-tile__desc {
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--text-muted, #9ca3af);
}

.remap-acao-tile--gerar {
  border-color: rgba(255, 255, 0, 0.28);
  background: rgba(255, 255, 0, 0.04);
}

.remap-acao-tile--gerar.is-ready {
  border-color: #ffff00;
  box-shadow: 0 0 0 1px #ffff00;
  background: rgba(255, 255, 0, 0.12);
}

.remap-acao-tile--encerrar .remap-acao-tile__icon {
  color: #ef4444;
}

.remap-acao-hint {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 0, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 0, 0.08);
  color: var(--text-readable, #e5e5e5);
  font-size: 0.82rem;
  line-height: 1.45;
}

.remap-acao-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-surface, #131B26);
  color: var(--text-main);
  font-size: 0.75rem;
}

@media (max-width: 576px) {
  .remap-acao-grid {
    grid-template-columns: 1fr;
  }
}

.modal-suporte-cliente {
  background: var(--bg-panel);
  border: 1px solid #0b3a6e;
}

.modal-suporte-cliente .modal-header {
  background: #0a2a4d;
  border-bottom: 1px solid #0b3a6e;
  color: #fff;
}

.modal-suporte-cliente .modal-title {
  color: #fff;
}

.modal-suporte-cliente__file-icon {
  color: #7eb6ff;
}

.btn-suporte-cliente {
  background: #0d47a1;
  border: 1px solid #0d47a1;
  color: #fff;
  font-weight: 700;
}

.btn-suporte-cliente:hover,
.btn-suporte-cliente:focus {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.remap-select-grid {
  display: grid;
  gap: 16px;
}

.remap-select-grid--stages,
.remap-select-grid--solucoes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.remap-select-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 200px;
  padding: 20px 18px 52px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.remap-select-card:hover {
  border-color: rgba(255, 255, 0, 0.45);
}

.remap-select-card.is-selected {
  border: 2px solid #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

.remap-select-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.remap-select-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 10px;
}

.remap-select-card__icon--economia { color: #22c55e; }
.remap-select-card__icon--equilibrado { color: #eab308; }
.remap-select-card__icon--potencia { color: #ef4444; }
.remap-select-card__icon--custom { color: #f97316; }
.remap-select-card__icon--dtc { color: #f59e0b; }
.remap-select-card__icon--adblue { color: #22d3ee; }
.remap-select-card__icon--immo { color: #fbbf24; }
.remap-select-card__icon--egr { color: #38bdf8; }
.remap-select-card__icon--dpf { color: #fb923c; }
.remap-select-card__icon--vel { color: #facc15; }
.remap-select-card__icon--nox { color: #a3e635; }
.remap-select-card__icon--lambda { color: #67e8f9; }

.remap-select-card__desc {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-muted, #9ca3af);
}

.remap-select-card__tag {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: #22c55e;
  color: #111;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 6px;
}

.remap-select-card.is-selected .remap-select-card__tag,
.remap-row-card.is-selected .remap-row-card__sel {
  display: inline-block;
}

.remap-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.remap-row-grid__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.remap-row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

button.remap-row-card {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.remap-row-card.is-selected {
  border: 2px solid #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

.remap-row-card--placeholder {
  cursor: default;
}

.remap-row-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.remap-row-card__badge--ok {
  background: #198754;
  color: #fff;
}

.remap-row-card__badge--mod {
  background: #dc3545;
  color: #fff;
}

.remap-row-card__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--accent);
  line-height: 1;
}

.remap-row-card__icon.remap-select-card__icon--economia { color: #22c55e; }
.remap-row-card__icon.remap-select-card__icon--dtc { color: #f59e0b; }
.remap-row-card__icon.remap-select-card__icon--adblue { color: #22d3ee; }
.remap-row-card__icon.remap-select-card__icon--immo { color: #fbbf24; }
.remap-row-card__icon.remap-select-card__icon--egr { color: #38bdf8; }
.remap-row-card__icon.remap-select-card__icon--dpf { color: #fb923c; }
.remap-row-card__icon.remap-select-card__icon--vel { color: #facc15; }
.remap-row-card__icon.remap-select-card__icon--nox { color: #a3e635; }
.remap-row-card__icon.remap-select-card__icon--lambda { color: #67e8f9; }

.remap-row-card__title {
  font-weight: 600;
  min-width: 0;
  flex: 1 1 auto;
}

.remap-row-card--solucao {
  align-items: flex-start;
  min-height: 108px;
  padding: 16px 16px;
  gap: 14px;
}

.remap-row-card--solucao .remap-row-card__icon {
  font-size: 1.55rem;
  margin-top: 2px;
}

.remap-row-card__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.remap-row-card--solucao .remap-row-card__title {
  flex: 0 0 auto;
}

.remap-row-card__desc {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted, #9ca3af);
}

.remap-row-card--solucao .remap-row-card__sel {
  align-self: center;
}

.remap-row-card__sel {
  position: static;
  transform: none;
  flex-shrink: 0;
}

.remap-row-card__action {
  flex-shrink: 0;
  margin-left: auto;
}

.remap-dtc-lista {
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 12px;
}

@media (max-width: 991px) {
  .remap-select-grid--stages,
  .remap-select-grid--solucoes,
  .remap-row-grid {
    grid-template-columns: 1fr;
  }
}

/* Modais */
.modal-content {
  background-color: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.modal-header { border-bottom: 1px solid var(--border-color); }
.modal-footer { border-top: 1px solid var(--border-color); }

.dh-modal-inset {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.dh-mono-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.dh-mono-panel {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.85rem;
}

.dh-progress-track {
  height: 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.dh-btn-muted-outline {
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

/* Accordion */
.accordion-item {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.accordion-button {
  background-color: var(--bg-surface-elevated, #16202E);
  color: var(--text-main);
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  background-color: var(--bg-surface-hover, #16202E);
  color: var(--accent);
  border-bottom: 1px solid var(--border-color);
}
.accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}
.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffff00'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-180deg);
}
.accordion-body {
  background-color: var(--bg-panel);
  color: var(--text-main);
  border-top: none;
}
.historico-item-highlight {
  outline: 1px solid var(--accent);
  background-color: rgba(255, 255, 0, 0.08) !important;
}


/* ==========================================================================
   CHAT E TICKETS - IDENTIDADE DIESELHUB
   ========================================================================== */

/* Container base do balÃÂ£o */
.chat-bubble {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 6px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Sombra mais marcada estilo "app" */
}

/* --------------------------------------------------------------------------
   CORES E IDENTIDADE (QUEM ÃÂ QUEM)
   -------------------------------------------------------------------------- */

/* MENSAGEM DO USUÃÂRIO/CLIENTE */
/* Cor: Azul PetrÃÂ³leo Escuro (Neutro mas distinto do fundo preto) */
.chat-user {
  background-color: #2c3e50; 
  border: 1px solid var(--border-color); /* Usa sua borda padrÃÂ£o #444 */
  color: var(--text-main);
}

/* MENSAGEM DO SUPORTE/ADMIN */
/* Cor: Verde do sistema (Sucesso/Oficial) */
.chat-support {
  background-color: var(--sla-ok); /* #198754 */
  border: 1px solid var(--sla-ok);
  color: #fff;
}

/* Links dentro do chat (Ex: Download de anexo) */
.chat-bubble a {
    color: var(--accent) !important; /* Amarelo DieselHub */
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}
.chat-bubble a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   GEOMETRIA (BORDAS E LADOS)
   -------------------------------------------------------------------------- */

/* LADO DIREITO (Minhas mensagens) */
/* Ponta quadrada na direita inferior */
.align-items-end .chat-bubble {
  border-bottom-right-radius: 0 !important;
  border-bottom-left-radius: 12px !important;
  margin-left: auto;
}

/* LADO ESQUERDO (Mensagens recebidas) */
/* Ponta quadrada na esquerda inferior */
.align-items-start .chat-bubble {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 12px !important;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   LISTA LATERAL (TICKETS)
   -------------------------------------------------------------------------- */
.ticket-item {
  padding: 16px;
  border-bottom: 1px solid var(--border-color); /* #444 */
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  background-color: transparent;
}

.ticket-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.ticket-item.active {
  background-color: rgba(255, 255, 0, 0.05); /* Fundo sutilmente amarelo */
  border-left-color: var(--accent); /* Borda Amarela Neon */
}

/* Texto pequeno na lista */
.ticket-item small {
    color: var(--text-muted); /* #bbbbbb */
}
.ticket-item.active small {
    color: #fff; /* Destaca texto quando ativo */
}

/* Badges de Status na Lista */
.ticket-item .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

/* ==========================================================================
   ESTILOS DO PAINEL ADMIN
   ========================================================================== */
.admin-container { padding: 20px; color: #e0e0e0; }
body.admin-body { overflow: hidden; }
body.admin-body .main-content {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  position: relative;
}
body.admin-body .tab-content { flex-grow: 1; height: 100%; position: relative; overflow: hidden; }
body.admin-body .tab-pane { height: 100%; width: 100%; }

/* Barra superior global (admin) Ã¢ÂÂ sobrepÃÂµe a ÃÂ¡rea de conteÃÂºdo, alinhada ao tÃÂ­tulo */
body.admin-body .admin-toolbar-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  height: 4.375rem; /* mesma faixa do cabeÃÂ§alho de Atendimento (70px) */
  padding: 0 1.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}
body.admin-body .admin-toolbar-top > * {
  pointer-events: auto;
}
body.admin-body .admin-toolbar-btn-icon {
  padding: 0.35rem 0.55rem;
  line-height: 1;
}
body.admin-body .admin-toolbar-btn-icon i {
  font-size: 1.15rem;
}
body.admin-body .admin-toolbar-icon-msg { color: #4dabf7; }
body.admin-body .admin-toolbar-icon-notif { color: #51cf66; }
body.admin-body .admin-notif-badge {
  font-size: 0.65rem;
  min-width: 1.1rem;
  padding: 0.2em 0.45em;
}
body.admin-body .admin-notif-menu {
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(24rem, calc(100vh - 6rem));
  background: var(--admin-panel-bg, #1a1d21);
}
body.admin-body .admin-notif-list {
  max-height: min(18rem, calc(100vh - 10rem));
  overflow-y: auto;
}
body.admin-body .admin-notif-item {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}
body.admin-body .admin-notif-item-unread {
  background: rgba(81, 207, 102, 0.06) !important;
}
body.admin-body .admin-notif-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #51cf66;
}
body.admin-body .admin-notif-dot-read {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
body.admin-body .admin-toolbar-btn-report {
  white-space: nowrap;
}
/* PÃÂ¡ginas admin com scroll (padrÃÂ£o VisÃÂ£o Geral) */
body.admin-body .admin-page-container {
  padding-top: 0.75rem;
}
@media (min-width: 768px) {
  body.admin-body .admin-page-container {
    padding-top: 1.5rem;
  }
}
body.admin-body .admin-page-header {
  margin-bottom: 3rem !important;
}
body.admin-body .admin-page-header:has(+ .admin-page-actions) {
  margin-bottom: 1.5rem !important;
}
body.admin-body .admin-page-section-title {
  font-size: 1.25rem;
  font-weight: 600;
}
body.admin-body .admin-page-actions {
  margin-bottom: 1.5rem;
}
body.admin-body .admin-page-bottom-spacer {
  height: 3rem;
}
body.admin-body .admin-tickets-top {
  padding: 0.75rem 1.5rem 0;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  body.admin-body .admin-tickets-top {
    padding-top: 1.5rem;
    padding-left: 3rem;
    padding-right: 3rem;
  }
}
body.admin-body .admin-tickets-top .admin-page-header {
  margin-bottom: 1rem !important;
}
body.admin-body:has(.tab-pane.show.active .admin-page-header) .admin-toolbar-top {
  top: 0.75rem;
  height: 3.25rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  body.admin-body:has(.tab-pane.show.active .admin-page-header) .admin-toolbar-top {
    top: 1.5rem;
    padding-right: 3rem;
  }
}

/* PÃÂ¡gina standalone /admin/atendimento (sem sidebar + tab-pane) */
body.admin-body.admin-atendimento-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
body.admin-body.admin-atendimento-page .admin-atendimento-topbar {
  flex-shrink: 0;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.35);
}
body.admin-body.admin-atendimento-page .admin-atendimento-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.admin-body.admin-atendimento-page #admin-chat-container {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}
body.admin-body.admin-atendimento-page #admin-chat-container > .d-flex.flex-grow-1 {
  flex: 1 1 auto;
  min-height: 0;
}
body.admin-body.admin-atendimento-page #admin-chat-container > .d-flex.flex-grow-1 > .d-flex.flex-column {
  min-height: 0;
}
body.admin-body.admin-atendimento-page #admin-lista-atendimentos,
body.admin-body.admin-atendimento-page #admin-chat-body {
  min-height: 0;
}
body.admin-body.admin-atendimento-page .admin-tickets-top {
  padding-top: 0.75rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 768px) {
  body.admin-body.admin-atendimento-page .admin-tickets-top {
    padding-top: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.border-strong-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-strong-top { border-top: 1px solid var(--border-color) !important; }
.border-strong-right { border-right: 1px solid var(--border-color) !important; }
.min-width-0 { min-width: 0; }

/* Painel Menu Ã¢ÂÂ canto inferior esquerdo; fade sem Bootstrap Modal */
body.admin-body .admin-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
body.admin-body .admin-menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.admin-body .admin-menu-panel {
  position: fixed;
  left: 1rem;
  bottom: var(--admin-menu-panel-bottom, 5.75rem);
  z-index: 1060;
  width: calc(var(--sidebar-width) - 2rem);
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
body.admin-body .admin-menu-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.admin-body .admin-menu-panel-inner {
  border-radius: 0.35rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
}
body.admin-body .admin-menu-panel-header {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
body.admin-body .admin-menu-panel-body {
  padding: 0.5rem 0.75rem 0.75rem;
}
body.admin-body .admin-sidebar-footer .d-flex {
  flex-direction: row;
}

/* Painel Mensagens Ã¢ÂÂ abaixo do botÃÂ£o na toolbar */
body.admin-body .admin-messages-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
body.admin-body .admin-messages-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.admin-body .admin-messages-panel {
  position: fixed;
  top: var(--admin-messages-panel-top, 4rem);
  right: var(--admin-messages-panel-right, 1rem);
  z-index: 1060;
  width: min(720px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
body.admin-body .admin-messages-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.admin-body .admin-messages-panel-inner {
  border-radius: 0.35rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 520px);
}
body.admin-body .admin-messages-panel-header {
  padding: 0.5rem 0.75rem;
  flex-shrink: 0;
}
body.admin-body .admin-messages-panel-body {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
body.admin-body .admin-messages-panel-body.admin-messages-cols-2 {
  grid-template-columns: 1fr 1fr;
}
body.admin-body .admin-messages-panel-body.admin-messages-cols-1 {
  grid-template-columns: 1fr;
}
body.admin-body .admin-messages-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
body.admin-body .admin-messages-col-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 120px;
  max-height: 360px;
}
body.admin-body .admin-messages-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  color: #e0e0e0;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
body.admin-body .admin-messages-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
body.admin-body .admin-messages-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.admin-body .admin-messages-item-preview {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chats flutuantes Ã¢ÂÂ canto inferior direito */
body.admin-body .admin-chat-float-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}
body.admin-body .admin-chat-float {
  pointer-events: auto;
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: var(--bg-app, #0B0F17);
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 420px;
}
body.admin-body .admin-chat-float.is-minimized {
  max-height: none;
}
body.admin-body .admin-chat-float.is-minimized .admin-chat-float-body,
body.admin-body .admin-chat-float.is-minimized .admin-chat-float-footer,
body.admin-body .admin-chat-float.is-minimized .admin-chat-float-banner {
  display: none;
}
body.admin-body .admin-chat-float-header {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: var(--bg-app);
}
body.admin-body .admin-chat-float-title {
  flex: 1 1 auto;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
body.admin-body .admin-chat-float-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem;
  min-height: 160px;
  max-height: 280px;
}
body.admin-body .admin-chat-float-footer {
  padding: 0.5rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}
body.admin-body .admin-chat-float-banner {
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  background: rgba(255, 193, 7, 0.12);
  border-bottom: 1px solid var(--border-color);
  color: #ffc107;
}

.nav-tabs { border-bottom: 1px solid var(--border-color, #223042); }
.nav-tabs .nav-link { color: #aaa; border: none; font-weight: 500; margin-right: 5px; }
.nav-tabs .nav-link.active { background: transparent; color: var(--accent); border-bottom: 3px solid var(--accent); }
.nav-tabs .nav-link:hover { color: #fff; }

.table-admin {
  --bs-table-bg: var(--bg-panel, #131B26);
  --bs-table-color: #e0e0e0;
  border-color: var(--border-color, #223042);
}
.table-admin th { background-color: var(--bg-surface-elevated, #16202E); color: var(--accent); border-bottom: 2px solid var(--border-color, #223042); }
.table-admin td { vertical-align: middle; border-bottom: 1px solid var(--border-color, #223042); }
.table-hover tbody tr:hover > * {
  color: #ffffff !important;
  background-color: rgba(255,255,255,0.08) !important;
  --bs-table-accent-bg: rgba(255,255,255,0.08) !important;
}

.tag-pill { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: var(--bg-surface-elevated, #16202E); border: 1px solid var(--border-color, #223042); margin-right: 2px; color: var(--text-secondary, #94A3B8); }
.internal-note { background: #3a3a2a; border-left: 3px solid var(--accent); padding: 10px; margin-bottom: 10px; font-size: 0.9rem; color: #ddd; }

/* Chat Admin (Cores Invertidas para diferenciar) */
.chat-bubble.chat-support-admin {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color, #223042);
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 15px;
  align-self: flex-end;
}

/* ==========================================================================
   LISTA DE ATENDIMENTOS ADMIN Ã¢ÂÂ ITEM ATIVO
   ========================================================================== */
.ticket-list-item {
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-left-color 0.15s ease;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}
.ticket-list-item:hover {
  background-color: rgba(255,255,255,0.04);
  border-left-color: var(--border-color, #223042);
}
.ticket-list-item.active {
  background-color: rgba(255, 255, 0, 0.06) !important;
  border-left: 3px solid var(--accent) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,0,0.1);
}
.ticket-list-item.active .fw-bold {
  color: #fff !important;
}

/* ==========================================================================
   NOVO: CARD DE IDENTIFICAÃÂÃÂO (BUSCA POR PLACA)
   ========================================================================== */

/* Card Principal da Busca */
.card-identificacao {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: #fff;
}

/* Card informativo abaixo do formulário de identificação — mesma largura do .card-identificacao */
.remap-evolucao-card {
    width: 100%;
    max-width: none;
    margin-top: 1.25rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0.92;
}

.remap-evolucao-card__title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent);
    margin-bottom: 12px;
}

/* Botão placa/chassi — cresce até a altura dos selects (não reduz Tom Select) */
#area-novo .remap-placa-chassi-col {
    display: flex;
    flex-direction: column;
}

#area-novo .remap-placa-chassi-btn {
    flex: 1 1 auto;
    min-height: 46px;
    padding: 0 0.75rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.2;
    border: 1px solid var(--accent);
    border-radius: 6px;
}

#area-novo .remap-topo-linha > [class*="col-"] > .form-label {
    margin-bottom: 0.5rem;
}

/* Coluna Esquerda (Busca) */
.col-busca {
    background-color: rgba(0, 0, 0, 0.2); /* Sutilmente mais escuro */
    border-right: 1px dashed var(--border-color);
}

/* Coluna Direita (Manual) */
.col-manual {
    min-height: 450px !important; /* EspaÃÂ§o suficiente para o form + lista aberta */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinha tudo ao topo */
}

/* Responsivo para colunas */
@media (max-width: 991px) {
    .col-busca {
        border-right: none;
        border-bottom: 1px dashed var(--border-color);
    }
}

/* Input Grande da Placa / Chassi */
.input-placa-large {
    background-color: var(--input-bg) !important;
    border: 2px solid var(--border-color) !important;
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    height: 70px;
}
.input-placa-large::placeholder { color: var(--text-light, #64748B); opacity: 0.6; }
.input-placa-large:focus {
    background-color: var(--bg-surface-elevated, #16202E) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.1);
    color: #fff !important;
}

/* Inputs PadrÃÂ£o Escuros (Ano, Obs, File) */
.form-control-dark {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
}
.form-control-dark:focus {
    background-color: var(--bg-surface-elevated, #16202E) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

/* ÃÂrea de Upload com Destaque */
.upload-area {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
}

/* Marcas D'ÃÂ¡gua (NÃÂºmeros 1 e 2) */
.watermark-number {
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03); /* Muito sutil */
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.watermark-number.right-side {
    left: auto;
    right: 20px;
}

/* Barra de Progresso Listrada e Animada */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}
.progress-bar.bg-accent {
    color: #000 !important; 
}

/* ==========================================================================
   LOADING BAR TECH (SCANNER STYLE)
   ========================================================================== */

/* Container da Barra (Fundo escuro profundo) */
.progress-tech {
    height: 6px; /* Mais fina e elegante */
    background-color: #000;
    border: 1px solid var(--border-color, #223042);
    border-radius: 10px;
    overflow: hidden; /* Garante que o brilho nÃÂ£o vaze feio */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.9);
    margin-top: 15px;
    position: relative;
}

/* A Barra em si (Amarelo Neon com Glow) */
.progress-bar-tech {
    height: 100%;
    background-color: var(--accent); /* Amarelo */
    width: 0%;
    transition: width 0.1s linear;
    /* O Pulo do Gato: Brilho Neon */
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
    position: relative;
}

/* Efeito de "CabeÃÂ§a" da barra (Scanner) */
.progress-bar-tech::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px; /* Tamanho do brilho da ponta */
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff); /* Ponta branca brilhante */
    opacity: 0.6;
}

/* ==========================================================================
   NOVO: TOM SELECT - PERSONALIZAÃÂÃÂO FINAL
   ========================================================================== */

/* 1. Wrapper Principal */
.ts-wrapper { width: 100%; }

/* 2. O Input (Caixa de SeleÃÂ§ÃÂ£o) */
.ts-control {
    background-color: var(--input-bg, #0B0F17) !important;
    border: 1px solid var(--border-color, #223042) !important;
    color: #fff !important;
    border-radius: 6px;
    min-height: 38px; /* Altura padrÃÂ£o Bootstrap */
    padding: 0.375rem 0.75rem;
    display: flex;
    align-items: center;
    box-shadow: none !important;
}

/* Remove paddings extras */
.ts-wrapper.single .ts-control, 
.ts-wrapper.multi .ts-control {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.ts-control input { color: #fff !important; font-weight: 500; margin: 0 !important; }

/* 3. MENU FLUTUANTE */
.ts-dropdown {
    background-color: var(--bg-panel, #131B26) !important;
    border: 1px solid var(--border-color, #223042) !important;
    color: #e0e0e0 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border-radius: 6px;
    margin-top: -30px;
    
    /* SEGREDOS PARA FLUTUAR SOBRE TUDO */
    position: absolute;
    z-index: 999999 !important; 
}

/* 1. Campo de Busca DENTRO da lista (Dropdown Input) */
.ts-dropdown .dropdown-input {
    color: #fff !important; /* Texto branco para leitura */
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color, #223042);
    padding: 10px 15px;
}

/* 2. OpÃÂ§ÃÂ£o Normal (Estado de Repouso) */
.ts-dropdown .option {
    color: #ccc; /* Cinza claro */
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* DivisÃÂ³ria sutil */
    transition: all 0.1s ease;
}

/* 3. OpÃÂ§ÃÂ£o JÃÂ Selecionada (Mas sem o mouse em cima) */
.ts-dropdown .option.selected {
    color: var(--accent, #ffff00); /* Texto Amarelo */
    background-color: rgba(255, 255, 0, 0.05); /* Fundo quase imperceptÃÂ­vel */
    font-weight: bold;
}

/* 4. OpÃÂ§ÃÂ£o HOVER ou ACTIVE (Onde o usuÃÂ¡rio estÃÂ¡ focando agora) */
/* O !important garante que o hover ganhe do 'selected' */
.ts-dropdown .option.active, 
.ts-dropdown .option:hover {
    background-color: var(--accent, #ffff00) !important;
    color: #000 !important; /* Contraste preto no amarelo */
    font-weight: 800;
}

/* 5. Item Especial: "Criar Novo..." */
.ts-dropdown .create {
    color: var(--accent, #ffff00);
    padding: 12px 15px;
    background-color: rgba(255, 255, 0, 0.05); /* Fundo suave */
    border-top: 1px dashed var(--border-color, #223042);
}

/* Hover no "Criar Novo" */
.ts-dropdown .create:hover,
.ts-dropdown .create.active {
    background-color: var(--accent, #ffff00) !important;
    color: #000 !important;
    font-weight: bold;
}

/* Seta do Select (Apenas cosmÃÂ©tico) */
.ts-wrapper.single .ts-control::after {
    border-color: #999 transparent transparent transparent !important;
    border-width: 5px 5px 0 5px !important;
    right: 15px;
}

/* ==========================================================================
   AJUSTE DE ALTURA DA LISTA (MAX-HEIGHT)
   ========================================================================== */
.ts-dropdown .ts-dropdown-content {
    /* O padrÃÂ£o ÃÂ© uns 200px. Vamos dobrar ou triplicar. */
    max-height: 450px !important; 
    
    /* Opcional: Melhora a barra de rolagem no Chrome/Edge */
    scrollbar-width: thin; 
    scrollbar-color: var(--accent) var(--bg-panel);
}

/* (Opcional) Estiliza a barra de rolagem webkit para ficar bonita */
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar {
    width: 6px;
}
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color, #223042);
    border-radius: 3px;
}

.ts-dropdown .ts-dropdown-content {
    /* O padrÃÂ£o ÃÂ© uns 200px. Vamos dobrar ou triplicar. */
    max-height: 450px !important; 
    
    /* Opcional: Melhora a barra de rolagem no Chrome/Edge */
    scrollbar-width: thin; 
    scrollbar-color: var(--accent) var(--bg-panel);
}

/* Tom Select — legibilidade no modo claro (propriedades, intake, etc.) */
html[data-theme="light"] .ts-control,
html[data-theme="light"] .ts-wrapper.single .ts-control {
  background-color: var(--bg-input, #fff) !important;
  border-color: var(--border-medium, var(--border-color, #c9d2de)) !important;
  color: var(--text-primary, #1a2332) !important;
}

html[data-theme="light"] .ts-control input {
  color: var(--text-primary, #1a2332) !important;
}

html[data-theme="light"] .ts-wrapper.single .ts-control > .item {
  color: var(--text-primary, #1a2332) !important;
}

html[data-theme="light"] .ts-dropdown {
  background-color: var(--bg-surface, #fff) !important;
  border-color: var(--border-medium, #c9d2de) !important;
  color: var(--text-primary, #1a2332) !important;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
}

html[data-theme="light"] .ts-dropdown .dropdown-input {
  color: var(--text-primary, #1a2332) !important;
  border-bottom-color: var(--border-subtle, #e2e8f0) !important;
}

html[data-theme="light"] .ts-dropdown .option {
  color: var(--text-primary, #1a2332) !important;
  border-bottom-color: color-mix(in srgb, var(--border-subtle, #e2e8f0) 90%, transparent);
}

html[data-theme="light"] .ts-dropdown .option.selected {
  color: #7a5b10 !important;
  background-color: rgba(201, 162, 39, 0.1) !important;
}

html[data-theme="light"] .ts-dropdown .option.active,
html[data-theme="light"] .ts-dropdown .option:hover {
  background-color: var(--accent, #c9a227) !important;
  color: #111 !important;
}

html[data-theme="light"] .ts-dropdown .create {
  color: #7a5b10;
  background-color: rgba(201, 162, 39, 0.08);
  border-top-color: var(--border-medium, #c9d2de);
}

html[data-theme="light"] .ts-wrapper.single .ts-control::after {
  border-color: #6b7a8d transparent transparent transparent !important;
}

/* Como a lista da esquerda nÃÂ£o tem ID, vamos pegar pela classe dentro da coluna 4 */
/* Aplica em TODOS os corpos de card que tÃÂªm rolagem */
.card-body.overflow-auto::-webkit-scrollbar {
    width: 6px;
}

.card-body.overflow-auto::-webkit-scrollbar-thumb {
    background-color: var(--accent); 
    border-radius: 4px;
}

/* Pesquisa de satisfaÃÂ§ÃÂ£o Ã¢ÂÂ estrelas */
.survey-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.survey-star-btn {
    color: inherit;
    text-decoration: none;
    line-height: 1;
    font-size: 1.35rem;
}

.survey-star-btn:hover .bi-star,
.survey-star-btn.is-active .bi-star-fill {
    transform: scale(1.1);
    transition: transform 0.12s ease;
}

.survey-stars-display .bi {
    font-size: 0.95rem;
}

.survey-dimension-row:last-child {
    margin-bottom: 0 !important;
}

/* ---- Inputs em caixa alta (opt-in body.dh-uppercase-inputs) ---- */
body.dh-uppercase-inputs input:not([type="email"]):not([type="password"]):not([type="number"]):not([type="date"]):not([type="datetime-local"]):not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="tel"]):not(.dh-no-uppercase):not([name="email"]):not([name="cpf"]):not([name="cnpj"]):not([name="rep_cpf"]):not([name="end_cep"]):not([name="dh_loc_zip"]):not([name="dh_loc_zip_fat"]):not([name="telefone_principal"]):not([name="whatsapp"]):not([name="telefone"]):not([name="telefone_ddi"]):not([name="whatsapp_ddi"]):not([name="website"]),
body.dh-uppercase-inputs textarea:not(.dh-no-uppercase),
body.dh-uppercase-inputs .input-uppercase {
    text-transform: uppercase;
}

body.dh-uppercase-inputs .dh-no-uppercase,
body.dh-uppercase-inputs .dh-no-uppercase input,
body.dh-uppercase-inputs .dh-no-uppercase textarea {
    text-transform: none;
}

body.dh-uppercase-inputs input[name="website"],
body.dh-uppercase-inputs .dh-website-lowercase,
body.dh-uppercase-inputs .gestao-website-lowercase {
    text-transform: lowercase;
}

body.dh-uppercase-inputs input[name="cpf"],
body.dh-uppercase-inputs input[name="cnpj"],
body.dh-uppercase-inputs input[name="rep_cpf"],
body.dh-uppercase-inputs input[name="end_cep"],
body.dh-uppercase-inputs input[name="dh_loc_zip"],
body.dh-uppercase-inputs input[name="dh_loc_zip_fat"],
body.dh-uppercase-inputs input[name="telefone_principal"],
body.dh-uppercase-inputs input[name="whatsapp"],
body.dh-uppercase-inputs input[name="telefone"],
body.dh-uppercase-inputs input[name="telefone_ddi"],
body.dh-uppercase-inputs input[name="whatsapp_ddi"],
body.dh-uppercase-inputs input[name="email"],
body.dh-uppercase-inputs input[type="tel"],
body.dh-uppercase-inputs input[type="email"],
body.dh-uppercase-inputs input[type="password"] {
    text-transform: none;
}
/* Remap Â lookup cliente/OS (vÃ­nculo opcional) */
.remap-lookup-results {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface, #131B26);
  max-height: 200px;
  overflow: auto;
}
.remap-lookup-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f2f2f2;
  padding: 8px 12px;
  font-size: 0.9rem;
}
.remap-lookup-item:hover {
  background: rgba(255, 255, 0, 0.12);
  color: var(--accent);
}
.remap-lookup-empty {
  padding: 8px 12px;
  font-size: 0.85rem;
}
.remap-vinculo-block {
  background: rgba(0, 0, 0, 0.2);
}

/* Modal Novidades — card editorial, sem borda de segmento */
#modalNovidades .modal-dialog,
.news-modal-dialog {
  width: min(92vw, 440px);
  max-width: min(92vw, 440px);
}

.news-modal {
  overflow: hidden;
  border: none !important;
  border-radius: 1.15rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.news-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
}

.news-modal__body {
  padding: 1.65rem 1.5rem 0.35rem;
}

.news-modal__badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #94A3B8);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.news-modal__title {
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, var(--text-readable, #F8FAFC));
  line-height: 1.25;
}

.news-modal__lead {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted, #94A3B8);
}

.news-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.news-modal__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.news-modal__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 0.95rem;
}

.news-modal__copy {
  min-width: 0;
}

.news-modal__item-title {
  margin: 0.1rem 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, var(--text-readable, #F8FAFC));
  line-height: 1.3;
}

.news-modal__item-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, #94A3B8);
}

.news-modal__empty {
  color: var(--text-muted, #94A3B8);
  font-size: 0.9rem;
}

.news-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.5rem 1.35rem;
  background: transparent;
}

.news-modal__hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted, #94A3B8);
}

.news-modal__cta {
  border-radius: 999px;
  font-weight: 600;
  padding: 0.45rem 1.15rem;
}

html[data-theme="light"] .news-modal {
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.16);
}

html[data-theme="light"] .news-modal .btn-close-white {
  filter: none;
}

html[data-theme="light"] .news-modal__badge {
  background: var(--bg-app, #eef2f7);
  color: var(--text-muted);
}

html[data-theme="light"] .news-modal__title,
html[data-theme="light"] .news-modal__item-title {
  color: var(--text-primary, #152033);
}

html[data-theme="light"] .news-modal__lead,
html[data-theme="light"] .news-modal__item-desc,
html[data-theme="light"] .news-modal__hint {
  color: var(--text-muted, #6b7a90);
}

html[data-theme="light"] .news-modal__icon {
  background: var(--bg-app, #eef2f7);
}

.ticket-vincular-confirm__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.ticket-vincular-arquivo-box {
  background: #222;
  border: 1px solid var(--border-color, #223042);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.ticket-vincular-arquivo-box__row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ticket-vincular-arquivo-box__row + .ticket-vincular-arquivo-box__row {
  margin-top: 0.7rem;
}
.ticket-vincular-confirm .ticket-vincular-btn-sim,
.ticket-vincular-confirm .ticket-vincular-btn-nao {
  font-weight: 400;
  color: #fff;
  min-width: 5.5rem;
}
.ticket-vincular-confirm .ticket-vincular-btn-sim {
  background-color: #198754;
  border-color: #198754;
}
.ticket-vincular-confirm .ticket-vincular-btn-sim:hover,
.ticket-vincular-confirm .ticket-vincular-btn-sim:focus-visible {
  background-color: #157347;
  border-color: #146c43;
  color: #fff;
  font-weight: 400;
}
.ticket-vincular-confirm .ticket-vincular-btn-nao {
  background-color: #dc3545;
  border-color: #dc3545;
}
.ticket-vincular-confirm .ticket-vincular-btn-nao:hover,
.ticket-vincular-confirm .ticket-vincular-btn-nao:focus-visible {
  background-color: #bb2d3b;
  border-color: #b02a37;
  color: #fff;
  font-weight: 400;
}

/* Modal Remap indisponível (fallback) */
.remap-indisponivel-modal {
  border: 1px solid var(--border-medium, rgba(255,255,255,0.12));
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.45));
}
.remap-indisponivel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.remap-indisponivel-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border-medium, rgba(255,255,255,0.12));
  background: var(--bg-surface, rgba(255,255,255,0.03));
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.remap-indisponivel-btn:hover,
.remap-indisponivel-btn:focus-visible {
  transform: translateY(-1px);
  background: var(--bg-surface-hover, rgba(255,255,255,0.06));
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}
.remap-indisponivel-btn:hover .remap-indisponivel-btn-icon,
.remap-indisponivel-btn:focus-visible .remap-indisponivel-btn-icon,
.remap-indisponivel-btn:hover .remap-indisponivel-btn-title,
.remap-indisponivel-btn:focus-visible .remap-indisponivel-btn-title {
  color: var(--accent, #ffff00);
}
.remap-indisponivel-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #fff);
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.remap-indisponivel-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.remap-indisponivel-btn-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  line-height: 1.25;
  transition: color 0.15s ease;
}
.remap-indisponivel-btn-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted, #aaa);
}
html[data-theme="light"] .remap-indisponivel-btn:hover,
html[data-theme="light"] .remap-indisponivel-btn:focus-visible {
  border-color: color-mix(in srgb, var(--brand-secondary, #2563eb) 40%, var(--border-medium));
}
html[data-theme="light"] .remap-indisponivel-btn:hover .remap-indisponivel-btn-icon,
html[data-theme="light"] .remap-indisponivel-btn:focus-visible .remap-indisponivel-btn-icon,
html[data-theme="light"] .remap-indisponivel-btn:hover .remap-indisponivel-btn-title,
html[data-theme="light"] .remap-indisponivel-btn:focus-visible .remap-indisponivel-btn-title {
  color: var(--brand-secondary, #2563eb);
}
html[data-theme="light"] .remap-indisponivel-btn-icon {
  background: color-mix(in srgb, var(--brand-secondary, #2563eb) 10%, transparent);
  color: var(--text-primary);
}
html[data-theme="light"] .remap-indisponivel-btn-title {
  color: var(--text-primary);
}
