﻿/* ===== GLOBAL ===== */
body.app-body {
  margin: 0;
  background: #f8fafc;
  font-family: 'Inter', sans-serif;
  color: #111827;
}

/* Topbar */
/* Topbar com imagem de fundo */
/* Topbar mantém a cor atual */
.topbar {
    background: linear-gradient(90deg, #221f20, #221f20); /* ou sua cor atual */
    height: 70px;
    padding: 0 30px;

    display: grid;
    grid-template-columns: 1fr auto 1fr; /* centro REAL */
    align-items: center;
    color: white;
    position: relative;
}

/* Logo centralizada */
.topbar-center {
    display: flex;
    justify-content: center;
}

.topbar-logo {
    height: 70px;      /* AJUSTE IDEAL — cabe sem cortar */
    width: auto;
    object-fit: contain;
}

/* Lados, sem mexer no layout */
.topbar-left,
.topbar-right {
    font-size: 15px;
    font-weight: 500;
}

/* texto da direita alinhado */
.topbar-right {
    text-align: right;
    position: relative;
}

.home-user-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.home-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.home-user-menu {
  position: absolute;
  right: 0;
  top: 78px;
  width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  z-index: 50;
  display: none;
  text-align: left;
}

.home-user-menu.open {
  display: block;
}

.home-user-menu-header {
  padding: 14px 14px 8px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #111827;
}

.home-user-menu-header span {
  color: #6b7280;
  font-size: 13px;
}

.home-user-item {
  width: 100%;
  border: none;
  background: transparent;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  display: block;
  text-align: left;
  padding: 11px 14px;
  cursor: pointer;
}

.home-user-item:hover {
  background: #f8fafc;
}

.home-user-item-danger {
  color: #b91c1c;
}


/* texto */
.logo-text {
    font-size: 0px;
    font-weight: 600;
    color: white;
}


.user-area {
    color: #e5e7eb;
    font-size: 14px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 20px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

/* ===== SESSÕES RECOLHÍVEIS (HOME) ===== */

.session {
  margin: 24px 40px;
  /* margem lateral -> cor não vai até a borda */
}

.session-header {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
}

/* texto centralizado e ocupando a largura inteira */
.session-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  width: 100%;
}

.session-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.session-pill {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* agora só definimos a cor do texto (paleta ajustada) */
.session-pill-contabil {
  color: #f59e0b;
}

.session-pill-fiscal {
  color: #eab308;
}

.session-pill-geral {
  color: #a855f7;
}

.session-pill-pessoal {
  color: #22c55e;
}

.session-pill-ti {
  color: #0ea5e9;
}

.session-pill-pdf {
  color: #ef4444;
}

.session-pill-admin {
  color: #f59e0b;
}

.session-chevron {
  font-size: 18px;
  color: #6b7280;
  transition: transform 0.2s;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

/* quando a sessão está aberta já tínhamos isso: */
.session.open .session-chevron {
  transform: translateY(-50%) rotate(180deg);
}

/* corpo recolhido / aberto */
.session-body {
  margin-top: 10px;
  border-radius: 18px;
  padding: 16px 18px 20px;
  display: none;
}

/* headers por sessão – fundo neutro, só o texto é colorido */
.session--contabil .session-header {
  background: #ffffff;
}

.session--fiscal .session-header {
  background: #ffffff;
}

.session--geral .session-header {
  background: #ffffff;
}

.session--pessoal .session-header {
  background: #ffffff;
}

.session--ti .session-header {
  background: #ffffff;
}

.session--declaracoes .session-header {
  background: #ffffff;
}

.session--admin .session-header {
  background: #ffffff;
}

.session--pdf .session-header {
  background: #ffffff;
}

/* corpo das sessões – cinza bem claro neutro */
.session--contabil .session-body {
  background: #f9fafb;
}

.session--fiscal .session-body {
  background: #f9fafb;
}

.session--geral .session-body {
  background: #f9fafb;
}

.session--pessoal .session-body {
  background: #f9fafb;
}

.session--ti .session-body {
  background: #f9fafb;
}

.session--declaracoes .session-body {
   background: #f9fafb;
 }

.session--pdf .session-body {
  background: #f9fafb;
}


/* quando a sessão está aberta */
.session.open .session-body {
  display: block;
}

/* GRID DE CARDS */
.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Reutiliza o estilo dos cards que já fizemos */
.util-card,
.carousel-card {
  min-width: 0;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.util-card:hover,
.carousel-card:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  transform: translateY(-3px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.card-tags span {
  background: #e5e7eb;
  color: #0f172a;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  margin-right: 6px;
}

/* hover com descrição completa */
.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.97);
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.2s;
}

.util-card:hover .card-hover,
.carousel-card:hover .card-hover {
  opacity: 1;
  pointer-events: auto;
}

.card-hover p {
  margin-bottom: 12px;
}

.btn-card {
  background: #0f172a;
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
}

/* responsivo */
@media (max-width: 768px) {
  .session {
    margin: 18px 16px;
  }

  .session-header {
    align-items: flex-start;
  }
}

/* ===== SESSÕES ===== */
.category {
  margin: 40px 60px;
}

.category-title {
  font-size: 22px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #111827;
}

/* ===== GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

/* ===== CARD ===== */
.card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.06);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.16);
}

