/* App do cliente (instalável no celular) */
body.app-cliente { --app-cor: #2563eb; background: var(--fundo); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) body.app-cliente { --fundo: var(--fundo-app, #f1f3f8); } }
:root[data-theme="light"] body.app-cliente { --fundo: var(--fundo-app, #f1f3f8); }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 92px); }

/* topo */
.app-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.app-topo .ola { font-size: 15px; color: var(--texto-2); line-height: 1.2; }
.app-topo .ola b { display: block; font-size: 19px; color: var(--texto); text-transform: uppercase; letter-spacing: .01em; }
.app-topo img { height: var(--logo-altura, 44px); width: auto; max-width: 60%; object-fit: contain; }
.app-topo .nome-provedor { font-weight: 800; color: var(--app-cor); text-transform: uppercase; font-size: 14px; letter-spacing: .04em; }
.app h1 { font-size: 21px; margin: 4px 0 4px; }
.app .sub { margin: 0 0 16px; color: var(--texto-2); font-size: 14px; }
.voltar-app { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-2); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 4px; }

/* cartões */
.c { background: var(--superficie); border-radius: 18px; box-shadow: 0 1px 3px rgb(16 24 40 / 6%); border: 1px solid var(--borda); padding: 18px; margin-bottom: 14px; }
:root:not([data-theme="dark"]) .app-cliente .c { border-color: transparent; }
.c.clicavel { cursor: pointer; display: block; text-decoration: none; color: inherit; }
.c.clicavel:active { transform: scale(.99); }
.status-net { display: flex; align-items: center; gap: 14px; }
.status-net .bola { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex: none; }
.status-net .bola.ok { background: var(--ok-suave); color: var(--ok); }
.status-net .bola.ruim { background: var(--ruim-suave); color: var(--ruim); }
.status-net small { display: block; font-size: 11px; color: var(--texto-3); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.status-net .estado { font-size: 18px; font-weight: 750; }
.status-net .estado.ok { color: var(--ok); }
.status-net .estado.ruim { color: var(--ruim); }
.status-net .plano { margin-left: auto; text-align: right; }
.status-net .plano b { display: block; font-size: 15px; }
.status-net .plano span { font-size: 12px; color: var(--texto-3); }
.c .rodape-c { margin-top: 12px; font-size: 14px; color: var(--texto-2); }

/* atalhos */
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.atalho { background: var(--superficie); border-radius: 16px; padding: 16px 6px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--texto); font-size: 13px; font-weight: 500; text-align: center; box-shadow: 0 1px 3px rgb(16 24 40 / 6%); border: 1px solid var(--borda); min-height: 92px; justify-content: center; }
:root:not([data-theme="dark"]) .app-cliente .atalho { border-color: transparent; }
.atalho .em { font-size: 24px; line-height: 1; }
.atalho:active { transform: scale(.97); }

/* carrossel */
.carrossel { margin: 0 0 14px; }
.carrossel .faixa { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; border-radius: 16px; }
.carrossel .faixa::-webkit-scrollbar { display: none; }
.carrossel a, .carrossel .slide { flex: 0 0 100%; scroll-snap-align: start; border-radius: 16px; overflow: hidden; display: block; }
.carrossel img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; display: block; background: var(--superficie-2); }
.pontos { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.pontos i { width: 6px; height: 6px; border-radius: 99px; background: var(--borda); transition: width .2s, background .2s; }
.pontos i.ativo { width: 18px; background: var(--app-cor); }

/* financeiro */
.linha-fin { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.linha-fin h3 { font-size: 16px; margin: 0; }
.linha-fin .ok { color: var(--ok); font-size: 14px; margin-top: 2px; }
.linha-fin .ruim { color: var(--ruim); font-size: 14px; margin-top: 2px; font-weight: 600; }
.linha-fin .num-grande { text-align: right; font-size: 12px; color: var(--texto-3); }
.linha-fin .num-grande b { display: block; font-size: 22px; color: var(--texto); }
.contrato-item { display: flex; align-items: center; gap: 10px; }
.contrato-item div { flex: 1; min-width: 0; }
.contrato-item b { display: block; font-size: 16px; }
.contrato-item span { font-size: 13px; color: var(--texto-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contrato-item .seta { color: var(--texto-3); font-size: 20px; }
.selo { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--superficie-2); color: var(--texto-2); }
.selo.ok { background: var(--ok-suave); color: var(--ok); }
.selo.ruim { background: var(--ruim-suave); color: var(--ruim); }
.selo.atencao { background: var(--atencao-suave); color: var(--atencao); }
.abas-app { display: grid; grid-template-columns: 1fr 1fr; background: var(--superficie-2); border-radius: 14px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--borda); }
.abas-app button { border: 0; background: none; padding: 11px; border-radius: 11px; font: 600 14px var(--fonte); color: var(--texto-2); cursor: pointer; }
.abas-app button.ativo { background: var(--app-cor); color: #fff; }
.fatura .topo-fat { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fatura .valor { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.fatura .venc { font-size: 13px; color: var(--texto-2); }
.fatura .botoes-fat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.fatura .botoes-fat .inteiro { grid-column: 1 / -1; }
.btn-app { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 12px; border: 1px solid var(--borda); background: var(--superficie); color: var(--texto); font: 600 14px var(--fonte); text-decoration: none; cursor: pointer; padding: 0 12px; }
.btn-app.primario { background: var(--app-cor); border-color: var(--app-cor); color: #fff; }
.btn-app:disabled { opacity: .6; }
.vazio-app { text-align: center; padding: 28px 12px; }
.vazio-app .bola { width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--app-cor) 12%, transparent); color: var(--app-cor); display: grid; place-items: center; margin: 0 auto 12px; font-size: 24px; }
.vazio-app b { display: block; font-size: 16px; }
.vazio-app span { color: var(--texto-2); font-size: 14px; }
.pix-codigo { width: 100%; font: 13px var(--mono); padding: 12px; border-radius: 10px; border: 1px solid var(--borda); background: var(--superficie-2); color: var(--texto); word-break: break-all; resize: none; min-height: 110px; }
.pix-qr { display: block; width: 220px; height: 220px; margin: 6px auto 12px; background: #fff; padding: 10px; border-radius: 12px; }

/* ofertas e planos */
.plano-card .nome { font-weight: 700; font-size: 16px; }
.plano-card .vel { margin: 8px 0 2px; color: var(--texto-3); }
.plano-card .vel b { font-size: 38px; color: var(--texto); letter-spacing: -0.03em; }
.plano-card .preco { color: var(--app-cor); font-weight: 800; font-size: 19px; }
.plano-card .preco span { color: var(--texto-3); font-weight: 400; font-size: 13px; }
.plano-card p { color: var(--texto-2); font-size: 14px; margin: 10px 0 14px; }
.plano-card .btn-app { width: 100%; }
.plano-card.popular { border: 2px solid var(--app-cor); }
.oferta-card img { width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 18px 18px 0 0; display: block; }
.secao-titulo { font-size: 13px; font-weight: 700; color: var(--texto-2); margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .04em; }

/* wifi */
.equip { display: block; text-decoration: none; color: inherit; }
.equip .topo-eq { display: flex; justify-content: space-between; gap: 10px; }
.equip b { font-size: 16px; }
.equip .on { font-size: 13px; color: var(--texto-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.equip .on i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.equip .on.off i { background: var(--ruim); }
.equip .modelo { color: var(--texto-2); font-size: 14px; margin-top: 8px; }
.equip .login { color: var(--texto-3); font-size: 12px; }
.equip .ger { color: var(--app-cor); font-weight: 700; font-size: 14px; margin-top: 12px; display: block; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--borda); margin: 14px -18px 0; }
.mini div { padding: 12px 6px; text-align: center; border-left: 1px solid var(--borda); }
.mini div:first-child { border-left: 0; }
.mini b { display: block; font-size: 16px; }
.mini span { font-size: 12px; color: var(--texto-3); }
.rede-cliente { padding: 14px 0; border-top: 1px solid var(--borda); }
.rede-cliente .linha { display: flex; align-items: center; gap: 12px; }
.rede-cliente .icone { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--app-cor) 12%, transparent); color: var(--app-cor); display: grid; place-items: center; flex: none; }
.rede-cliente .icone svg { width: 20px; height: 20px; }
.rede-cliente .nome { font-weight: 650; word-break: break-all; }
.rede-cliente .banda { font-size: 13px; color: var(--texto-3); }
.rede-cliente form { margin-top: 14px; padding: 14px; background: var(--superficie-2); border-radius: 12px; }
.rede-cliente form .botoes { display: flex; justify-content: flex-end; }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 84px; }
.campo-senha button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 30px; }

/* perfil */
.avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--app-cor); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 700; margin: 8px auto 12px; }
.perfil-nome { text-align: center; margin-bottom: 22px; }
.perfil-nome b { display: block; font-size: 19px; text-transform: uppercase; }
.perfil-nome span { color: var(--texto-2); font-size: 14px; }
.segmento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--superficie); border-radius: 16px; padding: 6px; border: 1px solid var(--borda); }
.segmento button { border: 0; background: none; padding: 13px 6px; border-radius: 12px; font: 600 14px var(--fonte); color: var(--texto-2); cursor: pointer; }
.segmento button.ativo { background: var(--app-cor); color: #fff; }
.lista-app { background: var(--superficie); border-radius: 16px; border: 1px solid var(--borda); overflow: hidden; }
.lista-app > * { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-top: 1px solid var(--borda); text-decoration: none; color: inherit; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; cursor: pointer; }
.lista-app > *:first-child { border-top: 0; }
.lista-app .em { width: 40px; height: 40px; border-radius: 11px; background: var(--superficie-2); display: grid; place-items: center; font-size: 19px; flex: none; }
.lista-app b { display: block; font-size: 15px; }
.lista-app span.d { font-size: 13px; color: var(--texto-3); }
.lista-app .seta { margin-left: auto; color: var(--texto-3); }
.dado { padding: 12px 0; border-top: 1px solid var(--borda); }
.dado:first-child { border-top: 0; padding-top: 0; }
.dado small { display: block; font-size: 12px; color: var(--texto-3); font-weight: 600; }
.dado div { font-weight: 600; word-break: break-word; }
.sair-app { width: 100%; margin-top: 18px; background: var(--superficie); border: 1px solid var(--borda); color: var(--ruim); font: 600 16px var(--fonte); padding: 16px; border-radius: 16px; cursor: pointer; }

/* navegação de baixo */
.nav-app { position: fixed; left: 0; right: 0; bottom: 0; background: var(--superficie); border-top: 1px solid var(--borda); padding: 6px 0 calc(env(safe-area-inset-bottom) + 6px); z-index: 30; }
.nav-app div { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav-app a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; text-decoration: none; color: var(--texto-3); font-size: 11px; font-weight: 500; }
.nav-app a .em { font-size: 21px; line-height: 1; filter: grayscale(.2); }
.nav-app a.ativo { color: var(--app-cor); font-weight: 700; }

/* login */
.login-app { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-app .caixa { width: min(400px, 100%); }
.login-app .logo-login { display: block; max-height: 70px; max-width: 70%; margin: 0 auto 18px; object-fit: contain; }
.login-app h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.login-app .sub { text-align: center; }
.login-app .btn-app { width: 100%; min-height: 48px; font-size: 15px; }
.login-app input { min-height: 48px; font-size: 16px; }
.dica-instalar { margin-top: 14px; font-size: 13px; color: var(--texto-3); text-align: center; }

.app-cliente .avisos { bottom: calc(env(safe-area-inset-bottom) + 84px); left: 16px; right: 16px; max-width: none; }
.c.clicavel.contrato-item { display: flex; }
.ssid-partes { display: flex; align-items: stretch; border: 1px solid var(--borda); border-radius: 9px; overflow: hidden; background: var(--superficie); }
.ssid-partes:focus-within { border-color: var(--app-cor); outline: 3px solid color-mix(in srgb, var(--app-cor) 25%, transparent); }
.ssid-partes .fixo { display: flex; align-items: center; padding: 0 10px; background: var(--superficie-2); color: var(--texto-2); font-size: 14px; white-space: pre; border-right: 1px solid var(--borda); }
.ssid-partes .fixo:last-child { border-right: 0; border-left: 1px solid var(--borda); }
.ssid-partes input { border: 0; border-radius: 0; min-width: 0; flex: 1; outline: none !important; }

/* chat do suporte (canal API do Chatwoot) */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 290px); min-height: 220px; overflow-y: auto; padding: 4px 2px 8px; }
.balao { max-width: 82%; padding: 9px 12px 6px; border-radius: 16px; font-size: 15px; line-height: 1.4; word-wrap: break-word; box-shadow: 0 1px 2px rgb(16 24 40 / 6%); }
.balao.meu { align-self: flex-end; background: var(--app-cor); color: #fff; border-bottom-right-radius: 5px; }
.balao.deles { align-self: flex-start; background: var(--superficie); border: 1px solid var(--borda); border-bottom-left-radius: 5px; }
.balao small { display: block; font-size: 11px; font-weight: 700; color: var(--app-cor); margin-bottom: 2px; }
.balao time { display: block; font-size: 10px; opacity: .7; text-align: right; margin-top: 3px; }
.balao img { max-width: 100%; border-radius: 10px; margin-top: 4px; display: block; }
.balao a { color: inherit; }
.chat-envio { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 62px); display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px; background: var(--fundo); max-width: 560px; margin: 0 auto; z-index: 25; }
.chat-envio textarea { flex: 1; resize: none; min-height: 46px; max-height: 120px; border-radius: 14px; padding: 12px 14px; font-size: 16px; }
.chat-envio .btn-app { width: 46px; min-height: 46px; padding: 0; font-size: 18px; border-radius: 14px; }

