/* =========================================================
   MINHAS ATIVIDADES — planilha de petições e impressão
========================================================= */
.activity-callout{
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--highlight-bg);
  box-shadow: inset 4px 0 0 var(--amber);
  border-radius: var(--radius);
  padding: 12px 16px; margin: 0 0 16px;
  font-size: 14.5px; color: var(--highlight-ink);
}

.sheet-filters{
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.sheet-filters button{
  font-family: var(--font-ui); font-size: 14px; font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.sheet-filters button.active{ background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-count{
  display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px;
  border-radius: 999px; background: rgba(0, 0, 0, .08); font-size: 12px;
}
.sheet-filters button.active .filter-count{ background: rgba(255, 255, 255, .22); }

.sheet-wrap{
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet{ width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th{
  text-align: left; vertical-align: bottom;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  background: var(--paper);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.th-sub{ display: block; font-weight: 400; font-size: 12px; color: var(--text-muted); }
.sheet td{ padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.sheet tbody tr:last-child td{ border-bottom: none; }
.sheet tr.row-mine td{ background: var(--highlight-bg); }
.sheet tr.row-mine td:first-child{ box-shadow: inset 4px 0 0 var(--amber); }
.sheet .signature{ font-style: italic; color: var(--ink-soft); }
.sheet-empty{ text-align: center; color: var(--text-muted); padding: 28px 14px !important; }
.sheet-actions{ display: flex; gap: 6px; }

.vote{ font-size: 13px; font-weight: 700; }
.vote-yes{ color: var(--ok); }
.vote-no{ color: var(--red-flag); }
.vote-wait{ color: var(--ministry); }
.vote-none{ color: var(--text-muted); font-weight: 400; }

.btn.btn-sm{ min-height: 34px; padding: 6px 12px; font-size: 13.5px; }

.tab-count{
  margin-left: auto;
  min-width: 20px; padding: 1px 7px;
  border-radius: 999px;
  background: var(--amber); color: #fff;
  font-size: 12px; font-weight: 700; text-align: center;
}

/* Mensagem de resultado para quem enviou a petição */
.pet-msg{ margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; }
.pet-msg.no{ color: var(--red-flag); }
.pet-msg.yes{ color: var(--ok); }
.pet-msg.wait{ color: var(--text-muted); }

/* ---------- Impressão ---------- */
#printArea{ display: none; }

@media print{
  /* Padrão da casa: RETRATO (vertical). As programações das reuniões
     e os cartões saem assim. Só a lista de petições, que é larga,
     pede a folha deitada — ela usa a classe .print-landscape. */
  @page{ size: A4 portrait; margin: 14mm; }
  @page paisagem{ size: A4 landscape; margin: 14mm; }
  .print-landscape{ page: paisagem; }
  body{ background: #fff; }
  body > *:not(#printArea){ display: none !important; }
  #printArea{ display: block !important; }
  .print-sheet{ font-family: var(--font-ui); color: #000; }
  .print-sheet h1{ font-size: 18pt; margin: 0 0 4pt; }
  .print-meta{ font-size: 10pt; margin: 0 0 12pt; color: #333; }
  .print-sheet table{ width: 100%; border-collapse: collapse; font-size: 10pt; }
  .print-sheet th, .print-sheet td{ border: 1px solid #555; padding: 5pt 6pt; text-align: left; vertical-align: top; }
  .print-sheet th{ background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-sheet tr{ break-inside: avoid; }
  .print-signatures{ display: flex; gap: 24pt; margin-top: 40pt; }
  .print-signatures div{ flex: 1; font-size: 10pt; text-align: center; }
  .print-signatures span{ display: block; border-top: 1px solid #000; margin-bottom: 4pt; }
}

/* Contador na aba */
#appRoot .tab-btn[data-tab="activities"]{ position: relative; }
@media (max-width: 720px){
  .tab-count{ position: absolute; top: 0; right: 8px; margin: 0; border: 2px solid #fff; }
}

.cell-sub{ display: block; font-size: 12.5px; color: var(--text-muted); font-weight: 400; }
.sheet th .th-sub{ white-space: normal; }
.row-action:not(:empty){ margin-top: 8px; }
@media (max-width: 720px){
  .row-action .sheet-actions{ flex-direction: row; }
}

/* ---------- Seções de Minhas Atividades ---------- */
.activity-section{ margin-bottom: 36px; }
.section-head{ display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head .section-title{ margin: 0; }
.section-sub{ margin: 2px 0 0; font-size: 14px; color: var(--text-muted); }
.sheet-empty-block{ padding: 24px 20px; text-align: center; color: var(--ok); font-weight: 700; font-size: 14.5px; }

/* ---------- Lembrete de relatório na tela inicial ---------- */
.reminder-card{
  display: flex; gap: 14px; align-items: flex-start;
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--brand-soft);
  border-radius: var(--radius);
  box-shadow: inset 4px 0 0 var(--brand);
}
.reminder-icon{ font-size: 22px; line-height: 1; margin-top: 2px; }
.reminder-text{ margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.reminder-from{ margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
@media (max-width: 720px){
  .section-head .btn{ width: 100%; }
}

/* ---------- Blocos que abrem e fecham ---------- */
.activity-block{
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.activity-block > summary{
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 700;
}
.activity-block > summary::-webkit-details-marker{ display: none; }
.activity-block > summary::after{
  content: ''; width: 9px; height: 9px; margin-left: 4px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.activity-block[open] > summary::after{ transform: rotate(225deg) translateY(-2px); }
.activity-block[open] > summary{ border-bottom: 1px solid var(--line); }
.activity-block > summary:hover{ background: var(--paper); }
.ab-title{ flex: 1; }
.ab-count{ font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--paper); color: var(--ink-soft); white-space: nowrap; }
.ab-count.warn{ background: var(--ministry-bg); color: var(--ministry); }
.ab-count.ok{ background: var(--ok-bg); color: var(--ok); }
.activity-body{ padding: 16px 20px 18px; }
.activity-body .section-head{ align-items: center; }
.activity-body .sheet-wrap{ border-radius: var(--radius); }
.sheet-empty-block.muted{ color: var(--text-muted); }
@media (max-width: 720px){
  .activity-block > summary{ padding: 14px 16px; font-size: 16px; }
  .activity-body{ padding: 14px 12px 16px; }
}

/* ---------- Grupos de funções (Reuniões, Serviço de campo, Anúncios) ---------- */
.activity-group > summary{ font-size: 18px; }
.activity-group-body{ padding: 14px 16px 2px; background: var(--paper); }
.activity-group-body > .activity-block{ margin-bottom: 14px; }
.activity-group-body > .activity-block > summary{ font-size: 15.5px; padding: 13px 16px; }
#panel-activities .report-grid{ margin: 0; }
.rc-row-all{ background: var(--paper); }
@media (max-width: 720px){
  .activity-group-body{ padding: 10px 8px 1px; }
}