.card-img {
  text-align: center;
  margin-bottom: 15px;
}

.card-img img {
  width: 90px;
  height: 90px;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 6px;
}

.card-tags span {
  background: #e5e7eb;
  color: #0f172a;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 12px;
  margin-right: 6px;
}

/* ===== HOVER ===== */
.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.97);
  padding: 20px;
  opacity: 0;
  transition: 0.25s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card:hover .card-hover {
  opacity: 1;
  pointer-events: auto;
}

.card-hover p {
  margin-bottom: 15px;
}

.btn-card {
  background: #0f172a;
  color: white;
  padding: 10px 15px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  transition: 0.25s;
}

.btn-card:hover {
  background: #1f2937;
}

/* ============================
   ESTILO TELA NF-e (MODERNA)
   ============================ */

body.nfe-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #111827;
}

.nfe-layout {
  display: block;
  min-height: calc(100vh - 70px);
  margin-top: 70px;
  --header-height: 70px;
  --sidebar-width: 220px;
}

.nfe-layout.collapsed {
  --sidebar-width: 84px;
}

/* SIDEBAR */

/* largura padrão menor */
.nfe-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1200;
  box-sizing: border-box;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #221f20, #221f20);
  color: #ff000000;
  padding: 0 10px 14px;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  box-shadow: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nfe-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* topo da sidebar + botão */
.nfe-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: var(--header-height);
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nfe-sidebar-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 auto;
}

.nfe-sidebar-toggle span {
  display: block;
  margin-left: auto;
  width: 18px;
  height: 2px;
  background: rgba(251, 249, 249, 0.9);
  border-radius: 99px;
}

.nfe-sidebar-logo {
  display: none;
}

/* === ESTADO RECOLHIDO === */

.nfe-layout.collapsed .nfe-sidebar {
  width: var(--sidebar-width);
}

.nfe-layout:not(.collapsed) .nfe-sidebar {
  width: var(--sidebar-width);
}

.nfe-layout.collapsed .logo-text {
  display: none;
}

.nfe-layout.collapsed .nfe-menu-item {
  justify-content: center;
}

.nfe-layout.collapsed .nfe-menu-item .label {
  display: none;
}

.nfe-layout.collapsed .nfe-sidebar-toggle {
  align-self: center;
}

/* SUBSTITUA o bloco atual .nfe-sidebar-logo .logo-circle por este */
.nfe-sidebar-logo .logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 100%;

  /* fundo do círculo (opcional) */
  background-color: rgb(255, 255, 255);

  /* imagem do logo (mesma pasta do styles.css) */
  background-image: url("logo_skype.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 85%;
  /* ou "70%" se quiser mais “folga” */

  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}

.nfe-sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.nfe-menu-spacer {
  flex: 1;
  min-height: 10px;
}

.nfe-sidebar-account {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 10px;
}

