/* RESET BÁSICO */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f2f2f2;
  color: #333;
}

/* ===== CABEÇALHO INSTITUCIONAL ===== */
.header {
  background: linear-gradient(135deg, #0b5e2a, #2ecc71);
  padding: 14px 25px;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.header img {
  height: 70px;
}

.header-text h1 {
  margin: 0;
  font-size: 22px;
  color: #fff;
  font-weight: bold;
}

.header-text h2 {
  margin: 2px 0 0 0;
  font-size: 14px;
  color: #eafaf1;
  font-weight: normal;
}

/* ===== LAYOUT ===== */
.portal {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 98px);
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: #27ae60;
  color: #fff;
  padding: 20px;
}

.sidebar h3 {
  margin-top: 0;
  text-align: center;
  font-size: 18px;
}

.sidebar label {
  font-size: 13px;
  margin-top: 12px;
  display: block;
}

.sidebar input,
.sidebar select {
  width: 100%;
  padding: 9px;
  margin-top: 6px;
  border-radius: 4px;
  border: none;
  font-size: 13px;
}

.sidebar button {
  width: 100%;
  padding: 10px;
  margin-top: 18px;
  border-radius: 4px;
  border: none;
  background: #f1c40f;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

/* ===== CONTEÚDO ===== */
.content {
  padding: 25px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ===== CARD ===== */
.card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 16px;
}

.card .tag {
  color: #0b5e2a;
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 6px;
}

.card h4 {
  margin: 6px 0;
  font-size: 15px;
}

.card p {
  font-size: 13px;
  line-height: 1.4;
}

.card .btns {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-download {
  flex: 1;
  background: #3498db;
  color: #fff;
  padding: 7px 10px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
  border-radius: 3px;
}

.btn-leitura {
  flex: 1;
  background: #27ae60;
  color: #fff;
  padding: 7px 10px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
  border-radius: 3px;
}

/* ===== CALENDÁRIO PADRÃO DIÁRIO ELETRÔNICO ===== */
.cal-box {
  background: #fff;
  border-radius: 6px;
  margin-top: 25px;
  overflow: hidden;
}

/* CABEÇALHO DO CALENDÁRIO */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #3498db;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}

.cal-header a {
  color: #f1c40f;
  text-decoration: none;
  font-size: 18px;
}

/* MESES */
.cal-months {
  text-align: center;
  padding: 6px 0;
  font-size: 11px;
  border-bottom: 1px solid #eee;
}

.cal-months span {
  margin: 0 6px;
  color: #555;
}

.cal-months .active {
  color: #e74c3c;
  font-weight: bold;
}

/* GRADE DO CALENDÁRIO */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 13px;
}

.cal-grid .dow {
  background: #eee;
  font-size: 11px;
  padding: 6px 0;
  font-weight: bold;
}

.cal-grid .day {
  padding: 9px 0;
  border: 1px solid #eee;
  cursor: pointer;
  transition: background .2s;
}

/* DIA COM PUBLICAÇÃO */
.cal-grid .has-post {
  background: #2f80ed;
  color: #fff;
  font-weight: bold;
}

/* HOVER */
.cal-grid .day:hover {
  background: #3498db;
  color: #fff;
}

/* ===== TEXTO EXPANSÍVEL (FUNCIONAL) ===== */
.texto-edicao {
  max-height: 120px;
  overflow: hidden;
  display: block;
  position: relative;
  font-size: 13px;
  line-height: 1.5;
  color: #444;
}

.texto-edicao.aberto {
  max-height: none;
}

.btn-toggle-texto {
  background: none;
  border: none;
  color: #0b5e2a;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
  font-size: 13px;
}
.paginacao {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.paginacao a {
  padding: 8px 12px;
  border-radius: 8px;
  background: #e9f5ee;
  color: #0b5e2a;
  text-decoration: none;
  font-weight: bold;
}

.paginacao a:hover {
  background: #2ecc71;
  color: #fff;
}

.paginacao a.ativo {
  background: #0b5e2a;
  color: #fff;
}
#btn-topo {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #0b5e2a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}

#btn-topo:hover {
  background: #2ecc71;
}