:root {
  color: #182339;
  background: #f4f6fa;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  --muted: #53627a;
  --border: #e1e6ef;
  --blue: #2559d2;
  --blue-dark: #1947b5;
  --blue-light: #edf3ff;
  --navy: #101a30;
  --shadow: 0 2px 4px #172f5210;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select { font: inherit; }
button {
  min-height: 2.5rem;
  padding: .48rem .8rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: white;
  color: #283751;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
button:hover { background: var(--blue-light); border-color: #bdcff6; color: var(--blue-dark); }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 3px solid #6595fa; outline-offset: 3px; }
.primario { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 2px 3px #14358d29; }
.primario:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: white; }
.perigo { color: #a0253d; }
.perigo:hover { background: #fff0f2; border-color: #f2c8d1; color: #8e1d32; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.1; letter-spacing: -.048em; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1rem; }

.marca { display: flex; align-items: center; gap: .7rem; font-size: 1.225rem; font-weight: 650; letter-spacing: -.035em; }
.marca strong { color: #a9c8ff; }
.simbolo {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 .25rem .7rem #03091c45;
}

.acesso { min-height: 100svh; display: grid; grid-template-columns: minmax(17rem, 1fr) minmax(23rem, 1fr); background: #f8f9fc; }
.acesso-marca {
  display: grid;
  align-content: center;
  gap: 1.8rem;
  padding: clamp(2rem, 7vw, 7rem);
  color: white;
  background:
    radial-gradient(ellipse at 100% 100%, #4269ce80, transparent 70%),
    linear-gradient(#b3caff14 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, #b3caff14 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(145deg, #111a32 28%, #1b3473);
}
.acesso-marca p { max-width: 14ch; font-size: clamp(2rem, 4.4vw, 4.25rem); line-height: 1.05; letter-spacing: -.06em; font-weight: 700; }
.acesso-formulario { display: grid; place-items: center; padding: clamp(1.25rem, 5vw, 5rem); }
.acesso form {
  width: min(100%, 26rem);
  display: grid;
  gap: 1.05rem;
  padding: clamp(1.35rem, 4vw, 2.25rem);
  background: white;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 .65rem 2.4rem #1327520c;
}
.acesso h1 { font-size: clamp(1.5rem, 3vw, 1.95rem); margin-bottom: .35rem; }
.acesso button { margin-top: .25rem; }
.acoes-acesso { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .85rem; }
.link-acesso { background: none; color: var(--blue-dark); border-color: transparent; padding: .25rem 0; text-align: left; }
.link-acesso:hover { background: none; border-color: transparent; text-decoration: underline; }
#confirmacao-email { display: grid; gap: .75rem; }
.info-acesso { color: var(--muted); font-size: .9rem; }
#ajuda-instalacao { margin-top: .35rem; }

.painel { min-height: 100svh; display: grid; grid-template-columns: 14.75rem minmax(0, 1fr); }
.lateral {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  overflow-y: auto;
  padding: 1.15rem .9rem;
  color: #f3f6ff;
  background: linear-gradient(165deg, #15213d, var(--navy) 46%);
  border-right: 1px solid #26334e;
}
.lateral .marca { padding: 0 .5rem 1.15rem; border-bottom: 1px solid #ffffff19; }
.lateral nav, .grupo-menu { display: grid; }
.lateral nav { margin-top: 1.6rem; gap: 1.45rem; }
.grupo-menu { gap: .3rem; }
.grupo-menu p { margin: 0 .65rem .28rem; color: #a5b3d0; font-size: .72rem; font-weight: 650; letter-spacing: .075em; text-transform: uppercase; }
.lateral button {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.6rem;
  padding-inline: .65rem;
  color: #dce5f9;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
.lateral button:hover { background: #ffffff12; color: white; }
.lateral [aria-current="page"] { background: #2950a340; border-color: #729af145; color: #f5f8ff; }
.lateral [aria-current="page"]:hover { background: #2950a36b; }

.lateral .abrir-menu { display: none; }
.icone-menu { width: .9rem; height: .65rem; border-block: 1.5px solid; position: relative; }
.icone-menu::after { content: ""; position: absolute; inset: calc(50% - .75px) 0 auto; border-top: 1.5px solid; }
.icone-nav { position: relative; display: inline-block; width: 1rem; height: 1rem; flex: none; color: #aab9db; }
[aria-current="page"] .icone-nav { color: #abcaff; }
.icone-nav::before, .icone-nav::after { position: absolute; content: ""; }
.icone-clientes::before { inset: 4px 0 1px; border: 1.5px solid; border-radius: 2px; }
.icone-clientes::after { inset: 1px 7px auto 1px; height: 3px; border: 1.5px solid; border-bottom: 0; border-radius: 2px 2px 0 0; }
.icone-fornecedores::before { inset: 2px 1px 1px; border: 1.5px solid; border-radius: 2px; }
.icone-fornecedores::after { inset: 6px 5px 4px; border-block: 1.5px solid; }
.icone-produtos::before { inset: 2px 1px 1px; border: 1.5px solid; border-radius: 2px; }
.icone-produtos::after { inset: 6px 1px auto; border-top: 1.5px solid; }
.icone-usuarios::before { inset: 1px 5px auto; height: 6px; border: 1.5px solid; border-radius: 50%; }
.icone-usuarios::after { inset: 9px 1px 1px; border: 1.5px solid; border-radius: 5px 5px 2px 2px; }
.icone-consultas::before { inset: 1px; border: 1.5px solid; border-radius: 50%; }
.icone-consultas::after { top: 4px; left: 7px; width: 4px; height: 5px; border-left: 1.5px solid; border-bottom: 1.5px solid; }

.area-trabalho { min-width: 0; }
.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  min-height: 4.75rem;
  padding: .7rem clamp(1.15rem, 3.5vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background: white;
  font-size: .875rem;
}
.localizacao, .conta { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.localizacao { color: var(--muted); }
#area-atual { display: inline-flex; align-items: center; gap: .65rem; color: #24354e; font-weight: 650; }
#area-atual::before { content: ""; display: inline-block; width: .4rem; height: .4rem; border-top: 1.5px solid #76859c; border-right: 1.5px solid #76859c; transform: rotate(45deg); margin-right: .16rem; }
#grupo-atual:empty + #area-atual::before { display: none; }
.conta { font-weight: 600; }
#usuario { overflow-wrap: anywhere; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: .75rem;
  font-weight: 700;
}
#sair { min-height: 2.1rem; background: transparent; color: var(--muted); border-color: transparent; }
#sair:hover { background: var(--blue-light); color: var(--blue-dark); }

.conteudo { width: 100%; max-width: 100rem; margin-inline: auto; padding: clamp(1.2rem, 3.5vw, 3.5rem); }
.topo, .bloco-topo { display: flex; gap: .85rem 1.4rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.topo { margin: .15rem 0 1.55rem; }
.topo p, .bloco-topo p { color: var(--muted); margin-top: .35rem; font-size: .925rem; }
.botao-adicionar { display: inline-flex; align-items: center; gap: .5rem; }
.botao-adicionar::before {
  content: "";
  width: 1rem;
  height: 1rem;
  background: linear-gradient(currentColor, currentColor) center / .7rem 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px .7rem no-repeat;
}
.bloco { margin: 1rem 0; background: white; border: 1px solid var(--border); border-radius: .8rem; box-shadow: var(--shadow); }
.bloco-topo { min-height: 3.8rem; padding: 1.05rem 1.2rem; }
.ferramentas { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .9rem 1.2rem; }
.filtros-consultas { justify-content: flex-start; align-items: flex-end; }
.filtros-consultas .busca-consultas { flex: 1 1 14rem; }
.campo-busca { position: relative; width: min(100%, 22rem); }
.campo-busca::before, .campo-busca::after { content: ""; position: absolute; color: #687b98; pointer-events: none; }
.campo-busca::before { top: .79rem; left: .9rem; width: .7rem; height: .7rem; border: 1.5px solid; border-radius: 50%; }
.campo-busca::after { top: 1.47rem; left: 1.46rem; width: .36rem; border-top: 1.5px solid; transform: rotate(45deg); }
.campo-busca input { width: 100%; padding-left: 2.45rem; background: #f8fafd; }
.campo-busca input:focus { background: white; }
.filtros-status { display: inline-flex; flex-wrap: wrap; gap: .2rem; padding: .2rem; border: 1px solid var(--border); border-radius: .65rem; background: #f4f6fa; }
.filtros-status button { min-height: 2.1rem; border-color: transparent; color: var(--muted); background: transparent; }
.filtros-status button:hover { color: var(--blue-dark); }
.filtros-status button[aria-pressed="true"] { background: white; color: var(--blue-dark); border-color: var(--border); box-shadow: var(--shadow); }
.total-registros { color: var(--muted); font-size: .825rem; padding: .65rem 1.2rem; border-top: 1px solid var(--border); }
.paginacao-consultas { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.mensagem-log { padding: .85rem; background: #f7f9fc; border: 1px solid var(--border); border-radius: .55rem; }
.mensagem-log p { margin-top: .35rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.voltar { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem; padding-inline: .35rem; color: var(--muted); background: transparent; border-color: transparent; }
.voltar::before { content: ""; display: inline-block; width: .42rem; height: .42rem; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); margin-left: .2rem; }
.rolar { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .85rem 1.2rem; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
th { background: #f7f9fc; color: #485973; font-size: .8rem; font-weight: 650; }
td { font-size: .9rem; }
.celula-acoes { text-align: right; }
td button { min-height: 2.15rem; padding: .35rem .65rem; white-space: nowrap; }
tr:hover td, tr:focus-within td { background: #f9fbff; }
.nome-cadastro { display: grid; gap: .12rem; }
.nome-cadastro small { color: var(--muted); font-size: .8rem; }
.acoes { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.vazio { padding: 2.4rem 1.2rem; color: var(--muted); text-align: center; border-top: 1px solid var(--border); }
.dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 1.15rem; padding: 1.05rem 1.2rem 1.25rem; margin: 0; border-top: 1px solid var(--border); }
dt { color: var(--muted); font-size: .825rem; }
dd { margin: .22rem 0 0; overflow-wrap: anywhere; font-size: .95rem; font-weight: 550; }
.status { display: inline-flex; align-items: center; gap: .36rem; border-radius: 2rem; padding: .22rem .55rem; font-size: .8rem; white-space: nowrap; font-weight: 650; }
.status::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: currentColor; }
.ativa, .liberada { background: #e4f5eb; color: #176141; }
.pendente { background: #fff2d8; color: #784900; }
.bloqueada, .expirada { background: #fce9ee; color: #94243a; }
.inativa { background: #eef0f5; color: #4d586e; }

label { display: grid; gap: .35rem; font-weight: 650; font-size: .875rem; }
input, select { min-width: 0; min-height: 2.65rem; border: 1px solid #bac6d9; border-radius: .55rem; padding: .5rem .7rem; color: inherit; background: white; font-weight: 400; font-size: 1rem; }
input::placeholder { color: var(--muted); }
input[readonly] { background: #f3f6fb; }
input[type="checkbox"] { min-height: auto; width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
.marcar { display: flex; align-items: center; gap: .5rem; min-height: 2rem; }
.erro { color: #932a3a; background: #fff0f2; padding: .65rem .8rem; border-radius: .45rem; overflow-wrap: anywhere; }
.aviso { position: fixed; z-index: 1; inset: auto 1.2rem 1.2rem auto; padding: .75rem 1rem; border-radius: .6rem; background: var(--navy); color: white; max-width: calc(100% - 2.4rem); box-shadow: 0 .25rem 1rem #10234135; }
dialog { width: min(calc(100% - 1.6rem), 35rem); border: 1px solid var(--border); border-radius: .9rem; color: inherit; padding: 0; box-shadow: 0 1rem 3rem #13275338; }
dialog::backdrop { background: #101a306e; }
dialog form { display: grid; gap: 1rem; padding: 1.2rem 1.35rem; }
dialog header, dialog footer { display: flex; align-items: center; gap: .6rem; }
dialog header { justify-content: space-between; padding-bottom: .8rem; border-bottom: 1px solid var(--border); }
dialog footer { justify-content: flex-end; padding-top: .8rem; border-top: 1px solid var(--border); }
#fechar { line-height: 1; font-size: 1.3rem; min-height: 2.05rem; padding: .15rem .65rem; }
#campos { display: grid; gap: .82rem; }
.grupo-empresa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  min-width: 0;
  margin: .4rem 0 0;
  padding: .65rem .75rem .75rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
}
.grupo-empresa legend { padding: 0 .3rem; font-size: .9rem; font-weight: 650; }
.lista-permissoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.grupo-permissoes { grid-template-columns: minmax(0, 1fr); align-content: start; gap: .2rem; }

@media (max-width: 820px) {
  .acesso { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .acesso-marca { gap: .9rem; padding: 1.5rem; }
  .acesso-marca p { font-size: clamp(1.6rem, 5vw, 2.45rem); max-width: 15ch; }
  .painel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .lateral { position: static; height: auto; overflow: visible; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem; padding: .65rem 1.05rem; }
  .lateral .marca { padding: 0; border: 0; }
  .lateral .abrir-menu { display: inline-flex; }
  .lateral .abrir-menu[aria-expanded="false"] + nav { display: none; }
  .lateral nav { grid-column: 1 / -1; margin-top: .35rem; padding-block: .75rem .4rem; border-top: 1px solid #ffffff19; gap: .95rem; }
  .barra { min-height: 3.5rem; }
}

@media (max-width: 630px) {
  .barra { padding: .55rem 1rem; }
  #grupo-atual, #area-atual::before { display: none; }
  .conta { gap: .4rem; font-size: .8rem; }
  .avatar { width: 1.75rem; height: 1.75rem; }
  .conteudo { padding: 1.35rem 1rem; }
  .topo { margin-bottom: 1.15rem; }
  .ferramentas, .total-registros, .bloco-topo, .dados { padding-inline: .9rem; }
  .campo-busca { width: 100%; }
  .grupo-empresa { grid-template-columns: minmax(0, 1fr); }
  .rolar { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { border-top: 1px solid var(--border); padding: .6rem .9rem; }
  td { display: grid; grid-template-columns: minmax(5rem, .8fr) minmax(0, 1.35fr); gap: .55rem; padding: .32rem 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .825rem; }
  td.celula-acoes { display: block; }
  td.celula-acoes::before { display: none; }
  tr:hover td, tr:focus-within td { background: transparent; }
  .status { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
