:root{
  --bg:#0b1220;
  --card:#0f1a2f;
  --muted:#9fb0d0;
  --text:#e9eefc;
  --accent:#37d67a;
  --accent2:#4aa3ff;
  --danger:#ff4d6d;
  --warn:#ffd166;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius:18px;
  --border: 1px solid rgba(255,255,255,.08);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 700px at 20% 0%, #14254b 0%, var(--bg) 55%),
              radial-gradient(900px 500px at 90% 10%, rgba(55,214,122,.20) 0%, rgba(0,0,0,0) 60%);
  color:var(--text);
}

.wrap{max-width:1100px; margin:0 auto; padding:22px;}

.topbar{position:sticky; top:0; z-index:10; backdrop-filter: blur(10px); background: rgba(11,18,32,.55); border-bottom: var(--border);}
.topbar__inner{display:flex; align-items:center; justify-content:space-between; gap:18px;}
.brand{display:flex; align-items:center; gap:12px;}
.brand__logo{
  width:40px;height:40px; border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:grid; place-items:center; color:#071019; font-weight:900;
}
.brand__name{font-weight:800}
.brand__tag{font-size:12px; color:var(--muted)}

.pill{
  padding:10px 14px; border-radius:999px; border: var(--border);
  text-decoration:none; color:var(--text);
  background: rgba(255,255,255,.04);
}

.hero{display:grid; grid-template-columns: 1.15fr .85fr; gap:22px; margin-top:18px;}
@media (max-width: 940px){ .hero{grid-template-columns:1fr;} }

h1{font-size:44px; line-height:1.02; margin:10px 0 10px;}
.lead{color:var(--muted); font-size:16px; line-height:1.5; max-width:60ch;}
.trust{display:flex; gap:14px; flex-wrap:wrap; margin-top:18px}
.trust__item{font-size:13px; padding:8px 10px; border-radius:999px; border: var(--border); background: rgba(255,255,255,.03);}

.card{
  background: rgba(15,26,47,.72);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}

.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width: 520px){ .grid2{grid-template-columns:1fr;} }

.field label{display:block; font-size:12px; color:var(--muted); margin:10px 0 6px;}
.field input{
  width:100%; padding:12px 12px; border-radius:12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline:none;
}
.field input:focus{border-color: rgba(55,214,122,.55); box-shadow: 0 0 0 4px rgba(55,214,122,.12);}

/* ====== ADICIONADO (apenas para estilizar o select UF igual input) ====== */
.field select{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline:none;

  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(233,238,252,.85) 50%),
    linear-gradient(135deg, rgba(233,238,252,.85) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:34px;
}
.field select:focus{
  border-color: rgba(55,214,122,.55);
  box-shadow: 0 0 0 4px rgba(55,214,122,.12);
}
/* ====== fim do adicionado ====== */

