/* ABP Design System — ui.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #1E3A5F;
  --blue-d:     #152C48;
  --blue-l:     #EEF2FF;
  --gold:       #B8956B;
  --gold-d:     #9A7B52;
  --gold-l:     #F5F0E8;
  --gold-muted: #D4C4A8;
  --green:      #2D6A4F;
  --green-l:    #E8F5EE;
  --red:        #C0392B;
  --red-l:      #FEE2E2;
  --gray:       #64748B;
  --gray-m:     #94A3B8;
  --gray-l:     #F1F5F9;
  --bg:         #F8F7F4;
  --surface:    #FFFFFF;
  --text:       #1E293B;
  --text-muted: #64748B;
  --border:     #E2E8F0;
  --radius:     14px;
  --radius-lg:  16px;
  --shadow:     0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Icons */
.icon-wrap, .svg-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: middle; }
.icon-wrap { color: inherit; }
.card-title .icon-wrap { color: var(--blue); }
.card-title-gold .icon-wrap { color: var(--gold-d); }

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  color: var(--surface);
  padding: 14px 20px 12px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
}
.header-center { flex: 1; text-align: center; }
.header-sacra-img {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1); margin-bottom: 4px;
}
.header-spacer { min-width: 40px; }
.btn-home {
  background: rgba(255,255,255,0.1); border: none; color: var(--surface);
  cursor: pointer; padding: 8px; border-radius: 10px; line-height: 1;
  min-width: 40px; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.btn-home:hover { background: rgba(255,255,255,0.2); }
.app-header h1 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }
.app-header .regiao-subtitle { font-size: 0.72rem; opacity: 0.8; margin-top: 2px; font-weight: 500; }
.app-header .date { font-size: 0.78rem; opacity: 0.85; margin-top: 2px; }

/* Admin header */
.app-header .header-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-header .header-brand img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(255,255,255,0.35);
}
.app-header .logo { font-size: 1rem; font-weight: 700; }
.app-header .user-info { font-size: 0.78rem; opacity: 0.9; text-align: right; }
.app-header .user-info strong { display: block; font-size: 0.82rem; }
.btn-painel-fiel, .btn-coord {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 999px;
  background: rgba(184,149,107,0.25); color: var(--surface);
  font-size: 0.72rem; font-weight: 600; padding: 5px 12px; cursor: pointer;
  transition: var(--transition);
}
.btn-painel-fiel:hover, .btn-coord:hover { background: rgba(184,149,107,0.4); }

/* Layout */
.content { padding: 16px; max-width: 640px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.layout { display: flex; min-height: calc(100vh - 56px); }
.main-content { flex: 1; padding: 20px; max-width: 920px; }
.panel { display: none; }
.panel.active { display: block; }
#mainApp { display: none; }

/* Cards — core design system */
.card, .stat-card, .nav-link-btn, .liturgia-link-btn, .sugestao-card, .mural-card, .quiz-pergunta-card, .aviso-card, .cascade-option {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover, .stat-card:hover, .nav-link-btn:hover, .liturgia-link-btn:hover, .sugestao-card:hover, .mural-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.card { padding: 20px; margin-bottom: 16px; }
.card-title, .card-title-gold {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.card-title { color: var(--blue); }
.card-title-gold { color: var(--gold-d); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }

/* Nav links */
.nav-links { display: flex; flex-direction: column; gap: 12px; }
.nav-link-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; text-decoration: none; color: inherit;
  cursor: pointer; width: 100%; text-align: left;
}
.nav-link-btn--coord {
  border-color: var(--gold-muted);
  background: linear-gradient(135deg, var(--gold-l) 0%, var(--surface) 100%);
}
.nav-link-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue-l); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.nav-link-btn--coord .nav-link-icon {
  background: var(--gold-l); color: var(--gold-d);
}
.nav-link-info { flex: 1; min-width: 0; }
.nav-link-titulo { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 2px; }
.nav-link-titulo--gold { color: var(--gold-d); }
.nav-link-desc { font-size: 0.78rem; color: var(--text-muted); }
.nav-link-arrow { color: var(--gray-m); flex-shrink: 0; }

/* Liturgia links */
.liturgia-links { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.liturgia-link-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; text-decoration: none; color: inherit;
}
.liturgia-link-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gold-l); color: var(--gold-d);
  display: flex; align-items: center; justify-content: center;
}
.liturgia-link-titulo { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 2px; }
.liturgia-link-desc { font-size: 0.78rem; color: var(--text-muted); }
.liturgia-link-arrow { color: var(--gold); flex-shrink: 0; }