/* notificações e avisos */
.item-notif { display: flex; align-items: center; gap: 14px; padding: 15px 16px; }
.item-notif .em { width: 40px; height: 40px; border-radius: 11px; background: var(--superficie-2); display: grid; place-items: center; font-size: 19px; flex: none; }
.item-notif b { display: block; font-size: 15px; }
.item-notif .d { font-size: 13px; color: var(--texto-3); display: block; }
.aviso-card { border-left: 4px solid var(--app-cor); }
.aviso-card .topo-aviso { display: flex; gap: 12px; align-items: flex-start; }
.aviso-card .em { font-size: 22px; line-height: 1.2; }
.aviso-card b { display: block; font-size: 15px; }
.aviso-card small { color: var(--texto-3); font-size: 12px; }
.aviso-card p { margin: 10px 0 0; font-size: 14px; color: var(--texto-2); }

/* ícones dentro dos botões do app */
.btn-app svg { width: 18px; height: 18px; flex: none; }
.btn-reiniciar { min-height: 42px; padding: 0 18px; }
.item-botao { width: 100%; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.item-botao:active { background: var(--superficie-2); }
.item-botao:disabled { opacity: .7; cursor: progress; }

/* página de instalação */
.instalar { max-width: 440px; margin: 0 auto; min-height: 100vh; padding: 40px 16px; display: flex; flex-direction: column; justify-content: center; }
.topo-instalar { text-align: center; margin-bottom: 18px; }
.topo-instalar img { max-height: 70px; max-width: 70%; object-fit: contain; margin-bottom: 14px; }
.topo-instalar h1 { font-size: 24px; margin-bottom: 6px; }
.caixa-instalar h3 { font-size: 16px; margin-bottom: 12px; }
.caixa-instalar p { color: var(--texto-2); font-size: 14px; margin: 0 0 14px; }
.passos-instalar { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.passos-instalar li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--texto-2); }
.passos-instalar .num { width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--app-cor) 15%, transparent); color: var(--app-cor); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.passos-instalar b { color: var(--texto); }
.icone-share { display: inline-block; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.link-instalar { font: 13px var(--mono); background: var(--superficie-2); border-radius: 10px; padding: 10px 12px; word-break: break-all; margin-bottom: 10px; }

/* propaganda ao abrir o app */
.propaganda { position: fixed; inset: 0; z-index: 100; background: #000; display: flex; align-items: center; justify-content: center; animation: subir .2s ease-out; }
.propaganda.saindo { opacity: 0; transition: opacity .2s; }
.propaganda .imagem-prop { display: block; width: 100%; height: 100%; }
.propaganda img { width: 100%; height: 100%; object-fit: contain; display: block; }
.propaganda .barras { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.propaganda .barras i { flex: 1; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 35%); overflow: hidden; }
.propaganda .barras i b { display: block; height: 100%; width: 0; background: #fff; }
.propaganda .barras i.feita b { width: 100%; }
.propaganda .barras i.atual b { animation: encher linear forwards; }
@keyframes encher { from { width: 0; } to { width: 100%; } }
.propaganda .pular { position: absolute; top: calc(env(safe-area-inset-top) + 24px); right: 12px; z-index: 2; border: 0; border-radius: 99px; background: rgb(0 0 0 / 55%); color: #fff; font: 600 14px var(--fonte); padding: 8px 14px; cursor: pointer; }

/* Tela de abertura do app (logo + título do provedor) */
#abertura { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; transition: opacity .3s ease; }
#abertura:empty { display: none; }
#abertura img { max-width: min(62vw, 260px); max-height: 30vh; object-fit: contain; }
#abertura b { font-size: 1.25rem; font-weight: 700; letter-spacing: .2px; }
#abertura .abertura-giro { width: 26px; height: 26px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; opacity: .6; animation: abertura-gira .8s linear infinite; }
#abertura.saindo { opacity: 0; pointer-events: none; }
@keyframes abertura-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #abertura .abertura-giro { animation: none; } }

/* Sino de avisos no topo (entre o nome e a logo) */
.app-topo .ola { flex: 1; min-width: 0; }
.sino { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--texto-2); background: var(--superficie); border: 1px solid var(--borda); text-decoration: none; }
.sino.tem { color: var(--app-cor, #2563eb); }
.sino.tem svg { animation: sino-balanca 1.6s ease-in-out 2; transform-origin: 50% 10%; }
.sino-qtd { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; border: 2px solid var(--fundo); }
@keyframes sino-balanca { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .sino.tem svg { animation: none; } }
.aviso-card.novo { border-left: 4px solid var(--app-cor, #2563eb); }

/* Aparelhos conectados no roteador */
.mini .clicavel-mini { cursor: pointer; background: none; border: 0; font: inherit; color: inherit; padding: 0; display: flex; flex-direction: column; align-items: center; width: 100%; }
.mini .clicavel-mini b { color: var(--app-cor, #2563eb); text-decoration: underline; text-underline-offset: 3px; }
.conectado { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--borda); }
.conectado:first-of-type { border-top: 0; }
.conectado .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--app-cor, #2563eb) 12%, transparent); font-size: 18px; flex: none; }
.conectado .info { flex: 1; min-width: 0; }
.conectado .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conectado .info small { color: var(--texto-2); font-size: 12px; }
.conectado .btn-app { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* Página de instalar: um botão grande */
.btn-instalar { width: 100%; min-height: 54px; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.ajuda-instalar { margin-top: 14px; }

/* Plano com upgrade disponível: verde e clicável */
.plano-upgrade { text-decoration: none; text-align: right; }
.plano-upgrade b { color: #16a34a; }
.plano-upgrade span { color: #16a34a !important; font-weight: 600; }

/* Chat: anexar arquivo */
.chat-envio { flex-wrap: wrap; }
.btn-clipe { width: 42px; min-height: 46px; display: grid; place-items: center; font-size: 20px; border-radius: 14px; background: var(--superficie); border: 1px solid var(--borda); cursor: pointer; flex: none; }
.chat-anexo { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--superficie); border: 1px solid var(--borda); font-size: 14px; }
.chat-anexo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-anexo button { border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--texto-2); }
.balao video { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 6px; }
.balao .anexo-arquivo { display: inline-block; margin-top: 6px; font-weight: 600; word-break: break-all; }

/* Ofertas: plano mais rápido que o do cliente em verde */
.plano-card.plano-maior { border: 2px solid #16a34a; }
.plano-card.plano-maior .vel b { color: #16a34a; }
.selo-maior, .selo-atual { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-bottom: 6px; }
.selo-maior { background: #dcfce7; color: #15803d; }
.selo-atual { background: var(--superficie-2, #eef0f4); color: var(--texto-2); }

/* Avisos: fechado (título + começo do texto) / aberto (texto todo + excluir) */
.aviso-card { border-left-color: var(--borda); padding-top: 12px; padding-bottom: 12px; }
.aviso-card.novo { border-left-color: var(--app-cor, #2563eb); }
.aviso-card .topo-aviso { width: 100%; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.aviso-card .topo-aviso > div { flex: 1; min-width: 0; }
.aviso-card .seta-aviso { color: var(--texto-3); font-size: 18px; line-height: 1; transition: transform .2s; }
.aviso-card.aberto .seta-aviso { transform: rotate(180deg); }
.aviso-card p { margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.aviso-card.aberto p { display: block; margin-top: 10px; }
.aviso-card .acoes-aviso { display: none; margin-top: 12px; text-align: right; }
.aviso-card.aberto .acoes-aviso { display: block; }
.aviso-card .acoes-aviso .btn-app { min-height: 34px; font-size: 13px; padding: 0 12px; }


/* Topo: nome numa linha só, ao lado do sino e da logo */
.app-topo { gap: 10px; }
.app-topo .ola { font-size: 13px; }
.app-topo .ola b { font-size: clamp(12px, 3.7vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topo img { max-width: 42%; }

/* Logo em branco no tema escuro */
:root[data-theme="dark"] .app-topo img, :root[data-theme="dark"] .logo-login, :root[data-theme="dark"] .cp-topo img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-topo img, :root:not([data-theme="light"]) .logo-login { filter: brightness(0) invert(1); }
}

/* Banners: imagem inteira, sem cortar os cantos */
.carrossel .faixa { align-items: flex-start; }
.carrossel img { aspect-ratio: auto; height: auto; object-fit: contain; }

/* Sem seleção de texto ao tocar (parece app); campos de digitar e códigos continuam selecionáveis */
body.app-cliente { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body.app-cliente input, body.app-cliente textarea, body.app-cliente .selecionavel, body.app-cliente [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* Rodapé POWERED BY iConectApp's */
.powered { text-align: center; margin: 26px 0 8px; color: var(--texto-3); }
.powered small { display: block; font-size: 10px; letter-spacing: .25em; font-weight: 600; }
.powered span { display: inline-block; margin-top: 4px; font-size: 16px; font-weight: 500; color: var(--texto-3); letter-spacing: .01em; }
.powered span b { font-weight: 800; color: var(--texto-2); }

/* Comprovante de pagamento */
.comprovante-fundo { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.comprovante { background: #fff; color: #111827; width: 100%; max-width: 420px; max-height: 92vh; overflow: auto; border-radius: 18px; padding: 22px; -webkit-user-select: text; user-select: text; }
.cp-topo { text-align: center; margin-bottom: 14px; }
.cp-topo img { max-height: 46px; max-width: 70%; object-fit: contain; }
.cp-ok { width: 48px; height: 48px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; font-size: 24px; margin: 12px auto 6px; }
.cp-topo h2 { font-size: 17px; margin: 0; }
.cp-valor { font-size: 26px; font-weight: 800; margin-top: 4px; }
.cp-linha { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed #e5e7eb; font-size: 14px; }
.cp-linha span { color: #6b7280; }
.cp-linha b { text-align: right; }
.cp-rodape { font-size: 11px; color: #6b7280; text-align: center; margin: 14px 0 0; }
.cp-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
@media print {
  body.imprimindo-comprovante > *:not(.comprovante-fundo) { display: none !important; }
  body.imprimindo-comprovante .comprovante-fundo { position: static; background: none; padding: 0; }
  body.imprimindo-comprovante .comprovante { max-height: none; box-shadow: none; }
  body.imprimindo-comprovante .cp-botoes { display: none; }
}

/* Combos (plano + SVA) */
.combo-card .nome { font-weight: 700; margin-bottom: 4px; }
.combo-topo { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.combo-topo .vel { font-size: 15px; }
.combo-topo .vel b { font-size: 30px; font-weight: 800; }
.combo-topo .mais { font-size: 22px; font-weight: 700; color: var(--texto-3); }
.combo-topo img { height: 34px; max-width: 120px; object-fit: contain; }
.combo-topo .sva-nome { font-size: 18px; }
.combo-itens { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; font-size: 14px; }
.combo-itens li { display: flex; justify-content: space-between; gap: 10px; color: var(--texto-2); border-bottom: 1px dashed var(--borda); padding-bottom: 4px; }
.combo-itens b { color: var(--texto); }

/* Ofertas: abas Internet / Combos (toque ou deslize) */
.abas-ofertas { --aba: 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--superficie); border: 1px solid var(--borda); border-radius: 14px; padding: 4px; margin: 18px 0 14px; scroll-margin-top: 12px; }
.abas-ofertas button { position: relative; z-index: 1; border: 0; background: none; padding: 11px; font: 700 15px var(--fonte); color: var(--texto-2); cursor: pointer; transition: color .2s; }
.abas-ofertas button.ativo { color: #fff; }
.abas-ofertas .marcador { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--app-cor); transform: translateX(calc(var(--aba) * 100%)); transition: transform .25s ease; }
.paineis-ofertas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; transition: height .2s ease; align-items: flex-start; }
.paineis-ofertas::-webkit-scrollbar { display: none; }
.painel-oferta { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
/* descrição em tópicos */
.topicos { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 7px; font-size: 14.5px; color: var(--texto-2); }
.topicos li { position: relative; padding-left: 26px; }
.topicos li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--app-cor) 14%, transparent); color: var(--app-cor); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .abas-ofertas .marcador, .paineis-ofertas { transition: none; } }