.btn{
  border:none; cursor:pointer;
  padding:12px 14px; border-radius:14px;
  font-weight:800;
}
.btn--primary{
  width:100%;
  margin-top:14px;
  background: linear-gradient(135deg, var(--accent), #16b865);
  color:#071019;
}
.btn--dark{background: rgba(255,255,255,.10); color:var(--text); border: var(--border); text-decoration:none; display:inline-block;}
.btn--ghost{background: transparent; color:var(--text); border: var(--border);}

.meta{display:flex; align-items:center; gap:10px; margin-top:12px; color:var(--muted); font-size:12px;}
.meta__dot{width:8px;height:8px;border-radius:99px;background: var(--accent2); display:inline-block;}

.error{margin-top:12px; padding:10px 12px; border-radius:14px; border:1px solid rgba(255,77,109,.35); background: rgba(255,77,109,.12); color:#ffdbe2;}
.hint{color: rgba(159,176,208,.9);}

.hidden{display:none !important;}

.result{margin-top:26px;}
.result__header{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap;}
.muted{color:var(--muted);}

.panel{
  margin-top:14px;
  display:grid; grid-template-columns: 1fr 1fr; gap:14px;
}
@media (max-width: 940px){ .panel{grid-template-columns:1fr;} }
.panel__left,.panel__right{
  background: rgba(15,26,47,.58);
  border: var(--border);
  border-radius: var(--radius);
  padding:16px;
}

.thermo{display:grid; gap:10px; justify-items:center; margin-top:6px;}
.thermo__bar{
  width:26px; height:220px; border-radius:999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden; position:relative;
}
.thermo__fill{
  position:absolute; bottom:0; left:0; right:0;
  height:0%;
  background: linear-gradient(180deg, #4aa3ff, #37d67a);
  transition: height 700ms ease;
}
.thermo__labels{width:100%; display:flex; justify-content:space-between; font-size:12px; color:var(--muted)}

.scoreBox{margin-top:10px; text-align:center;}
.scoreBox__score{font-size:44px; font-weight:900;}
.nivelPill{
  display:inline-block; margin-top:6px;
  padding:8px 12px; border-radius:999px;
  border: var(--border);
  background: rgba(255,255,255,.04);
  font-weight:900;
}

.subscores{display:flex; gap:10px; justify-content:center; margin-top:12px; flex-wrap:wrap;}
.mini{border: var(--border); background: rgba(255,255,255,.03); padding:10px 12px; border-radius:14px; min-width:110px;}
.mini__k{font-size:12px; color:var(--muted)}
.mini__v{font-size:18px; font-weight:900; margin-top:4px;}

.alerts{margin-top:14px; display:grid; gap:10px;}
.alert{
  padding:12px; border-radius:14px; border: var(--border);
  background: rgba(255,255,255,.03);
}
.alert--warn{border-color: rgba(255,209,102,.35); background: rgba(255,209,102,.10);}
.alert--ok{border-color: rgba(55,214,122,.35); background: rgba(55,214,122,.10);}
.alert__t{font-weight:900; margin-bottom:4px;}
.alert__m{color:var(--muted); font-size:13px; line-height:1.35;}

.cards3{display:grid; gap:10px; grid-template-columns:1fr; }
.kpi{border: var(--border); background: rgba(255,255,255,.03); padding:12px; border-radius:14px;}
.kpi__k{font-size:12px; color:var(--muted)}
.kpi__v{font-size:24px; font-weight:900; margin-top:6px;}
.kpi__s{font-size:12px; color:rgba(159,176,208,.9); margin-top:6px;}

.chartCard{margin-top:12px; border: var(--border); background: rgba(255,255,255,.03); padding:12px; border-radius:14px;}
.chartCard__title{font-weight:900; margin-bottom:8px;}

.footer{margin:26px 0 10px; font-size:12px; color:rgba(159,176,208,.8);}

/* Modal / Card */
.modal{position:fixed; inset:0; display:grid; place-items:center; z-index:50;}
.modal__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.6);}
.modal__content{position:relative; width:min(640px, 92vw); background: rgba(15,26,47,.96); border: var(--border); border-radius: var(--radius); padding:14px; box-shadow: var(--shadow);}
.modal__head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px;}

.shareCard{
  border-radius:18px;
  padding:18px;
  background: linear-gradient(135deg, rgba(55,214,122,.16), rgba(74,163,255,.12));
  border: 1px solid rgba(255,255,255,.14);
}
.shareCard__brand{font-weight:900; opacity:.95}
.shareCard__title{color:var(--muted); margin-top:4px;}
.shareCard__score{font-size:46px; font-weight:1000; margin-top:10px;}
.shareCard__nivel{display:inline-block; margin-top:8px; padding:8px 12px; border-radius:999px; border: var(--border); font-weight:900;}
.shareCard__meta{margin-top:10px; color:rgba(233,238,252,.92)}
.shareCard__foot{margin-top:14px; color:rgba(159,176,208,.88); font-size:12px;}

/* =========================
   ADICIONADO (só para garantir botões em <a> e layout da actions)
   ========================= */

.btn{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.btn--ghost,
.btn--dark{
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease, filter .12s ease;
}

.btn--ghost:hover,
.btn--dark:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.btn--ghost:active,
.btn--dark:active{
  transform: translateY(0);
  filter: brightness(.98);
}

.shareCard__actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.shareCard__actions .btn{
  padding:10px 12px;
  border-radius:14px;
}