/* Liturgia content */
.liturgia-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  margin-bottom: 12px; background: var(--blue-l); color: var(--blue);
}
.leitura-item {
  border-left: 3px solid var(--gold-muted);
  padding: 12px 16px; margin-bottom: 10px;
  background: var(--gray-l); border-radius: 0 var(--radius) var(--radius) 0;
}
.leitura-ref { font-size: 0.78rem; color: var(--blue); font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.leitura-texto { font-size: 0.92rem; line-height: 1.65; color: var(--text); white-space: pre-line; }
.salmo-block { background: var(--gold-l); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; font-style: italic; }
.salmo-ref { font-size: 0.78rem; color: var(--blue); font-weight: 600; margin-bottom: 4px; font-style: normal; display: flex; align-items: center; gap: 6px; }
.salmo-refrão { font-weight: 700; color: var(--blue-d); margin-bottom: 6px; }
.evangelho-block { border: 1px solid var(--gold-muted); border-radius: var(--radius); padding: 14px 16px; margin-top: 10px; background: var(--surface); }
.evangelho-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--gold-d); letter-spacing: 0.08em; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* Forms */
.field-group, .form-group { margin-bottom: 14px; }
.field-label, .form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field-sublabel, .form-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
textarea, input[type="text"], input[type="email"], input[type="date"], input[type="url"], select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; font-family: inherit;
  background: var(--surface); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}
