/* Componentes do painel, em cima dos tokens de tokens.css. */
* { box-sizing: border-box; }
/* "hidden" sempre esconde, mesmo em elementos com display definido no CSS. */
[hidden] { display: none !important; }
/* Conteúdo que só aparece em um dos temas (ex.: ícone do botão de tema). */
:root:not(.dark) .so-escuro, .dark .so-claro { display: none !important; }
html, body { margin: 0; }
body {
  font: 13.5px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  color: var(--texto);
  background: var(--fundo);
  transition: background-color .3s ease, color .3s ease;
}
::selection { background: color-mix(in srgb, var(--primaria) 28%, transparent); }
a { color: var(--primaria-texto); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
h2 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
p { margin: 0 0 10px; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
code { padding: 1px 6px; border-radius: 6px; background: var(--superficie-funda); border: 1px solid var(--borda); }
:focus-visible { outline: 2px solid var(--anel); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--texto) 18%, transparent) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--texto) 18%, transparent); border-radius: var(--raio-cheio); }
::-webkit-scrollbar-thumb:hover { background: rgba(16, 185, 129, .5); }

.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

@keyframes sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulsa { 50% { opacity: .45; } }

/* ---------- estrutura */
.estrutura { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.lateral {
  position: relative; flex: none; width: var(--lateral-largura); display: flex; flex-direction: column; overflow: hidden;
  background: var(--lateral); color: var(--lateral-texto); border-right: 1px solid var(--lateral-linha);
  transition: width 280ms var(--suave);
}
.lateral::before { content: ""; position: absolute; top: -80px; left: -80px; width: 160px; height: 160px; border-radius: 50%; background: var(--lateral-brilho); filter: blur(60px); pointer-events: none; }
.lateral > * { position: relative; }

.marca { display: flex; align-items: center; flex: none; padding: 22px 20px 8px; color: #fff; }
.marca:hover { text-decoration: none; }
.marca-sinal { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--raio-pequeno); background: var(--gradiente-marca); color: #04140f; transition: transform .5s var(--macio); }
.marca:hover .marca-sinal { transform: scale(1.08); }
.marca-nome { font-size: 20px; font-weight: 700; letter-spacing: -.04em; color: var(--lateral-forte); }
.marca-nome b { font-weight: 700; color: #34d399; }

/* Rótulo que some ao recolher o menu: nunca desmonta, só anima para o ícone ficar parado. */
.rotulo-menu { display: inline-block; max-width: 210px; margin-left: 12px; overflow: hidden; white-space: nowrap; transition: opacity 280ms var(--suave), max-width 280ms var(--suave), margin-left 280ms var(--suave); }

.lateral-botao {
  display: flex; align-items: center; width: 100%; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--raio);
  background: none; color: var(--lateral-texto); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-align: left; cursor: pointer;
  transition: color .2s, background-color .2s;
}
.lateral-botao:hover { color: var(--lateral-forte); background: var(--lateral-hover); text-decoration: none; }
.lateral-botao .ic { width: 16px; height: 16px; }
.lateral-botao.sair:hover { color: #fda4af; background: rgba(251, 113, 133, .10); }
.recolher { flex: none; margin: 2px 12px 8px; width: auto; font-size: 13px; font-weight: 600; }
.recolher .ic { width: 18px; height: 18px; }
html[data-menu="recolhido"] .recolher .so-aberto, html:not([data-menu="recolhido"]) .recolher .so-recolhido { display: none; }

.menu { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px; scrollbar-color: transparent transparent; }
.menu:hover { scrollbar-color: var(--lateral-linha) transparent; }
.menu .secao { padding: 10px 14px 3px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--lateral-fraco); }
.menu a {
  position: relative; display: flex; align-items: center; margin-bottom: 1px; padding: 6px 14px; border: 1px solid transparent; border-radius: var(--raio);
  color: inherit; font-size: 13px; font-weight: 600; letter-spacing: .01em; transition: color .2s, background-color .2s;
}
.menu a .ic { color: var(--lateral-icone); transition: color .3s; }
.menu a:hover { color: var(--lateral-forte); background: var(--lateral-hover); text-decoration: none; }
.menu a:hover .ic { color: var(--lateral-ativo-icone); }
.menu a.ativo { color: var(--lateral-ativo-texto); background: var(--lateral-ativo); border-color: var(--lateral-ativo-borda); }
.menu a.ativo .ic { color: var(--lateral-ativo-icone); }
.menu a.ativo::after { content: ""; margin-left: auto; width: 4px; height: 4px; flex: none; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, .6); }

.lateral-rodape { flex: none; padding: 10px 12px; border-top: 1px solid var(--lateral-linha); background: var(--lateral-rodape); }
.lateral-rodape form { margin: 0; }
.lateral-acoes { display: flex; gap: 4px; }
.lateral-acoes .lateral-botao { padding: 8px; }
.lateral-acoes > .lateral-botao { flex: 1; width: auto; }
.lateral-acoes .rotulo-menu { margin-left: 8px; }
.atalho-telefone {
  display: flex; align-items: center; margin-bottom: 8px; padding: 9px 14px; border-radius: var(--raio);
  background: var(--gradiente-marca); color: #04140f; font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(16, 185, 129, .25); transition: filter .2s;
}
.atalho-telefone:hover { filter: brightness(1.08); color: #04140f; text-decoration: none; }
.atalho-telefone .ic { width: 16px; height: 16px; }
.conta-cartao { display: flex; align-items: center; margin-bottom: 4px; padding: 7px 8px; border: 1px solid var(--lateral-linha); border-radius: var(--raio); background: var(--lateral-hover); color: var(--lateral-forte); transition: background-color .2s; }
.conta-cartao:hover { background: rgba(255, 255, 255, .10); text-decoration: none; }
.conta-cartao .avatar-letras { border-radius: var(--raio); position: relative; }
.conta-cartao .avatar-letras::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #0b3d2e; background: #34d399; }
.dark .conta-cartao .avatar-letras::after { border-color: #020617; }
.conta-cartao .conta-texto { display: block; min-width: 0; flex: 1; }
.conta-texto strong, .conta-texto small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conta-texto strong { font-size: 12px; font-weight: 700; }
.conta-texto small { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--lateral-fraco); }

.principal { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; background-color: var(--fundo); background-image: var(--ambiente); }
.conteudo { max-width: 1640px; margin: 0 auto; padding: 24px 24px 48px; }

/* Barra e gaveta do celular */
.barra-movel { display: none; flex: none; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px; background: var(--superficie); border-bottom: 1px solid var(--borda); }
.barra-movel .marca { padding: 0; color: var(--texto); gap: 8px; }
.barra-movel .marca-sinal { width: 28px; height: 28px; }
.barra-movel .marca-nome { font-size: 16px; color: var(--texto); }
.barra-movel .marca-nome b { color: var(--primaria-texto); }
.icone-botao { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--texto-suave); cursor: pointer; }
.icone-botao:hover { background: var(--linha-ativa); text-decoration: none; }
.fechar-gaveta { display: none; position: absolute !important; top: 16px; right: 10px; color: var(--lateral-texto); }
.veu { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 23, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

/* Menu recolhido só existe no desktop: no celular ele é uma gaveta. */
@media (min-width: 861px) {
  html[data-menu="recolhido"] .lateral { width: 72px; }
  html[data-menu="recolhido"] .rotulo-menu { opacity: 0; max-width: 0; margin-left: 0; }
  html[data-menu="recolhido"] .menu .secao { height: 1px; margin: 9px 14px; padding: 0; overflow: hidden; color: transparent; background: var(--lateral-linha); }
  html[data-menu="recolhido"] .menu a.ativo::after { display: none; }
  html[data-menu="recolhido"] .menu { overflow-x: hidden; }
  html[data-menu="recolhido"] .conta-cartao { padding-left: 7px; background: none; border-color: transparent; }
  html[data-menu="recolhido"] .lateral-acoes { flex-direction: column; }
  html[data-menu="recolhido"] .lateral-acoes .lateral-botao { padding: 8px 14px; }
}

/* ---------- cabeçalho da página */
.cabecalho { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 20px; }
.cabecalho-titulo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cabecalho-icone { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--raio-grande); background: var(--selo-fundo); color: var(--selo-texto); }
.cabecalho-icone .ic { width: 20px; height: 20px; }
.olho { margin-bottom: 2px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primaria-texto); }
.olho.neutro { color: var(--texto-suave); }
.olho a { display: inline-flex; align-items: center; gap: 3px; }
.olho a .ic { width: 12px; height: 12px; stroke-width: 3; }
.subtitulo { margin: 2px 0 0; font-size: 13px; color: var(--texto-suave); }
.saudacao { font-size: 28px; }
.saudacao span { color: var(--texto-fraco); }
.cabecalho .acoes { display: flex; flex-wrap: wrap; gap: 8px; }

