/* Blue Panther - paleta baseada na marca AGS (navy #0C2D54, teal #39B4C9) */
:root {
  --fundo: #0a1c33;
  --lateral: #0c2d54;
  --painel: #10284a;
  --painel-forte: #16345d;
  --linha: #24466f;
  --texto: #eaf0f6;
  --suave: #a9bbcf;
  --teal: #39b4c9;
  --teal-escuro: #0f3b4a;
  --ok: #6fd3a5;      --ok-fundo: #123c33;
  --alerta: #f2b45a;  --alerta-fundo: #3d2f14;
  --ruim: #f58c7c;    --ruim-fundo: #45201f;
  --info: #9ccaff;    --info-fundo: #16345d;
  --raio: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo);
  color: var(--texto);
  font-family: "Albert Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ---------- estrutura ---------- */
.estrutura { display: flex; min-height: 100vh; }

.lateral {
  width: 252px; flex-shrink: 0;
  background: var(--lateral);
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.marca { padding: 0 10px; }
.marca-nome { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.marca-nome span { color: var(--teal); }
.marca-sub { font-size: 13px; color: var(--suave); }

.menu { display: flex; flex-direction: column; gap: 4px; }
.menu a, .menu summary {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 12px; border-radius: 8px;
  color: var(--texto); font-weight: 500; cursor: pointer; list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; margin-left: auto; width: 7px; height: 7px;
  border-right: 2px solid var(--suave); border-bottom: 2px solid var(--suave);
  transform: rotate(-45deg); transition: transform .15s; }
.menu details[open] > summary::after { transform: rotate(45deg); }
.menu a:hover, .menu summary:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.menu a.ativo { background: var(--teal-escuro); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.submenu { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 6px 18px; }
.submenu a { min-height: 38px; font-weight: 400; color: var(--suave); }
.submenu a.ativo { color: #fff; }
.menu .desativado { color: #7f93aa; cursor: default; font-weight: 400; min-height: 38px;
  display: flex; align-items: center; padding: 0 12px; }

.rodape-lateral { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 0 6px; }
.coletas { background: rgba(0,0,0,.18); border-radius: 8px; padding: 12px; font-size: 13px; }
.coletas p { margin: 0 0 6px; color: var(--suave); }
.coleta { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.coleta .luz { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.coleta.falha .luz { background: var(--ruim); }
.coleta.atrasada .luz { background: var(--alerta); }
.coleta .hora { margin-left: auto; color: var(--suave); }
.conta { font-size: 13px; color: var(--suave); display: flex; justify-content: space-between; gap: 8px; }

.conteudo { flex: 1; min-width: 0; padding: 32px 40px 56px; max-width: 1400px; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 28px; }
.cabecalho h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.cabecalho .contexto { color: var(--suave); margin: 4px 0 0; }

/* ---------- componentes ---------- */
.botao {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 8px; border: 1px solid var(--linha); color: var(--texto); background: transparent;
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.botao:hover { background: var(--painel-forte); text-decoration: none; }
.botao.principal { background: var(--teal); border-color: var(--teal); color: #06222b; font-weight: 600; }
.botao.principal:hover { background: #56c5d8; }
.externo::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 5px;
  vertical-align: -1px; background: currentColor;
  -webkit-mask: 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' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 11 13'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: 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' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 11 13'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat; }

.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.numero { background: var(--painel); border-radius: var(--raio); padding: 18px 20px; color: var(--texto); display: block; }
a.numero:hover { background: var(--painel-forte); text-decoration: none; }
.numero .rotulo { color: var(--suave); font-size: 14px; }
.numero .valor { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.numero .nota { color: var(--suave); font-size: 13px; }
.numero.ruim .valor { color: var(--ruim); }
.numero.alerta .valor { color: var(--alerta); }
.numero.ok .valor { color: var(--ok); }

.bloco { background: var(--painel); border-radius: var(--raio); padding: 20px 22px; margin-bottom: 18px; }
.bloco h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.bloco .sub { color: var(--suave); font-size: 13px; margin: -10px 0 14px; }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grade-2 > .bloco { margin-bottom: 0; }
.grade-2 + * { margin-top: 18px; }

.barra { height: 8px; border-radius: 4px; background: var(--linha); overflow: hidden; }
.barra > span { display: block; height: 100%; border-radius: 4px; background: var(--teal); }
.barra.quente > span { background: var(--alerta); }
.licenca { margin-bottom: 14px; }
.licenca:last-child { margin-bottom: 0; }
.licenca .linha-topo { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.licenca .linha-topo span:last-child { color: var(--suave); }

.atencao { display: flex; flex-direction: column; }
.atencao a { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 4px; border-top: 1px solid var(--linha); color: var(--texto); }
.atencao a:first-child { border-top: 0; }
.atencao a:hover { text-decoration: none; color: var(--teal); }
.atencao .qtd { font-weight: 700; color: var(--alerta); font-size: 18px; }
.vazio { color: var(--suave); margin: 0; }

.abas { display: flex; gap: 6px; flex-wrap: wrap; }
.abas a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 8px; color: var(--suave); font-weight: 500; }
.abas a:hover { background: var(--painel-forte); text-decoration: none; }
.abas a.ativo { background: var(--painel-forte); color: #fff; }
.abas .contagem { font-size: 12px; background: var(--fundo); color: var(--suave); padding: 1px 7px; border-radius: 10px; }

.barra-tabela { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px; }
.busca { display: flex; gap: 8px; }
.busca input { min-height: 40px; width: 280px; max-width: 60vw; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--linha); background: var(--fundo); color: var(--texto); font: inherit; }
.busca input::placeholder { color: #8196ad; }
.filtro-ativo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--alerta); }

.tabela-rolagem { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--suave); padding: 10px 12px;
  border-bottom: 1px solid var(--linha); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid rgba(36,70,111,.55); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.email { color: var(--suave); word-break: break-all; }
td.acao { text-align: right; white-space: nowrap; }
.num { text-align: right; }

.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; background: var(--painel-forte); color: var(--suave); }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.selo.ruim { background: var(--ruim-fundo); color: var(--ruim); }
.selo.info { background: var(--info-fundo); color: var(--info); }

.periodo { display: flex; gap: 6px; }
.periodo a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center;
  border-radius: 8px; border: 1px solid var(--linha); color: var(--suave); }
.periodo a.ativo { background: var(--teal); border-color: var(--teal); color: #06222b; font-weight: 600; }
.periodo a:hover { text-decoration: none; }

.volume { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; overflow-x: auto; }
.dia { flex: 1; min-width: 36px; max-width: 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.colunas { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.colunas span { width: 42%; max-width: 18px; border-radius: 3px 3px 0 0; min-height: 2px; }
.colunas .e { background: var(--teal); }
.colunas .s { background: var(--alerta); }
.dia small { color: var(--suave); font-size: 12px; }
.legenda { display: flex; gap: 18px; font-size: 13px; color: var(--suave); margin-top: 12px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.ndr { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; gap: 6px 14px; align-items: center; }
.ndr code { font-family: inherit; font-weight: 600; }
.ndr .desc { font-size: 13px; color: var(--suave); margin-top: 4px; }
.ndr .barra > span { background: var(--ruim); }

.atalhos { display: flex; flex-wrap: wrap; gap: 10px; }

.aviso-pagina { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.aviso-caixa { max-width: 460px; background: var(--painel); border-radius: 14px; padding: 36px; }
.aviso-caixa h1 { margin: 0 0 10px; font-size: 24px; }
.aviso-caixa p { color: var(--suave); margin: 0 0 24px; }

@media (max-width: 900px) {
  .estrutura { flex-direction: column; }
  .lateral { width: auto; height: auto; position: static; }
  .conteudo { padding: 24px 18px 40px; }
  .grade-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- login e formularios ---------- */
.aviso-caixa.login { width: 100%; max-width: 400px; }
.form-login { display: flex; flex-direction: column; gap: 8px; }
.form-login .botao { margin-top: 14px; justify-content: center; }
label { font-size: 14px; color: var(--suave); }
input[type=text], input:not([type]), input[type=password], input[type=search], .form-grade input, .form-login input, .dialogo input {
  min-height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--linha);
  background: var(--fundo); color: var(--texto); font: inherit; width: 100%;
}
input.codigo { font-size: 22px; letter-spacing: 0.3em; text-align: center; }
.alerta-form { background: var(--ruim-fundo); color: var(--ruim); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.sucesso-form { background: var(--ok-fundo); color: var(--ok); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.rodape-login { margin: 16px 0 0 !important; font-size: 14px; }
.form-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grade > div { display: flex; flex-direction: column; gap: 6px; }
.form-grade .largo { grid-column: 1 / -1; }

/* ---------- cofre ---------- */
table.cofre td { vertical-align: middle; }
.senha { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; }
.icone { background: transparent; border: 0; color: var(--suave); cursor: pointer; width: 34px; height: 34px;
  border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; font-size: 16px; }
.icone:hover { background: var(--painel-forte); color: var(--texto); }
.icone.ativo { color: var(--teal); }
.nota-link { font-size: 12.5px; color: var(--suave); margin-top: 2px; }
form.inline { display: inline; margin-left: 12px; }
.link-perigo { background: none; border: 0; color: var(--ruim); cursor: pointer; font: inherit; padding: 0; }
.link-perigo:hover { text-decoration: underline; }
.aviso-flutuante { position: fixed; bottom: 24px; right: 24px; background: var(--teal); color: #06222b; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; }
.aviso-flutuante.visivel { opacity: 1; transform: none; }
.dialogo { background: var(--painel); color: var(--texto); border: 1px solid var(--linha); border-radius: 14px; padding: 28px; max-width: 440px; }
.dialogo::backdrop { background: rgba(4, 14, 28, .7); }
.dialogo h2 { margin: 0 0 10px; }
.dialogo p { color: var(--suave); margin: 0 0 16px; }
.dialogo label { display: block; margin-bottom: 6px; }
@media (max-width: 900px) { .form-grade { grid-template-columns: 1fr; } }

table.cofre td.email { word-break: normal; white-space: nowrap; }
table.cofre td.celula-senha { white-space: nowrap; }
table.cofre td.celula-senha .senha { display: inline-block; min-width: 110px; }
.busca input[type=search] { width: 360px; }

/* ---------- marca (icone da pantera) ---------- */
.marca { display: flex; align-items: center; gap: 12px; }
.marca-icone { flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.marca-icone-grande { width: 76px; height: 76px; display: block; margin: 0 auto 14px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.aviso-caixa { text-align: center; }
.aviso-caixa .marca-nome { justify-content: center; }
.aviso-caixa p { text-align: left; }
.form-login, .rodape-login { text-align: left; }
.link { background: none; border: 0; color: var(--teal); cursor: pointer; font: inherit; padding: 0; }
.link:hover { text-decoration: underline; }
