/* ═══════════════════════════════════════════
   RESET & VARIÁVEIS
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 270px;
  --white:     #ffffff;
  --bg:        #f0f2f6;
  --sb-bg:     #1e2a3b;
  --sb-hover:  #273547;
  --sb-active: #2563eb;
  --sb-text:   #94a3b8;
  --sb-text2:  #cbd5e1;
  --text:      #1e293b;
  --muted:     #64748b;
  --border:    #e2e8f0;
  --shadow:    0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --radius:    14px;
  --radius-sm: 8px;

  /* Paleta de cargos */
  --c-admin:    #7c3aed;
  --c-mestre:   #b45309;
  --c-vig1:     #0369a1;
  --c-vig2:     #0891b2;
  --c-fin:      #059669;
  --c-sec:      #d97706;
  --c-chan:     #9333ea;
  --c-arq:     #475569;
  --c-alm:     #b45309;
  --c-irmao:   #64748b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   LAYOUT GERAL
═══════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sb-bg);
  color: var(--sb-text2);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 200;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.brand-icon {
  width: 40px; height: 40px;
  background: var(--sb-active);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0;
}
.brand-title { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.brand-sub   { font-size: 12px; color: var(--sb-text); margin-top: 1px; }

.sidebar-section { padding: 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-section.grow { flex: 1; border-bottom: none; }
.sidebar-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--sb-text); margin-bottom: 10px; padding: 0 4px;
}

/* Login inputs */
.sb-input {
  display: block; width: 100%;
  padding: 9px 12px; margin-bottom: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: #f1f5f9; font-size: 13px;
}
.sb-input:focus { outline: none; border-color: var(--sb-active); }
.sb-input::placeholder { color: #64748b; }

.btn-login {
  width: 100%; padding: 10px;
  background: var(--sb-active); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  margin-top: 2px;
}
.btn-login:hover { background: #1d4ed8; }

.sb-msg { font-size: 12px; color: #f87171; margin-top: 6px; min-height: 18px; }

/* Usuário autenticado */
.user-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sb-active);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.user-name  { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.user-cargo { font-size: 11px; color: var(--sb-text); margin-top: 2px; }
.btn-criar-conta {
  display: block; width: 100%; padding: 8px; margin-top: 8px;
  background: transparent; color: #7dd3fc;
  border: 1px solid rgba(125,211,252,0.25); border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; text-align: center;
}
.btn-criar-conta:hover { background: rgba(125,211,252,0.08); }

.btn-logout {
  width: 100%; padding: 8px;
  background: rgba(220,38,38,0.15); color: #fca5a5;
  border: 1px solid rgba(220,38,38,0.25); border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer;
}
.btn-logout:hover { background: rgba(220,38,38,0.28); }

/* Nav de cargos */
.cargo-nav { display: flex; flex-direction: column; gap: 2px; }
.cargo-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  font-size: 13px; color: var(--sb-text2);
}
.cargo-nav-item:hover   { background: var(--sb-hover); }
.cargo-nav-item.active  { background: rgba(37,99,235,0.2); color: #93c5fd; }
.cargo-nav-item .dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.cargo-nav-item .nivel-badge {
  margin-left: auto; font-size: 10px; color: var(--sb-text);
  background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 99px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.btn-print {
  width: 100%; padding: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--sb-text2); border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer;
}
.btn-print:hover { background: rgba(255,255,255,0.12); }

/* ═══════════════════════════════════════════
   ÁREA PRINCIPAL
═══════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 36px;
  min-height: 100vh;
}

/* ── HOME VIEW ── */
.home-view { max-width: 960px; }

.home-hero {
  margin-bottom: 32px;
}
.home-badge {
  display: inline-block;
  background: rgba(37,99,235,0.1); color: #2563eb;
  border: 1px solid rgba(37,99,235,0.25);
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  margin-bottom: 14px; text-transform: uppercase;
}
.home-hero h1 {
  font-size: 32px; font-weight: 800; color: var(--text);
  margin-bottom: 10px;
}
.home-hero p { font-size: 16px; color: var(--muted); max-width: 600px; }

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.home-cargo-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
}
.home-cargo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--card-color, #2563eb);
}
.home-cargo-card .card-icon { font-size: 28px; margin-bottom: 10px; }
.home-cargo-card .card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.home-cargo-card .card-nivel { font-size: 12px; color: var(--muted); }
.home-cargo-card .card-nivel span {
  background: #f1f5f9; padding: 2px 8px; border-radius: 99px; font-size: 11px;
}

/* ── CARGO HEADER ── */
.cargo-header {
  display: flex; align-items: flex-start; gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--cargo-cor, #2563eb);
  page-break-inside: avoid;
}
.cargo-header-icon {
  font-size: 44px; line-height: 1; flex-shrink: 0;
}
.cargo-header-info { flex: 1; }
.cargo-header-info h1 {
  font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px;
}
.cargo-header-info p { font-size: 15px; color: var(--muted); max-width: 700px; }
.nivel-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  background: #f1f5f9; border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.nivel-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── SEÇÕES ── */
.content-section { margin-bottom: 36px; }
.section-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Card de responsabilidade */
.resp-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  page-break-inside: avoid;
}
.resp-card-icon { font-size: 22px; margin-bottom: 10px; }
.resp-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.resp-card-desc  { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* Card de funcionalidade */
.func-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  page-break-inside: avoid;
  transition: box-shadow 0.15s;
}
.func-card:hover { box-shadow: var(--shadow-md); }

.func-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.func-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: #f1f5f9;
}
.func-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.func-card-desc  { font-size: 13px; color: var(--muted); line-height: 1.5; }

.func-card-quem {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}
.func-card-quem strong { color: var(--text); }

