:root{
  --nf-bg:#f4f7fb;
  --nf-card:#ffffff;
  --nf-text:#0f172a;
  --nf-muted:#64748b;
  --nf-line:#e2e8f0;
  --nf-primary:#14b8a6;
  --nf-primary-dark:#0f766e;
  --nf-secondary:#1e3a8a;
  --nf-dark:#0f172a;
  --nf-success:#16a34a;
  --nf-info:#2563eb;
  --nf-warning:#d97706;
  --nf-danger:#dc2626;
  --nf-purple:#7c3aed;
  --nf-shadow:0 10px 30px rgba(15,23,42,.08);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Arial, Helvetica, sans-serif !important;
  background:var(--nf-bg) !important;
  color:var(--nf-text) !important;
  padding-top:92px !important;
}

a{color:var(--nf-primary-dark)}
h1,h2,h3{color:var(--nf-text)}
code{
  background:#eef2f7;
  padding:4px 7px;
  border-radius:7px;
}

.card{
  max-width:1200px !important;
  margin:0 auto 22px auto !important;
  background:var(--nf-card) !important;
  border-radius:18px !important;
  padding:24px !important;
  box-shadow:var(--nf-shadow) !important;
  border:1px solid rgba(226,232,240,.8);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr)) !important;
  gap:14px !important;
}

.box{
  border:1px solid var(--nf-line) !important;
  border-radius:14px !important;
  padding:16px !important;
  background:#fbfdff !important;
  box-shadow:0 4px 14px rgba(15,23,42,.03);
  max-width:100%;
  overflow-wrap:break-word;
  word-break:break-word;
}

.top{
  margin-bottom:18px !important;
}

.top a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none !important;
  padding:10px 14px !important;
  border-radius:10px !important;
  background:#eef6ff !important;
  color:#0f172a !important;
  font-weight:bold !important;
  border:1px solid #d8e3f0;
  margin-right:8px !important;
  margin-bottom:8px !important;
}

label{
  display:block;
  font-weight:bold;
  margin-bottom:6px;
  color:#0f172a;
}

input, select, textarea{
  width:100% !important;
  padding:12px 13px !important;
  border:1px solid #cbd5e1 !important;
  border-radius:12px !important;
  box-sizing:border-box !important;
  background:#fff !important;
  color:#0f172a !important;
}

textarea{
  min-height:100px;
  resize:vertical;
}

button{
  border:0 !important;
  border-radius:12px !important;
  background:linear-gradient(135deg, var(--nf-primary), var(--nf-primary-dark)) !important;
  color:#fff !important;
  font-weight:bold !important;
  padding:12px 18px !important;
  cursor:pointer !important;
  box-shadow:0 8px 20px rgba(20,184,166,.18);
}

.ok{
  background:#ecfdf5 !important;
  color:#166534 !important;
  border:1px solid #bbf7d0;
  padding:13px !important;
  border-radius:12px !important;
  margin-bottom:16px !important;
}

.erro{
  background:#fef2f2 !important;
  color:#991b1b !important;
  border:1px solid #fecaca;
  padding:13px !important;
  border-radius:12px !important;
  margin-bottom:16px !important;
}

.alerta,
.hint,
.aviso{
  background:#fff7ed !important;
  color:#9a3412 !important;
  border:1px solid #fed7aa;
  padding:13px !important;
  border-radius:12px !important;
  margin-bottom:16px !important;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:bold;
  background:#e2e8f0;
  color:#0f172a;
}

table{
  width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 10px !important;
  margin-top:20px !important;
}

thead th{
  background:#eef4f9 !important;
  color:#334155 !important;
  font-size:13px !important;
  font-weight:bold !important;
  text-transform:uppercase;
  letter-spacing:.4px;
  padding:14px 12px !important;
  border:none !important;
}

thead th:first-child{
  border-top-left-radius:12px;
  border-bottom-left-radius:12px;
}
thead th:last-child{
  border-top-right-radius:12px;
  border-bottom-right-radius:12px;
}

tbody tr{
  box-shadow:0 5px 16px rgba(15,23,42,.05);
}

tbody td{
  background:#fff !important;
  border-top:1px solid #edf2f7 !important;
  border-bottom:1px solid #edf2f7 !important;
  border-left:none !important;
  border-right:none !important;
  padding:14px 12px !important;
  vertical-align:top !important;
  font-size:14px !important;
}

tbody td:first-child{
  border-left:1px solid #edf2f7 !important;
  border-top-left-radius:12px;
  border-bottom-left-radius:12px;
}
tbody td:last-child{
  border-right:1px solid #edf2f7 !important;
  border-top-right-radius:12px;
  border-bottom-right-radius:12px;
}