/* barra acima das tabelas: busca e ações */
.barra { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--borda); }
.busca { display: flex; align-items: center; gap: 8px; flex: 0 1 340px; height: 36px; padding: 0 14px; border: 1px solid var(--borda); border-radius: var(--raio-cheio); background: var(--superficie-funda); transition: border-color .15s, box-shadow .15s; }
.busca:focus-within { border-color: var(--primaria); box-shadow: 0 0 0 4px var(--primaria-clara); }
.busca .ic { width: 15px; height: 15px; color: var(--texto-fraco); }
.busca input { flex: 1; min-width: 0; border: 0; outline: none; padding: 0; background: none; color: var(--texto); font: inherit; }
.barra .contagem { font-size: 12px; font-weight: 600; color: var(--texto-suave); }
tr[data-href] { cursor: pointer; }

/* abas (ex.: página do ramal) */
.abas { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding: 2px; }
.abas button { height: 34px; padding: 0 14px; border: 1px solid var(--borda); border-radius: var(--raio-cheio); background: var(--superficie); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--texto-suave); white-space: nowrap; cursor: pointer; transition: color .15s, background-color .15s, border-color .15s; }
.abas button:hover { color: var(--texto); background: var(--linha-ativa); }
.abas button[aria-selected="true"] { color: var(--primaria-texto); background: var(--primaria-clara); border-color: var(--primaria-borda); }
.rodape-fixo { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px 0; margin-top: 4px; background: linear-gradient(transparent, var(--fundo) 30%); }