textarea { resize: vertical; min-height: 96px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border: none; border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: var(--surface); }
.btn-primary:hover { background: var(--blue-d); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--surface); }
.btn-gold:hover { background: var(--gold-d); box-shadow: var(--shadow); }
.btn-green { background: var(--green); color: var(--surface); }
.btn-green:hover { filter: brightness(1.05); }
.btn-danger { background: var(--red); color: var(--surface); }
.btn-outline { background: var(--surface); color: var(--blue); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); background: var(--blue-l); }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; border-radius: 10px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-icon-only { padding: 10px; min-width: 44px; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { padding: 18px; text-align: center; cursor: default; }
.stat-card[onclick] { cursor: pointer; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1.1; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* Contador */
.contador-box {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  color: var(--surface); border-radius: var(--radius-lg);
  padding: 20px; text-align: center; margin-bottom: 16px;
  box-shadow: var(--shadow); border: none;
}
.contador-num { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.contador-label { font-size: 0.82rem; opacity: 0.92; margin-top: 6px; }

/* Pastoral / Avisos / Mural */
.sugestao-card, .mural-card { padding: 18px; margin-bottom: 12px; border-left: 4px solid var(--gold-muted); }
.sugestao-paroquia { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.sugestao-ref { font-size: 1rem; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.sugestao-reflexao { font-size: 0.88rem; line-height: 1.65; color: var(--text); }
.aviso-card { background: var(--gold-l); border-color: var(--gold-muted); padding: 16px; margin-bottom: 10px; }
.aviso-titulo { font-size: 0.95rem; font-weight: 700; color: var(--gold-d); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.aviso-conteudo { font-size: 0.85rem; color: var(--text); line-height: 1.55; }
.aviso-data { font-size: 0.72rem; color: var(--text-muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.oracao-intro { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 14px; font-style: italic; }

/* Interacao */
.interacao-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.btn-curtir {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1px solid var(--gold-muted); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.btn-curtir.curtido { background: var(--gold-l); color: var(--gold-d); border-color: var(--gold); }
.btn-curtir:disabled { opacity: 0.5; cursor: not-allowed; }
.curtir-count { font-size: 0.78rem; color: var(--text-muted); }
.audio-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.82rem; color: var(--blue); font-weight: 600; text-decoration: none; background: var(--blue-l); padding: 7px 14px; border-radius: 999px; }

/* Share / Proposito */
.proposito-done { background: var(--green-l); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.proposito-done p { font-size: 0.85rem; color: var(--green); font-weight: 600; }
.share-box { background: linear-gradient(135deg, var(--gold-l), var(--surface)); border: 1px solid var(--gold-muted); border-radius: var(--radius-lg); padding: 18px; text-align: center; margin-top: 12px; }
.share-preview { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 12px 0; font-size: 0.85rem; line-height: 1.6; border: 1px solid var(--border); text-align: left; }
.share-preview .share-ref { font-size: 0.75rem; color: var(--blue); font-weight: 600; }
.share-preview .share-proposito { font-style: italic; margin-top: 4px; }
.share-preview .share-tag { font-size: 0.72rem; color: var(--gold-d); margin-top: 6px; }

/* Sidebar / Bottom nav */
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); padding: 16px 0;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; cursor: pointer; font-size: 0.85rem;
  color: var(--text-muted); border-left: 3px solid transparent; transition: var(--transition);
}
.sidebar-item:hover { background: var(--gray-l); color: var(--blue); }
.sidebar-item.active { color: var(--blue); font-weight: 600; border-left-color: var(--blue); background: var(--blue-l); }
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border); z-index: 100;
  overflow-x: auto; scrollbar-width: none;
}
.bottom-nav::-webkit-scrollbar { display: none; }
.bottom-nav-inner { display: flex; }
.bnav-item {
  flex: 1; min-width: 64px; padding: 8px 4px;
  border: none; background: transparent; cursor: pointer; color: var(--text-muted);
  font-size: 0.65rem; display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: color 0.2s;
}
.bnav-item.active { color: var(--blue); font-weight: 600; }
@media (max-width: 640px) {
  .sidebar { display: none; }
  .bottom-nav { display: block; }
  .layout { padding-bottom: 64px; }
}

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-hover); border: 1px solid var(--border);
}
.modal h2 { font-size: 1.05rem; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.modal p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px; border-bottom: 1px solid var(--border);
  margin: -24px -24px 16px;
}
.modal-header h2 { margin-bottom: 0; }
.modal-close {
  background: var(--gray-l); border: none; cursor: pointer;
  color: var(--text-muted); padding: 8px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-overlay.sheet { align-items: flex-end; padding: 0; }
.modal.modal-sheet { max-width: 100%; border-radius: 20px 20px 0 0; padding: 0; max-height: 85vh; overflow-y: auto; animation: slideUp 0.25s ease; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cascade-options { padding: 8px 16px 28px; display: flex; flex-direction: column; gap: 10px; }
.cascade-option { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; text-align: left; width: 100%; }
.cascade-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-l); color: var(--gold-d); display: flex; align-items: center; justify-content: center; }
.cascade-titulo { font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 2px; }
.cascade-desc { font-size: 0.78rem; color: var(--text-muted); }
.cascade-arrow { color: var(--gold); flex-shrink: 0; }

/* Quiz */
.quiz-pergunta-card { padding: 20px; margin-bottom: 14px; }
.quiz-num { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.quiz-texto { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 16px; line-height: 1.5; }
.quiz-opcoes { display: flex; flex-direction: column; gap: 8px; }
.quiz-opcao {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--border);
  cursor: pointer; background: var(--surface); font-size: 0.9rem; transition: var(--transition);
}
.quiz-opcao:hover { border-color: var(--blue); background: var(--blue-l); }
.quiz-opcao.correta { border-color: var(--green); background: var(--green-l); color: var(--green); }
.quiz-opcao.errada { border-color: var(--red); background: var(--red-l); color: var(--red); }
.quiz-opcao.selecionada { border-color: var(--blue); background: var(--blue-l); }
.quiz-opcao:disabled { cursor: not-allowed; }
.quiz-letra { font-weight: 800; min-width: 22px; }
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.quiz-progress-bar { flex: 1; height: 6px; background: var(--gray-l); border-radius: 999px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width 0.4s; }
.quiz-score { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.quiz-done-icon { display: flex; justify-content: center; margin: 12px 0; color: var(--gold); }

/* Mural */
.mural-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mural-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-l); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mural-autor { font-weight: 600; font-size: 0.88rem; }
.mural-paroquia { font-size: 0.75rem; color: var(--text-muted); }
.mural-data { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.mural-conteudo { font-size: 0.9rem; line-height: 1.65; color: var(--text); }
.mural-foto { width: 100%; border-radius: var(--radius); margin-top: 10px; max-height: 300px; object-fit: cover; }
.mural-foto-preview { width: 100%; border-radius: var(--radius); margin-top: 10px; max-height: 200px; object-fit: cover; display: block; }
.mural-foto-remove { display: block; margin-top: 6px; background: none; border: none; color: var(--red); font-size: 0.82rem; cursor: pointer; padding: 4px 0; font-weight: 600; }

/* Chat admin */
.chat-box { max-height: 400px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; background: var(--gray-l); }
.chat-msg { margin-bottom: 10px; padding: 10px 12px; background: var(--surface); border-radius: var(--radius); font-size: 0.85rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05); }
.chat-msg-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }

/* Toast / Loader / Empty */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--surface);
  padding: 12px 20px; border-radius: 999px; font-size: 0.85rem;
  opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 500;
  max-width: 90%; text-align: center; box-shadow: var(--shadow-hover);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: var(--blue); }
