:root {
  /* Base — azul-escuro profundo (neon/tela) */
  --bg: #0b1120;
  --bg2: #101a33;
  --card: #16203d;
  --card2: #1d2a4f;
  --line: #2a3a63;
  --text: #eef2ff;
  --muted: #94a2c8;

  /* Marca — verde-esmeralda (ícone do app) */
  --accent: #22c55e;
  --accent2: #4ade80;
  --accent-deep: #16a34a;

  /* Info/secundária — teal (harmoniza com o verde) */
  --blue: #2dd4bf;

  /* Semânticos */
  --amber: #f5b301;   /* Premium / Favoritos */
  --premium: #f5b301; /* sinônimo, coeso */
  --red: #ef4444;     /* erros */
  --shadow: 0 8px 22px rgba(0, 0, 0, .38);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  padding-bottom: 84px; -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { letter-spacing: .2px; }
.mut { color: var(--muted); }
a { color: var(--blue); }

/* ---------- topo ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: linear-gradient(180deg,#101a33,#0b1120); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { display: inline-flex; width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(34,197,94,.35)); }
.brand .logo svg { width: 100%; height: 100%; display: block; }
.nav .nav-ico { display: inline-flex; width: 22px; height: 22px; }
.nav .nav-ico svg { width: 100%; height: 100%; display: block; }
.consent-head .logo36 { display: inline-flex; width: 44px; height: 44px; }
.consent-head .logo36 svg { width: 100%; height: 100%; display: block; }
.hero-icon svg { display: block; }
.brand h1 { font-size: 20px; font-weight: 900; }
.brand h1 span { color: var(--accent2); }
.top-user { font-size: 13px; color: var(--muted); }

/* ---------- app ---------- */
.app { max-width: 760px; margin: 0 auto; padding: 20px 16px; }
.view { display: none; }
.view.active { display: block; }
.page-head h2 { font-size: 24px; }
.page-head .mut { font-size: 13px; margin-top: 3px; }

/* ---------- estatísticas ---------- */
.resumo-stats { display: flex; gap: 12px; margin: 18px 0 6px; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.stat b { display: block; font-size: 30px; color: var(--accent2); }
.stat span { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* ---------- filtros ---------- */
.filtros { display: flex; gap: 10px; margin: 14px 0; }
.flabel { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; }
select, input { background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; width: 100%; }
select:focus, input:focus { outline: none; border-color: var(--accent); }

/* ---------- cards ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card-conc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.card-conc.destaque { border-color: var(--accent); }
.c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.c-top-right { display: flex; align-items: center; gap: 8px; }
.c-orgao { font-size: 12px; color: var(--muted); }
.c-esfera { color: var(--blue); font-weight: 600; }
.c-score { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.c-score span { color: var(--accent2); font-weight: 900; font-size: 22px; }
.c-score small { color: var(--muted); font-size: 11px; }
.star { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 34px; height: 34px; font-size: 18px; cursor: pointer; line-height: 1; }
.star:hover { color: var(--amber); border-color: var(--amber); }
.star.on { color: var(--amber); border-color: var(--amber); background: rgba(245,158,11,.12); }
.flabel.check { display: flex; flex-direction: row; align-items: center; gap: 6px; text-transform: none; font-size: 13px; padding-top: 22px; color: var(--text); }
.flabel.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.btn.on { color: var(--amber); border-color: var(--amber); }
.c-cargo { font-size: 18px; margin: 8px 0 6px; }
.c-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text); margin-bottom: 12px; }
.c-bar { height: 8px; background: var(--card2); border-radius: 6px; overflow: hidden; }
.c-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.c-motivo { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pill { background: var(--card2); color: var(--accent2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 11px; }
.c-comp { display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 12px; } .c-comp b { color: var(--text); }
.c-actions { display: flex; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.upgrade-banner { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: linear-gradient(160deg,#1d2a4f,#16203d); border: 1px solid var(--premium); border-radius: 14px; padding: 14px; font-size: 13px; margin-bottom: 14px; }
.upgrade-banner b { color: var(--premium); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--card2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #04140a; }
.btn.ghost { background: transparent; }
.btn.primary:hover { filter: brightness(1.06); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 30px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-top: 20px; }
.hero-icon { font-size: 44px; }
.hero h2 { margin: 12px 0 8px; }
.hero p { color: var(--muted); max-width: 480px; margin: 0 auto 18px; line-height: 1.5; }

/* ---------- perfil ---------- */
.leaf { color: var(--accent2); font-size: 13px; margin: 8px 0 16px; }
.import-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.import-box b { font-size: 14px; }
.import-box p { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.import-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-status { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.pdf-status.ok { color: var(--accent2); }
.pdf-status.err { color: var(--red); }
.spin { width: 14px; height: 14px; border: 2px solid var(--muted); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form label > span { text-transform: uppercase; font-size: 11px; letter-spacing: .4px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chiparea { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.chiparea.on { background: var(--accent); color: #04140a; border-color: var(--accent); font-weight: 700; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ---------- conta ---------- */
.tier { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 14px 0; }
.tier.premium { border-color: var(--premium); background: linear-gradient(160deg, #1d2a4f, #16203d); }
.tier-badge { display: inline-block; font-weight: 900; color: var(--premium); margin-bottom: 8px; }
.tier p { color: var(--muted); font-size: 13px; }
.tier-price { margin-top: 10px; font-size: 16px; } .tier-price b { font-size: 26px; color: var(--accent2); } .tier-price span { color: var(--muted); }
.table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.trow { display: grid; grid-template-columns: 1fr 60px 60px; gap: 8px; padding: 11px 12px; font-size: 13px; border-bottom: 1px solid var(--line); align-items: center; }
.trow.head { background: var(--card2); color: var(--muted); font-weight: 700; }
.trow:last-child { border-bottom: none; }
.trow .ok { color: var(--accent2); text-align: center; font-weight: 700; }
.trow .mut { text-align: center; }
.fine { color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ---------- notificações / sino ---------- */
.bell { position: relative; background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; margin-right: 8px; }
.bell-badge { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; padding: 0 3px; }
.notif-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 16px; }
.notif-card h3 { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.notif-lock { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13px; color: var(--text); }
.notif-lock span { color: var(--muted); font-size: 12px; }
.switch-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 10px; cursor: pointer; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.digest { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.digest-window { font-size: 12px; color: var(--amber); margin-bottom: 2px; }
.dig-item { display: flex; align-items: center; gap: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.dig-item:hover { border-color: var(--accent); }
.dig-date { font-size: 12px; color: var(--muted); min-width: 56px; font-variant-numeric: tabular-nums; }
.dig-body { flex: 1; font-size: 13px; line-height: 1.4; }
.dig-body span { color: var(--muted); font-size: 12px; }
.dig-days { font-size: 11px; color: var(--accent2); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }

/* ---------- nav inferior ---------- */
.nav { position: fixed; bottom: 0; left: 0; right: 0; background: #101a33; border-top: 1px solid var(--line); display: flex; z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
.nav button { flex: 1; background: none; border: none; color: var(--muted); font-size: 12px; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.nav button span { font-size: 11px; }
.nav button.active { color: var(--accent2); }
.nav button.active span { font-weight: 700; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,7,18,.7); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: 100%; max-width: 760px; max-height: 90vh; overflow-y: auto; background: var(--bg2); border-radius: 22px 22px 0 0; padding: 20px; }
.m-head { display: flex; justify-content: space-between; align-items: center; }
.m-orgao { font-size: 13px; color: var(--muted); }
.m-esfera { margin-left: 8px; color: var(--blue); font-size: 12px; }
.m-close { background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 50%; width: 34px; height: 34px; font-size: 16px; cursor: pointer; }
.m-tag { display: inline-block; margin: 8px 0 2px; font-size: 11px; color: var(--accent2); background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.m-cargo { font-size: 20px; margin: 8px 0 4px; }
.m-score { font-size: 14px; } .m-score b { color: var(--accent2); font-size: 20px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.m-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.m-grid span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.m-grid b { font-size: 14px; }
.c-status { color: var(--accent2); }
.m-motivo { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.m-actions a.btn, .m-actions .btn { text-decoration: none; }
.m-edital { margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.reader-bar { background: var(--card2); padding: 10px 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.reader-bar .mut { font-size: 11px; }
.reader-body { padding: 16px; background: var(--card); }
.reader-body p { margin-bottom: 8px; color: var(--text); font-size: 14px; line-height: 1.5; }
.reader-body h4 { font-size: 13px; color: var(--accent2); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .4px; }
.reader-body h4:first-child { margin-top: 0; }
.reader-body ul { margin: 0 0 4px; padding-left: 18px; }
.reader-body li { color: var(--text); font-size: 14px; margin-bottom: 4px; }
.m-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.m-actions .btn.ghost { border: 1px solid var(--line); }

/* ---------- porta de consentimento ---------- */
.consent { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.consent-backdrop { position: absolute; inset: 0; background: rgba(4,7,18,.88); backdrop-filter: blur(4px); }
.consent-card { position: relative; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); margin: 16px; }
.consent-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.logo36 { font-size: 34px; }
.consent-head h2 { font-size: 20px; font-weight: 900; } .consent-head h2 span { color: var(--accent2); }
.consent-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.consent-ver { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--card2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; }
.consent-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.consent-body::-webkit-scrollbar { width: 8px; } .consent-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.consent-body .resumo { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text); margin-bottom: 14px; }
.consent-body h3 { font-size: 14px; color: var(--accent2); margin: 16px 0 6px; }
.consent-body p { font-size: 13px; color: #d3dbef; line-height: 1.55; margin-bottom: 8px; }
.consent-foot { border-top: 1px solid var(--line); padding: 14px 18px; }
.consent-legal { font-size: 11px; color: var(--amber); margin-bottom: 10px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text); cursor: pointer; margin-bottom: 12px; }
.consent-check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 1px; }
.consent-check span { line-height: 1.4; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
.consent-actions .btn.primary:disabled { opacity: .5; cursor: not-allowed; }
/* desabilitar interação com o app enquanto mostra o consent */
body.consent-open .app, body.consent-open .nav, body.consent-open .top { filter: blur(3px); pointer-events: none; user-select: none; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color: #04140a; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 999px; opacity: 0; transition: all .3s; z-index: 80; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) { .frow { grid-template-columns: 1fr; } .resumo-stats { gap: 8px; } }

/* ---------- PIX (assinatura) ---------- */
.pix-card .m-cargo { margin-bottom: 4px; }
.pix-qr { display: flex; justify-content: center; margin: 8px 0; }
.pix-qr svg { border-radius: 16px; box-shadow: var(--shadow); background: #fff; }
.pix-card textarea {
  width: 100%; background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; font-family: inherit; resize: vertical; min-height: 64px;
}
.pix-card textarea:focus { outline: none; border-color: var(--accent); }
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.m-actions .btn { flex: 1; min-width: 140px; }

/* ---------- relatar problema / ajuda ---------- */
.ajuda-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 16px; }
.ajuda-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ajuda-row b { font-size: 14px; }
.ajuda-row p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.modal-card textarea {
  width: 100%; background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: inherit; resize: vertical; min-height: 90px;
}
.modal-card textarea:focus, .modal-card input:focus { outline: none; border-color: var(--accent); }
.modal-card label > span { text-transform: uppercase; font-size: 11px; letter-spacing: .4px; }