/* equipe (presença) no painel */
.equipe-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 16px; }
.pessoa { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--borda); border-radius: var(--raio-grande); background: var(--superficie-funda); transition: border-color .15s, transform .15s; }
.pessoa:hover { border-color: var(--primaria-borda); transform: translateY(-1px); text-decoration: none; }
.pessoa .avatar-letras { position: relative; width: 36px; height: 36px; }
.pessoa .avatar-letras::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--superficie); background: var(--p-offline); }
.pessoa[data-estado="online"] .avatar-letras::after { background: var(--p-disponivel); box-shadow: 0 0 6px rgba(16, 185, 129, .6); }
.pessoa[data-estado="em_ligacao"] .avatar-letras::after { background: var(--p-ocupado); }
.pessoa[data-estado="tocando"] .avatar-letras::after { background: var(--p-tocando); animation: pulsa 1.6s ease-in-out infinite; }
.pessoa[data-presenca="ausente"] .avatar-letras::after { background: var(--p-ausente); box-shadow: none; }
.pessoa[data-presenca="nao_perturbe"] .avatar-letras::after { background: var(--p-ocupado); box-shadow: none; }
.pessoa[data-estado="offline"] .avatar-letras::after { background: var(--p-offline); box-shadow: none; }
.pessoa-texto { display: flex; flex-direction: column; min-width: 0; color: var(--texto); }
.pessoa-texto strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pessoa-texto small { font-size: 12px; color: var(--texto-suave); }
.avatar-letras { width: 32px; height: 32px; flex: none; border-radius: 50%; background: linear-gradient(45deg, #10b981, #2dd4bf); color: #020617; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; }

/* ---------- blocos */
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-grande); box-shadow: var(--sombra); padding: 20px; margin-bottom: 16px; }
.cartao.sem-padding { padding: 0; overflow: auto; }
.cartao > h2 { margin-bottom: 14px; }
.cartao .topo-cartao { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--borda); }
.cartao .topo-cartao h2 { margin: 0; }
.cartao .topo-cartao > a:not(.botao) { font-size: 12px; font-weight: 700; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.numero { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-grande); box-shadow: var(--sombra); transition: transform .2s; }
.numero:hover { transform: translateY(-1px); }
.numero-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.numero .rotulo { font-size: 11.5px; font-weight: 600; color: var(--texto-suave); }
.numero-icone { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: var(--raio-pequeno); background: var(--selo-fundo); color: var(--selo-texto); }
.numero-icone .ic { width: 14px; height: 14px; }
.numero .valor { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.numero .valor small { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--texto-suave); }
.numero .valor .estado { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.painel-grade { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 16px; align-items: start; }
.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duas-colunas > .cartao { margin-bottom: 0; }

/* ---------- tabelas */
.tabela-rolavel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table.sons { width: auto; margin: 6px 0 8px; }
table.sons td { padding: 6px 16px 6px 0; vertical-align: middle; }
table.sons audio { height: 32px; width: 240px; max-width: 60vw; display: block; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
th { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-suave); background: var(--superficie-funda); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .15s; }
tbody tr:hover td { background: var(--linha-ativa); }
td.acoes-linha { text-align: right; white-space: nowrap; }
.vazio { padding: 32px 20px; color: var(--texto-suave); text-align: center; }
.suave { color: var(--texto-suave); }
.pequeno { font-size: 12px; }

/* ---------- estado */
.estado { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--p-offline); }
.estado.online::before { background: var(--p-disponivel); box-shadow: 0 0 6px rgba(16, 185, 129, .6); }
.estado.em_ligacao::before { background: var(--p-ausente); animation: pulsa 1.6s ease-in-out infinite; }
.estado.tocando::before { background: var(--p-tocando); animation: pulsa 1.6s ease-in-out infinite; }
.estado.erro::before { background: var(--p-ocupado); }
.etiqueta { display: inline-block; padding: 1px 9px; border: 1px solid var(--borda); border-radius: var(--raio-cheio); background: var(--superficie-funda); color: var(--texto-suave); font-size: 11px; font-weight: 700; }
.etiqueta.azul { background: var(--primaria-clara); border-color: var(--primaria-borda); color: var(--primaria-texto); }

