/* =====================================================================
   Lealnet Fibra Ótica - Sistema de Gestao
   Tema escuro: vidro fosco, roxo com detalhes em laranja e mapa de rede ao fundo
   ===================================================================== */

:root {
  color-scheme: dark;

  --fundo: #0c0612;
  --fundo-2: #140a1d;
  --fundo-3: #1e1129;
  --superficie: #180e23;          /* solida: modais, tabelas, formularios */
  --superficie-2: #23152f;
  --vidro: rgba(26, 15, 37, .9);   /* cartoes translucidos sobre o mapa */
  --borda: #2c1c3b;
  --borda-clara: #432e58;

  --texto: #f4eef8;
  --texto-2: #c3b4cf;
  --texto-3: #8f7f9e;

  /* Os nomes "ciano" e "lima" vem da versao original. Aqui o destaque
     principal e o laranja do simbolo e o secundario, o roxo do nome. */
  --ciano: #f68b26;
  --ciano-escuro: #d9690a;
  --lima: #b869c8;
  --lima-escuro: #8e2a8c;
  --rgb-marca: 246, 139, 38;

  /* Reservadas para estado real: em dia, atencao, critico. */
  --ok: #4ade80;
  --aviso: #fbbf24;
  --erro: #f87171;
  --info: #7aa7ff;
  --roxo: #c79bf2;
  --rosa: #f472b6;
  --laranja: #fb923c;

  --lateral-fundo: linear-gradient(180deg, rgba(48, 12, 56, .96) 0%, rgba(30, 9, 38, .97) 55%, rgba(18, 6, 25, .98) 100%);
  --lateral-texto: #d9cbe2;
  --lateral-texto-fraco: #9a85a8;
  --lateral-borda: rgba(255, 255, 255, .08);

  --raio: 14px;
  --raio-pequeno: 9px;
  --sombra: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .28);
  --sombra-forte: 0 24px 60px rgba(0, 0, 0, .6);
  --lateral-largura: 258px;
  --transicao: 160ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--fundo);
  color: var(--texto);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.oculto { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--fundo-2); }
::-webkit-scrollbar-thumb { background: var(--borda-clara); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ciano); }
.lateral ::-webkit-scrollbar-track { background: transparent; }
.lateral ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); }

/* ------------------------------------------------------------- marca */

.marca {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; min-width: 0;
}
/* Na lateral roxa vai a versao do logo com as letras em branco e o simbolo
   laranja original (img/logo-claro.png); dispensa cartao de fundo. */
.marca { flex: 1; justify-content: center; padding: 6px 0 2px; }
.marca img.marca-logo { width: 100%; max-width: 132px; height: auto; display: block; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marca-texto strong { font-size: 14.5px; font-weight: 700; color: var(--ciano); }
.marca-texto small { font-size: 10.5px; color: var(--texto-3); }

/* ------------------------------------------------------------- login */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(246, 139, 38, .13), transparent 60%),
    radial-gradient(900px 640px at 92% 100%, rgba(140, 50, 150, .30), transparent 62%);
}

.login-caixa {
  width: 100%;
  max-width: 400px;
  background: rgba(24, 14, 35, .86);
  backdrop-filter: blur(16px);
  border: 1px solid var(--borda-clara);
  border-radius: 18px;
  padding: 38px 32px 26px;
  box-shadow: var(--sombra-forte);
}

.login-marca { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 200px; max-width: 100%; height: auto;
  display: block; margin: 0 auto 14px;
}
.login-titulo { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--texto); }
.login-wrap { position: relative; z-index: 1; }
.login-sub { color: var(--texto-3); font-size: 12px; margin-top: 5px; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-rodape { text-align: center; color: var(--texto-3); font-size: 11px; margin-top: 20px; }

/* ------------------------------------------------------------ campos */

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12px; color: var(--texto-2); font-weight: 500; }
.campo-obrigatorio > span:first-child::after { content: ' *'; color: var(--erro); }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--texto);
  background: var(--fundo-2);
  border: 1px solid var(--borda);
  border-radius: var(--raio-pequeno);
  padding: 9px 11px;
  width: 100%;
  transition: border-color var(--transicao), box-shadow var(--transicao);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ciano);
  box-shadow: 0 0 0 3px rgba(var(--rgb-marca), .14);
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
textarea { resize: vertical; min-height: 74px; }
select { cursor: pointer; }
input[type="checkbox"] { width: auto; accent-color: var(--ciano); cursor: pointer; }

.campo-checkbox {
  flex-direction: row; align-items: center; gap: 9px;
  background: var(--fundo-2); border: 1px solid var(--borda);
  border-radius: var(--raio-pequeno); padding: 9px 11px;
}
.campo-checkbox > span { font-size: 13px; color: var(--texto); }

/* Multipla escolha (ex.: os perfis de um usuario). Rola quando a lista
   cresce, para o modal nao virar uma pagina infinita. */
.lista-multi {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 7px; max-height: 260px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--borda);
  border-radius: var(--raio-pequeno); background: var(--fundo-2);
}
.opcao-multi {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; border-radius: var(--raio-pequeno);
  cursor: pointer; transition: background var(--transicao);
}
.opcao-multi:hover { background: var(--fundo-3); }
.opcao-multi input { margin-top: 2px; }
.opcao-multi strong { display: block; font-size: 13px; font-weight: 500; color: var(--texto); }
.opcao-multi small { display: block; font-size: 11px; color: var(--texto-3); margin-top: 2px; }

