/* SalmodiApp · Ministério
   A página da equipe usa os mesmos cartões, verdes e controles de app.css. */

/* embaixo só a barra de abas */
body.ministry-page { --dock: calc(59px + env(safe-area-inset-bottom, 0px)); padding-bottom: calc(var(--dock) + 32px); }
/* o rodapé fica no fim da tela, nunca solto no meio quando a página tem pouco conteúdo */
body.ministry-page { min-height: 100dvh; display: flex; flex-direction: column; }
body.ministry-page > #view { flex: 1 0 auto; width: 100%; padding-top: 16px; }
body.ministry-page > .site-footer { width: 100%; }

a.link { display: inline-flex; align-items: center; min-height: 32px; }
.account-box { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.account-box .who { font-weight: 700; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- cabeçalho e blocos ---------- */
.crumbs { margin: 16px 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.crumbs a { color: var(--brand); font-weight: 700; text-underline-offset: 3px; text-decoration-color: var(--brand-line); }
:root[data-theme="dark"] .crumbs a { color: var(--ink); }
.page-head { padding-block: 20px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.page-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.ministry-head { flex-direction: row; align-items: center; gap: 16px; }
.ministry-head > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lede { margin: 0; color: var(--ink-soft); max-width: 60ch; }
.ministry-description { margin: 0; max-width: 60ch; white-space: pre-wrap; }
.page-head .meta { margin-top: 0; color: var(--ink-soft); }
.notes-text { margin: 0; white-space: pre-wrap; max-width: 70ch; background: var(--brand-soft); border-radius: var(--radius); padding: 10px 12px; }

.block { background: var(--paper-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.block-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: space-between; }
.soft { color: var(--ink-soft); }
.small { font-size: 0.84rem; }
.mono { font-family: var(--num); font-weight: 600; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
/* o tom combinado é uma plaquinha, como na placa */
.chip { display: inline-grid; place-items: center; min-width: 2.6em; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font: 700 0.85rem/1.2 var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
:root[data-theme="dark"] .chip { color: var(--ink); }
.points { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; max-width: 62ch; }
.points li::marker { color: var(--brand); font-weight: 700; }
.help-page .block .points { gap: 10px; }
.signin-block { max-width: 460px; }
.signin { display: flex; flex-direction: column; gap: 12px; }
.signin .help a { color: var(--brand); font-weight: 700; text-underline-offset: 3px; }
.loading { padding-top: 32px; }

/* ---------- painel do administrador ---------- */
.admin-row { display: flex; flex-direction: column; gap: 8px; }
.admin-head { display: flex; align-items: center; gap: 12px; }
.admin-head .row-main { flex: 1; }
.admin-plan select { flex: 1 1 160px; }
.admin-plan input { flex: 0 0 90px; width: 90px; }
.admin-field { display: flex; align-items: center; gap: 10px; font-weight: 600; flex: 1; }
.admin-field input { width: 100px; }
.chip.full { background: color-mix(in oklab, var(--danger) 14%, #fff); color: var(--danger); }

/* ---------- sugestões e repetição ---------- */
.suggest-reasons { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; color: var(--ink-soft); }
.suggest-reasons:empty { display: none; }
.repeat-details { display: flex; flex-direction: column; gap: 8px; }
.repeat-details[hidden] { display: none; }

/* ---------- funções com ícone e indisponibilidade ---------- */
.function-row { display: flex; align-items: center; gap: 8px; }
.function-row input { flex: 1; min-width: 0; }
.icon-btn { width: 48px; min-width: 48px; font-size: 1.4rem; padding: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; padding: 4px 16px 20px; overflow-y: auto; }
.icon-choice { font-size: 1.6rem; min-height: 52px; padding: 0; border-radius: 12px; }
.icon-choice[aria-selected="true"] { background: var(--brand-soft); border-color: var(--brand); }
.unavail-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.unavail-form input[type=text] { flex: 1 1 100%; }
/* indisponível no dia da escala: riscado com aviso, mas o líder ainda pode escalar */
.toggles button.unavailable { opacity: 0.55; text-decoration: line-through; }
.toggles button.unavailable::after { content: " · indisponível"; font-size: 0.8em; text-decoration: none; }

/* ---------- minha agenda (calendário) ---------- */
.agenda-card { background: var(--brand-soft); box-shadow: none; }
.agenda-icon { font-size: 1.8rem; }

/* ---------- aniversários ---------- */
.birthday-banner { flex-direction: row; align-items: center; gap: 14px; background: color-mix(in oklab, var(--accent) 16%, var(--paper-raised)); box-shadow: none; }
.birthday-banner p { margin: 0; }
.birthday-icon { font-size: 2rem; }
.birthdays li { display: flex; align-items: center; gap: 12px; }
.birthdays li.today .pos { background: var(--accent); color: #13201a; }

/* ---------- perfil ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; padding-block: 22px 6px; }
.profile-head h1 { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.profile-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 800 1.5rem/1 var(--body); }
.row-actions { display: flex; gap: 16px; padding: 4px 0 2px 56px; }
.account-box .who { color: var(--ink); text-decoration: none; }
.danger { color: var(--danger); }

/* ---------- avatar do ministério ---------- */
.m-avatar { flex: none; width: 44px; height: 44px; border-radius: 14px; object-fit: cover; display: grid; place-items: center; background: var(--brand); color: #fff; font: 800 1rem/1 var(--num); letter-spacing: -0.01em; }
.m-avatar.lg { width: 72px; height: 72px; border-radius: 22px; font-size: 1.6rem; }

/* ---------- linhas separadas por filete ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--rule); padding-block: 10px; }
.rows > li:last-child { border-bottom: 0; }
.row-link { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 48px; }
.row-link .row-main { flex: 1; }
.row-link:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-line); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-main b { overflow-wrap: anywhere; }

/* ---------- equipe ---------- */
.member-line { display: flex; align-items: center; gap: 12px; }
.member { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.role { font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--ink-soft); }
.member-edit { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.member-edit[hidden] { display: none; }

/* botões liga/desliga das funções e das pessoas: o ligado fica na cor do ministério */
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.toggles button, .segmented button { font-size: 0.94rem; }
.toggles button { border-radius: 999px; }
/* ícone do instrumento antes do nome da função */
.toggles button[data-icon]::before, .fn[data-icon]::before { content: attr(data-icon); margin-right: 6px; font-size: 1.05em; }
.toggles button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); font-weight: 700; }
.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 460px; border-radius: 14px; background: var(--paper); padding: 4px; gap: 4px; }
.segmented button { border: 0; border-radius: 10px; background: transparent; color: var(--ink-soft); font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.inline-form input { flex: 1 1 220px; min-width: 0; }
.invite input { font-size: 0.88rem; }
.invite { display: flex; flex-direction: column; gap: 8px; }
.invite[hidden] { display: none; }

.qr-box { margin: 4px 0 0; display: flex; align-items: center; gap: 16px; }
.qr-box .qr { width: 168px; height: 168px; flex: none; border-radius: 8px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-item { border-top: 1px solid var(--rule); padding-block: 4px; }
.guide-item summary { cursor: pointer; font-weight: 600; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
.guide-item[open] summary { color: var(--brand); }
.guide-item .points { padding-bottom: 10px; }
.import-manual summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 6px 0; }
.import-manual[open] { display: flex; flex-direction: column; gap: 8px; }
.checks > li { padding-block: 6px; }
.check-row { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.check-row input { width: 22px; height: 22px; flex: none; accent-color: var(--brand); }
.import-done:not([hidden]) { background: var(--paper-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 4px 16px; margin-top: 14px; list-style: none; }
.import-box { min-height: 14em; font: 0.95rem/1.45 var(--body); white-space: pre-wrap; }
.sub { margin: 6px 0 0; font-size: 0.95rem; font-weight: 700; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- foto e cor ---------- */
.brand-photo { display: flex; align-items: center; gap: 16px; }
.brand-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; background: var(--swatch); border: 2px solid var(--paper-raised); box-shadow: 0 0 0 1px var(--rule); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.swatch.custom { position: relative; overflow: hidden; display: grid; place-items: center; cursor: pointer; background: conic-gradient(#c62828, #f9a825, #2e7d32, #1565c0, #6a1b9a, #c62828); }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* recorte da foto: a área quadrada com a moldura arredondada do avatar */
.crop-stage { position: relative; width: min(288px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--paper); touch-action: none; }
.crop-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-canvas:active { cursor: grabbing; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 22%; box-shadow: 0 0 0 999px rgb(0 0 0 / 0.45); outline: 2px solid #fff; outline-offset: -2px; }
.crop-zoom { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.crop-zoom input { flex: 1; }

/* ---------- escala ---------- */
.people > li { display: grid; grid-template-columns: minmax(80px, 9rem) 1fr auto; gap: 12px; align-items: baseline; }
.fn { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.people .state { font-size: 0.86rem; font-weight: 700; }
.presence-confirmed .state { color: var(--brand); }
:root[data-theme="dark"] .presence-confirmed .state { color: var(--ink); }
.presence-confirmed .state::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.presence-pending .state, .presence-pending .who { color: var(--ink-soft); }
.presence-declined .who { text-decoration: line-through; text-decoration-color: var(--rule-strong); color: var(--ink-soft); }
.presence-declined .state { color: var(--ink-soft); }

/* o repertório é a própria placa: número da música e plaquinha do tom */
.songs > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.songs .row-main { flex: 1 1 180px; }
.pos { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font: 800 0.95rem/1 var(--num); }
.song-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; width: 100%; padding-left: 48px; }
.song-actions button { min-height: 36px; padding: 4px 12px; }
.copy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy-box { min-height: 10em; width: min(100%, 520px); }

/* ---------- YouTube e Spotify ---------- */
.media-card { width: 100%; justify-content: flex-start; gap: 12px; padding: 8px; border: 0; background: var(--paper); border-radius: 14px; text-align: left; }
.media-thumb { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--rule); flex: none; }
.media-play, .media-mini-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 0.9rem; flex: none; }
.media-mini { position: relative; flex: none; width: 64px; height: 40px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.media-mini img { width: 100%; height: 100%; object-fit: cover; }
.media-mini .pos { width: 100%; height: 100%; border-radius: 0; }
.media-mini-play { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; font-size: 0.7rem; box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }

.media-player {
  position: fixed;
  /* centralizado sem transform: a animação de entrada usa transform e apagaria o centro */
  left: 8px;
  right: 8px;
  margin-inline: auto;
  max-width: 560px;
  bottom: calc(var(--dock) + 8px);
  z-index: 25;
  background: var(--paper-raised);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.player-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; }
.player-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--brand-soft); flex: none; }
.player-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-title, .player-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 0.82rem; color: var(--ink-soft); }
.player-open { font-size: 0.82rem; font-weight: 700; color: var(--brand); white-space: nowrap; text-underline-offset: 3px; }
.player-close { border: 0; background: none; min-width: 40px; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); }
.player-frame { display: block; width: 100%; border: 0; }
.player-frame.youtube { aspect-ratio: 16 / 9; max-height: 32vh; }
.player-frame.spotify { height: 152px; }
body.with-player { padding-bottom: calc(var(--dock) + 32px + 34vh); }

.catalog-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.catalog-item { width: 100%; justify-content: flex-start; gap: 12px; border: 0; background: var(--paper); border-radius: 12px; padding: 6px 10px 6px 6px; text-align: left; }
.catalog-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }

/* ---------- editor ---------- */
.fields-2 { display: grid; grid-template-columns: 1fr 240px; gap: 12px; }
.fields-2 .span { grid-column: 1 / -1; }
.full label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
input[type=datetime-local] { font-family: var(--num); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
textarea.notes { min-height: 5.5em; font: inherit; white-space: pre-wrap; }
.fn-group { display: grid; grid-template-columns: minmax(80px, 9rem) 1fr; gap: 12px; align-items: baseline; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.fn-group:last-child { border-bottom: 0; }
.song-edit > li { display: flex; flex-direction: column; gap: 8px; }
.song-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.song-line input { flex: 1 1 180px; min-width: 0; }
.song-line select { min-width: 7.5em; }
.row-tools { display: flex; gap: 4px; }
.row-tools button { min-width: 40px; padding: 5px 8px; }
.links-line { padding-left: calc(36px + 8px); }
.links-line input { font-size: 0.9rem; }
.add-song select { flex: 1 1 220px; min-width: 0; max-width: 420px; justify-content: flex-start; }
.sticky-actions { position: sticky; bottom: var(--dock); background: var(--paper); padding-bottom: 14px; }

@media (max-width: 560px) {
  .page-head h1 { font-size: 1.85rem; }
  .m-avatar.lg { width: 60px; height: 60px; border-radius: 15px; font-size: 1.6rem; }
  .fields-2 { grid-template-columns: 1fr; }
  .people > li, .fn-group { grid-template-columns: 1fr auto; }
  .people .fn, .fn-group .fn { grid-column: 1 / -1; }
  .links-line { padding-left: 0; }
  .song-actions { padding-left: 0; }
  .account-box .who { display: none; }
  .sticky-actions { position: static; }
}
@media (pointer: coarse) {
  .song-actions button { min-height: 44px; }
}

/* passo a passo do iPhone para ligar os avisos */
.push-steps { margin: 12px 0 0; padding: 14px 16px 14px 36px; border-radius: var(--radius); background: var(--brand-soft); display: grid; gap: 8px; line-height: 1.45; }

/* roteiro do culto */
.liturgy-block .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.liturgy-block .chip { font-size: 0.85rem; padding: 6px 10px; min-height: 36px; border-radius: 999px; }
.liturgy-edit > li { display: grid; gap: 8px; padding: 12px 0; }
.liturgy-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.liturgy-line .row-tools { margin-left: auto; }
.liturgy-line > input[type="text"] { flex: 1 1 0; min-width: 0; }
.liturgy-line .minutes { display: flex; align-items: center; gap: 4px; flex: none; }
.liturgy-line .minutes input { width: 4.2em; text-align: center; padding-inline: 4px; }
.liturgy-line.details { flex-wrap: wrap; padding-left: 44px; }
.liturgy-line.details > * { flex: 1 1 160px; min-width: 0; }
.liturgy-song-pick { display: block; }
.liturgy-song-pick .picker-btn { width: 100%; }
.liturgy-total { margin-top: 8px; font-weight: 600; }
.liturgy-timeline { list-style: none; margin: 0; padding: 0; }
.liturgy-timeline > li { display: grid; grid-template-columns: 4.2em 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); position: relative; }
.liturgy-timeline > li:first-child { border-top: 0; }
.liturgy-timeline time { font-weight: 700; color: var(--brand); padding-top: 1px; }
.liturgy-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.liturgy-song { align-self: flex-start; font-weight: 600; text-align: left; padding: 0; }
@media (max-width: 520px) {
  .liturgy-line > input[type="text"] { flex-basis: calc(100% - 140px); }
  .liturgy-line .row-tools { order: 3; width: 100%; justify-content: flex-end; }
  .liturgy-line.details { padding-left: 0; }
  .liturgy-line.details > * { flex-basis: 100%; }
}
@keyframes flash-row { from { background: var(--brand-soft); } to { background: transparent; } }
.flash-row { animation: flash-row 1.6s ease-out; border-radius: var(--radius); }

/* privacidade e excluir a conta */
.legal-links { margin: 0 0 8px; }
.delete-area { display: grid; gap: 10px; margin-top: 12px; padding: 14px; border-radius: var(--radius); border: 1px solid color-mix(in oklab, var(--danger) 40%, transparent); }
.legal-page .block p { line-height: 1.6; }
.legal-page a, .legal-links a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Início ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.home-head:first-child { margin-top: 4px; }
.home-head .menu-section-title { margin: 0 0 8px; display: inline-flex; align-items: center; gap: 8px; }
.home-head .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 0.75rem; letter-spacing: 0; }
.see-all { font-size: 0.85rem; font-weight: 700; color: var(--brand); text-decoration: none; margin-bottom: 8px; }
.ministry-cards { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.ministry-card { position: relative; flex: 0 0 min(78%, 300px); scroll-snap-align: start; display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; border-radius: var(--radius-lg); background: var(--paper-raised); box-shadow: var(--shadow-card); text-align: left; color: var(--ink); min-height: 96px; }
.ministry-card.chosen { background: var(--brand); color: var(--on-brand); }
.ministry-card.chosen small { color: var(--on-brand-soft); }
.ministry-card-text { display: flex; flex-direction: column; min-width: 0; }
.ministry-card-text b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ministry-card-text small { color: var(--ink-soft); font-size: 0.8rem; }
.ministry-card .check { position: absolute; right: 12px; bottom: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--on-brand); color: var(--brand); font-weight: 800; font-size: 0.85rem; }
.ministry-card.add { flex: 0 0 120px; flex-direction: column; justify-content: center; gap: 4px; color: var(--brand); }
.ministry-card.add .plus { font-size: 2rem; line-height: 1; }
.empty-card { margin: 0; padding: 16px 18px; border-radius: var(--radius-lg); background: var(--paper-raised); box-shadow: var(--shadow-card); color: var(--ink-soft); }

/* estados vazios centralizados */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 16px; }
.empty-state .empty-icon { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; background: var(--brand-soft); margin-bottom: 8px; }
.empty-state p { margin: 0; color: var(--ink-soft); max-width: 34ch; }
.empty-state button { margin-top: 12px; }

/* ---------- Escalas ---------- */
.overview-link { display: flex; justify-content: center; align-items: center; min-height: 42px; margin-bottom: 10px; border-radius: 12px; background: var(--paper-raised); box-shadow: var(--shadow-card); color: var(--brand); font-weight: 700; text-decoration: none; }
.date-badge { flex: none; width: 48px; height: 52px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: var(--brand-soft); color: var(--brand); line-height: 1.05; }
.date-badge b { font-size: 1.25rem; font-weight: 800; }
.date-badge small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }

/* ---------- Ministério ---------- */
.cover-card { border-radius: var(--radius-lg); background: var(--paper-raised); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 14px; }
.ministry-cover { aspect-ratio: 16 / 7; display: grid; place-items: center; background: linear-gradient(135deg, var(--cover), color-mix(in oklab, var(--cover) 55%, #000)); }
.ministry-cover > img { width: 100%; height: 100%; object-fit: cover; }
.m-avatar.xl { width: 96px; height: 96px; font-size: 2.2rem; border-radius: 26px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); }
.cover-name { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.cover-name .menu-icon { font-weight: 800; color: var(--brand); width: 26px; text-align: center; }
.cover-name .menu-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cover-name .menu-text small { color: var(--ink-soft); white-space: pre-line; }
.spacer { height: 14px; }
.person-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.member-row .role-leader { color: var(--brand); font-weight: 700; }
.member-row .role-moderator { color: #8a5a00; font-weight: 700; }
input.switch { appearance: none; width: 48px; height: 28px; flex: none; border-radius: 999px; background: var(--rule); position: relative; cursor: pointer; transition: background 0.15s; margin: 0; padding: 0; border: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.15s; }
input.switch:checked { background: var(--brand); }
input.switch:checked::after { transform: translateX(20px); }
input.switch:disabled { opacity: 0.5; }

/* convidar */
.invite-title { text-align: center; font-size: 1.15rem; font-weight: 600; margin: 8px 0 18px; display: flex; flex-direction: column; gap: 4px; }
.invite-title b { font-size: 1.5rem; font-weight: 800; }
.invite-options { display: grid; gap: 10px; }
.invite-options button { width: 100%; min-height: 50px; border-radius: 999px; }
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.countdown span { display: grid; place-items: center; padding: 10px 4px; border-radius: 12px; background: var(--paper); }
.countdown b { font-size: 1.4rem; font-weight: 800; }
.countdown small { color: var(--ink-soft); font-size: 0.75rem; }
.new-invite { display: block; margin: 8px auto 0; align-self: center; }
.version { text-align: center; color: var(--ink-soft); font-size: 0.82rem; margin-top: 18px; }
.menu-row.today { background: var(--brand-soft); }

/* ---------- Meu perfil ---------- */
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin: -16px calc(-1 * var(--gutter, 16px)) 18px; padding: 24px 16px 32px; background: var(--brand); color: var(--on-brand); border-radius: 0 0 50% 50% / 0 0 28px 28px; }
.profile-hero .profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 2rem; font-weight: 800; background: rgb(255 255 255 / 0.2); border: 3px solid rgb(255 255 255 / 0.6); margin-bottom: 8px; }
.profile-hero h1 { margin: 0; font-size: 1.4rem; color: inherit; }
.profile-hero p { margin: 0; opacity: 0.9; }
.count-badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 0.85rem; }
.g-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 800; box-shadow: 0 0 0 1px var(--rule); }
.delete-account { display: block; margin: 22px auto 0; align-self: center; color: var(--danger); }
.profile-edit { display: grid; gap: 14px; padding-top: 8px; }
.photo-button { justify-self: center; border: 0; background: none; box-shadow: none; padding: 0; min-height: 0; }
.edit-photo { position: relative; display: inline-block; }
.edit-photo .profile-photo { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; background: var(--brand-soft); color: var(--brand); }
.edit-badge { position: absolute; right: 2px; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); border: 3px solid var(--paper); font-size: 0.9rem; }
.field { display: grid; gap: 6px; }
.field input[readonly] { opacity: 0.7; }

/* escalas: rascunho, filtro e visão geral */
.draft-tag { margin-left: 8px; font-style: normal; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff3d6; color: #7a5200; vertical-align: middle; }
.filter-btn.on .dots { color: var(--brand); }
.filter-note { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: -6px 0 10px; }
.overview-nav { margin-bottom: 12px; }
.overview-scroll { overflow-x: auto; border-radius: var(--radius-lg); background: var(--paper-raised); box-shadow: var(--shadow-card); }
.overview-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 0.85rem; }
.overview-grid th, .overview-grid td { padding: 8px 10px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); vertical-align: top; text-align: left; min-width: 96px; }
.overview-grid thead th { position: sticky; top: 0; background: var(--paper-raised); }
.overview-grid thead a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.overview-grid thead small { color: var(--ink-soft); font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overview-grid .fn-col { position: sticky; left: 0; z-index: 1; background: var(--paper-raised); min-width: 78px; width: 78px; text-align: center; }
.overview-grid .fn-col small { display: block; color: var(--ink-soft); font-weight: 600; text-transform: capitalize; }
.overview-grid .fn-icon { font-size: 1.4rem; }
.who { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 999px; font-weight: 600; background: var(--paper); }
.who.status-confirmed { background: var(--brand-soft); color: var(--brand); }
.who.status-declined { background: color-mix(in oklab, var(--danger) 14%, transparent); color: var(--danger); text-decoration: line-through; }
.overview-legend { margin-top: 10px; }

/* editor da escala em abas (Detalhes · Participantes · Músicas · Roteiro) */
.editor-tabs { position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; margin-bottom: 14px; border-radius: 16px; background: var(--paper-raised); box-shadow: var(--shadow-card); }
.editor-tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; padding: 6px 2px; border: 0; border-radius: 12px; background: transparent; box-shadow: none; color: var(--ink-soft); font-size: 0.74rem; font-weight: 700; }
.editor-tabs button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.editor-tabs .tab-icon { font-size: 1.15rem; display: inline-flex; align-items: center; gap: 4px; line-height: 1; }
.editor-tabs .tab-icon small { font-size: 0.78rem; font-weight: 800; }
.tab-panel { display: grid; gap: 14px; }
.tab-panel[hidden] { display: none; }
.draft-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff8e6; color: #5c4300; font-size: 0.9rem; }
.top-songs { padding-left: 0; }
.top-songs .rank { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.who.status-pending { background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--rule); }

/* ---------- Repertório ---------- */
.rep-search { width: 100%; margin-bottom: 12px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-chip { min-height: 34px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); border: 0; box-shadow: none; font-weight: 700; font-size: 0.85rem; }
.song-badge { flex: none; min-width: 42px; height: 42px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 0.9rem; }
.has-cifra { background: var(--brand-soft) !important; color: var(--brand) !important; }
.rep-device { margin-top: 16px; text-align: center; }
.cifra-box { min-height: 180px; font-family: var(--mono, ui-monospace, monospace); font-size: 0.85rem; white-space: pre; }

/* ---------- Mural ---------- */
.wall { padding-bottom: 76px; }
.wall-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wall-post { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; }
.wall-post.mine { align-self: flex-end; flex-direction: row-reverse; }
.wall-post .person-avatar { width: 32px; height: 32px; font-size: 0.85rem; }
.bubble { padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--paper-raised); box-shadow: var(--shadow-card); min-width: 0; }
.wall-post.mine .bubble { border-radius: 16px 16px 4px 16px; background: var(--brand); color: var(--on-brand); }
.bubble p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { display: block; text-align: right; font-size: 0.7rem; opacity: 0.7; }
.bubble .who-name { font-size: 0.8rem; color: var(--brand); }
.wall-post .more-btn { width: 32px; height: 32px; min-width: 32px; }
.wall-composer { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 12; display: flex; align-items: flex-end; gap: 8px; max-width: var(--measure); margin: 0 auto; padding: 8px var(--gutter, 16px); background: var(--paper); }
.wall-input { font: inherit; flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 22px; padding: 12px 16px; }
.wall-send { width: 46px; height: 46px; min-width: 46px; padding: 0; border-radius: 50%; background: var(--brand); color: var(--on-brand); border: 0; font-size: 1.1rem; }
body:has(.wall-composer) .site-footer { display: none; }
.rep-device a { color: var(--brand); font-weight: 700; }

/* ---------- Painel geral ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-card { display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px; border-radius: var(--radius-lg); background: var(--paper-raised); box-shadow: var(--shadow-card); color: var(--ink); text-decoration: none; }
.stat-card b { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-card > span:nth-child(2) { font-size: 1rem; font-weight: 600; flex: 1; }
.stat-card.strong { background: var(--brand); color: var(--on-brand); }
.stat-icon { align-self: flex-start; font-size: 1.2rem; }
.stat-bar { display: grid; gap: 4px; }
.stat-bar small { font-size: 0.72rem; color: var(--ink-soft); }
.stat-bar i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--brand) var(--p), var(--rule) var(--p)); }
/* avisos */
.announce-icon { flex: none; width: 44px; height: 44px; border-radius: 14px 0 0 14px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: 1.2rem; }
.announcement h1 { margin: 6px 0 2px; font-size: 1.3rem; }
.announcement-body { white-space: pre-wrap; line-height: 1.55; }
.highlight-tag { margin-left: 0; }
.inline-switch { padding: 8px 0; }
.sheet-scroll { max-height: 46dvh; overflow-y: auto; }
.trash-note { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: var(--paper-raised); box-shadow: var(--shadow-card); }
.ministry-card .check .app-icon { color: var(--brand); width: 16px; height: 16px; margin: 0; }

/* painel do administrador: crescimento */
.growth .stat-card { min-height: 0; }
.growth .stat-card small { font-size: 0.78rem; }
.growth-title { margin-top: 18px; }
.growth-chart { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; height: 160px; align-items: end; margin-top: 8px; }
.growth-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.growth-col i { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: var(--brand); }
.growth-col small { font-size: 0.66rem; color: var(--ink-soft); white-space: nowrap; }
.growth-col .growth-value { color: var(--brand); font-weight: 800; font-size: 0.75rem; }

/* conflito de horário na escala */
.conflict-note { margin: 0 0 10px; padding: 10px 14px 10px 14px; list-style: none; border-radius: 12px; background: #fff3d6; color: #6b4a00; font-size: 0.88rem; display: grid; gap: 4px; }
.toggles button.conflict { box-shadow: inset 0 0 0 2px #e0a400; }
.toggles button.conflict::after { content: "!"; margin-left: 6px; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e0a400; color: #fff; font-size: 0.72rem; font-weight: 800; }

/* toda tela começa à mesma distância da barra do topo */
body.ministry-page > #view > :first-child,
body.ministry-page > #view > :first-child > :first-child:not(.profile-hero),
body.ministry-page > #view > :first-child > :first-child > :first-child { margin-top: 0; }
/* o botão flutuante (+) não cobre o rodapé */
body.ministry-page:has(.fab) > #view { padding-bottom: 0; }
body.ministry-page:has(.fab) > .site-footer { padding-bottom: 84px; }