.nfe-sidebar-account-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nfe-sidebar-account-email {
  color: rgba(249, 250, 251, 0.7);
  font-size: 12px;
  margin-bottom: 8px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nfe-layout.collapsed .nfe-sidebar-account-name,
.nfe-layout.collapsed .nfe-sidebar-account-email {
  display: none;
}

.nfe-menu-action {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.nfe-menu-action:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: none;
}

.nfe-layout.collapsed .nfe-menu-action {
  justify-content: center;
  padding-inline: 8px;
}

.app-topbar {
  height: 70px;
  margin: 0;
  padding: 0 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-topbar-menu {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* desktop: usa hambúrguer da sidebar, não do header */
@media (min-width: 901px) {
  .app-topbar-menu {
    visibility: hidden;
    pointer-events: none;
  }
}

.app-topbar-right {
  margin-left: auto;
  justify-self: end;
  position: relative;
}

.topbar-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.app-topbar-user {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  max-width: 260px;
}

.app-topbar-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.app-topbar-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-user-menu {
  position: absolute;
  right: 0;
  top: 42px;
  width: 230px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  display: none;
  overflow: hidden;
}

.app-topbar-user-menu.open {
  display: block;
}

.app-topbar-user-email {
  font-size: 12px;
  color: #6b7280;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.app-topbar-user-item {
  width: 100%;
  display: block;
  border: none;
  background: transparent;
  color: #111827;
  text-decoration: none;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}

.app-topbar-user-item:hover {
  background: #f8fafc;
}

.app-topbar-user-item-danger {
  color: #b91c1c;
}

.nfe-sidebar-backdrop {
  display: none;
}

.nfe-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(249, 250, 251, 0.85);
  font-size: 14px;
  transition: background 0.2s, transform 0.1s;
}

.nfe-menu-item .icon {
  font-size: 16px;
}

.nfe-menu-item:hover {
  background: rgba(15, 23, 42, 0.7);
  transform: translateX(2px);
}

.nfe-menu-item.active {
  background: rgba(15, 23, 42, 0.95);
  color: #fff;
}

/* ===== Sidebar em grupos (departamentos) ===== */

.nfe-menu-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nfe-menu-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(249, 250, 251, 0.85);
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nfe-menu-group-header .icon {
  font-size: 16px;
}

.nfe-menu-group-header:hover {
  background: rgba(15, 23, 42, 0.7);
}

.nfe-menu-group-header .chevron {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}

.nfe-menu-group.open .nfe-menu-group-header .chevron {
  transform: rotate(90deg);
}

.nfe-menu-subitems {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 8px;
}

.nfe-menu-group.open .nfe-menu-subitems {
  display: flex;
}

/* itens filhos um pouco menores */
.nfe-menu-subitem {
  font-size: 13px;
}

/* quando a sidebar está recolhida */
.nfe-layout.collapsed .nfe-menu-group-header .label {
  display: none;
}

.nfe-layout.collapsed .nfe-menu-group-header {
  justify-content: center;
}

.nfe-layout.collapsed .nfe-menu-group-header .chevron {
  display: none;
}

.nfe-layout.collapsed .nfe-menu-subitems {
  display: none !important;
}

/* MAIN */

/* em flex com sidebar, precisa permitir encolher */
.nfe-main {
  flex: 1;
  min-width: 0;
  /* CRÍTICO para não estourar largura */
  max-width: none;
  /* remove o limite que somado à sidebar estoura a tela */
  margin: 0;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.2s ease;
  /* evita centralizar somando largura com sidebar */
  padding: 18px 20px;
  /* diminui margem esquerda */
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .app-topbar {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .app-topbar-user-name {
    display: none;
  }

  .nfe-main {
    margin-left: 0;
    padding: 14px 12px 16px;
    transition: none;
  }

  .nfe-sidebar {
    top: 0;
    left: -236px;
    bottom: 0;
    width: 220px;
    z-index: 1200;
    transition: left 0.2s ease;
    box-shadow: 12px 0 26px rgba(0, 0, 0, 0.24);
  }

  .nfe-sidebar-top {
    min-height: 52px;
    margin-bottom: 10px;
  }

  /* mobile: usa hambúrguer do header, não o da sidebar */
  .nfe-sidebar-toggle {
    display: none;
  }

  .nfe-layout.menu-open .nfe-sidebar {
    left: 0;
  }

  .nfe-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1100;
  }

  .nfe-layout.menu-open .nfe-sidebar-backdrop {
    display: block;
  }
}

/* garante que os wrappers das tabelas segurem overflow */
#billingTableWrapper {
   max-width: 100%;
   overflow-x: auto;
 }
#atividadeImobiliariaTableWrapper {
  max-width: 100%;
  overflow-x: auto;
}
#newTenantsTableWrapper {
  max-width: 100%;
  overflow-x: auto;
}

/* BACKUP do antigo, alterei pra limitar o tamanho da tabela da dimob***
  .nfe-main {
    flex: 1;
    padding: 28px 40px;
    max-width: 1200px;
    margin: 0 auto;
  }

@media (max-width: 900px) {

  /* em telas menores, já pode começar recolhido se quiser 
  .nfe-layout.collapsed .nfe-main {
    padding-inline: 16px;
  }
}
*/

.nfe-header .nfe-breadcrumb {
  font-size: 13px;
  color: #9ca3af;
}