.campo-ajuda { font-size: 11px; color: var(--texto-3); }

/* ------------------------------------------------------------ botoes */

.btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--raio-pequeno);
  padding: 9px 16px;
  cursor: pointer;
  transition: all var(--transicao);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primario {
  background: linear-gradient(135deg, #ffa347, var(--ciano) 50%, var(--ciano-escuro));
  color: #2a0a2d;
  box-shadow: 0 4px 14px rgba(var(--rgb-marca), .28);
}
.btn-primario:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }

.btn-lima { background: linear-gradient(135deg, #a651b6, var(--lima-escuro)); color: #fff; }
.btn-lima:hover:not(:disabled) { filter: brightness(1.1); }

.btn-secundario { background: var(--superficie-2); color: var(--texto); border-color: var(--borda-clara); }
.btn-secundario:hover:not(:disabled) { background: var(--fundo-3); border-color: var(--ciano); color: var(--ciano-escuro); }

.btn-fantasma { background: transparent; color: var(--texto-2); border-color: var(--borda); }
.btn-fantasma:hover:not(:disabled) { color: var(--texto); border-color: var(--borda-clara); background: var(--superficie); }

.btn-perigo { background: rgba(248, 113, 113, .1); color: var(--erro); border-color: rgba(248, 113, 113, .32); }
.btn-perigo:hover:not(:disabled) { background: rgba(248, 113, 113, .2); }

.btn-ok { background: rgba(74, 222, 128, .1); color: var(--ok); border-color: rgba(74, 222, 128, .3); }
.btn-ok:hover:not(:disabled) { background: rgba(74, 222, 128, .2); }

.btn-pequeno { padding: 6px 11px; font-size: 12.5px; }
.btn-mini { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }
.btn-bloco { width: 100%; }

.btn-icone {
  background: transparent; border: 1px solid transparent; color: var(--texto-2);
  border-radius: var(--raio-pequeno); padding: 7px 9px; cursor: pointer;
  font-size: 16px; line-height: 1; position: relative;
  transition: all var(--transicao);
}
.btn-icone:hover { background: var(--superficie); color: var(--texto); }

.badge {
  position: absolute; top: 1px; right: 1px;
  background: var(--erro); color: #2a0707; font-size: 9.5px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; display: grid; place-items: center;
}

/* ----------------------------------------------------------- layout */

#app { display: flex; min-height: 100vh; }

.lateral {
  width: var(--lateral-largura);
  flex-shrink: 0;
  background: var(--lateral-fundo);
  color: var(--lateral-texto);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}

.lateral-topo {
  padding: 18px 16px 14px; gap: 8px;
  display: flex; align-items: center; justify-content: space-between;
}

.seletor-empresa { padding: 6px 16px 14px; border-bottom: 1px solid var(--lateral-borda); }
.seletor-empresa label {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--lateral-texto-fraco); margin-bottom: 5px; font-weight: 600;
}
.seletor-empresa select {
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff;
}
.seletor-empresa select option { color: var(--texto); background: #1e1129; }

.menu { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.menu-grupo { margin-bottom: 16px; }
.menu-grupo-titulo {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--lateral-texto-fraco); padding: 0 10px 7px; font-weight: 700;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: var(--raio-pequeno);
  color: var(--lateral-texto); text-decoration: none; font-size: 13.5px;
  transition: all var(--transicao); cursor: pointer;
  border: 1px solid transparent;
}
.menu-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu-item.ativo {
  background: linear-gradient(90deg, rgba(246, 139, 38, .2), rgba(246, 139, 38, .07));
  border-color: rgba(246, 139, 38, .42);
  color: #ffa651; font-weight: 600;
}
.menu-item .icone { font-size: 15px; width: 19px; text-align: center; flex-shrink: 0; }
.menu-item.ativo .icone { filter: saturate(1.1); }
.menu-item .contador {
  margin-left: auto; background: var(--erro); color: #2a0707;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 9px;
}

.lateral-rodape { padding: 13px 16px; border-top: 1px solid var(--lateral-borda); }
.lateral-rodape .btn-fantasma { color: var(--lateral-texto); border-color: rgba(255, 255, 255, .18); }
.lateral-rodape .btn-fantasma:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; }
.lateral .btn-icone { color: var(--lateral-texto); }
.usuario-info { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.usuario-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--lima), var(--ciano));
  color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.usuario-dados { min-width: 0; }
