/* Área do Cliente FSA Designer — mesmas cores do site principal */
:root {
  --bg: #f6f8fc; --surface: #fff; --line: #e4e9f2; --line-strong: #cfd8e6;
  --text: #0f2342; --muted: #5d6b82; --blue: #1f5eff; --blue-dark: #1748c7; --blue-soft: #eaf1ff;
  --ok: #0f8a5f; --ok-soft: #e3f6ee; --erro: #c62f3b; --erro-soft: #fdecee; --alerta: #a86400; --alerta-soft: #fff4dc;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,35,66,.04), 0 8px 24px -12px rgba(15,35,66,.10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
a { color: var(--blue); }
small, .muted { color: var(--muted); }

/* topo */
.topo { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topo-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 600 1rem "Space Grotesk", sans-serif; margin-right: auto; }
.marca img { width: 34px; height: 34px; }
.marca small { display: block; font: 500 .72rem Inter, sans-serif; color: var(--muted); letter-spacing: .02em; }
.menu { display: flex; align-items: center; gap: 4px; }
.menu > a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.menu > a:hover { color: var(--text); background: var(--bg); }
.menu > a.ativo { color: var(--blue); background: var(--blue-soft); }
.usuario { margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 1.2rem; padding: 4px 10px; cursor: pointer; color: var(--text); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .menu-aberto .menu { display: flex; }
  .usuario { margin: 8px 0 0; padding: 10px 12px 0; border-left: 0; border-top: 1px solid var(--line); }
}
.aviso-admin { background: var(--alerta-soft); color: var(--alerta); text-align: center; padding: 8px 16px; font-size: .9rem; }

.conteudo { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.conteudo-solto { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.rodape { text-align: center; color: var(--muted); font-size: .82rem; padding: 18px 16px 26px; }
.rodape a { color: inherit; }

/* blocos */
.cartao { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; min-width: 0; }
.cartao > h2:first-child, .cartao-topo h2 { margin-bottom: 14px; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cartao-topo h2 { margin: 0; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.cabecalho h1 { margin: 0; }
.cabecalho p { margin: 4px 0 0; color: var(--muted); }
.grade { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grade-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grade-2 { grid-template-columns: 1fr; } }

.numeros { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); margin-bottom: 22px; }
.numero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.numero span { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; }
.numero strong { display: block; font: 600 1.55rem "Space Grotesk", sans-serif; margin-top: 4px; font-variant-numeric: tabular-nums; }
.numero.erro strong { color: var(--erro); } .numero.ok strong { color: var(--ok); } .numero.alerta strong { color: var(--alerta); }

/* tabelas */
.tabela-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.acoes { text-align: right; white-space: nowrap; }
.vazio { color: var(--muted); text-align: center; padding: 26px 10px; }

/* selos */
.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.selo-ok { background: var(--ok-soft); color: var(--ok); }
.selo-erro { background: var(--erro-soft); color: var(--erro); }
.selo-alerta { background: var(--alerta-soft); color: var(--alerta); }
.selo-info { background: var(--blue-soft); color: var(--blue); }
.selo-neutro { background: #eef1f6; color: var(--muted); }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); color: #fff; border: 1px solid var(--blue);
  padding: 9px 18px; border-radius: 999px; font: 500 .92rem Inter, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-sec { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-sec:hover { background: var(--bg); border-color: var(--line-strong); }
.btn-perigo { background: var(--surface); color: var(--erro); border-color: #f2c4c8; }
.btn-perigo:hover { background: var(--erro-soft); border-color: var(--erro); }
.btn-ok { background: var(--ok); border-color: var(--ok); } .btn-ok:hover { background: #0b6f4c; border-color: #0b6f4c; }
.btn-p { padding: 5px 12px; font-size: .84rem; }
.btn-grande { padding: 13px 24px; font-size: 1rem; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* formulários */
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form .largo { grid-column: 1 / -1; }
label { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 5px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 6px 0 0; accent-color: var(--blue); }
label.check { display: flex; align-items: center; color: var(--text); font-weight: 400; }
textarea { min-height: 80px; resize: vertical; }
.dica { font-size: .8rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filtros label { flex: 1 1 160px; }

.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-erro { background: var(--erro-soft); color: var(--erro); }
.flash-info { background: var(--blue-soft); color: var(--blue); }

/* login */
.caixa-login { width: 100%; max-width: 400px; }
.caixa-login .logo { display: block; width: 64px; margin: 0 auto 14px; }
.caixa-login h1 { text-align: center; font-size: 1.5rem; }
.caixa-login .sub { text-align: center; color: var(--muted); margin: -4px 0 22px; }
.caixa-login form { display: grid; gap: 14px; }
.caixa-login .links { text-align: center; font-size: .9rem; margin-top: 16px; }

/* serviços do cliente */
.servico { display: grid; gap: 14px; }
.servico-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.servico-topo h2 { margin: 0 0 4px; }
.dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px 18px; margin: 0; }
.dados dt { font-size: .78rem; color: var(--muted); font-weight: 500; }
.dados dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }

/* planos */
.planos { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.plano { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plano.atual { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.plano h3 { font-size: 1.15rem; margin-bottom: 2px; }
.plano .preco { font: 600 1.9rem "Space Grotesk", sans-serif; margin: 10px 0 2px; }
.plano .preco small { font: 400 .9rem Inter, sans-serif; }
.plano ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plano li { padding: 5px 0 5px 24px; position: relative; font-size: .92rem; }
.plano li::before { content: "✓"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* fatura / pagamento */
.fatura-resumo { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.fatura-valor { font: 600 2.1rem "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.metodos { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin: 18px 0; }
.metodo { border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; background: var(--surface); font: 500 .95rem Inter, sans-serif; color: var(--text); width: 100%; }
.metodo:hover { border-color: var(--blue); background: var(--blue-soft); }
.metodo b { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.metodo span { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; }
.pix { display: grid; gap: 18px; grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.pix img { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
@media (max-width: 640px) { .pix { grid-template-columns: 1fr; justify-items: center; } }
.copia { display: flex; gap: 8px; }
.copia input { font: .82rem ui-monospace, monospace; }
.esperando { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; margin-top: 12px; }
.esperando::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--blue); border-radius: 50%; animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.linha-tempo { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.linha-tempo li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.linha-tempo li:last-child { border-bottom: 0; }
.linha-tempo time { color: var(--muted); font-size: .8rem; display: block; }
details.caixa { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-top: 14px; }
details.caixa summary { cursor: pointer; font-weight: 600; }
details.caixa[open] summary { margin-bottom: 14px; }

/* termos */
.termos h3 { margin: 22px 0 8px; font-size: 1.02rem; }
.termos p { margin: 0 0 10px; line-height: 1.65; }
.resumo-termos { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; font-size: .9rem; }
.resumo-termos ul { margin: 6px 0 0; padding-left: 20px; }
.resumo-termos li { margin: 3px 0; }
.aceite { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--text); font-weight: 500; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.aceite input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.aceite.erro { border-color: var(--erro); background: var(--erro-soft); }
.metodos.bloqueado .metodo { opacity: .45; }

/* monitor de acessos */
.grafico { position: relative; }
.grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafico .grade-linha { stroke: var(--line); stroke-width: 1; }
.grafico .eixo { fill: var(--muted); font: 11px Inter, sans-serif; font-variant-numeric: tabular-nums; }
.grafico .barra path { fill: var(--blue); }
.grafico .barra .alvo { fill: transparent; }
.grafico .barra:hover .alvo { fill: var(--blue-soft); }
.grafico .barra:hover path { fill: var(--blue-dark); }
.grafico-dica { position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--text); color: #fff; font-size: .8rem;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow); }
.tabela-dados { margin-top: 12px; font-size: .88rem; }
.tabela-dados summary { cursor: pointer; color: var(--muted); }
.ranking { list-style: none; margin: 0; padding: 0; }
.ranking li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; font-size: .9rem; border-radius: 8px; overflow: hidden; }
.ranking li + li { margin-top: 2px; }
.ranking i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-soft); z-index: 0; border-radius: 8px; }
.ranking-nome, .ranking-num { position: relative; z-index: 1; }
.ranking-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ranking-num { font-weight: 600; font-variant-numeric: tabular-nums; }
