:root {
  --navy: #0f2a4a;
  --navy-2: #173b66;
  --gold: #f5b923;
  --gold-2: #ffcf4d;
  --ink: #16202c;
  --muted: #5b6878;
  --line: #e2e7ee;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --err: #c0392b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 42, 74, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-2); }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* topo */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .2px; }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.brand small { display: block; font-weight: 500; font-size: 12px; opacity: .75; letter-spacing: 0; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav a, .nav button.link { color: #fff; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 10px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button.link:hover { background: rgba(255,255,255,.1); }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 12px; text-decoration: none; transition: transform .08s ease, box-shadow .2s ease, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost { background: #eef2f7; color: var(--navy); }
.btn-danger { background: #fbeaea; color: var(--err); }
.btn-small { padding: 7px 12px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.nav a.btn-gold { padding: 9px 16px; background: var(--gold); color: var(--navy); }
.nav a.btn-gold:hover { background: var(--gold-2); }

.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 6px 18px rgba(245, 185, 35, .45); }
.btn-gold:hover { background: var(--gold-2); box-shadow: 0 10px 26px rgba(245, 185, 35, .6); }

/* destaque boleto */
.boleto-cta {
  display: flex; align-items: center; gap: 18px; text-decoration: none;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--navy); border-radius: 20px; padding: 22px 26px;
  box-shadow: 0 14px 36px rgba(245, 185, 35, .45);
  border: 3px solid #fff3c4;
  transition: transform .15s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.boleto-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(245, 185, 35, .6); }
.boleto-cta .ico { flex: none; width: 64px; height: 64px; border-radius: 16px; background: var(--navy); color: var(--gold); display: grid; place-items: center; }
.boleto-cta .t1, .boleto-cta .t2 { display: block; }
.boleto-cta .t1 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 900; line-height: 1.1; }
.boleto-cta .t2 { font-size: 15px; font-weight: 600; opacity: .85; margin-top: 4px; }
.boleto-cta .arrow { margin-left: auto; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 22px; }
.boleto-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-100%); animation: brilho 3.5s ease-in-out infinite; }
@keyframes brilho { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .boleto-cta::after { animation: none; display: none; } }

.boleto-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: none; }
@media (max-width: 720px) { .boleto-float { display: inline-flex; } }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #27578f 0%, transparent 60%), var(--navy); color: #fff; padding: 56px 0 72px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); line-height: 1.05; margin: 0 0 14px; font-weight: 900; letter-spacing: -.5px; }
.hero p.lead { font-size: 18px; opacity: .85; max-width: 640px; margin: 0 0 28px; }
.hero .grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero .side { display: grid; gap: 14px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .actions .btn-outline { color: #fff; border-color: rgba(255,255,255,.7); }
@media (max-width: 860px) { .hero .grid { grid-template-columns: 1fr; } }

/* seções */
section.block { padding: 56px 0; }
h2.sec { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 8px; color: var(--navy); font-weight: 800; }
p.sec-sub { color: var(--muted); margin: 0 0 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card h3 { margin: 10px 0 6px; color: var(--navy); font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.card .badge-ico { width: 46px; height: 46px; border-radius: 12px; background: #eef3fa; color: var(--navy-2); display: grid; place-items: center; }

/* formulários */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; background: linear-gradient(180deg, var(--navy) 0 260px, var(--bg) 260px); }
.auth .card { width: 100%; max-width: 460px; padding: 32px; }
.auth h1 { margin: 0 0 6px; font-size: 28px; color: var(--navy); }
.auth p.sub { margin: 0 0 22px; color: var(--muted); }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; color: #243447; }
input, select, textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 11px; background: #fbfcfe; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(23, 59, 102, .12); background: #fff; }
textarea { min-height: 150px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.full { width: 100%; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.alert { padding: 12px 14px; border-radius: 11px; font-weight: 600; margin: 14px 0 0; font-size: 15px; }
.alert.ok { background: #e7f6ee; color: var(--ok); }
.alert.err { background: #fbeaea; color: var(--err); }
.alert.info { background: #eef3fa; color: var(--navy-2); }
[hidden] { display: none !important; }

/* painel */
.dash-head { background: var(--navy); color: #fff; padding: 30px 0 90px; }
.dash-head h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); }
.dash-head p { margin: 4px 0 0; opacity: .8; }
.dash-body { margin-top: -64px; padding-bottom: 60px; }
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.card h2 { margin: 0 0 4px; color: var(--navy); font-size: 21px; }
.card .sub { color: var(--muted); margin: 0 0 8px; font-size: 15px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border: 0; background: #e6ebf2; color: var(--navy); padding: 10px 16px; border-radius: 11px; font: inherit; font-weight: 700; cursor: pointer; }
.tabs button.on { background: var(--navy); color: #fff; }
.tabs .count { background: var(--gold); color: var(--navy); border-radius: 20px; padding: 0 8px; font-size: 13px; margin-left: 6px; }

.list { display: grid; gap: 12px; }
.item { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: #fff; }
.item-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.item h4 { margin: 0; font-size: 16px; color: var(--navy); }
.item .meta { font-size: 13px; color: var(--muted); }
.item .msg { white-space: pre-wrap; margin: 10px 0 0; font-size: 15px; }
.item .reply { margin-top: 10px; background: #f2f7f3; border-left: 4px solid var(--ok); padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; font-size: 15px; }
.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.pill.aberta, .pill.pendente { background: #fff3d6; color: var(--warn); }
.pill.em_andamento { background: #e6eefb; color: var(--navy-2); }
.pill.respondida, .pill.ativo { background: #e7f6ee; color: var(--ok); }
.pill.bloqueado { background: #fbeaea; color: var(--err); }
.pill.gestor { background: var(--navy); color: #fff; }

.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.doc .dico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.doc .dico.prestacao { background: #e6eefb; color: var(--navy-2); }
.doc .dico.extrato { background: #e7f6ee; color: var(--ok); }
.doc .dico.outro { background: #f1eefa; color: #5b3fa8; }
.doc .info { min-width: 0; flex: 1; }
.doc .info b { display: block; font-size: 15px; color: var(--navy); overflow-wrap: anywhere; }
.doc .info span { font-size: 13px; color: var(--muted); }
.doc .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.month-group h5 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 24px 10px; border: 2px dashed var(--line); border-radius: 13px; }

.drop { border: 2px dashed #b9c6d8; border-radius: 14px; padding: 22px; text-align: center; background: #f8fafd; cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { background: #eef3fa; border-color: var(--navy-2); }
.drop b { color: var(--navy); }
.drop input { display: none; }

table.users { width: 100%; border-collapse: collapse; font-size: 15px; }
table.users th, table.users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.users th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.table-scroll { overflow-x: auto; }

footer { background: #0b1f37; color: rgba(255,255,255,.75); padding: 30px 0; font-size: 14px; }
footer a { color: var(--gold); }
footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

@media (max-width: 640px) {
  .top .wrap { padding-top: 8px; padding-bottom: 8px; }
  .nav { margin-left: 0; width: 100%; }
  .boleto-cta { padding: 18px; gap: 14px; }
  .boleto-cta .ico { width: 50px; height: 50px; }
  .boleto-cta .arrow { display: none; }
  .card { padding: 20px; }
}