.func-card-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.func-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s;
}
.func-btn:hover   { opacity: 0.8; }
.func-btn.primary { background: #2563eb; color: #fff; }
.func-btn.success { background: #059669; color: #fff; }
.func-btn.warning { background: #d97706; color: #fff; }
.func-btn.danger  { background: #dc2626; color: #fff; }
.func-btn.neutral { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.func-btn.locked  { background: #f1f5f9; color: #94a3b8; border-color: var(--border); cursor: not-allowed; }

.badge-locked {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #94a3b8;
  background: #f8fafc; border: 1px solid #e2e8f0;
  padding: 3px 8px; border-radius: 99px; margin-top: 10px;
}

/* ═══════════════════════════════════════════
   MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed;
  top: 0; right: 0; bottom: 0; left: 0; /* fallback iOS < 14.5 */
  inset: 0;
  background: rgba(0,0,0,0.4); z-index: 500;
  align-items: center; justify-content: center;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title  { font-size: 17px; font-weight: 700; }
.modal-close  { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.modal-body   { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

.modal-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.modal-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text);
}
.modal-input:focus { outline: none; border-color: #2563eb; }
.modal-result {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  font-size: 13px; line-height: 1.55;
  white-space: pre-wrap; max-height: 200px; overflow-y: auto;
  color: var(--muted);
}
.modal-result.ok    { border-color: #6ee7b7; background: #f0fdf4; color: #065f46; }
.modal-result.error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }

/* ═══════════════════════════════════════════
   PRÉ-LOGIN
═══════════════════════════════════════════ */
.prelogin-view {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 90vh;
  user-select: none;
}
.prelogin-symbol {
  width: 24vw; max-width: 280px; min-width: 160px;
  animation: fadeIn 0.8s ease;
}
.masonic-img {
  width: 100%; height: auto; display: block;
  border-radius: 12px;
  filter: drop-shadow(0 6px 28px rgba(0,0,0,0.12));
}
.masonic-svg { width: 100%; height: auto; display: block; }
.prelogin-label {
  margin-top: 28px;
  font-size: 22px; font-weight: 700; color: #1e293b;
  letter-spacing: 0.03em;
  animation: fadeIn 1s ease;
}
.prelogin-sub {
  margin-top: 8px;
  font-size: 14px; color: var(--muted);
  animation: fadeIn 1.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════
   CADASTRO DE IRMÃOS
═══════════════════════════════════════════ */
.irmao-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.irmao-header h1 { font-size: 26px; font-weight: 800; }
.irmao-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.irmao-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  page-break-inside: avoid;
}
.irmao-card-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.irmao-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.irmao-card-name  { font-size: 16px; font-weight: 700; color: var(--text); }
.irmao-card-cim   { font-size: 12px; color: var(--muted); margin-top: 2px; }
.irmao-card-body  { font-size: 13px; color: var(--muted); line-height: 1.8; }
.irmao-card-body strong { color: var(--text); }
.irmao-card-tags  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.irmao-card-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.irmao-card-actions .func-btn { font-size: 12px; padding: 4px 12px; }
.tag {
  font-size: 11px; padding: 3px 10px; border-radius: 99px;
  font-weight: 600;
}
.tag-regular  { background: #dbeafe; color: #1e40af; }
.tag-idoso    { background: #d1fae5; color: #065f46; }
.tag-potencia { background: #ede9fe; color: #5b21b6; }
.tag-especial { background: #fef3c7; color: #92400e; }
.tag-aniv     { background: #fce7f3; color: #9d174d; }

.mensalidade-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.mensalidade-info h2 { font-size: 16px; margin-bottom: 14px; }
.mensalidade-categorias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.cat-card {
  border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid transparent;
}
.cat-card.regular  { background: #eff6ff; border-color: #bfdbfe; }
.cat-card.idoso    { background: #f0fdf4; border-color: #bbf7d0; }
.cat-card.potencia { background: #f5f3ff; border-color: #ddd6fe; }
.cat-card.especial { background: #fffbeb; border-color: #fde68a; }
.cat-card-titulo   { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.cat-card-desc     { font-size: 12px; color: var(--muted); }
.cat-card-valor    { font-size: 16px; font-weight: 800; margin-top: 8px; }

.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.form-card h2 { font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-input {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: #f8fafc;
}
.form-input:focus { outline: none; border-color: #2563eb; background: #fff; }
.form-select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: #f8fafc; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

.sidebar-nav-module {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  font-size: 13px; color: var(--sb-text2);
  border-left: 2px solid transparent;
}
.sidebar-nav-module:hover  { background: var(--sb-hover); }
.sidebar-nav-module.active { background: rgba(37,99,235,0.2); color: #93c5fd; border-left-color: #2563eb; }

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  body { background: #fff; font-size: 13px; }
  .sidebar, .func-card-actions, .btn-print, .badge-locked, .modal-overlay { display: none !important; }
  .main { margin-left: 0; padding: 20px; }
  .home-view { display: none !important; }
  .cargo-header {
    border: 2px solid #e2e8f0 !important;
    box-shadow: none;
    border-left: 6px solid currentColor !important;
  }
  .func-card, .resp-card {
    border: 1px solid #e2e8f0;
    box-shadow: none;
    break-inside: avoid;
  }
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .section-title { color: #334155; }
  h1 { font-size: 22px !important; }
  .content-section { margin-bottom: 24px; }
  .func-card-quem { display: block; }
  @page { margin: 1.5cm; size: A4; }
}

/* ═══════════════════════════════════════════
   RESPONSIVO
═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   RESPONSIVO — MOBILE
═══════════════════════════════════════════ */

/* Botão hamburguer (só mobile) */
.hamburger {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 400;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--sb-bg); border: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: #f1f5f9; border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay escuro quando sidebar aberta no mobile */
.sidebar-overlay {
  display: none; position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: rgba(0,0,0,0.45); z-index: 150;
}
.sidebar-overlay.open { display: block; }

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  /* iOS Safari: impede zoom automático ao focar em inputs */
  input, select, textarea,
  .sb-input, .modal-input, .form-input, .form-select {
    font-size: 16px !important;
  }

  .hamburger { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    width: 280px;
    z-index: 300;
  }
  .sidebar.open { transform: translateX(0); }

  .main {
    margin-left: 0;
    padding: 64px 14px 24px;
  }

  /* Cards em coluna única no mobile */
  .cards-grid,
  .home-cards,
  .irmao-grid,
  .mensalidade-categorias { grid-template-columns: 1fr; }

  /* Cargo header empilhado */
  .cargo-header { flex-direction: column; gap: 12px; padding: 16px; }
  .cargo-header-icon { font-size: 34px; }
  .cargo-header-info h1 { font-size: 20px; }

  /* Formulários em coluna única */
  .form-grid { grid-template-columns: 1fr; }

  /* Aniversários header empilhado */
  .irmao-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Pre-login: símbolo menor */
  .prelogin-symbol { width: 55vw; max-width: 220px; }
  .prelogin-label { font-size: 18px; }

  /* Modal ocupa tela toda */
  .modal-box { max-width: 100%; margin: 0 12px; }

  /* Home hero */
  .home-hero h1 { font-size: 22px; }

  /* Func cards sem botão visível na listagem do cargo */
  .section-title { font-size: 12px; }
}

@media (max-width: 480px) {
  .main { padding: 60px 10px 20px; }
  .cargo-header { padding: 14px; }
  .func-card, .resp-card, .irmao-card { padding: 14px; }
  .func-card-title { font-size: 14px; }
}

/* ═══════════════════════════════════════════
   VIEW HEADER GENÉRICO
═══════════════════════════════════════════ */
.view-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
.view-header h1 { font-size:22px; font-weight:700; color:var(--text); }
.btn-primary  { background:var(--sb-active); color:#fff; border:none; border-radius:8px; padding:8px 16px; cursor:pointer; font-size:13px; font-weight:600; }
.btn-primary:hover { opacity:.9; }
.btn-neutral  { background:#e2e8f0; color:var(--text); border:none; border-radius:8px; padding:8px 16px; cursor:pointer; font-size:13px; }
.btn-primary.small, .btn-neutral.small { padding:5px 10px; font-size:12px; }
.loading   { color:var(--muted); padding:20px; text-align:center; }
.empty-msg { color:var(--muted); padding:20px; text-align:center; font-style:italic; }
.error-msg { color:#dc2626; padding:20px; }
.form-group { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.form-group label { font-size:12px; font-weight:600; color:var(--muted); }
.form-group.inline { flex-direction:row; align-items:center; gap:8px; }
.filtros-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.filtros-row select, .filtros-row input[type=date] { border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:13px; }

/* ═══════════════════════════════════════════
   COMPRAS / REEMBOLSOS
═══════════════════════════════════════════ */
.compra-card { background:#fff; border-radius:12px; padding:16px; margin-bottom:12px; box-shadow:var(--shadow); border-left:4px solid #e2e8f0; }
.compra-card.status-pendente  { border-left-color:#f59e0b; }
.compra-card.status-aprovado  { border-left-color:#10b981; }
.compra-card.status-rejeitado { border-left-color:#ef4444; }
.compra-top  { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.compra-evento { font-weight:700; font-size:15px; color:var(--text); }
.compra-meta { display:flex; flex-wrap:wrap; gap:12px; font-size:13px; color:var(--muted); margin-bottom:8px; }
.compra-arquivos { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.arq-link { font-size:12px; color:var(--sb-active); background:#f0f7ff; padding:3px 8px; border-radius:6px; border:none; cursor:pointer; }
.arq-link-wrap { display:inline-flex; align-items:center; gap:4px; }
.compra-obs { font-size:13px; color:var(--muted); background:#f8fafc; padding:6px 10px; border-radius:6px; margin-bottom:8px; }
.compra-acoes { display:flex; gap:8px; flex-wrap:wrap; }
.badge-status { padding:2px 10px; border-radius:20px; font-size:11px; font-weight:700; text-transform:uppercase; }
.badge-status.pendente  { background:#fef3c7; color:#92400e; }
.badge-status.aprovado  { background:#d1fae5; color:#065f46; }
.badge-status.rejeitado { background:#fee2e2; color:#991b1b; }
.badge-oculto { background:#e2e8f0; color:var(--muted); padding:2px 8px; border-radius:20px; font-size:11px; }
.btn-sm { padding:4px 12px; border:none; border-radius:6px; cursor:pointer; font-size:12px; font-weight:600; }
.btn-sm.success { background:#d1fae5; color:#065f46; }
.btn-sm.danger  { background:#fee2e2; color:#991b1b; }
.btn-sm.neutral { background:#e0ecff; color:#1d4ed8; box-shadow:inset 0 0 0 1px #bcd2fb; }
.btn-sm.neutral:hover { background:#cfe0ff; }
.btn-sm.danger:hover { background:#fecaca; }
[data-theme="dark"] .btn-sm.neutral { background:#1e3a5f; color:#bfdbfe; box-shadow:inset 0 0 0 1px #2f5587; }
[data-theme="dark"] .btn-sm.danger { background:#450a0a; color:#fecaca; }
[data-theme="dark"] .btn-sm.success { background:#064e3b; color:#a7f3d0; }

/* ═══════════════════════════════════════════
   CENTROS DE CUSTO & RATEIO
═══════════════════════════════════════════ */
.rateio-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
@media(max-width:700px){ .rateio-grid { grid-template-columns:1fr; } }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-header h2 { font-size:16px; font-weight:700; }
.rateio-item { background:#fff; border-radius:10px; padding:14px; margin-bottom:10px; box-shadow:var(--shadow); }
.rateio-item.inativo { opacity:.6; }
.ri-nome { font-weight:700; font-size:14px; margin-bottom:4px; }
.ri-desc { font-size:12px; color:var(--muted); margin-bottom:6px; }
.ri-acoes { display:flex; gap:6px; margin-top:8px; }
.cc-ajuda { font-size:12.5px; color:var(--muted); margin:6px 0 8px; line-height:1.4; }
.cc-recalc { margin-bottom:12px; }
.cc-vinc { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--muted); margin-top:4px; flex-wrap:wrap; }
.cc-vinc select { font:inherit; font-size:12.5px; padding:3px 6px; border:1px solid var(--border); border-radius:6px; background:var(--white); color:var(--text); }
.cc-vinc-badge { font-size:11.5px; font-weight:700; color:var(--primary); background:color-mix(in srgb, var(--primary) 12%, var(--white)); border-radius:99px; padding:2px 8px; white-space:nowrap; }
.ri-itens { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.rateio-tag { background:#eff6ff; color:#1d4ed8; font-size:12px; padding:2px 8px; border-radius:20px; }
.badge-inativo { background:#e2e8f0; color:var(--muted); font-size:11px; padding:1px 6px; border-radius:20px; margin-left:4px; }
.rateio-input-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.rateio-cc-label { flex:1; font-size:13px; }
.rateio-total { font-size:13px; font-weight:700; margin-top:8px; }

/* ═══════════════════════════════════════════
   RELATÓRIOS
═══════════════════════════════════════════ */
.relat-tabs { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.relat-tab { padding:7px 18px; border:2px solid var(--border); border-radius:20px; background:#fff; cursor:pointer; font-size:13px; font-weight:600; color:var(--muted); }
.relat-tab.active { border-color:var(--sb-active); color:var(--sb-active); background:#eff6ff; }
.relat-filtros { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:20px; }
.relat-filtros input[type=date] { border:1px solid var(--border); border-radius:8px; padding:6px 10px; font-size:13px; }
.relat-resumo { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.relat-card { background:#fff; border-radius:12px; padding:18px 24px; box-shadow:var(--shadow); text-align:center; flex:1; min-width:140px; font-size:13px; color:var(--muted); }
.relat-card .relat-val { font-size:22px; font-weight:800; margin-bottom:4px; }
.relat-card.green .relat-val { color:#10b981; }
.relat-card.yellow .relat-val { color:#f59e0b; }
.relat-card.red .relat-val { color:#ef4444; }
.relat-table { width:100%; border-collapse:collapse; font-size:13px; background:#fff; border-radius:10px; overflow:hidden; box-shadow:var(--shadow); }
.relat-table th { background:#f8fafc; padding:10px 12px; text-align:left; font-weight:700; color:var(--muted); border-bottom:1px solid var(--border); }
.relat-table td { padding:10px 12px; border-bottom:1px solid #f1f5f9; }
.relat-table tr:last-child td { border-bottom:none; }
.row-oculto td { opacity:.5; }
.row-rateio td { background:#f8fafc; color:var(--muted); font-size:12px; }
.relat-charts-row { display:flex; gap:16px; flex-wrap:wrap; margin:20px 0; }
.relat-chart-wrap { background:#fff; border-radius:12px; padding:18px 20px; box-shadow:var(--shadow); flex:1; min-width:220px; }
.relat-chart-wrap h4 { font-size:13px; font-weight:700; color:var(--muted); margin:0 0 12px; }
.print-only-btn { display:inline-block; }

/* ═══════════════════════════════════════════════════════════
   COMISSÕES / CARGOS
═══════════════════════════════════════════════════════════ */
.cargo-irmao-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:#fff; border-radius:8px; margin-bottom:8px; box-shadow:var(--shadow); flex-wrap:wrap; }
.ci-nome  { flex:1; font-weight:600; font-size:14px; min-width:140px; }
.ci-select { border:1px solid var(--border); border-radius:8px; padding:5px 8px; font-size:12px; background:#f8fafc; }
.cim-badge { background:#e0e7ff; color:#3730a3; font-size:11px; padding:1px 6px; border-radius:10px; }
.badge-count { background:#f0fdf4; color:#166534; font-size:11px; padding:1px 7px; border-radius:10px; margin-left:6px; }
.tag-remove { background:none; border:none; cursor:pointer; color:#94a3b8; font-size:11px; margin-left:4px; padding:0 2px; }
.tag-remove:hover { color:#ef4444; }

/* ═══════════════════════════════════════════════════════════
   PERMISSÕES
═══════════════════════════════════════════════════════════ */
.perm-grid  { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:16px; }
.perm-card  { background:#fff; border-radius:12px; padding:16px; box-shadow:var(--shadow); }
.perm-cargo-titulo { font-weight:800; font-size:14px; color:var(--text); margin-bottom:12px; padding-bottom:8px; border-bottom:2px solid var(--border); }
.perm-recursos { display:flex; flex-direction:column; gap:8px; }
.perm-recurso  { display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.perm-recurso-nome { width:100px; font-size:12px; font-weight:700; color:var(--muted); padding-top:2px; text-transform:capitalize; }
.perm-acoes { display:flex; flex-wrap:wrap; gap:6px; flex:1; }
.perm-check { display:flex; align-items:center; gap:4px; font-size:12px; color:var(--text); cursor:pointer; background:#f8fafc; padding:3px 8px; border-radius:20px; border:1px solid var(--border); }
.perm-check input { cursor:pointer; }
.perm-check:has(input:checked) { background:#eff6ff; border-color:#93c5fd; color:#1d4ed8; }

/* ═══════════════════════════════════════════════════════════
   REPOSITÓRIO
═══════════════════════════════════════════════════════════ */
.badge-ctx { padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; text-transform:uppercase; }
.badge-ctx.compra       { background:#fef3c7; color:#92400e; }
.badge-ctx.geral        { background:#e0e7ff; color:#3730a3; }
.badge-ctx.ata          { background:#d1fae5; color:#065f46; }
.badge-ctx.contrato     { background:#fee2e2; color:#991b1b; }
.badge-ctx.comprovante  { background:#f0fdf4; color:#166534; }
.badge-ctx.outro        { background:#f1f5f9; color:#475569; }

/* ── WhatsApp ────────────────────────────────────────────────── */
.wpp-status-card { display:flex; align-items:center; gap:16px; background:#fff; border-radius:14px; padding:20px 24px; box-shadow:var(--shadow); margin-bottom:20px; }
.wpp-status-card.connected { border-left:4px solid #16a34a; }
.wpp-status-card.disconnected { border-left:4px solid #dc2626; }
.wpp-status-icon { font-size:32px; }
.wpp-status-title { font-size:16px; font-weight:700; }
.wpp-status-sub { font-size:13px; color:var(--muted); margin-top:3px; }
.wpp-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
.wpp-qr-wrap { background:#fff; border-radius:14px; padding:24px; box-shadow:var(--shadow); display:inline-flex; flex-direction:column; align-items:center; margin-top:4px; }
.wpp-qr-img { width:240px; height:240px; border:1px solid var(--border); border-radius:8px; }
.wpp-info-box { background:#f8fafc; border:1px solid var(--border); border-radius:12px; padding:16px 20px; font-size:13px; line-height:1.7; }
.wpp-info-box ul { padding-left:20px; margin:6px 0; }
.wpp-info-box ol { padding-left:20px; margin:6px 0; }
.wpp-info-box code { background:#e2e8f0; border-radius:4px; padding:1px 5px; font-size:12px; }

@media print {
  .sidebar, .hamburger, .sidebar-overlay, .relat-tabs, .relat-filtros, .btn-primary, .print-only-btn { display:none !important; }
  .main { margin:0; padding:0; }
  .relat-table { box-shadow:none; }
}

/* ═══════════════════════════════════════════════════════════
   AGENDA / CALENDÁRIO
═══════════════════════════════════════════════════════════ */
.agenda-container { max-width: 900px; margin: 0 auto; padding: 24px 16px; }

.agenda-mes-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin: 20px 0 12px; user-select: none;
}
.agenda-nav-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  width: 36px; height: 36px; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.agenda-nav-btn:hover { background: #f0f2f6; }
.agenda-mes-titulo { font-size: 18px; font-weight: 700; color: var(--text); min-width: 180px; text-align: center; }

.agenda-grid-wrap {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 16px;
}
.agenda-dias-semana {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: #f8fafc; border-bottom: 1px solid var(--border);
}
.agenda-dias-semana > div {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 8px 0; text-transform: uppercase; letter-spacing: .04em;
}
.agenda-dias {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.agenda-cel {
  min-height: 68px; padding: 6px; border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .12s;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  position: relative;
}
.agenda-cel:nth-child(7n) { border-right: none; }
.agenda-cel:hover { background: #f0f4ff; }
.agenda-cel.vazio { cursor: default; background: #fafafa; }
.agenda-cel.hoje .agenda-cel-num {
  background: #2563eb; color: #fff; border-radius: 50%;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}
.agenda-cel.selecionado { background: #eff6ff; }
.agenda-cel.feriado { background: #fffbeb; }
.agenda-cel.feriado .agenda-cel-num { color: #b45309; }
.agenda-cel-num { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1; }
.agenda-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.agenda-dot { width: 7px; height: 7px; border-radius: 50%; }
.agenda-loading { padding: 32px; text-align: center; color: var(--muted); font-size: 14px; grid-column: 1/-1; }

.agenda-dia-detalhe {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  border: 1px solid var(--border); padding: 20px; margin-bottom: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.agenda-dia-detalhe-titulo {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.agenda-evento-item {
  padding: 10px 12px; border-radius: 8px; background: #f8fafc;
  margin-bottom: 8px; border-left: 3px solid #2563eb;
}
.agenda-evento-hora { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.agenda-evento-titulo { font-size: 14px; font-weight: 700; color: var(--text); margin: 2px 0; }
.agenda-evento-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   PERFIL DO IRMÃO
═══════════════════════════════════════════════════════════ */
.irmao-detalhe-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 640px) {
  .irmao-detalhe-grid { grid-template-columns: 1fr; }
  .agenda-cel { min-height: 50px; }
  .agenda-cel-num { font-size: 12px; }
}
.irmao-detalhe-campos { display: flex; flex-direction: column; gap: 0; }
.irmao-detalhe-campo {
  display: flex; align-items: flex-start; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.irmao-detalhe-campo:last-child { border-bottom: none; }
.irmao-campo-label { color: var(--muted); font-weight: 600; min-width: 110px; flex-shrink: 0; }

.func-btn.danger {
  background: #fef2f2; color: #ef4444; border: 1px solid #fecaca;
}
.func-btn.danger:hover { background: #fee2e2; }

/* ═══════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:        #0f1117;
  --white:     #1c2233;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --border:    #2d3748;
  --shadow:    0 1px 4px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --sb-bg:     #0d1320;
  --sb-hover:  #1a2436;
}

/* Superfícies com background fixo em #fff / #f8fafc / #f1f5f9 */
[data-theme="dark"] .home-cargo-card,
[data-theme="dark"] .func-card,
[data-theme="dark"] .resp-card,
[data-theme="dark"] .irmao-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .mensalidade-info,
[data-theme="dark"] .modal-box,
[data-theme="dark"] .compra-card,
[data-theme="dark"] .rateio-item,
[data-theme="dark"] .perm-card,
[data-theme="dark"] .relat-card,
[data-theme="dark"] .relat-chart-wrap,
[data-theme="dark"] .wpp-status-card,
[data-theme="dark"] .wpp-qr-wrap,
[data-theme="dark"] .agenda-grid-wrap,
[data-theme="dark"] .agenda-dia-detalhe,
[data-theme="dark"] .cargo-header { background: var(--white); }

[data-theme="dark"] .relat-table          { background: var(--white); color: var(--text); }
[data-theme="dark"] .relat-table th       { background: #242d3e; color: var(--muted); }
[data-theme="dark"] .relat-table td       { border-bottom-color: var(--border); }

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .modal-input          { background: #242d3e; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .modal-input:focus    { background: #1c2233; }

[data-theme="dark"] .modal-result         { background: #242d3e; color: var(--muted); }
[data-theme="dark"] .func-btn.neutral,
[data-theme="dark"] .func-btn.locked      { background: #242d3e; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .badge-locked         { background: #242d3e; border-color: var(--border); color: var(--muted); }
[data-theme="dark"] .compra-obs           { background: #242d3e; }
[data-theme="dark"] .wpp-info-box         { background: #242d3e; border-color: var(--border); }
[data-theme="dark"] .agenda-dias-semana   { background: #242d3e; }
[data-theme="dark"] .agenda-cel:hover     { background: #1e2a3b; }
[data-theme="dark"] .agenda-cel.vazio     { background: #141822; }
[data-theme="dark"] .agenda-cel.selecionado { background: #1a2744; }
[data-theme="dark"] .agenda-evento-item   { background: #242d3e; }
[data-theme="dark"] .relat-tab            { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .relat-tab.active     { background: #1a2744; }
[data-theme="dark"] .perm-check           { background: #242d3e; border-color: var(--border); }
[data-theme="dark"] .perm-check:has(input:checked) { background: #1a2744; }
[data-theme="dark"] .btn-neutral          { background: #242d3e; }
[data-theme="dark"] .cargo-irmao-row      { background: var(--white); }
[data-theme="dark"] .ci-select            { background: #242d3e; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .filtros-row select,
[data-theme="dark"] .filtros-row input[type=date],
[data-theme="dark"] .relat-filtros input[type=date] { background: #242d3e; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .cat-card.regular  { background: #1a2744; border-color: #1e40af; }
[data-theme="dark"] .cat-card.idoso    { background: #142d1a; border-color: #166534; }
[data-theme="dark"] .cat-card.potencia { background: #1e1a33; border-color: #5b21b6; }
[data-theme="dark"] .cat-card.especial { background: #2a2009; border-color: #92400e; }
[data-theme="dark"] .prelogin-label    { color: var(--text); }
[data-theme="dark"] .home-badge { background: rgba(37,99,235,0.22); }
[data-theme="dark"] .nivel-tag  { background: #242d3e; border-color: var(--border); }

/* Botão de alternância de tema */
.btn-theme-toggle {
  width: 100%; padding: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--sb-text2); border-radius: var(--radius-sm);
  font-size: 13px; cursor: pointer; margin-bottom: 8px;
  transition: background 0.15s;
}
.btn-theme-toggle:hover { background: rgba(255,255,255,0.12); }


/* Print / PDF — oculta sidebar e controles, mostra apenas conteúdo */
@media print {
  .sidebar, .hamburger, .sidebar-overlay, .view-header .btn-primary,
  .filtros-row, .relat-filtros, #themeToggle { display: none !important; }
  .layout { grid-template-columns: 1fr !important; }
  .main { padding: 0 !important; }
  body { background: #fff !important; }
  table { font-size: 10px !important; }
}


/* ═══════════════════════════════════════════════════════════════════
   VISUAL 2 — layout mais limpo (login, menu agrupado, início)
   Estas regras vêm por último e refinam o que está acima.
═══════════════════════════════════════════════════════════════════ */
:root {
  --sidebar-w: 256px;
  --bg:        #f5f6f8;
  --white:     #ffffff;
  --text:      #1b2230;
  --muted:     #667085;
  --border:    #e6e8ec;
  --primary:   #2456d6;
  --primary-2: #1d46b3;
  --gold:      #b08d57;
  --gold-2:    #d4b27a;
  --sb-bg:     #141d2b;
  --sb-hover:  rgba(255,255,255,0.06);
  --sb-text:   #8c97a8;
  --sb-text2:  #cfd6e1;
  --shadow:    0 1px 2px rgba(16,24,40,0.05), 0 1px 3px rgba(16,24,40,0.06);
  --shadow-md: 0 8px 24px rgba(16,24,40,0.10);
  --radius:    12px;
  --radius-sm: 8px;
}
[data-theme="dark"] {
  --bg:        #0e131c;
  --white:     #171e2b;
  --text:      #e4e8ee;
  --muted:     #98a2b3;
  --border:    #263042;
  --sb-bg:     #0b1019;
  --primary:   #4f7bea;
  --primary-2: #3d68d8;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}

/* ── Antes do login: só o cartão de entrada ─────────────────────── */
body.nao-logado .sidebar,
body.nao-logado .topbar,
body.nao-logado .sidebar-overlay { display: none !important; }
body.nao-logado .main { margin-left: 0 !important; padding: 0 !important; }

.login-view {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(176,141,87,0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(36,86,214,0.20), transparent 60%),
    linear-gradient(160deg, #101827 0%, #1b2940 55%, #14213a 100%);
  position: relative;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--white);
  border-radius: 18px;
  padding: 36px 30px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  text-align: center;
}
.login-logo { width: 72px; height: 72px; margin: 0 auto 14px; color: var(--gold); }
.login-logo svg { width: 100%; height: 100%; }
.login-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: 0.2px;
}
.login-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 22px; }
.login-form { text-align: left; display: flex; flex-direction: column; }
.login-label { font-size: 12.5px; font-weight: 600; color: var(--text); margin: 10px 0 6px; }
.login-input {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-input:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(36,86,214,0.15); }
.login-form .sb-msg { color: #d92d20; min-height: 18px; margin: 8px 0 4px; font-size: 13px; }
.login-form .btn-login {
  margin-top: 4px; padding: 12px; border-radius: 10px;
  background: var(--primary); font-size: 15px; font-weight: 600;
}
.login-form .btn-login:hover { background: var(--primary-2); }
.login-links { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; }
.link-btn { background: none; border: none; color: var(--primary); font-size: 13.5px; cursor: pointer; padding: 4px; }
.link-btn:hover { text-decoration: underline; }
.login-sep { color: var(--muted); }
.login-theme {
  position: absolute; top: 16px; right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08);
  color: #fff; font-size: 18px; cursor: pointer;
}
[data-theme="dark"] .login-card { box-shadow: 0 24px 60px rgba(0,0,0,0.6); border: 1px solid var(--border); }

/* ── Menu lateral ───────────────────────────────────────────────── */
.sidebar { width: var(--sidebar-w); background: var(--sb-bg); border-right: 1px solid rgba(255,255,255,0.04); }
.brand { padding: 20px 16px 16px; gap: 11px; border-bottom: 1px solid rgba(255,255,255,0.06); cursor: pointer; }
.brand-icon { width: 38px; height: 38px; background: rgba(176,141,87,0.14); color: var(--gold-2); border-radius: 10px; padding: 6px; }
.brand-icon svg { width: 100%; height: 100%; }
.brand-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 700; color: #f3f5f8; line-height: 1.1; }
.brand-sub { font-size: 11.5px; color: var(--sb-text); margin-top: 2px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 14px; }
.nav-group { margin-top: 6px; }
.nav-group.sem-titulo { margin-top: 2px; }
.nav-group-title {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer;
  padding: 9px 10px 7px; color: var(--sb-text);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em;
}
.nav-group-title:hover { color: var(--sb-text2); }
.nav-group-title .chev { font-size: 15px; transition: transform .2s; }
.nav-group.aberto .chev { transform: rotate(90deg); }
.nav-group-items { display: none; flex-direction: column; gap: 1px; }
.nav-group.aberto .nav-group-items,
.nav-group.sem-titulo .nav-group-items { display: flex; }
.nav-group.sem-titulo { display: flex; flex-direction: column; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--sb-text2); text-decoration: none; font-size: 13.5px;
  position: relative; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--sb-hover); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.08); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-2);
}
.nav-ico { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; opacity: .9; }
.nav-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; display: inline-block; }

.side-user { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.side-user .user-card { background: rgba(255,255,255,0.04); margin-bottom: 8px; padding: 9px 10px; }
.user-info { flex: 1; min-width: 0; }
.user-name, .user-cargo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-avatar { background: linear-gradient(135deg, var(--gold), #8a6a3a); }
.icon-btn {
  position: relative; background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; font-size: 16px; flex-shrink: 0;
}
.icon-btn:hover { background: var(--sb-hover); }
.notif-badge {
  position: absolute; top: 1px; right: 0;
  background: #e5484d; color: #fff; border-radius: 9px;
  padding: 0 5px; font-size: 10px; line-height: 16px; min-width: 16px; text-align: center;
}
.side-user-actions { display: flex; gap: 6px; }
.side-link {
  flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  color: var(--sb-text2); font-size: 12.5px; padding: 7px 8px; border-radius: 8px; cursor: pointer;
}
.side-link:hover { background: rgba(255,255,255,0.09); }
.side-link.sair { flex: 0 0 auto; padding: 7px 14px; color: #f7a7a3; }

/* ── Área principal ─────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); padding: 30px 36px 48px; }
.topbar { display: none; }

.page-head { margin-bottom: 24px; }
.page-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.page-head h1 { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -0.2px; }
.page-head p { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.home-view { max-width: 1040px; }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.card.destaque { border-color: rgba(176,141,87,0.45); background: linear-gradient(0deg, rgba(176,141,87,0.06), rgba(176,141,87,0.06)), var(--white); margin-bottom: 20px; }
.card-titulo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.passos { padding-left: 18px; display: grid; gap: 6px; color: var(--text); }
.passos a { color: var(--primary); font-weight: 600; text-decoration: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.stat {
  text-align: left; cursor: pointer; font: inherit;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
  transition: box-shadow .15s, transform .1s;
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-valor { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-rotulo { font-size: 13px; color: var(--muted); }
.stat.azul .stat-valor { color: var(--primary); }
.stat.verde .stat-valor { color: #16a34a; }
.stat.vermelho .stat-valor { color: #dc2626; }
.stat.ambar .stat-valor { color: #d97706; }
.stat.carregando { min-height: 78px; background: linear-gradient(90deg, var(--white), var(--bg), var(--white)); background-size: 200% 100%; animation: brilho 1.2s infinite; cursor: default; }
@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.duas-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.evento-titulo { font-weight: 600; font-size: 15px; }
.evento-data { color: var(--muted); font-size: 13px; margin-top: 2px; }
.lista-simples { list-style: none; display: grid; gap: 6px; }
.lista-simples li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.lista-simples small { color: var(--muted); }
.vazio { color: var(--muted); font-size: 13.5px; }

.secao-titulo { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 12px; }
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.atalho {
  display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; cursor: pointer;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; color: var(--text); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.atalho:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.atalho-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.atalho-txt { display: flex; flex-direction: column; }
.atalho-txt strong { font-size: 14.5px; font-weight: 600; }
.atalho-txt small { color: var(--muted); font-size: 12.5px; }

/* Grade de cargos mais leve */
.home-cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.home-cargo-card { border-width: 1px; padding: 16px; box-shadow: var(--shadow); }
.home-cargo-card .card-icon { font-size: 24px; margin-bottom: 8px; }
.home-cargo-card .card-title { font-size: 13.5px; font-weight: 600; margin: 0; }

/* Componentes gerais: títulos, cartões, botões e campos mais uniformes */
.irmao-header h1, .view-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.2px; }
.form-card, .irmao-card, .compra-card, .rateio-item, .relat-card, .perm-card, .resp-card, .func-card, .cargo-header {
  border-radius: var(--radius); box-shadow: var(--shadow); border-color: var(--border);
}
.func-btn, .btn-primary, .btn-secondary { border-radius: 8px; font-weight: 500; }
.func-btn.primary, .btn-primary { background: var(--primary); border-color: var(--primary); }
.func-btn.primary:hover, .btn-primary:hover { background: var(--primary-2); opacity: 1; }
.form-input, .form-select, .modal-input { border-radius: 8px; border-color: var(--border); }
.form-input:focus, .form-select:focus, .modal-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,86,214,0.12); }
.modal-box { border-radius: 14px; box-shadow: 0 24px 60px rgba(16,24,40,0.25); }
[data-theme="dark"] .stat, [data-theme="dark"] .atalho, [data-theme="dark"] .card { background: var(--white); }
[data-theme="dark"] .atalho-ico { background: #202a3b; }

/* ── Celular ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 250;
    padding: 0 12px; background: var(--sb-bg); color: #f3f5f8;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
  }
  .topbar .hamburger { display: flex; position: static; width: 40px; height: 40px; background: transparent; }
  .topbar-title { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar { width: 272px; }
  .main { margin-left: 0; padding: 72px 14px 32px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
  .stat-valor { font-size: 22px; }
  .stat-rotulo { font-size: 11.5px; }
  .duas-col { grid-template-columns: 1fr; }
  .atalhos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .atalho { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .page-head h1 { font-size: 22px; }
  .home-cards { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 30px 22px 22px; }
}

@media print {
  .topbar, .side-user { display: none !important; }
  .main { margin-left: 0 !important; }
}
/* mostrarView() define display:block inline — a tela de login precisa de flex para centralizar */
#preLoginView:not([style*="none"]) { display: flex !important; }
/* Símbolo colorido (esquadro, compasso e G) */
.login-logo { width: 116px; height: 120px; margin-bottom: 10px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18)); }
.brand-icon { background: rgba(255,255,255,0.05); padding: 3px; width: 42px; height: 42px; }
.sd-simbolo { width: 100%; height: 100%; display: block; }
.login-logo { width: 132px; height: 138px; filter: none; }
.brand-icon { background: transparent; padding: 0; width: 44px; height: 46px; }
.sd-simbolo { object-fit: contain; }
.login-logo { width: 140px; height: 128px; }
.brand-icon { width: 46px; height: 42px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Leitura automática da lista de presença */
.ocr-tag{display:inline-block;margin-top:4px;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:999px}
.ocr-sim{background:#dcfce7;color:#166534}
.ocr-vazio{background:#f1f5f9;color:#475569}
.ocr-duvida{background:#fef3c7;color:#92400e}
.ocr-nao{background:#fee2e2;color:#991b1b}
.spinner-sd{width:18px;height:18px;border:3px solid #cbd5e1;border-top-color:#2563eb;border-radius:50%;display:inline-block;animation:sdgira .8s linear infinite}
@keyframes sdgira{to{transform:rotate(360deg)}}

/* Permissões */
.perm-intro{font-size:14px;line-height:1.6}
.perm-sempre{margin-top:10px;font-size:13px;color:var(--muted,#64748b)}
.perm-abas{display:flex;gap:8px;margin:0 0 12px}
.perm-aba{padding:8px 16px;border-radius:999px;border:1px solid var(--border,#e2e8f0);background:transparent;cursor:pointer;font-weight:600;color:inherit}
.perm-aba.ativa{background:#2563eb;border-color:#2563eb;color:#fff}
.perm-secao{margin:18px 0 6px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted,#64748b)}
.perm-linha{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--border,#eef2f7)}
.perm-texto{flex:1;min-width:0}
.perm-titulo{font-weight:600;font-size:14px}
.perm-desc{font-size:12.5px;color:var(--muted,#64748b);margin-top:2px}
.perm-tag{display:inline-block;font-size:11px;font-weight:700;padding:1px 8px;border-radius:999px;margin-left:6px;vertical-align:middle}
.perm-tag.ajustado{background:#fef3c7;color:#92400e}
.perm-tag.sim{background:#dcfce7;color:#166534}
.perm-tag.nao{background:#f1f5f9;color:#475569}
.perm-reset{font-size:12px;margin-left:6px}
.perm-switch{position:relative;width:46px;height:26px;flex:none}
.perm-switch input{opacity:0;width:0;height:0}
.perm-switch span{position:absolute;inset:0;background:#cbd5e1;border-radius:999px;cursor:pointer;transition:.2s}
.perm-switch span:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.perm-switch input:checked + span{background:#16a34a}
.perm-switch input:checked + span:before{transform:translateX(20px)}
.perm-segs{display:flex;flex-wrap:wrap;gap:4px;flex:none}
.perm-seg{font-size:12px;padding:6px 10px;border-radius:8px;border:1px solid var(--border,#e2e8f0);background:transparent;cursor:pointer;color:inherit}
.perm-seg.ativo{background:#1e293b;color:#fff;border-color:#1e293b}
[data-theme="dark"] .perm-seg.ativo{background:#e2e8f0;color:#0f172a}
@media (max-width:640px){.perm-linha{flex-direction:column;align-items:flex-start}.perm-segs{width:100%}}

/* Ficha do irmão: campos nunca passam da largura da janela */
.grade-ficha .modal-input{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
@media (max-width:420px){.grade-ficha{grid-template-columns:minmax(0,1fr)!important}.grade-ficha>*{grid-column:1/-1}}

/* Tema escuro: listas de opções (grau, cargo, loja…) legíveis — antes ficavam texto claro em fundo branco */
[data-theme="dark"]{color-scheme:dark}
[data-theme="dark"] select option,[data-theme="dark"] select optgroup{background:#1e2533;color:#e4e8ee}
[data-theme="light"],:root:not([data-theme="dark"]){color-scheme:light}

/* Botões de WhatsApp */
.func-btn.wa-btn{background:#25d366;color:#fff;border-color:#25d366}
.func-btn.wa-btn:hover{background:#1ebe5b;border-color:#1ebe5b}

/* Boletos */
.tabela-bol{width:100%;border-collapse:collapse;font-size:13px}
.tabela-bol th{text-align:left;font-weight:600;padding:8px 10px;border-bottom:2px solid var(--border,#e2e8f0);white-space:nowrap}
.tabela-bol td{padding:8px 10px;border-bottom:1px solid var(--border,#f1f5f9);vertical-align:top}
.bol-sub{font-size:11.5px;color:var(--muted,#64748b);margin-top:2px}
.bol-sel{min-width:200px}
.bol-num{width:120px}
.bol-alerta{border-color:#f59e0b!important;box-shadow:0 0 0 2px #fde68a}
.bol-tag{display:inline-block;font-size:12px;font-weight:700;padding:2px 10px;border-radius:999px}
.bol-tag.pago{background:#dcfce7;color:#166534}
.bol-tag.pend{background:#fee2e2;color:#991b1b}
.bol-linha{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.bol-linha code{font-size:13px;background:var(--bg-soft,#f1f5f9);padding:6px 8px;border-radius:6px;word-break:break-all}
[data-theme="dark"] .bol-linha code{background:#1e2533}


/* ═══════════════════════════════════════════════════════════════════
   MODO ESCURO — cores claras escritas direto nas telas (style="...")
   Troca fundos claros por equivalentes escuros e clareia textos escuros,
   para nada ficar "branco no branco" ou "escuro no escuro".
═══════════════════════════════════════════════════════════════════ */
/* superfícies neutras */
[data-theme="dark"] [style*="background: rgb(255, 255, 255)"],
[data-theme="dark"] [style*="background:#fff;"],
[data-theme="dark"] [style*="background: rgb(255, 255, 255)"],
[data-theme="dark"] [style*="background:#fff\""],
[data-theme="dark"] [style*="background: rgb(255, 255, 255)"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: white"]      { background: var(--white) !important; color: var(--text); }
[data-theme="dark"] [style*="background: rgb(248, 250, 252)"],
[data-theme="dark"] [style*="background:#f8fafc"],
[data-theme="dark"] [style*="background: rgb(241, 245, 249)"],
[data-theme="dark"] [style*="background:#f1f5f9"],
[data-theme="dark"] [style*="background: rgb(238, 238, 238)"],
[data-theme="dark"] [style*="background:#eee"],
[data-theme="dark"] [style*="background: rgb(226, 232, 240)"],
[data-theme="dark"] [style*="background:#e2e8f0"],
[data-theme="dark"] [style*="background: rgb(249, 250, 251)"],
[data-theme="dark"] [style*="background:#f9fafb"],
[data-theme="dark"] [style*="background: rgb(243, 244, 246)"],
[data-theme="dark"] [style*="background:#f3f4f6"]   { background: #242d3e !important; color: var(--text); }
/* avisos (amarelo/laranja) */
[data-theme="dark"] [style*="background: rgb(255, 251, 235)"],
[data-theme="dark"] [style*="background:#fffbeb"],
[data-theme="dark"] [style*="background: rgb(254, 243, 199)"],
[data-theme="dark"] [style*="background:#fef3c7"],
[data-theme="dark"] [style*="background: rgb(254, 249, 195)"],
[data-theme="dark"] [style*="background:#fef9c3"],
[data-theme="dark"] [style*="background: rgb(254, 252, 232)"],
[data-theme="dark"] [style*="background:#fefce8"],
[data-theme="dark"] [style*="background: rgb(255, 247, 237)"],
[data-theme="dark"] [style*="background:#fff7ed"]   { background: #2a2009 !important; color: #fde68a; border-color: #92400e !important; }
/* informação (azul/roxo) */
[data-theme="dark"] [style*="background: rgb(239, 246, 255)"],
[data-theme="dark"] [style*="background:#eff6ff"],
[data-theme="dark"] [style*="background: rgb(219, 234, 254)"],
[data-theme="dark"] [style*="background:#dbeafe"],
[data-theme="dark"] [style*="background: rgb(224, 231, 255)"],
[data-theme="dark"] [style*="background:#e0e7ff"]   { background: #1a2744 !important; color: #bfdbfe; border-color: #1e40af !important; }
[data-theme="dark"] [style*="background: rgb(237, 233, 254)"],
[data-theme="dark"] [style*="background:#ede9fe"]   { background: #1e1a33 !important; color: #ddd6fe; border-color: #5b21b6 !important; }
/* sucesso (verde) */
[data-theme="dark"] [style*="background: rgb(240, 253, 244)"],
[data-theme="dark"] [style*="background:#f0fdf4"],
[data-theme="dark"] [style*="background: rgb(220, 252, 231)"],
[data-theme="dark"] [style*="background:#dcfce7"]   { background: #142d1a !important; color: #bbf7d0; border-color: #166534 !important; }
/* erro (vermelho) */
[data-theme="dark"] [style*="background: rgb(254, 242, 242)"],
[data-theme="dark"] [style*="background:#fef2f2"],
[data-theme="dark"] [style*="background: rgb(254, 226, 226)"],
[data-theme="dark"] [style*="background:#fee2e2"]   { background: #2d1414 !important; color: #fecaca; border-color: #991b1b !important; }

/* textos escuros → claros */
[data-theme="dark"] [style*="color: rgb(17, 17, 17)"],
[data-theme="dark"] [style*="color:#111"],
[data-theme="dark"] [style*="color: rgb(30, 41, 59)"],
[data-theme="dark"] [style*="color:#1e293b"],
[data-theme="dark"] [style*="color: rgb(55, 65, 81)"],
[data-theme="dark"] [style*="color:#374151"],
[data-theme="dark"] [style*="color: rgb(51, 65, 85)"],
[data-theme="dark"] [style*="color:#334155"],
[data-theme="dark"] [style*="color: rgb(71, 85, 105)"],
[data-theme="dark"] [style*="color:#475569"],
[data-theme="dark"] [style*="color: rgb(85, 85, 85)"],
[data-theme="dark"] [style*="color:#555"]           { color: var(--text) !important; }
[data-theme="dark"] [style*="color: rgb(100, 116, 139)"],
[data-theme="dark"] [style*="color:#64748b"]        { color: var(--muted) !important; }
[data-theme="dark"] [style*="color: rgb(22, 101, 52)"],
[data-theme="dark"] [style*="color:#166534"],
[data-theme="dark"] [style*="color: rgb(21, 128, 61)"],
[data-theme="dark"] [style*="color:#15803d"]        { color: #86efac !important; }
[data-theme="dark"] [style*="color: rgb(146, 64, 14)"],
[data-theme="dark"] [style*="color:#92400e"],
[data-theme="dark"] [style*="color: rgb(133, 77, 14)"],
[data-theme="dark"] [style*="color:#854d0e"],
[data-theme="dark"] [style*="color: rgb(113, 63, 18)"],
[data-theme="dark"] [style*="color:#713f12"],
[data-theme="dark"] [style*="color: rgb(154, 52, 18)"],
[data-theme="dark"] [style*="color:#9a3412"],
[data-theme="dark"] [style*="color: rgb(180, 83, 9)"],
[data-theme="dark"] [style*="color:#b45309"]        { color: #fbbf24 !important; }
[data-theme="dark"] [style*="color: rgb(153, 27, 27)"],
[data-theme="dark"] [style*="color:#991b1b"],
[data-theme="dark"] [style*="color: rgb(220, 38, 38)"],
[data-theme="dark"] [style*="color:#dc2626"]        { color: #f87171 !important; }
[data-theme="dark"] [style*="color: rgb(30, 64, 175)"],
[data-theme="dark"] [style*="color:#1e40af"],
[data-theme="dark"] [style*="color: rgb(55, 48, 163)"],
[data-theme="dark"] [style*="color:#3730a3"],
[data-theme="dark"] [style*="color: rgb(37, 99, 235)"],
[data-theme="dark"] [style*="color:#2563eb"],
[data-theme="dark"] [style*="color: rgb(3, 105, 161)"],
[data-theme="dark"] [style*="color:#0369a1"],
[data-theme="dark"] [style*="color: rgb(2, 132, 199)"],
[data-theme="dark"] [style*="color:#0284c7"]        { color: #93c5fd !important; }
[data-theme="dark"] [style*="color: rgb(91, 33, 182)"],
[data-theme="dark"] [style*="color:#5b21b6"],
[data-theme="dark"] [style*="color: rgb(124, 58, 237)"],
[data-theme="dark"] [style*="color:#7c3aed"]        { color: #c4b5fd !important; }
/* botões coloridos mantêm o texto branco */
[data-theme="dark"] [style*="color: rgb(255, 255, 255)"],
[data-theme="dark"] [style*="color:#fff"]           { color: #fff !important; }

/* linhas divisórias claras */
[data-theme="dark"] [style*="solid rgb(241, 245, 249)"],
[data-theme="dark"] [style*="solid #f1f5f9"],
[data-theme="dark"] [style*="solid rgb(226, 232, 240)"],
[data-theme="dark"] [style*="solid #e2e8f0"],
[data-theme="dark"] [style*="solid rgb(219, 234, 254)"],
[data-theme="dark"] [style*="solid #dbeafe"],
[data-theme="dark"] [style*="solid rgb(238, 238, 238)"],
[data-theme="dark"] [style*="solid #eee"]           { border-color: var(--border) !important; }

/* Agenda */
[data-theme="dark"] .agenda-nav-btn        { background: #242d3e; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .agenda-nav-btn:hover  { background: #2d3748; }
[data-theme="dark"] .agenda-cel            { border-color: var(--border); }
[data-theme="dark"] .agenda-cel.feriado    { background: #2a2009; }
[data-theme="dark"] .agenda-cel.feriado .agenda-cel-num { color: #fbbf24; }

/* Ficha do irmão, abas */
[data-theme="dark"] .irmao-detalhe-campo   { border-bottom-color: var(--border); }
[data-theme="dark"] .relat-tab.active      { color: #93c5fd; }
/* etiquetas coloridas (Auditoria, grau, situação) */
[data-theme="dark"] [style*="background: rgb(255, 237, 213)"],
[data-theme="dark"] [style*="background:#ffedd5"]   { background: #2a1a0c !important; border-color: #9a3412 !important; }
[data-theme="dark"] [style*="background: rgb(204, 251, 241)"],
[data-theme="dark"] [style*="background:#ccfbf1"],
[data-theme="dark"] [style*="background: rgb(240, 249, 255)"],
[data-theme="dark"] [style*="background:#f0f9ff"]   { background: #0f2a2e !important; border-color: #0f766e !important; }
[data-theme="dark"] [style*="color: rgb(29, 78, 216)"],
[data-theme="dark"] [style*="color:#1d4ed8"],
[data-theme="dark"] [style*="color: rgb(59, 130, 246)"],
[data-theme="dark"] [style*="color:#3b82f6"]        { color: #93c5fd !important; }
[data-theme="dark"] [style*="color: rgb(185, 28, 28)"],
[data-theme="dark"] [style*="color:#b91c1c"]        { color: #f87171 !important; }
[data-theme="dark"] [style*="color: rgb(15, 118, 110)"],
[data-theme="dark"] [style*="color:#0f766e"],
[data-theme="dark"] [style*="color: rgb(8, 145, 178)"],
[data-theme="dark"] [style*="color:#0891b2"]        { color: #5eead4 !important; }
[data-theme="dark"] [style*="color: rgb(107, 114, 128)"],
[data-theme="dark"] [style*="color:#6b7280"]        { color: var(--muted) !important; }
[data-theme="dark"] [style*="color: rgb(217, 119, 6)"],
[data-theme="dark"] [style*="color:#d97706"]        { color: #fbbf24 !important; }

/* Modo claro: textos cinza-claro um pouco mais fortes, para ler melhor */
:root:not([data-theme="dark"]) [style*="color: rgb(148, 163, 184)"],
:root:not([data-theme="dark"]) [style*="color:#94a3b8"] { color: #64748b !important; }
:root:not([data-theme="dark"]) .relat-card.green .relat-val  { color: #059669; }
:root:not([data-theme="dark"]) .relat-card.yellow .relat-val { color: #b45309; }

/* ═══════════ Bebidas: comanda por lata e rateio ═══════════ */
.beb-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.beb-card { cursor: pointer; padding: 16px 18px; margin-bottom: 12px; }
.beb-rot { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.beb-pill { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--border); color: var(--muted); white-space: nowrap; }
.beb-pill.ok { background: #dcfce7; color: #166534; }
.beb-barra { background: var(--border); border-radius: 99px; height: 4px; margin-top: 10px; overflow: hidden; }
.beb-barra > div { background: #22c55e; height: 4px; transition: width .3s; }
.beb-recebe { background: var(--white); border: 2px solid #22c55e; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.beb-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.beb-resumo b { font-size: 17px; }
.beb-bloco { padding: 14px 16px; margin-bottom: 10px; }
.beb-minha { border: 2px solid var(--primary); }
.beb-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.beb-qtd { min-width: 26px; text-align: center; font-weight: 800; font-size: 16px; }
.beb-mais { min-width: 58px; min-height: 42px; font-size: 16px !important; font-weight: 800; }
.beb-menos { min-width: 42px; min-height: 42px; font-size: 18px !important; font-weight: 800; }
.beb-acoes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.beb-aviso { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.beb-linha { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.beb-conv { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: #fef3c7; color: #92400e; }
[data-theme="dark"] .beb-pill.ok { background: #142d1a; color: #86efac; }
[data-theme="dark"] .beb-conv { background: #2a2009; color: #fbbf24; }
[data-theme="dark"] .func-btn.danger       { background: #2d1414; color: #f87171; border-color: #7f1d1d; }
[data-theme="dark"] .func-btn.danger:hover { background: #3b1717; }

/* ═══════════ Mural de avisos ═══════════ */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 800; align-items: center; justify-content: center; }
.mural-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 40px; }
.mural-card { cursor: pointer; padding: 14px 16px; margin-bottom: 10px; border-left: 4px solid var(--mc, var(--primary)); }
.mural-card.novo { box-shadow: 0 0 0 2px rgba(36,86,214,.35), var(--shadow); }
.mural-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; margin-bottom: 2px; }
.mural-tag { font-weight: 800; font-size: 12px; }
.mural-grau { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--border); color: var(--text); }
.mural-novo { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: #dc2626; color: #fff; }
.mural-pede { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #fef3c7; color: #92400e; }
.mural-titulo { font-weight: 800; font-size: 16px; line-height: 1.3; }
.mural-previa { font-size: 13.5px; color: var(--muted); margin-top: 6px; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mural-rodape { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.mural-cont { font-weight: 700; color: var(--text); }
.mural-texto { font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.mural-home { padding: 14px 16px; margin-bottom: 14px; border: 2px solid var(--primary); }
.mural-home-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; text-align: left; background: none;
  border: 0; border-top: 1px solid var(--border); padding: 8px 0; cursor: pointer; color: var(--text); font: inherit; }
.push-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 10px 12px; margin: 8px 0 14px;
  border-radius: 10px; background: var(--white); border: 1px dashed var(--border); }
.push-box.ok { border-style: solid; border-color: #22c55e; }
[data-theme="dark"] .mural-pede { background: #2a2009; color: #fbbf24; }
.rel-fmt { padding: 12px 6px !important; font-size: 13px !important; line-height: 1.5; }
.rel-lgpd { font-size: 12px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
[data-theme="dark"] .rel-lgpd { background: #2a2009; border-color: #92400e; color: #fde68a; }

/* Repositório: lista em cartões (cabe no celular) */
.filtros-row { flex-wrap: wrap; }
#repositorioView .view-header { flex-wrap: wrap; gap: 10px; }
.repo-item { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.repo-ico { font-size: 26px; flex-shrink: 0; }
.repo-desc { font-weight: 700; font-size: 14px; word-break: break-word; }
.repo-meta { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.repo-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .repo-item { flex-wrap: wrap; } .repo-acoes { width: 100%; } }

/* Celular: tabelas largas rolam para o lado dentro do próprio quadro, em vez de cortar ou empurrar a página */
@media (max-width: 760px) {
  .main table, #irmaoView table, .relat-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
}
/* a área principal não pode esticar além da tela por causa de um conteúdo largo (tabela, abas) */
.main, .layout > * { min-width: 0; }

/* ── Tarefas ─────────────────────────────────────────────────────── */
.tf-abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tf-aba { background: var(--white); border: 1px solid var(--border); color: var(--text); border-radius: 99px;
  padding: 7px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tf-aba.ativa { background: var(--primary); border-color: var(--primary); color: #fff; }
.tf-aba-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; font-size: 11.5px;
  background: rgba(0,0,0,.12); margin-left: 4px; }
.tf-aba.ativa .tf-aba-n { background: rgba(255,255,255,.25); }
.tf-fechadas { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; cursor: pointer; }
.tf-lista { display: flex; flex-direction: column; gap: 10px; }
.tf-card { border-left: 4px solid var(--tfc, var(--border)) !important; cursor: pointer; padding: 14px 16px; }
.tf-card:hover { box-shadow: var(--shadow-md); }
.tf-card.fechada { opacity: .7; }
.tf-card.fechada .tf-titulo { text-decoration: line-through; }
.tf-card.tem-novidade { background: color-mix(in srgb, var(--primary) 5%, var(--white)); }
.tf-topo { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.tf-titulo { font-weight: 600; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.tf-novo { flex-shrink: 0; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px; margin-left: 6px; text-transform: uppercase; letter-spacing: .3px; }
.tf-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tf-chip { border: 1px solid; border-radius: 99px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; }
.tf-prog { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.tf-prog span { min-width: 34px; text-align: right; }
.tf-barra { flex: 1; height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.tf-barra > div { height: 100%; border-radius: 99px; transition: width .3s; }
.tf-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-size: 12px; color: var(--muted); }
.tf-acoes { display: flex; gap: 6px; }
.tf-mini { padding: 5px 11px !important; font-size: 12.5px !important; }
.tf-home-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tf-home-meta { display: inline-flex; gap: 10px; font-size: 12px; color: var(--muted); margin-left: auto; }
.tf-det { font-size: 14px; }
.tf-pessoas { display: flex; gap: 10px 24px; flex-wrap: wrap; margin: 10px 0; }
.tf-pessoas small { display: block; color: var(--muted); font-size: 11.5px; }
.tf-desc { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; overflow-wrap: anywhere; }
.tf-status-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tf-sbtn { border: 1px solid var(--sc); color: var(--sc); background: transparent; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tf-sbtn.ativo { background: var(--sc); color: #fff; cursor: default; }
.tf-slider { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tf-slider input { flex: 1; min-width: 140px; accent-color: var(--primary); }
.tf-slider b { color: var(--text); min-width: 40px; }
.tf-tl-titulo { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 14px 0 6px; }
.tf-timeline { max-height: 280px; overflow-y: auto; border-left: 2px solid var(--border); margin-left: 10px; padding-left: 4px; }
.tf-ev { display: flex; gap: 8px; padding: 6px 0; }
.tf-ev-ico { width: 24px; flex-shrink: 0; text-align: center; margin-left: -17px; background: var(--white); border-radius: 50%; line-height: 24px; }
.tf-ev-corpo { min-width: 0; flex: 1; }
.tf-ev-cab { font-size: 13px; }
.tf-ev-hora { color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.tf-ev-texto { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 7px 10px; margin-top: 4px; font-size: 13.5px; overflow-wrap: anywhere; }
.tf-comentar { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.tf-comentar textarea { flex: 1; resize: vertical; margin: 0; }
.tf-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) {
  .tf-form-2 { grid-template-columns: 1fr; }
  .tf-comentar { flex-direction: column; align-items: stretch; }
  .tf-home-meta { margin-left: 0; }
}

/* ── Agenda das Lojas do GOE ─────────────────────────────────────── */
.goe-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 8px; }
.goe-filtros .form-select { flex: 0 1 260px; min-width: 0; }
.goe-filtros .form-input { flex: 1 1 220px; min-width: 0; }
.goe-casa { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.goe-info, .goe-resumo { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.goe-dia { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.goe-dia.passado { opacity: .72; }
.goe-dia.hoje { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent); }
.goe-dia-titulo { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; font-size: 14px;
  background: color-mix(in srgb, var(--primary) 6%, var(--white)); border-bottom: 1px solid var(--border); }
.goe-dia-n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.goe-hoje-tag { text-transform: none; background: var(--primary); color: #fff; border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.goe-ev { display: flex; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--border); }
.goe-ev:first-of-type { border-top: 0; }
.goe-ev.casa { background: color-mix(in srgb, #d97706 8%, var(--white)); }
.goe-hora { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; color: var(--primary); padding-top: 1px; }
.goe-corpo { min-width: 0; flex: 1; }
.goe-loja { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.goe-desc { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.goe-tag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 1px 7px; margin-left: 4px;
  background: color-mix(in srgb, #d97706 15%, transparent); color: #b45309; vertical-align: 1px; }
.goe-tag.nossa { background: #d97706; color: #fff; }
.goe-tag.magna { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
.goe-tag.grau { background: color-mix(in srgb, #0369a1 14%, transparent); color: #0369a1; }
[data-theme="dark"] .goe-tag { color: #fbbf24; }
[data-theme="dark"] .goe-tag.magna { color: #c4b5fd; }
[data-theme="dark"] .goe-tag.grau { color: #7dd3fc; }
[data-theme="dark"] .goe-tag.nossa { color: #fff; }
.goe-passos { padding-left: 20px; line-height: 1.6; }

/* ── Agenda: ajuste de um dia da sessão recorrente ───────────────── */
.agenda-ajuste-aviso { font-size: 12px; color: #b45309; margin-top: 2px; font-weight: 600; }
[data-theme="dark"] .agenda-ajuste-aviso { color: #fbbf24; }
.ag-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.ag-sug { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 99px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.ag-sug:hover { border-color: var(--primary); color: var(--primary); }
.ag-form-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-bottom: 8px; }
@media (max-width: 520px) { .ag-form-3 { grid-template-columns: 1fr 1fr; } .ag-form-3 > div:first-child { grid-column: 1 / -1; } }

.goe-auto-status { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; line-height: 1.7; }

/* ── Repositório por categorias ──────────────────────────────────── */
.rp { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 80px);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rp-cats { border-right: 1px solid var(--border); padding: 18px 10px; display: flex; flex-direction: column; gap: 3px; background: var(--white); }
.rp-cats-cab { padding: 0 10px 12px; }
.rp-cats-rot { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rp-cats-loja { font-size: 13px; color: var(--muted); margin-top: 3px; }
.rp-cat { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.rp-cat:hover { background: color-mix(in srgb, var(--primary) 7%, var(--white)); }
.rp-cat.ativa { background: color-mix(in srgb, var(--primary) 13%, var(--white)); color: var(--primary); font-weight: 600; }
.rp-cat-rot { flex: 1; }
.rp-cat-n { font-size: 12px; color: var(--muted); font-weight: 500; display: inline-flex; }
.rp-cats-nota { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rp-main { padding: 24px 28px; min-width: 0; background: var(--bg); display: flex; flex-direction: column; gap: 16px; }
.rp-topo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rp-titulo { margin: 0; font-size: 24px; }
.rp-sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.rp-busca { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 0 12px; height: 44px; min-width: 220px; color: var(--muted); flex: 0 1 300px; }
.rp-busca input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); flex: 1; min-width: 0; }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rp-enviar { height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.rp-albuns { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-alb { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border); background: var(--white); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.rp-alb.ativo { background: var(--primary); color: #fff; border-color: transparent; font-weight: 600; }
.rp-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.rp-grade-v { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rp-foto, .rp-video { border: 0; padding: 0; background: var(--white); border-radius: 12px; overflow: hidden; text-align: left; cursor: pointer;
  font: inherit; color: inherit; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.rp-foto:hover, .rp-video:hover { box-shadow: var(--shadow-md); }
.rp-foto-img { aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--muted) 16%, var(--white)); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.rp-foto-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-foto-leg { padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-foto-leg b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-foto-leg small { font-size: 12px; color: var(--muted); }
/* Pastas de fotos (cartões com capa + contagem) */
.rp-pastas-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.rp-pasta-card { position: relative; border: 0; padding: 0; background: var(--white); border-radius: 12px; overflow: hidden; text-align: left;
  cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.rp-pasta-card:hover { box-shadow: var(--shadow-md); }
.rp-pasta-capa { aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--muted) 16%, var(--white)); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.rp-pasta-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-pasta-qtd { position: absolute; top: 8px; right: 8px; background: rgba(8,12,20,.78); color: #fff; font-size: 12.5px; font-weight: 700;
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; display: flex; align-items: center; justify-content: center; }
.rp-pasta-info { padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rp-pasta-info b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-pasta-info small { font-size: 12px; color: var(--muted); }
.rp-pasta-nome { font-size: 13.5px; font-weight: 600; align-self: center; }
.rp-pasta-nome small { color: var(--muted); font-weight: 400; }
/* Botão de capa (★) sobre a foto, dentro da pasta */
.rp-capa-bt { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(8,12,20,.6); color: #fff; font-size: 16px; line-height: 28px; text-align: center; cursor: pointer; z-index: 2; }
.rp-capa-bt.on { background: #f59e0b; color: #fff; }
.rp-capa-bt:hover { background: rgba(8,12,20,.8); }
.rp-capa-bt.on:hover { background: #d97706; }
.rp-video-capa { aspect-ratio: 16 / 9; background: #273547; display: flex; align-items: center; justify-content: center; }
.rp-play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.92); color: #1e2a3b; display: flex; align-items: center; justify-content: center; }
.rp-aviso { display: flex; gap: 8px; align-items: center; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
[data-theme="dark"] .rp-aviso { background: #2b1d10; border-color: #7c4a1c; color: #fdba74; }
.rp-lista { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.rp-linha { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.rp-linha:last-child { border-bottom: 0; }
.rp-ext { width: 40px; height: 48px; flex-shrink: 0; border-radius: 6px; background: color-mix(in srgb, var(--primary) 12%, var(--white)); color: var(--primary);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-sizing: border-box; font-size: 10px; font-weight: 700; }
.rp-linha-txt { flex: 1; min-width: 0; }
.rp-linha-tit { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.rp-linha-info { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.rp-tag { background: var(--bg); border-radius: 4px; padding: 0 5px; }
.rp-grau { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #fef3c7; color: #92400e; white-space: nowrap; }
[data-theme="dark"] .rp-grau { background: #3a2a0c; color: #fbbf24; }
.rp-acoes { display: flex; gap: 6px; align-items: center; }
.rp-btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; }
.rp-btn-ico { width: 38px; height: 38px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.rp-del { color: #dc2626; }
.rp-overlay { position: fixed; inset: 0; z-index: 3000; }
.rp-luz { background: rgba(8,12,20,.94); color: #fff; display: flex; flex-direction: column; }
.rp-luz-cab { display: flex; align-items: center; gap: 10px; padding: 14px 20px; }
.rp-luz-tit { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-luz-sub { font-size: 13px; color: #cbd5e1; }
.rp-luz-bt { height: 42px; min-width: 42px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff;
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.rp-luz-bt.claro { background: #fff; color: #1e293b; border-color: #fff; }
.rp-luz-meio { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 16px; }
.rp-luz-img { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.rp-luz-img img, .rp-luz-img video { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 6px; }
.rp-seta { width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }
.rp-seta:hover { background: rgba(255,255,255,.24); }
.rp-luz-pos { text-align: center; font-size: 13px; color: #cbd5e1; padding: 12px; }
/* Zoom de imagens */
.rp-zoomavel { overflow: hidden; touch-action: none; }
.rp-zoomavel img { will-change: transform; }
.rp-zoombar { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.rp-zoom-bt { height: 36px; min-width: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(148,163,184,.5);
  background: rgba(148,163,184,.14); color: inherit; font: inherit; font-weight: 700; font-size: 18px; line-height: 1; cursor: pointer; }
.rp-zoom-bt.rp-zoom-fit { font-size: 13px; font-weight: 600; }
.rp-zoom-bt:hover { background: rgba(148,163,184,.26); }
.rp-zoom-pct { min-width: 54px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.rp-luz .rp-zoom-bt { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; }
.rp-luz .rp-zoom-pct { color: #cbd5e1; }
.rp-lateral { background: rgba(8,12,20,.55); display: flex; justify-content: flex-end; }
.rp-folha { width: 560px; max-width: 100%; height: 100%; background: var(--white); display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.25); }
.rp-folha-cab { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rp-folha-corpo { flex: 1; min-height: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: auto; }
.rp-folha-corpo iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.rp-folha-corpo img, .rp-folha-corpo video { max-width: 100%; max-height: 100%; }
.rp-folha-corpo.rp-zoomavel { overflow: hidden; }
.rp-folha-pe { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.rp-sem-previa { text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; }
.rp-texto { white-space: pre-wrap; font-size: 13px; padding: 18px; margin: 0; align-self: stretch; }
@media (max-width: 760px) {
  .rp { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; border-radius: 0; border-left: 0; border-right: 0; }
  .rp-cats { flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; gap: 6px; }
  .rp-cats-cab, .rp-cats-nota { display: none; }
  .rp-cat { width: auto; flex-shrink: 0; border: 1px solid var(--border); border-radius: 99px; min-height: 40px; height: 40px; padding: 0 14px; }
  .rp-cat-n { display: none; }
  .rp-main { padding: 16px 12px; }
  .rp-busca { flex: 1 1 100%; }
  .rp-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .rp-grade .rp-foto { border-radius: 6px; box-shadow: none; }
  .rp-grade .rp-foto .rp-foto-leg { display: none; }
  .rp-grade .rp-foto-img { aspect-ratio: 1 / 1; }
  .rp-grade-v { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rp-linha { flex-wrap: wrap; }
  .rp-acoes { width: 100%; justify-content: flex-end; }
  .rp-seta { position: absolute; top: 50%; z-index: 2; }
  .rp-seta:first-child { left: 8px; } .rp-seta:last-child { right: 8px; }
  .rp-luz-meio { position: relative; padding: 0 4px; }
}

/* ── Modo demonstração ───────────────────────────────────────────── */
.demo-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 13.5px; }
.demo-bar.fora { background: color-mix(in srgb, var(--primary) 10%, var(--white)); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--white)); color: var(--text); }
.demo-bar.dentro { background: #fff4d6; border: 1px solid #f5c451; color: #6b4a00; position: sticky; top: 0; z-index: 50; }
[data-theme="dark"] .demo-bar.dentro { background: #3a2c08; border-color: #8a6a14; color: #fde68a; }
.demo-bar-txt { flex: 1; min-width: 200px; }
.demo-bar-bt { height: 40px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.demo-bar.dentro .demo-bar-bt { background: #6b4a00; }
[data-theme="dark"] .demo-bar.dentro .demo-bar-bt { background: #fde68a; color: #3a2c08; }
.demo-admin { margin-bottom: 16px; }
.demo-estado { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); margin-left: 6px; text-transform: uppercase; letter-spacing: .04em; vertical-align: 2px; }
.demo-estado.on { background: #dcfce7; color: #166534; }
[data-theme="dark"] .demo-estado.on { background: #14532d; color: #bbf7d0; }
body.em-demo .sidebar { box-shadow: inset -4px 0 0 #f5c451; }

/* Mensalidades: em atraso x a vencer */
.mens-tag { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.mens-tag.atraso { background: #fee2e2; color: #dc2626; }
.mens-tag.avencer { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .mens-tag.atraso { background: #3b1717; color: #f87171; }
[data-theme="dark"] .mens-tag.avencer { background: #3a2a0c; color: #fbbf24; }

/* Sino de notificações */
.inbox-lista { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.inbox-item { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 10px 10px 12px; background: var(--white); }
.inbox-item.novo { border-color: color-mix(in srgb, var(--primary) 45%, var(--white)); background: color-mix(in srgb, var(--primary) 7%, var(--white)); }
.inbox-corpo { flex: 1; min-width: 0; }
.inbox-corpo[role="button"] { cursor: pointer; }
.inbox-tit { font-weight: 600; font-size: 14px; }
.inbox-item.novo .inbox-tit { font-weight: 700; }
.inbox-msg { font-size: 12.5px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.inbox-quando { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.inbox-x { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.inbox-x:hover { color: #dc2626; border-color: #fca5a5; }

/* Aniversários: filtros por tipo */
.aniv-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.aniv-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--white); color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.aniv-chip.on { background: color-mix(in srgb, var(--primary) 13%, var(--white)); border-color: color-mix(in srgb, var(--primary) 45%, var(--white)); color: var(--primary); font-weight: 600; }
.aniv-chip-n { font-size: 11.5px; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--bg); color: var(--muted); text-align: center; }
.aniv-dica { font-size: 12px; color: var(--muted); margin-left: 4px; }
.irmao-card.aniv-hoje { border-color: #f59e0b; background: #fffbeb; }
[data-theme="dark"] .irmao-card.aniv-hoje { background: #2b2108; border-color: #b45309; }

/* Relatório semanal de aniversários (prévia) */
.aniv-rel-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 6px; }
.aniv-rel-nav .func-btn { width: 44px; height: 40px; font-size: 20px; padding: 0; }
.aniv-rel-dica { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.aniv-rel-previa { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px 14px; background: var(--white); }
.aniv-rel-previa h2 { font-size: 15px; margin: 14px 0 6px; }
.aniv-rel-previa h2 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.aniv-rel-previa h3 { font-size: 13.5px; margin: 10px 0 4px; }
.aniv-rel-previa table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aniv-rel-previa th, .aniv-rel-previa td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.aniv-rel-previa th { background: var(--bg); font-size: 12px; }
.aniv-rel-previa .tag-gemeos { font-size: 11px; font-style: italic; color: var(--muted); }
.aniv-rel-previa .vazio { color: var(--muted); font-style: italic; font-size: 13px; }

/* Cerimônias (Iniciação, Elevação, Exaltação): despesas divididas entre os irmãos */
.cer-abas { margin-bottom: 14px; }
.cer-dica { font-size: 13px; color: var(--muted); margin: 0 0 14px; max-width: 70ch; }
.cer-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); }
.cer-card:hover { border-color: var(--primary); }
.cer-card > .cer-tipo { grid-column: 1; justify-self: start; }
.cer-card-tit { grid-column: 1; font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.cer-card-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); align-items: center; }
.cer-card-total { grid-column: 2; grid-row: 1 / span 3; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cer-tipo { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--primary) 13%, var(--white)); color: var(--primary); }
.cer-tipo.t-elevacao { background: color-mix(in srgb, #0d9488 15%, var(--white)); color: #0f766e; }
.cer-tipo.t-exaltacao { background: color-mix(in srgb, #b45309 16%, var(--white)); color: #b45309; }
[data-theme="dark"] .cer-tipo.t-elevacao { color: #5eead4; }
[data-theme="dark"] .cer-tipo.t-exaltacao { color: #fbbf24; }
.cer-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.cer-tag.caixa { border-color: #10b981; color: #059669; }

.cer-voltar { background: none; border: none; color: var(--primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 0; min-height: 40px; }
.cer-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cer-topo h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 6px 0 2px; overflow-wrap: anywhere; }
.cer-sub { font-size: 13px; color: var(--muted); }
.cer-topo-acoes { display: flex; gap: 8px; }
.cer-topo-acoes .btn-sm { min-height: 36px; }
[data-theme="dark"] .cer-topo-acoes .btn-sm.danger { background: #450a0a; color: #fecaca; }

.cer-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--text); }
.cer-check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--primary); }
.cer-check b { display: block; font-size: 14px; }
.cer-check small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cer-check-linha { margin-bottom: 14px; }
.cer-lancar { margin: -4px 0 14px; min-height: 40px; }

.cer-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cer-seg button { min-height: 42px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.cer-seg button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.cer-bloco { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.cer-bloco-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cer-bloco-cab h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.cer-total { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--text); }
.cer-add { display: flex; gap: 8px; margin-bottom: 10px; }
.cer-add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.cer-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.cer-envio { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cer-envio:not(:empty) { margin-bottom: 10px; }
.cer-gira { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: cer-gira .8s linear infinite; }
@keyframes cer-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cer-gira { animation: none; } }

.cer-desp { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.cer-desp-txt { min-width: 0; color: var(--text); }
.cer-desp-txt b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.cer-desp-txt small { display: block; font-size: 12px; color: var(--muted); }
.cer-desp-valor { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.cer-desp-acoes { display: flex; gap: 4px; }
.cer-ico { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 15px; }
.cer-ico:hover { border-color: var(--primary); }
.cer-ico.perigo:hover { border-color: #fca5a5; color: #dc2626; }
.cer-aviso { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: #fef3c7; color: #92400e; }
[data-theme="dark"] .cer-aviso { background: #3b2a06; color: #fcd34d; }

.cer-tab-wrap { overflow-x: auto; }
.cer-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--text); }
.cer-tab th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cer-tab td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cer-tab .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cer-tab tfoot td { font-weight: 700; border-bottom: none; }
.cer-nome { overflow-wrap: anywhere; }
.cer-pago { width: 104px; height: 40px; text-align: right; font: inherit; font-variant-numeric: tabular-nums; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.cer-pago:focus { outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent); border-color: var(--primary); }
.cer-pago.erro { border-color: #dc2626; }
.cer-sit { font-weight: 600; }
.cer-sit.falta { color: #dc2626; }
.cer-sit.recebe { color: #2563eb; }
.cer-sit.ok { color: #059669; }
[data-theme="dark"] .cer-sit.falta { color: #f87171; }
[data-theme="dark"] .cer-sit.recebe { color: #60a5fa; }
[data-theme="dark"] .cer-sit.ok { color: #34d399; }
.cer-confere { margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.cer-confere span { font-weight: 400; font-size: 12.5px; }
.cer-confere.ok { background: #ecfdf5; color: #065f46; }
.cer-confere.erro { background: #fef2f2; color: #991b1b; }
[data-theme="dark"] .cer-confere.ok { background: #052e22; color: #6ee7b7; }
[data-theme="dark"] .cer-confere.erro { background: #450a0a; color: #fecaca; }
.cer-h3 { font-size: 13.5px; font-weight: 700; color: var(--text); margin: 16px 0 6px; }
.cer-acertos { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--text); }
.cer-acertos li { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); }
.cer-acertos li.cer-quite { display: block; color: #059669; font-weight: 600; border-top: none; }
.cer-acertos b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cer-acertos i { color: var(--muted); }
.cer-seta { color: var(--muted); }
.cer-rodape { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.cer-rodape .wa-btn { min-height: 40px; padding: 0 14px; }

.cer-irmaos-topo { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin: 8px 0 6px; }
.cer-irmaos-topo span { flex: 1; }
.cer-link { background: none; border: none; color: var(--primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.cer-irmaos { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.cer-irmao { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; cursor: pointer; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.cer-irmao:last-child { border-bottom: none; }
.cer-irmao input { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; }
.cer-previa { margin-bottom: 12px; }
.cer-previa img { display: block; max-width: 100%; max-height: 220px; margin: 0 auto; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; }
.cer-previa-dica { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.cer-luz { background: rgba(8,12,20,.94); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cer-nota-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.cer-luz-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4); color: #fff; font-size: 18px; cursor: pointer; }

@media (max-width: 640px) {
  .cer-add-btn { flex: 1; padding: 0 8px; }
  .cer-desp { grid-template-columns: 1fr auto; }
  .cer-desp-txt { grid-column: 1 / -1; }
  .cer-desp-valor { grid-column: 1; }
  .cer-tab thead { display: none; }
  .cer-tab, .cer-tab tbody, .cer-tab tfoot { display: block; }
  .cer-tab tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .cer-tab td { padding: 0; border: none; }
  .cer-tab tbody td.cer-nome { grid-column: 1 / -1; font-weight: 600; }
  .cer-tab tbody td:nth-child(2) { text-align: left; font-size: 12.5px; color: var(--muted); }
  .cer-tab tbody td:nth-child(2)::before { content: "Parte: "; }
  .cer-tab tbody td:nth-child(3) { grid-row: 2 / span 2; grid-column: 2; }
  .cer-tab tbody td:nth-child(4) { text-align: left; }
  .cer-tab tfoot tr { grid-template-columns: 1fr 1fr; font-size: 12.5px; border-bottom: none; }
  .cer-tab tfoot td:nth-child(2)::before { content: "Total "; font-weight: 400; }
  .cer-tab tfoot td:nth-child(3)::before { content: "Já pago "; font-weight: 400; }
  .cer-tab tfoot td.num { text-align: left; }
  .cer-acertos li { grid-template-columns: 1fr auto; }
  .cer-acertos li .cer-seta { display: none; }
  .cer-acertos li span:nth-child(3)::before { content: "→ "; color: var(--muted); }
  .cer-acertos li b { grid-column: 2; grid-row: 1 / span 2; }
}

/* Agenda das Potências (GOE-MT, GLEMT, GOB-MT) */
.goe-pots { margin: 0 0 12px; }
.goe-tag.pot { margin-left: 0; margin-right: 2px; background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; }
.goe-tag.pot.p-glemt { background: color-mix(in srgb, #2563eb 13%, transparent); color: #1d4ed8; }
.goe-tag.pot.p-gobmt { background: color-mix(in srgb, #059669 14%, transparent); color: #047857; }
[data-theme="dark"] .goe-tag.pot { color: #fca5a5; }
[data-theme="dark"] .goe-tag.pot.p-glemt { color: #93c5fd; }
[data-theme="dark"] .goe-tag.pot.p-gobmt { color: #6ee7b7; }
.goe-tag.sug { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .goe-tag.sug { background: #3b2a06; color: #fcd34d; }
.goe-ev.sugestao { border-left: 3px dashed #d97706; }
.goe-link { display: inline-block; font-size: 12.5px; color: var(--primary); margin-top: 3px; }
.goe-sug-acoes { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.goe-sug-acoes .func-btn { min-height: 38px; }
.goe-sug-aviso { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; margin: 0 0 10px; }
[data-theme="dark"] .goe-sug-aviso { background: #3b2a06; color: #fcd34d; }

/* Início: data, relógio e temperatura no cabeçalho */
.home-agora { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.home-agora b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.home-agora small { font-size: .82em; opacity: .75; font-weight: 400; }
.home-agora a { color: var(--primary); }
.home-agora span:empty { display: none; }

/* Guardar e devolver cadastros dos irmãos */
.cad-intro { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.cad-intro b { color: var(--text); }
.cad-passo { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.cad-n { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.cad-corpo { flex: 1; min-width: 0; }
.cad-corpo h4, .cad-hist h4 { margin: 3px 0 4px; font-size: 14.5px; color: var(--text); }
.cad-corpo p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.cad-linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cad-linha .modal-input { flex: 1 1 150px; min-width: 0; margin: 0; }
.cad-linha .func-btn, .cad-corpo > .func-btn, .cad-confirmar { min-height: 40px; }
.cad-msg { font-size: 13px; margin-top: 8px; }
.cad-msg:empty { display: none; }
.cad-msg.ok { color: #059669; }
.cad-msg.erro { color: #dc2626; }
[data-theme="dark"] .cad-msg.ok { color: #34d399; }
[data-theme="dark"] .cad-msg.erro { color: #f87171; }
.cad-resumo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 8px; }
.cad-resumo div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.cad-resumo b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.cad-resumo span { font-size: 11.5px; color: var(--muted); }
.cad-nota { font-size: 12.5px !important; }
.cad-tab-wrap { max-height: 34vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.cad-tab { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--text); }
.cad-tab th { position: sticky; top: 0; background: var(--bg); text-align: left; font-size: 11.5px; color: var(--muted); padding: 6px 10px; }
.cad-tab td { padding: 6px 10px; border-top: 1px solid var(--border); vertical-align: top; }
.cad-tab small { color: var(--muted); }
.cad-acao { font-weight: 600; }
.cad-acao.a-reativar { color: #059669; }
.cad-acao.a-criar { color: #2563eb; }
.cad-acao.a-completar { color: var(--muted); }
[data-theme="dark"] .cad-acao.a-reativar { color: #34d399; }
[data-theme="dark"] .cad-acao.a-criar { color: #60a5fa; }
.cad-aviso { font-size: 12px; color: #b45309; margin-top: 2px; }
[data-theme="dark"] .cad-aviso { color: #fbbf24; }
.cad-hist { border-top: 1px solid var(--border); padding-top: 12px; }
.cad-hist-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--text); padding: 4px 0; }
.cad-hist-item.desfeita { color: var(--muted); }
@media (max-width: 640px) { .cad-resumo { grid-template-columns: repeat(2, 1fr); } }

/* Banco da Loja */
.bco-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.bco-grade .bco-larga { grid-column: 1 / -1; }
.bco-grade small { font-size: 11.5px; color: var(--muted); }
.bco-grade .modal-input { margin: 0; }
.bco-alerta { font-size: 13px; padding: 10px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; margin-bottom: 12px; }
[data-theme="dark"] .bco-alerta { background: #3b2a06; color: #fcd34d; }
.bco-alerta .goe-passos { margin: 8px 0; }
.bco-estado { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.bco-estado .ok { color: #059669; margin-top: 4px; }
.bco-estado .erro { color: #dc2626; margin-top: 4px; }
[data-theme="dark"] .bco-estado .ok { color: #34d399; }
[data-theme="dark"] .bco-estado .erro { color: #f87171; }
@media (max-width: 560px) { .bco-grade { grid-template-columns: 1fr; } }

/* Termo de aceite */
.trm-aviso { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.trm-aviso-txt { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.trm-aviso .func-btn { min-height: 40px; }
.trm-texto { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--bg); color: var(--text); }
.trm-texto p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.trm-texto p.final { font-weight: 700; }
.trm-prog { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.trm-prog b { color: var(--text); }
.trm-prog-barra { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin-bottom: 6px; }
.trm-prog-barra span { display: block; height: 100%; background: #10b981; border-radius: 99px; }
.trm-bloco { border-top: 1px solid var(--border); padding: 12px 0; }
.trm-bloco h4 { margin: 0 0 6px; font-size: 14.5px; color: var(--text); }
.trm-bloco p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.trm-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.trm-cab > div { display: flex; gap: 6px; flex-wrap: wrap; }
.trm-acoes { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.trm-pend { color: #b45309; font-weight: 600; }
[data-theme="dark"] .trm-pend { color: #fbbf24; }
.trm-semcim { color: #dc2626 !important; }
.trm-col-acoes { white-space: nowrap; text-align: right; }
.trm-col-acoes .wa-btn { margin-right: 6px; }
.cad-tab td small { display: inline-block; }
.trm-edita { min-height: 46vh; font-family: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical; }
.cad-linha .wa-btn { min-height: 40px; }

/* Inventário por seções (mesma moldura do repositório) */
.inv-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.inv-acoes .func-btn { height: 44px; }
.inv-sec-linha { position: relative; display: flex; align-items: center; }
.inv-sec-linha .rp-cat { flex: 1; }
.inv-sec-ed { display: none; position: absolute; right: 6px; gap: 2px; }
.inv-sec-linha:hover .inv-sec-ed, .inv-sec-linha:focus-within .inv-sec-ed { display: inline-flex; }
.inv-sec-ed button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: var(--white); color: var(--muted); cursor: pointer; font-size: 13px; }
.inv-sec-ed button:hover { color: var(--primary); }
.inv-sec-linha:hover .rp-cat-n { visibility: hidden; }
.rp-cat.inv-nova { color: var(--primary); font-weight: 600; margin-top: 6px; }
.inv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.inv-img { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.inv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.inv-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.inv-tag.c-novo { background: #dcfce7; color: #166534; }
.inv-tag.c-precisa_reforma { background: #fef3c7; color: #92400e; }
.inv-tag.comprar { background: #fee2e2; color: #991b1b; }
.inv-tag.evento { background: color-mix(in srgb, var(--primary) 14%, var(--white)); color: var(--primary); }
[data-theme="dark"] .inv-tag.c-novo { background: #052e1a; color: #86efac; }
[data-theme="dark"] .inv-tag.c-precisa_reforma { background: #3b2a06; color: #fcd34d; }
[data-theme="dark"] .inv-tag.comprar { background: #450a0a; color: #fecaca; }
.inv-vazio { text-align: center; color: var(--muted); padding: 40px 16px; }
.inv-vazio p { margin: 10px 0 16px; }
.inv-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.inv-2col .modal-input { margin: 0; }
.inv-foto-ed { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.inv-foto-box { width: 112px; height: 112px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.inv-foto-box img { width: 100%; height: 100%; object-fit: cover; }
.inv-foto-bts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inv-ver-foto { border-radius: 12px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 160px; max-height: 50vh; margin-bottom: 12px; color: var(--muted); }
.inv-ver-foto img { width: 100%; max-height: 50vh; object-fit: contain; }
.inv-ver { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; color: var(--text); }
.inv-ver dt { color: var(--muted); }
.inv-ver dd { margin: 0; }
.inv-picker { background: rgba(8,12,20,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.inv-picker-box { background: var(--white); border-radius: 14px; width: min(720px, 100%); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.inv-picker-cab { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.inv-picker-x { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.inv-picker-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 14px; overflow: auto; }
.inv-picker-foto { aspect-ratio: 1; border: 2px solid transparent; border-radius: 10px; overflow: hidden; padding: 0; background: var(--bg); cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.inv-picker-foto:hover { border-color: var(--primary); }
.inv-picker-foto img { width: 100%; height: 100%; object-fit: cover; }
.cad-tab small { color: var(--muted); }
@media (max-width: 760px) {
  .inv-acoes { width: 100%; }
  .inv-acoes .func-btn { flex: 1; padding: 0 8px; }
  .inv-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .inv-sec-ed { display: none !important; }
  .inv-sec-linha { flex-shrink: 0; }
  .inv-2col { grid-template-columns: 1fr; }
  .inv-foto-ed { flex-direction: column; align-items: stretch; }
  .inv-foto-box { width: 100%; height: 180px; }
  .inv-picker-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Repositório: pastas, seleção de várias fotos, mover/excluir ── */
.rp-alb small { opacity: .65; font-size: 11.5px; margin-left: 2px; }
.rp-alb-acao { margin-left: auto; border-style: dashed; }
.rp-pasta-acoes { display: flex; gap: 16px; margin-top: 8px; }
.rp-dica { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.rp-foto, .rp-video { position: relative; }
.rp-check { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff;
  background: rgba(15,23,42,.35); color: transparent; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.rp-foto.sel, .rp-video.sel { outline: 3px solid var(--primary); outline-offset: -3px; }
.rp-foto.sel .rp-check, .rp-video.sel .rp-check { background: var(--primary); color: #fff; }
.rp-foto.bloq, .rp-video.bloq { opacity: .45; cursor: not-allowed; }
.rp-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 10%, var(--white)); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); }
.rp-selbar-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rp-selbar .func-btn[disabled] { opacity: .5; cursor: not-allowed; }
.rp-luz-bt.perigo:hover { background: #dc2626; border-color: #dc2626; }
@media (max-width: 760px) {
  .rp-selbar-acoes { margin-left: 0; width: 100%; }
  .rp-selbar-acoes .func-btn { flex: 1 1 auto; }
  .rp-grade .rp-check { top: 5px; left: 5px; width: 22px; height: 22px; }
}

/* ── Mensalidades: cobranças extraordinárias ── */
.ext-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ext-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ext-linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; }
.ext-linha b { flex: 1; min-width: 140px; }
.ext-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.ext-paga { color: #16a34a; font-size: 12px; font-weight: 600; }
.ext-tag { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; margin-top: 3px; }
.ext-busca { display: flex; gap: 8px; }
.ext-busca .modal-input { flex: 1; }
.ext-irmaos { max-height: 34vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; padding: 4px; }
.ext-irmao { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ext-irmao:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.ext-irmao input { width: 18px; height: 18px; flex: none; }
.ext-irmao small { color: var(--muted); }
:root[data-theme="dark"] .ext-tag { background: #451a03; color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ext-tag { background: #451a03; color: #fcd34d; } }

/* ── Parcelamentos ── */
.ext-card { margin-bottom: 12px; }
.ext-parc-info { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.ext-parc-info b { color: var(--text); }
.parc-linha { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.parc-linha.quitado { opacity: .7; }
.parc-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.parc-topo b { flex: 1; min-width: 140px; }
.parc-barra { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 20%, transparent); overflow: hidden; }
.parc-barra span { display: block; height: 100%; background: #16a34a; border-radius: 99px; }
.parc-info { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; }
.parc-info b { color: var(--text); }
.parc-info .cer-link { margin-left: auto; }

/* ── Presenças: sessões registradas ── */
.pres-hist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pres-hist-linha { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
.pres-hist-data { display: flex; flex-direction: column; min-width: 92px; }
.pres-hist-data small { color: var(--muted); font-size: 12px; }
.pres-hist-txt { flex: 1; min-width: 180px; }
.pres-hist-tit { font-weight: 700; font-size: 14px; }
.pres-hist-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pres-hist-acoes { display: flex; gap: 6px; }
@media (max-width: 760px) { .pres-hist-acoes { width: 100%; } .pres-hist-acoes .func-btn { flex: 1; } }

/* ── Agenda: lista de presença da sessão que passou ── */
.agenda-presenca { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 10px; border-radius: 8px; border: 1px solid #86efac; background: color-mix(in srgb, #16a34a 8%, var(--white)); }
.agenda-pres-ok { font-size: 9px; font-weight: 800; color: #16a34a; line-height: 1; }

/* ── Biblioteca (trabalhos por grau) ── */
.bib { max-width: 980px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.bib-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.bib-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.bib-graus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bib-grau { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--white); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.bib-grau b { font-size: 15px; }
.bib-grau span { font-size: 12.5px; color: var(--muted); }
.bib-grau.ativo { background: var(--primary); border-color: transparent; color: #fff; }
.bib-grau.ativo span { color: #e0e7ff; }
.bib-grau[disabled] { opacity: .5; cursor: not-allowed; }
.bib-busca { max-width: none; }
.bib-vazio { text-align: center; padding: 36px; color: var(--muted); }
.bib-lista { display: flex; flex-direction: column; gap: 8px; }
.bib-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--white); flex-wrap: wrap; }
.bib-item-txt { flex: 1; min-width: 180px; }
.bib-item-tit { font-weight: 700; font-size: 15px; }
.bib-item-info { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bib-item-acoes { display: flex; gap: 6px; align-items: center; }
.bib-overlay { align-items: stretch; justify-content: center; padding: 0; }
.bib-leitor { width: 100%; max-width: 980px; height: 100%; display: flex; flex-direction: column; background: var(--bg, #f1f5f9); }
.bib-leitor-cab { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--white); border-bottom: 1px solid var(--border); }
.bib-leitor-corpo { flex: 1; overflow-y: auto; padding: 12px 8px 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bib-pagina { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); border-radius: 4px; max-width: 100%; }
.bib-texto { background: var(--white); color: var(--text); max-width: 760px; width: 100%; padding: 28px 24px; border-radius: 8px; line-height: 1.7; font-size: 16px; }
.bib-texto h2 { font-size: 22px; margin: 0 0 12px; } .bib-texto h3 { font-size: 18px; margin: 18px 0 8px; }
.bib-texto p { margin: 0 0 12px; text-align: justify; }
.bib-texto pre { white-space: pre-wrap; font-family: inherit; margin: 0; }
@media (max-width: 760px) {
  .bib-graus { gap: 6px; } .bib-grau { padding: 10px; }
  .bib-item-acoes { width: 100%; } .bib-item-acoes .func-btn.primary { flex: 1; }
  .bib-texto { padding: 18px 14px; font-size: 15.5px; }
}
.rp-overlay.bib-overlay { display: flex; background: rgba(15, 23, 42, .65); }
.bib .rp-busca { flex: 0 0 auto; height: auto; min-height: 0; align-self: stretch; }

/* ── Instalar no celular ── */
.app-aviso { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 2500; display: flex; align-items: center; gap: 10px;
  max-width: 520px; margin: 0 auto; padding: 10px 12px; border-radius: 14px; background: var(--white); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(15,23,42,.25); }
.app-aviso img { border-radius: 10px; flex: none; }
.app-aviso-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.app-aviso-txt span { color: var(--muted); font-size: 12px; }
.app-aviso-x { border: none; background: transparent; color: var(--muted); font-size: 16px; padding: 6px; cursor: pointer; }
.app-passos { margin: 4px 0 12px; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; line-height: 1.45; }

/* ── Locações do espaço ── */
.loc { max-width: 980px; }
.loc-abas { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: 4px 0 16px; }
.loc-abas button { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.loc-abas button.ativa { color: var(--text); border-bottom-color: #0f766e; }
.loc-lista { display: flex; flex-direction: column; gap: 10px; }
.loc-card, .loc-conf { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.loc-card { cursor: pointer; }
.loc-card:hover { border-color: #0f766e66; }
.loc-conf { margin-bottom: 10px; }
.loc-data { flex: 0 0 56px; text-align: center; background: #f0fdfa; color: #0f766e; border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.loc-data b { display: block; font-size: 20px; }
.loc-data span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.loc-info { flex: 1; min-width: 0; }
.loc-tit { font-weight: 700; font-size: 15px; }
.loc-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.loc-selos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.loc-selos:empty { display: none; }
.loc-selo { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.loc-valor { text-align: right; flex: 0 0 auto; }
.loc-valor b { display: block; font-size: 15px; }
.loc-valor span { font-size: 12px; color: var(--muted); }
.loc-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }
.loc-acoes .func-btn { font-size: 12px; padding: 4px 10px; }
.loc-vazio { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; background: var(--white); border: 1px dashed var(--border); border-radius: 12px; margin-bottom: 10px; }
.loc-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.loc-atraso { font-size: 11px; font-weight: 700; color: #b91c1c; background: #fee2e2; border-radius: 99px; padding: 1px 7px; }
.loc-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.loc-resumo > div { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.loc-resumo span, .loc-campos span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.loc-resumo b { font-size: 14px; }
.loc-bloco { margin-top: 14px; }
.loc-bloco h4, .loc-form h4 { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: #0f766e; }
.loc-form h4 { margin: 16px 0 8px; }
.loc-form h4:first-child { margin-top: 0; }
.loc-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.loc-campos b { font-size: 14px; font-weight: 600; word-break: break-word; }
.loc-obs { font-size: 13.5px; color: var(--text); background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; white-space: pre-wrap; }
.loc-itens { margin: 0; padding-left: 18px; font-size: 14px; columns: 2; }
.loc-tab-wrap { overflow-x: auto; }
.loc-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.loc-tab th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.loc-tab td { padding: 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.loc-det { font-size: 12.5px; color: var(--muted); min-width: 180px; }
.loc-det .loc-acoes { justify-content: flex-start; }
.loc-bloco label.func-btn { display: inline-flex; align-items: center; }
.loc-dica { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.loc-trav { font-size: 12.5px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 8px; padding: 6px 10px; margin: 10px 0 6px; }
.loc-parc-ed { margin-top: 10px; }
.loc-parc-lin { display: grid; grid-template-columns: 30px 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.loc-parc-lin span { font-size: 13px; color: var(--muted); }
.loc-parc-lin .func-btn { padding: 6px 10px; }
.loc-itens-sel { display: flex; flex-direction: column; gap: 6px; }
.loc-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.loc-item > span { flex: 1; }
.loc-item input[type=number] { width: 80px; padding: 5px 8px; }
.loc-item small { color: var(--muted); font-size: 12px; min-width: 44px; }
.loc-conflito { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.loc-conflito ul { margin: 6px 0 8px 18px; padding: 0; }
@media (max-width: 600px) {
  .loc-card, .loc-conf { flex-wrap: wrap; }
  .loc-conf .loc-valor { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .loc-resumo { grid-template-columns: 1fr 1fr; }
  .loc-itens { columns: 1; }
  .loc-parc-lin { grid-template-columns: 26px 1fr 1fr auto; gap: 6px; }
}
[data-theme="dark"] .loc-data { background: #0b2b28; color: #5eead4; }
[data-theme="dark"] .loc-resumo > div, [data-theme="dark"] .loc-obs { background: #161c2b; }
[data-theme="dark"] .loc-tab td { border-bottom-color: var(--border); }
[data-theme="dark"] .loc-bloco h4, [data-theme="dark"] .loc-form h4 { color: #5eead4; }
[data-theme="dark"] .loc-trav { background: #052e1a; border-color: #14532d; color: #86efac; }
[data-theme="dark"] .loc-conflito { background: #2b1d10; border-color: #7c4a1c; color: #fdba74; }
[data-theme="dark"] .loc-atraso { background: #450a0a; color: #fecaca; }
[data-theme="dark"] .loc-abas button.ativa { border-bottom-color: #5eead4; }
/* ligar conta à ficha de irmão */
.lf-tit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 6px; cursor: pointer; }
.lf-ficha { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; font-size: 14px; }
.lf-ficha.sug { border-color: #16a34a66; background: #f0fdf4; }
[data-theme="dark"] .lf-ficha.sug { background: #052e1a; }
.lf-ficha em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
[data-theme="dark"] .lf-ficha em { background: #14532d; color: #bbf7d0; }
.lf-ficha input { margin-top: 3px; }

/* ── SOS entre irmãos ── */
#sosBanner { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; margin: -4px 0 14px; }
.sos-banner { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: #fff; cursor: pointer;
  background: #b91c1c; border: none; border-radius: 12px; padding: 11px 14px; box-shadow: 0 4px 14px rgba(185,28,28,.35); }
.sos-banner b { display: block; font-size: 14.5px; }
.sos-banner small { font-size: 12.5px; opacity: .9; }
.sos-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.sos-ver { background: rgba(255,255,255,.18); border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.sos-pulso { width: 12px; height: 12px; border-radius: 50%; background: #fff; flex: 0 0 auto; animation: sosPulso 1.4s infinite; }
@keyframes sosPulso { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .sos-pulso { animation: none; } }
.sos { max-width: 720px; }
.sos-botao { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin: 6px 0 22px; padding: 20px;
  font: inherit; font-size: 20px; font-weight: 800; color: #fff; background: #dc2626; border: none; border-radius: 16px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(220,38,38,.35); }
.sos-botao span { font-size: 28px; }
.sos-botao:active { transform: scale(.99); }
.sos-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 10px; }
.sos-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.sos-card.aberto { border: 2px solid #dc2626; }
.sos-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sos-nome { font-weight: 700; font-size: 16px; }
.sos-sub { font-size: 12.5px; color: var(--muted); }
.sos-motivo { margin: 8px 0 0; font-size: 14.5px; }
.sos-st { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.sos-st-aberto { background: #fee2e2; color: #b91c1c; }
.sos-st-indo { background: #fef3c7; color: #a16207; }
.sos-st-ok { background: #dcfce7; color: #15803d; }
.sos-st-cancel { background: #f1f5f9; color: #64748b; }
[data-theme="dark"] .sos-st-aberto { background: #450a0a; color: #fecaca; }
[data-theme="dark"] .sos-st-indo { background: #3b2c08; color: #fcd34d; }
[data-theme="dark"] .sos-st-ok { background: #052e1a; color: #86efac; }
[data-theme="dark"] .sos-st-cancel { background: #1e293b; color: #94a3b8; }
.sos-links, .sos-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.sos-links a { text-decoration: none; }
.sos-indo { margin-top: 10px; font-size: 14px; }
.sos-indo small { color: var(--muted); }
.sos-vou { background: #a16207 !important; }
.sos-ok { background: #15803d !important; }
.sos-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sos-chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--white); color: var(--text); cursor: pointer; }
.sos-chip.on { background: #dc2626; color: #fff; border-color: #dc2626; }
.sos-check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 10px; }

/* ── Ajuda entre irmãos: carona e pedidos de ajuda ── */
.aj-tres { display: grid; gap: 10px; margin: 6px 0 18px; }
.aj-op { display: flex; align-items: center; gap: 14px; width: 100%; border: none; border-radius: 16px; padding: 16px; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.aj-op:active { transform: scale(.99); }
.aj-op b { display: block; font-size: 17px; }
.aj-op small { font-size: 13px; opacity: .92; }
.aj-ic { font-size: 28px; width: 42px; text-align: center; flex: 0 0 auto; }
.aj-op-sos { background: #dc2626; box-shadow: 0 6px 16px rgba(220,38,38,.28); }
.aj-op-car { background: #2563eb; }
.aj-op-ped { background: #0f766e; }
.aj-banner-carona { background: #1d4ed8 !important; }
.aj-card-car { border-left: 4px solid #2563eb; }
.aj-card-ped { border-left: 4px solid #0f766e; }
.aj-foco { box-shadow: 0 0 0 3px rgba(37,99,235,.35); }
.aj-tg-car { background: #dbeafe; color: #1d4ed8; }
.aj-tg-ped { background: #ccfbf1; color: #0f766e; }
[data-theme="dark"] .aj-tg-car { background: #172554; color: #bfdbfe; }
[data-theme="dark"] .aj-tg-ped { background: #042f2e; color: #99f6e4; }
.aj-b-car { background: #2563eb !important; }
.aj-b-ped { background: #0f766e !important; }
.aj-chip-car.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.aj-chip-ped.on { background: #0f766e; border-color: #0f766e; color: #fff; }
.aj-tipo { font-size: 11.5px; font-weight: 800; color: #0f766e; text-transform: uppercase; letter-spacing: .04em; }
[data-theme="dark"] .aj-tipo { color: #5eead4; }
.aj-cod { font-size: 12px; color: var(--muted); margin-top: 8px; }
.aj-nota { font-size: 12.5px; color: var(--muted); background: var(--bg, #f8fafc); border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; line-height: 1.45; }
.aj-dois { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aj-priv, .aj-pix, .aj-ofertas { font-size: 13.5px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg, #f8fafc); }
.aj-pix { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; word-break: break-all; }
.aj-ofertas > div { margin-top: 4px; }
.aj-ofertas a, .sos-indo a { text-decoration: none; }
.aj-ok { font-size: 13.5px; color: #15803d; font-weight: 600; }
.aj-hist { margin-top: 22px; }
.aj-hist summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.aj-h4 { font-size: 12.5px; color: var(--muted); margin: 14px 0 8px; }
.aj-mural-tit { font-size: 13px; font-weight: 800; color: #0f766e; text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 8px; }

/* ── Plano B (continuidade) ── */
.cont-banner { background: #0f766e !important; }
.cont-dois { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .cont-dois { grid-template-columns: 1fr; } }
.cont-prog { float: right; font-size: 12px; font-weight: 700; color: var(--muted); }
.cont-lista .sos-check { margin-top: 8px; align-items: flex-start; }
.cont-alerta { background: #fef3c7; color: #92400e; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
[data-theme="dark"] .cont-alerta { background: #3b2c08; color: #fcd34d; }
.cont-plano { padding-left: 20px; font-size: 14px; line-height: 1.55; }
.cont-plano li { margin-bottom: 8px; }
#contBanner { margin: -4px 0 14px; }

/* ── Pix das mensalidades ── */
.pix-meus .pix-mes, .pix-conf .pix-item { border-top: 1px solid var(--border); padding: 10px 0; }
.pix-meus .pix-mes:first-of-type, .pix-conf .pix-item:first-of-type { border-top: none; }
.pix-mes-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pix-val { font-weight: 800; font-size: 16px; margin-top: 4px; }
.pix-st { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pix-st-ok { background: #dcfce7; color: #15803d; } .pix-st-inf { background: #fef3c7; color: #a16207; }
.pix-st-ab { background: #e0e7ff; color: #3730a3; } .pix-st-at { background: #fee2e2; color: #b91c1c; }
[data-theme="dark"] .pix-st-ok { background: #052e1a; color: #86efac; } [data-theme="dark"] .pix-st-inf { background: #3b2c08; color: #fcd34d; }
[data-theme="dark"] .pix-st-ab { background: #1e1b4b; color: #c7d2fe; } [data-theme="dark"] .pix-st-at { background: #450a0a; color: #fecaca; }
.pix-btn { background: #0f766e !important; border-color: #0f766e !important; }
.pix-ok-btn { background: #15803d !important; }
.btn-sm.pix-mini { margin-top: 4px; background: #0f766e; color: #fff; border: none; border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: pointer; }
.mens-tag.pix-inf { background: #fef3c7; color: #a16207; }
.pix-qr { display: block; margin: 0 auto 8px; width: 220px; max-width: 70vw; height: auto; image-rendering: pixelated; background: #fff; border-radius: 8px; }
.pix-linha { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.pix-linha b { text-align: right; word-break: break-all; }
.pix-cc { font-family: ui-monospace, monospace; font-size: 11px; background: var(--bg, #f1f5f9); border-radius: 8px; padding: 8px; word-break: break-all; margin-top: 10px; user-select: all; }
.pix-checks { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-top: 6px; }
.pix-ok { color: #15803d; } .pix-nao { color: #b45309; }
.pix-alerta { color: #b45309; font-size: 13px; margin-top: 6px; }
.pix-cfg-atual { font-size: 14px; line-height: 1.6; }

/* Agenda: formulários de sessão/evento cabem na tela do celular */
#agendaFormSessao .form-input, #agendaFormSessao .form-select,
#agendaFormEvento .form-input, #agendaFormEvento .form-select { max-width: 100%; box-sizing: border-box; min-width: 0; }
@media (max-width: 560px) {
  #agendaFormSessao .form-grid, #agendaFormEvento .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Compras em etapas ── */
.cmp-filtros { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin:10px 0 14px; }
.cmp-ocultos { display:flex; align-items:center; gap:6px; font-size:13px; margin-left:auto; }
.cmp-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:6px 0 10px; }
.cmp-stat { background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px 14px; text-align:left; cursor:pointer; display:flex; flex-direction:column; gap:2px; font:inherit; color:var(--text); }
.cmp-stat b { font-size:20px; }
.cmp-stat span { font-size:12px; color:var(--muted); }
.cmp-stat.forte { border-color:#93c5fd; background:#eff6ff; }
.cmp-stat.forte b { color:#1d4ed8; }
.cmp-apagar { background:#fff; border:1px solid var(--border); border-radius:12px; padding:10px 14px; margin-bottom:12px; }
.cmp-apagar-tit { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:4px; }
.cmp-apagar-lin { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:6px 0; border-top:1px solid var(--border); font-size:14px; }
.cmp-apagar-lin:first-of-type { border-top:none; }
.cmp-apagar-lin small { display:block; color:var(--muted); font-size:12px; }
.cmp-card { border-left-width:5px; }
.cmp-card.cmp-e-pedido { border-left-color:#8b5cf6; }
.cmp-card.cmp-e-autorizada { border-left-color:#06b6d4; }
.cmp-card.cmp-e-pendente { border-left-color:#f59e0b; }
.cmp-card.cmp-e-apagar { border-left-color:#2563eb; }
.cmp-card.cmp-e-paga { border-left-color:#10b981; }
.cmp-card.cmp-e-recusada { border-left-color:#ef4444; opacity:.85; }
.cmp-etapa { padding:3px 10px; border-radius:20px; font-size:12px; font-weight:700; white-space:nowrap; }
.cmp-etapa.cmp-e-pedido { background:#ede9fe; color:#5b21b6; }
.cmp-etapa.cmp-e-autorizada { background:#cffafe; color:#155e75; }
.cmp-etapa.cmp-e-pendente { background:#fef3c7; color:#92400e; }
.cmp-etapa.cmp-e-apagar { background:#dbeafe; color:#1e40af; }
.cmp-etapa.cmp-e-paga { background:#d1fae5; color:#065f46; }
.cmp-etapa.cmp-e-recusada { background:#fee2e2; color:#991b1b; }
.cmp-chips { display:flex; flex-wrap:wrap; gap:6px; margin:-2px 0 8px; }
.cmp-chip { font-size:12px; background:#f1f5f9; color:#334155; border-radius:20px; padding:2px 9px; }
.cmp-alerta { font-size:13px; background:#fffbeb; color:#92400e; border:1px solid #fde68a; border-radius:8px; padding:6px 10px; margin-bottom:8px; }
.cmp-pago { font-size:13px; background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; border-radius:8px; padding:8px 10px; margin-bottom:8px; line-height:1.5; }
.cmp-pago small { color:#047857; }
.cmp-passos { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); margin-bottom:8px; flex-wrap:wrap; }
.cmp-passos span { padding:2px 8px; border-radius:20px; background:#f1f5f9; }
.cmp-passos span.feito { background:#dbeafe; color:#1e40af; font-weight:600; }
.cmp-passos i { font-style:normal; color:#cbd5e1; }
.cmp-arq-tit { color:var(--muted); align-self:center; }
.cmp-escolha { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.cmp-escolha label { border:1px solid var(--border); border-radius:10px; padding:8px 10px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; cursor:pointer; font-weight:600; }
.cmp-escolha label small { width:100%; font-weight:400; color:var(--muted); font-size:12px; }
.cmp-escolha label:has(input:checked) { border-color:#2563eb; background:#eff6ff; }
.cmp-abater { background:#f8fafc; border:1px solid var(--border); border-radius:10px; padding:10px 12px; margin:6px 0 12px; display:flex; flex-direction:column; gap:6px; font-size:14px; }
.cmp-abater label { display:flex; gap:8px; align-items:center; }
.cmp-liquido { font-size:13px; color:#1e40af; }
.push-box.cmp-tes { display:flex; gap:10px; align-items:center; border-color:#93c5fd; }
.push-box.cmp-tes span { flex:1; }
@media (max-width:640px) { .cmp-stats { grid-template-columns:1fr; } .cmp-escolha { grid-template-columns:1fr; } .cmp-ocultos { margin-left:0; } }
[data-theme="dark"] .cmp-stat, [data-theme="dark"] .cmp-apagar { background:#1e293b; border-color:#334155; }
[data-theme="dark"] .cmp-stat.forte { background:#172554; border-color:#1e40af; }
[data-theme="dark"] .cmp-stat.forte b { color:#bfdbfe; }
[data-theme="dark"] .cmp-chip, [data-theme="dark"] .cmp-passos span { background:#334155; color:#e2e8f0; }
[data-theme="dark"] .cmp-passos span.feito { background:#1e3a8a; color:#dbeafe; }
[data-theme="dark"] .cmp-alerta { background:#451a03; color:#fde68a; border-color:#78350f; }
[data-theme="dark"] .cmp-pago { background:#052e2b; color:#a7f3d0; border-color:#065f46; }
[data-theme="dark"] .cmp-pago small { color:#6ee7b7; }
[data-theme="dark"] .cmp-abater { background:#0f172a; border-color:#334155; }
[data-theme="dark"] .cmp-liquido { color:#93c5fd; }
[data-theme="dark"] .cmp-escolha label:has(input:checked) { background:#172554; border-color:#3b82f6; }

/* ── Informativo da Loja ── */
.inf-topo{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.inf-h1{font-size:22px;font-weight:800;margin:0 0 2px;display:flex;align-items:center;gap:9px}
.inf-sub{color:var(--muted);font-size:13.5px;margin:0 0 18px}
.inf-tag{display:inline-block;background:color-mix(in srgb,var(--gold) 20%,transparent);color:var(--gold);font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:3px 10px;border-radius:99px;border:1px solid color-mix(in srgb,var(--gold) 35%,transparent)}
.inf-selo{display:inline-block;font-size:11px;font-weight:700;padding:3px 8px;border-radius:99px;margin-left:4px}
.inf-selo.pub{background:color-mix(in srgb,var(--primary) 18%,transparent);color:var(--primary)}
.inf-loja{color:var(--muted)}
.inf-meta{color:var(--muted);font-size:12.5px;margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.inf-motif{font-size:52px;opacity:.55;color:#fff}
.inf-destaque{position:relative;border-radius:16px;overflow:hidden;border:1px solid var(--border);margin-bottom:18px;cursor:pointer;box-shadow:var(--shadow)}
.inf-destaque:hover{box-shadow:var(--shadow-md)}
.inf-cover{display:flex;align-items:center;justify-content:center;height:220px}
.inf-capt{padding:18px 20px;background:var(--white)}
.inf-destaque h2{font-family:'Cormorant Garamond',serif;font-size:28px;line-height:1.1;margin:10px 0 2px;font-weight:700}
.inf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.inf-card{background:var(--white);border:1px solid var(--border);border-radius:14px;overflow:hidden;cursor:pointer;box-shadow:var(--shadow);transition:.15s}
.inf-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.inf-cv{display:flex;align-items:center;justify-content:center;height:128px}
.inf-bd{padding:13px 15px 15px}
.inf-card h3{font-family:'Cormorant Garamond',serif;font-size:21px;line-height:1.12;margin:8px 0 5px;font-weight:700}
.inf-card p{color:var(--muted);font-size:13px;line-height:1.5;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.inf-voltar{display:inline-flex;gap:7px;color:var(--primary);font-weight:600;font-size:13.5px;cursor:pointer;margin-bottom:14px}
.inf-artigo{background:var(--white);border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:var(--shadow-md);max-width:800px}
.inf-hero{height:250px;display:flex;align-items:center;justify-content:center}
.inf-hero-motif{font-size:70px;color:rgba(255,255,255,.6)}
.inf-corpo{padding:26px 32px 32px}
.inf-artigo h1{font-family:'Cormorant Garamond',serif;font-size:34px;line-height:1.1;margin:12px 0 8px;font-weight:700}
.inf-meta2{color:var(--muted);font-size:13px;padding-bottom:14px;border-bottom:1px solid var(--border);margin-bottom:16px}
.inf-txt{font-size:15.5px;line-height:1.75}
.inf-txt p{margin:0 0 14px}
.inf-fig{margin:18px 0 6px;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.inf-fig-img{display:block;height:230px;background:var(--bg) center/cover no-repeat}
.inf-fig figcaption{padding:8px 12px;color:var(--muted);font-size:12.5px;background:var(--bg)}
.inf-acoes{margin-top:18px}
.inf-ed-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px;align-items:start}
.inf-panel{background:var(--white);border:1px solid var(--border);border-radius:14px;padding:18px 20px;box-shadow:var(--shadow)}
.inf-panel h3{margin:0 0 14px;font-size:16px;font-weight:700}
.inf-fg{margin-bottom:13px}
.inf-fg>label{display:block;font-size:12.5px;font-weight:600;color:var(--text);margin-bottom:5px}
.inf-inp{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:9px;color:var(--text);font:inherit;font-size:14px;padding:9px 11px}
.inf-ta{min-height:130px;resize:vertical;line-height:1.6}
.inf-row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.inf-file{width:100%;font-size:12.5px;color:var(--muted)}
.inf-rm{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted);margin-top:5px;font-weight:400}
.inf-emojis{display:flex;flex-wrap:wrap;gap:3px;background:var(--bg);border:1px solid var(--border);border-radius:9px;padding:6px;margin-bottom:6px}
.inf-emgrp{font-size:13px;opacity:.7;padding:0 4px;align-self:center}
.inf-em{border:0;background:transparent;font-size:18px;line-height:1;padding:3px 4px;border-radius:6px;cursor:pointer}
.inf-em:hover{background:var(--border)}
.inf-themes{display:flex;gap:8px}
.inf-sw{width:42px;height:28px;border-radius:7px;cursor:pointer;border:2px solid transparent}
.inf-sw.sel{border-color:var(--text);box-shadow:0 0 0 2px var(--primary)}
.inf-g-azul{background:linear-gradient(135deg,#243b6e,#4f7bea)}
.inf-g-verde{background:linear-gradient(135deg,#0f5132,#2e9e6b)}
.inf-g-ocre{background:linear-gradient(135deg,#7a3b12,#c98a3c)}
.inf-g-roxo{background:linear-gradient(135deg,#3b2a6e,#7a5cc0)}
.inf-g-ciano{background:linear-gradient(135deg,#0b3a5e,#2a7fb8)}
.inf-rad{display:flex;gap:7px;align-items:center;font-size:13.5px;margin:4px 0;font-weight:500}
.inf-btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.inf-li{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}
.inf-li:last-child{border-bottom:0}
.inf-mini{width:42px;height:42px;border-radius:8px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-size:19px}
.inf-li b{font-size:13.5px}.inf-li small{color:var(--muted);font-size:12px}
.inf-pill{font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:99px;text-transform:uppercase}
.inf-pill.pub{background:color-mix(in srgb,#2e9e6b 22%,transparent);color:#2e9e6b}
.inf-pill.rasc{background:color-mix(in srgb,var(--gold) 20%,transparent);color:var(--gold)}
@media(max-width:820px){.inf-ed-grid{grid-template-columns:1fr}.inf-row2{grid-template-columns:1fr}.inf-corpo{padding:20px 18px 24px}}

.inf-disp{font-size:12px;color:#2e9e6b;font-weight:600;margin-left:6px}
/* filtro por categoria (leitura) */
.inf-chips{display:flex;gap:8px;flex-wrap:wrap;margin:2px 0 18px}
.inf-chip{display:inline-flex;align-items:center;gap:6px;background:var(--white);border:1px solid var(--border);color:var(--text);font-size:13px;font-weight:600;padding:6px 13px;border-radius:99px;cursor:pointer;transition:.12s}
.inf-chip:hover{border-color:var(--primary)}
.inf-chip.sel{background:var(--primary);border-color:var(--primary);color:#fff}
.inf-chip-n{font-size:11px;opacity:.8;background:color-mix(in srgb,var(--text) 10%,transparent);border-radius:99px;padding:0 6px;min-width:18px;text-align:center}
.inf-chip.sel .inf-chip-n{background:rgba(255,255,255,.25)}
.inf-chips-mes{margin-top:-8px;margin-bottom:16px}
.inf-chips-mes .inf-chip{font-weight:500;font-size:12.5px}
/* painel de categorias (edição) */
.inf-cat-topo{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.inf-cat-lista{display:flex;flex-direction:column}
.inf-cat-li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border)}
.inf-cat-li:last-child{border-bottom:0}
.inf-cat-emo{width:34px;height:34px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-size:18px;background:var(--bg);border-radius:8px}
.inf-cat-nome{flex:1;min-width:0;font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inf-cat-qtd{font-size:12px;font-weight:700;color:var(--muted);background:var(--bg);border-radius:99px;padding:2px 9px;min-width:22px;text-align:center}
.inf-cat-nota{font-size:12px;color:var(--muted);margin:10px 0 0}
/* mover matéria (lista do editor) */
.inf-move{margin-top:5px;max-width:200px;background:var(--bg);border:1px solid var(--border);border-radius:7px;color:var(--text);font:inherit;font-size:12px;padding:3px 6px}
/* seletor de emoji no modal de categoria */
.inf-cat-emj{background:var(--bg);border:1px solid var(--border);border-radius:9px;padding:6px 8px;max-height:168px;overflow:auto}
.inf-em-g{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:6px 0 2px}
.inf-em-row{display:flex;flex-wrap:wrap;gap:3px}
.inf-cat-em.sel{background:var(--primary);box-shadow:0 0 0 2px var(--primary)}
@media(max-width:820px){.inf-move{max-width:100%}}
/* editor rico */
.inf-tb{display:flex;flex-wrap:wrap;gap:3px;align-items:center;background:var(--bg);border:1px solid var(--border);border-bottom:0;border-radius:9px 9px 0 0;padding:6px}
.inf-tb-b{border:1px solid transparent;background:transparent;color:var(--text);font-size:14px;line-height:1;min-width:30px;height:30px;padding:0 7px;border-radius:7px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.inf-tb-b:hover{background:var(--white);border-color:var(--border)}
.inf-tb-sel{background:var(--white);border:1px solid var(--border);color:var(--text);font-size:12.5px;border-radius:7px;padding:4px 6px;cursor:pointer;height:30px}
.inf-tb-cor{position:relative;overflow:hidden;font-weight:800}
.inf-tb-cor input{position:absolute;inset:0;opacity:0;cursor:pointer}
.inf-tb-hl{background:#fff3bf;border-color:#f0dd8a}
.inf-editor{min-height:200px;border-radius:0 0 9px 9px;overflow-y:auto;line-height:1.7;font-size:15px}
.inf-editor:focus{outline:2px solid color-mix(in srgb,var(--primary) 40%,transparent);outline-offset:-1px}
.inf-editor:empty:before{content:attr(data-ph);color:var(--muted)}
.inf-editor img{max-width:100%;height:auto;margin:12px auto;border-radius:10px;cursor:pointer}
.inf-editor p{margin:0 0 10px}
.inf-editor::after,.inf-txt::after{content:'';display:block;clear:both}
.inf-img-sel{outline:3px solid var(--primary);outline-offset:2px}
/* barra de edição da imagem selecionada */
.inf-imgbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;background:color-mix(in srgb,var(--primary) 9%,var(--bg));border:1px solid var(--border);border-top:0;padding:7px 9px;font-size:12px}
.inf-imgbar-lbl{font-weight:700}
.inf-imgbar-g{display:inline-flex;align-items:center;gap:3px;color:var(--muted)}
.inf-tb-b.danger{color:#c0392b}
/* anexos no formulário */
.inf-anx{display:flex;align-items:center;gap:8px;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:7px 10px;margin-bottom:6px}
.inf-anx.pend{border-style:dashed}
.inf-anx-i{flex:0 0 auto}
.inf-anx-n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:600}
.inf-anx-t{font-size:11.5px;color:var(--muted)}
.inf-anx-vazio{color:var(--muted);font-size:12.5px;margin:2px 0 8px}
/* imagens do texto inteiras na leitura */
.inf-txt img{max-width:100%;height:auto;display:block;margin:14px auto;border-radius:12px}
.inf-txt ul,.inf-txt ol{margin:0 0 14px;padding-left:24px}
.inf-txt a{color:var(--primary)}
/* anexos na leitura */
.inf-anexos-view{margin-top:22px;padding-top:16px;border-top:1px solid var(--border)}
.inf-anexos-tit{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.inf-anx-dl{display:flex;align-items:center;gap:9px;background:var(--bg);border:1px solid var(--border);border-radius:9px;padding:9px 12px;margin-bottom:7px;text-decoration:none;color:var(--text)}
.inf-anx-dl:hover{border-color:var(--primary)}
/* leitura (quem leu) */
.inf-leitura{margin-top:20px;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:10px}
.inf-leit-btn{background:transparent;border:1px solid var(--border);color:var(--primary);font-size:12px;font-weight:600;border-radius:99px;padding:3px 11px;cursor:pointer}
.inf-leit-btn:hover{border-color:var(--primary)}
.inf-leit-lista{max-height:320px;overflow:auto}
.inf-leit-li{display:flex;justify-content:space-between;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);font-size:14px}
.inf-leit-li small{color:var(--muted)}
