/* =====================================================================
   VÍNEA PREGADOR — Estilos base e componentes
   Mobile-first. Depende de tokens.css.
   ===================================================================== */

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

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,h2,h3,h4 { font-weight: 600; color: var(--text-strong); line-height: 1.25; }
a { color: var(--color-accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------
   FORM CONTROLS
   --------------------------------------------------------------------- */
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
label.field-label {
  display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px;
}
.field { margin-bottom: 14px; }

/* ---------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  padding: 12px 18px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-card); color: var(--text-strong);
  transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { background: var(--bg-soft); }
.btn:active { transform: scale(.985); }
.btn .ti { font-size: 18px; }
.btn-primary {
  background: var(--color-primary); color: var(--text-on-dark);
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { color: var(--danger); border-color: rgba(163,45,45,.28); background: var(--bg-card); }
.btn-danger:hover { background: var(--danger-bg); }

/* ---------------------------------------------------------------------
   LOGIN / AUTH
   --------------------------------------------------------------------- */
.auth-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 22px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(46,69,128,.10), transparent 60%),
    var(--bg-page);
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 30px 26px;
}
.brand-mark {
  width: 54px; height: 54px; border-radius: var(--r-lg);
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px;
}
.brand-logo { display: block; margin: 0 auto 14px; height: 58px; width: auto; }
.brand-wordmark { display: block; margin: 0 auto; height: 38px; width: auto; }
.brand-logo-sm { display: block; flex: none; }
.brand-eyebrow {
  text-align: center; font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
}
.brand-title {
  text-align: center; font-family: var(--font-serif);
  font-size: 26px; color: var(--color-primary); margin-top: 2px;
}
.brand-tagline {
  text-align: center; font-size: 13px; color: var(--text-muted);
  margin: 6px 0 22px; line-height: 1.5;
}
.auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.auth-links a { margin: 0 6px; }
.auth-error {
  background: var(--danger-bg); color: var(--danger-tx);
  border: 1px solid rgba(163,45,45,.25); border-radius: var(--r-md);
  padding: 10px 13px; font-size: 13px; margin-bottom: 14px;
}
.auth-note {
  background: var(--success-bg); color: var(--success-tx);
  border-radius: var(--r-md); padding: 10px 13px; font-size: 13px; margin-bottom: 14px;
}

/* ---------------------------------------------------------------------
   APP SHELL — mobile-first
   --------------------------------------------------------------------- */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

/* Topbar (sempre visível no mobile) */
.topbar {
  height: var(--topbar-h);
  background: var(--color-primary);
  color: var(--text-on-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .tb-title { font-size: 17px; font-weight: 500; }
.topbar .tb-sub { font-size: 11px; color: var(--text-on-dark-muted); }
.topbar .tb-brand { display: flex; align-items: center; gap: 11px; }
.topbar .tb-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; background: transparent; border: none;
}
.topbar .tb-icon:hover { background: rgba(255,255,255,.12); }

/* Conteúdo */
.content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--bottomnav-h) + 18px);
  max-width: var(--content-max);
  width: 100%; margin: 0 auto;
}

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--bottomnav-h);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-faint); font-size: 10.5px; text-decoration: none;
}
.bottom-nav a .ti { font-size: 22px; }
.bottom-nav a.active { color: var(--color-primary); }
.bottom-nav .bn-menu {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-faint); font-size: 10.5px; font-family: inherit;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.bottom-nav .bn-menu .ti { font-size: 22px; }

/* Sidebar (desktop) — escondida no mobile */
.sidebar { display: none; }

/* ---------------------------------------------------------------------
   CARDS / COMPONENTES GERAIS
   --------------------------------------------------------------------- */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.card + .card,
.card + .hero-card,
.hero-card + .card { margin-top: 12px; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-muted); margin: 18px 4px 8px;
}

