/* Base */
html, body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.no-scroll { overflow: hidden; }

/* Ícones */
.ico-sm { width: 20px; height: 20px; }
.ico-md { width: 24px; height: 24px; }

/* Layout */
.app-body {
  background: #f1f5f9; /* slate-100 */
  min-height: 100vh;
}

/* Desktop: layout lado a lado (sidebar + main) */
@media (min-width: 768px) {
  .app-body {
    display: flex;
  }
}

/* Overlay mobile */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  z-index: 40;
}
.mobile-overlay-show { display: block; }

/* Sidebar: mobile drawer */
.sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  width: 16rem; /* 64 */
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 50;

  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;

  transform: translateX(-100%);
}
.sidebar-open { transform: translateX(0); }

/* Desktop: sidebar fixo no layout (não drawer) */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
  }
  .sidebar-open { transform: none; }
}

/* Desktop collapsed */
@media (min-width: 768px) {
  .sidebar.sidebar-collapsed { width: 5rem; /* 20 */ }
}

/* Header sidebar */
.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0;
}
.sidebar-logo {
  height: 32px;
  object-fit: contain;
}

/* Buttons */
.sidebar-btn {
  padding: 8px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-btn:hover { background: #f1f5f9; }

.sidebar-btn-desktop { display: none; }
.sidebar-btn-mobile { display: inline-flex; }

@media (min-width: 768px) {
  .sidebar-btn-desktop { display: inline-flex; }
  .sidebar-btn-mobile { display: none; }
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
}
.sidebar-link:hover { background: #f1f5f9; }

.sidebar-link-active {
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
}

.sidebar-link-logout { color: #e11d48; }
.sidebar-link-logout:hover { background: #fff1f2; }

/* Main */
.app-main{
  width: 100%;
  min-width: 0; /* evita corte por overflow do flex */
}

/* Topbar */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  height: 64px;
  padding: 0 16px; /* mais “real”, avatar no máximo da direita com padding mínimo */
  display: flex;
  align-items: center;
}
.topbar-inner {
  width: 100%;
  max-width: none;   /* GARANTE: não vira container “centralizado” */
  margin: 0;         /* remove qualquer “margem fantasma” */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  color: #334155;
  font-weight: 600;
  font-size: 16px;
}
.topbar-title-strong { color: #0f172a; }
.topbar-title-muted { color: #94a3b8; font-weight: 400; margin-left: 6px; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto; /* reforça colar à direita */
}

.topbar-user {
  text-align: right;
  line-height: 1.1;
  display: none;
}
@media (min-width: 640px) {
  .topbar-user { display: block; }
}

.topbar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.topbar-user-role {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

/* Content */
.content{
  width: 100%;
  padding: 24px; /* padding global desktop */
}

/* AQUI estava “cagando” o layout: max-width 1200 deixava tudo pequeno */
.content-inner {
  width: 100%;
  max-width: none;  /* usa a página toda */
  margin: 0;        /* sem centralização */
}

/* Cards (tamanho “bonito”, não encolhe) */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

/* Em telas médias, 2 colunas */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Em telas grandes, 4 colunas (aproveita a largura agora que não tem max-width) */
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Força cores dos ícones dos cards */
.card-icon-ok     { background: #d1fae5 !important; color: #059669 !important; }
.card-icon-warn   { background: #fef3c7 !important; color: #d97706 !important; }
.card-icon-info   { background: #dbeafe !important; color: #2563eb !important; }
.card-icon-danger { background: #ffe4e6 !important; color: #e11d48 !important; }

.card-label {
  font-size: 14px;
  color: #64748b;
}
.card-value {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
}

/* Panel */
.panel{
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}

.panel-title {
  font-weight: 600;
  color: #334155;
  font-size: 16px;
}
.panel-sub {
  margin-top: 8px;
  color: #64748b;
  font-size: 14px;
}

/* Dot status (Online) */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid #e2e8f0;
  vertical-align: middle;
}

.dot-online  { background: #16a34a; border-color: #bbf7d0; } /* verde */
.dot-blocked { background: #dc2626; border-color: #fecaca; } /* vermelho */
.dot-empty   { background: #94a3b8; border-color: #e2e8f0; } /* cinza */

/* Botões genéricos (mantidos) */
.btn{
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
}

.btn-outline-danger{
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.btn-outline-danger:hover{ background: #fee2e2; }

.btn-outline-success{
  border: 1px solid #86efac;
  color: #16a34a;
}
.btn-outline-success:hover{ background: #dcfce7; }

/* Mobile shadow on drawer + paddings */
@media (max-width: 767px) {
  .sidebar {
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  }

  .content {
    padding: 16px;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-title {
    font-size: 14px;
  }

  .card-value {
    font-size: 24px;
  }
}

/* Mobile: sidebar fica fixa e pode rolar por dentro */
@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* ===========================
   Modal de Ação (Informar/Perguntar)
   =========================== */

.acao-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 1000;
}

.acao-overlay.show {
  display: block;
}

.acao-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.acao-modal.show {
  display: flex;
}

.acao-card {
  width: min(520px, 96vw);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}

.acao-modal.show .acao-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.acao-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.acao-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.acao-title {
  font-weight: 800;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
}

.acao-body {
  padding: 14px 16px 4px;
}

.acao-msg {
  color: #334155;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.acao-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 16px 16px;
}

.acao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
}

.acao-btn:hover { background: #f8fafc; }

.acao-btn-primary {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.acao-btn-primary:hover { filter: brightness(0.95); }

.acao-btn-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}
.acao-btn-danger:hover { background: #ffe4e6; }

.acao-btn-ghost {
  background: #fff;
  border-color: #e2e8f0;
  color: #334155;
}

/* Tipos */
.acao-icon.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.acao-icon.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.acao-icon.danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}
.acao-icon.success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

/* Check animado (sucesso) */
.acao-check {
  width: 22px;
  height: 22px;
  display: block;
}
.acao-check path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: acao-draw .42s ease forwards;
}
@keyframes acao-draw {
  to { stroke-dashoffset: 0; }
}

/* Esc / focus */
.acao-hidden {
  display: none !important;
}

/* ===========================
   Toggle PixPDV (Produção/Homologação)
   =========================== */

.pix-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.pix-toggle__label {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a; /* slate-900 */
  white-space: nowrap;
}

.pix-toggle__hint {
  font-size: 12px;
  font-weight: 600;
  color: #64748b; /* slate-500 */
  white-space: nowrap;
}

/* input escondido */
.pix-switch {
  position: absolute;
  margin-left: -9999px;
  visibility: hidden;
}

/* trilho */
.pix-switch + label {
  display: inline-block;
  position: relative;
  cursor: pointer;
  outline: none;
  user-select: none;

  width: 54px;
  height: 28px;
  border-radius: 999px;

  background: #ffffff;
  border: 1px solid #e2e8f0; /* slate-200 */
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);

  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* bolinha */
.pix-switch + label:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0f172a; /* slate-900 */
  transition: transform 0.18s ease;
}

/* checked = PRODUÇÃO (bolinha direita) */
.pix-switch:checked + label:after {
  transform: translateX(26px);
}

.pix-switch:checked + label {
  border-color: #0f172a;
}

/* foco acessível */
.pix-switch:focus + label {
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.18), 0 1px 2px rgba(15, 23, 42, 0.06);
}


.in[readonly]{
  background:#f8fafc;
  color:#94a3b8;
  border-color:#e5e7eb;
  cursor:not-allowed;
  box-shadow:none;
}


/* Header do card: esquerda (texto) / direita (ações) */
.pix-card-head{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:12px;
  align-items:start;
}

/* Evita que ações "amassem" o texto */
.pix-card-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;          /* se faltar espaço, quebra os botões, NÃO o valor */
  max-width: 260px;        /* trava a área dos botões */
}

/* Botões menores e consistentes */
.pix-card-actions .btn{
  padding:10px 14px;
  border-radius:12px;
  height:40px;
  line-height:1;
  white-space:nowrap;
}

/* Valor do card NÃO quebra */
.pix-card-value{
  white-space:nowrap;
  word-break:keep-all;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Se teu .card-value for block e gigante, reforça */
.card-value, #pixTotal, #pixDisponivel, #pixBloqueado{
  white-space:nowrap;
}


/* =========================================================
   VIEWPORT GRID SYSTEM v39
   Telas de listagem: página fixa na viewport e rolagem apenas
   dentro da área de dados. Mobile-first e responsivo por dvh.
   ========================================================= */
:root{
  --dbw-viewport-h: 100dvh;
  --dbw-grid-bottom-gap: 10px;
}

.grid-viewport-page{
  height: var(--dbw-viewport-h, 100dvh);
  min-height: 0;
  overflow: hidden;
}
.grid-viewport-page .app-main{
  height: var(--dbw-viewport-h, 100dvh);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.grid-viewport-page .topbar{ flex: 0 0 64px; }
.grid-viewport-page .content{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.2vw, 16px);
}
.grid-viewport-page .content-inner{
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* Menos “caixas gigantes” nas telas com listagem, sem alterar o padrão dos botões. */
.grid-viewport-page .panel{
  padding: clamp(8px, 1vw, 12px);
  border-radius: 14px;
}
.grid-viewport-page .content-inner .mt-4{ margin-top: .5rem !important; }
.grid-viewport-page form[method="get"].grid,
.grid-viewport-page form[method="get"] .grid{ gap: .5rem !important; }
.grid-viewport-page form[method="get"] .in,
.grid-viewport-page form[method="get"] input:not([type="radio"]):not([type="checkbox"]),
.grid-viewport-page form[method="get"] select{
  min-height: 36px;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}
.grid-viewport-page form[method="get"] label{ margin-bottom: .25rem !important; }

.grid-viewport-page [data-grid-scroll]{
  min-height: 0;
  overflow: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.grid-viewport-page [data-grid-scroll] thead th{
  position: sticky;
  top: 0;
  z-index: 8;
  background: #fff;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}
.grid-viewport-page [data-grid-actions]{
  flex: 0 0 auto;
  position: relative;
  z-index: 12;
  background: #fff;
}

@media (max-width: 767px){
  .grid-viewport-page .topbar{ flex-basis: 56px; height: 56px; }
  .grid-viewport-page .content{ padding: 8px; }
  .grid-viewport-page .panel{ padding: 8px; border-radius: 12px; }
  .grid-viewport-page form[method="get"].grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .grid-viewport-page form[method="get"] > .filter-client-block,
  .grid-viewport-page form[method="get"] > .filter-status-block,
  .grid-viewport-page form[method="get"] > .filter-submit-block{ grid-column: 1 / -1; }
  .grid-viewport-page .content-inner .mt-4{ margin-top: .375rem !important; }
}

@media (max-height: 760px){
  .grid-viewport-page .topbar{ flex-basis: 54px; height: 54px; }
  .grid-viewport-page .content{ padding-top: 6px; padding-bottom: 6px; }
  .grid-viewport-page .panel{ padding-top: 7px; padding-bottom: 7px; }
}

/* ===========================
   Sidebar recolhida — ícones legíveis + identificação no hover
   =========================== */
@media (min-width: 768px) {
  .sidebar.sidebar-collapsed {
    overflow: visible;
  }

  .sidebar.sidebar-collapsed .sidebar-nav {
    padding-left: 10px;
    padding-right: 10px;
    gap: 7px;
  }

  .sidebar.sidebar-collapsed .sidebar-group {
    width: 100%;
  }

  .sidebar.sidebar-collapsed .sidebar-link {
    position: relative;
    justify-content: center;
    gap: 0;
    min-height: 46px;
    padding: 10px;
    width: 100%;
    transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
  }

  .sidebar.sidebar-collapsed .sidebar-link > svg:first-child,
  .sidebar.sidebar-collapsed .sidebar-link > .ico-sm:first-child {
    width: 23px;
    height: 23px;
    min-width: 23px;
    min-height: 23px;
    transition: transform .16s ease, stroke-width .16s ease;
  }

  .sidebar.sidebar-collapsed .sidebar-link:hover {
    background: #f1f5f9;
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  }

  .sidebar.sidebar-collapsed .sidebar-link:hover > svg:first-child,
  .sidebar.sidebar-collapsed .sidebar-link:hover > .ico-sm:first-child {
    transform: scale(1.14);
    stroke-width: 2.15;
  }

  .sidebar.sidebar-collapsed .sidebar-link-active {
    background: #ecfdf5;
  }

  /* O chevron não deve disputar espaço com o ícone quando a barra está recolhida. */
  .sidebar.sidebar-collapsed .sidebar-chevron {
    display: none !important;
  }

  /* Subitens continuam acessíveis, mas sem recuo/borda que espremam o ícone. */
  .sidebar.sidebar-collapsed .sidebar-submenu {
    margin: 3px 0 5px 0 !important;
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  .sidebar.sidebar-collapsed .sidebar-sublink {
    min-height: 42px;
    padding: 9px 10px;
  }

  .sidebar.sidebar-collapsed .sidebar-sublink > svg:first-child,
  .sidebar.sidebar-collapsed .sidebar-sublink > .ico-sm:first-child {
    width: 21px;
    height: 21px;
    min-width: 21px;
    min-height: 21px;
  }

  /* Tooltip próprio: aparece somente no modo recolhido. */
  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]::after {
    content: attr(data-sidebar-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    z-index: 1200;
    transform: translate(7px, -50%) scale(.97);
    transform-origin: left center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
    padding: 8px 11px;
    border-radius: 9px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .22);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  }

  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]::before {
    content: '';
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    z-index: 1201;
    width: 8px;
    height: 8px;
    background: #0f172a;
    transform: translate(8px, -50%) rotate(45deg) scale(.8);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  }

  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]:hover::after,
  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%) scale(1);
  }

  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]:hover::before,
  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]:focus-visible::before {
    opacity: 1;
    visibility: visible;
    transform: translate(4px, -50%) rotate(45deg) scale(1);
  }
}

/* =========================================================
   Manager ERP UI 2.0 - temas claro/escuro + Bootstrap Icons
   ========================================================= */
:root,
html[data-theme="light"] {
  --erp-bg: #eef2f7;
  --erp-surface: #ffffff;
  --erp-surface-2: #f8fafc;
  --erp-border: #dbe3ee;
  --erp-text: #172033;
  --erp-muted: #64748b;
  --erp-sidebar: #111827;
  --erp-sidebar-2: #0b1220;
  --erp-sidebar-text: #cbd5e1;
  --erp-accent: #2563eb;
  --erp-accent-soft: #dbeafe;
  color-scheme: light;
}
html[data-theme="dark"] {
  --erp-bg: #07101d;
  --erp-surface: #0e1a2b;
  --erp-surface-2: #111f33;
  --erp-border: #253650;
  --erp-text: #e8eef8;
  --erp-muted: #93a4bb;
  --erp-sidebar: #060b13;
  --erp-sidebar-2: #0a1220;
  --erp-sidebar-text: #c7d2e2;
  --erp-accent: #60a5fa;
  --erp-accent-soft: #102a4f;
  color-scheme: dark;
}

body.app-body { background: var(--erp-bg); color: var(--erp-text); }
.sidebar {
  background: linear-gradient(180deg,var(--erp-sidebar),var(--erp-sidebar-2));
  border-right-color: rgba(148,163,184,.16);
  box-shadow: 10px 0 30px rgba(15,23,42,.08);
}
.sidebar-header { border-bottom-color: rgba(148,163,184,.16); min-height:64px; }
.sidebar-logo { max-width: 150px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.18)); }
.sidebar-btn { color:#94a3b8; }
.sidebar-btn:hover { background:rgba(148,163,184,.12); color:#fff; }
.sidebar-link { color: var(--erp-sidebar-text); border:1px solid transparent; padding:10px 12px; border-radius:10px; }
.sidebar-link:hover { background:rgba(148,163,184,.10); color:#fff; }
.sidebar-link-active { background:rgba(37,99,235,.20); color:#dbeafe; border-color:rgba(96,165,250,.22); box-shadow:inset 3px 0 0 #3b82f6; }
.sidebar-submenu { border-left-color:rgba(148,163,184,.20)!important; }
.sidebar-footer { border-top-color:rgba(148,163,184,.16); }
.sidebar-link-logout { color:#fda4af; }
.sidebar-link-logout:hover { background:rgba(244,63,94,.14); color:#fecdd3; }

.topbar {
  background: color-mix(in srgb, var(--erp-surface) 94%, transparent);
  border-bottom-color:var(--erp-border);
  box-shadow:0 1px 0 rgba(15,23,42,.03);
  backdrop-filter: blur(12px);
  position:sticky; top:0; z-index:35;
}
.topbar-title { color:var(--erp-muted); }
.topbar-title-strong,.topbar-user-name { color:var(--erp-text); }
.topbar-title-muted,.topbar-user-role { color:var(--erp-muted); }
.avatar { border-color:var(--erp-border); box-shadow:0 0 0 3px color-mix(in srgb,var(--erp-accent) 12%, transparent); }
.theme-toggle {
  width:38px;height:38px;border-radius:10px;border:1px solid var(--erp-border);background:var(--erp-surface-2);color:var(--erp-text);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:.16s ease;
}
.theme-toggle:hover { transform:translateY(-1px); border-color:var(--erp-accent); }
html[data-theme="light"] .theme-icon-light { display:none; }
html[data-theme="dark"] .theme-icon-dark { display:none; }

.content { background:var(--erp-bg); }
.panel,.card { background:var(--erp-surface); border-color:var(--erp-border); box-shadow:0 8px 24px rgba(15,23,42,.04); border-radius:14px; }
.panel-title,.card-value { color:var(--erp-text); }
.panel-sub,.card-label { color:var(--erp-muted); }

/* Ícones Bootstrap como sucessor do Lucide sem quebrar chamadas legadas. */
.bootstrap-icon,.bi { display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:-.08em; }
.ico-sm.bootstrap-icon,.ico-sm.bi { width:20px;height:20px;font-size:18px; }
.ico-md.bootstrap-icon,.ico-md.bi { width:24px;height:24px;font-size:22px; }
.w-3\.5.bootstrap-icon,.w-3\.5.bi { font-size:14px; }
.w-4.bootstrap-icon,.w-4.bi { font-size:16px; }
.w-5.bootstrap-icon,.w-5.bi { font-size:20px; }
.bi-spin { animation:erp-bi-spin .9s linear infinite; }
@keyframes erp-bi-spin { to { transform:rotate(360deg); } }

/* Formulários mais próximos de ERP desktop: densidade, contraste e foco previsível. */
input:not([type="checkbox"]):not([type="radio"]),select,textarea {
  border-color:var(--erp-border)!important;
  background-color:var(--erp-surface)!important;
  color:var(--erp-text)!important;
  box-shadow:none;
}
input:focus,select:focus,textarea:focus { border-color:var(--erp-accent)!important; box-shadow:0 0 0 3px color-mix(in srgb,var(--erp-accent) 15%, transparent)!important; }
input::placeholder,textarea::placeholder { color:color-mix(in srgb,var(--erp-muted) 80%, transparent); }
code { color:inherit; }

/* Dark mode para utilitários Tailwind mais usados pelas telas existentes. */
html[data-theme="dark"] .bg-white { background-color:var(--erp-surface)!important; }
html[data-theme="dark"] .bg-slate-50 { background-color:var(--erp-surface-2)!important; }
html[data-theme="dark"] .bg-slate-100 { background-color:#17263a!important; }
html[data-theme="dark"] .bg-slate-900 { background-color:#020617!important; }
html[data-theme="dark"] .border-slate-100,
html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] .border-slate-300 { border-color:var(--erp-border)!important; }
html[data-theme="dark"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .divide-slate-200 > :not([hidden]) ~ :not([hidden]) { border-color:var(--erp-border)!important; }
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800,
html[data-theme="dark"] .text-slate-700 { color:var(--erp-text)!important; }
html[data-theme="dark"] .text-slate-600,
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 { color:var(--erp-muted)!important; }
html[data-theme="dark"] .hover\:bg-slate-50:hover,
html[data-theme="dark"] .hover\:bg-slate-100:hover { background-color:#17263a!important; }
html[data-theme="dark"] .shadow-sm,html[data-theme="dark"] .shadow { box-shadow:0 8px 24px rgba(0,0,0,.22)!important; }

/* Cores suaves ganham superfícies escuras equivalentes. */
html[data-theme="dark"] .bg-emerald-50 { background-color:#0b2a23!important; }
html[data-theme="dark"] .bg-indigo-50 { background-color:#171d3b!important; }
html[data-theme="dark"] .bg-violet-50\/70 { background-color:rgba(46,16,101,.38)!important; }
html[data-theme="dark"] .bg-sky-50 { background-color:#09283b!important; }
html[data-theme="dark"] .bg-amber-50 { background-color:#362707!important; }
html[data-theme="dark"] .bg-rose-50 { background-color:#3c121c!important; }
html[data-theme="dark"] .bg-red-50 { background-color:#3b1116!important; }
html[data-theme="dark"] .text-amber-950,html[data-theme="dark"] .text-amber-900,html[data-theme="dark"] .text-amber-800,html[data-theme="dark"] .text-amber-700 { color:#fde68a!important; }
html[data-theme="dark"] .text-indigo-900,html[data-theme="dark"] .text-indigo-800,html[data-theme="dark"] .text-indigo-700 { color:#c7d2fe!important; }
html[data-theme="dark"] .text-violet-950,html[data-theme="dark"] .text-violet-900,html[data-theme="dark"] .text-violet-800 { color:#ddd6fe!important; }
html[data-theme="dark"] table thead { background-color:var(--erp-surface-2); }
html[data-theme="dark"] .modal,html[data-theme="dark"] [role="dialog"] { color:var(--erp-text); }

/* Compactação de desktop para aparência de ERP operacional. */
@media (min-width: 1024px) {
  .content { padding:18px 20px; }
  .panel { padding:14px; }
  .sidebar-nav { padding:12px 10px; gap:3px; }
  .sidebar-link { min-height:40px; }
}

/* =========================================================
   Manager ERP UI 2.1 - sidebar tecnológica + contraste + ícones
   ========================================================= */
.sidebar {
  isolation: isolate;
  overflow-x: visible;
  background:
    radial-gradient(circle at 18% 4%, rgba(37,99,235,.24), transparent 22rem),
    radial-gradient(circle at 105% 48%, rgba(6,182,212,.12), transparent 20rem),
    linear-gradient(180deg, #08111f 0%, #0a1322 48%, #060b13 100%);
}
.sidebar::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.22;
  background-image:
    linear-gradient(rgba(96,165,250,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,.13) 1px, transparent 1px);
  background-size:28px 28px;
  mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 52%, transparent 100%);
}
.sidebar::after {
  content:"";
  position:absolute;
  top:0; right:-1px; bottom:0;
  width:1px;
  pointer-events:none;
  z-index:2;
  background:linear-gradient(to bottom, transparent, rgba(56,189,248,.55) 18%, rgba(59,130,246,.22) 68%, transparent);
  box-shadow:0 0 18px rgba(56,189,248,.12);
}
.sidebar > * { position:relative; z-index:1; }
.sidebar-header {
  height:72px;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border-bottom:1px solid rgba(148,163,184,.12);
}
.sidebar-logo {
  height:36px;
  max-width:156px;
  transition:filter .2s ease, opacity .2s ease, transform .2s ease;
}
html[data-theme="dark"] .sidebar-logo {
  filter:brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0,0,0,.28));
}
.sidebar-btn {
  color:#9fb2cc;
  border:1px solid rgba(148,163,184,.12);
  background:rgba(15,23,42,.34);
  transition:all .16s ease;
}
.sidebar-btn:hover {
  color:#fff;
  border-color:rgba(96,165,250,.38);
  background:rgba(37,99,235,.22);
  box-shadow:0 0 0 3px rgba(59,130,246,.08), 0 8px 22px rgba(0,0,0,.14);
}
.sidebar-nav { scrollbar-color:rgba(96,165,250,.35) transparent; }
.sidebar-group { position:relative; }
.sidebar-link {
  min-height:44px;
  padding:7px 9px;
  gap:10px;
  border:1px solid transparent;
  border-radius:12px;
  color:#b8c6d9;
  letter-spacing:.005em;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;
}
.sidebar-link > .bootstrap-icon:first-child,
.sidebar-link > .bi:first-child {
  flex:0 0 32px;
  width:32px;
  height:32px;
  border-radius:9px;
  font-size:17px;
  color:#9fb5d0;
  background:rgba(148,163,184,.075);
  border:1px solid rgba(148,163,184,.08);
  transition:all .16s ease;
}
.sidebar-link:hover {
  color:#f8fbff;
  background:linear-gradient(90deg, rgba(30,64,175,.24), rgba(14,116,144,.10));
  border-color:rgba(96,165,250,.17);
  transform:translateX(2px);
}
.sidebar-link:hover > .bootstrap-icon:first-child,
.sidebar-link:hover > .bi:first-child {
  color:#e0f2fe;
  background:linear-gradient(135deg, rgba(37,99,235,.34), rgba(6,182,212,.18));
  border-color:rgba(125,211,252,.25);
  box-shadow:0 0 16px rgba(56,189,248,.10);
}
.sidebar-link-active {
  color:#eff6ff !important;
  font-weight:700;
  background:linear-gradient(90deg, rgba(37,99,235,.34), rgba(14,116,144,.16)) !important;
  border-color:rgba(96,165,250,.27) !important;
  box-shadow:inset 3px 0 0 #38bdf8, 0 8px 24px rgba(2,132,199,.08) !important;
}
.sidebar-link-active > .bootstrap-icon:first-child,
.sidebar-link-active > .bi:first-child {
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#0891b2);
  border-color:rgba(186,230,253,.38);
  box-shadow:0 6px 18px rgba(37,99,235,.24);
}
.sidebar-chevron { color:#7186a2; }
.sidebar-submenu {
  margin:4px 0 7px 18px !important;
  padding-left:13px !important;
  border-left:1px solid rgba(56,189,248,.16) !important;
}
.sidebar-sublink { min-height:38px; font-size:13px; }
.sidebar-sublink > .bootstrap-icon:first-child,
.sidebar-sublink > .bi:first-child { flex-basis:27px; width:27px; height:27px; border-radius:8px; font-size:14px; }
.sidebar-footer { background:rgba(2,6,23,.20); }
.sidebar-link-logout { color:#fda4af; }
.sidebar-link-logout > .bootstrap-icon:first-child,
.sidebar-link-logout > .bi:first-child { color:#fda4af; background:rgba(244,63,94,.08); border-color:rgba(251,113,133,.12); }
.sidebar-link-logout:hover { background:rgba(190,24,93,.15) !important; border-color:rgba(251,113,133,.18); }

/* Sidebar recolhida: jamais usa fundos claros; grupos viram flyouts tecnológicos. */
@media (min-width:768px) {
  .sidebar.sidebar-collapsed { width:78px; overflow:visible; }
  .sidebar.sidebar-collapsed .sidebar-header { justify-content:center; padding:0 10px; }
  .sidebar.sidebar-collapsed .sidebar-btn-desktop { width:42px; height:42px; }
  .sidebar.sidebar-collapsed .sidebar-nav { padding:12px 10px; gap:5px; overflow:visible; }
  .sidebar.sidebar-collapsed .sidebar-link {
    min-height:50px;
    padding:8px;
    justify-content:center;
    color:#aebed2;
    background:transparent;
    border-color:transparent;
    box-shadow:none;
  }
  .sidebar.sidebar-collapsed .sidebar-link > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link > .ico-sm:first-child {
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    font-size:19px;
    color:#aebed2;
    background:rgba(148,163,184,.075);
    border:1px solid rgba(148,163,184,.09);
    border-radius:10px;
  }
  .sidebar.sidebar-collapsed .sidebar-link:hover {
    color:#fff;
    background:rgba(37,99,235,.17) !important;
    border-color:rgba(96,165,250,.18);
    transform:translateX(2px);
    box-shadow:0 8px 22px rgba(0,0,0,.16);
  }
  .sidebar.sidebar-collapsed .sidebar-link:hover > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link:hover > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link:hover > .ico-sm:first-child {
    color:#fff;
    background:linear-gradient(135deg,rgba(37,99,235,.72),rgba(8,145,178,.55));
    border-color:rgba(125,211,252,.30);
    transform:scale(1.06);
  }
  .sidebar.sidebar-collapsed .sidebar-link-active {
    color:#fff !important;
    background:linear-gradient(135deg,rgba(37,99,235,.28),rgba(8,145,178,.13)) !important;
    border-color:rgba(96,165,250,.25) !important;
    box-shadow:inset 2px 0 0 #38bdf8, 0 8px 24px rgba(2,132,199,.10) !important;
  }
  .sidebar.sidebar-collapsed .sidebar-link-active > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link-active > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link-active > .ico-sm:first-child {
    color:#fff;
    background:linear-gradient(135deg,#2563eb,#0891b2);
    border-color:rgba(186,230,253,.38);
  }
  .sidebar.sidebar-collapsed .sidebar-chevron { display:none !important; }
  .sidebar.sidebar-collapsed .sidebar-submenu { display:none !important; }
  .sidebar.sidebar-collapsed .sidebar-group:hover > .sidebar-submenu,
  .sidebar.sidebar-collapsed .sidebar-group:focus-within > .sidebar-submenu {
    display:flex !important;
    position:absolute;
    left:calc(100% + 10px);
    top:-5px;
    z-index:1400;
    width:238px;
    margin:0 !important;
    padding:9px !important;
    flex-direction:column;
    gap:3px;
    border:1px solid rgba(96,165,250,.20) !important;
    border-radius:14px;
    background:linear-gradient(180deg,rgba(10,20,36,.98),rgba(5,12,22,.98));
    box-shadow:0 22px 55px rgba(0,0,0,.38), 0 0 0 1px rgba(255,255,255,.025) inset;
    backdrop-filter:blur(18px);
  }
  .sidebar.sidebar-collapsed .sidebar-submenu::before {
    content:"";
    position:absolute;
    left:-6px;
    top:22px;
    width:11px;height:11px;
    transform:rotate(45deg);
    background:#091321;
    border-left:1px solid rgba(96,165,250,.20);
    border-bottom:1px solid rgba(96,165,250,.20);
  }
  .sidebar.sidebar-collapsed .sidebar-sublink {
    justify-content:flex-start;
    min-height:42px;
    padding:6px 8px;
  }
  .sidebar.sidebar-collapsed .sidebar-submenu .sidebar-text.hidden { display:inline !important; }
  .sidebar.sidebar-collapsed .sidebar-submenu .sidebar-sublink > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-submenu .sidebar-sublink > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-submenu .sidebar-sublink > .ico-sm:first-child {
    width:29px; height:29px; min-width:29px; min-height:29px; font-size:15px;
  }
  /* Grupos com flyout não precisam do tooltip simples do item pai. */
  .sidebar.sidebar-collapsed .sidebar-group > .sidebar-parent::after,
  .sidebar.sidebar-collapsed .sidebar-group > .sidebar-parent::before { display:none !important; }
}

/* Tooltips do modo recolhido seguem a linguagem visual do sidebar. */
@media (min-width:768px) {
  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]::after {
    background:#07111f;
    border:1px solid rgba(96,165,250,.20);
    color:#eaf4ff;
    box-shadow:0 16px 38px rgba(0,0,0,.34);
  }
  .sidebar.sidebar-collapsed .sidebar-link[data-sidebar-label]::before { background:#07111f; }
}

/* Botões: ícone automático e contraste consistente. */
.has-auto-icon { display:inline-flex !important; align-items:center; gap:.48rem; }
.auto-button-icon { flex:0 0 auto; font-size:1em; opacity:.92; }
button .bi, .btn .bi, a[class*="btn"] .bi { pointer-events:none; }

html[data-theme="dark"] .btn,
html[data-theme="dark"] .btn-ghost {
  background:var(--erp-surface-2) !important;
  border-color:var(--erp-border) !important;
  color:var(--erp-text) !important;
}
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] .btn:hover {
  background:#17263a !important;
  border-color:#3a5273 !important;
}
html[data-theme="dark"] .btn-prim { background:#2563eb !important; color:#fff !important; border-color:#3b82f6 !important; }
html[data-theme="dark"] .btn-ok { background:#15803d !important; color:#fff !important; border-color:#22c55e !important; }
html[data-theme="dark"] .btn-danger { background:#b91c1c !important; color:#fff !important; border-color:#ef4444 !important; }

/* Tailwind: botões brancos precisam continuar legíveis no escuro. */
html[data-theme="dark"] button.bg-white,
html[data-theme="dark"] a.bg-white,
html[data-theme="dark"] .inline-flex.bg-white {
  background-color:var(--erp-surface-2) !important;
  border-color:var(--erp-border) !important;
}
html[data-theme="dark"] button.bg-white[class*="text-slate"],
html[data-theme="dark"] a.bg-white[class*="text-slate"],
html[data-theme="dark"] .inline-flex.bg-white[class*="text-slate"] { color:var(--erp-text) !important; }

/* Topbar com acabamento técnico discreto. */
.topbar { border-bottom:1px solid var(--erp-border); }
.topbar::after {
  content:"";
  position:absolute;
  left:0; right:0; bottom:-1px;
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(59,130,246,.28),rgba(6,182,212,.15),transparent);
}
.theme-toggle .bi { font-size:18px; }

/* =========================================================
   Manager ERP UI 2.2 / v77 - Dark Forms System
   Normalização global do tema escuro para forms legados.
   ========================================================= */
html[data-theme="dark"] {
  --erp-bg: #07101d;
  --erp-surface: #0b1726;
  --erp-surface-2: #0f1d30;
  --erp-surface-3: #13243a;
  --erp-input: #091523;
  --erp-input-hover: #0d1d31;
  --erp-border: #263a56;
  --erp-border-strong: #385679;
  --erp-text: #e8f0fb;
  --erp-label: #b7c7da;
  --erp-muted: #91a6c0;
  --erp-placeholder: #667d99;
  --erp-accent: #38bdf8;
  --erp-accent-2: #60a5fa;
  --erp-ring: rgba(56,189,248,.18);
  --erp-shadow: 0 14px 34px rgba(0,0,0,.22);
  --erp-shadow-lg: 0 26px 72px rgba(0,0,0,.42);
}

/* Canvas e superfícies: nenhuma "folha branca" dentro do dark mode. */
html[data-theme="dark"] body.app-body,
html[data-theme="dark"] .app-main,
html[data-theme="dark"] .content,
html[data-theme="dark"] .content-inner {
  background-color: var(--erp-bg) !important;
  color: var(--erp-text) !important;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card,
html[data-theme="dark"] .tabpanel,
html[data-theme="dark"] fieldset,
html[data-theme="dark"] .rt-wrap,
html[data-theme="dark"] .pr-card,
html[data-theme="dark"] .pr-grid,
html[data-theme="dark"] .pr-modal,
html[data-theme="dark"] .pr-action-card,
html[data-theme="dark"] .file-meta,
html[data-theme="dark"] .tbl-wrap,
html[data-theme="dark"] .m-card,
html[data-theme="dark"] .preview-card,
html[data-theme="dark"] .album-card,
html[data-theme="dark"] .crm-grid,
html[data-theme="dark"] .crm-editor-shell,
html[data-theme="dark"] .crm-emoji-panel,
html[data-theme="dark"] .crm-message-panel,
html[data-theme="dark"] .crm-email-frame,
html[data-theme="dark"] .link-card,
html[data-theme="dark"] .pix-provider-modal,
html[data-theme="dark"] .p-card,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .rml-stat,
html[data-theme="dark"] .nf-table-wrap,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .ru-grid,
html[data-theme="dark"] .pay-alert-card,
html[data-theme="dark"] #waFloatPanel,
html[data-theme="dark"] .gchat-panel,
html[data-theme="dark"] #metaRevendaQueuePanel {
  background: var(--erp-surface) !important;
  border-color: var(--erp-border) !important;
  color: var(--erp-text) !important;
  box-shadow: var(--erp-shadow) !important;
}

/* Form controls de todos os módulos, inclusive classes legadas. */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .in,
html[data-theme="dark"] .nf-in,
html[data-theme="dark"] .pr-in,
html[data-theme="dark"] .rml-in,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] [contenteditable="true"],
html[data-theme="dark"] .rt-editor,
html[data-theme="dark"] .crm-email-source {
  background: var(--erp-input) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
  caret-color: var(--erp-accent) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.015) !important;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover,
html[data-theme="dark"] .in:hover,
html[data-theme="dark"] .nf-in:hover,
html[data-theme="dark"] .pr-in:hover,
html[data-theme="dark"] .rml-in:hover {
  background: var(--erp-input-hover) !important;
  border-color: var(--erp-border-strong) !important;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .in:focus,
html[data-theme="dark"] .nf-in:focus,
html[data-theme="dark"] .pr-in:focus,
html[data-theme="dark"] .rml-in:focus,
html[data-theme="dark"] [contenteditable="true"]:focus {
  outline: none !important;
  background: #0c1b2d !important;
  border-color: var(--erp-accent) !important;
  box-shadow: 0 0 0 3px var(--erp-ring) !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] [contenteditable="true"][data-placeholder]::before {
  color: var(--erp-placeholder) !important;
  opacity: 1 !important;
}
html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  background: #0b1726 !important;
  color: var(--erp-text) !important;
}
html[data-theme="dark"] input[type="checkbox"],
html[data-theme="dark"] input[type="radio"] { accent-color: #38bdf8; }
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="month"] { color-scheme: dark; }
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] input[readonly],
html[data-theme="dark"] textarea[readonly],
html[data-theme="dark"] .in[readonly] {
  background: #0a1320 !important;
  color: #71849e !important;
  border-color: #1d2d43 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

/* Chrome/Edge autofill não deve recolocar fundo claro. */
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--erp-text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--erp-input) inset !important;
  box-shadow: 0 0 0 1000px var(--erp-input) inset !important;
  transition: background-color 9999s ease-out 0s;
}

/* Labels, legends e textos de apoio. */
html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .pix-toggle__label { color: var(--erp-label) !important; }
html[data-theme="dark"] .panel-sub,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] small { color: var(--erp-muted); }

/* Tabs: ativo não vira papel branco. */
html[data-theme="dark"] .tabs-wrap {
  border-bottom-color: var(--erp-border) !important;
  scrollbar-color: #385679 #091523;
}
html[data-theme="dark"] .tablink {
  color: #91a6c0 !important;
  border-color: transparent !important;
  background: transparent !important;
}
html[data-theme="dark"] .tablink:hover {
  color: #dbeafe !important;
  background: #10213a !important;
}
html[data-theme="dark"] .tablink.active,
html[data-theme="dark"] [role="tab"][aria-selected="true"],
html[data-theme="dark"] .nav-tabs .active {
  color: #eff6ff !important;
  background: linear-gradient(180deg,#132945,#0d1c30) !important;
  border-color: #355274 !important;
  border-bottom-color: #0b1726 !important;
  box-shadow: inset 0 2px 0 #38bdf8, 0 -1px 16px rgba(56,189,248,.05) !important;
}
html[data-theme="dark"] .tabpanel { border-color: var(--erp-border) !important; }

/* Tabelas e grids: seguem a mesma profundidade visual dos forms. */
html[data-theme="dark"] table { color: var(--erp-text); }
html[data-theme="dark"] table thead,
html[data-theme="dark"] table thead th,
html[data-theme="dark"] .tbl th,
html[data-theme="dark"] .grid-scroll thead th,
html[data-theme="dark"] .dizimo-grid thead th,
html[data-theme="dark"] .fin-receber-grid-scroll thead th,
html[data-theme="dark"] .fin-pagar-grid-scroll thead th,
html[data-theme="dark"] .pay-alert-table th,
html[data-theme="dark"] .grid-viewport-page [data-grid-scroll] thead th {
  background: #0a1626 !important;
  color: #9fb2ca !important;
  border-color: var(--erp-border) !important;
  box-shadow: inset 0 -1px 0 var(--erp-border) !important;
}
html[data-theme="dark"] table tbody td { border-color: #21344d !important; }
html[data-theme="dark"] table tbody tr { background-color: transparent; }
html[data-theme="dark"] table tbody tr:hover { background-color: rgba(56,189,248,.045) !important; }
html[data-theme="dark"] .grid-viewport-page [data-grid-actions] { background:#0a1626 !important; border-color:var(--erp-border)!important; }

/* Modais, overlays e dropdowns. */
html[data-theme="dark"] .acao-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] [role="dialog"] > div,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .menu-popover,
html[data-theme="dark"] .pix-provider-option {
  background: var(--erp-surface) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
}
html[data-theme="dark"] .acao-head,
html[data-theme="dark"] .acao-foot,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  border-color: var(--erp-border) !important;
}

/* Toolbars/editor/áreas auxiliares. */
html[data-theme="dark"] .rt-toolbar,
html[data-theme="dark"] .crm-editor-toolbar,
html[data-theme="dark"] .gchat-foot,
html[data-theme="dark"] .gchat-subbar {
  background: var(--erp-surface-2) !important;
  border-color: var(--erp-border) !important;
}

/* Botões secundários antigos, sem branco estourado. */
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .acao-btn,
html[data-theme="dark"] .acao-btn-ghost,
html[data-theme="dark"] .pr-action-ghost,
html[data-theme="dark"] .rt-btn,
html[data-theme="dark"] .btn-na,
html[data-theme="dark"] .btn-undo,
html[data-theme="dark"] .rml-btn-white,
html[data-theme="dark"] .p-filter,
html[data-theme="dark"] .parcela-btn,
html[data-theme="dark"] .pay-alert-btn.ghost,
html[data-theme="dark"] .gchat-tab,
html[data-theme="dark"] .crm-editor-toolbar button,
html[data-theme="dark"] .crm-editor-toolbar select,
html[data-theme="dark"] .crm-upload-btn,
html[data-theme="dark"] .crm-wa-toolbar button,
html[data-theme="dark"] .crm-email-tabs button {
  background: #101f33 !important;
  color: #d7e4f4 !important;
  border-color: #304764 !important;
}
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] .acao-btn:hover,
html[data-theme="dark"] .acao-btn-ghost:hover,
html[data-theme="dark"] .pr-action-ghost:hover,
html[data-theme="dark"] .rt-btn:hover,
html[data-theme="dark"] .rml-btn-white:hover,
html[data-theme="dark"] .p-filter:hover,
html[data-theme="dark"] .parcela-btn:hover,
html[data-theme="dark"] .pay-alert-btn.ghost:hover,
html[data-theme="dark"] .gchat-tab:hover {
  background: #162b45 !important;
  color: #fff !important;
  border-color: #4670a0 !important;
}

/* Classes Tailwind/legacy adicionais que aparecem nos forms. */
html[data-theme="dark"] .bg-gray-50,
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .bg-zinc-50,
html[data-theme="dark"] .bg-neutral-50 { background-color: var(--erp-surface-2) !important; }
html[data-theme="dark"] .border-gray-100,
html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300,
html[data-theme="dark"] .border-zinc-200 { border-color: var(--erp-border) !important; }
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-zinc-900 { color: var(--erp-text) !important; }
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-zinc-500 { color: var(--erp-muted) !important; }

/* Textos customizados antigos que ficavam pretos no fundo escuro. */
html[data-theme="dark"] .acao-title,
html[data-theme="dark"] .acao-msg,
html[data-theme="dark"] .pr-kpi,
html[data-theme="dark"] .pr-action-title,
html[data-theme="dark"] .pr-action-msg,
html[data-theme="dark"] .kpi-value,
html[data-theme="dark"] .plan-title,
html[data-theme="dark"] .plan-value,
html[data-theme="dark"] .link-title,
html[data-theme="dark"] .m-title,
html[data-theme="dark"] .p-resumo-value,
html[data-theme="dark"] .rml-stat-num,
html[data-theme="dark"] .pay-alert-summary-value,
html[data-theme="dark"] .pay-alert-parcela,
html[data-theme="dark"] .metaRevendaQueueItem,
html[data-theme="dark"] .metaRevendaQueueItem b,
html[data-theme="dark"] .gchat-item .l1,
html[data-theme="dark"] .gchat-bub,
html[data-theme="dark"] .cfg-fin-mini span {
  color: var(--erp-text) !important;
}

/* Cards/controles de escolha. */
html[data-theme="dark"] .radio-item,
html[data-theme="dark"] .radio-card,
html[data-theme="dark"] .plan-check,
html[data-theme="dark"] .bulk-check,
html[data-theme="dark"] .check-pill,
html[data-theme="dark"] .rml-check,
html[data-theme="dark"] .rml-folder-name {
  background: var(--erp-surface-2) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
}

/* Widgets legados que usavam estilos inline/estáticos claros. */
html[data-theme="dark"] #waFloatPanel,
html[data-theme="dark"] #metaRevendaQueuePanel,
html[data-theme="dark"] .gchat-panel { background: #0b1726 !important; border-color:var(--erp-border)!important; }
html[data-theme="dark"] .wa-mini-ticket { background:#0b1726 !important; border-color:#21344d !important; }
html[data-theme="dark"] .wa-mini-ticket:hover { background:#102139 !important; }
html[data-theme="dark"] .wa-mini-in { background:#14243a !important; color:#e8f0fb !important; }
html[data-theme="dark"] #waBack { background:#101f33 !important; color:#d7e4f4 !important; border:1px solid #304764 !important; }

/* File upload / input file. */
html[data-theme="dark"] input[type="file"] { color:var(--erp-muted)!important; }
html[data-theme="dark"] input[type="file"]::file-selector-button {
  background:#13243a;
  color:#e8f0fb;
  border:1px solid #355274;
  border-radius:9px;
  padding:.45rem .7rem;
  margin-right:.65rem;
  cursor:pointer;
}
html[data-theme="dark"] input[type="file"]::file-selector-button:hover { background:#19314e; }

/* Scrollbars coerentes em grids e forms. */
html[data-theme="dark"] * { scrollbar-color:#355274 #091523; }
html[data-theme="dark"] *::-webkit-scrollbar { width:10px; height:10px; }
html[data-theme="dark"] *::-webkit-scrollbar-track { background:#091523; }
html[data-theme="dark"] *::-webkit-scrollbar-thumb { background:#304764; border:2px solid #091523; border-radius:999px; }
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover { background:#41638a; }

/* Cobertura complementar de componentes legados detectados na auditoria v77. */
html[data-theme="dark"] .chip,
html[data-theme="dark"] .check-pill,
html[data-theme="dark"] .b-card,
html[data-theme="dark"] .crm-color-label,
html[data-theme="dark"] .gchat-pill,
html[data-theme="dark"] .gchat-bub {
  background: var(--erp-surface-2) !important;
  color: var(--erp-text) !important;
  border-color: var(--erp-border) !important;
}
html[data-theme="dark"] .crm-preview-head button,
html[data-theme="dark"] .pix-btn {
  background: #101f33 !important;
  color: #d7e4f4 !important;
  border-color: #304764 !important;
}
html[data-theme="dark"] .crm-preview-head button:hover,
html[data-theme="dark"] .pix-btn:hover { background:#162b45 !important; border-color:#4670a0 !important; }
html[data-theme="dark"] .crm-email-tabs { border-color:var(--erp-border)!important; }
html[data-theme="dark"] .crm-email-tabs button.active {
  background:#15325a !important;
  border-color:#3b82f6 !important;
  color:#dbeafe !important;
}
html[data-theme="dark"] .crm-email-safety {
  background:#0d2740 !important;
  border-color:#24527a !important;
  color:#b9d6f2 !important;
}
html[data-theme="dark"] .crm-email-safety code { color:#d8e8f8 !important; }
html[data-theme="dark"] .gchat-me .gchat-bub {
  background:#12356d !important;
  color:#fff !important;
  border-color:#2a5795 !important;
}
html[data-theme="dark"] .crm-editor-toolbar input[type="color"] {
  background:#101f33 !important;
  border-color:#304764 !important;
}

/* V79: estado estrutural dos modais. Avisos exibem somente OK; confirmações somente Sim/Não. */
[hidden], .acao-hidden { display: none !important; }


/* V80: menu minimalista solicitado — sem grade, ícones compactos e cantos direitos arredondados. */
.sidebar {
  border-right:0;
  border-radius:0 18px 18px 0;
  background:#0b1320;
  box-shadow:8px 0 24px rgba(2,6,23,.08);
}
.sidebar::before { display:none; }
.sidebar::after { display:none; }
.sidebar-header {
  height:64px;
  min-height:64px;
  background:transparent;
  border-bottom:1px solid rgba(148,163,184,.10);
}
.sidebar-logo { height:31px; max-width:146px; }
.sidebar-nav { padding:10px 9px; gap:2px; }
.sidebar-link {
  min-height:38px;
  padding:6px 9px;
  gap:9px;
  border:0;
  border-radius:9px;
  color:#b9c5d6;
  font-size:13px;
  box-shadow:none;
  transition:background-color .14s ease,color .14s ease;
}
.sidebar-link > .bootstrap-icon:first-child,
.sidebar-link > .bi:first-child,
.sidebar-link > .ico-sm:first-child {
  flex:0 0 22px;
  width:22px;
  height:22px;
  min-width:22px;
  min-height:22px;
  border:0;
  border-radius:0;
  font-size:14px;
  color:#8fa2ba;
  background:transparent;
  box-shadow:none;
}
.sidebar-link:hover {
  color:#f8fafc;
  background:rgba(148,163,184,.09);
  border-color:transparent;
  transform:none;
  box-shadow:none;
}
.sidebar-link:hover > .bootstrap-icon:first-child,
.sidebar-link:hover > .bi:first-child,
.sidebar-link:hover > .ico-sm:first-child {
  color:#dbeafe;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
  transform:none;
}
.sidebar-link-active {
  color:#fff !important;
  background:rgba(37,99,235,.24) !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
.sidebar-link-active > .bootstrap-icon:first-child,
.sidebar-link-active > .bi:first-child,
.sidebar-link-active > .ico-sm:first-child {
  color:#bfdbfe;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
.sidebar-submenu {
  margin:2px 0 5px 15px !important;
  padding-left:10px !important;
  border-left:1px solid rgba(148,163,184,.14) !important;
}
.sidebar-sublink { min-height:34px; font-size:12.5px; }
.sidebar-sublink > .bootstrap-icon:first-child,
.sidebar-sublink > .bi:first-child { width:20px; height:20px; flex-basis:20px; font-size:12px; }
.sidebar-footer { background:transparent; border-top-color:rgba(148,163,184,.10); }
.sidebar-btn { border:0; background:transparent; box-shadow:none; }
.sidebar-btn:hover { border-color:transparent; background:rgba(148,163,184,.09); box-shadow:none; }
@media (min-width:768px) {
  .sidebar.sidebar-collapsed { width:66px; }
  .sidebar.sidebar-collapsed .sidebar-header { padding:0 8px; }
  .sidebar.sidebar-collapsed .sidebar-btn-desktop { width:36px; height:36px; }
  .sidebar.sidebar-collapsed .sidebar-nav { padding:10px 8px; gap:3px; }
  .sidebar.sidebar-collapsed .sidebar-link { min-height:42px; padding:7px; }
  .sidebar.sidebar-collapsed .sidebar-link > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link > .ico-sm:first-child {
    width:24px; height:24px; min-width:24px; min-height:24px;
    font-size:15px; border:0; border-radius:0; background:transparent;
  }
  .sidebar.sidebar-collapsed .sidebar-link:hover,
  .sidebar.sidebar-collapsed .sidebar-link-active {
    transform:none;
    box-shadow:none !important;
  }
  .sidebar.sidebar-collapsed .sidebar-link:hover > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link:hover > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link:hover > .ico-sm:first-child,
  .sidebar.sidebar-collapsed .sidebar-link-active > .bootstrap-icon:first-child,
  .sidebar.sidebar-collapsed .sidebar-link-active > .bi:first-child,
  .sidebar.sidebar-collapsed .sidebar-link-active > .ico-sm:first-child {
    background:transparent;
    border-color:transparent;
    transform:none;
  }
  .sidebar.sidebar-collapsed .sidebar-group:hover > .sidebar-submenu,
  .sidebar.sidebar-collapsed .sidebar-group:focus-within > .sidebar-submenu {
    border-radius:12px;
    background:#0b1320;
    border-color:rgba(148,163,184,.16) !important;
    box-shadow:0 18px 44px rgba(2,6,23,.28);
    backdrop-filter:none;
  }
  .sidebar.sidebar-collapsed .sidebar-submenu::before { background:#0b1320; border-color:rgba(148,163,184,.16); }
}

/* Revenda MetaLabel: alerta de cobrança da própria empresa */
.revenda-cobranca-chip{
  display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 11px;border-radius:10px;
  border:1px solid transparent;font-size:12.5px;font-weight:700;white-space:nowrap;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.revenda-cobranca-chip:hover{transform:translateY(-1px)}
.revenda-cobranca-chip-warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.revenda-cobranca-chip-danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}
.revenda-cobranca-overlay{position:fixed;inset:0;z-index:99990;background:rgba(15,23,42,.56);backdrop-filter:blur(3px);display:grid;place-items:center;overflow:auto;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.revenda-cobranca-overlay[hidden]{display:none!important}
.revenda-cobranca-modal{position:relative;width:min(96vw,940px);max-height:calc(100dvh - 20px);margin:auto;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 22px 64px rgba(15,23,42,.24)}
.revenda-cobranca-close{position:absolute;right:12px;top:12px;z-index:2;width:32px;height:32px;border-radius:9px;border:1px solid rgba(148,163,184,.22);display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.94);color:#475569;cursor:pointer}
.revenda-cobranca-head{display:flex;gap:11px;padding:16px 54px 13px 18px;border-bottom:1px solid #e2e8f0}
.revenda-cobranca-head-warning{background:#fffaf3}
.revenda-cobranca-head-danger{background:#fff6f6}
.revenda-cobranca-head-icon{width:36px;height:36px;flex:0 0 36px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid rgba(148,163,184,.22);color:#0f172a}
.revenda-cobranca-head-icon svg{width:18px;height:18px}
.revenda-cobranca-kicker{font-size:10px;font-weight:800;letter-spacing:.075em;color:#64748b;margin-bottom:2px}
.revenda-cobranca-head h2{font-size:18px;line-height:1.2;font-weight:800;color:#0f172a;margin:0}
.revenda-cobranca-head p{font-size:12.5px;line-height:1.35;color:#475569;margin:4px 0 0}
.revenda-cobranca-body{display:grid;grid-template-columns:190px minmax(0,1fr);column-gap:16px;row-gap:12px;padding:14px 18px 16px}
.revenda-cobranca-summary{grid-column:1/-1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:0}
.revenda-cobranca-summary>div{min-width:0;padding:7px 9px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc}
.revenda-cobranca-summary span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.055em;color:#64748b;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.revenda-cobranca-summary strong{display:block;font-size:12px;line-height:1.25;color:#0f172a;overflow-wrap:anywhere}
.revenda-cobranca-qr-wrap{grid-column:1;text-align:center;margin:0;align-self:start}
.revenda-cobranca-qr{display:block;width:170px;height:170px;max-width:100%;margin:0 auto;border-radius:11px;border:1px solid #e2e8f0;background:#fff;padding:5px}
.revenda-cobranca-qr-label{font-size:10.5px;color:#64748b;margin-top:5px}
.revenda-cobranca-copybox{grid-column:2;border:1px solid #e2e8f0;border-radius:10px;padding:10px;background:#f8fafc;align-self:start}
#revendaCobrancaSemQr{grid-column:1/-1}
.revenda-cobranca-copy-title{font-size:11px;font-weight:700;color:#334155;margin-bottom:5px}
.revenda-cobranca-copybox textarea{width:100%;min-height:48px;max-height:72px;resize:none;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:7px 8px;font:10.5px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;color:#334155;overflow-wrap:anywhere}
.revenda-cobranca-copy-btn,.revenda-cobranca-pay-btn,.revenda-cobranca-later-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;border-radius:9px;padding:0 11px;font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}
.revenda-cobranca-copy-btn{margin-top:6px;border:1px solid #cbd5e1;background:#fff;color:#334155}
.revenda-cobranca-auto-baixa{grid-column:1/-1;display:flex;align-items:center;gap:6px;margin:0;padding:7px 9px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0;color:#64748b;font-size:11px;line-height:1.3}
.revenda-cobranca-auto-baixa svg{width:14px;height:14px;flex:0 0 14px;color:#475569}
.revenda-cobranca-actions{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end;margin-top:0;flex-wrap:wrap}
.revenda-cobranca-pay-btn{border:1px solid #1d4ed8;background:#2563eb;color:#fff}
.revenda-cobranca-later-btn{border:1px solid #cbd5e1;background:#fff;color:#475569}
body.revenda-cobranca-open{overflow:hidden}
html[data-theme="dark"] .revenda-cobranca-chip-warning{background:rgba(154,52,18,.2);border-color:rgba(251,146,60,.32);color:#fdba74}
html[data-theme="dark"] .revenda-cobranca-chip-danger{background:rgba(190,18,60,.18);border-color:rgba(251,113,133,.3);color:#fda4af}
html[data-theme="dark"] .revenda-cobranca-modal{background:#0f172a;border-color:#334155}
html[data-theme="dark"] .revenda-cobranca-close{background:#111827;color:#cbd5e1;border-color:#334155}
html[data-theme="dark"] .revenda-cobranca-head{border-color:#334155}
html[data-theme="dark"] .revenda-cobranca-head-warning{background:#171817}
html[data-theme="dark"] .revenda-cobranca-head-danger{background:#1d1519}
html[data-theme="dark"] .revenda-cobranca-head-icon{background:#111827;border-color:#334155;color:#e2e8f0}
html[data-theme="dark"] .revenda-cobranca-head h2,html[data-theme="dark"] .revenda-cobranca-summary strong{color:#f8fafc}
html[data-theme="dark"] .revenda-cobranca-head p,html[data-theme="dark"] .revenda-cobranca-kicker,html[data-theme="dark"] .revenda-cobranca-qr-label{color:#94a3b8}
html[data-theme="dark"] .revenda-cobranca-summary>div,html[data-theme="dark"] .revenda-cobranca-copybox{background:#111827;border-color:#334155}
html[data-theme="dark"] .revenda-cobranca-summary span,html[data-theme="dark"] .revenda-cobranca-copy-title{color:#94a3b8}
html[data-theme="dark"] .revenda-cobranca-copybox textarea{background:#0b1220;border-color:#334155;color:#cbd5e1}
html[data-theme="dark"] .revenda-cobranca-copy-btn,html[data-theme="dark"] .revenda-cobranca-later-btn{background:#111827;border-color:#334155;color:#cbd5e1}
html[data-theme="dark"] .revenda-cobranca-auto-baixa{background:#111827;border-color:#334155;color:#94a3b8}
html[data-theme="dark"] .revenda-cobranca-auto-baixa svg{color:#94a3b8}
@media(max-width:980px){
  .revenda-cobranca-modal{width:min(97vw,900px)}
  .revenda-cobranca-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .revenda-cobranca-body{grid-template-columns:165px minmax(0,1fr)}
  .revenda-cobranca-qr{width:150px;height:150px}
}
@media(max-width:640px){
  .revenda-cobranca-chip span{display:none}
  .revenda-cobranca-chip{width:36px;padding:0;justify-content:center}
  .revenda-cobranca-modal{width:min(98vw,620px);max-height:calc(100dvh - 12px);border-radius:12px}
  .revenda-cobranca-head{padding:13px 48px 11px 14px}
  .revenda-cobranca-head-icon{display:none}
  .revenda-cobranca-body{display:block;padding:11px 12px 13px}
  .revenda-cobranca-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:10px}
  .revenda-cobranca-summary>div{padding:6px 8px}
  .revenda-cobranca-qr-wrap{margin:0 auto 10px}
  .revenda-cobranca-qr{width:138px;height:138px}
  .revenda-cobranca-copybox{margin-bottom:9px}
  .revenda-cobranca-actions{margin-top:7px}
}