.usuario-dados strong { display: block; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-dados span { display: block; font-size: 11px; color: var(--lateral-texto-fraco); }

.conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topo {
  height: 60px; flex-shrink: 0;
  background: rgba(12, 6, 18, .62);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
}

.busca-global { flex: 1; max-width: 560px; position: relative; }
.busca-global { --mascara-lupa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E"); }
.busca-global input { background: rgba(255, 255, 255, .05); border-color: var(--borda-clara); padding-left: 36px; }
.busca-global::before {
  content: ''; position: absolute; left: 12px; top: 50%; width: 15px; height: 15px;
  transform: translateY(-50%); pointer-events: none; z-index: 1;
  background: var(--texto-3);
  -webkit-mask: var(--mascara-lupa) center / contain no-repeat;
          mask: var(--mascara-lupa) center / contain no-repeat;
}

.busca-resultados {
  position: absolute; top: calc(100% + 7px); left: 0; right: 0;
  background: var(--superficie); border: 1px solid var(--borda-clara);
  border-radius: var(--raio); box-shadow: var(--sombra-forte);
  max-height: 440px; overflow-y: auto; z-index: 60;
}
.busca-item {
  padding: 9px 13px; cursor: pointer; border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; gap: 11px;
}
.busca-item:last-child { border-bottom: none; }
.busca-item:hover { background: var(--superficie-2); }
.busca-item-tipo {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em;
  background: var(--fundo-3); color: var(--ciano);
  padding: 2px 7px; border-radius: 5px; flex-shrink: 0; font-weight: 700;
}
.busca-item-texto { min-width: 0; flex: 1; }
.busca-item-texto strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-item-texto span { display: block; font-size: 11.5px; color: var(--texto-3); }

.topo-acoes { display: flex; align-items: center; gap: 9px; margin-left: auto; }

.pagina { flex: 1; padding: 22px; max-width: 1680px; width: 100%; }

/* -------------------------------------------------------- cabecalhos */

.pagina-topo {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.pagina-titulo h1 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.pagina-titulo p { color: var(--texto-3); font-size: 13px; margin-top: 3px; }
.pagina-acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ cards */

.card {
  background: var(--vidro);
  backdrop-filter: blur(10px);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  overflow: hidden;
}
/* Tabela e formulario pedem leitura continua: superficie solida, sem vidro. */
.card:has(table), .card:has(form), .barra-filtros { background: rgba(24, 14, 35, .97); backdrop-filter: none; }
.card-cabecalho {
  padding: 13px 16px; border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-cabecalho h2, .card-cabecalho h3 { font-size: 14px; font-weight: 600; }
.card-corpo { padding: 16px; }
.card-rodape { padding: 11px 16px; border-top: 1px solid var(--borda); background: rgba(255, 255, 255, .02); }

/* ------------------------------------------------- quadros ajustaveis */

.grade-ajustavel { align-items: stretch; }

.quadro-ajustavel { position: relative; overflow: hidden; }

/* Quadro com altura definida pelo usuario: o miolo rola em vez de cortar o
   conteudo. Sem isto, encurtar um card escondia linhas sem dar pista de que
   havia mais coisa ali embaixo. */
.card.quadro-com-altura { display: flex; flex-direction: column; }
.card.quadro-com-altura > .card-cabecalho { flex: 0 0 auto; }
.card.quadro-com-altura > .card-corpo {
  flex: 1 1 auto; overflow: auto; min-height: 0;
}
.quadro-ajustavel.ajustando {
  outline: 2px dashed var(--ciano); outline-offset: -2px;
  user-select: none; z-index: 5;
}
.quadro-ajustavel.arrastando { opacity: .4; }
.quadro-ajustavel.alvo-drop { outline: 2px solid var(--lima); outline-offset: -2px; }

/* Alca de tamanho: um triangulo discreto no canto inferior direito. */
.alca-ajuste {
  position: absolute; right: 0; bottom: 0;
  width: 18px; height: 18px; cursor: nwse-resize;
  opacity: 0; transition: opacity var(--transicao);
  background:
    linear-gradient(135deg, transparent 46%, var(--borda-clara) 46%, var(--borda-clara) 58%, transparent 58%),
    linear-gradient(135deg, transparent 68%, var(--borda-clara) 68%, var(--borda-clara) 80%, transparent 80%);
  touch-action: none; z-index: 4;
}
.quadro-ajustavel:hover .alca-ajuste { opacity: 1; }
.alca-ajuste:hover {
  background:
    linear-gradient(135deg, transparent 46%, var(--ciano) 46%, var(--ciano) 58%, transparent 58%),
    linear-gradient(135deg, transparent 68%, var(--ciano) 68%, var(--ciano) 80%, transparent 80%);
}

/* Pegador de posicao: aparece no canto superior direito ao passar o mouse. */
.alca-mover {
  position: absolute; right: 6px; top: 6px;
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--texto-3); font-size: 13px; line-height: 1;
  cursor: grab; opacity: 0; transition: opacity var(--transicao), color var(--transicao);
  background: var(--fundo-2); border: 1px solid var(--borda);
  z-index: 4; user-select: none;
}
.quadro-ajustavel:hover .alca-mover { opacity: 1; }
.alca-mover:hover { color: var(--ciano); border-color: var(--ciano-escuro); }
.alca-mover:active { cursor: grabbing; }

/* Sem mouse (celular/tablet) so o ajuste de altura faz sentido. */
@media (hover: none) and (pointer: coarse) {
  .alca-ajuste { opacity: .5; cursor: ns-resize; }
  .alca-mover { display: none; }
}

/* Divisor de secao: dá respiro e hierarquia a telas longas. */
.secao {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0 13px;
}
.secao:first-child { margin-top: 0; }
.secao h2 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--texto-2); white-space: nowrap;
}
.secao::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--borda), transparent);
}
.secao .secao-acao { flex-shrink: 0; }