.hero-card {
  background: var(--color-primary); color: #fff;
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-md);
}
.hero-card .hc-label { font-size: 11px; color: var(--text-on-dark-muted); }
.hero-card .hc-title { font-size: 18px; font-weight: 500; margin: 3px 0 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.stat {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 13px 14px; text-align: center;
}
.stat .s-label { font-size: 11px; color: var(--text-muted); }
.stat .s-value { font-size: 20px; font-weight: 600; color: var(--color-primary); margin-top: 3px; }
.stat .s-value.is-pos { color: var(--success); }
.stat .s-value.is-neg { color: var(--danger); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: var(--r-pill);
}
.badge-info    { background: var(--info-bg);    color: var(--info-tx); }
.badge-success { background: var(--success-bg); color: var(--success-tx); }
.badge-warning { background: var(--warning-bg); color: var(--warning-tx); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger-tx); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid; }
.alert .ti { font-size: 20px; margin-top: 1px; }
.alert-warning { background: var(--warning-bg); border-color: rgba(186,117,23,.3); color: var(--warning-tx); }
.alert-info    { background: var(--info-bg);    border-color: var(--border-strong); color: var(--info-tx); }
.alert-success { background: var(--success-bg); border-color: rgba(29,158,117,.3);  color: var(--success-tx); }

/* Tela de bloqueio / cancelamento */
.block-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 32px 26px; background: var(--bg-page);
}
.block-screen .bs-icon {
  width: 64px; height: 64px; border-radius: var(--r-lg);
  background: var(--danger-bg); color: var(--danger);
  display: flex; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 16px;
}
.block-screen h2 { margin-bottom: 8px; }
.block-screen p { color: var(--text-muted); max-width: 340px; margin-bottom: 20px; }