.nfe-header h1 {
  font-size: 26px;
  margin: 6px 0;
}

.nfe-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* CARDS GENÉRICOS */

.nfe-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-top: 22px;
}

.forbidden-card {
  max-width: 720px;
  margin: 34px auto 0;
  text-align: center;
  padding: 36px 28px;
}

.forbidden-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 12px 30px rgba(153, 27, 27, 0.28);
}

.forbidden-card h1 {
  margin: 8px 0 10px;
}

.forbidden-card p {
  margin: 0 auto;
  color: #4b5563;
  line-height: 1.55;
  max-width: 560px;
}

.forbidden-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.nfe-row {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr;
  gap: 20px;
  margin-top: 20px;
}

.nfe-card-subtitle {
  margin-top: 4px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #6b7280;
}

.nfe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nfe-card-header-with-actions {
  gap: 16px;
}

/* UPLOAD */

.nfe-upload-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nfe-input-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px dashed #1f2937;
  background: #f9fafb;
  font-size: 14px;
  color: #0f172a;
  cursor: pointer;
}

.nfe-input-file-label input[type="file"] {
  display: none;
}

.nfe-upload-message {
  margin-top: 10px;
  font-size: 13px;
  color: #0f172a;
}

/* EXTENSÃO */

.nfe-ext-status {
  margin-top: 12px;
  font-size: 13px;
  color: #4b5563;
}

/* MÉTRICAS */

.nfe-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.nfe-metric {
  background: #e5e7eb;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.nfe-metric strong {
  font-size: 20px;
  color: #111827;
}

.nfe-metric-pending {
  background: #fffbeb;
}

.nfe-metric-processing {
  background: #e0f2fe;
}

.nfe-metric-captcha {
  background: #f5f3ff;
}

.nfe-metric-done {
  background: #dcfce7;
}

.nfe-metric-error {
  background: #fee2e2;
}

/* TABELA */

.nfe-table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nfe-table-wrapper {
  margin-top: 14px;
  overflow-x: auto;
}

.nfe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.nfe-table thead {
  background: #e5e7eb;
}

.nfe-table th,
.nfe-table td {
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.nfe-table tbody tr:nth-child(even) {
  background: #f3f4f6;
}

/* AVISO CAPTCHA */

.nfe-card-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid #facc15;
  background: #fffbeb;
}

.nfe-warning-icon {
  font-size: 22px;
  margin-top: 3px;
}

/* BOTÕES GENÉRICOS */

.btn {
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
}

.btn-primary:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-ghost-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.btn-ghost-danger:hover {
  background: #fee2e2;
}

/* ===== HOME: CARROSSEIS POR SESSÃO ===== */

.category-carousel {
  margin: 30px 40px;
  border-radius: 24px;
  padding: 18px 20px 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.category-header h2 {
  margin: 0;
  font-size: 20px;
}

.category-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* Scroll horizontal */
.carousel-container {
  overflow-x: auto;
  padding-bottom: 6px;
}

.carousel-track {
  display: flex;
  gap: 18px;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 4px;
}

.carousel-card {
  scroll-snap-align: start;
  min-width: 260px;
  max-width: 280px;
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.carousel-card:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  transform: translateY(-3px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* tags */
.card-tags span {
  background: #e5e7eb;
  color: #0f172a;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  margin-right: 6px;
}

/* Hover com descrição */
.card-hover {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.97);
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.2s;
}

.carousel-card:hover .card-hover {
  opacity: 1;
  pointer-events: auto;
}

.card-hover p {
  margin-bottom: 12px;
}

/* Botão dentro do card */
.btn-card {
  background: #0f172a;
  color: white;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
}

/* Controles do carrossel */
.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(249, 250, 251, 0.9);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #ffffff;
}

/* ===== CORES POR SESSÃO (chips que você mostrou) ===== */

/* Contábil – âmbar */
.category-contabil,
.category-fiscal,
.category-geral,
.category-pessoal,
.category-ti {
  background: #ffffff;
  /* mesma base dos cards */
}

/* Responsivo */
@media (max-width: 768px) {
  .category-carousel {
    margin: 20px 16px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Esconde qualquer elemento que tiver a classe .hidden */
.hidden {
  display: none !important;
}

/* Container do modal (ocupa a tela toda) */
.modal {
  position: fixed;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  /* fica acima dos cards */
}

/* Fundo escuro por trás do conteúdo */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  /* um cinza escuro translúcido */
}

/* Caixa branca do formulário */
.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
  max-width: 480px;
  width: 100%;
}

/* Botões do rodapé do modal */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- MULTISELECT DE EMPRESAS (SN) ---------- */

.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.9rem;
}