/* ---------- botões */
.botao, button.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border: 1px solid var(--borda); border-radius: var(--raio-cheio);
  background: var(--superficie); color: var(--texto-suave); font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: color .15s, background-color .15s, filter .15s, transform .15s;
}
.botao:hover { color: var(--texto); background: var(--linha-ativa); text-decoration: none; }
.botao:active { transform: scale(.97); }
.botao:disabled { opacity: .5; cursor: not-allowed; }
.botao .ic { width: 15px; height: 15px; }
.botao.primario { background: var(--gradiente-marca); border-color: transparent; color: #fff; box-shadow: var(--sombra-primaria); }
.botao.primario:hover { filter: brightness(1.08); color: #fff; }
.dark .botao.primario { background: var(--primaria); color: var(--no-primaria); }
.dark .botao.primario:hover { color: var(--no-primaria); }
.botao.perigo { color: var(--erro); border-color: color-mix(in srgb, var(--erro) 35%, transparent); }
.botao.perigo:hover { color: var(--erro); background: var(--erro-fundo); }
.botao.pequeno { height: 30px; padding: 0 12px; font-size: 12px; }
.link-botao { background: none; border: 0; padding: 0; color: var(--primaria-texto); font: inherit; font-weight: 600; cursor: pointer; }
.link-botao:hover { text-decoration: underline; }
form.inline { display: inline; }

/* ---------- formulários */
.formulario { max-width: 860px; }
/* Telas largas: formulários de vários cartões viram duas colunas (o navegador equilibra a altura). */
@media (min-width: 1280px) {
  .formulario.colunas { max-width: none; column-count: 2; column-gap: 20px; }
  .formulario.colunas > .cartao { break-inside: avoid; display: block; }
  .formulario.colunas > .rodape-form { column-span: all; }
  .formulario.colunas > .rodape-form, .formulario.colunas + .cartao, .formulario.colunas + form { max-width: none; }
}
.campo { margin-bottom: 16px; }
.campo > label, .rotulo-campo { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--texto-suave); }
.campo .ajuda, .ajuda { margin-top: 5px; font-size: 12.5px; color: var(--texto-suave); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--borda); border-radius: var(--raio);
  font: inherit; color: var(--texto); background-color: var(--superficie-funda);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--texto-fraco); opacity: .8; }
input:hover:not(:disabled):not([readonly]), select:hover, textarea:hover { border-color: var(--borda-forte); }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=number]:focus, input[type=time]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primaria); box-shadow: 0 0 0 4px var(--primaria-clara);
}
input:disabled { opacity: .5; }
input[readonly] { color: var(--texto-suave); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; flex: none; accent-color: var(--primaria); }
input[type=file] { width: 100%; color: var(--texto-suave); font: inherit; }
input[type=file]::file-selector-button { height: 34px; margin-right: 10px; padding: 0 14px; border: 1px solid var(--borda); border-radius: var(--raio-cheio); background: var(--superficie); color: var(--texto); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.dark select option, .dark select optgroup { background-color: #1f2937; color: #f1f5f9; }
textarea { min-height: 90px; resize: vertical; }
.linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.opcao { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 8px; font-weight: 500; }
.opcao input { margin-top: 2px; }
.opcao small { display: block; font-size: 12.5px; font-weight: 400; color: var(--texto-suave); }
.grade-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; max-height: 280px; overflow: auto; padding: 10px 12px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-funda); }
.rodape-form { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; }

.destino { display: flex; gap: 8px; }
.destino select { flex: 1 1 60%; }
.destino input { flex: 1 1 40%; }
.horario td { padding: 6px 14px 6px 0; border: 0; }
.horario tbody tr:hover td { background: none; }
.horario input[type=time] { width: auto; }

/* ---------- avisos */
.aviso { margin-bottom: 16px; padding: 10px 14px; border: 1px solid; border-radius: var(--raio-grande); font-weight: 500; }
.aviso.ok { background: var(--ok-fundo); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.aviso.alerta { background: var(--alerta-fundo); color: var(--alerta); border-color: color-mix(in srgb, var(--alerta) 30%, transparent); }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); border-color: color-mix(in srgb, var(--erro) 30%, transparent); }
.aviso.info { background: var(--info-fundo); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }

