:root {
  --azul: #0a2a4e;
  --ouro: #f0c36b;
  --creme: #fbf7ee;
  --areia: #f7e6c2;
  --linha: #e6dccb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Montserrat, "Segoe UI", system-ui, sans-serif;
  background: #dfe3ea;
  color: var(--azul);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.folha {
  container-type: inline-size;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--creme);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topo {
  background: linear-gradient(160deg, #0d3563, #061f3d);
  border-radius: 0 0 50% 50% / 0 0 22px 22px;
  border-bottom: 4px solid var(--ouro);
  padding: 3cqw 2cqw 3.4cqw;
}

.titulo { display: flex; align-items: center; justify-content: center; gap: 3cqw; text-align: center; }
.icone { width: 11cqw; flex: none; }

h1 {
  color: #fff;
  font-size: 6.2cqw;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}
h1 span { color: var(--ouro); }

.periodo {
  display: inline-block;
  margin-top: 1cqw;
  padding: .7cqw 3.5cqw;
  border-radius: 99px;
  background: linear-gradient(180deg, #f7d691, #e8b85c);
  color: var(--azul);
  font-weight: 800;
  font-size: 3cqw;
}

.navegacao { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 16px 12px 0; }
.navegacao button {
  font: 700 14px/1 inherit;
  font-family: inherit;
  color: var(--azul);
  background: #fff;
  border: 1.5px solid #d9ad5b;
  border-radius: 99px;
  padding: 10px 16px;
  cursor: pointer;
}
.navegacao button:hover:not(:disabled) { background: var(--areia); }
.navegacao button:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.navegacao button:disabled { opacity: .4; cursor: default; }

.aviso { text-align: center; padding: 24px; }

.grade {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "um dois" "obs dois";
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 16px;
  align-items: start;
}
#mes-1 { grid-area: um; }
#mes-2 { grid-area: dois; }

.mes {
  container-type: inline-size;
  background: #fff;
  border: 1px solid var(--linha);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgb(10 42 78 / .1);
}

.mes h2 {
  background: var(--azul);
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  font-size: 7cqw;
  font-weight: 800;
  padding: 4cqw 2cqw;
}
.mes h2 span { color: var(--ouro); }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: center; border-bottom: 1px solid var(--linha); }
th + th, td + td { border-left: 1px solid var(--linha); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #f6f2ea; }

th {
  background: var(--areia);
  text-transform: uppercase;
  font-size: 2.9cqw;
  font-weight: 700;
  padding: 3cqw 1cqw;
}
th:nth-child(1) { width: 23%; }
th:nth-child(2) { width: 38%; }

td { font-size: 4.2cqw; font-weight: 500; padding: 2.1cqw 1.4cqw; }
td.data { font-weight: 800; }

.nome {
  display: block;
  border-radius: 2cqw;
  padding: 2.2cqw 1cqw;
  font-weight: 700;
  color: #1c1426;
  overflow-wrap: anywhere;
}

.observacoes {
  grid-area: obs;
  background: #f5ead4;
  border: 1px solid var(--linha);
  border-radius: 18px;
  padding: 18px;
}
.observacoes h3 { display: flex; align-items: center; margin-bottom: 14px; }
.alerta {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  z-index: 1;
}
.rotulo {
  margin-left: -14px;
  padding: 10px 22px 10px 28px;
  border-radius: 0 99px 99px 0;
  background: #e8bd6a;
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 800;
}
.observacoes ul { padding-left: 22px; display: grid; gap: 8px; font-size: 16px; font-weight: 500; line-height: 1.4; }

.rodape { margin-top: auto; line-height: 0; }
.rodape svg { width: 100%; height: 64px; }

@container (max-width: 700px) {
  .grade {
    grid-template-columns: 1fr;
    grid-template-areas: "um" "dois" "obs";
    grid-template-rows: none;
    padding: 12px;
  }
  .topo { padding: 22px 10px 26px; }
}

@media print {
  @page { size: A4 portrait; margin: 6mm; }
  body { background: none; }
  .folha { width: 190mm; min-height: 0; zoom: .98; }
  .navegacao { display: none; }
  .mes, .observacoes { break-inside: avoid; box-shadow: none; }
}