.nfse-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:320px;
}

.nfse-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:36px;
  padding:9px 13px;
  border-radius:10px;
  text-decoration:none !important;
  font-size:13px;
  font-weight:bold;
  line-height:1;
  border:1px solid transparent;
  transition:.18s ease;
  white-space:nowrap;
}

.nfse-btn:hover{
  transform:translateY(-1px);
  filter:brightness(.98);
}

.btn-dark{
  background:#0f172a;
  color:#fff !important;
}
.btn-primary{
  background:linear-gradient(135deg, #14b8a6, #0f766e);
  color:#fff !important;
}
.btn-info{
  background:#eff6ff;
  color:#1d4ed8 !important;
  border-color:#bfdbfe;
}
.btn-success{
  background:#ecfdf5;
  color:#15803d !important;
  border-color:#bbf7d0;
}
.btn-warning{
  background:#fff7ed;
  color:#c2410c !important;
  border-color:#fdba74;
}
.btn-purple{
  background:#f5f3ff;
  color:#7c3aed !important;
  border-color:#ddd6fe;
}
.btn-danger{
  background:#fef2f2;
  color:#dc2626 !important;
  border-color:#fecaca;
}

pre{
  background:#0f172a !important;
  color:#e5e7eb !important;
  padding:18px !important;
  border-radius:14px !important;
  overflow-x:auto !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  font-size:13px !important;
  white-space:pre-wrap !important;
  word-break:break-word !important;
}

.nfse-menu{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:9999;
  background:rgba(15,23,42,.96);
  backdrop-filter:blur(10px);
  box-shadow:0 10px 25px rgba(15,23,42,.20);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.nfse-menu-inner{
  max-width:1280px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:12px 18px;
}

.nfse-brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none !important;
  color:#fff !important;
  min-width:240px;
}

.nfse-brand img{
  height:52px;
  width:auto;
  display:block;
}

.nfse-nav{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
}

.nfse-nav a{
  text-decoration:none !important;
  color:#cbd5e1 !important;
  padding:10px 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:bold;
  border:1px solid transparent;
}

.nfse-nav a:hover,
.nfse-nav a.active{
  color:#fff !important;
  background:rgba(20,184,166,.16);
  border-color:rgba(20,184,166,.25);
}

.nfse-user-box{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:190px;
  justify-content:flex-end;
}

.nfse-user-avatar{
  width:38px;
  height:38px;
  border-radius:999px;
  background:linear-gradient(135deg, #14b8a6, #1e3a8a);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
  box-shadow:0 8px 18px rgba(20,184,166,.24);
}

.nfse-user-meta{
  color:#cbd5e1;
  font-size:12px;
  line-height:1.35;
}

.nfse-user-meta strong{
  display:block;
  color:#fff;
  font-size:13px;
}

@media (max-width: 980px){
  body{padding-top:148px !important}
  .nfse-menu-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .nfse-brand{
    min-width:auto;
  }
  .nfse-user-box{
    justify-content:flex-start;
    min-width:auto;
  }
  .nfse-actions{
    min-width:auto;
  }
}

/* Ajuste profissional da área de ações da listagem de notas */
.nfse-actions{
  display:grid !important;
  grid-template-columns: repeat(4, minmax(110px, 1fr)) !important;
  gap:7px !important;
  min-width:520px !important;
  max-width:620px !important;
}

.nfse-btn{
  min-height:34px !important;
  padding:8px 10px !important;
  font-size:12px !important;
  border-radius:9px !important;
  text-align:center !important;
}

@media (max-width: 1100px){
  .nfse-actions{
    grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
    min-width:260px !important;
    max-width:100% !important;
  }
}

@media (max-width: 640px){
  .nfse-actions{
    grid-template-columns: 1fr !important;
    min-width:100% !important;
  }

  .nfse-btn{
    width:100% !important;
  }
}

/* Listagem de notas em modo card para ações não estourarem */
.nfse-notas-table {
  border-collapse:separate !important;
  border-spacing:0 14px !important;
}

.nfse-notas-table thead {
  display:none !important;
}

.nfse-notas-table tbody tr {
  display:grid !important;
  grid-template-columns: 70px 140px 150px 1.4fr 150px 130px 140px 130px !important;
  gap:0 !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  border-radius:16px !important;
  box-shadow:0 8px 24px rgba(15,23,42,.06) !important;
  overflow:hidden !important;
  padding:0 !important;
}

.nfse-notas-table tbody td {
  display:block !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:14px 12px !important;
  background:#fff !important;
}

.nfse-notas-table tbody td::before {
  display:block;
  font-size:10px;
  color:#64748b;
  font-weight:bold;
  text-transform:uppercase;
  margin-bottom:5px;
  letter-spacing:.4px;
}

.nfse-notas-table tbody td:nth-child(1)::before { content:"ID"; }
.nfse-notas-table tbody td:nth-child(2)::before { content:"Empresa"; }
.nfse-notas-table tbody td:nth-child(3)::before { content:"Tomador"; }
.nfse-notas-table tbody td:nth-child(4)::before { content:"Documento"; }
.nfse-notas-table tbody td:nth-child(5)::before { content:"Valor"; }
.nfse-notas-table tbody td:nth-child(6)::before { content:"Status"; }
.nfse-notas-table tbody td:nth-child(7)::before { content:"Competência"; }
.nfse-notas-table tbody td:nth-child(8)::before { content:"Criado em"; }

.nfse-notas-table tbody td:nth-child(9) {
  grid-column:1 / -1 !important;
  border-top:1px solid #edf2f7 !important;
  background:#f8fafc !important;
  padding:14px !important;
}

.nfse-notas-table tbody td:nth-child(9)::before {
  content:"Ações";
  display:block;
  font-size:10px;
  color:#64748b;
  font-weight:bold;
  text-transform:uppercase;
  margin-bottom:9px;
  letter-spacing:.4px;
}

.nfse-notas-table .nfse-actions {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  min-width:0 !important;
  max-width:100% !important;
  width:100% !important;
}

.nfse-notas-table .nfse-btn {
  min-width:115px !important;
  flex:0 0 auto !important;
}

@media (max-width: 1100px) {
  .nfse-notas-table tbody tr {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .nfse-notas-table tbody td:nth-child(9) {
    grid-column:1 / -1 !important;
  }
}

@media (max-width: 640px) {
  .nfse-notas-table tbody tr {
    grid-template-columns: 1fr !important;
  }

  .nfse-notas-table tbody td:nth-child(9) {
    grid-column:1 !important;
  }

  .nfse-notas-table .nfse-btn {
    width:100% !important;
  }
}

/* Logo otimizada para navbar escura */
.nfse-brand img{
  height:58px !important;
  max-width:290px !important;
  filter:none !important;
}

.nfse-brand{
  min-width:300px !important;
}

@media (max-width: 760px){
  .nfse-brand img{
    height:48px !important;
    max-width:240px !important;
  }

  .nfse-brand{
    min-width:auto !important;
  }
}

/* Seletor de empresa ativa */
.nfse-company-switch{
  min-width:230px;
}

.nfse-company-switch select{
  width:100%;
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:10px !important;
  padding:9px 11px !important;
  font-weight:bold;
  font-size:13px;
}

.nfse-company-switch option{
  color:#0f172a;
}

@media (max-width:980px){
  .nfse-company-switch{
    width:100%;
  }
}

/* Correção definitiva do menu com seletor de empresa */
body{
  padding-top:96px !important;
}

.nfse-menu{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  z-index:9999 !important;
  background:rgba(15,23,42,.98) !important;
  backdrop-filter:blur(10px);
  box-shadow:0 10px 25px rgba(15,23,42,.22);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.nfse-menu-inner{
  max-width:1380px !important;
  margin:0 auto !important;
  display:grid !important;
  grid-template-columns:260px 1fr 360px !important;
  align-items:center !important;
  gap:18px !important;
  padding:10px 18px !important;
}

.nfse-menu-left,
.nfse-menu-center,
.nfse-menu-right{
  min-width:0 !important;
}

.nfse-brand{
  display:flex !important;
  align-items:center !important;
  min-width:0 !important;
  width:auto !important;
}

.nfse-brand img{
  height:54px !important;
  width:auto !important;
  max-width:245px !important;
  display:block !important;
}

.nfse-menu-center{
  overflow-x:auto !important;
  scrollbar-width:none;
}

.nfse-menu-center::-webkit-scrollbar{
  display:none;
}

.nfse-nav{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:6px !important;
  white-space:nowrap !important;
}

.nfse-nav a{
  color:#cbd5e1 !important;
  text-decoration:none !important;
  padding:9px 10px !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:bold !important;
  border:1px solid transparent !important;
  background:transparent !important;
}

.nfse-nav a:hover,
.nfse-nav a.active{
  color:#fff !important;
  background:rgba(20,184,166,.16) !important;
  border-color:rgba(20,184,166,.25) !important;
}

.nfse-menu-right{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
}

.nfse-company-switch{
  width:210px !important;
  min-width:210px !important;
  margin:0 !important;
}

.nfse-company-switch select{
  height:40px !important;
  width:100% !important;
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:10px !important;
  padding:8px 10px !important;
  font-weight:bold !important;
  font-size:12px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.nfse-company-switch option{
  color:#0f172a !important;
}

.nfse-user-box{
  min-width:120px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
}

.nfse-user-avatar{
  width:36px !important;
  height:36px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, #14b8a6, #1e3a8a) !important;
  color:#fff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-weight:bold !important;
  flex:0 0 auto !important;
}

.nfse-user-meta{
  color:#cbd5e1 !important;
  font-size:11px !important;
  line-height:1.25 !important;
  max-width:95px !important;
}

.nfse-user-meta strong{
  display:block !important;
  color:#fff !important;
  font-size:12px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.nfse-user-meta a{
  color:#2dd4bf !important;
  text-decoration:none !important;
  font-weight:bold !important;
  font-size:11px !important;
}

@media (max-width:1150px){
  body{
    padding-top:145px !important;
  }

  .nfse-menu-inner{
    grid-template-columns:1fr !important;
    gap:8px !important;
  }

  .nfse-menu-left{
    display:flex !important;
    justify-content:center !important;
  }

  .nfse-menu-center{
    width:100% !important;
  }

  .nfse-nav{
    justify-content:flex-start !important;
    overflow-x:auto !important;
  }

  .nfse-menu-right{
    width:100% !important;
    justify-content:space-between !important;
  }

  .nfse-company-switch{
    flex:1 !important;
    width:auto !important;
    min-width:0 !important;
  }
}

@media (max-width:640px){
  body{
    padding-top:175px !important;
  }

  .nfse-brand img{
    height:44px !important;
    max-width:220px !important;
  }

  .nfse-menu-right{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .nfse-user-box{
    justify-content:flex-start !important;
  }

  .nfse-user-meta{
    max-width:none !important;
  }
}

/* Menu compacto com dropdown Configurações */
.nfse-dropdown{
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
}

.nfse-dropbtn{
  background:transparent !important;
  box-shadow:none !important;
  color:#cbd5e1 !important;
  padding:9px 10px !important;
  border-radius:10px !important;
  border:1px solid transparent !important;
  font-size:13px !important;
  font-weight:bold !important;
  cursor:pointer !important;
}

.nfse-dropbtn:hover,
.nfse-dropbtn.active{
  color:#fff !important;
  background:rgba(20,184,166,.16) !important;
  border-color:rgba(20,184,166,.25) !important;
}

.nfse-dropdown-content{
  display:none !important;
  position:absolute !important;
  top:42px !important;
  right:0 !important;
  min-width:210px !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  border-radius:14px !important;
  padding:8px !important;
  box-shadow:0 18px 35px rgba(15,23,42,.18) !important;
  z-index:10000 !important;
}

.nfse-dropdown:hover .nfse-dropdown-content{
  display:block !important;
}

.nfse-dropdown-content a{
  display:block !important;
  color:#0f172a !important;
  background:transparent !important;
  text-decoration:none !important;
  padding:10px 12px !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:bold !important;
  border:0 !important;
}

.nfse-dropdown-content a:hover{
  background:#f1f5f9 !important;
}

.nfse-dropdown-content .danger-link{
  color:#dc2626 !important;
}

.nfse-menu-inner{
  grid-template-columns:260px 1fr 390px !important;
}

@media (max-width:1150px){
  .nfse-dropdown-content{
    left:0 !important;
    right:auto !important;
  }
}

/* Configurações por clique */
.nfse-dropdown-content.show{
  display:block !important;
}

.nfse-dropbtn{
  user-select:none !important;
}

/* Menu Configurações com clique nativo */
.nfse-details-menu{
  position:relative !important;
  display:inline-block !important;
}

.nfse-details-menu summary{
  list-style:none !important;
  cursor:pointer !important;
  color:#cbd5e1 !important;
  padding:9px 10px !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:bold !important;
  border:1px solid transparent !important;
  user-select:none !important;
}

.nfse-details-menu summary::-webkit-details-marker{
  display:none !important;
}

.nfse-details-menu[open] summary,
.nfse-details-menu summary:hover{
  color:#fff !important;
  background:rgba(20,184,166,.16) !important;
  border-color:rgba(20,184,166,.25) !important;
}

.nfse-details-content{
  position:absolute !important;
  top:42px !important;
  right:0 !important;
  min-width:220px !important;
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  border-radius:14px !important;
  padding:8px !important;
  box-shadow:0 18px 35px rgba(15,23,42,.18) !important;
  z-index:10000 !important;
}

.nfse-details-content a{
  display:block !important;
  color:#0f172a !important;
  background:transparent !important;
  text-decoration:none !important;
  padding:10px 12px !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:bold !important;
}

.nfse-details-content a:hover{
  background:#f1f5f9 !important;
}

.nfse-details-content .danger-link{
  color:#dc2626 !important;
}

@media (max-width:1150px){
  .nfse-details-content{
    left:0 !important;
    right:auto !important;
  }
}

/* Rodapé AMC Informática */
.nfse-footer{
  max-width:1280px;
  margin:28px auto 18px auto;
  padding:18px;
  text-align:center;
  color:#64748b;
  font-size:13px;
}

.nfse-footer span{
  display:block;
  font-weight:bold;
  color:#0f172a;
  margin-bottom:4px;
}

.nfse-footer small{
  color:#64748b;
}

/* Correção geral: telas grandes com rolagem e rodapé em barra */
html,
body {
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body {
  padding-bottom: 72px !important;
}

/* Evita tabelas/cards estourando horizontalmente */
.card {
  overflow-x: auto !important;
}

table {
  min-width: 760px;
}

/* Barra de rodapé AMC Informática */
.nfse-footer,
.nfse-footer-bar + .nfse-footer {
  display: none !important;
}

.nfse-footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  min-height: 48px;
  padding: 9px 22px;
  background: rgba(15, 23, 42, .98);
  color: #cbd5e1;
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -8px 24px rgba(15,23,42,.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

.nfse-footer-bar strong {
  color: #fff;
  margin-right: 8px;
}

.nfse-footer-bar span {
  color: #cbd5e1;
}

.nfse-footer-bar a {
  color: #2dd4bf;
  font-weight: bold;
  text-decoration: none;
}

.nfse-footer-bar a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  body {
    padding-bottom: 95px !important;
  }

  .nfse-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 74px;
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* Ajuste do campo Selecionar Tomador */
#tomador_id {
  font-size: 12px !important;
}

#tomador_id option {
  font-size: 12px !important;
}

/* Ajuste global de contraste dos botões NexaFiscal */
.nfse-btn,
button,
input[type="submit"],
.btn {
    color: #ffffff !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    border: 0 !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.btn-primary,
.nfse-btn.btn-primary {
    background: #1d4ed8 !important;
}

.btn-success,
.nfse-btn.btn-success {
    background: #15803d !important;
}

.btn-danger,
.nfse-btn.btn-danger {
    background: #b91c1c !important;
}

.btn-warning,
.nfse-btn.btn-warning {
    background: #92400e !important;
    color: #ffffff !important;
}

.btn-secondary,
.nfse-btn.btn-secondary {
    background: #334155 !important;
}

.btn-purple,
.nfse-btn.btn-purple {
    background: #6d28d9 !important;
}

.nfse-btn:hover,
button:hover,
input[type="submit"]:hover,
.btn:hover {
    filter: brightness(0.92);
}

/* Correção pontual de contraste: Consultar e Editar */
a[href*="consultar"],
a[href*="consulta"],
button[name*="consultar"],
.nfse-btn.btn-consultar {
    background: #0f766e !important;
    color: #ffffff !important;
    border: 1px solid #0f766e !important;
    font-weight: 800 !important;
}

a[href*="editar"],
.nfse-btn.btn-editar,
.btn-editar {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border: 1px solid #1d4ed8 !important;
    font-weight: 800 !important;
}

a[href*="consultar"]:hover,
a[href*="consulta"]:hover,
a[href*="editar"]:hover {
    filter: brightness(0.9);
    color: #ffffff !important;
}

/* Corrige contraste do botão Empresas no index/dashboard */
a[href*="empresas.php"],
.nfse-btn[href*="empresas.php"],
.btn[href*="empresas.php"]{
    background:#1d4ed8 !important;
    color:#ffffff !important;
    border:1px solid #1d4ed8 !important;
    font-weight:800 !important;
}

.form-empresa-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;align-items:start!important}
.form-empresa-grid div{min-width:0!important}
.form-empresa-grid input,.form-empresa-grid select{width:100%!important;box-sizing:border-box!important}
.form-empresa-grid label{display:block!important;font-weight:700!important;margin-bottom:6px!important}
.form-check{display:flex!important;gap:8px!important;align-items:center!important;margin-top:28px!important}
.form-check input{width:auto!important}
.form-actions{grid-column:1 / -1!important;margin-top:18px!important}

