/* Página do simulador por provedor: painel do roteador (à esquerda, grande) e, ao lado,
   o passo atual + abas Rede / Etiqueta / Ordem de serviço / Chamado.
   Do notebook ao projetor fica tudo lado a lado, sem rolar a página; no celular, empilha. */
/* Pixelify Sans (SIL OFL 1.1) embutida localmente: o jogo roda offline, sem CDN de fontes. */
@font-face {
  font-family: "Pixelify";
  src: url("../fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ap-fonte: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ap-titulo: "Pixelify", var(--ap-fonte);
  --ap-tinta: #16212e; --ap-suave: #566476; --ap-linha: #dbe1e8; --ap-fundo: #eef1f5;
  --ap-azul: #0b5cad; --ap-azul-escuro: #083f78; --ap-ok: #1f8a4c; --ap-amarelo: #f0b400;
  --ap-raio: 10px; --ap-sombra: 0 1px 2px rgba(16, 33, 54, .06), 0 4px 14px rgba(16, 33, 54, .06);
  --ap-topo-h: 56px; --ap-lado: clamp(320px, 30vw, 600px);
}
body { font-family: var(--ap-fonte); background: var(--ap-fundo); color: var(--ap-tinta); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 3px solid #f0b400; outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- topo */
.ap-topo {
  position: sticky; top: 0; z-index: 20; height: var(--ap-topo-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: #102236; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 8px rgba(0,0,0,.18);
}
.ap-marca { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.ap-logo { flex: 0 0 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #1e7be0, #0b5cad);
  display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 8px; }
.ap-logo i { width: 4px; border-radius: 2px; background: #fff; }
.ap-logo i:nth-child(1) { height: 7px; opacity: .7; } .ap-logo i:nth-child(2) { height: 12px; opacity: .85; } .ap-logo i:nth-child(3) { height: 17px; }
.ap-marca-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ap-marca-txt strong { font-size: 16px; font-weight: 650; letter-spacing: .1px; }
.ap-marca-txt small { font-size: 12px; color: #a9b8c9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sim-provedores { display: flex; gap: 4px; background: rgba(255,255,255,.08); padding: 4px; border-radius: 10px; }
.sim-provedores a {
  color: #dfe7f0; text-decoration: none; padding: 6px 14px; border-radius: 7px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 7px; transition: background .15s;
}
.sim-provedores a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--p-cor); box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.sim-provedores a:hover { background: rgba(255,255,255,.12); color: #fff; }
.sim-provedores a.ativo { background: #fff; color: #102236; }
.p-vivo { --p-cor: #8a2bb8; } .p-claro { --p-cor: #e3342a; } .p-algar { --p-cor: #00a19a; } .p-mznet { --p-cor: #2f86d6; }

/* --------------------------------------------------------------- área */
.ap-area {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--ap-lado); gap: 14px;
  padding: 14px 16px; height: calc(100vh - var(--ap-topo-h)); height: calc(100dvh - var(--ap-topo-h));
}
.janela {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: #fff; border: 1px solid #cdd5df; border-radius: var(--ap-raio); overflow: hidden; box-shadow: var(--ap-sombra);
}
.janela-barra { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #e8ecf1; border-bottom: 1px solid #d3dae2; }
.bolinhas i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; }
.bolinhas i:nth-child(1) { background: #ff5f57; } .bolinhas i:nth-child(2) { background: #febc2e; } .bolinhas i:nth-child(3) { background: #28c840; }
.janela-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 4px 12px;
  font-size: 13px; color: #3c4857; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid #d3dae2; }
.janela-cadeado { color: #8692a0; }
.janela-zoom { display: flex; align-items: center; gap: 2px; font-size: 12px; color: #5d6b7b; }
.janela-zoom button { border: 1px solid #c6cfd9; background: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 13px; cursor: pointer; color: #2c3a4a; }
.janela-zoom button:hover { background: #f0f3f6; }
.janela-zoom span { min-width: 40px; text-align: center; }
.janela-corpo { flex: 1 1 auto; min-height: 0; overflow: auto; container: painel / inline-size; display: flex; flex-direction: column; }
.janela-corpo > .pp-raiz { flex: 1 0 auto; min-height: 0; }
/* menus em cima (Claro): blocos empilhados; abas + submenu (Algar, MZNet): grade 2 colunas */
.pp-layout-topo .pp-corpo { display: block; flex: 1 0 auto; }
.pp-layout-abas .pp-corpo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; flex: 1 0 auto; }
.pp-layout-abas .pp-nav-abas { grid-column: 1 / -1; }
.pp-layout-abas .pp-nav-sub { width: 190px; }

.ap-lado { min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; scrollbar-gutter: stable; }

/* -------------------------------------------------------- passo atual */
.ap-passo { background: #fff; border: 1px solid var(--ap-linha); border-radius: var(--ap-raio); padding: 14px 16px; box-shadow: var(--ap-sombra);
  border-top: 4px solid var(--ap-amarelo); }
.ap-passo-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ap-passo-num { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #8a6400; }
.ap-link { background: none; border: 0; padding: 2px 0; color: var(--ap-azul); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sim-barra { height: 7px; background: #e6eaef; border-radius: 4px; margin: 8px 0 10px; overflow: hidden; }
.sim-barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #26a35b, #1f8a4c); border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.ap-passo h2 { margin: 0 0 4px; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.1px; }
.ap-passo p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #2c3a4a; }
.ap-btn-dica { margin-top: 10px; padding: 6px 12px; border-radius: 8px; border: 1px solid #ecd27a; background: #fff8dc; color: #6b4f00;
  font-weight: 600; font-size: 13.5px; cursor: pointer; }
.ap-btn-dica:hover { background: #fff1bf; }
.ap-btn-dica[aria-expanded="true"] { background: #f0b400; border-color: #d9a200; color: #2b2000; }
.ap-dica { margin-top: 8px; padding: 10px 12px; background: #fffbea; border: 1px dashed #e0c35a; border-radius: 8px; font-size: 13.5px; line-height: 1.5; color: #3a3220; }
.ap-dica ul { margin: 4px 0 6px; padding-left: 20px; }
.ap-dica code { background: #f1ead0; padding: 1px 5px; border-radius: 4px; font-family: Consolas, monospace; }

.sim-passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sim-passos li { display: flex; gap: 10px; padding: 7px 8px; border-radius: 8px; color: #5d6b7b; }
.sim-passos li .num {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: #e6eaef; color: #3c4857;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.sim-passos li strong { font-size: 14px; font-weight: 600; }
.sim-passos li p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; display: none; }
.sim-passos li.atual { background: #fff8dc; color: var(--ap-tinta); box-shadow: inset 0 0 0 1px #ecd27a; }
.sim-passos li.atual p { display: block; }
.sim-passos li.atual .num { background: var(--ap-amarelo); color: #fff; }
.sim-passos li.feito { color: var(--ap-tinta); }
.sim-passos li.feito .num { background: var(--ap-ok); color: #fff; }

/* --------------------------------------------------------------- abas */
.ap-abas { display: flex; gap: 2px; background: #dfe4ea; padding: 3px; border-radius: 10px; flex: 0 0 auto; }
.ap-abas button {
  flex: 1 1 auto; position: relative; padding: 7px 6px; border: 0; border-radius: 8px; background: transparent;
  font-size: 13.5px; font-weight: 600; color: #3c4857; cursor: pointer; white-space: nowrap;
}
.ap-abas button:hover { background: rgba(255,255,255,.6); }
.ap-abas button[aria-selected="true"] { background: #fff; color: var(--ap-tinta); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ap-abas button.sugerida::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--ap-amarelo); box-shadow: 0 0 0 2px #fff; }
.ap-pn { background: #fff; border: 1px solid var(--ap-linha); border-radius: var(--ap-raio); padding: 12px; box-shadow: var(--ap-sombra); }
.ap-pn[hidden] { display: none; }
.ap-pn-intro { margin: 0 0 10px; font-size: 13.5px; color: var(--ap-suave); line-height: 1.45; }
.mapa-area { background: none; border: 0; padding: 0; }
.mapa-area .mp-mapa { border-radius: 8px; }
/* o desenho encolhe pela altura para caber ao lado do painel sem rolar */
@media (min-width: 861px) { .mapa-area { max-width: calc(max(300px, 100vh - var(--ap-topo-h) - 420px) * 1000 / 1205 + 2px); margin: 0 auto; } }
.mapa-area .mp-btn { display: none; } /* teste de NAT não faz parte deste roteiro */
.ap-mapa-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 8px 0; }
.mapa-dica { margin: 0; font-size: 13px; color: var(--ap-suave); }
.ap-mapa-topo .ap-link { white-space: nowrap; }
#pn-rede .sim-btn-destaque { margin-top: 0; }
#btn-reconectar.chama { animation: ap-pulsa 1.4s ease-in-out infinite; }
@keyframes ap-pulsa { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 0, .0); } 50% { box-shadow: 0 0 0 5px rgba(240, 180, 0, .55); } }
.ap-abas .curto { display: none; }
@media (max-width: 1100px) and (min-width: 861px), (max-width: 400px) { .ap-abas .longo { display: none; } .ap-abas .curto { display: inline; } }
/* desenho maior: a lateral ocupa metade da tela */
body.mapa-grande { --ap-lado: minmax(0, 1fr); }
body.mapa-grande .mapa-area { max-width: none; }

.sim-btn { padding: 8px 14px; border: 1px solid #c6cfd9; background: #f6f8fa; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ap-tinta); text-decoration: none; display: inline-block; text-align: center; }
.sim-btn:hover { background: #eaeef3; }
.sim-btn-destaque { width: 100%; margin-top: 10px; background: var(--ap-azul); color: #fff; border-color: var(--ap-azul); padding: 10px 14px; font-size: 14.5px; }
.sim-btn-destaque:hover { background: var(--ap-azul-escuro); }

/* etiqueta com cara de adesivo (código de barras desenhado com CSS) */
.sim-etiqueta {
  border: 1px solid #c9ced6; border-radius: 6px; padding: 12px 14px; background: #fdfdfb; font-size: 13.5px;
  box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(0,0,0,.08);
}
.sim-etiqueta .et-cab { font-weight: 700; font-size: 14px; border-bottom: 1.5px solid #222; margin-bottom: 6px; padding-bottom: 5px; display: flex; justify-content: space-between; gap: 8px; }
.sim-etiqueta .et-cab::after { content: "CE  ⚠"; font-weight: 400; color: #666; letter-spacing: 2px; }
.sim-etiqueta div, .sim-os div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px dotted #d9dde2; }
.sim-etiqueta small { color: var(--ap-suave); }
.sim-etiqueta code, .sim-os code { font-family: Consolas, "Cascadia Mono", monospace; font-weight: 700; font-size: 14px; user-select: all; text-align: right; overflow-wrap: anywhere; }
.sim-etiqueta::after { content: ""; display: block; height: 34px; margin-top: 10px;
  background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px, #222 8px 11px, transparent 11px 12px); }
.sim-os { font-size: 13.5px; }
.sim-os p { margin: 10px 0 0; color: #3c4857; line-height: 1.5; background: #f4f7fa; border-radius: 6px; padding: 8px 10px; }

/* ------------------------------------------------------ aviso (toast) */
.ap-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  background: #12361f; color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: ap-sobe .25s ease-out; transition: opacity .3s;
}
.ap-toast.some { opacity: 0; }
@keyframes ap-sobe { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ------------------------------------------------ chamado concluído */
.ap-fim { width: min(520px, calc(100vw - 32px)); }
.ap-fim-cab { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: linear-gradient(135deg, #1f8a4c, #26a35b); color: #fff; }
.ap-fim-cab strong { display: block; font-size: 20px; }
.ap-fim-cab small { font-size: 13.5px; opacity: .9; }
.ap-fim-selo { flex: 0 0 44px; height: 44px; border-radius: 50%; background: #fff; color: #1f8a4c; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.ap-fim-corpo { padding: 14px 20px 4px; }
.ap-fim-corpo p { margin: 0 0 8px; color: var(--ap-suave); font-size: 14px; }
.ap-fim-tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.ap-fim-tabela th { text-align: left; font-weight: 600; color: var(--ap-suave); padding: 6px 10px 6px 0; width: 40%; vertical-align: top; }
.ap-fim-tabela td { padding: 6px 0; font-weight: 600; overflow-wrap: anywhere; }
.ap-fim-tabela tr + tr { border-top: 1px solid #edf0f3; }
.ap-fim-acoes { display: flex; gap: 8px; padding: 14px 20px 18px; }
.ap-fim-acoes .sim-btn-destaque { margin: 0; flex: 1; }
.dlg { border-radius: 12px; overflow: hidden; }

/* ------------------------------------------------- tamanhos de tela */
/* notebook pequeno / janela estreita: lateral mais fina */
@media (max-width: 1100px) { :root { --ap-lado: 320px; } .ap-area { gap: 10px; padding: 10px; } .ap-marca-txt small { display: none; } }
/* tablet em pé e celular: uma coluna, na ordem passo → painel → abas */
@media (max-width: 860px) {
  :root { --ap-topo-h: auto; }
  .ap-topo { height: auto; flex-wrap: wrap; padding: 8px 12px; position: static; }
  .sim-provedores { width: 100%; }
  .sim-provedores a { flex: 1; justify-content: center; padding: 7px 4px; }
  .ap-area { display: flex; flex-direction: column; height: auto; padding: 10px; }
  .ap-lado { display: contents; }
  .ap-passo { order: 1; }
  .janela { order: 2; }
  .janela-corpo { overflow: visible; }
  .janela-corpo > .pp-raiz { min-height: 0; }
  .ap-abas { order: 3; }
  .ap-pn { order: 4; }
  .mapa-area { max-width: 560px; margin: 0 auto; }
  .ap-passo p { font-size: 14px; }
}
@media (max-width: 480px) {
  .ap-abas button { font-size: 12.5px; padding: 8px 2px; }
  .ap-passo h2 { font-size: 17px; }
  .ap-passo { padding: 10px 12px; }
}
/* tela baixa (notebook 1366×768 com barra do navegador): passo mais compacto */
@media (min-width: 861px) and (max-height: 720px) {
  .ap-passo { padding: 10px 14px; } .ap-passo h2 { font-size: 17px; } .ap-passo p { font-size: 13.5px; }
  .sim-barra { margin: 6px 0 8px; }
}

/* ---------------------------------------------------------------- painel */
.pp-raiz {
  --pp-cor: #0b5cad; --pp-cor-escura: #083f78; --pp-cor-clara: #e8f0fa; --pp-texto-cab: #fff;
  --pp-fundo: #f4f6f9; --pp-raio: 6px; --pp-fonte: "Segoe UI", system-ui, sans-serif;
  font-family: var(--pp-fonte); background: var(--pp-fundo); color: #222; min-height: 520px;
  display: flex; flex-direction: column; font-size: 14px;
}
.pp-cab {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px; background: var(--pp-cor); color: var(--pp-texto-cab);
}
.pp-marca { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-simbolo { width: 26px; height: 26px; border-radius: 50%; border: 3px solid currentColor; position: relative; opacity: .9; }
.pp-simbolo::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: currentColor; }
.pp-marca-nome { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.pp-modelo { font-size: 12px; opacity: .85; }
.pp-sair { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: var(--pp-raio); padding: 4px 12px; cursor: pointer; }
.pp-sair .pp-trad { color: inherit; opacity: .8; }
.pp-faixa-sim { background: #fff3c4; color: #6b5300; font-size: 12px; text-align: center; padding: 3px 8px; border-bottom: 1px solid #ecd98a; }

.pp-termo { font-weight: inherit; }
.pp-trad { color: #6a7480; font-weight: 400; font-size: 11.5px; }

.pp-corpo { display: flex; flex: 1; min-height: 0; }
.pp-conteudo { flex: 1; padding: 14px 18px 18px; min-width: 0; overflow-x: auto; }
.pp-trilha { font-size: 16px; font-weight: 600; color: var(--pp-cor-escura); padding-bottom: 8px; margin-bottom: 12px; border-bottom: 2px solid var(--pp-cor-clara); }
.pp-trilha .pp-trad { font-size: 12px; }
.pp-seta { color: #999; margin: 0 4px; }

/* menus */
.pp-item { display: block; color: inherit; text-decoration: none; padding: 8px 14px; cursor: pointer; }
.pp-layout-topo .pp-corpo { flex-direction: column; }
.pp-nav-topo { display: flex; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #ddd; padding: 0 10px; }
.pp-nav-topo .pp-item { padding: 12px 14px; border-bottom: 3px solid transparent; font-weight: 600; color: #555; }
.pp-nav-topo .pp-item.ativo { color: var(--pp-cor); border-bottom-color: var(--pp-cor); }

.pp-nav-lateral { flex: 0 0 190px; background: #fff; border-right: 1px solid #ddd; padding: 8px 0; }
.pp-grupo-titulo { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: #888; padding: 10px 14px 4px; font-weight: 700; }
.pp-nav-lateral .pp-item { border-left: 4px solid transparent; }
.pp-nav-lateral .pp-item.ativo { border-left-color: var(--pp-cor); background: var(--pp-cor-clara); color: var(--pp-cor-escura); font-weight: 600; }

.pp-layout-abas .pp-corpo { flex-wrap: wrap; }
.pp-nav-abas { flex: 0 0 100%; display: flex; flex-wrap: wrap; background: var(--pp-cor-escura); }
.pp-aba { color: #dfe; text-decoration: none; padding: 9px 16px; font-weight: 600; }
.pp-aba .pp-trad { color: inherit; opacity: .75; }
.pp-aba.ativo { background: var(--pp-fundo); color: var(--pp-cor-escura); }
.pp-nav-sub { flex: 0 0 180px; background: #fff; border-right: 1px solid #ddd; padding: 6px 0; }
.pp-nav-sub .pp-item.ativo { background: var(--pp-cor-clara); color: var(--pp-cor-escura); font-weight: 600; }
.pp-layout-abas .pp-conteudo { flex: 1 1 300px; }

.pp-nav-arvore { flex: 0 0 200px; background: #eef1f4; border-right: 1px solid #d3d8de; padding: 8px 0; font-size: 13.5px; }
.pp-pasta-titulo { display: block; padding: 7px 12px; font-weight: 700; color: #333; text-decoration: none; }
.pp-pasta-itens { display: none; }
.pp-pasta.aberta .pp-pasta-itens { display: block; }
.pp-pasta-itens .pp-item { padding: 6px 12px 6px 28px; }
.pp-nav-arvore .pp-item.ativo { background: var(--pp-cor); color: #fff; }
.pp-nav-arvore .pp-item.ativo .pp-trad { color: #e8eefc; }


/* formulários */
.pp-form { max-width: 560px; }
.pp-campo { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 4px 12px; align-items: center; margin-bottom: 10px; }
.pp-campo label { font-weight: 600; color: #333; }
.pp-campo input, .pp-campo select {
  padding: 7px 9px; border: 1px solid #b9c1cb; border-radius: var(--pp-raio); background: #fff; min-width: 0; font: inherit;
}
.pp-campo input:focus, .pp-campo select:focus { outline: 2px solid var(--pp-cor); outline-offset: 0; border-color: var(--pp-cor); }
.pp-com-olho { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; }
.pp-olho { border: 1px solid #b9c1cb; background: #fff; border-radius: var(--pp-raio); cursor: pointer; padding: 5px 8px; }
.pp-check { grid-template-columns: 1fr; }
.pp-check label { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.pp-secao { font-size: 15px; margin: 18px 0 10px; color: var(--pp-cor-escura); }
.pp-sub { font-size: 14px; margin: 16px 0 8px; color: var(--pp-cor-escura); }
.pp-nota { font-size: 12.5px; color: #66707b; margin: 4px 0 10px; }
.pp-rodape { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #ddd; }
.pp-btn { padding: 7px 18px; border-radius: var(--pp-raio); border: 1px solid #b9c1cb; background: #fff; cursor: pointer; font: inherit; }
.pp-btn-primario { background: var(--pp-cor); color: #fff; border-color: var(--pp-cor); font-weight: 600; }
.pp-btn-mini { padding: 4px 10px; font-size: 13px; }
.pp-btn-largo { width: 100%; padding: 9px; }
.pp-aviso { padding: 8px 12px; border-radius: var(--pp-raio); margin-bottom: 12px; font-weight: 600; }
.pp-aviso-ok { background: #e3f5ea; color: #1f6b3c; border: 1px solid #a8dcbc; }
.pp-aviso-erro { background: #fdecea; color: #a1261b; border: 1px solid #f2b8b2; }
.pp-erro { color: #b3261e; font-weight: 600; margin: 4px 0 8px; }

.pp-tabela { border-collapse: collapse; width: 100%; font-size: 13px; background: #fff; }
.pp-tabela th, .pp-tabela td { border: 1px solid #dde2e8; padding: 5px 8px; text-align: left; }
.pp-tabela th { background: var(--pp-cor-clara); color: var(--pp-cor-escura); }
.pp-tabela input { width: 100%; min-width: 120px; padding: 5px 6px; border: 1px solid #b9c1cb; border-radius: 4px; font-family: Consolas, monospace; }
.pp-reservas { margin-bottom: 8px; }

.pp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pp-card { background: #fff; border: 1px solid #dde2e8; border-radius: var(--pp-raio); padding: 10px 12px; border-top: 3px solid var(--pp-cor); }
.pp-card h4 { margin: 0 0 6px; color: var(--pp-cor-escura); }
.pp-kv { width: 100%; font-size: 13px; border-collapse: collapse; }
.pp-kv th { text-align: left; color: #66707b; font-weight: 400; padding: 2px 6px 2px 0; white-space: nowrap; }
.pp-kv td { font-weight: 600; padding: 2px 0; word-break: break-word; }
.pp-ok { color: #1f8a4c; } .pp-falha { color: #b3261e; } .pp-alerta { color: #a86400; }

/* login */
.pp-login { flex: 1; display: grid; place-items: center; padding: 30px 16px; }
.pp-login-caixa { width: min(360px, 100%); background: #fff; padding: 22px; border-radius: calc(var(--pp-raio) * 1.5); box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.pp-login-caixa h2 { margin: 0 0 16px; font-size: 19px; color: var(--pp-cor-escura); }
.pp-login-caixa .pp-campo { grid-template-columns: 1fr; }
.pp-login-caixa .pp-com-olho { grid-template-columns: 1fr auto; }
.pp-login-caixa .pp-com-olho label { grid-column: 1 / -1; }

/* ------------------------------------------------- escolha do provedor */
body.sem-perfil .so-com-perfil, body:not(.sem-perfil):not(.com-perfil) .so-com-perfil { display: none; }
body.com-perfil .so-sem-perfil { display: none; }
.escolha { max-width: 1000px; margin: 28px auto; padding: 0 16px; }
.escolha h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.2px; }
.escolha p { line-height: 1.55; color: #2c3a4a; }
.cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 20px 0; }
.cartao { position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--ap-linha);
  border-radius: 12px; overflow: hidden; box-shadow: var(--ap-sombra); transition: transform .15s, box-shadow .15s; }
.cartao:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,33,54,.14); }
.cartao b { display: block; padding: 22px 16px; color: #fff; font-size: 22px; letter-spacing: .2px; }
.cartao span { display: block; padding: 12px 16px 6px; font-size: 14px; color: var(--ap-suave); line-height: 1.45; flex: 1; }
.cartao em { display: block; padding: 0 16px 14px; font-style: normal; font-size: 13px; font-weight: 700; color: #8a6400; min-height: 1em; }
.cartao em.ok { color: var(--ap-ok); }
.c-vivo b { background: linear-gradient(90deg, #660099, #8a2bb8); }
.c-claro b { background: linear-gradient(90deg, #b51f14, #e3342a); }
.c-algar b { background: linear-gradient(90deg, #00594f, #00a19a); }
.c-mznet b { background: linear-gradient(90deg, #003a6b, #0068b7); box-shadow: inset 0 -4px 0 #f39200; }
.aviso { background: #fff8dc; border: 1px solid #ecd27a; border-radius: 10px; padding: 12px 16px; font-size: 14px; }

.sim-chamado { border-left: 4px solid #f0b400; background: #fffdf3; padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.sim-chamado strong { font-size: 15px; }
.sim-chamado p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

.pp-cab-dir { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pp-info { background: #f1f4f8; border: 1px dashed #b9c1cb; border-radius: var(--pp-raio); padding: 14px; color: #4a5562; line-height: 1.5; max-width: 560px; }
.pp-aplicando { position: absolute; inset: 0; background: rgba(255,255,255,.75); display: grid; place-items: center; z-index: 5; font-weight: 600; color: #333; }
.pp-aplicando div { background: #fff; padding: 16px 22px; border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.15); display: flex; gap: 10px; align-items: center; }
.pp-giro { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #ccd; border-top-color: var(--pp-cor); animation: pp-gira .8s linear infinite; }
@keyframes pp-gira { to { transform: rotate(360deg); } }
.pp-raiz { position: relative; }
.pp-campo input:disabled { background: #eef0f3; color: #555; }

.pp-layout-topo .pp-corpo, .pp-layout-abas .pp-corpo { flex-wrap: wrap; }
.pp-nav-subtopo { flex: 0 0 100%; display: flex; flex-wrap: wrap; background: #fff; border-bottom: 1px solid #ddd; padding: 0 8px; }
.pp-nav-subtopo .pp-item { padding: 10px 12px; border-bottom: 3px solid transparent; color: #444; }
.pp-nav-subtopo .pp-item.ativo { color: var(--pp-cor); border-bottom-color: var(--pp-cor); font-weight: 600; }
.pp-layout-topo .pp-conteudo { flex: 1 1 100%; }
.pp-subgrupo-titulo { font-weight: 700; font-size: 12.5px; color: #555; padding: 8px 12px 2px; }
.pp-subgrupo .pp-item { padding-left: 24px; }
.pp-cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
.pp-kv { table-layout: fixed; }
.pp-kv th { white-space: normal; width: 46%; vertical-align: top; }
.pp-kv td { word-break: break-all; vertical-align: top; }
.pp-aba { padding: 8px 12px; }
.pp-layout-topo .pp-corpo, .pp-layout-abas .pp-corpo { align-content: flex-start; align-items: stretch; }
.pp-layout-abas .pp-nav-sub { align-self: stretch; }

/* ------------------------------------------------- v3: aparência de firmware (rodapé, marca) */
.pp-pe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 14px; font-size: 11px; color: #8a9099; border-top: 1px solid #e1e4e8; background: #fff; }
.pp-pe-sim { color: #a07c00; }
.pp-marca-nome b { font-weight: inherit; }
.pp-usuario { opacity: .9; }

/* ------------------------------------- painel em espaço estreito (container query) */
.pp-raiz { min-height: 0; }
.pp-card h4 .pp-trad, .pp-tabela th .pp-trad, .pp-secao .pp-trad, .pp-sub .pp-trad { color: inherit; opacity: .78; }
@container painel (max-width: 760px) {
  .pp-nav-lateral { flex-basis: 165px !important; }
  .pp-nav-sub, .pp-nav-arvore { flex-basis: 160px !important; }
  .pp-layout-abas .pp-nav-sub { width: 160px; }
  .pp-campo, .pp-com-olho, .pp-raiz[data-tema="mznet"] .pp-campo { grid-template-columns: minmax(120px, 160px) minmax(0, 1fr); }
  .pp-com-olho, .pp-raiz[data-tema="mznet"] .pp-com-olho { grid-template-columns: minmax(120px, 160px) minmax(0, 1fr) auto; }
  .pp-raiz[data-tema="mznet"] .pp-check { padding-left: 172px; }
  .pp-raiz[data-tema="vivo"] .pp-marca-nome { font-size: 24px; }
  .pp-raiz[data-tema="vivo"] .pp-conteudo, .pp-raiz[data-tema="claro"] .pp-conteudo { margin: 8px; }
}
@container painel (max-width: 560px) {
  .pp-corpo { flex-direction: column; }
  .pp-layout-abas .pp-corpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; }
  .pp-layout-abas .pp-nav-sub { width: auto; }
  .pp-nav-lateral, .pp-nav-sub, .pp-nav-arvore { flex: none !important; border-right: 0 !important; border-bottom: 1px solid #ddd; display: flex; flex-wrap: wrap; padding: 4px !important; }
  .pp-nav-lateral .pp-grupo-menu { display: contents; }
  .pp-nav-lateral .pp-grupo-titulo { display: none; }
  .pp-nav-lateral .pp-item, .pp-nav-sub .pp-item { border-left: 0 !important; border-radius: 4px; padding: 6px 10px !important; }
  .pp-nav-sub .pp-subgrupo { display: contents; }
  .pp-nav-sub .pp-subgrupo-titulo { display: none; }
  .pp-nav-sub .pp-item::before { display: none; }
  .pp-campo, .pp-com-olho, .pp-raiz[data-tema="mznet"] .pp-campo { grid-template-columns: 1fr; }
  .pp-com-olho, .pp-raiz[data-tema="mznet"] .pp-com-olho { grid-template-columns: minmax(0, 1fr) auto; }
  .pp-com-olho label { grid-column: 1 / -1; }
  .pp-raiz[data-tema="mznet"] .pp-check { padding-left: 0; }
  .pp-raiz[data-tema="mznet"] .pp-campo label { text-align: left; }
  .pp-raiz[data-tema="algar"] .pp-campo label { align-self: auto; }
  .pp-modelo { display: none; }
  .pp-cards { grid-template-columns: 1fr; }
  .pp-tabela { display: block; overflow-x: auto; white-space: nowrap; }
  .pp-conteudo { padding: 10px !important; }
}
@media (max-width: 860px) { #btn-mapa-grande { display: none; } }

/* ------------------------------------------- Prompt de Comando (cara de Windows) */
.dlg-cmd { width: min(820px, calc(100vw - 24px)); border-radius: 8px; background: #0c0c0c; }
.cmd-cab { background: #f3f3f3; color: #1b1b1b; padding: 6px 6px 6px 12px; gap: 10px; justify-content: flex-start; border-bottom: 1px solid #ddd; }
.cmd-cab strong { flex: 1; font-weight: 400; font-size: 13px; font-family: "Segoe UI", system-ui, sans-serif; }
.cmd-icone { background: #0c0c0c; color: #ccc; font: 700 9px Consolas, monospace; padding: 2px 3px; border-radius: 2px; border: 1px solid #555; }
.cmd-cab .dlg-fechar { color: #333; width: 40px; height: 28px; border-radius: 4px; font-size: 15px; }
.cmd-cab .dlg-fechar:hover { background: #c42b1c; color: #fff; }
.dlg-cmd .term { background: #0c0c0c; color: #cccccc; font: 15px/1.35 "Cascadia Mono", Consolas, "Courier New", monospace; height: min(52vh, 420px); padding: 10px 14px 0; }
.dlg-cmd .term div { min-height: 1.35em; }
.dlg-cmd .term .term-erro { color: #cccccc; }
.dlg-cmd .term .term-nota { color: #f9d45c; font-family: "Segoe UI", system-ui, sans-serif; font-size: 13.5px; margin: 4px 0 8px; }
.dlg-cmd .term-entrada { background: #0c0c0c; color: #ccc; font: 15px "Cascadia Mono", Consolas, monospace; padding: 0 14px 12px; gap: 0; }
.dlg-cmd .term-entrada input { font: inherit; color: #ccc; caret-color: #ccc; padding-left: 0; }
.dlg-cmd .term-entrada input:disabled { opacity: 0; }
.term-parar { margin-left: 8px; background: #c42b1c; color: #fff; border: 0; border-radius: 4px; padding: 4px 10px; font: 600 13px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.dlg-cmd .term-atalhos { background: #f3f3f3; border-top: 1px solid #ddd; align-items: center; }
.dlg-cmd .term-atalhos span { font-size: 12.5px; color: #555; margin-right: 2px; }
.dlg-cmd .term-atalhos button { background: #fff; }
.dlg-cmd .term-atalhos button:hover { background: #e8eef5; }
.dlg-cmd .term-entrada:has(input:disabled) > span { visibility: hidden; }
.ap-btn-prompt { width: 100%; margin-top: 8px; background: #1b1b1b; color: #eee; border-color: #1b1b1b; }
.ap-btn-prompt:hover { background: #000; }
.ap-btn-prompt span { font-family: Consolas, monospace; color: #9cdcfe; margin-right: 4px; }