.loader { display: flex; align-items: center; justify-content: center; padding: 40px 0; flex-direction: column; gap: 12px; color: var(--text-muted); font-size: 0.88rem; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--gray-l); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 32px 16px; color: var(--text-muted); }
.empty-state .icon-wrap { margin: 0 auto 12px; color: var(--gray-m); }
.empty-state p { font-size: 0.88rem; line-height: 1.55; }

/* Splash */
#splashScreen {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
}
#loading-ui { display: flex; flex-direction: column; align-items: center; transition: opacity 0.5s ease; }
#splashScreen h1 { color: var(--blue); font-weight: 300; letter-spacing: 0.12em; font-size: 1.75rem; font-family: var(--font); }
#container-barra { width: 240px; height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 20px; }
#barra { width: 0%; height: 100%; background: var(--blue); transition: width 0.1s linear; border-radius: 999px; }
#splashCruz { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; background: var(--bg); overflow: hidden; }
.cruz-catolica { position: relative; width: 12px; height: 140px; background-color: var(--blue); opacity: 0; }
.cruz-catolica::after { content: ''; position: absolute; width: 70px; height: 12px; background-color: var(--blue); top: 35px; left: -29px; }
.animar-atravessar { animation: atravessar 2.5s cubic-bezier(0.55, 0.05, 0.67, 0.19) forwards; }
@keyframes atravessar { 0% { opacity: 0; transform: scale(0.1); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(60); } }

/* Tables / lists admin */
.list-item { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.list-item:last-child { border-bottom: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--red); color: var(--surface); }
.code-display { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--blue-l); border-radius: var(--radius); margin-bottom: 8px; }
.code-display .icon-wrap { color: var(--blue); }
.code-value { font-size: 1.5rem; font-weight: 800; color: var(--blue); letter-spacing: 0.15em; }