.grade { display: grid; gap: 14px; }
.grade-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grade-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grade-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grade-formulario { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.col-inteira { grid-column: 1 / -1; }

/* No celular o quadro ocupa a largura toda; so a altura e ajustavel. */
@media (max-width: 720px) {
  .quadro-ajustavel { grid-column: 1 / -1 !important; }
}

/* ------------------------------------------------------ indicadores */

/* Os modificadores de cor usam o prefixo "ind-" de proposito: sem ele,
   ".indicador.alerta" herdaria o display:flex do componente .alerta e o
   cartao inteiro se desmontaria na horizontal. */
.indicador {
  background: var(--vidro);
  backdrop-filter: blur(10px);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  padding: 17px 16px 16px 18px;
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px;
  align-items: center; min-height: 104px;
  transition: border-color var(--transicao), transform var(--transicao), background var(--transicao);
}
.indicador:hover { border-color: var(--borda-clara); }
.indicador-clicavel:hover { transform: translateY(-2px); background: rgba(33, 20, 46, .94); }

.indicador.ind-perigo { --tom-ind: var(--erro); }
.indicador.ind-alerta { --tom-ind: var(--aviso); }
.indicador.ind-ok { --tom-ind: var(--ok); }
.indicador.ind-info { --tom-ind: var(--info); }
.indicador.ind-lima { --tom-ind: var(--lima); }
/* So o que pede acao ganha contorno colorido; o resto fica neutro. */
.indicador.ind-perigo { border-color: rgba(248, 113, 113, .38); }
.indicador.ind-alerta { border-color: rgba(251, 191, 36, .3); }

.indicador-icone {
  align-self: start; margin-top: 1px;
  font-size: 22px; line-height: 1; color: var(--texto-2);
}
.indicador-corpo { min-width: 0; display: flex; flex-direction: column; align-self: stretch; }
.indicador-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.indicador-rotulo {
  font-size: 10.5px; color: var(--texto-2); text-transform: uppercase;
  letter-spacing: .09em; font-weight: 600;
}
.indicador-ponto {
  width: 8px; height: 8px; border-radius: 2.5px; flex-shrink: 0;
  background: var(--tom-ind); box-shadow: 0 0 8px var(--tom-ind);
}
.indicador-valor {
  font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--texto);
}
.indicador-valor.pequeno { font-size: 19px; }
.indicador-detalhe { font-size: 12.5px; color: var(--texto-2); margin-top: auto; padding-top: 7px; }
.indicador-seta { color: var(--texto-3); font-size: 17px; transition: transform var(--transicao), color var(--transicao); }
.indicador-clicavel { cursor: pointer; }
.indicador-clicavel:hover .indicador-seta { color: var(--ciano); transform: translateX(3px); }

/* ---------------------------------------------------------- tabelas */

.tabela-envolvida { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 9px 12px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--texto-3); font-weight: 700;
  border-bottom: 1px solid var(--borda);
  background: var(--fundo-2); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
thead th.ordenavel { cursor: pointer; user-select: none; }
thead th.ordenavel:hover { color: var(--ciano); }