.multi-select-control:hover {
  background: #e5e7eb;
}

.multi-select-arrow {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* A LISTA FICA ESCONDIDA POR PADRÃO */
.multi-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  max-height: 260px;
  overflow-y: auto;
  display: none;
  /* <-- ESSENCIAL */
  z-index: 30;
}

/* Quando tiver a classe .open, aparece */
.multi-select-options.open {
  display: block;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.multi-select-option input[type="checkbox"] {
  cursor: pointer;
}

/* ---------- SELECTS DE MÊS/ANO (SN) ---------- */

.sn-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;

  /* remove o estilo padrão do SO */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* “setinha” customizada à direita (opcional) */
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.sn-select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.25);
  background: #e5e7eb;
}

/* =========================================================
   SN (Simples Nacional) — layout novo (lista de empresas)
   ========================================================= */

/* Seção "Empresas" */
.sn-companies-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 8px;
  margin-bottom: 10px;
}

/* Caixa que contém a lista de empresas */
.sn-companies-list {
  width: 100%;
}

/* Container das opções (lista) */
.sn-companies-options {
  border: 1px dashed #1f2937;
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px 12px;

  display: flex;
  flex-direction: column;
  gap: 6px;

  max-height: 220px;        /* evita “estourar” o card */
  overflow-y: auto;
}

/* Cada linha de empresa */
.sn-company-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;

  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

/* Hover suave no padrão do portal */
.sn-company-option:hover {
  background: rgba(15, 23, 42, 0.06);
}

/* Checkbox alinhado com o texto */
.sn-company-option input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #0f172a; /* combina com btn-primary */
}

/* Texto da empresa quebra linha bonitinho */
.sn-company-option span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Ações */
.sn-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Linha do botão de download (resultado) */
.sn-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 0 6px;
}

/* Status não “estoura” o layout */
#snStatus,
#snCompanyMessage {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Responsivo: no mobile, lista e botões ficam mais confortáveis */
@media (max-width: 900px) {
  .sn-companies-options {
    max-height: 260px;
  }

  .sn-actions .btn {
    width: 100%;
  }
}

/* Opcional: ajuste visual do log da ferramenta de holerites */
#holeritesLog {
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ===== Gerador de Atas ===== */
.ata-form-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ata-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ata-field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
}

.ata-field-label {
  font-size: 13px;
  font-weight: 500;
}

.ata-field-input {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.ata-lucros-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-small {
  padding: 6px 10px;
  font-size: 12px;
}

.ata-assinaturas-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ata-assinaturas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ata-assinaturas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ata-socio-card {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  background: #f9fafb;
}

.ata-socio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 6px;
}

.ata-socio-field {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ata-socio-field label {
  font-size: 12px;
  color: #4b5563;
}

.ata-socio-field input {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.ata-status-text {
  font-size: 13px;
}

.ata-download-wrapper {
  margin-top: 10px;
}

/* ===== Acertos Lotes Internets ===== */

.ali-keywords-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 16px;
  color: #4b5563;
}

/* === Acertos Lotes Internets – corrigir expansão lateral === */

/* 2 colunas dentro do card de pré-visualização */
.nfe-card-table .nfe-row {
  grid-template-columns: 1fr 1fr;
}

/* Deixa as colunas poderem encolher, em vez de crescer com o conteúdo */
.nfe-card-table .nfe-row > div {
  min-width: 0;
}

/* Caixa de pré-visualização: ocupa só a largura do card e ganha scroll interno */
.ali-preview {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 200px;
  max-height: 320px;
  overflow-x: auto;  /* scroll horizontal dentro da caixa */
  overflow-y: auto;  /* scroll vertical dentro da caixa */
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid #e5e7eb;
  white-space: pre;  /* mantém o layout do TXT em colunas */
}

/* ===== Ferramenta: Entregador MIT =====  */
.mit-log {
  margin-top: 10px;
  padding: 10px;
  background: #020617;
  color: #e5e7eb;
  border-radius: 10px;
  max-height: 260px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}


/* ===== Ferramenta: Acerto Lotes Toscan ===== */

.acerto-lotes-toscan-preview-wrapper {
  margin-top: 10px;
}

.acerto-lotes-toscan-preview {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  max-height: 260px;
  overflow: auto;
  white-space: pre;
}

/* ===== ESTILOS ESPECÍFICOS DA PÁGINA "COMPRIMIR PDF" ===== */

.comprimir-pdf-page .nfe-metric {
  background: #e5e7eb;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
}

/* Rótulo em cima (Arquivo, Original, etc.) */
.comprimir-pdf-page .nfe-metric .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

/* Valor da métrica (tamanho, % etc.) */
.comprimir-pdf-page .nfe-metric strong {
  font-size: 16px;
  line-height: 1.3;
  color: #111827;
}

/* Nome do arquivo – menor e com "..." se for muito longo */
.comprimir-pdf-page #metricFileName {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Opcional: pequenos ajustes visuais da ferramenta extrator ZIP/RAR */
.extrator-zip-rar-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Feedback visual de upload (comum a todas as páginas) */
.wl-upload-summary {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #6b7280; /* texto mais suave */
  word-break: break-all;
}

.nfe-input-file-label,
.wl-upload-area {
  position: relative;
}

/* Borda/efeito ao arrastar arquivos por cima da área do upload */
.wl-upload-area--dragover,
.nfe-input-file-label.wl-upload-area--dragover {
  outline: 2px dashed rgba(15, 23, 42, 0.35);
  outline-offset: 4px;
  background-color: rgba(148, 163, 184, 0.08);
}

/* Overlay global quando o usuário arrasta arquivo sobre a página */
body.wl-page-dragover {
  position: relative;
}

/* Fundo escurecido */
body.wl-page-dragover::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.60); /* escurece a página */
  z-index: 9990;
  pointer-events: none; /* não bloqueia clique/drop nos elementos reais */
}

