body {
  background: #e7eee9;
  background-image: none;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(520px 260px at 85% 0%, rgba(6, 188, 97, 0.38), transparent 60%),
    radial-gradient(400px 300px at 10% 100%, rgba(6, 188, 97, 0.15), transparent 60%),
    var(--navy);
}

.login-card {
  width: min(440px, 100%);
  background: white;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-card .side-logo {
  border: 1px solid var(--line);
  background: #fdfdfd;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  justify-content: center;
}

.login-card .side-logo img { height: 74px; width: auto; }
.login-card h1 { margin: 16px 0 6px; font-size: 1.7rem; color: var(--navy); }
.login-card p { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; }
.login-card .btn { width: 100%; margin-top: 20px; }

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  aside { height: auto !important; position: static !important; }
}

aside {
  background: var(--navy);
  color: white;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}

.side-logo {
  background: white;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.side-logo img { height: 72px; width: auto; }

.side-label {
  margin: 10px 8px 4px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-sub {
  margin: 0 8px 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

nav { display: flex; flex-direction: column; gap: 4px; }

.nav {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.nav:hover, .nav.active {
  background: rgba(6, 188, 97, 0.18);
  color: white;
}

.nav.active {
  background: rgba(6, 188, 97, 0.22);
  box-shadow: inset 4px 0 0 var(--green);
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.main {
  padding: 24px 28px 60px;
  min-width: 0;
}

@media (max-width: 700px) {
  .main { padding: 16px 14px 40px; }
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(231, 238, 233, 0.94);
  backdrop-filter: blur(10px);
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(10, 35, 66, 0.06);
}

.toolbar h2 { margin: 0; font-size: 1.6rem; color: var(--navy); }
.toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters .control {
  width: auto;
  min-width: 170px;
  background: white;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.filters input.control { min-width: 200px; }

.banner {
  background: var(--warn-soft);
  border: 1px solid #f3dfaa;
  color: #6d4b00;
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 550px) {
  .kpis { grid-template-columns: 1fr; }
}

.kpi {
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(10, 35, 66, 0.05);
  padding: 18px 20px;
  border-left: 4px solid var(--green);
}

.kpi.warn { border-left-color: var(--warn); }
.kpi.bad { border-left-color: var(--bad); }
.kpi.blue { border-left-color: #0077b6; }

.kpi span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
}

.kpi strong {
  display: block;
  font-family: var(--display);
  font-size: 2.1rem;
  color: var(--navy);
  margin-top: 4px;
  line-height: 1.1;
}

.kpi small {
  color: var(--muted);
  font-size: 0.82rem;
  display: block;
  margin-top: 4px;
}

/* Dimensões / Temas */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 850px) {
  .dimensions-grid { grid-template-columns: 1fr; }
}

.dimension-card {
  background: white;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(10, 35, 66, 0.05);
}

.dim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dim-header h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dim-header strong {
  font-family: var(--display);
  font-size: 1.3rem;
}

.dim-bar-wrap {
  background: #edf3f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dim-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.dim-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Card Section */
.sec-card {
  background: white;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(10, 35, 66, 0.05);
  padding: 22px;
  margin-bottom: 22px;
}

.sec-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Pergunta detalhe */
.q-row {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.q-row:last-child { border-bottom: 0; }

.q-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.q-header h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--navy);
}

.q-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.q-avg {
  text-align: right;
  flex: none;
}

.q-avg strong {
  font-family: var(--display);
  font-size: 1.6rem;
  display: block;
  line-height: 1;
}

.q-avg span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Distribuição de barras 1 a 5 */
.dist-bars {
  display: flex;
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f4f2;
  margin-top: 8px;
}

.dist-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  transition: width 0.3s ease;
  min-width: 0;
}

.dist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dist-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.s1 { background: var(--bad); }
.dot.s2 { background: var(--orange); }
.dot.s3 { background: #d9930f; }
.dot.s4 { background: #2f9e44; }
.dot.s5 { background: var(--green); }

/* Tabela de Respostas */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

table.admin-table th {
  background: #f3f7f5;
  color: var(--navy);
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 2px solid var(--line);
}

table.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

table.admin-table tr:hover td {
  background: #fafcfb;
}

.status-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-tag.bom { background: #dcf5e7; color: #048c49; }
.status-tag.atencao { background: #fef3d6; color: #9a6b00; }
.status-tag.critico { background: #fde8e8; color: #c53030; }

/* Mural de Observações e Sugestões */
.msg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.msg-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 4px 14px rgba(10, 35, 66, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.msg-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1a2a3a;
  white-space: pre-wrap;
  margin: 0 0 12px;
  flex: 1;
}

.msg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid #f0f4f2;
  padding-top: 10px;
}

/* Modais */
dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  max-width: min(650px, calc(100% - 32px));
  background: white;
}

dialog::backdrop {
  background: rgba(10, 35, 66, 0.6);
  backdrop-filter: blur(4px);
}

.modal-card {
  padding: 24px 28px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 { margin: 0; color: var(--navy); }
