/* NPNET — app do cliente
   Cores tiradas da logomarca NPNET */
:root {
  --tinta: #3E4095;        /* índigo do slogan: textos fortes, botões */
  --tinta-2: #3255A6;      /* azul do bloco "net" */
  --luz: #00AFEF;          /* azul ciano do "NP" */
  --laranja: #F58A2E;      /* início das ondas */
  --rosa: #EE3E78;         /* fim das ondas */
  --sol: #E9476C;
  --sol-escuro: #D63A5E;
  --onda: linear-gradient(90deg, #F2782F 0%, #E9436E 100%);
  --painel: linear-gradient(135deg, #2F6FC0 0%, #3E4095 100%);
  --ok: #1F8A5B;
  --alerta: #C9483E;
  --fundo: #F2F4FA;
  --superficie: #FFFFFF;
  --texto: #1B2733;
  --texto-2: #566575;
  --linha: #DFE3F0;
  --raio-g: 22px;
  --raio-p: 12px;
  --fonte-titulo: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --fonte-texto: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --topo-seguro: env(safe-area-inset-top, 0px);
  --base-segura: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--fonte-texto);
  font-size: 17px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
[hidden] { display: none !important; }
h1, h2 { font-family: var(--fonte-titulo); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--luz); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 0 20px;
  border: 0; border-radius: 14px; cursor: pointer;
  font-family: var(--fonte-titulo); font-weight: 600; font-size: 18px;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-primario { background: var(--tinta); color: #fff; }
.btn-sol { background: var(--onda); color: #fff; text-shadow: 0 1px 1px rgba(120,20,40,.25); }
.btn-sol:active { filter: brightness(.93); }
.btn-secundario { background: transparent; color: var(--tinta); border: 1.5px solid var(--linha); }
.btn-texto { background: none; border: 0; padding: 8px 4px; color: inherit; font-weight: 700; cursor: pointer; }
.btn.carregando-btn::after {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: girar .7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Entrada */
.login {
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--superficie);
}
.login-topo {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: calc(48px + var(--topo-seguro)) 28px 36px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(0,175,239,.14), transparent 65%),
    radial-gradient(70% 50% at 0% 100%, rgba(238,62,120,.08), transparent 70%),
    var(--superficie);
}
.logo-grande { width: min(300px, 82%); height: auto; }
.slogan { color: #BFD3E6; margin-top: 12px; font-size: 18px; }
.login-form {
  background: var(--superficie);
  box-shadow: 0 -10px 30px rgba(62,64,149,.08);
  border-radius: var(--raio-g) var(--raio-g) 0 0;
  padding: 32px 24px calc(28px + var(--base-segura));
  display: flex; flex-direction: column;
}
.login-form h1 { font-size: 28px; font-weight: 800; color: var(--tinta); }
.apoio { color: var(--texto-2); margin: 8px 0 26px; }
.login-form label { font-weight: 700; margin-bottom: 8px; }
.login-form input {
  height: 58px; padding: 0 16px; font-size: 22px; letter-spacing: .03em;
  border: 2px solid var(--linha); border-radius: 14px; background: var(--fundo);
  margin-bottom: 18px;
}
.login-form input:focus { outline: none; border-color: var(--luz); background: #fff; }
.erro { color: var(--alerta); font-weight: 700; margin: -6px 0 14px; }
.link-ajuda { text-align: center; color: var(--tinta-2); margin-top: 20px; font-size: 15px; }

/* Topo e painel de status */
.topo {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--topo-seguro)) 20px 12px;
  background: var(--superficie); color: var(--tinta);
}
.logo-topo { height: 40px; width: auto; }
.painel {
  background: var(--painel); color: #fff;
  padding: 12px 20px 28px;
  border-radius: 0 0 var(--raio-g) var(--raio-g);
}
.saudacao { color: #E4ECFA; font-size: 17px; padding-top: 6px; }
.seletor select {
  margin-top: 10px; width: 100%; height: 46px; padding: 0 12px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff;
}
.sinal {
  margin-top: 16px; padding: 22px 20px 20px;
  border-radius: 18px; background: rgba(20,24,90,.28); border: 1px solid rgba(255,255,255,.14);
  position: relative; overflow: hidden;
}
.sinal h2 { font-size: 27px; font-weight: 800; margin-top: 14px; }
.sinal p { color: #E4ECFA; margin-top: 6px; }
.sinal .btn { margin-top: 18px; }
.fibra { width: 100%; height: 34px; display: block; }
.fibra path { fill: none; stroke-width: 4; stroke-linecap: round; }
.fibra-trilho { stroke: rgba(255,255,255,.16); }
.fibra-luz { stroke: url(#onda); stroke-dasharray: 380; stroke-dashoffset: 380; animation: acender 1.4s .25s cubic-bezier(.6,.1,.2,1) forwards; }
.sinal.suspenso .fibra-luz { stroke: #FFB3C4; stroke-dasharray: 14 18; stroke-dashoffset: 0; animation: none; opacity: .9; }
.sinal.liberado .fibra-luz { stroke: url(#onda); }
@keyframes acender { to { stroke-dashoffset: 0; } }
.contrato-info { color: #D3DDF3; font-size: 14px; margin-top: 14px; }

/* Faturas */
.conteudo { padding: 26px 20px calc(32px + var(--base-segura)); max-width: 640px; margin: 0 auto; }
.secao-cab { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.secao-cab h2 { font-size: 22px; color: var(--tinta); }
.secao-cab .btn-texto { color: var(--tinta-2); font-size: 15px; }

.fatura {
  background: var(--superficie); border-radius: 18px; padding: 18px;
  border: 1px solid var(--linha); margin-bottom: 14px;
}
.fatura.vencida { border-color: #F0C6C1; box-shadow: inset 5px 0 0 var(--alerta); }
.fatura-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fatura-valor { font-family: var(--fonte-titulo); font-weight: 800; font-size: 30px; color: var(--tinta); letter-spacing: -0.02em; }
.fatura-venc { color: var(--texto-2); margin-top: 2px; }
.etiqueta { font-size: 14px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.etiqueta.atraso { background: #FBE6E4; color: var(--alerta); }
.etiqueta.aberta { background: #E0F4FD; color: #00729C; }
.etiqueta.hoje { background: #FDF1D8; color: #8A5A00; }
.fatura-prazo { font-size: 15px; color: #7A4B00; background: #FDF1D8; border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.fatura-desconto { font-size: 15px; color: var(--ok); margin-top: 6px; }
.fatura-juros { font-size: 14px; color: var(--texto-2); margin-top: 6px; }
.codigo {
  margin-top: 14px; padding: 12px; border-radius: var(--raio-p); background: var(--fundo);
  font-size: 15px; word-break: break-all; color: var(--texto-2); letter-spacing: .02em;
}
.fatura-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fatura-acoes .btn { min-height: 48px; font-size: 16px; }
.fatura-acoes .largo { grid-column: 1 / -1; }

.vazio {
  text-align: center; padding: 34px 20px; background: var(--superficie);
  border-radius: 18px; border: 1px dashed var(--linha); color: var(--texto-2);
}
.vazio strong { display: block; font-family: var(--fonte-titulo); font-size: 20px; color: var(--ok); margin-bottom: 4px; }
.esqueleto { height: 190px; border-radius: 18px; margin-bottom: 14px; background: linear-gradient(90deg, #E7EDF2 25%, #F2F5F8 50%, #E7EDF2 75%); background-size: 200% 100%; animation: brilho 1.2s infinite; }
@keyframes brilho { to { background-position: -200% 0; } }

.ajuda {
  display: flex; gap: 14px; align-items: center; margin-top: 18px;
  padding: 16px 18px; border-radius: 18px; background: var(--superficie);
  border: 1px solid var(--linha); text-decoration: none; color: var(--texto); font-size: 15px;
}
.ajuda svg { width: 34px; height: 34px; fill: #1F9D57; flex: none; }
.ajuda strong { font-size: 17px; color: var(--tinta); }

/* Folhas (bottom sheet) */
.folha-fundo { position: fixed; inset: 0; background: rgba(8,22,38,.55); z-index: 20; animation: aparecer .2s ease; }
.folha {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  background: var(--superficie); border-radius: var(--raio-g) var(--raio-g) 0 0;
  padding: 12px 24px calc(24px + var(--base-segura));
  max-width: 640px; margin: 0 auto;
  animation: subir .28s cubic-bezier(.2,.8,.2,1);
}
.folha > div, .folha { display: flex; flex-direction: column; }
.folha h2 { font-size: 25px; color: var(--tinta); margin: 10px 0 10px; }
.folha p { color: var(--texto-2); margin-bottom: 12px; }
.folha .btn { margin-top: 10px; }
.folha .aviso { background: #FDF1D8; color: #6E4800; padding: 12px 14px; border-radius: var(--raio-p); font-size: 15px; }
.folha-alca { width: 44px; height: 5px; border-radius: 3px; background: var(--linha); margin: 0 auto 6px; }
.selo { width: 68px; height: 68px; border-radius: 50%; margin: 14px 0 4px; display: grid; place-items: center; }
.selo.ok { background: #DDF3E8; }
.selo.ok::after { content: ''; width: 26px; height: 14px; border: 5px solid var(--ok); border-top: 0; border-right: 0; transform: translateY(-3px) rotate(-45deg); }
.selo.falha { background: #FBE6E4; }
.selo.falha::after { content: '!'; font: 800 36px var(--fonte-titulo); color: var(--alerta); }
.protocolo { font-weight: 700; color: var(--tinta) !important; }
.pix-qr { width: 220px; height: 220px; align-self: center; margin-bottom: 10px; }
.pix-codigo { width: 100%; border: 1px solid var(--linha); border-radius: var(--raio-p); padding: 12px; background: var(--fundo); font-size: 14px; resize: none; word-break: break-all; }
@keyframes subir { from { transform: translateY(100%); } }
@keyframes aparecer { from { opacity: 0; } }

.aviso-flutuante {
  position: fixed; left: 50%; bottom: calc(24px + var(--base-segura)); transform: translateX(-50%);
  background: var(--tinta); color: #fff; padding: 13px 20px; border-radius: 14px;
  font-weight: 700; z-index: 40; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 8px 24px rgba(14,42,71,.3); animation: aparecer .2s ease;
}

.carregando { position: fixed; inset: 0; background: var(--superficie); display: grid; place-items: center; z-index: 50; transition: opacity .3s ease; }
.carregando img { width: min(260px, 70%); }
.carregando.sumir { opacity: 0; pointer-events: none; }

@media (min-width: 700px) {
  .painel { padding-left: max(20px, calc(50% - 300px)); padding-right: max(20px, calc(50% - 300px)); }
  .topo { padding-left: max(20px, calc(50% - 300px)); padding-right: max(20px, calc(50% - 300px)); }
  .login { align-items: center; justify-content: center; }
  .login-topo { flex: none; padding: 40px 0 28px; text-align: center; align-items: center; background: none; }
  .login-form { width: 420px; border-radius: var(--raio-g); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .fibra-luz { stroke-dashoffset: 0; }
}
