/* ABA ÚNICA DE REUNIÕES */
.segmented{ display:inline-flex; background:var(--paper-raised); border:1px solid var(--line); border-radius:8px; padding:3px; margin-bottom:16px; }
.segmented button{ border:none; background:none; font-family:var(--font-ui); font-size:13px; font-weight:600; color:var(--text-muted); padding:7px 16px; border-radius:6px; cursor:pointer; }
.segmented button.active{ background:var(--ink); color:#fff; }

/* PROGRAMAÇÃO SOMENTE LEITURA (visão do publicador) */
.ro-part{
  display:grid; grid-template-columns: 30px 1fr 220px; align-items:center; gap:12px;
  padding:12px 28px; border-bottom:1px solid var(--line);
}
.ro-part:last-child{ border-bottom:none; }
.ro-part-name{ font-size:13.5px; color:var(--ink); font-weight:500; }
.ro-part-name.empty{ color:var(--text-muted); font-style:italic; }
.ro-part.mine{ background:var(--highlight-bg); }
.ro-you-badge{
  display:inline-block; background:var(--amber); color:#fff; font-size:10.5px; font-weight:700;
  text-transform:uppercase; padding:2px 9px; border-radius:20px; margin-left:8px;
}
.ro-week-banner{
  background:var(--highlight-bg); border:1px solid var(--highlight-line); color:var(--highlight-ink); font-size:12.5px; font-weight:600;
  padding:9px 20px; margin:0;
}

.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.stat-card{ background:var(--paper-raised); border:1px solid var(--line); border-radius:10px; padding:16px 18px; }
.stat-card .stat-value{ font-family:var(--font-display); font-size:26px; font-weight:700; color:var(--ink); }
.stat-card .stat-label{ font-size:12px; color:var(--text-muted); margin-top:2px; }
.stat-card .stat-delta{ font-size:11.5px; font-weight:600; margin-top:6px; }
.stat-delta.up{ color:#4B6B4F; }
.stat-delta.down{ color:var(--red-flag); }

.report-table{ width:100%; border-collapse:collapse; background:var(--paper-raised); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.report-table th{
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:0.02em;
  color:var(--text-muted); font-weight:600; padding:12px 18px; background:var(--paper); border-bottom:1px solid var(--line);
}
.report-table td{ padding:11px 18px; font-size:13.5px; border-bottom:1px solid var(--line); color:var(--ink); }
.report-table tr:last-child td{ border-bottom:none; }
.report-table td.num{ text-align:right; font-variant-numeric:tabular-nums; }
.section-title{ font-family:var(--font-display); font-size:17px; font-weight:700; margin:28px 0 12px; }
.section-title:first-child{ margin-top:0; }

@media (max-width: 720px){
  .part{ grid-template-columns: 20px 1fr; }
  .assign-block, .row-menu{ grid-column:2 / 3; }
  .assign-block{ margin-top:8px; }
  .masthead{ flex-direction:column; align-items:flex-start; }
  .cong-name{ text-align:left; }
  .toolbar{ flex-direction:column; align-items:flex-start; }
  .report-grid{ grid-template-columns:1fr; }
  .stat-grid{ grid-template-columns:1fr 1fr; }
  .rc-row{ grid-template-columns:1fr; gap:6px; }
}

/* ===== Reunião cancelada por congresso/assembleia ===== */
.meeting-cancelled{
  display: flex; align-items: flex-start; gap: 12px;
  margin: 14px 16px; padding: 16px 18px;
  background: linear-gradient(135deg, #FEF3E0 0%, #FFF8EE 100%);
  border: 1px solid #F3D9A8; border-left: 4px solid #D97706;
  border-radius: 10px;
}
.meeting-cancelled-icon{ font-size: 22px; line-height: 1; flex-shrink: 0; }
.meeting-cancelled-title{ margin: 0 0 3px; font-weight: 700; font-size: 14.5px; color: #78350F; }
.meeting-cancelled-text{ margin: 0; font-size: 13px; color: #92400E; line-height: 1.5; }
.pub-fill-status.cancelled{ background: #FEF3C7; color: #92400E; }

/* ===== Campos editáveis do fim de semana (tema, nº, estudo, cântico) ===== */
.wk-title-input, .wk-num-input, .wk-song-input{
  font-family: var(--font-ui);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 4px 6px;
  transition: border-color .15s, background .15s;
}
.wk-title-input{ width: 100%; font-size: 14.5px; font-weight: 600; }
.wk-num-input{ width: 46px; text-align: center; font-size: 13px; font-weight: 700; }
.wk-song-input{ width: 110px; font-size: 13px; font-weight: 700; }
.wk-title-input:hover, .wk-num-input:hover, .wk-song-input:hover{
  border-color: var(--line); background: var(--paper);
}
.wk-title-input:focus, .wk-num-input:focus, .wk-song-input:focus{
  outline: none; border-color: var(--treasures,#1F3A6B); background: #fff;
  box-shadow: 0 0 0 3px rgba(31,58,107,.12);
}
.wk-title-input::placeholder, .wk-song-input::placeholder{ color: #94A3B8; font-weight: 400; }

/* ===== Edição do conteúdo das partes ===== */
.pt-title-input, .pt-meta-input{
  display: block; width: 100%;
  font-family: var(--font-ui);
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--ink);
  padding: 4px 6px;
  transition: border-color .15s, background .15s;
}
.pt-title-input{ font-size: 14px; font-weight: 600; }
.pt-meta-input{ font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pt-title-input:hover, .pt-meta-input:hover{ border-color: var(--line); background: var(--paper); }
.pt-title-input:focus, .pt-meta-input:focus{
  outline: none; border-color: var(--treasures,#1F3A6B); background: #fff;
  box-shadow: 0 0 0 3px rgba(31,58,107,.12);
}
.pt-title-input::placeholder, .pt-meta-input::placeholder{ color: #94A3B8; font-weight: 400; }

/* Botão de remover parte */
.row-menu .part-del{
  width: 28px; height: 28px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); border-radius: 6px;
}
.row-menu .part-del:hover{ color: #DC2626; background: #FEE2E2; }

/* Botão de adicionar parte */
.add-part-row{ padding: 8px 16px 12px; }
.add-part-btn{
  width: 100%;
  border: 1.5px dashed var(--line) !important;
  color: var(--ink-soft) !important;
  background: transparent !important;
  font-size: 13px; padding: 9px 12px !important;
}
.add-part-btn:hover{
  border-color: var(--treasures,#1F3A6B) !important;
  color: var(--treasures,#1F3A6B) !important;
  background: var(--paper) !important;
}

/* =========================================================
   CONTAGEM DA ASSISTÊNCIA
========================================================= */
.att-field{
  display:inline-flex; align-items:center; gap:8px;
}
.att-step{
  width:34px; height:34px; flex:0 0 34px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:10px;
  background:var(--paper-raised); color:var(--ink);
  font-size:18px; font-weight:700; line-height:1; cursor:pointer;
  transition:background .15s ease, border-color .15s ease, transform .1s ease;
}
.att-step:hover:not(:disabled){ background:var(--paper); border-color:var(--brand, #1D4ED8); color:var(--brand, #1D4ED8); }
.att-step:active:not(:disabled){ transform:translateY(1px); }
.att-step:disabled{ opacity:.35; cursor:default; }

.att-box{
  display:inline-flex; align-items:center; gap:6px;
  min-width:150px; padding:0 8px 0 12px; height:38px;
  border:1.5px solid var(--line); border-radius:11px;
  background:var(--paper-raised);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.att-field.filled .att-box{ border-color:rgba(29,78,216,.45); }
.att-box:focus-within{
  border-color:var(--brand, #1D4ED8);
  box-shadow:0 0 0 3px rgba(29,78,216,.15);
}
.att-input{
  width:56px; border:0; background:transparent; outline:none;
  font:inherit; font-size:16px; font-weight:700; color:var(--ink);
  text-align:right; padding:0; cursor:text;
}
.att-input::placeholder{ font-weight:600; color:var(--text-muted); }
.att-unit{ font-size:12.5px; font-weight:600; color:var(--text-muted); flex:1; }
.att-clear{
  width:22px; height:22px; flex:0 0 22px; border:0; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:transparent; color:var(--text-muted); cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.att-clear:hover{ background:#FEE2E2; color:#DC2626; }
.att-clear[hidden]{ display:none; }

@media (max-width:560px){
  .att-field{ width:100%; }
  .att-box{ flex:1; min-width:0; }
  .att-step{ width:40px; height:40px; flex:0 0 40px; }
  .att-box{ height:40px; }
}