/* Mensagem central "Solte para fazer o upload" */
body.wl-page-dragover::after {
  content: "Solte o arquivo para fazer o upload";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9991;
  pointer-events: none;

  padding: 16px 32px;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.90);
  color: #f9fafb;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.65);
}

/* Layout do bloco de ações (botões + progresso + texto) */
.ajuste-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Linha dos botões de download */
.ajuste-download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Texto de info do backup */
.ajuste-backup-info {
  margin-top: 4px;
}

/* Progress bar – já tínhamos algo parecido, só complementando */
.ajuste-progress-hidden {
  display: none;
}

.nfe-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.nfe-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.nfe-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #0f172a;
  transition: width 0.2s ease-out;
}

.nfe-progress-text {
  min-width: 32px;
  text-align: right;
}

/* ==== Ajustes visuais do card "Envio em lote - Sem Movimento" ==== */
.sem-movimento-card {
  margin-top: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 1.5rem 2rem;
}

.sem-movimento-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.sem-movimento-card .nfe-card-subtitle {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.nfe-form-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nfe-form-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.nfe-form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.nfe-form-group input,
.nfe-form-group select,
.nfe-form-group textarea {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  transition: border 0.2s ease;
}

.nfe-form-group input:focus,
.nfe-form-group select:focus,
.nfe-form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb33;
}

.nfe-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

#semMovFile {
  cursor: pointer;
}

#semMovStatus {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #374151;
}

#semMovSubmitBtn {
  width: 100%;
  font-size: 0.95rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#semMovSubmitBtn:hover {
  background: #1d4ed8;
}

/* Responsividade */
@media (min-width: 768px) {
  .sem-movimento-card {
    max-width: 800px;
  }
  .nfe-form-grid .nfe-form-group {
    flex: 1;
    min-width: 200px;
  }
}

/* === Correção de largura do card "Envio em lote - Sem Movimento" === */
.sem-movimento-card {
  width: 100%;
  max-width: 100%;          /* ocupar toda a largura disponível */
  box-sizing: border-box;
}

/* se quiser que os dois cards fiquem exatamente iguais, forçamos o mesmo container */
.nfe-row .nfe-card-upload,
.nfe-row .sem-movimento-card {
  flex: 1 1 100%;
}

/* garante que textarea e input acompanhem largura total */
.sem-movimento-card .nfe-form-group textarea,
.sem-movimento-card .nfe-form-group input,
.sem-movimento-card .nfe-form-group select {
  width: 100%;
}

/* Trechos novos para colar em styles.css */
.tool-calculadora-icms-st-inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-calculadora-icms-st-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  user-select: none;
}

