:root {
  --navy: #1f3864;
  --accent: #2e74b5;
  --light: #dce6f1;
  --gray: #595959;
  --bg: #f4f6f9;
  --danger: #b3261e;
  --ok: #1e7a34;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Calibri, Arial, sans-serif;
  background: var(--bg);
  color: #222;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .3px;
}
.topbar .brand .logo {
  height: 32px;
  width: auto;
  display: block;
  border-radius: 4px;
}

.topbar nav a {
  color: #fff;
  margin-left: 18px;
  font-size: .92rem;
  opacity: .9;
}
.topbar nav a:hover { opacity: 1; }

.container {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 24px;
  margin-bottom: 24px;
}

h1, h2, h3 { color: var(--navy); margin-top: 0; }

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
}
.btn:hover { background: var(--navy); text-decoration: none; color: #fff; }
.btn-secundario {
  background: #e8ecf3;
  color: var(--navy);
}
.btn-secundario:hover { background: #d3dcea; color: var(--navy); }
.btn-perigo { background: var(--danger); }
.btn-perigo:hover { background: #8a1d17; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e6e6e6;
  font-size: .93rem;
  vertical-align: top;
}
th {
  background: var(--navy);
  color: #fff;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
tr:hover td { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-baixo    { background: #e3f5e6; color: var(--ok); }
.badge-medio    { background: #fff3cd; color: #8a6500; }
.badge-alto     { background: #fde3e1; color: var(--danger); }
.badge-critico  { background: #4a0e0e; color: #fff; }

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-box {
  background: #fff;
  padding: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  width: 100%;
  max-width: 380px;
}

.login-box h1 {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 4px;
}
.login-box p.subtitulo {
  text-align: center;
  color: var(--gray);
  margin-top: 0;
  margin-bottom: 24px;
  font-size: .88rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  color: var(--gray);
  margin-bottom: 4px;
  margin-top: 14px;
}

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=tel], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  font-size: .92rem;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,116,181,.15);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.alerta {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .88rem;
  margin-bottom: 16px;
}
.alerta-erro { background: #fde3e1; color: var(--danger); }
.alerta-ok { background: #e3f5e6; color: var(--ok); }

.pilar-titulo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin: 28px 0 14px;
}
.pilar-titulo .tempo { font-size: .8rem; color: var(--gray); font-style: italic; }

.pergunta-item { margin-bottom: 18px; }
.pergunta-item .num {
  display: inline-block;
  background: var(--light);
  color: var(--navy);
  font-weight: 700;
  font-size: .8rem;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  margin-right: 8px;
}
.pergunta-item .texto { font-weight: 600; font-size: .93rem; }

.radio-risco { display: flex; gap: 18px; flex-wrap: wrap; margin: 8px 0 4px; }
.radio-risco label { display: flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.radio-risco input { width: auto; }

.vazio {
  text-align: center;
  color: var(--gray);
  padding: 40px 0;
}

.ficha dt { font-weight: 700; color: var(--navy); font-size: .8rem; margin-top: 12px; }
.ficha dd { margin: 2px 0 0; }

.acoes-linha { display: flex; gap: 10px; flex-wrap: wrap; }