/* Admin — accent dourado sofisticado */
body.admin-app { background: var(--bg); }
body.admin-app .app-header {
  border-bottom: 3px solid var(--gold-muted);
  background: linear-gradient(135deg, var(--blue) 0%, #243d5c 55%, var(--blue-d) 100%);
}
body.admin-app .stat-card:hover { border-color: var(--gold-muted); }
body.admin-app .sidebar-item.active { border-left-color: var(--gold); background: var(--gold-l); color: var(--gold-d); }
body.admin-app .bnav-item.active { color: var(--gold-d); }

/* Modais admin — ocultos por padrão (fix overlay bug) */
#modalVisualizarPost,
#modalInfoDetalhes,
#lightboxImagem,
#modalConfirm {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(15, 23, 42, 0.55);
  overflow-y: auto;
  padding: 20px;
  align-items: flex-start;
  justify-content: center;
  backdrop-filter: blur(4px);
}
#modalVisualizarPost.aberto,
#modalInfoDetalhes[style*="flex"],
#lightboxImagem.aberto,
#modalConfirm.aberto {
  display: flex !important;
}
#modalInfoDetalhes { z-index: 650; }
#lightboxImagem {
  z-index: 700;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  align-items: center;
}
#modalConfirm { z-index: 9000; align-items: center; }
.confirm-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  overflow: hidden;
}
.confirm-header {
  background: var(--blue);
  padding: 16px 20px;
  color: var(--surface);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.confirm-verse {
  background: var(--gold-l);
  border-left: 4px solid var(--gold-muted);
  margin: 14px 20px 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--gold-d);
  font-style: italic;
  line-height: 1.55;
}
.confirm-body { padding: 14px 20px 4px; font-size: 0.92rem; color: var(--text); line-height: 1.55; }
.confirm-footer { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.post-img-preview {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: var(--radius); cursor: zoom-in; transition: opacity 0.2s;
}
.post-img-preview:hover { opacity: 0.9; }
.btn-galeria {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 14px;
  background: var(--blue-l); color: var(--blue);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.btn-galeria:hover { background: var(--blue); color: var(--surface); }

/* Assistente ABP */
#abp-assistant-root { position: fixed; z-index: 9500; }
#abp-assistant-fab {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  width: 54px; height: 54px;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, #2a7eea, #1E3A5F);
  color: #fff;
  box-shadow: var(--shadow-hover);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
body.admin-app #abp-assistant-fab { bottom: max(76px, calc(env(safe-area-inset-bottom) + 56px)); }
#abp-assistant-fab:hover { transform: scale(1.05); }
#abp-assistant-panel {
  position: fixed;
  bottom: max(84px, calc(env(safe-area-inset-bottom) + 64px));
  right: max(16px, env(safe-area-inset-right));
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 120px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
body.admin-app #abp-assistant-panel { bottom: max(140px, calc(env(safe-area-inset-bottom) + 120px)); }
#abp-assistant-panel.aberto { display: flex; }
.abp-asst-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  color: var(--surface);
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.abp-asst-header h3 { font-size: 0.95rem; font-weight: 700; }
.abp-asst-header p { font-size: 0.72rem; opacity: 0.85; margin-top: 2px; }
.abp-asst-close {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.abp-asst-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.abp-asst-msg {
  max-width: 92%; padding: 10px 12px; border-radius: 14px;
  font-size: 0.85rem; line-height: 1.55;
}
.abp-asst-msg.bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.abp-asst-msg.user {
  align-self: flex-end;
  background: var(--blue);
  color: var(--surface);
}
.abp-asst-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.abp-asst-input-row input {
  flex: 1; margin: 0;
}
.abp-asst-input-row button { flex-shrink: 0; padding: 10px 14px; }
.abp-asst-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.abp-asst-chip {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 5px 10px; font-size: 0.72rem;
  cursor: pointer; color: var(--text-muted); transition: var(--transition);
}
.abp-asst-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-l); }

.abp-asst-modes {
  display: flex; gap: 6px; padding: 10px 12px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.abp-asst-mode {
  flex: 1; border: 1px solid var(--border); background: var(--bg);
  border-radius: 10px; padding: 7px 8px; font-size: 0.75rem;
  font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.abp-asst-mode.active {
  background: var(--blue-l); color: var(--blue); border-color: var(--blue);
}
.abp-asst-tutor-fields {
  padding: 10px 12px 0; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px;
}
.abp-asst-tutor-fields label {
  font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.abp-asst-tutor-fields textarea,
.abp-asst-tutor-fields input {
  width: 100%; margin: 0; font-size: 0.82rem;
  border-radius: 10px; resize: vertical;
}
#abp-assistant-panel {
  max-height: min(640px, calc(100vh - 100px));
}



/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse at top, rgba(30, 58, 95, 0.08) 0%, transparent 55%),
    var(--bg);
}
.login-shell { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--gold-muted);
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.login-brand h1 { font-size: 1.35rem; color: var(--blue); font-weight: 700; }
.login-brand p { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }
.login-card { padding: 20px; }
.login-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 18px; padding: 4px; background: var(--gray-l); border-radius: 12px;
}
.login-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; background: transparent; color: var(--text-muted);
  font-size: 0.82rem; font-weight: 600; padding: 10px 8px; border-radius: 10px;
  cursor: pointer; transition: var(--transition);
}
.login-tab.active {
  background: var(--surface); color: var(--blue);
  box-shadow: var(--shadow);
}
.login-panel { display: none; }
.login-panel.active { display: block; }
.login-intro {
  font-size: 0.85rem; color: var(--gray); margin-bottom: 14px; line-height: 1.5;
}
.login-hint {
  font-size: 0.72rem; color: var(--gray); margin-top: 4px; font-style: italic;
}
.login-footer-link { text-align: center; margin-top: 12px; font-size: 0.78rem; }
.login-footer-link a { color: var(--blue); text-decoration: none; font-weight: 600; }
.login-footer-link a:hover { text-decoration: underline; }
.login-note {
  margin-top: 14px; font-size: 0.75rem; color: var(--text-muted); line-height: 1.5;
  padding: 10px 12px; background: var(--gold-l); border-radius: 10px;
}

.nav-link-btn--sair .nav-link-icon {
  background: #fde8e8; color: #b42318;
}
.nav-link-btn--sair .nav-link-titulo { color: #b42318; }
.tutor-intro {
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.55;
  margin: 0 0 14px;
}
.tutor-foco-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 14px;
}
.tutor-resposta {
  font-size: 0.88rem; line-height: 1.65; color: var(--text);
  white-space: normal;
}