.tool-calculadora-icms-st-badge {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.tool-calculadora-icms-st-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.tool-calculadora-icms-st-log {
  white-space: pre-wrap;
  line-height: 1.4;
  opacity: 0.95;
}

.tool-calculadora-icms-st-mva-ref tr.is-active td {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

/* Trechos novos para colar em styles.css */
.auth-page {
  min-height: 100vh;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.auth-input,
.auth-textarea {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
}

.auth-textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
}

.auth-message {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
}

/* Logs: UI mais amigável */
.log-muted {
  opacity: 0.7;
  font-size: 12px;
}

.log-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.log-action {
  font-weight: 600;
}

.log-chips {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.log-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  font-size: 12px;
  opacity: 0.9;
}

.log-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,0.15);
}

.log-badge.ok {
  background: rgba(46, 204, 113, 0.12);
}

.log-badge.error {
  background: rgba(231, 76, 60, 0.12);
}

.log-badge.muted {
  opacity: 0.7;
}

.log-details {
  max-width: 520px;
}

.log-toggle {
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  text-decoration: underline;
}

.log-json {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
  max-height: 220px;
  overflow: auto;
  white-space: pre;
}

/* ===== Ferramenta: IRPF Carnê-Leão ===== */
.irpf-log {
  margin-top: 10px;
  padding: 10px 12px;
  background: #020617;
  color: #e5e7eb;
  border-radius: 12px;
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* ===== IRPF: cards por período (sem tabela) ===== */

.irpf-period-grid{
  display: grid;
  gap: 16px;
}

/* Desktop grande: 4 colunas */
@media (min-width: 1400px){
  .irpf-period-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Desktop padrão: ainda 4 colunas (se quiser “forçar mesmo”) */
@media (min-width: 1200px) and (max-width: 1399px){
  .irpf-period-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: 2 colunas */
@media (min-width: 768px) and (max-width: 1199px){
  .irpf-period-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 coluna */
@media (max-width: 767px){
  .irpf-period-grid{
    grid-template-columns: 1fr;
  }
}

.irpf-period-card{
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 14px;
}

.irpf-card-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 10px 2px;
}

.irpf-period-title{
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.irpf-block{
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 10px;
}

.irpf-block.is-devido{
  border-color: rgba(185, 28, 28, 0.25);
  background: rgba(185, 28, 28, 0.04);
}

.irpf-block.is-compensar{
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.04);
}

.irpf-block-icon{
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.irpf-block-icon.red{ background: rgba(239, 68, 68, 0.20); }
.irpf-block-icon.blue{ background: rgba(59, 130, 246, 0.20); }
.irpf-block-icon.yellow{ background: rgba(234, 179, 8, 0.20); }
.irpf-block-icon.cyan{ background: rgba(14, 165, 233, 0.20); }

.irpf-block-main{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.irpf-block-value{
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.irpf-block-label{
  font-size: 13px;
  color: rgba(15, 23, 42, 0.7);
}

.irpf-block-lines{
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.irpf-block-lines .line{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.75);
}

.irpf-block-lines .line strong{
  color: #0f172a;
  font-weight: 700;
}
/* Balancete — logs do job */
.bt-logbox {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  background: #0b1220;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bt-download {
  margin-top: 12px;
}


/* Evita que qualquer coisa estoure a largura da página */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* IMPORTANTE em layouts com sidebar/flex: permitir encolher */
.nfe-main,
.main,
main,
.content {
  min-width: 0;
}

/* Wrapper do log (se existir) */
#dimobLogWrapper,
.dimob-log-wrapper {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  /* scroll só dentro do wrapper, se necessário */
}

/* O campo de log em si */
#dimobLog {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  /* ESSENCIAL: quebra linha */
  white-space: pre-wrap;
  /* preserva \n e quebra */
  overflow-wrap: anywhere;
  /* quebra até “palavras” gigantes */
  word-break: break-word;

  /* se for <pre>/<div> */
  overflow-x: auto;
}

/* Se o #dimobLog for um <textarea>, isso ajuda também */
textarea#dimobLog {
  resize: vertical;
}

/* =========================================================
   Tareffa — Empresas em Lote (ESCOPADO)
   Depende do body ter: class="page-empresas-lote"
   ========================================================= */

/* ======================
   Layout (2.2) — sem depender de nfe-*
   ====================== */
.page-empresas-lote .lote-main{
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-empresas-lote .lote-header{
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.page-empresas-lote .lote-card{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-empresas-lote .lote-table-wrapper{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* Fallback temporário (remova quando seu HTML já tiver lote-*) */
.page-empresas-lote .nfe-main{
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-empresas-lote .nfe-header{
  flex: 0 0 auto;
  margin-bottom: 10px;
}
.page-empresas-lote .empresas-lote-card{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page-empresas-lote .nfe-table-wrapper{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* ======================
   Tabela compacta
   ====================== */
.page-empresas-lote .empresas-lote-table{
  width: 100%;
  table-layout: fixed; /* respeita colgroup */
}

.page-empresas-lote .empresas-lote-table th,
.page-empresas-lote .empresas-lote-table td{
  padding: 6px 8px;
  min-width: 0;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 12px;
}

.page-empresas-lote .empresas-lote-table .auth-input{
  height: 30px;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* status */
.page-empresas-lote .status-cell{
  font-size: 12px;
  opacity: 0.95;
}
.page-empresas-lote .status-ok { color: #3bd671; }
.page-empresas-lote .status-warn { color: #f0c14b; }
.page-empresas-lote .status-err { color: #ff6b6b; }

/* logs */
.page-empresas-lote .empresas-lote-logs{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px;
  min-height: 120px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
}

/* ======================
   Combobox (Regime Tributário)
   ====================== */
.page-empresas-lote .wl-combobox{ position: relative; }

.page-empresas-lote .wl-combobox-menu{
  position: absolute; /* padrão (não-portal) */
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  z-index: 99999;
  display: none;

  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);

  max-height: 220px;
  overflow-y: auto;
}

/* quando o JS mover o menu pro body, ele deve adicionar a classe .portal */
.page-empresas-lote .wl-combobox-menu.portal{
  position: fixed;   /* modo portal (1.1) */
  top: auto; left: auto; right: auto; /* JS define via style inline */
}

.page-empresas-lote .wl-combobox-menu.open{ display: block; }

.page-empresas-lote .wl-combobox-item{
  padding: 10px 10px;
  cursor: pointer;
  font-size: 13px;
}
.page-empresas-lote .wl-combobox-item:hover{
  background: rgba(0,0,0,0.06);
}

/* ======================
   Atividade da Empresa (MENU multi-select)
   ====================== */
.page-empresas-lote .wl-mini-check{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  user-select: none;
}

.page-empresas-lote .wl-multi{ position: relative; }

.page-empresas-lote .wl-multi-btn{
  width: 100%;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  padding: 4px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.page-empresas-lote .wl-multi-menu{
  position: absolute; /* padrão (não-portal) */
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  z-index: 99999;
  display: none;

  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 8px;

  max-height: 220px;
  overflow-y: auto;
}

.page-empresas-lote .wl-multi-menu.portal{
  position: fixed;  /* modo portal (1.1) */
  top: auto; left: auto; right: auto; /* JS define via style inline */
}

.page-empresas-lote .wl-multi-menu.open{ display: block; }

.page-empresas-lote .wl-multi-menu .wl-mini-check{
  display: flex;
  gap: 6px;
  margin: 4px 0;
}

.page-empresas-lote .wl-combobox-item.is-active{
  background: rgba(0,0,0,0.06);
}

.page-empresas-lote .wl-multi-menu .wl-mini-check.is-active{
  background: rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 4px 6px;
}

/* ===== manter planilha visível mesmo com o job aparecendo ===== */

/* o container principal precisa ser flex-col e sem scroll na página */
.page-empresas-lote .lote-main,
.page-empresas-lote .nfe-main{
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* card da planilha ocupa o espaço restante */
.page-empresas-lote .empresas-lote-card,
.page-empresas-lote .lote-card{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* wrapper da tabela cresce e mostra a tabela */
.page-empresas-lote .lote-table-wrapper,
.page-empresas-lote .nfe-table-wrapper{
  flex: 1 1 auto;
  min-height: 140px;   /* <- evita “sumir” */
  overflow: auto;
}

/* o card do job não pode “engolir” toda a tela */
.page-empresas-lote #jobSection{
  flex: 0 0 320px;     /* altura fixa do status do job */
  min-height: 320px;
  overflow: hidden;
}

/* logs rolam dentro do job */
.page-empresas-lote #jobSection .empresas-lote-logs{
  max-height: 180px;
  overflow: auto;
}

/* ===== Admin - Permissões ===== */
.perm-list {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #f9fafb;
  max-height: 380px;
  overflow: auto;
}

.perm-group-title {
  font-weight: 800;
  font-size: 13px;
  color: #111827;
  margin: 10px 0 6px;
}

.perm-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
}

.perm-item:hover {
  background: rgba(15, 23, 42, 0.06);
}

.perm-item-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.perm-item-title {
  font-weight: 700;
  color: #111827;
  font-size: 13px;
}

.perm-item-sub {
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
}