/* Faixa de aviso (vencendo / atraso) no topo do conteúdo */
.notice-bar {
  border-radius: var(--r-md); padding: 11px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.notice-bar.warn   { background: var(--warning-bg); color: var(--warning-tx); }
.notice-bar.danger { background: var(--danger-bg);  color: var(--danger-tx); }

/* Loader */
.loader-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--color-primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   DESKTOP (>= 900px): sidebar fixa, sem bottom-nav
   --------------------------------------------------------------------- */
@media (min-width: 900px) {
  .app-shell { flex-direction: row; }

  .sidebar {
    display: flex; flex-direction: column;
    width: var(--sidebar-w); min-height: 100dvh;
    background: var(--bg-sidebar); color: var(--text-on-dark);
    position: sticky; top: 0;
    padding: 22px 16px;
  }
  .sidebar .sb-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
  .sidebar .sb-brand .brand-logo-sm { width: 38px; height: 38px; }
  .sidebar .sb-brand .sb-name { font-family: var(--font-serif); font-size: 19px; color: #fff; }
  .sidebar nav { display: flex; flex-direction: column; gap: 3px; }
  .sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; border-radius: var(--r-md);
    color: var(--text-on-dark-muted); font-size: 14.5px; text-decoration: none;
  }
  .sidebar nav a .ti { font-size: 20px; }
  .sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .sidebar nav a.active { background: rgba(255,255,255,.14); color: #fff; }
  .sidebar .sb-foot { margin-top: auto; }

  .main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .topbar { display: none; }            /* topbar só no mobile */
  .bottom-nav { display: none; }         /* bottom-nav só no mobile */
  .content {
    padding: 26px 30px;
    padding-bottom: 40px;
  }
  .stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .desktop-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
  }
  .desktop-header h1 { font-size: 22px; }
}

@media (max-width: 899px) {
  .desktop-header { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =====================================================================
   MÓDULOS — Fase 2
   ===================================================================== */

/* utilidades */
.mobile-only { display: block; }
@media (min-width: 900px) { .mobile-only { display: none; } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.list-toolbar { margin-bottom: 12px; }
.btn-icon {
  width: 36px; height: 36px; border-radius: var(--r-md); border: none;
  background: transparent; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.btn-icon:hover { background: var(--bg-soft); color: var(--text-strong); }

/* hero / dashboard */
.hero-meta { font-size: 12.5px; opacity: .85; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-actions { display: flex; gap: 8px; margin-top: 12px; }
.hero-actions .btn { background: rgba(255,255,255,.14); color: #fff; border: none; }
.hero-actions .btn:hover { background: rgba(255,255,255,.24); }

.map-btn { background: var(--info-bg); color: var(--info-tx); border-color: transparent; }
.waze-btn { background: var(--warning-bg); color: var(--warning-tx); border-color: transparent; }

/* semana (dashboard) */
.week-card { padding: 6px 14px; }
.week-row { display: flex; gap: 11px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.week-row:last-child { border-bottom: none; }
.week-row.empty { align-items: center; }
.wr-day { min-width: 54px; font-size: 12px; color: var(--text-muted); padding-top: 2px; }
.wr-none { font-size: 12px; color: var(--text-faint); font-style: italic; }
.wr-bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--indigo-400); }
.wr-bar.conf { background: var(--success); } .wr-bar.done { background: var(--text-faint); }
.wr-bar.canceled { background: var(--danger); }
.wr-info .wr-title { font-size: 14px; font-weight: 500; color: var(--text-strong); }
.wr-info .wr-sub { font-size: 12px; color: var(--text-muted); margin: 1px 0 5px; }

/* calendário semanal (agenda) */
.wcal { padding: 0; overflow: hidden; }
.wcal-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px 11px; border-bottom: 1px solid var(--border); }
.wcal-title { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.wcal-nav { display: flex; gap: 2px; }
.days-row { display: grid; grid-template-columns: repeat(7,1fr); padding: 10px 8px 6px; }
.day-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day-name { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .4px; }
.day-num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text); }
.day-num.today { background: var(--color-primary); color: #fff; font-weight: 600; }
.day-num.has:not(.today) { color: var(--color-primary); font-weight: 600; }
.day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary); }
.day-dot.empty { background: transparent; }
.week-events { padding: 4px 14px 12px; }
.we-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.we-row:last-child { border-bottom: none; }
.we-time { font-size: 11px; color: var(--text-muted); min-width: 42px; text-align: center; padding-top: 2px; }
.we-bar { width: 3px; align-self: stretch; min-height: 38px; border-radius: 2px; background: var(--indigo-400); }
.we-bar.conf { background: var(--success); } .we-bar.done { background: var(--text-faint); } .we-bar.canceled { background: var(--danger); }
.we-info { flex: 1; min-width: 0; }
.we-title { font-size: 14.5px; font-weight: 500; color: var(--text-strong); }
.we-sub { font-size: 12px; color: var(--text-muted); margin: 1px 0 6px; }
.we-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.map-mini { text-decoration: none; }
.week-empty { text-align: center; color: var(--text-faint); font-size: 13px; padding: 22px 0; }

/* cards de igreja */
.church-card { padding: 15px 16px; }
.church-head { display: flex; align-items: center; gap: 11px; }
.church-avatar { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--bg-soft); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--color-primary); font-size: 20px; }
.church-id { flex: 1; min-width: 0; }
.church-name { font-size: 15px; font-weight: 500; color: var(--text-strong); }
.church-sub { font-size: 12px; color: var(--text-muted); }
.church-addr { font-size: 12px; color: var(--text-muted); margin: 10px 0 8px; display: flex; gap: 5px; align-items: flex-start; }
.map-row { display: flex; gap: 8px; margin-bottom: 10px; }
.map-row .btn { flex: 1; justify-content: center; }
.church-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; border-top: 1px solid var(--border); padding-top: 11px; margin-top: 4px; }
.cstat { text-align: center; }
.cstat .cv { font-size: 14px; font-weight: 600; color: var(--color-primary); }
.cstat .cl { font-size: 10px; color: var(--text-muted); }