/* ---------- credenciais do ramal */
.credenciais { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; align-items: center; margin: 0; }
.credenciais dt { color: var(--texto-suave); font-size: 12.5px; font-weight: 600; }
.credenciais dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- URA */
.teclas td:first-child { width: 70px; }
.tecla { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--borda); border-radius: var(--raio); font-weight: 800; background: var(--superficie-funda); }

/* ---------- telas de acesso (sempre no tema claro, como o login do NexIris) */
.acesso { min-height: 100vh; min-height: 100dvh; display: flex; background: radial-gradient(ellipse 60% 50% at 70% 20%, rgba(16, 185, 129, .06), transparent), #f8fafc; }
.acesso-vitrine { position: relative; width: 46%; flex: none; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 56px; overflow: hidden; color: #fff; background: var(--gradiente-floresta); }
.acesso-vitrine::before { content: ""; position: absolute; top: -128px; left: -96px; width: 384px; height: 384px; border-radius: 50%; opacity: .3; background: radial-gradient(circle, rgba(52, 211, 153, .35), transparent 70%); pointer-events: none; }
.acesso-vitrine > * { position: relative; }
.acesso-marca { display: flex; align-items: center; gap: 10px; }
.acesso-marca-sinal { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--raio-pequeno); background: rgba(255, 255, 255, .10); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); color: #6ee7b7; }
.acesso-marca-texto { display: flex; flex-direction: column; line-height: 1; }
.acesso-marca-texto strong { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.acesso-marca-texto strong b { font-weight: 600; color: #6ee7b7; }
.acesso-marca-texto small { margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(110, 231, 183, .8); }
.vitrine-texto { max-width: 480px; }
.vitrine-texto h2 { margin: 0 0 12px; font-size: 34px; font-weight: 600; line-height: 1.18; letter-spacing: -.02em; }
.vitrine-texto h2 span { color: #6ee7b7; }
.vitrine-texto p { margin: 0 0 32px; font-size: 15px; line-height: 1.6; color: rgba(209, 250, 229, .7); }
.vitrine-cartao { position: relative; padding: 20px; border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--raio-grande); background: rgba(255, 255, 255, .07); box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.vitrine-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 12px; font-weight: 500; color: rgba(209, 250, 229, .8); }
.vitrine-topo i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #34d399; animation: pulsa 1.6s ease-in-out infinite; }
.vitrine-linha { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: var(--raio); background: rgba(255, 255, 255, .08); font-size: 13px; }
.vitrine-linha:last-child { margin-bottom: 0; }
.vitrine-linha .avatar-letras { background: rgba(255, 255, 255, .12); color: #d1fae5; }
.vitrine-linha.falando .avatar-letras { background: #34d399; color: #022c22; }
.vitrine-linha > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; color: #ecfdf5; }
.vitrine-linha small { font-size: 11px; color: rgba(209, 250, 229, .6); }
.equalizador { flex: none; display: flex; align-items: center; gap: 2px; height: 16px; }
.equalizador i { width: 3px; height: 100%; border-radius: 2px; background: #34d399; transform-origin: center; animation: fala 1s ease-in-out infinite; }
.equalizador i:nth-child(2) { animation-delay: .15s; }
.equalizador i:nth-child(3) { animation-delay: .3s; }
.equalizador i:nth-child(4) { animation-delay: .45s; }
@keyframes fala { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.vitrine-selo { position: absolute; right: 24px; bottom: -16px; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: var(--raio); background: #fff; color: #1e293b; font-size: 12px; font-weight: 600; box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }
.vitrine-selo-icone { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: #d1fae5; color: #047857; }
.vitrine-selo-icone .ic { width: 13px; height: 13px; }
.vitrine-pe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 12px; color: rgba(209, 250, 229, .55); }
.vitrine-recursos { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.vitrine-recursos span { display: inline-flex; align-items: center; gap: 6px; }
.vitrine-recursos span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.vitrine-recursos span:nth-child(2)::before { background: #38bdf8; }
.vitrine-recursos span:nth-child(3)::before { background: #fbbf24; }
.vitrine-recursos span:nth-child(4)::before { background: #fb923c; }

.acesso .caixa { width: 100%; max-width: 468px; margin: auto; padding: 48px 24px; color: #0f172a; }
.acesso-marca.movel { display: none; margin-bottom: 32px; }
.acesso-marca.movel .acesso-marca-sinal { background: #0b3d2e; color: #6ee7b7; box-shadow: none; }
.acesso-marca.movel strong { color: #0f172a; }
.acesso-marca.movel strong b { color: #059669; }
.acesso-marca.movel small { color: rgba(5, 150, 105, .8); }
.acesso h1 { margin-bottom: 8px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; color: #0f172a; }
.acesso .sub { margin-bottom: 28px; font-size: 15px; color: #64748b; }
.acesso .aviso { margin-bottom: 18px; border-radius: var(--raio-pequeno); }
.acesso form { padding: 28px; border: 1px solid rgba(226, 232, 240, .8); border-radius: var(--raio-grande); background: #fff; box-shadow: 0 20px 25px -5px rgba(15, 23, 42, .04), 0 8px 10px -6px rgba(15, 23, 42, .04); }
.acesso .campo { margin-bottom: 20px; }
.acesso .campo > label { color: #334155; font-size: 14px; font-weight: 500; }
.acesso .campo .ajuda { color: #64748b; }
.acesso input[type=text], .acesso input[type=email], .acesso input[type=password] { height: 44px; padding: 0 14px; border-color: #cbd5e1; border-radius: var(--raio-pequeno); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.acesso input:hover:not(:disabled):not([readonly]) { border-color: #94a3b8; }
.acesso input[type=text]:focus, .acesso input[type=email]:focus, .acesso input[type=password]:focus { border-color: #059669; box-shadow: 0 0 0 4px rgba(5, 150, 105, .10); }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 76px !important; }
.campo-senha .link-botao { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #047857; }
.acesso .botao { width: 100%; height: 44px; border-radius: var(--raio-pequeno); font-size: 14px; font-weight: 600; }
.acesso .botao.primario { background: #059669; color: #fff; box-shadow: 0 10px 15px -3px rgba(5, 150, 105, .25); transition: background-color .15s, transform .15s; }
.acesso .botao.primario:hover { background: #10b981; filter: none; transform: translateY(-1px); }
.acesso .botao.primario:hover .ic { transform: translateX(2px); }
.acesso .botao .ic { transition: transform .15s; }
.acesso .ajuda-login { margin: 24px 0 0; text-align: center; font-size: 12px; color: #94a3b8; }
.sobe { animation: sobe .55s cubic-bezier(.22, 1, .36, 1) backwards; }
.sobe.d1 { animation-delay: .08s; }
.sobe.d2 { animation-delay: .16s; }
.sobe.d3 { animation-delay: .24s; }

@media (max-width: 1280px) {
  .acesso-vitrine { padding: 32px 36px; }
  .vitrine-texto h2 { font-size: 28px; }
}

@media (max-width: 1023px) {
  .acesso-vitrine { display: none; }
  .acesso-marca.movel { display: flex; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .painel-grade { grid-template-columns: minmax(0, 1fr); }
}

/* Relatórios: filtro, legenda e colunas empilhadas (atendidas, perdidas, feitas) */
.filtros-relatorio { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.filtros-relatorio select, .filtros-relatorio input { width: auto; }
.cartao .topo-cartao.sem-borda { padding: 0 0 10px; border: 0; }
th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legenda { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--texto-suave); margin-bottom: 10px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.s-atendidas { background: var(--serie-1); }
.s-perdidas { background: var(--serie-2); }
.s-feitas { background: var(--serie-3); }
.grafico { position: relative; padding-left: 34px; }
.grafico-max { position: absolute; left: 0; top: -6px; font-size: 12px; color: var(--texto-suave); }
.grafico-colunas { display: flex; align-items: flex-end; gap: 3px; height: 170px; border-bottom: 1px solid var(--borda-forte); background: linear-gradient(var(--borda) 1px, transparent 1px) 0 0 / 100% 50%; }
.coluna { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; min-width: 0; }
.coluna:hover { background: var(--linha-ativa); }
.pilha { display: flex; flex-direction: column; gap: 2px; max-width: 28px; width: 100%; margin: 0 auto; }
.pilha .seg { display: block; min-height: 2px; }
.pilha .seg:first-child { border-radius: 4px 4px 0 0; }
.rotulo-x { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: 11px; color: var(--texto-suave); white-space: nowrap; }
.grafico { margin-bottom: 22px; }

/* Filas ao vivo (supervisor) */
.fila-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); border-bottom: 1px solid var(--borda); }
.fila-numeros > div { padding: 12px 20px; border-right: 1px solid var(--borda); }
.fila-numeros .rotulo { display: block; font-size: 12px; color: var(--texto-suave); }
.fila-numeros strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fila-colunas { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; }
.fila-colunas > div { padding: 14px 20px; min-width: 0; }
.fila-colunas > div + div { border-left: 1px solid var(--borda); }
.fila-colunas h3 { font-size: 13px; font-weight: 600; color: var(--texto-suave); margin: 0 0 8px; }
.fila-espera { list-style: none; margin: 0; padding: 0; }
.fila-espera li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--borda); }
.fila-agentes th, .fila-agentes td { padding: 8px 10px; }
.fila-agentes th:first-child, .fila-agentes td:first-child { padding-left: 0; }

/* Painel: ligações estacionadas e ações do supervisor */
.acoes-espiar { display: inline-flex; gap: 4px; }
.acoes-espiar + .acoes-espiar { margin-left: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Telefones IP, Segurança, importação e 2FA */
.copiavel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.copiavel code { padding: 6px 10px; background: var(--superficie-funda); border: 1px solid var(--borda); border-radius: var(--raio); word-break: break-all; }
.linha-ip { display: grid; grid-template-columns: 2fr 1fr 3fr 1.3fr auto; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--borda); }
tr.vencido td { opacity: .55; }
.lista-erros { margin: 0 0 12px; padding-left: 18px; color: var(--erro); font-size: 13px; }
.passos { padding-left: 18px; line-height: 1.6; }
.qr-2fa { width: 220px; margin: 8px 0 16px; }
.qr-2fa svg { width: 100%; height: auto; display: block; }

/* Telas baixas (notebook): o menu aperta mais em vez de rolar */
@media (min-width: 861px) and (max-height: 900px) {
  .marca { padding: 14px 20px 4px; }
  .recolher { margin: 0 12px 4px; padding: 5px 14px; }
  .menu a { padding: 3px 14px; }
  .menu .secao { padding: 6px 14px 2px; }
  .lateral-rodape { padding: 8px 12px; }
  .atalho-telefone { margin-bottom: 6px; padding: 6px 14px; }
  .conta-cartao { padding: 4px 8px; }
}
@media (min-width: 861px) and (max-height: 760px) {
  .menu .secao { display: none; }
  .menu a { padding: 2px 14px; font-size: 12.5px; }
  .conta-cartao .avatar-letras { width: 28px; height: 28px; }
}

/* Abas das páginas irmãs (Ramais | Departamentos, Histórico | Gravações...) */
.abas-pagina { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin: -4px 0 16px; overflow-x: auto; }
.abas-pagina a { padding: 9px 14px; border-bottom: 2px solid transparent; color: var(--texto-suave); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: color .15s, border-color .15s; }
.abas-pagina a:hover { color: var(--texto); text-decoration: none; }
.abas-pagina a.ativo { color: var(--primaria-texto); border-bottom-color: var(--primaria); }

@media (max-width: 860px) {
  .linha-ip { grid-template-columns: 1fr; }
  .fila-colunas { grid-template-columns: 1fr; }
  .fila-colunas > div + div { border-left: 0; border-top: 1px solid var(--borda); }
  .estrutura { flex-direction: column; }
  .barra-movel { display: flex; }
  .lateral { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: 288px; max-width: 85vw; transform: translateX(-100%); transition: transform 200ms var(--suave); }
  html[data-gaveta="aberta"] .lateral { transform: none; box-shadow: var(--sombra-flutuante); }
  html[data-gaveta="aberta"] .veu { display: block; }
  .recolher { display: none; }
  .fechar-gaveta { display: grid; }
  .marca { padding-bottom: 14px; }
  .menu a { padding: 10px 14px; }
  .principal { width: 100%; }
  .conteudo { padding: 14px 14px 32px; }
  .cabecalho { margin-bottom: 14px; }
  .saudacao { font-size: 24px; }
  .painel-grade, .duas-colunas { grid-template-columns: minmax(0, 1fr); }
  .numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credenciais { grid-template-columns: 1fr; gap: 2px 0; }
  .credenciais dd { margin-bottom: 10px; }
  th, td { padding: 9px 12px; }
  .busca { flex: 1 1 100%; }
  .destino { flex-wrap: wrap; }
  .rodape-form { flex-wrap: wrap; }
}

/* ---------- aviso que some sozinho */
.aviso.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: min(420px, calc(100vw - 40px)); margin: 0; background: var(--superficie); box-shadow: var(--sombra-flutuante); animation: sobe .3s var(--macio) backwards; transition: opacity .4s, transform .4s; }
.aviso.toast.saindo { opacity: 0; transform: translateY(8px); }

/* ---------- diálogo de confirmação */
.confirmar { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--borda); border-radius: var(--raio-grande); background: var(--superficie); color: var(--texto); box-shadow: var(--sombra-flutuante); }
.confirmar[open] { animation: sobe .25s var(--macio) backwards; }
.confirmar::backdrop { background: rgba(2, 6, 23, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.confirmar-icone { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: var(--erro-fundo); color: var(--erro); }
.confirmar p { margin: 0 0 20px; font-size: 14px; font-weight: 500; }
.confirmar-acoes { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- gráfico do painel: colunas finas, topo arredondado, 2px de folga entre as partes */
.grafico-semana { position: relative; margin: 0; padding: 14px 20px 12px; }
.grafico-legenda { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; font-size: 12px; font-weight: 600; color: var(--texto-suave); }
.grafico-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.grafico-legenda i { width: 10px; height: 10px; border-radius: 2px; }
.serie-1 { background: var(--serie-1); }
.serie-2 { background: var(--serie-2); }
.grafico-plot { position: relative; display: flex; padding: 18px 0 0 26px; }
.grafico-grade { position: absolute; top: 18px; left: 26px; right: 0; height: 140px; pointer-events: none; }
.grafico-grade span { position: absolute; left: -26px; right: 0; display: flex; align-items: center; gap: 8px; height: 1px; font-size: 11px; color: var(--texto-suave); }
.grafico-grade span::after { content: ""; flex: 1; height: 1px; background: var(--borda); }
.grafico-coluna { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; border-radius: var(--raio-pequeno); cursor: default; }
.grafico-coluna:hover .grafico-area { background: var(--linha-ativa); }
.grafico-area { position: relative; width: 100%; height: 140px; display: flex; align-items: flex-end; justify-content: center; border-radius: var(--raio-pequeno) var(--raio-pequeno) 0 0; transition: background-color .15s; }
.grafico-pilha { position: relative; width: min(24px, 56%); display: flex; flex-direction: column; gap: 2px; }
.grafico-pilha i { display: block; flex: 1 1 0; min-height: 2px; }
.grafico-pilha i:first-of-type { border-radius: 4px 4px 0 0; }
.grafico-valor { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); font-size: 11.5px; font-weight: 700; }
.grafico-dia { padding-top: 6px; font-size: 11px; font-weight: 600; color: var(--texto-suave); }
.grafico-dica { position: absolute; top: 44px; z-index: 5; min-width: 130px; padding: 8px 10px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie); box-shadow: var(--sombra-flutuante); font-size: 12px; color: var(--texto-suave); pointer-events: none; }
.grafico-dica strong { display: block; margin-bottom: 4px; color: var(--texto); }
.grafico-dica div { display: flex; align-items: center; gap: 6px; }
.grafico-dica i { width: 10px; height: 2px; border-radius: 1px; }
.grafico-dica b { color: var(--texto); }
.grafico-tabela { margin-top: 10px; font-size: 12px; }
.grafico-tabela summary { color: var(--texto-suave); font-weight: 600; cursor: pointer; }
.grafico-tabela table { margin-top: 8px; }
.grafico-tabela th, .grafico-tabela td { padding: 5px 10px; }

/* ---------- módulo e integrações */
.modulo-resumo { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 14px 20px; align-items: center; }
.modulo-resumo dt { font-size: 12.5px; font-weight: 600; color: var(--texto-suave); }
.modulo-resumo dd { margin: 0; }
.modulo-erro { margin: 0; padding: 0 20px 14px; font-size: 12.5px; color: var(--alerta); }
.modulo-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
.modulo-titulo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modulo-titulo > div { flex: 1; min-width: 0; }
.modulo-titulo h2, .modulo-titulo p { margin: 0; }
.interruptor { margin-bottom: 16px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-funda); font-weight: 600; }
.modulo-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.numeros-modulo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.numero .valor-texto { font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.chaves-intro { padding: 14px 20px; border-bottom: 1px solid var(--borda); }
.chave-form { display: flex; flex-wrap: wrap; gap: 8px; }
.chave-form input { flex: 1 1 220px; width: auto; }
.chave-nova { border-color: var(--primaria-borda); background: var(--primaria-clara); }
.chave-nova h2 { margin-bottom: 4px; }
.chave-valor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chave-valor code { padding: 6px 10px; font-size: 13px; word-break: break-all; }
.codigo { margin: 0; padding: 12px 14px; overflow-x: auto; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-funda); }
.codigo code { padding: 0; border: 0; background: none; }

@media (max-width: 1100px) {
  .modulo-grade { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .numeros-modulo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numeros-modulo .numero:first-child { grid-column: span 2; }
  .modulo-titulo { flex-wrap: wrap; }
  .modulo-titulo > div { flex-basis: calc(100% - 44px); }
}

/* Respeita quem pediu menos movimento no sistema. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Troca de página sem piscar (Chrome/Edge): segura a tela anterior e esmaece para a nova.
   Faz diferença principalmente no admin aberto dentro do telefone. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