tbody td { padding: 9px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
tbody tr { transition: background var(--transicao); }
tbody tr:hover { background: rgba(var(--rgb-marca), .04); }
tbody tr.clicavel { cursor: pointer; }
tbody tr.destaque-erro { background: rgba(248, 113, 113, .07); }
tbody tr.destaque-aviso { background: rgba(251, 191, 36, .06); }

tfoot td {
  padding: 10px 12px; font-weight: 700;
  border-top: 2px solid var(--borda-clara); background: var(--fundo-2);
}

.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.centro { text-align: center; }
.truncar { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monospaco { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.vazio { padding: 44px 20px; text-align: center; color: var(--texto-3); }
.vazio-icone {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  color: var(--texto-2); border: 1.5px solid var(--borda-clara);
  background: rgba(255, 255, 255, .03);
}
.vazio-ok .vazio-icone { color: var(--ok); border-color: rgba(74, 222, 128, .55); background: rgba(74, 222, 128, .07); }
.vazio > div:nth-child(2) { color: var(--texto); font-size: 14px; }

/* Acoes de linha: discretas ate o mouse passar sobre a linha. */
/* Barra que aparece quando ha linhas marcadas para apagar em lote. */
.barra-selecao {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; margin-bottom: 10px;
  background: rgba(var(--rgb-marca), .08);
  border: 1px solid rgba(var(--rgb-marca), .3);
  border-radius: var(--raio);
}
.barra-selecao-texto { font-size: 13px; color: var(--texto-2); margin-right: auto; }
.barra-selecao-texto strong { color: var(--ciano); }

tr.linha-selecionada > td { background: rgba(var(--rgb-marca), .07); }

.lista-recusas { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lista-recusas li {
  font-size: 13px; padding: 9px 11px;
  background: var(--fundo-2); border: 1px solid var(--borda);
  border-radius: var(--raio-pequeno);
}

/* Empresa + os perfis exercidos nela, uma linha por empresa. */
.linha-vinculo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-bottom: 3px;
}
.linha-vinculo:last-child { margin-bottom: 0; }

.acoes-linha { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.acoes-linha .btn { opacity: .45; transition: opacity var(--transicao); }
tbody tr:hover .acoes-linha .btn { opacity: 1; }
.acoes-linha .btn:focus-visible { opacity: 1; }

/* Registro desativado continua visivel, mas obviamente apagado. */
tbody tr.inativo > td:not(:last-child) { opacity: .45; }

/* ------------------------------------------------------------ selos */

.selo {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 2.5px 9px;
  border-radius: 20px; white-space: nowrap;
  border: 1px solid transparent;
}
.selo-cinza { background: rgba(160, 140, 180, .14); color: var(--texto-2); border-color: rgba(160, 140, 180, .28); }
.selo-ciano { background: rgba(246, 139, 38, .13); color: #ffab5c; border-color: rgba(246, 139, 38, .34); }
.selo-verde { background: rgba(74, 222, 128, .12); color: var(--ok); border-color: rgba(74, 222, 128, .3); }
.selo-amarelo { background: rgba(251, 191, 36, .12); color: var(--aviso); border-color: rgba(251, 191, 36, .3); }
.selo-vermelho { background: rgba(248, 113, 113, .12); color: var(--erro); border-color: rgba(248, 113, 113, .32); }
.selo-azul { background: rgba(122, 167, 255, .12); color: var(--info); border-color: rgba(122, 167, 255, .3); }
.selo-roxo { background: rgba(199, 155, 242, .12); color: var(--roxo); border-color: rgba(199, 155, 242, .3); }
.selo-laranja { background: rgba(251, 146, 60, .12); color: var(--laranja); border-color: rgba(251, 146, 60, .3); }
.selo-lima { background: rgba(184, 105, 200, .14); color: #d59be2; border-color: rgba(184, 105, 200, .34); }

/* --------------------------------------------------------- alertas */

.alerta {
  padding: 11px 14px; border-radius: var(--raio-pequeno);
  font-size: 13px; border: 1px solid transparent;
  display: flex; gap: 10px; align-items: flex-start;
}
.alerta-erro { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: #fca5a5; }
.alerta-aviso { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); color: #fcd34d; }
.alerta-ok { background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .3); color: #86efac; }
.alerta-info { background: rgba(122, 167, 255, .1); border-color: rgba(122, 167, 255, .3); color: #a9c5ff; }

.lista-alertas { display: flex; flex-direction: column; gap: 8px; }
.item-alerta {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--raio-pequeno);
  background: var(--fundo-2); border: 1px solid var(--borda);
  cursor: pointer; transition: all var(--transicao);
}
.item-alerta:hover { border-color: var(--borda-clara); background: var(--superficie); transform: translateX(3px); }
.item-alerta .nivel { width: 3px; align-self: stretch; border-radius: 3px; background: var(--texto-3); }
.item-alerta.critico .nivel { background: var(--erro); }
.item-alerta.atencao .nivel { background: var(--aviso); }
.item-alerta.informativo .nivel { background: var(--info); }
.item-alerta .texto { flex: 1; min-width: 0; }
.item-alerta .texto strong { display: block; font-size: 13px; font-weight: 600; }
.item-alerta .texto span { font-size: 11.5px; color: var(--texto-3); }

/* ---------------------------------------------------------- modais */

.modal-fundo {
  position: fixed; inset: 0; background: rgba(6, 3, 10, .72);
  backdrop-filter: blur(4px); z-index: 100;
  display: grid; place-items: center; padding: 20px;
  animation: aparecer 140ms ease;
}
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--superficie); border: 1px solid var(--borda-clara);
  border-radius: 16px; box-shadow: var(--sombra-forte);
  width: 100%; max-width: 640px; max-height: 92vh;
  display: flex; flex-direction: column;
  animation: subir 180ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes subir { from { transform: translateY(16px) scale(.98); opacity: 0; } }

.modal-largo { max-width: 1000px; }
.modal-estreito { max-width: 440px; }

.modal-cabecalho {
  padding: 16px 20px; border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.modal-cabecalho h2 { font-size: 16px; font-weight: 600; }
.modal-cabecalho p { font-size: 12px; color: var(--texto-3); margin-top: 2px; }
.modal-corpo { padding: 20px; overflow-y: auto; flex: 1; }
.modal-rodape {
  padding: 14px 20px; border-top: 1px solid var(--borda);
  display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap;
  background: var(--fundo-2);
}

/* ---------------------------------------------------------- avisos */

.avisos {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 9px; max-width: 400px;
}
.aviso {
  background: var(--superficie); border: 1px solid var(--borda-clara);
  border-left: 3px solid var(--ciano);
  border-radius: var(--raio-pequeno); padding: 12px 15px;
  box-shadow: var(--sombra-forte); font-size: 13px;
  animation: entrar 220ms cubic-bezier(.16, 1, .3, 1);
  display: flex; gap: 10px; align-items: flex-start;
}
@keyframes entrar { from { transform: translateX(24px); opacity: 0; } }
.aviso.saindo { animation: sair 180ms ease forwards; }
@keyframes sair { to { transform: translateX(24px); opacity: 0; } }
.aviso-ok { border-left-color: var(--ok); }
.aviso-erro { border-left-color: var(--erro); }
.aviso-alerta { border-left-color: var(--aviso); }
.aviso strong { display: block; margin-bottom: 2px; }
.aviso-texto { flex: 1; min-width: 0; }
.aviso-texto span { color: var(--texto-2); font-size: 12.5px; }

/* ----------------------------------------------------------- abas */

.abas {
  display: flex; gap: 3px; border-bottom: 1px solid var(--borda);
  margin-bottom: 18px; overflow-x: auto; scrollbar-width: none;
}
.abas::-webkit-scrollbar { display: none; }
.aba {
  padding: 9px 15px; font-size: 13.5px; font-weight: 500;
  color: var(--texto-2); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; background: none; border-top: none;
  border-left: none; border-right: none; font-family: inherit;
  transition: all var(--transicao);
}
.aba:hover { color: var(--texto); }
.aba.ativa { color: var(--ciano); border-bottom-color: var(--ciano); font-weight: 600; }

/* --------------------------------------------------------- filtros */

.barra-filtros {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end;
  padding: 13px 15px; background: var(--superficie);
  border: 1px solid var(--borda); border-radius: var(--raio);
  margin-bottom: 14px;
}
.barra-filtros .campo { min-width: 145px; flex: 0 1 auto; }
.barra-filtros .campo-busca { flex: 1 1 230px; }

.paginacao {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 4px; flex-wrap: wrap;
}
.paginacao-info { font-size: 12.5px; color: var(--texto-3); }
.paginacao-botoes { display: flex; gap: 5px; align-items: center; }

/* --------------------------------------------------------- graficos */

.grafico { width: 100%; }
.grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafico-legenda {
  display: flex; flex-wrap: wrap; gap: 11px; margin-top: 11px;
  font-size: 11.5px; color: var(--texto-2);
}
.grafico-legenda span { display: flex; align-items: center; gap: 5px; }
.grafico-legenda i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.barra-progresso {
  height: 6px; background: var(--fundo-3); border-radius: 4px; overflow: hidden;
}
.barra-progresso > div { height: 100%; border-radius: 4px; transition: width 400ms ease; }

/* ------------------------------------------------------ linha tempo */

.linha-tempo { position: relative; padding-left: 22px; }
.linha-tempo::before {
  content: ''; position: absolute; left: 5px; top: 5px; bottom: 5px;
  width: 2px; background: var(--borda);
}
.linha-tempo-item { position: relative; padding-bottom: 16px; }
.linha-tempo-item::before {
  content: ''; position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--superficie); border: 2px solid var(--ciano);
}
.linha-tempo-item.erro::before { border-color: var(--erro); }
.linha-tempo-item.ok::before { border-color: var(--ok); }
.linha-tempo-data { font-size: 11px; color: var(--texto-3); }
.linha-tempo-titulo { font-size: 13px; font-weight: 600; margin: 1px 0; }
.linha-tempo-texto { font-size: 12.5px; color: var(--texto-2); }

/* ----------------------------------------------------- descritivos */

.descritivo { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; }
.descritivo-item { min-width: 0; }
.descritivo-rotulo {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--texto-3); font-weight: 600; margin-bottom: 2px;
}
.descritivo-valor { font-size: 13.5px; word-break: break-word; }

.lista-simples { display: flex; flex-direction: column; }
.lista-simples > * {
  padding: 9px 0; border-bottom: 1px solid var(--borda);
  display: flex; align-items: center; gap: 11px; justify-content: space-between;
}
.lista-simples > *:last-child { border-bottom: none; }

/* --------------------------------------------------------- diversos */

.carregando {
  display: grid; place-items: center; padding: 50px; color: var(--texto-3);
}
.girando {
  width: 26px; height: 26px; border: 2.5px solid var(--borda);
  border-top-color: var(--ciano); border-radius: 50%;
  animation: girar 720ms linear infinite; margin-bottom: 11px;
}
@keyframes girar { to { transform: rotate(360deg); } }

.texto-erro { color: var(--erro); }
.texto-ok { color: var(--ok); }
.texto-aviso { color: var(--aviso); }
.texto-fraco { color: var(--texto-3); }
.texto-pequeno { font-size: 12px; }
.negrito { font-weight: 600; }

.separador { height: 1px; background: var(--borda); margin: 16px 0; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-fim { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.flex-quebra { flex-wrap: wrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }

.somente-mobile { display: none; }
.overlay-menu { position: fixed; inset: 0; background: rgba(6, 3, 10, .65); z-index: 35; }


/* ------------------------------------------------------- patrimonio */

/* Situacao do bem: a mesma cor no selo e na barra de proporcao. */
:root {
  --status-em_uso: var(--ok);
  --status-em_estoque: var(--info);
  --status-em_manutencao: var(--aviso);
  --status-emprestado: var(--laranja);
  --status-extraviado: var(--erro);
  --status-baixado: #7c6c8c;
}

.grade-kpi { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grade-setores { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.setor-cartao {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px; border-radius: var(--raio);
  background: var(--vidro); backdrop-filter: blur(10px); border: 1px solid var(--borda); box-shadow: var(--sombra);
  text-decoration: none; color: inherit; transition: all var(--transicao);
}
.setor-cartao:hover { border-color: rgba(var(--rgb-marca), .45); transform: translateY(-2px); }
.setor-icone {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 21px;
  background: rgba(184, 105, 200, .14); color: #d59be2;
}
.setor-icone.setor-almoxarifado { background: rgba(246, 139, 38, .14); color: #ffab5c; }
.setor-icone.setor-pop { background: rgba(122, 167, 255, .13); color: var(--info); }
.setor-icone.setor-frota { background: rgba(74, 222, 128, .11); color: var(--ok); }
.setor-icone.setor-administrativo { background: rgba(160, 140, 180, .14); color: var(--texto-2); }
.setor-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.setor-texto strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setor-numero { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.setor-texto small { font-size: 11.5px; color: var(--texto-3); }

.lista-proporcao { display: flex; flex-direction: column; gap: 12px; }
.proporcao-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.proporcao-item:hover .selo { filter: brightness(.96); }

.lista-movimentos { display: flex; flex-direction: column; }
.movimento-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 9px 0;
  border-bottom: 1px solid var(--borda); text-decoration: none; color: inherit;
}
.movimento-item:last-child { border-bottom: none; }
.movimento-item:hover strong { color: var(--ciano); }
.movimento-icone {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: var(--fundo-3); font-size: 15px;
}
.movimento-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.movimento-texto strong { font-size: 13px; }
.movimento-texto span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movimento-texto small, .movimento-quando small { font-size: 11px; color: var(--texto-3); }
.movimento-quando {
  font-size: 11.5px; color: var(--texto-2); text-align: right; white-space: nowrap;
  display: flex; flex-direction: column;
}

.texto-marca { color: #d59be2; font-weight: 500; }
.descritivo-valor a, .alerta a, .lista-simples a { color: var(--ciano); font-weight: 500; text-underline-offset: 2px; }
.descritivo-valor a:hover, .alerta a:hover, .lista-simples a:hover { color: var(--lima-escuro); }
.voltar { display: inline-block; font-size: 12.5px; color: var(--texto-3); text-decoration: none; margin-bottom: 8px; }
.voltar:hover { color: var(--ciano); }
.pagina-titulo h1 .selo { vertical-align: middle; margin-left: 6px; font-size: 11.5px; }

.ficha-bem { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1100px) { .ficha-bem { grid-template-columns: 1fr; } }

.etiqueta-previa { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.etiqueta-previa img { border: 1px solid var(--borda); border-radius: 10px; padding: 6px; background: #fff; }
.etiqueta-previa strong { font-size: 16px; color: var(--ciano-escuro); }

.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.galeria-item {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--borda); background: var(--fundo-2);
  display: grid; place-items: center;
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria-adicionar {
  cursor: pointer; border-style: dashed; color: var(--texto-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.galeria-adicionar span { font-size: 20px; line-height: 1; }
.galeria-adicionar small { font-size: 10.5px; }
.galeria-adicionar:hover { border-color: var(--ciano); color: var(--ciano); }

/* Escolha da origem do tombamento e do tipo de movimento. */
.seletor-origem { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.seletor-origem label {
  display: flex; gap: 9px; align-items: flex-start; cursor: pointer;
  padding: 11px 12px; border: 1px solid var(--borda); border-radius: var(--raio-pequeno);
  transition: all var(--transicao);
}
.seletor-origem label:has(input:checked) { border-color: var(--ciano); background: rgba(var(--rgb-marca), .1); }
.seletor-origem input { width: auto; margin-top: 3px; accent-color: var(--ciano); }
.seletor-origem strong { display: block; font-size: 13px; }
.seletor-origem small { display: block; font-size: 11.5px; color: var(--texto-3); }

.seletor-movimento { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-movimento {
  font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 20px;
  border: 1px solid var(--borda); background: var(--superficie); color: var(--texto-2);
  transition: all var(--transicao);
}
.chip-movimento:hover { border-color: var(--ciano); color: var(--ciano); }
.chip-movimento.ativo { background: var(--ciano); border-color: var(--ciano); color: #2a0a2d; font-weight: 600; }

/* ---------------------------------------------------------- etiquetas
   Folha A4 com etiquetas de 64 x 32 mm (3 por linha). A area so aparece na
   impressao; na tela ela fica fora do fluxo. */

#impressao-etiquetas { display: none; }

.folha-etiquetas {
  display: grid; grid-template-columns: repeat(3, 64mm); gap: 3mm;
  justify-content: center;
}
.etiqueta {
  width: 64mm; height: 32mm; box-sizing: border-box; padding: 2mm;
  border: .3mm dashed #9aa7bd; border-radius: 2mm; background: #fff; color: #0f1f3d;
  display: flex; gap: 2mm; align-items: center; overflow: hidden;
  break-inside: avoid; font-family: Arial, sans-serif;
}
.etiqueta-qr { width: 27mm; height: 27mm; flex-shrink: 0; }
.etiqueta-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.etiqueta-logo { width: 11mm; height: auto; margin-bottom: .6mm; }
.etiqueta-texto strong { font-size: 11pt; letter-spacing: .02em; color: #550b56; }
.etiqueta-texto span { font-size: 7pt; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.etiqueta-texto small { font-size: 6pt; color: #43536f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etiqueta-rodape { margin-top: .6mm; text-transform: uppercase; letter-spacing: .04em; }

/* ----------------------------------------------------------- icones */

.ico { display: inline-flex; width: 1.2em; height: 1.2em; vertical-align: -.24em; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; display: block; }
.btn .ico { width: 1.15em; height: 1.15em; }
.menu-item .icone .ico { width: 18px; height: 18px; vertical-align: middle; }
.menu-item .icone { color: var(--lateral-texto-fraco); transition: color var(--transicao); }
.menu-item:hover .icone { color: var(--lateral-texto); }
.menu-item.ativo .icone { color: var(--ciano); }
.aviso > span:first-child { font-size: 17px; }
.aviso-ok > span:first-child { color: var(--ok); }
.aviso-erro > span:first-child { color: var(--erro); }
.aviso-alerta > span:first-child { color: var(--aviso); }

/* ------------------------------------------------------ fundo de rede
   Mapa-mundi e rotas: camada decorativa fixa, atras de tudo. O mapa fica
   entre 4% e 8% de opacidade e so aparece na faixa de cima da tela. */

#fundo-rede {
  position: fixed; inset: 0 0 auto 0; height: min(78vh, 640px);
  z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 22%, rgba(0, 0, 0, .55) 58%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 22%, rgba(0, 0, 0, .55) 58%, transparent 100%);
}
#fundo-rede svg { position: absolute; right: -4%; top: -6%; width: 104%; height: 112%; }
#fundo-rede .mapa { opacity: .08; }
#fundo-rede .rota { fill: none; stroke: #f68b26; stroke-width: .09; opacity: .2; }
#fundo-rede .no { fill: #ffb066; opacity: .5; }
#fundo-rede .no-halo { fill: #f68b26; opacity: .08; }
#fundo-rede .pacote { fill: #ffc089; }
body.sem-animacao #fundo-rede .pacotes { display: none; }
#btn-animacao[aria-pressed="false"] { color: var(--texto-3); opacity: .6; }
#btn-animacao[aria-pressed="true"] { color: var(--ciano); }

body {
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(120, 40, 135, .30), transparent 62%),
    radial-gradient(700px 420px at 100% 12%, rgba(246, 139, 38, .07), transparent 60%),
    var(--fundo);
  background-attachment: fixed;
}
#app { position: relative; z-index: 1; }
.lateral { backdrop-filter: blur(16px); border-right: 1px solid var(--lateral-borda); }

/* ------------------------------------------------- ajustes do tema */

input, select, textarea { background: rgba(255, 255, 255, .04); border-color: var(--borda-clara); }
select option { background: #1e1129; color: var(--texto); }
.campo-checkbox, .lista-multi { background: rgba(255, 255, 255, .03); }
.btn-secundario { background: rgba(34, 21, 47, .88); border-color: var(--borda-clara); }
.btn-secundario:hover:not(:disabled) { background: rgba(48, 30, 64, .95); border-color: var(--ciano); color: var(--texto); }
.btn-fantasma { border-color: var(--borda-clara); background: rgba(24, 14, 35, .78); }
.btn-fantasma:hover:not(:disabled) { background: rgba(40, 25, 55, .92); }
.btn-primario { box-shadow: 0 6px 20px rgba(246, 139, 38, .28); font-weight: 700; }
.pagina-titulo h1 { font-size: 24px; letter-spacing: -.015em; }
.pagina-titulo p { color: var(--texto-2); font-size: 14px; }
.secao h2 { color: var(--texto-2); letter-spacing: .12em; }
.card-cabecalho h2, .card-cabecalho h3 { font-size: 14.5px; }
thead th { background: rgba(255, 255, 255, .03); color: var(--texto-3); }
tfoot td { background: rgba(255, 255, 255, .03); }
.modal { background: var(--superficie); }
.modal-rodape { background: rgba(255, 255, 255, .02); }
.item-alerta { background: rgba(255, 255, 255, .03); }
.item-alerta:hover { background: rgba(255, 255, 255, .06); }
.lista-recusas li { background: rgba(255, 255, 255, .03); }
.usuario-avatar { background: linear-gradient(135deg, #ffa347, #e0690a); color: #2a0a2d; }
.badge { box-shadow: 0 0 0 2px var(--fundo); }
.etiqueta-previa strong { color: var(--ciano); }
.busca-resultados { background: var(--superficie-2); }
.barra-selecao { background: rgba(var(--rgb-marca), .1); border-color: rgba(var(--rgb-marca), .34); }

@media (prefers-reduced-transparency: reduce) {
  .card, .indicador, .setor-cartao, .login-caixa { background: var(--superficie); backdrop-filter: none; }
}

/* ------------------------------------------------------ responsivo */

@media (max-width: 1024px) {
  .lateral {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%); transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
    box-shadow: var(--sombra-forte);
  }
  .lateral.aberto { transform: translateX(0); }
  .somente-mobile { display: inline-flex; }
  .pagina { padding: 16px 14px; }
  .topo { padding: 0 13px; gap: 10px; }
}

@media (max-width: 640px) {
  .pagina-topo { flex-direction: column; align-items: stretch; }
  .pagina-acoes { width: 100%; }
  .pagina-acoes .btn { flex: 1; }
  .indicador-valor { font-size: 21px; }
  .modal { max-height: 96vh; border-radius: 14px; }
  .modal-rodape .btn { flex: 1; }
  .avisos { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .topo-acoes #btn-nova-conta { display: none; }
  .grade-formulario { grid-template-columns: 1fr; }
}

@media print {
  body.imprimindo-etiquetas > *:not(#impressao-etiquetas) { display: none !important; }
  body.imprimindo-etiquetas #impressao-etiquetas { display: block; }
  body.imprimindo-etiquetas { background: #fff; }
  @page { margin: 8mm; }
  .lateral, .topo, .pagina-acoes, .barra-filtros, .paginacao, #fundo-rede { display: none !important; }
  :root {
    --texto: #111; --texto-2: #333; --texto-3: #555; --borda: #ccc; --borda-clara: #bbb;
    --vidro: #fff; --superficie: #fff; --fundo: #fff; --fundo-2: #f4f4f4; --fundo-3: #eee;
  }
  body { background: #fff; color: #000; }
  .card, .indicador { backdrop-filter: none; box-shadow: none; }
  .card { border-color: #ccc; break-inside: avoid; }
}