/* financeiro */
.fin-total { background: var(--color-primary); color: #fff; border-radius: var(--r-lg); padding: 20px; text-align: center; box-shadow: var(--shadow-md); }
.fin-total .ft-label { font-size: 12px; opacity: .7; }
.fin-total .ft-amount { font-size: 30px; font-weight: 600; margin: 2px 0 8px; }
.fin-total .ft-split { display: flex; justify-content: center; gap: 24px; font-size: 12.5px; opacity: .85; }
.fin-total .ft-split span { display: inline-flex; align-items: center; gap: 5px; }
.fin-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.fin-row:last-child { border-bottom: none; }
.fin-ic { width: 36px; height: 36px; min-width: 36px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.fin-ic.income { background: var(--success-bg); color: var(--success-tx); }
.fin-ic.expense { background: var(--danger-bg); color: var(--danger-tx); }
.fin-desc { flex: 1; min-width: 0; }
.fin-name { font-size: 14px; color: var(--text-strong); }
.fin-sub { font-size: 11.5px; color: var(--text-muted); }
.fin-amt { font-size: 14px; font-weight: 600; }
.fin-amt.pos { color: var(--success); } .fin-amt.neg { color: var(--danger); }

/* chips / segment */
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.chip { font-size: 12px; padding: 6px 13px; border-radius: var(--r-pill); background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); cursor: pointer; font-family: inherit; }
.chip.on { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.seg { display: flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; margin-bottom: 14px; }
.seg-btn { flex: 1; padding: 9px; border: none; background: transparent; border-radius: 9px; font-size: 14px; color: var(--text-muted); font-family: inherit; }
.seg-btn.on { background: var(--bg-card); color: var(--color-primary); font-weight: 500; box-shadow: var(--shadow-sm); }

/* conta */
.acct-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.acct-row:last-of-type { border-bottom: none; }
.acct-row strong { color: var(--text-strong); font-weight: 500; }
.pix-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 14px; }
.pix-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.pix-line:last-child { border-bottom: none; }
.pix-line strong { color: var(--text-strong); font-weight: 500; text-align: right; word-break: break-all; }

/* empty state */
.empty-card { text-align: center; padding: 30px 22px; }
.empty-icon { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--bg-soft); border: 1px solid var(--border); color: var(--color-primary); font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.empty-card h3 { margin-bottom: 6px; }
.empty-card p { color: var(--text-muted); max-width: 360px; margin: 0 auto 16px; font-size: 14px; }

/* completar agenda */
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exp-row label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.balance-preview { margin-top: 14px; padding: 12px; background: var(--bg-soft); border-radius: var(--r-md); text-align: center; font-weight: 600; color: var(--color-primary); }

/* =====================================================================
   MODAL / BOTTOM-SHEET + TOAST
   ===================================================================== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(14,22,40,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  background: var(--bg-card); width: 100%; max-width: 520px;
  border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh;
  display: flex; flex-direction: column; animation: slideup .22s ease;
}
@keyframes slideup { from { transform: translateY(100%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { font-size: 17px; }
.sheet-close { width: 34px; height: 34px; border-radius: var(--r-md); border: none; background: var(--bg-soft); color: var(--text-muted); font-size: 18px; display: flex; align-items: center; justify-content: center; }
.sheet-body { padding: 16px 18px; overflow-y: auto; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn-danger { flex: 0 0 auto; }
.menu-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 6px; border: none; background: transparent; font-size: 15px; color: var(--text-strong); font-family: inherit; border-bottom: 1px solid var(--border); }
.menu-item:last-child { border-bottom: none; }
.menu-item i { font-size: 20px; color: var(--text-muted); }
.menu-item.danger { color: var(--danger); } .menu-item.danger i { color: var(--danger); }

@media (min-width: 900px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: var(--r-xl); max-height: 88dvh; }
  @keyframes slideup { from { transform: translateY(20px); opacity: 0; } }
}

#toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--bottomnav-h) + 14px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { #toast-host { bottom: 22px; } }
.toast { background: var(--indigo-900); color: #fff; padding: 11px 18px; border-radius: var(--r-pill); font-size: 13.5px; box-shadow: var(--shadow-lg); animation: fade .15s ease; max-width: 90vw; }
.toast-err { background: var(--danger); }
.toast.out { opacity: 0; transition: opacity .25s; }

/* =====================================================================
   RELATÓRIOS — gráficos de barra simples
   ===================================================================== */
.rep-split { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 12px; }
.rep-bars { display: flex; flex-direction: column; gap: 8px; }
.rep-bar-row { display: flex; align-items: center; gap: 10px; }
.rep-bar-label { font-size: 12px; color: var(--text-muted); min-width: 64px; }
.rep-bar-track { flex: 1; height: 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.rep-bar-fill { height: 100%; background: var(--color-primary); border-radius: 5px; }
.rep-bar-val { font-size: 12px; font-weight: 600; color: var(--color-primary); min-width: 56px; text-align: right; }

/* logo lockup (broto + wordmark) na tela de login */
.brand-login { display:block; margin:0 auto 16px; width:160px; max-width:70%; height:auto; }

/* =====================================================================
   VISUALIZAÇÃO DO ESBOÇO (tela cheia) + impressão
   ===================================================================== */
.sermon-view { position:fixed; inset:0; z-index:90; background:var(--bg-page); display:flex; flex-direction:column; animation:fade .15s ease; }
.sv-bar { display:flex; align-items:center; gap:10px; padding:10px 14px; background:var(--color-primary); color:#fff; }
.sv-bar .sv-title { flex:1; text-align:center; font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sv-btn { background:rgba(255,255,255,.16); color:#fff; border:none; border-radius:var(--r-md); padding:9px 13px; font-family:inherit; font-size:13px; display:flex; align-items:center; gap:6px; cursor:pointer; }
.sv-btn.primary { background:#fff; color:var(--color-primary); font-weight:600; }
.sv-scroll { flex:1; overflow:auto; padding:18px; display:flex; justify-content:center; -webkit-overflow-scrolling:touch; }
.sv-doc { width:720px; max-width:100%; height:max-content; }
.sv-doc #pdf-root { width:100% !important; box-shadow:var(--shadow-md); border-radius:14px; }

@media print {
  body > *:not(.sermon-view) { display:none !important; }
  .sermon-view { position:static; background:#fff; }
  .sv-bar { display:none !important; }
  .sv-scroll { overflow:visible; padding:0; display:block; }
  .sv-doc { width:auto; max-width:none; }
  .sv-doc #pdf-root { box-shadow:none !important; border-radius:0 !important; padding:8mm 6mm !important; }
  @page { margin:10mm; }
}

/* linhas de entrada/saída ao concluir agenda */
.line-list { display:flex; flex-direction:column; gap:8px; }
.line-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.line-row .line-cat { flex:1 1 130px; min-width:0; }
.line-row .line-amt { flex:0 0 92px; }
.line-row .line-other { flex:1 1 100%; order:5; }
.line-row .line-del { flex:0 0 auto; color:var(--danger); }

/* =====================================================================
   SINO / COMUNICADOS  +  COBRANÇAS
   ===================================================================== */
.tb-actions { display:flex; align-items:center; gap:4px; }
.bell-btn { position:relative; background:transparent; border:none; cursor:pointer; }
.sb-bell { width:38px; height:38px; border-radius:var(--r-md); color:#fff; font-size:21px; display:flex; align-items:center; justify-content:center; }
.sb-bell:hover { background:rgba(255,255,255,.12); }
.bell-dot { position:absolute; top:7px; right:7px; width:9px; height:9px; border-radius:50%; background:var(--danger); border:2px solid var(--color-primary); }

.ann-item { padding:14px 0; border-bottom:1px solid var(--border); }
.ann-item:last-child { border-bottom:none; }
.ann-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ann-head .ann-date { font-size:12px; color:var(--text-muted); }
.ann-head .ann-del { margin-left:auto; background:transparent; border:none; color:var(--text-faint); cursor:pointer; font-size:16px; }
.ann-head .ann-del:hover { color:var(--danger); }
.ann-title { font-weight:600; margin-bottom:3px; }
.ann-body { color:var(--text-muted); font-size:14px; white-space:pre-wrap; }

.charge-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:11px 0; border-bottom:1px solid var(--border); }
.charge-row:last-child { border-bottom:none; }
.charge-info { min-width:0; }
.charge-month { font-weight:600; text-transform:capitalize; }
.charge-sub { font-size:12.5px; color:var(--text-muted); }
.charge-row .btn-sm { flex-basis:100%; justify-content:center; }
@media (min-width:560px){ .charge-row .btn-sm { flex-basis:auto; } }

/* Card de dízimo (financeiro) */
.tithe-card { display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--success-bg); color:var(--success-tx); border-radius:var(--r-md);
  padding:12px 16px; margin:12px 0; font-size:14px; font-weight:500; }
.tithe-card strong { font-size:18px; }

/* Tela de acesso expirado/bloqueado (login) */
.auth-expired { background:#FFF4F2; border:1px solid #F3C9C0; border-radius:var(--r-md);
  padding:18px 16px; margin-bottom:16px; text-align:center; }
.auth-expired .ae-icon { width:44px;height:44px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;font-size:22px;color:#C0392B;margin:0 auto 8px; }
.auth-expired h3 { font-size:16px; color:#9B2C1E; margin-bottom:6px; }
.auth-expired p { font-size:13.5px; color:#7a3b30; margin-bottom:12px; }
.btn-wa-block { display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  background:#25D366;color:#fff;border:none;font-weight:700; }


/* Visão mensal (calendário tipo Google Agenda) */
.wcal { padding:16px 14px 18px; }
.month-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-top:6px; padding:0 2px; }
.mc-wd { text-align:center; font-size:11px; font-weight:700; color:var(--text-muted); padding:4px 0; }
.mc-cell { min-height:74px; border:none; background:var(--bg-page); border-radius:9px;
  display:flex; flex-direction:column; align-items:stretch; justify-content:flex-start;
  padding:4px 4px 5px; cursor:pointer; position:relative; transition:background .1s; overflow:hidden; text-align:left; }
.mc-cell.empty { background:transparent; cursor:default; }
.mc-cell:not(.empty):hover { background:var(--border); }
.mc-cell.today { outline:2px solid var(--color-primary); }
.mc-cell.sel { outline:2px solid var(--accent); background:#fff; }
.mc-num { font-size:12.5px; font-weight:700; color:var(--text-strong); align-self:flex-end; line-height:1; margin-bottom:3px; }
.mc-cell.today .mc-num { color:var(--color-primary); }
.mc-bars { display:flex; flex-direction:column; gap:2px; }
.mc-bar { font-size:9.5px; line-height:1.25; color:var(--text-strong); border-radius:3px;
  padding:1px 4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mc-more { font-size:9px; color:var(--text-muted); font-weight:700; padding-left:3px; }
.mc-daylist { margin-top:12px; }
.mc-daylist-title { font-weight:700; color:var(--color-primary); margin:0 0 8px 2px; text-transform:capitalize; }

/* seletor de cor no formulário */
.color-pick { display:flex; gap:10px; flex-wrap:wrap; padding:4px 0; }
.color-dot { width:30px; height:30px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0; }
.color-dot.sel { border-color:var(--text-strong); box-shadow:0 0 0 2px #fff inset; }

@media (max-width: 600px) {
  .wcal { padding:12px 10px 14px; }
  .mc-cell { min-height:58px; padding:3px 2px 4px; }
  .mc-bar { font-size:8px; padding:1px 3px; }
  .mc-num { font-size:11.5px; }
}
@media (min-width: 900px) {
  .wcal { padding:22px 22px 26px; max-width:920px; margin:0 auto; }
  .mc-cell { min-height:96px; }
  .mc-bar { font-size:11px; }
}

/* Contatos */
.contact-card { padding:14px; }
.ct-row { display:flex; gap:12px; align-items:flex-start; }
.ct-avatar { width:44px; height:44px; border-radius:50%; background:var(--color-primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; flex-shrink:0; }
.ct-info { flex:1; min-width:0; }
.ct-name { font-weight:700; color:var(--text-strong); }
.ct-sub { font-size:13px; color:var(--text-muted); }
.ct-note { font-size:13px; color:var(--text-muted); margin-top:3px; }
.ct-bday { font-size:12.5px; color:var(--accent); margin-top:3px; }
.ct-actions { display:flex; gap:8px; margin-top:10px; }
.ct-actions .btn { flex:1; justify-content:center; }

/* Aniversários e lembretes no dashboard */
.bd-card { padding:6px 12px; }
.bd-row { display:flex; align-items:center; gap:11px; padding:9px 0; border-bottom:1px solid var(--border); text-decoration:none; color:inherit; }
.bd-row:last-child { border-bottom:none; }
.bd-ic { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.bd-info { flex:1; min-width:0; display:flex; flex-direction:column; }
.bd-name { font-weight:600; color:var(--text-strong); }
.bd-sub { font-size:12.5px; color:var(--text-muted); }

/* Lembretes (módulo) */
.rem-card { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; }
.rem-main { display:flex; align-items:center; gap:11px; flex:1; min-width:0; }
.rem-check { background:none; border:none; font-size:22px; color:var(--text-muted); cursor:pointer; padding:0; }
.rem-info { min-width:0; }
.rem-title { font-weight:600; color:var(--text-strong); }
.rem-when { font-size:12.5px; color:var(--text-muted); }
.rem-late .rem-when { color:var(--danger); }
.rem-actions { display:flex; gap:6px; }
.danger-ghost { color:var(--danger); border:1px solid var(--border); background:transparent; }

/* Log de atividade (painel admin) */
.act-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:6px 14px; margin-top:8px;
  padding-top:10px; border-top:1px solid var(--border); }
.act-item { display:flex; justify-content:space-between; font-size:12.5px; }
.act-k { color:var(--text-muted); }
.act-v { color:var(--text-strong); font-weight:600; }
@media (min-width:640px){ .act-grid { grid-template-columns:repeat(3,1fr); } }

/* Devocional */
.verse-card { display:block; text-decoration:none; color:inherit; background:linear-gradient(135deg,var(--color-primary),var(--color-accent)); color:#fff; }
.verse-card .verse-top { font-size:12px; opacity:.85; display:flex; align-items:center; gap:6px; }
.verse-card .verse-text { font-family:var(--font-serif); font-size:16.5px; line-height:1.5; margin:8px 0 6px; }
.verse-card .verse-ref { font-size:12.5px; opacity:.9; }
.devo-today { border-left:3px solid var(--color-accent); }
.devo-badge { font-size:11.5px; font-weight:700; letter-spacing:.5px; text-transform:uppercase; color:var(--color-accent); }
.devo-verse { font-family:var(--font-serif); font-size:18px; line-height:1.55; color:var(--text-strong); margin:10px 0 4px; }
.devo-ref { font-size:13px; color:var(--text-muted); margin-bottom:10px; }
.devo-title { font-size:17px; color:var(--text-strong); margin:0 0 6px; }
.devo-body { font-size:14.5px; color:var(--text); line-height:1.7; margin-bottom:12px; }
.devo-item { }
.devo-item-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.devo-chip { font-size:11px; font-weight:700; background:var(--info-bg); color:var(--info-tx); padding:3px 9px; border-radius:100px; }
.devo-item-ref { font-size:12px; color:var(--text-muted); }
.devo-item-title { font-size:15.5px; color:var(--text-strong); margin:0 0 4px; }
.devo-item-verse { font-family:var(--font-serif); font-size:14px; color:var(--text-muted); margin:0 0 6px; }
.devo-item-body { font-size:14px; color:var(--text); line-height:1.65; }

/* Switch (tema) */
.switch { position:relative; display:inline-block; width:46px; height:26px; }
.switch input { opacity:0; width:0; height:0; }
.switch-slider { position:absolute; cursor:pointer; inset:0; background:var(--border-strong); border-radius:26px; transition:.2s; }
.switch-slider::before { content:""; position:absolute; height:20px; width:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.switch input:checked + .switch-slider { background:var(--color-accent); }
.switch input:checked + .switch-slider::before { transform:translateX(20px); }

/* Devocional — interação (curtir + anotar) */
.devo-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:6px; }
.devo-like { display:inline-flex; align-items:center; gap:6px; background:transparent; border:1px solid var(--border); color:var(--text-muted); border-radius:10px; padding:7px 12px; font-size:13.5px; font-weight:600; cursor:pointer; font-family:inherit; }
.devo-like.on { color:#e0245e; border-color:#e0245e; background:rgba(224,36,94,.06); }
.devo-like.on i { color:#e0245e; }
.devo-note-box { margin-top:10px; }
.devo-note-box textarea { width:100%; min-height:70px; margin-bottom:8px; }
.devo-note-saved { margin-top:10px; background:var(--bg-soft); border-left:3px solid var(--color-accent); border-radius:8px; padding:9px 12px; font-size:14px; color:var(--text); }

/* Painel de Saúde (admin) */
.kpi-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:6px; }
@media (min-width:560px){ .kpi-grid { grid-template-columns:repeat(3,1fr); } }
@media (min-width:820px){ .kpi-grid { grid-template-columns:repeat(4,1fr); } }
.card.kpi { padding:14px 16px; text-align:center; }
.kpi-label { font-size:12px; color:var(--text-muted); margin-bottom:4px; }
.kpi-val { font-size:22px; font-weight:800; color:var(--text-strong); line-height:1.1; }
.grid-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.grid-table thead th { text-align:left; font-size:11.5px; letter-spacing:.4px; text-transform:uppercase;
  color:var(--text-muted); font-weight:700; padding:11px 12px; border-bottom:1px solid var(--border); }
.grid-table tbody td { padding:11px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.grid-table tbody tr:last-child td { border-bottom:none; }
.grid-table .gt-name { font-weight:600; color:var(--text-strong); }
.grid-table .gt-num { text-align:right; font-variant-numeric:tabular-nums; color:var(--text); white-space:nowrap; }
.grid-table thead th:not(:first-child), .grid-table tbody td.gt-num { text-align:right; }

/* Cards de usuário (aba Pregadores) */
.user-cards { display:grid; grid-template-columns:1fr; gap:12px; }
@media (min-width:520px){ .user-cards { grid-template-columns:repeat(2,1fr); } }
@media (min-width:860px){ .user-cards { grid-template-columns:repeat(3,1fr); } }
.user-card { background:var(--bg-card); border:1px solid var(--border); border-radius:16px; padding:16px;
  cursor:pointer; transition:transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .2s; }
.user-card:hover { transform:translateY(-3px); box-shadow:0 12px 28px rgba(30,46,82,.12); border-color:var(--border-strong); }
.user-card:active { transform:translateY(0); }
.uc-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.uc-name { font-weight:700; font-size:16px; color:var(--text-strong); line-height:1.25; }
.uc-email { font-size:13px; color:var(--text-muted); margin-top:2px; word-break:break-word; }
.uc-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.uc-chip { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600;
  color:var(--text); background:var(--bg-soft); border-radius:100px; padding:4px 10px; }
.uc-chip i { font-size:14px; opacity:.8; }
.uc-ref { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--accent); margin-top:10px;
  padding-top:10px; border-top:1px solid var(--border); }
.uc-ref i { font-size:14px; }
